function TogglePrintDisplay(bFromBody)
{
	var bCurrentPrintMode = false;
	var col = document.styleSheets[0];//cross-browser change (0) to [0]
	var blnLandscape = false;
	var fav = false;
	if (bFromBody == "fav"){
		bFromBody = true;
		fav = true;
	}
		
	var formMain = document.forms['mainform'];
//	alert("TPD2");
	if ( formMain != null )
	{
//		var chkLandscape = document.mainform.elements['PrintLandscape']
//		if ( chkLandscape != null )
//			blnLandscape = chkLandscape.checked;
	}
	if (navigator.userAgent.toUpperCase().indexOf("MSIE") > -1){//cross-browser
//	alert("MSIE")
	if (col!=null) 
	{
		if (col.rules!=null) 
		{
			// Set bCurrentPrintMode to the current mode
			for (i=0; i<col.rules.length; i++)
			{
				if ( col.rules(i).selectorText == ".np"||col.rules(i).selectorText == ".NP" ) //IE 8.0
				{
					if ( col.rules(i).style.display == "none" )
					{
						bCurrentPrintMode = true;

						// Changing back from print mode so put navbar back in place if from body
						// Next 2 lines by Robert Overman
						if ( bFromBody )
							RestoreMenuBar();

						break;
					}
				}
			}

			// Toggle styles as long as not in displaymode and clicked on body
			if ( !bFromBody || ( bFromBody && bCurrentPrintMode ))
			{
				for ( i=0; i<col.rules.length; i++ )
				{
					if ( col.rules(i).selectorText == ".np"||col.rules(i).selectorText == ".NP" ) //IE 8.0
					{
						if ( !bCurrentPrintMode )
							col.rules(i).style.display = "none";
						else
							col.rules(i).style.display = "inline";
					}
					else
					if ( col.rules(i).selectorText == ".p"||col.rules(i).selectorText == ".P" ) //IE 8.0
					{
						if ( !bCurrentPrintMode )
							col.rules(i).style.display = "inline";
						else
							col.rules(i).style.display = "none";
					}
					else
					if ( col.rules(i).selectorText == ".r1" ) 
					{
						if ( !bCurrentPrintMode )
							col.rules(i).style.backgroundColor = "white";
						else
							col.rules(i).style.backgroundColor = "#F0E9D9";
					}
					else
					if ( col.rules(i).selectorText == ".r2" ) 
					{
						if ( !bCurrentPrintMode )
							col.rules(i).style.backgroundColor = "white";
						else
							col.rules(i).style.backgroundColor = "#969696";
					}
					else
					if ( col.rules(i).selectorText == "A" ) 
					{
						if ( !bCurrentPrintMode )
						{
							document.linkColor = "black";
							col.rules(i).style.textDecoration = "none";
						}
						else
						{
							document.linkColor = "blue";
							col.rules(i).style.textDecoration = "underline";
						}
					}
					else
					if ( col.rules(i).selectorText == "BODY" ) 
					{
						if ( !bCurrentPrintMode )
							col.rules(i).style.margin = "0px";
						else
							col.rules(i).style.margin = "10px";
					}
				}
			}
		}
	}
	if(document.getElementById("banner")){
		if(!bFromBody)
		document.getElementById("banner").style.display = "none";
		else
		document.getElementById("banner").style.display = "inline";
	}
	}else{//not IE
//		alert("here"+col)
		if (col!=null) 
		{
			if (col.cssRules!=null) 
			{
				if (!bFromBody)//we be getting ready to print
				{
					for ( i=0; i<col.cssRules.length; i++ )
					{
						if ( col.cssRules[i].selectorText == ".np"||col.cssRules[i].selectorText == ".NP" ) //IE 8.0
						{
							col.cssRules[i].style.visibility = "collapse";
						}
						if ( col.cssRules[i].selectorText == ".npd"||col.cssRules[i].selectorText == ".NPD" ) //IE 8.0
						{
							col.cssRules[i].style.display = "none";
						}

						if ( col.cssRules[i].selectorText == ".p"||col.cssRules[i].selectorText == ".P" ) //IE 8.0
						{
							col.cssRules[i].style.visibility = "visible";
						}
						if ( col.cssRules[i].selectorText == ".pn"||col.cssRules[i].selectorText == ".PN" ) //IE 8.0
						{
							col.cssRules[i].style.display = "inline";
						}
						if ( col.cssRules[i].selectorText == ".xx"||col.cssRules[i].selectorText == ".XX" ) //IE 8.0
						{
							col.cssRules[i].style.visibility = "visible";
						}
						if ( col.cssRules[i].selectorText == ".r1" ) 
						{
							col.cssRules[i].style.backgroundColor = "white";
						}
						if ( col.cssRules[i].selectorText == ".r2" ) 
						{
							col.cssRules[i].style.backgroundColor = "white";
						}
						if ( col.cssRules[i].selectorText == "A" ) 
						{
							document.linkColor = "black";
						}
					
						if ( col.cssRules[i].selectorText == "BODY" ) 
						{
							col.cssRules[i].style.margin = "0px";
						}
					}
					if(document.getElementById("banner"))
					document.getElementById("banner").style.visibility = "collapse";
				}
				else//we be done printing
				{
					for ( i=0; i<col.cssRules.length; i++ )
					{
						if ( col.cssRules[i].selectorText == ".np"||col.cssRules[i].selectorText == ".NP" ) //IE 8.0
						{
							col.cssRules[i].style.visibility = "visible";
//							col.cssRules[i].style.display = "inherit";
							if(fav){
							col.cssRules[i].style.display = "inline";
							}
						}
						if ( col.cssRules[i].selectorText == ".npd"||col.cssRules[i].selectorText == ".NPD" ) //IE 8.0
						{
							col.cssRules[i].style.display = "inline";						
						}
						if ( col.cssRules[i].selectorText == ".p"||col.cssRules[i].selectorText == ".P" ) //IE 8.0
						{
							col.cssRules[i].style.visibility = "collapse";
						}
						if ( col.cssRules[i].selectorText == ".pn"||col.cssRules[i].selectorText == ".PN" ) //IE 8.0
						{
							col.cssRules[i].style.display = "none";
						}

						if ( col.cssRules[i].selectorText == ".xx"||col.cssRules[i].selectorText == ".XX" ) //IE 8.0
						{
							col.cssRules[i].style.visibility = "collapse";
						}

						if ( col.cssRules[i].selectorText == ".r1" ) 
						{
							col.rules(i).style.backgroundColor = "#F0E9D9";
						}
						if ( col.cssRules[i].selectorText == ".r2" ) 
						{
							col.rules(i).style.backgroundColor = "#969696";
						}
						if ( col.cssRules[i].selectorText == "A" ) 
						{
							document.linkColor = "blue";
							col.rules(i).style.textDecoration = "underline";
						}
					
						if ( col.cssRules[i].selectorText == "BODY" ) 
						{
							col.rules(i).style.margin = "10px";
						}
					}
					if(document.getElementById("banner"))
					document.getElementById("banner").style.visibility = "visible";
				}
			}
		}
	}
	// Toggle table widths as long as not from body in display mode
	if ( !bFromBody || ( bFromBody && bCurrentPrintMode ))
	{
		var col = null;
		var formMain = document.forms['mainform'];
		if ( formMain != null )
//		if ( document.forms.length > 0 )
		{
			col = document.forms["mainform"];
			if (col!=null) 
				col = col.children;
		}
		if (col!=null) 
		{
			for (i=0; i<col.length; i++)
			{
				if ( col.item(i).tagName == "TABLE" )
				{
					if ( !bCurrentPrintMode && ( col.item(i).width > 700 ))
					{
						if ( blnLandscape )
							col.item(i).width = 960;
						else
							col.item(i).width = 710;
					}
					else
					if ( bCurrentPrintMode && ( col.item(i).width > 700 ))
						col.item(i).width = 750;
				}
			}
		}
	}
	
	// If changing to print mode move the menu bar frame off screen so it ever gets the focus
	// Next 2 lines by Robert Overman
	if ( !bFromBody && !bCurrentPrintMode )
		HideMenuBar();
	if (bFromBody)
		RestoreMenuBar();

}

// Routine called to Restore the New Menu Bar
// written by Robert Overman
function HideMenuBar()
{
	// This should be set at the start of the page
	//var NavColor;
	//48746 - 3072 no more toolbar, so no more idtoobar comment this back out
	if(!NavColor=="")
	{
	try{
	idToolbar.style.display ='none';}
	catch(e){}
	return true;
	}
	//48746 - 3072 end
}

// Routine called to Restore the New Menu Bar
// written by Robert Overman
function RestoreMenuBar()
{
	// This should be set at the start of the page
	//var NavColor;
//48746 - 3072 no more toolbar, so no more idtoobar	
	if(!NavColor=="")
	{
	try{
	idToolbar.style.display ='block';}
	catch(e){}
	return true;
	}//48746 - 3072 no more toolbar, so no more idtoobar
}

