var mes="Right click disabled."; 

function clickIE4(){
if (event.button==2){
//alert(mes);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
//alert(mes);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}
//alert(mes);
document.oncontextmenu=new Function("return false")
 

function printPage()
{
   var usertype=navigator.userAgent.toLowerCase();
 
   if (window.print) 
	 {
     setTimeout('window.print();',200);
   }
   else if (usertype.indexOf("mac") != -1) 
	 {
     //alert("Press 'Cmd+p' on your keyboard to print article.");
   }
   else 
	 {
     //alert("Press 'Ctrl+p' on your keyboard to print article.")
   }
}

function closeWindow()
{
  window.close()
}

var printCmd = '<br><table width="100%"><tr><td align="right"><input type="submit" name="printSubmit" value=" Print " onClick="printPage()">&nbsp;&nbsp;<input type="submit" name="closeSubmit" value=" Close " onClick="closeWindow()"></td></tr></table>';

function hidePrint() 
{
  if (document.all) 
  {
    document.all.topPrint.innerHTML = "";                
	document.all.bottomPrint.innerHTML = "";
  }
}

function showPrint() 
{
  if (document.all) 
  { 
    document.all.topPrint.innerHTML = printCmd;
	document.all.bottomPrint.innerHTML = printCmd;
  }
}

function printerFriendly()
{    				    
  window.open("/script/printer.php?page=" 
     + escape(document.URL)
     + "&style=/style.css&lnk=1",'so','toolbar=0,scrollbars=1,location=0,status=1,menubars=0,resizable=1,width=700,height=550');
    
  return false;
}


function disableSelection(target)
{
if (typeof target.onselectstart!="undefined") //IE route
	target.onselectstart=function(){return false}
else if (typeof target.style.MozUserSelect!="undefined") //Firefox route
	target.style.MozUserSelect="none"
else //All other route (ie: Opera)
	target.onmousedown=function(){return false}
target.style.cursor = "default"
}

function popUpExplanation(page) 
{
  window.open(page,'so','toolbar=0,scrollbars=1,location=0,status=1,menubars=0,resizable=1,width=550,height=400');
}

function popUpLarge(page)
{
  window.open(page,'so','toolbar=0,scrollbars=1,location=0,status=1,menubars=0,resizable=1,width=700,height=550');
}

function popUpFull(page)
{
  window.open(page,'so','toolbar=0,scrollbars=1,location=0,status=1,menubars=0,resizable=1');
}

