
function ClearData(){
  if (document.getElementById("divLogin").style.display=="block"){
    document.mainfm.ID.value="";
    document.mainfm.PW.value="";
    document.mainfm.Email.value="輸入 Email";
    document.mainfm.ID.focus();
  }
  if (document.getElementById("divEmail").style.display=="block"){
    document.mainfm.ID.value="輸入帳號";
    document.mainfm.PW.value="";
    document.mainfm.Email.value="";
    document.mainfm.Email.focus();
  }
}


function Check(){
 if (document.getElementById("divLogin").style.display=="block"){
  if (document.mainfm.ID.value.length==0){
    alert('請輸入帳號!!');
    document.mainfm.ID.focus();
    return false;
  }
  if (document.mainfm.PW.value.length==0){
    alert('請輸入密碼!!');
    document.mainfm.PW.focus();
    return false;
  }
  
  document.mainfm.action='../Memlogin/chkMember.asp';
  return true;
 }
 
 if (document.getElementById("divEmail").style.display=="block"){
  if (document.mainfm.Email.value.length==0){
    alert('請輸入登記的 Email!!');
    document.mainfm.Email.focus();
    return false;
  }
  
  document.mainfm.action= '../Memlogin/getPW.asp';
  return true;
 }
}
