﻿// JScript File

function OpenWindow(loc, height, width)
{
    var NewWindow
	NewWindow = window.open(loc, "NewWindow", "alwaysRaised=yes, dependent=yes, hotkeys=no, menubar=yes, resizable=no, status=yes, titlebar=no, toolbar=no, width="+width+", height="+height)
}
function OpenWindowSafely(loc, height, width)
{
    var doyou
	doyou = confirm("Are you sure you want to delete this? (OK = Yes   Cancel = No)"); 
	if (doyou == true)
	{
	    var NewWindow
	    NewWindow = window.open(loc, "NewWindow", "alwaysRaised=yes, dependent=yes, hotkeys=no, menubar=no, resizable=no, status=yes, titlebar=no, toolbar=no, width="+width+", height="+height);
    }
}	

function DisableForm()
{
    for(var i=0; i<=document.forms.length; i++)
        for(var e=0; e<=document.forms[i].elements.length; e++)
        {
            var element = document.forms[i].elements[e];
            if(element != null)
            {
                if(element.type == "text" || element.type == "checkbox" || element.type == "submit")
                    element.disabled = true;
            }
        }
}

function doClose()
{
    window.opener.location.href = window.opener.location.href;
    self.close();
}
    
function closeForm(millisec)
{
    setTimeout('doClose()', millisec);
}
