var isSetcriteria=false;
var isOnclick=false;
var isWriteHtml=false;
function showdiv()
{
$("#f_Criteria").hide();
$("#other_table").show();

}
function criteriaonclick()
{
	if(!isOnclick)
	{
		Opencriteria();
		isOnclick=true;
	}
	else
	{
		isOnclick=false;
		Closecriteria();
	}
}
function Opencriteria()
{
	$("#other_table").hide();
	
	$("#f_Criteria").show();
}
function Closecriteria()
{
	$("#other_table").show();
	
	$("#f_Criteria").hide();
	if(isSetcriteria==true)
	 $("#a_criteria").text("Finished Setting");
}
function onSubmit()
		{
			if(form1.email.value=="")
			{
				alert("Please input your E-mail,Thank you!");
				return false;
			}
			if(!isEmail(form1.email.value))
			{
				alert("Please input your corret  E-mail style,Thank you!");
				return false;
			}
			
				return true;
			
		}
function isEmail(str)
{
	var re = /^[_a-zA-Z0-9\-\.]+@([\-_a-zA-Z0-9]+\.)+[a-zA-Z0-9]{2,3}$/;
	if(re.test(str))
		return true;
	else
		return false;
	}
	function writeifrmane()
{
	isWriteHtml=true;
 document.write("<iframe width=\"0\" height=\"0\" id=\"Google\" name=\"Google\"></iframe>");
  document.write("<iframe width=\"0\" height=\"0\" id=\"CountonClick\" name=\"CountonClick\"></iframe>");
}
function SetEmial_POP(Email)
{
	var title="";
	
 document.write("<a href=\"mailto:"+Email+"?cc=contact@china-synergy.org &subject=China Sourcing&body=%0d%0d%0a Note:Your email is sent to a primary and a backup address to ensure reliable delivery.  We will reply you within 24 hours.\" onclick=\"onclick_email(\'"+Email+"\')\" class=\"indexemail\">"+Email+"<\/a>");
 	
if(isWriteHtml==false)writeifrmane();
}

function onclick_email(Email)
{
 document.getElementById("Google").src="\/js\/google.html";
 SendDate(Email);
}


function SendDate(Email)
{

	var QueryString="http:\/\/www.china-factories.org\/count\/count.asp?iswrite=yes&Email="+Email+"&url="+window.location;
	 document.getElementById("CountonClick").src=QueryString+"&st="+new Date().getTime();
}
	
	
// JavaScript Document