
var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
// Handle all the the FSCommand messages in a Flash movie
function intro_DoFSCommand(command, args) {
  var introObj = InternetExplorer ? intro : document.intro;
   if (command == "closewindow") {
      window.close();
   }
}
// Hook for Internet Explorer 
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && 
	  navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<SCRIPT LANGUAGE=VBScript\> \n');
	document.write('on error resume next \n');
	document.write('Sub intro_FSCommand(ByVal command, ByVal args)\n');
	document.write('  call intro_DoFSCommand(command, args)\n');
	document.write('end sub\n');
	document.write('</SCRIPT\> \n');
}

function goMenu(m,n){
   if(n){
      showMenu(m);
   }else{
      hideMenu(m,n);
   }
}

function showMenu(m) {
   for(i=0;i<6;i++){
      if (i!=m){
         hideMenu(i);
      }
   }
  // menuObj = document.getElementById('menu'+m);
  // menuObj.style = "visibility: visible";
   if(document.all){
      eval('document.all.menu'+m+'.style.visibility="visible"');
   }else{
      eval('document.menuSpan.document.menu'+m+'.visibility="show"');
   }
}

function hideMenu(m) {
   if(document.all){
      eval('document.all.menu'+m+'.style.visibility="hidden"');
   }else{
      eval('document.menuSpan.document.menu'+m+'.visibility="hide"');
   }
}

function showIntro(){
   cardwin = window.open('http://www.midwaydrivein.com/intro.html','intro','width=800,height=500,top='+(screen.height/2-250)+',left='+(screen.width/2-400)+',directories=no,location=no ,menubar=no,scrollbars=no, status=no,toolbar=no,resizable=no');
   cardwin.focus();
}

function getCookie(id){    
   for(var i=0; i!=-1; i=document.cookie.indexOf(" ",i)){
      if (document.cookie.substring(i,i+id.length+1) == (id+"=")){     
         var j = document.cookie.indexOf (";",i+id.length+1);
         if (j == -1) j = document.cookie.length;
         return unescape(document.cookie.substring(i+id.length+1, j));
      }  
   }  
   return null;
}

function setCookie(name, value){  
   var argv = setCookie.arguments;  
   var argc = setCookie.arguments.length;  
   var expires = (argc > 2) ? argv[2] : null;  
   var path = (argc > 3) ? argv[3] : null;  
   var domain = (argc > 4) ? argv[4] : null;  
   var secure = (argc > 5) ? argv[5] : false;  
   if(value!=null && value!="")
      document.cookie = name+"="+escape(value)+ 
      ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + 
      ((path == null) ? "" : ("; path=" + path)) +  
      ((domain == null) ? "" : ("; domain=" + domain)) +    
      ((secure == true) ? "; secure" : "");
}

function deleteCookie(id){  
   var oldDate = new Date();  
   oldDate.setTime(oldDate.getTime()-1); 
   document.cookie = id+"="+getCookie(id)+";expires="+oldDate.toGMTString();
}