 <!--
 function SetLadder2() {
 if (GetCookie("username")==null) {
  search=""
 } else {
  search=GetCookie("username");
  document.form.user2.value=search;
 }
 if (GetCookie("passcheck")=="true") {
  document.form.savepass.checked=true;
  pass=GetCookie("userpass");
  if (pass!=null) {
   document.form.pass2.value=pass;
  }
 } 
}

function validReq(name,pass,chal){
  if (name == "") {
   alert("You must enter your Ladder username.")
   return false
  }
  if (pass == "") {
   alert("You must enter your Ladder password.")
   return false
  }
  if (chal == "") {
   alert("You must enter your Ladder opponent.")
   return false
  } 
 return true
}
 
function submitIt(form) {
  if(!validReq(form.name.value,form.pass.value,form.chal.value)) {
   return false
  }
  return true
 }
 function getCookieVal (offset) {
   var endstr = document.cookie.indexOf (";", offset);
   if (endstr == -1)
     endstr = document.cookie.length;
   return unescape(document.cookie.substring(offset, endstr));
}

function GetCookie (name) {
   var arg = name + "=";
   var alen = arg.length;
   var clen = document.cookie.length;
   var i = 0;
   while (i < clen) {
     var j = i + alen;
     if (document.cookie.substring(i, j) == arg)
       return getCookieVal (j);
     i = document.cookie.indexOf(" ", i) + 1;
     if (i == 0) break;
   }
   return null;
}
 
function SetCookie (name, value, banner) {
   expires = new Date();
   expires.setTime (expires.getTime() + 24 * 60 * 60 * 365 * 1000);
   var argv = SetCookie.arguments;
   var argc = SetCookie.arguments.length;
   var path = (argc > 3) ? argv[3] : null;
   var domain = (argc > 4) ? argv[4] : null;
   var secure = (argc > 5) ? argv[5] : false;
   if (banner==1) {
    document.cookie = name + "=" + escape (value) +
      ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + "; path=/" + "; domain=.igl.net" +
      ((secure == true) ? "; secure" : "");
   }
   else {
    document.cookie = name + "=" + escape (value) +
     ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
     ((path == null) ? "" : ("; path=" + path)) +
     ((domain == null) ? "" : ("; domain=" + domain)) +
     ((secure == true) ? "; secure" : "");   
   }
} 

function PassCookie() {
 SetCookie('passcheck',document.form.savepass.checked);
 if (GetCookie("passcheck")=="false") {
  alert('Password has been removed.');
  SetCookie('passcheck',"false");
  SetCookie('userpass','');
 }
}
// -->
