//打开发送图片窗口，mycode为图片编号，mybrand为手机品牌，myvariety为该手机型号
function sendring(mycode,mybrand,myvariety,mytry,mytitle)
{
	var myurl1;
			myurl1="/ring/pre_ring.php?mycode="+mycode+"&mybrand="+mybrand+"&myvariety="+myvariety+"&mytry="+mytry+"&mytitle="+mytitle,"sendring","toolbar=no"
  		var newWindow = window.open(myurl1);
		newWindow.focus();
}
function sendring1(mycode,mybrand,myvariety,mytry,mytitle)
{
	var myurl1;
			myurl1="/ring/pre_ring1.php?mycode="+mycode+"&mybrand="+mybrand+"&myvariety="+myvariety+"&mytry="+mytry+"&mytitle="+mytitle,"sendring","toolbar=no"
  		var newWindow = window.open(myurl1);
		newWindow.focus();
}

function sendlogo(mycode,first,second){
		var myurl;
			myurl="/logo/pre_logo.php?code="+mycode+"&first="+first+"&second="+second;
  		var newWindow = window.open(myurl);
		newWindow.focus();
}
function sendlogo1(mycode,first,second){
		var myurl;
			myurl="/logo/pre_logo1.php?code="+mycode+"&first="+first+"&second="+second;
  		var newWindow = window.open(myurl);
		newWindow.focus();
}

function sendword(mycode,mytitle)
{
	window.open("/word/pre_word.php?mycode="+mycode+"&mytitle="+mytitle);
}

function sendmms(mmspath,subject)
{
	window.open("/mms/pre_mms.php?mmspath="+mmspath+"&subject="+subject);
}

function sendmmst(mmspath,subject)
{
	window.open("/mmstest/pre_mms.php?mmspath="+mmspath+"&subject="+subject);
}

function check_mobile1(mobile,passwd)
{
	//alert("check");
	var re = /\b13[0-9]{9}\b/;
	var re3 = /\b4[0-9]{6}\b/
	//var reid =/\b[0-9]{7}\b/;
	var re2	=/\b[0-9]{4,8}\b/;
	if (!re.exec(mobile) && !re3.exec(mobile))
	{
		alert("请输入正确的手机号码！");
		return false;
	}
	if(!re2.exec(passwd))
	{
		alert("请输入正确的手机密码！");
		return false;
	}
	return true;
}
function check_mobile2(mobile)
{
	var re = /\b13[0-9]{9}\b/;
	if (!re.exec(mobile))
	{
		alert("请输入正确的手机号码！");
		return false;
	}
	return true;
}
function check_mobile3(src,dest,passwd)
{
	var re = /\b13[0-9]{9}\b/;
	var re2	=/\b[0-9]{4,8}\b/;
	if (!re.exec(src))
	{
		alert("请输入正确的手机号码！");
		return false;
	}
	if (!re.exec(dest))
	{
		alert("请输入真确的目的手机号码！");
		return false;
	}
	if (!re2.exec(passwd))
	{
		alert("请输入正确的密码！");
		return false;
	}
	return true;
}

function check_passwd(passwd)
{
	var re2	=/\b[0-9]{4,8}\b/;
	if (!re2.exec(passwd))
	{
		alert("请输入正确的密码！");
		return false;
	}
	return true;
}

function explain(key,receiveid)
{
	window.open("/sub/explain.php?key=" + key + "&receiveid=" + receiveid ,"","height=500,width=450");
}
function weather(theURL,winName,features,name)
{ //v2.0
	var name;
	features = "height=600,width=600";
	if(eval("custForm."+name+".value==0")){
	//if(wea.value ==0){
		window.open(theURL,winName,features);
		//form2.wea.value=1;
		eval("custForm."+name+".value=1");
	}else{
		eval("custForm."+name+".value=0");
		//form2.wea.value=0;
	}
}
function constell(theURL,winName,features) { //v2.0
	if(custForm.constel.value==0){
		window.open(theURL,winName,features);
		custForm.constel.value=1;
	}else{
		custForm.constel.value=0;
	}
}
function gprs(){
  		var newWindow = window.open("../fee/sm.htm","gprs","toolbar=no,resizable=no,scrollbars=auto,dependent,width=500,height=350");
		newWindow.focus();
}
function js_open(htmlurl,width,height) {
  var newwin=window.open(htmlurl,"newwin","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width="+width+",height="+height);
}
function check_regcode(){
	var reg;
	reg = form1.reg.value
	if (reg == ""){
		alert("请输入您手机收到的确认码.")
			return false; 
	}
}
