function toggle(button)
{
switch ( button.name.toLowerCase() )
{
   case "print":
      PrintPreview()
      break;
   default:
      ;
	//alert("Default");
}
button.blur();
}

   
function  PrintPreview()
{
   var sURL=document.location.href;
if (sURL.indexOf('?') >0) {
    sURL=document.location+"&PrintPreview";}
else {
    sURL=document.location+"?PrintPreview";}

window.open(sURL);
}



function IfPrintVersion()
{
if (document.location.href.indexOf('PrintPreview') >0) 
{ 

document.writeln('<style>'); 
document.writeln('.oButton,.c_shadowLeft,.c_shadowRight,.c_menu_left,.c_breadcrumb,.c_header,.c_bottom,.jm-toolbar,.c_footer_www,.ms-navframe,.ms-bannerframe,.ms-sbtable,.ms-searchform,.ms-sbtopcorner,.ms-sblbcorner,.ms-consoletitleareaframe,.ms-consoletitleareaframebottom,.ms-consoleframe,.ms-SPLink,.ms-globallinks,.c_siteaction,.c_siteactionsmenu,.c_authoringRegion,.ms-consolestatusframe{display: none;}  ');
document.writeln('.c_middle {background-image:none !important;}');
document.writeln('.c_master{width:100% !important;}	');
document.writeln('.c_menu_left{width:0px !important;}	');

//alert('stop');
document.writeln('div.ms-titleareaframe { border-top: 0px white solid; } '); 
document.writeln('</style>'); 
window.print();

}
}

