function Is() {
    var agent = navigator.userAgent.toLowerCase();
    this.major = parseInt(navigator.appVersion);
    this.ns  = ((agent.indexOf('mozilla')!=-1) && ((agent.indexOf('spoofer')==-1) && (agent.indexOf('compatible') == -1)));
    this.ns4 = (this.ns && (this.major >= 4));
}

var is = new Is();


function keyDown(e) 
{
   	var keyPressed = (is.ns4) ? e.which : window.event.keyCode;
	var code1 = "1".toUpperCase().charCodeAt();
	var code2 = "1".charCodeAt();
    	if( (keyPressed == code1 || keyPressed == code2) && !inRange("admin") && !inRange("p=")) 
	{  //B vagy b                 
		window.location="index.php?p=admin";
	}
}

/**
*	Igaz, ha az URL-ben str benne van	
*/
function inRange(str)
{
	if (window.location.href.search(str) != -1) return(true);
	return(false);
}
