function closewindow() {
    window.self.opener = window.self;
    window.self.close();
}



function writeFooter(){
	document.writeln('<table width="100%" border="0" cellspacing="0" cellpadding="0">');
    document.writeln('    <tr> ');
    document.writeln('      <td><font color="666666">客服电话： <strong>010-82331816</strong></font></td>');
    document.writeln('      <td width="14" style="cursor:hand;" onClick="closewindow();"><img src="../img/W6_08.gif" width="14" height="14" ></td>');
    document.writeln('      <td width="29" style="padding-top:3px;padding-left:3px;cursor:hand" onClick="closewindow();"> <font color="666666">关闭</font></td>');
    document.writeln('    </tr>');
    document.writeln('</table>');
}

function isPhone(obj)
{
	var patrn=/^13[0123456789]/;
	var patrn2=/^15[0-35-9]/;
	var patrn3=/^18[8]/;
	obj.value=obj.value.replace(/[^\d;]/g,'');
	if(obj.value.indexOf("13") == 0 && !patrn.exec(obj.value))
	{
		obj.value="13";
	}
	else if(obj.value.indexOf("15") == 0 && !patrn2.exec(obj.value))
	{
		obj.value="15";
	}
	else if(obj.value.indexOf("18") == 0 && !patrn3.exec(obj.value))
	{
		obj.value="18";
	}
	else if(obj.value.indexOf("13") != 0 && obj.value.indexOf("15") != 0 && obj.value.indexOf("18") != 0)
	{
		obj.value="1";
	}
}

function clean(obj){
	if(obj.value == '请输入您的手机号') obj.value = '';
}
		
function checkForm(formObj)
{
	var mobilePatrn = /^(13[0-9]|15[0-35-9]|18[8])\d{8,8}$/;
	var phone = formObj.userNumber.value;
	if(mobilePatrn.exec(phone) == null){
		alert("请输入正确的11位手机号码！");
		return false;
	}
	if(formObj.passport.value == ''){
		alert("请输入您的通行证！");
		return false;	
	}
}

function ismobile(formObj)
{
	var mobilePatrn = /^(13[0-9]|15[0-35-9]|18[8])\d{8,8}$/;
	var phone = formObj.userNumber.value;
	if(mobilePatrn.exec(phone) == null){
		alert("请输入正确的11位手机号码！");
		return false;
	}
	
}
//document.oncontextmenu = new Function("return false;");
