﻿// JScript File

<!--

if (getRequestVar('print') == 'yes')
{
	document.write("<link href='../css/print.css' rel='stylesheet' media='screen'>");
	document.write("<link href='../print.css' rel='stylesheet' media='print'>");
}

function getRequestVar(istr) 
{ 
	var xstr = window.location.href; 
	var xloc = xstr.indexOf('?'), yloc = 0; 
	istr += '='; 
	if(xloc == -1) return ''; 
	else { 
		xloc = xstr.indexOf(istr, xloc) + istr.length; 
		yloc = xstr.indexOf('&', xloc)!= -1? 
				xstr.indexOf('&', xloc) : xstr.indexOf('#', xloc); 
		if(yloc == -1) xstr = xstr.substring(xloc); 
		else xstr = xstr.substring(xloc, yloc); 
	} 
	
	return xstr; 
} 

function openPrinterVersion()
{
	window.open( window.location + "?print=yes", "printWindow" );
	//window.print();
}
function ShowDemo(URL, iHeight, iWidth)
		{
			// the 6 pixels is for IE's border and the 30 pixels is for the taskbar.
			var top = (((window.screen.height)/2)-(iHeight/2)-(6+30));
			var left = (((window.screen.width)/2)-(iWidth/2)-6);
			var s3 = "toolbar=no,titlebar=yes,location=no,directories=no,status=no,menubar=no,resizable=no,copyhistory=no,fullscreen=no,dependent=yes,scrollbars=no,width=" + iWidth + ",height=" + iHeight + ",top=" + top + ",left=" + left
			xo = window.open(URL,'ADPPayrollDemo',s3);
			var usera = navigator.userAgent;
			var bMSIE5 = (usera.indexOf("MSIE 5.")>=1);
			var bMSIE6 = (usera.indexOf("MSIE 6.")>=1);
			if (bMSIE5 || bMSIE6)
			{
			   xo.focus();
			}
		}
//-->
