function checkform(){
	if (document.frm.user_email.value == ""){
		alert("Email Empty");
		document.frm.user_email.focus();
		return false;
	} else  {
		var reg = /\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/;
		if (reg.test(document.frm.user_email.value)) {
			//document.getElementById('frm_btn_submit').disabled=true;
			document.getElementById('result_txt').innerHTML="Loading......";
			landingpage_chk( document.frm.user_email.value, document.frm.allow_send_mail.value);
			//document.getElementById('user_email').vaule = "";
		} else {
			alert("email format is error");
			document.frm.user_email.focus();
			return false;
		}
	} 
}


//保存信息并发送邮件
function landingpage_chk(user_email,allow_send_mail){
	delete xmlhttp ;
	var xmlhttp;
	if (xmlhttp==null || typeof(xmlhttp)!="object"){
		try{
			xmlhttp= new ActiveXObject('Msxml2.XMLHTTP');
		}catch(e){
			try{
				xmlhttp= new ActiveXObject('Microsoft.XMLHTTP');
			}catch(e){
				try{
					xmlhttp= new XMLHttpRequest();
				}catch(e){}
			}
		}
	}
	xmlhttp.onreadystatechange=function(){
		if (4==xmlhttp.readyState){
			if (200==xmlhttp.status){
				var return_value=xmlhttp.responseText;
				if (return_value != null){
					document.getElementById('result_txt').innerHTML=return_value;
				}
			}
		delete xmlhttp ; 
		xmlhttp=null;
		CollectGarbage;
		}
	}
	xmlhttp.open("post", "shecy-pearl-jewelry-promotion_chk.php", true);
	xmlhttp.setRequestHeader("CONTENT-TYPE","application/x-www-form-urlencoded;text/xml;charset=utf-8");
	xmlhttp.send("user_email="+user_email+"&allow_send_mail="+allow_send_mail);
	CollectGarbage();
}

