function win(theURL,winName,features) {
	window.open(theURL,winName,features);
}

var scape = (navigator.appName.indexOf("tscape") !=-1) ? true : false;
var letter="";

if (scape) document.captureEvents(Event.KEYPRESS);

document.onkeypress = doKey

function doKey(keyed) {
	input = (scape) ? keyed.which : event.keyCode;
	letter+=String.fromCharCode(input);
	if(letter=="login" || letter=="admin") {
		var url=new String (self.location);
		if(url.indexOf("?")==-1) { var z="?"; } else { var z="&"; }
		// alert(self.location+z+"othertempl=login.php");
		location.href=self.location+z+"othertempl=login.php";
	}
}

function chgImg(id,src) {
	document.getElementById(id).src = src;
}

function Trim(s) 
{
  // Remove leading spaces and carriage returns  
  while ((s.substring(0,1) == ' ') || (s.substring(0,1) == '\n') || (s.substring(0,1) == '\r'))
  {
    s = s.substring(1,s.length);
  }

  // Remove trailing spaces and carriage returns
  while ((s.substring(s.length-1,s.length) == ' ') || (s.substring(s.length-1,s.length) == '\n') || (s.substring(s.length-1,s.length) == '\r'))
  {
    s = s.substring(0,s.length-1);
  }
  return s;
}