<!--


function check(theForm)
{
  if(theForm.UserName.value =="" ){
    alert("Please input your name! ");
    theForm.UserName.focus();
    return(false);
  }
  else if(theForm.UserName.length > 30){
	  alert("Please input your name(inside of 30 letter)!");
	  theForm.UserName.focus();
	  return(false);
  }

  if(theForm.UserID.value==""){
	  alert("Please input your UserID! ");
	  theForm.UserID.focus();
	  return(false);
  }

  if(!check_id(theForm.UserID.value)){
  	theForm.UserID.focus();
  	return(false);
  }

  if(theForm.PassWord.value.length < 6 ){
  	alert("Please input your password(more than 6 letter)!");
  	theForm.PassWord.focus();
  	return(false);
  }
  else if(theForm.PassWord.value.length > 16 ){
  	alert("Please input your password(inside of 16 letter)!");
  	theForm.PassWord.focus();
  	return(false);
  }

  if(theForm.PassWord1.value!=theForm.PassWord.value ){
  	alert("input 2 Password don't different !");
  	theForm.PassWord1.focus();
  	return(false);
  }
  if(theForm.Address.value == ""){
  	alert("Please input address! ");
  	theForm.Address.focus();
  	return(false);
  }
  else if(theForm.Address.length > 250){
  	alert("Please input address(inside of 250 letter)!");
  	theForm.Address.focus();
  	return(false);
  }
  if(theForm.TEL.value == ""){
  	alert("Plase input Telphone! ");
  	theForm.TEL.focus();
  	return(false);
  }
  else if(theForm.TEL.length > 25){
  	alert("Plase input Telphone(inside of 25 letter)!");
  	theForm.TEL.focus();
  	return(false);
  }
  if(theForm.Country.value=="0"){
	  alert("Plase select country! ");
	  theForm.Country.focus();
	  return(false);
	}

  if( theForm.e_mail.value.length == 0 ) {
    alert( "Error:please input E-Mail!\n" );
    return false;
  } else {
    i = theForm.e_mail.value.indexOf( "@" );
    j = theForm.e_mail.value.indexOf( ".", i );
    k = theForm.e_mail.value.indexOf( "," );
    kk = theForm.e_mail.value.indexOf( " " );
    jj = theForm.e_mail.value.lastIndexOf( "." ) + 1;
    len = theForm.e_mail.value.length;
    if( ( i <= 0 ) || ( j <= 2 ) || ( k != -1 ) || ( kk != -1 ) || ( len - jj < 2 ) || ( len - jj > 3 ) ) { 
      alert( "Error:E-Mail not correct!\n" );
      return false;
    }
  }

}


function check_id(id)
{
  	id = id.toLowerCase();
	if (id.length<5) {
		alert("Your username is too short!..");
		return false;
	}
	if (id.length>14) {
		alert("Your username is too long!");
		return false;
	}
  	if(id.charAt(0)<"a" || id.charAt(0)>"z") {
		alert("The prefix of username must be letters of the alphabet !");
		return false;
  	}
  	for(var i=0 ; i<id.length ; i++) {
  		if(id.charAt(i)!="_" &&
  	   	   (id.charAt(i)<"a" || id.charAt(i)>"z") &&
  	   	   (id.charAt(i)<"0" || id.charAt(i)>"9")) {
  	   		alert("Username with invalid characters!");
	  	   	return false;
  		}
  	}
  	return true;
} 


function check_Dis(theForm)  //¸g¾P°Ó
{

  if(theForm.CompanyName.value == ""){
  	alert("Please input your CompanyName! ");
  	theForm.CompanyName.focus();
  	return(false);
  }	
  else if(theForm.CompanyName.length > 70){
  	alert("Please input your CompanyName(inside of 70 letter)!");
  	theForm.CompanyName.focus();
  	return(false);
  }	
  
  if(theForm.UserName.value == ""){
  	alert("Please input your name! ");
  	theForm.UserName.focus();
  	return(false);
  }
  else if(theForm.UserName.length > 30){
  	alert("Please input your name(inside of 30 letter)! ");
  	theForm.UserName.focus();
  	return(false);
  }

  if(theForm.UserID.value==""){
  	alert("Please input your UserID! ");
  	theForm.UserID.focus();
  	return(false);
  }

  if(!check_id(theForm.UserID.value)){
  	theForm.UserID.focus();
  	return(false);
  }

  if(theForm.PassWord.value.length < 6 ){
  	alert("Please input your password(more than 6 letter)!");
  	theForm.PassWord.focus();
  	return(false);
  }
  else if(theForm.PassWord.value.length > 16 ){
  	alert("Please input your password(inside of 16 letter)!");
  	theForm.PassWord.focus();
  	return(false);
  }

  if(theForm.PassWord1.value!=theForm.PassWord.value ){
  	alert("input 2 Password don't different !");
  	theForm.PassWord1.focus();
  	return(false);
  }
  
  if(theForm.Address.value == ""){
  	alert("Please input address! ");
  	theForm.Address.focus();
  	return(false);
  }
  else if(theForm.Address.length > 250){
  	alert("Please input address(inside of 250 letter)!");
  	theForm.Address.focus();
  	return(false);
  }
  
  if(theForm.Country.value=="0"){
  	alert("Plase select country! ");
  	theForm.Country.focus();
  	return(false);
  }
  
  if(theForm.TEL.value == ""){
  	alert("Plase input Telphone! ");
  	theForm.TEL.focus();
  	return(false);
  }
  else if(theForm.TEL.length > 25){
  	alert("Plase input Telphone(inside of 25 letter)!");
  	theForm.TEL.focus();
  	return(false);
  }


  if( theForm.e_mail.value.length == 0 ) {
    alert( "Error:please input E-Mail!\n" );
    return false;
  } else {
    i = theForm.e_mail.value.indexOf( "@" );
    j = theForm.e_mail.value.indexOf( ".", i );
    k = theForm.e_mail.value.indexOf( "," );
    kk = theForm.e_mail.value.indexOf( " " );
    jj = theForm.e_mail.value.lastIndexOf( "." ) + 1;
    len = theForm.e_mail.value.length;
    if( ( i <= 0 ) || ( j <= 2 ) || ( k != -1 ) || ( kk != -1 ) || ( len - jj < 2 ) || ( len - jj > 3 ) ) { 
      alert( "Error:E-Mail not correct!\n" );
      return false;
    }
  }

}

//-->

