function printPage(strId)
{
var re = new RegExp('([0-9]*?.).aspx');
  var m = re.exec(window.location.href);
  var s = "";
  if (m != null) {
   for (i = 0; i < m.length; i++) {
  	 s =  m[i];
  	  }
 }

if(s == "" || s == "e"){
	 window.open(this.location.href+"&t=print");
	}
else
{
	window.open('site.aspx?p=' + s + '&t=print');
}

	

/*
	if (!document.getElementById(strId)) {return;}
	var strWinHTML = document.getElementById(strId).innerHTML; 
	var winprint=window.open("","Print"); 
	winprint.document.open();
	winprint.document.write('<html><head><title>Print</title><link href="cms/Horten2009/Horten2009.css" type="text/css" rel="stylesheet">');
	winprint.document.write('</head><body onload="javascript:window.print()"><div style="width: 600px;">'); 
	winprint.document.writeln("<script type='text/javascript'>");
	winprint.document.writeln("function handleErrors() {");
	winprint.document.writeln("return true;");
	winprint.document.writeln("}");
	winprint.document.writeln("window.onerror = handleErrors;");
	winprint.document.writeln("</script>");
	winprint.document.write("<img src='cms/Horten2009/images/logo.gif' alt='' /><br /><br /><br />");
	winprint.document.write(strWinHTML);          
	winprint.document.write('</div></body></html>'); 
	winprint.document.close(); */
}

function changecss(theClass,element,value) 
{ 
	if( document.styleSheets[0].cssRules ) 
	{
		//Firefox browser
		for (var S = 0; S < document.styleSheets.length; S++)
		{ 
			for (var R = 0; R < document.styleSheets[S].cssRules.length; R++) { 
				if (document.styleSheets[S].cssRules[R].selectorText == theClass) {document.styleSheets[S].cssRules[R].style[element] = value; } 
			} 
		} 
	} 
	else 
	{
		//Explorer browser
		for (var S = 0; S < document.styleSheets.length; S++)
		{ 
			for (var R = 0; R < document.styleSheets[S].rules.length; R++) { 
				if (document.styleSheets[S].rules[R].selectorText == theClass) {document.styleSheets[S].rules[R].style[element] = value; } 
			} 
		} 						
	} 
}			
