document.write("<style>ul{list-style:indexPageTJnone;margin:0;padding:0;}</style>");

var indexPage="http://www.youdayxingzuo.com.cn/?";
var indexPageTJ="http://www.youdayxingzuo.com.cn/?";
function GetLocationParam(param){
    var request = { 
        QueryString : function(val) { 
			var s = location.href;
			s = s.replace("?","?&").split("&");
			var re = "";
			for(i=1;i<s.length;i++)
			if(s[i].indexOf(val+"=")==0)
			re = s[i].replace(val+"=","");
			return re;
        } 
    }
	if(param=="serviceId"){
		if(request.QueryString(param)=="")return "100015";
	}
	if(param=="webownerId"){
		if(request.QueryString(param)=="")return "10001";
	}
	if(param=="childid"){
		if(request.QueryString(param)=="")return "10000";
	}
	if(param=="id"){
		if(request.QueryString(param)=="")return "888888";
	}
	if(param=="ordertype"){
		if(request.QueryString(param)=="")return "0";
	}
	if(param=="gotype"){		
		if(request.QueryString(param)==""){
			return "";
		}
	}		
	if(param=="gopage"){		
		if(request.QueryString(param)==""){
			return "2";
		}
	}

	if(param=="special"){		
		if(request.QueryString(param)==""){
			return "0";
		}
	}
	if(param=="cross"){		
		if(request.QueryString(param)==""){
			return "0";
		}
	}
	if(param=="siteurl"){
		var url = request.QueryString(param);
		
		if(url=="") {
			url = GetSiteurl();
		}
		return url;
	}
	
   	return  request.QueryString(param); 
}
var webownerId=GetLocationParam("webownerId");
var serviceId = 100008;
var childid = GetLocationParam("childid");
var id = GetLocationParam("id");
var ordertype = GetLocationParam("ordertype");
var gopage = GetLocationParam("gopage");
var special = GetLocationParam("special");

var cross = GetLocationParam("cross");
var siteurl = GetLocationParam("siteurl");
var gourl = GetLocationParam("gourl");
var globalparas = ['gopage='+gopage, 'webownerId='+webownerId, 'childid='+childid, 'id='+id, 'special='+special, 'cross='+cross, 'siteurl='+siteurl,'gourl='+gourl]; 

var ref = "";
if(document.referrer) {
	ref = document.referrer;
} else if(window.opener && window.opener.location){
	try{ref = window.opener.location.href}catch(e){ref = "opener";}
}

var nref = location.href;
if(nref.indexOf("index_") != -1 || nref.indexOf("submit.jsp")  != -1) {
	if (ref == "" && special!=1){
		location.href="/error.html";
	}
}

function isPhone(phone){
	var pr = /^1[3|4|5|8]([0-9]{1})([0-9]{8})$/;
	return pr.test(phone)
}

function isCHName(astr){
	var lst =  /^[\u4E00-\u9FA5]{2,4}$/;    
	return lst.test(astr);  
}

function ToIndexWindow(){
	var paras = ['id='+id, 'webownerId='+webownerId, 'childid='+childid, 'siteurl='+siteurl,'gourl='+gourl];
	var args = paras.join('&');
	var urlStr= indexPage + args;
	var t=window.open(urlStr);
	t.focus();
}
function ToYoudayIndexWindow(evt){
	var t=window.open(" http://www.youday.cn");
	t.focus();
	var e=(evt)?evt:window.event; 
	if (window.event) {
		e.cancelBubble=true;
	} else {
	e.stopPropagation();
	}
}

function ToIndexWindowTJ(gopage){
	var urlStr= indexPageTJ+"webownerId="+ webownerId + "&serviceId=" + serviceId +"&childid="+childid+"&siteurl="+referrerurl+"&gopage="+gopage+"&gourl="+gourl;
	var t=window.open(urlStr);
	t.focus();
}
function GetSiteurl(){
		var url="";
		if(document.referrer)
		{
			url = document.referrer;
		} else if(window.opener && window.opener.location)
		{
			try{
				url = window.opener.location.href
			}catch(e){
				url = "";
			}
		}
		if(url=="")
			url = "http://"+location.host+location.pathname;
		try{
			var re = /http[^\?]+/i; url = url.match(re)
		}catch(e){
		}
		return url;
}



