//验证手机号以及验证码
function checkMobileNum_(el1,el2,v){
	var mobile = document.getElementById(el1).value;
	var checkcodestr = document.getElementById(el2).value;
	var m_type = v;
	if(checkcodestr == "" || checkcodestr == null){
		showDialog('提示信息','<li style="padding:20px 10px 20px 10px;">请输入验证码!</li>','success',2);
		return false;
	}
	var reg = /^1{1}\d{10}$/;
	var flag = reg.test(mobile);
	if(!flag){
		showDialog('提示信息','<li style="padding:20px 10px 20px 10px;">手机号码不正确,请重新输入!</li>','success',2);
		return false;
	}
	doSubmitPush_(mobile,checkcodestr,m_type);
}
//提交数据
function doSubmitPush_(mobile,checkcodestr,m_type){
	if(m_type == "" || m_type == null){
		var url = "../index.php?action=sendPush&checkcodestr="+checkcodestr+"&mobile="+mobile+"&m_type="+m_type+"&"+new Date().getTime();
	}
	else{
		var url = "../index.php?action=sendPush&checkcodestr="+checkcodestr+"&mobile="+mobile+"&m_type="+m_type+"&"+new Date().getTime();
	}
	xmlhttp.open("GET",url,true);
	xmlhttp.send(null);
	//服务器在运行完成后执行函数
	xmlhttp.onreadystatechange = function(){
		if (4 == xmlhttp.readyState){
			if (200 == xmlhttp.status){ //成功
				var r = xmlhttp.responseText;
				if(r == "check_Error"){
					showDialog('提示信息','<li style="padding:20px 10px 20px 10px;">验证码错误,请重新输入!</li>','success',2);
				}
				else if(r == "OK"){
					showDialog('提示信息','<li style="padding:20px 10px 20px 10px;">已将下载方式发送到指定手机上,请注意查收!</li>','success',3);
				}
				else{
					showDialog('提示信息','<li style="padding:20px 10px 20px 10px;">操作失败,请重试!</li>','success',2);
				}
			}
			else{
				//此处始终提示成功
				alert("操作失败,服务器可能正忙,请重试!");
			}
		}
	}
}
