<!--
var StartWin = null;
var Check = 0;

function InputCheck(theForm) {

	if (!EmailCheck(theForm.email.value)) {
		alert("Input your email address");
		theForm.email.focus();
		return(false);
	}


	if (theForm.password.value.length == 0) {
		alert("Input your Password and Password confirm");
		theForm.password.focus();
		return(false);
	}


	if (theForm.password.value.length < 4){
		alert("Password is more than 4 letters.");
		theForm.password.focus();
		return (false);
	}
	
	if (StringCheck(theForm.password.value)) {
		alert("That's not permitted. Please input again");
		theForm.password.focus();
		return(false);
	}
	
	if (theForm.password.value.length >16) {
		alert("Password is no more than 16 letters");
		theForm.password.focus();
		return (false);
	}	
	
	
	if (StringCheck(theForm.password.value)) {
		alert("A - Z , 0 - 9 ");
		theForm.password.focus();
		return(false);
	}
	

	if (theForm.country.value.length == 0) {
		alert("Input your Country");
		theForm.country.focus();
		return(false);
	}

}

function CheckForm(theForm) {




	if (theForm.cpname.value.length == 0) {
		alert("Input your Contact Person");
		theForm.cpname.focus();
		return(false);
	}
		if (!SpecialCheck(theForm.cpname.value)) {
                alert(" ( ' ) is not apply");
              	theForm.cpname.focus();
              	return(false);
	
	}


	if (theForm.coname.value.length == 0) {
		alert("Input your Company Name ");
		theForm.coname.focus();
		return(false);
	}
	
		if (!SpecialCheck(theForm.coname.value)) {
                alert(" (') is unable to use, please delete (')");
              	theForm.coname.focus();
              	return(false);
	
	}

	if (theForm.email.value.length == 0) {
		alert("Input your email");
		theForm.email.focus();
		return(false);
	}
	if (!EmailCheck(theForm.email.value)) {
		alert("Input your email address");
		theForm.email.focus();
		return(false);
	}
	
	
	if (theForm.tel.value.length == 0) {
		alert("Input your Telephone Number  ");
		theForm.tel.focus();
		return(false);
	}


	
	if (theForm.btype.value== '0') {
		alert("your Primary Business Type Selected!");
		theForm.btype.focus();
		return(false);
	}

	if (!SpecialCheck(theForm.msg.value)) {
                alert(" ( ' ) is not apply");
              	theForm.msg.focus();
              	return(false);
	
	}
   
   theForm.action='http://ad.alldatasheet.com/conus.jsp';
   theForm.submit();
}


function EmailCheck(checkStr) {
	Flag1 = 0;
	Flag2 = 0;
	for (i =0;i < checkStr.length; i++) {
		ch = checkStr.charAt(i);
		if ( ch == '@' )
			{ Flag1 = 1; }
		if ( ch == '.' )
		 	{ Flag2 = 1; }
	}
	if ( (Flag1 != 1) || (Flag2 != 1) ) {
		return(false);
	}
	else return(true);
}

function StringCheck(checkStr) {
	Flags1 = 0;
	for (i =0;i < checkStr.length; i++) {
		ch = checkStr.charAt(i);
		if ( ("0" <= ch) && (ch <= "9") || ("A" <= ch) && (ch <= "Z") || ("a" <= ch) && (ch <="z") )

		{  }

		else { Flags1 = Flags1 + 1 }

	}
	if ( Flags1 == 0 )
	{
		return(false);
	}
	else return(true);


}

function SpecialCheck(checkStr) {
	Flag1 = 0;
	Flag2 = 0;
	for (i =0;i < checkStr.length; i++) {
		ch = checkStr.charAt(i);
		if ( ch == "'" )
			{ Flag1 = 1; }

	}
	if ( (Flag1 != 1) ) {
		return(true);
	}
	else return(false);

}

function chkid() {
	Check = 1;
	if (document.frmReg.email.value.length == 0) {
		alert("Input your E-Mail Check");
		document.frmReg.email.focus();
		return;
	}

	if(StartWin != null) {StartWin.close();}
	StartWin = window.open("chkid.jsp?id="+document.frmReg.email.value, "chkid" , "scrollbars=no,toolbar=no,location=no,directories=no,width=300, height=200,resizable=no,mebar=no,left=250,top=65");
	StartWin.focus();
}



//-->