/* =============================PRODUCT SEARCH JS=================================== */
	function checknull1(){
		if(document.search1.select1.value==""){
			alert("Please select your search type! ");
			return false;
		}
		if(document.search1.hw_name.value==""||document.search1.hw_name.value=="please input keywords!"){
			alert("Please input your search keywords!");
			document.search1.hw_name.focus();
			return false;
		}
		return true;
	}

/* =============================JOIN MAIL JS=================================== */
	<!--
	function CheckEmail( a ) {
   var i = a.length;
   var temp = a.indexOf( '@' );
   var tempd = a.indexOf( '.' );
   if ( temp > 1 )
		{
		  if ( ( i - temp ) > 3 )
			   {
				 if ( ( i - tempd ) > 0 )
					  {
						return 1;
					  }
			   }
		}
   return 0;
}
	function check_null(){
		if (document.form3.mail.value==""){
			alert("The Msn or E-mail can't be empty!");
			return false;
		}
		if (CheckEmail(document.form3.mail.value)==""){
			alert("Be sure to fill in accurate email address, for the connection !");
			return false;
		}
		return true;
	}
	// -->
	
/* =============================CONTACT JS=================================== */
<!--
//if (parent.frames.length > 0) {
//parent.location.href = location.href;
//}
function contact_us_onsubmit() 
{
if(checkspace(document.contact_us.fullname.value)) {
	document.contact_us.fullname.focus();
    alert("Please fill in your full name!");
	return false;
   }

else if(checkspace(document.contact_us.mailbody.value)) {
	document.contact_us.mailbody.focus();
    alert("Please fill in your message!");
	return false;
   }
else if(checkspace(document.contact_us.mailbody.value) || document.contact_us.mailbody.value.length < 2) {
	document.contact_us.mailbody.focus();
    alert("Your message must be more than 2 characters!");
	return false;
  }

else if(document.contact_us.frommail.value.length!=0)
  {
    if (document.contact_us.frommail.value.charAt(0)=="." ||        
         document.contact_us.frommail.value.charAt(0)=="@"||       
         document.contact_us.frommail.value.indexOf('@', 0) == -1 || 
         document.contact_us.frommail.value.indexOf('.', 0) == -1 || 
         document.contact_us.frommail.value.lastIndexOf("@")==document.contact_us.frommail.value.length-1 || 
         document.contact_us.frommail.value.lastIndexOf(".")==document.contact_us.frommail.value.length-1)
     {
      alert("You enter a wrong Email Address!");
      document.contact_us.frommail.focus();
      return false;
      }
   }
 else
  {
   alert("Please enter your Email Address!");
   document.contact_us.frommail.focus();
   return false;
   }

}

function checkspace(checkstr) {
  var str = '';
  for(i = 0; i < checkstr.length; i++) {
    str = str + ' ';
  }
  return (str == checkstr);
}
// -->
/* =============================PRODUCTS JS=================================== */
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-->
/* =============================REG JS=================================== */

<!--
function CheckEmail1( a ) {
   var i = a.length;
   var temp = a.indexOf( '@' );
   var tempd = a.indexOf( '.' );
   if ( temp > 1 )
		{
		  if ( ( i - temp ) > 3 )
			   {
				 if ( ( i - tempd ) > 0 )
					  {
						return 1;
					  }
			   }
		}
   return 0;
}

function check_null3(){
if (document.form6.user_name.value==""){
			alert("Please input name!");
			return false;
		}
		if(document.form6.user_name.value.indexOf('<')!=-1)
		{
		alert("Please do not usage script!");
		return false;
		}
		if (document.form6.user_pass.value==""){
			alert("Please input  password!");
			return false;
		}
		if (document.form6.user_pass2.value!=document.form6.user_pass.value){
			alert("The password input twice is different!!");
			return false;
		}
		if (document.form6.user_mail.value==""){
			alert("Please input correct email!");
			return false;
		}
		if (CheckEmail1(document.form6.user_mail.value)==""){
			alert("Be sure to fill in accurate email address, for the connection !");
			return false;
		}		
		if (document.form6.address.value==""){
			alert("Please input address!");
			return false;
		}
//		if (document.form6.user_tel.value==""){
//			alert("Please input Phone!");
//			return false;
//		}		
		return true;
	}

//-->
/* =============================CASH JS=================================== */
<!--
function checkdata() {
if( form1.sub_to.value =="" || form1.sub_to.value.length<3) {
alert("Consignee's name is error");
return false;
}
if( form1.sub_adds.value =="" || form1.sub_adds.value.length<2) {
alert("Consignee's address or add ir error");
return false;
}
if( isNumberString(form1.mail.value,"1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_@.-")!=1 || form1.mail.value.length<8) {
alert("E-mail add is error");
return false;
}
if(form1.city.value==""){
alert("City add is error");
return false;
}
if(form1.phone.value==""){
alert("Phone add is error");
return false;
}
if(form1.country.value!="U.S.A"){
	if(form1.state1.value==""){
		alert("Please input the state");
		return false;
	}
	
}
if (form1.country.value=="U.S.A"&&form1.state0.value=="Outside USA"){			
		alert("please select your state or country carefully!");
		return false;			
		}
if(form1.zip.value==""){
alert("Zip code add is error");
return false;
}
return true;
}
function isNumberString (InString,RefString)
{
if(InString.length==0) return (false);
for (Count=0; Count < InString.length; Count++)  {
	TempChar= InString.substring (Count, Count+1);
	if (RefString.indexOf (TempChar, 0)==-1)  
	return (false);
}
return (true);
}
function check_c(temp){
	if(temp!="U.S.A"){
	document.form1.state0.disabled="disabled";
	document.form1.state0.value="Outside USA";
	}
	else
	document.form1.state0.removeAttribute("disabled");
}
function check_s(temp){
	if(temp!="Outside USA"){
	document.form1.country.disabled="disabled";
	document.form1.country.value="U.S.A";
	}
	else
	document.form1.country.removeAttribute("disabled");
}
// -->

/* =============================modpass JS=================================== */
<!--
	function checknull4(){
	if(document.repass1.repassname.value==""){
	alert("Pls input your email address!")
	return false;
	}
	return true;
	}
	function checknull2(){
	if(document.repass2.answer.value==""){
	alert("Pls input answer!")
	return false;
	}
	return true;
	}
	function checknull3(){
	if(document.repass3.password1.value==""){
	alert("Pls input new password!")
	return false;
	}
	if(document.repass3.password2.value==""){
	alert("Pls input confirm new password!")
	return false;
	}
	if(document.repass3.password1.value!=document.repass3.password2.value){
	alert("New password is different to the comfirm password!")
	}
	return true;
	}
-->
