
function openWindow( pageToLoad, winName, width, height, center) {
                                         
    xposition=162; yposition=20;
    if ((parseInt(navigator.appVersion) >= 4 ) && (center)){
        xposition = (screen.width - width) / 2;
        yposition = (screen.height - height) / 2;
    }
    args = "width=" + width + "," 
    + "height=" + height + "," 
    + "location=0," 
    + "menubar=0,"
    + "resizable=1,"
    + "scrollbars=1,"
    + "status=1," 
    + "titlebar=0,"
    + "toolbar=0,"
    + "hotkeys=0,"
    + "screenx=" + xposition + ","  //NN Only
    + "screeny=" + yposition + ","  //NN Only
    + "left=" + xposition + ","     //IE Only
    + "top=" + yposition;           //IE Only

    newWindow = window.open( pageToLoad,winName,args );
	newWindow.focus( );
}

function openWindow_off( pageToLoad, winName, width, height, center) {
                                         
    xposition=162; yposition=20;
    if ((parseInt(navigator.appVersion) >= 4 ) && (center)){
        xposition = (screen.width - width) / 2;
        yposition = (screen.height - height) / 2;
    }
    args = "width=" + width + "," 
    + "height=" + height + "," 
    + "location=0," 
    + "menubar=0,"
    + "resizable=0,"
    + "scrollbars=0,"
    + "status=0," 
    + "titlebar=0,"
    + "toolbar=0,"
    + "hotkeys=0,"
    + "screenx=" + xposition + ","  //NN Only
    + "screeny=" + yposition + ","  //NN Only
    + "left=" + xposition + ","     //IE Only
    + "top=" + yposition;           //IE Only

    newWindow = window.open( pageToLoad,winName,args );
	newWindow.focus( );
}


function PopUpWindow(sUrl, iWidth, iHeight)
{
	var sWindowString;
	var dNew = new Date();
	var sRandName = dNew.getUTCMilliseconds();
	sRandName = sRandName.toString();

	sWindowString = "width=" + iWidth + ",height=" + iHeight + ",toolbar=0,scrollbars=no,location=0,directories=0,status=0,menubar=0,resizable=yes";
	newWindow = window.open(sUrl, sRandName, sWindowString);
}

function PopUpCenterWindow(sUrl, iWidth, iHeight, sScroll)
{
	var sWindowString;
	var dNew = new Date();
	var sRandName = dNew.getUTCMilliseconds();
	sRandName = sRandName.toString();

	var Xpos= (screen.availWidth - iWidth)/2;
	var Ypos= (screen.availHeight - iHeight)/2-10;

	if (sScroll == "")
		{
		sScroll = "no";
		}

	sWindowString = "width=" + iWidth + ",height=" + iHeight + ",screenX=" + Xpos + ",screenY="  + Ypos + ",toolbar=0,scrollbars=" + sScroll + ",location=0,directories=0,status=0,menubar=0,resizable=yes";
	newWindow = open(sUrl, sRandName, sWindowString);
	newWindow.moveTo(Xpos, Ypos);
	newWindow.location=sUrl;
}

function CenterWindow()
{
	var Xpos= (screen.availWidth - 475)/2;
	var Ypos= (screen.availHeight - 750)/2;
	window.moveTo(Xpos, Ypos);
}

