function checklogin()
{
 if (document.loginform.accountid.value=='') {
   alert("Please enter Account id");
   document.loginform.accountid.focus();
   return false;
 }

 if (document.loginform.password.value=='') {
   alert("Please enter Password");
   document.loginform.password.focus();
   return false;
 }

 if (document.loginform.password.value.length<6) {
   alert("Password must be at least 6 characters long");
   document.loginform.password.focus();
   return false;
 }

 if (document.loginform.turing.value=='') {
   alert("Please enter Turing code");
   document.loginform.turing.focus();
   return false;
 }
 return true;
}

function checknameinput()
{
 if (document.nameinputform.name.value=='') {
   alert("Please enter Real name");
   document.nameinputform.name.focus();
   return false;
 }
 return true;
}

function getcookie(name)
{   
  var strCookie=document.cookie;
  var arrCookie=strCookie.split("; ");
  for(var i=0;i<arrCookie.length;i++)
  {
    var arr=arrCookie[i].split("=");
    if(name==arr[0])
    {
      return arr[1];
    }
  }
  return '';
}