var Gecko=(navigator.userAgent.indexOf("Gecko")>=0) ? 1 : 0; // Netscape 6,7, etc. / Mozilla ....
var DOM=(document.getElementById)? 1: 0;
var OS=""; //navigator.userAgent    navigator.appName    navigator.appCodeName     navigator.appVersion    
var isIE=(document.all) ? 1 : 0;
var NetscapeCompat=(Gecko || document.layers || navigator.appName == "Netscape") ? 1 : 0;
if (NetscapeCompat) document.captureEvents(Event.KEYPRESS); // needed if you wish to cancel the key
if (Gecko) document.addEventListener("onkeypress",keyhandler,true);
document.onkeypress = keyhandler;
var Key;
var ALTKEY;
var SHIFTKEY;
var CONTROLKEY;
var METAKEY;
var keyChar;
 //=======================Begin function
function keyhandler(e) {
  Key=(document.all) ? window.event.keyCode : e.which;
  keyChar = String.fromCharCode(Key);
  if (Key<33) {
     if (Key==13) keyChar="Enter";
     if (Key==8) keyChar="BackSpace";
  }
  ALTKEY= (DOM && !document.all) ? e.altKey : (document.all) ? window.event.altKey  : e.modifiers & Event.ALT_MASK; 
  //Gecko/DOM & Compatabiles ,  IE & Compatibles & Possibly Opera < 6, Ns4 & Possibly Opera < 6 
  SHIFTKEY=(DOM && !document.all) ? e.shiftKey : (document.all) ? window.event.shiftKey : e.modifiers & Event.SHIFT_MASK;
  CONTROLKEY=(DOM && !document.all) ? e.ctrlKey :(document.all) ? window.event.ctrlKey : e.modifiers & Event.CONTROL_MASK;
  METAKEY=(DOM && !document.all) ? e.metaKey : (document.all) ? false :  e.modifiers & Event.META_MASK;
  if (Key == 13) document.forms[0].submit(); // 13 = universal Enter/Return
} // end function
/* Disable right click */
var message="";
//=====================================================================================
function clickIE() {
 if (document.all) {
  (message);
  return false;
  }
}
//=====================================================================================
function clickNS(e) {
 if (document.layers||(document.getElementById&&!document.all)) {
  if (e.which==2||e.which==3) {
   (message);
   return false;
  }
 }
} // # end function
//=====================================================================================
function noRtClick(e){
 if (NetscapeCompat) {
  // Netscape,Opera, Mozilla .....
  if (e.which==2||e.which==3) {
   (message);
   return false;
  }
 if (document.all) {
  // IE
  (message);
  return false;
  }
 }//

} // end function
//=====================================================================================
if (document.layers || navigator.userAgent.indexOf("Opera") >=0){ //ns 4/Opera
 document.captureEvents(Event.MOUSEDOWN);
 document.onmousedown=clickNS;
 }
else{ // IE4+, Mozilla....
 document.onmouseup=clickNS;
 document.oncontextmenu=clickIE;
}
//=====================================================================================
document.oncontextmenu=new Function("return false");


/*startList = function() 
{
	if (document.all&&document.getElementById) 
	{
		navRoot = document.getElementById("sitenav");
		for (i=0; i<navRoot.childNodes.length; i++) 
		{
			node = navRoot.childNodes[i];
			
			if (node.nodeName=="LI") 
			{
				node.onmouseover=function() 
				{
				this.className+=" over";
	  			}
		  		
				node.onmouseout=function() 
		  		{
		  		this.className=this.className.replace(" over", "");
		  		}
		   	}
		}
	}
}
window.onload=startList;
*/
//============================================================================
function tOver(iVal){
  window.status=(iVal) ? iVal : '';
  if (iVal) return true;
}
//============================================================================
