﻿// PopupLinkBoxFormBase.js
// 
// Sets up a call to the popup form as a modal dialog.
// Passes LinkText argument to the modal form for the name of the missing content.
// Is returned the users action to go forward - OK, or stay - Cancel.
//
    var theWindow;
    var PopUpLinkBoxPageURL = '/CN/PopupLinkBox.htm';
    var resultAction = new Object();
    
    function popupLinkBox(linkText, linkUrl)
    {
        resultAction.LinkText = linkText;
        resultAction.Result = "test";
    
        theWindow = window.showModalDialog(PopUpLinkBoxPageURL, resultAction, 'dialogWidth:400px;dialogHeight:150px;status:no;toolbar:no;menubar:no;resizable:no;scroll:no');
        if (resultAction.Result == "ok")
        {
            // Relocate to the link url
            window.location = linkUrl;
        }
        else
        {
            // Do nothing
        }
    }

    