var screenCSS = document.getElementById('screenCSS'); 
var printCSS = document.getElementById('printCSS'); 

printCSS.setAttribute("media","projection,print");//need this so borders print on browser view
printCSS.oldhref = printCSS.href;
printCSS.href = screenCSS.href;

function ToggleCSS(mode) { 
	if (mode == screen) { 
		//alert("Enter mode is SCREEN");
		screenCSS.href = screenCSS.oldhref; //always a second click so changing back to screenview
		printCSS.oldhref = printCSS.href; //hold printcss variable
		printCSS.href = screenCSS.href; //make printcss the screen view
		screenCSS.setAttribute("media","screen,print,projection");
		
	} //end screen mode
	
	if (mode == print) { 
			//alert("Enter mode is PRINT");
			screenCSS.oldhref = screenCSS.href; //save screen view to variable
			screenCSS.href = printCSS.oldhref; //change screen to print view
			printCSS.href = printCSS.oldhref // change print back to printview
			printCSS.setAttribute("media","print");
			setTimeout("window.print();", 1000);
	} //end print mode
} //end function

