// JavaScript Document

function cxlu(f){if(f.k.value==""){f.k.focus();return false;}f.submit();}

function ip(f) {
	f.k.value = f.k.value.replace(/^[\D\.]*/g,"");
	if(f.k.value=="")
	{
		f.k.focus();
	}else{
		window.location="/ip/"+f.k.value.replace(/\./g,"_")+".html";
	}
	return false;
}

function mobi(f) {
	f.k.value = f.k.value.replace(/^[\D]*/g,"");
	if(f.k.value=="")
	{
		f.k.focus();
	}else{
		var strNumber = f.k.value;
		if(strNumber.length<7)
		{
			alert("请输入完整的手机号码！(格式为11位数字)");	
		}else{
			window.location="/mobi/"+f.k.value+".html";
		}
	}
	return false;
}

function idcard(f) {
	f.k.value = f.k.value.replace(/^[\D]*/g,"");
	if(f.k.value=="")
	{
		f.k.focus();
	}else{
		var strNumber = f.k.value;
		if(strNumber.length!=15 && strNumber.length!=18)
		{
			alert("请输入完整的身份证号码！(格式为15/18位数字)");	
		}else{
			window.location="/idcard/"+f.k.value+".html";
		}
	}
	return false;
}

function zip(f) {
	f.k.value = f.k.value.replace(/^[\D]*/g,"");
	if(f.k.value=="")
	{
		f.k.focus();
	}else{
		var strNumber = f.k.value;
		if(strNumber.length<6)
		{
			alert("请输入完整的邮政编码！(格式为6位数字)");	
		}else{
			window.location="/zip/"+f.k.value+".html";
		}
	}
	return false;
}

function city(f) {
	f.k.value = f.k.value.replace(/^[\D]*/g,"");
	if(f.k.value=="")
	{
		f.k.focus();
	}else{
		var strNumber = f.k.value;
		if(strNumber.length<3)
		{
			alert("请输入有效的区号！(至少3位数字)");	
		}else{
			window.location="/city/"+f.k.value+".html";
		}
	}
	return false;
}


function g(URL)
{
	window.location=URL;
}

function gp(key){var rs=new RegExp(key+"=([^&]+)","g").exec(top.location.toString());if(rs)return rs[1];return "";}function sk(){document.all.k.value=decodeURIComponent(gp("k"));}