// Allows browser to switch to maximised on typing 'kiosk' from index page
var password    = "kiosk";
var targetURL1  = "index.htm"; // on typing password
var charsEntered = 0;
var isIE5=document.all;
var isNS4=document.layers;
var isIE6=document.getElementById && isIE5;
var isNS6=document.getElementById && ! isIE6;
function getKey(keyStroke) { 
  var eventChooser = (isNS4||isNS6) ? keyStroke.which : event.keyCode;
  var which = String.fromCharCode(eventChooser).toLowerCase(); 
  if (which == password.charAt(charsEntered))
  {
    charsEntered++; 
    if (charsEntered == password.length)
	{
				if (window.name!='')
			{
				alert("Full-screen mode already activated, press \'Alt\' and \'F4\' to exit")
			}
					else
	{
	alert("Press \'Alt\' and \'F4\' to exit full-screen mode");
    window.open(targetURL1, 'fullscreen', 'fullscreen=yes, scrollbars=auto');
	}
	}
  } 
  else
  {
    charsEntered = 0
  }
}
document.onkeypress = getKey 