// WindowOpen JS functions
//
// Include:
// <script src="../classes/open_window.js" language="JavaScript"></script>
//
// Usage choices:
// <a href="index.html" target="fullWin" onClick="openFull();window.close()">Open full screen</a>
// <input type="button" name="btnFullScreen" onClick="openFull('');window.close()" value=" Full Screen ">
function openFull(url)
{
    if (document.all)
    {
        msgWindow = window.open(url,'fullWin','fullscreen=yes');
    	msgWindow.focus();
    }
    //return true;
}

// Usage:
// <a href="index.html" target="newWin" onClick="openWindow()">Open Window</a>
function openWindow(url)
{
    if (document.all)
    {
	    msgWindow = window.open(url,'ProductWindow','toolbar=no,resizable=yes,status=no,scrollbars=yes,location=no,menubar=no,directories=no,width=600,height=400');
	    msgWindow.focus();
    }
    return true;
}

function openCenteredWindow(url)
{
	var w = 480, h = 340;

	if (document.all || document.layers) {
	   w = screen.availWidth;
	   h = screen.availHeight;
	}

	var popW = w * 0.65, popH = h * 0.65;

	var leftPos = (w-popW)/2, topPos = (h-popH)/2;

    if (document.all)
    {
	    msgWindow = window.open(url,'ProductWindow','toolbar=no,resizable=yes,status=no,scrollbars=yes,location=no,menubar=no,directories=no,width=' + popW + ',height='+popH+',top='+topPos+',left='+leftPos);
	    msgWindow.focus();
    }
    //return true;
}