 var highlightcolor="lightyellow"
 var ns6=document.getElementById&&!document.all
 var previous=''
 var eventobj
 var intended=/INPUT|TEXTAREA|SELECT|OPTION/

function onlyNumber(e){  
var key;
if(window.event)  key = window.event.keyCode;
else if(e)  key = e.which;

  if((key<48)||(key>57)){
      if(window.event) window.event.returnValue = false;
	  else if(e)  e.preventDefault();
      alert('Please enter only Number');
  }

}

function checkel(which){
  if (which.style&&intended.test(which.tagName)){
	if (ns6&&eventobj.nodeType==3)
       eventobj=eventobj.parentNode.parentNode
    return true
  }else
    return false
}

function highlight(e){
 eventobj=ns6? e.target : event.srcElement
 if (previous!=''){
   if (checkel(previous))
     previous.style.backgroundColor=''
   previous=eventobj
   if (checkel(eventobj))
     eventobj.style.backgroundColor=highlightcolor
 }else{
   if (checkel(eventobj))
     eventobj.style.backgroundColor=highlightcolor
   previous=eventobj
 }
}

function checkValidate(formObj){
  var chkform = document.getElementById(formObj);
  if(chkform.user_id.length==0 || chkform.user_id.value == ""){
    alert("Please input user id.");
    chkform.user_id.focus();
    return false;
  }
  if(chkform.password.length==0 || chkform.password.value == ""){
    alert("Please input password.");
    chkform.password.focus();
    return false;
  }
  if(chkform.repassword.length==0 || chkform.repassword.value == ""){
    alert("Please retype password.");
    chkform.repassword.focus();
    return false;
  }
  if(chkform.repassword.value!=chkform.password.value){
    alert("Retype password is incorrect.");
    chkform.repassword.focus();
    return false;
  }
/*  
  if(chkform.hometelephone.length==0 || chkform.hometelephone.value == ""){
    alert("Please input Home Telephone.");
    chkform.hometelephone.focus();
    return false;
  }
*/  
  if(chkform.mail.value == ""){
    alert("Please input e-mail.");
    chkform.mail.focus();
    return false;
  }else if(!chkform.mail.value.isEmail()){
    alert("Invalid e-mail address.");
    chkform.mail.focus();
    return false;
  }
  return true;
}

function checkID(){

}
