﻿// JScript File

function OpenWindowFullScreen(iNavigateURL)
{
	var newWindow = window.open(iNavigateURL,'','toolbar=no,status=yes,scrollbars=1,menubar=yes,location=no,resizable=1');
	newWindow.focus();
	newWindow.moveTo( 0, 0 );
	newWindow.resizeTo( screen.availWidth, screen.availHeight );
	//newWindow.resizeTo( screen.width, screen.height );
}

function GeneratePrintVersion(iTitle, iCSSPath, iIsPrintOnLoad, iPanelContent)
{
	var theContent = document.getElementById(iPanelContent).innerHTML;
	var theNewWindow = window.open('','','toolbar=yes,status=yes,scrollbars=1,menubar=yes,location=no,resizable=1');
	
	theNewWindow.document.open(); 
	theNewWindow.document.write('<html>');
	theNewWindow.document.write('<head>');
	
	//Set title
	if(iTitle!='')
	{
		theNewWindow.document.write('<title>'+iTitle+'</title>');
	}
	
	//Set CSS
	if(iCSSPath!='')
	{
		theNewWindow.document.write('<link href="'+iCSSPath+'" rel="Stylesheet" type="text/css" />');
	}
	
	theNewWindow.document.write('</head>');
	
	//Set print on load
	if(iIsPrintOnLoad==true)
	{
		theNewWindow.document.write('<body onLoad="self.print()"><center>');	
	}
	else
	{
		theNewWindow.document.write('<body>');
	}
		
	theNewWindow.document.write('<center>');
	theNewWindow.document.write(theContent);
	theNewWindow.document.write('</center>');
	theNewWindow.document.write('</body>');
	theNewWindow.document.write('</html>');

	theNewWindow.focus();
}