/**
 * overrides the default function so that it forces a refresh of the
 * page in case they have clicked on any of the tabs.  Clicking on the
 * tabs prevents the print styles from displaying correctly for tabs
 * because js has overriden the default styles of the tabs.  This passes
 * a benign parameter 'printNow' that this file of js looks for when loading
 * that will tell it to print the document immediately (the refresh wipes
 * out any js altering of tab styles).
 **/
function printPage(e) {
	YAHOO.util.Event.stopEvent(e);
	var url = window.location.href;
	url = url.replace(window.location.hash, "").replace(window.location.search, "");
	var time = new Date();
	window.location.replace(url + "?printNow=" + time.getTime());
}

function getRequestParam( name ) {
  var regexS = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp( regexS );
  var results = regex.exec( window.location.href );
  if( results == null )
    return "";
  else
    return results[1];
}
var printNow = getRequestParam("printNow");
var currTime = new Date();
// if the print request time is within 30 seconds then print
if (parseInt(printNow) > (currTime.getTime() - 30000)) {
	YAHOO.util.Event.on(window, "load", window.print);
}