//this is test
function getUrl()
{
	var allurl = window.location.href;
	var host = window.location.host;
	var localhost = "http://"+host+"/";
	var url = allurl.replace(localhost,"");
	if(url.indexOf(".shtml")>=0){
		url = url.substring(0,url.indexOf(".shtml"));
	}
	//url = url.substring(5,url.length);
	return url;
}
function getCityOrAreaAddress(name)
{
	var allurl = window.location.href;
	var host = window.location.host;
	//get the http://zj.ct10000.com/============如果发布到服务器上去吧zjpr去掉
	//var localhost = "http://"+host+"/zjpr/";
	var localhost = "http://"+host+"/";
	if (name.length==2)
	{
		return localhost+name+".shtml";
	}
	if(name.length==4)
	{
		var area = name.substring(0,2);
		var city = name.substring(2,4);
		return localhost+area+"/"+city+".shtml";
	}
}
function getThreeAddress(area,city,name)
{
	var allurl = window.location.href;
	var host = window.location.host;
	//get the http://zj.ct10000.com/============if zjpr was in localhost,that you should not add zjpr/
	//var localhost = "http://"+host+"/zjpr/";
	var localhost = "http://"+host+"/";
	return localhost+area+"/"+city+"/"+name+".shtml";
}
function areaBizOrDis(area,name)
{
	var allurl = window.location.href;
	var host = window.location.host;
	//get the http://zj.ct10000.com/============if zjpr was in localhost,that you should not add zjpr/
	//var localhost = "http://"+host+"/zjpr/";
	var localhost = "http://"+host+"/";
	return localhost+area+"/"+name+".shtml";
}
//用户横登录和首页左边登录框登录后的地址跳转
function setNextUrl()
{
	var nexturl = getUrl();
	while(nexturl.indexOf("/")>=0)
	{
		nexturl = nexturl.replace("/","%2F");
	}
	nexturl=nexturl+".shtml";
	document.getElementById("nexturl").value=nexturl;
}