function windowOpen(_url)
{
	var body = document.getElementsByTagName("BODY")[0];

	var h = Math.floor(body.offsetHeight*0.6);
	var w = Math.floor(body.offsetWidth*0.6);
	var t = Math.floor(screen.height/2 - h/2);
	var l = Math.floor(screen.width/2 - w/2);
	window.open(_url, "Print","scrollbars=yes, resizable=yes, width="+w+", height="+h+", top="+t+", left="+l);
}

function getParamValue(_paramName)
{
	var arg=window.location.search.substring(1).split('&');
		var paramValue="";
	for(var i=0;i<arg.length;i++)
	{
		if(arg[i].split('=')[0]==_paramName)
		{
			if(arg[i].split('=').length>1)
			{
				paramValue=arg[i].split('=')[1];
				return paramValue;
			}
		}
	}
	return paramValue;
}

function getPrintVersion()
{
	var print = getParamValue("print")=="yes";

	if(print)
	{
		var  printStyleSheet =  document.createElement("LINK");
		printStyleSheet.type="text/css";
		printStyleSheet.rel="stylesheet";
		printStyleSheet.href="print.css";

		var oldStyleSheet = document.getElementsByTagName("LINK")[0];

		if (oldStyleSheet)
		{
			var head = oldStyleSheet.parentNode;
			head.removeChild(oldStyleSheet);
			head.appendChild(printStyleSheet);
		}
	}
}