loadstr = "<span id='loadingstring'>正在载入,请稍后..</span>"
//显示有关宏点网络的提示内容
function CloseTips()
{
	document.getElementById("tips").innerHTML="";
}
//显示有关宏点网络的提示内容
function ShowTips(TipsActStr)

{ 
//document.getElementById("tips").innerHTML= loadstr;
var url=TipsActStr + "&sid=" + Math.random()
xmlHttp=GetXmlHttpObject(ShowTipsState)
xmlHttp.open("GET", url , true)
xmlHttp.send(null)

} 

 

function  ShowTipsState() 
{ 

if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")

	{ 
ShowTipsStateRe   =   xmlHttp.responseText ; 
	document.getElementById("tips").innerHTML=ShowTipsStateRe;
	}

} 


//显示首页动态
function ShowNews(NewsActStr)

{ 
document.getElementById("nwCtUl").innerHTML=loadstr;
var url=NewsActStr + "&sid=" + Math.random()
xmlHttp=GetXmlHttpObject(ShowNewsState)
xmlHttp.open("GET", url , true)
xmlHttp.send(null)

} 

 

function  ShowNewsState() 
{ 

if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")

	{ 
ShowNewsStateRe   =   xmlHttp.responseText ; 
 	c   =   ShowNewsStateRe.split("$$$");  
	document.getElementById("nwCtUl").innerHTML=c[0];
	document.getElementById("nwPageOpt").innerHTML=c[1];
	}

} 

//显示首页评价
function ShowReviews(ReviewsActStr)

{ 
document.getElementById("rvCt").innerHTML=loadstr;
var url=ReviewsActStr + "&sid=" + Math.random()
xmlHttp=GetXmlHttpObject(ShowReviewsState)
xmlHttp.open("GET", url , true)
xmlHttp.send(null)

} 

 

function  ShowReviewsState() 
{ 

if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")

	{ 
ShowReviewsStateRe   =   xmlHttp.responseText ; 
 	c   =   ShowReviewsStateRe.split("$$$");  
	document.getElementById("rvCt").innerHTML=c[0];
	document.getElementById("rvPageOpt").innerHTML=c[1];
	}

} 


//显示首页客户案例
function ShowClients(ClientsActStr)

{ 
document.getElementById("csUl").innerHTML=loadstr;
var url=ClientsActStr + "&sid=" + Math.random()
xmlHttp=GetXmlHttpObject(ShowClientsState)
xmlHttp.open("GET", url , true)
xmlHttp.send(null)

} 

 

function  ShowClientsState() 
{ 

if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")

	{ 
ShowClientsStateRe   =   xmlHttp.responseText ; 
 	c   =   ShowClientsStateRe.split("$$$");  
	document.getElementById("csUl").innerHTML=c[0];
	document.getElementById("csPageOpt2").innerHTML=c[1];
	}

} 


//显示首页最新案例
function ShowNewClients(NewClientsActStr)

{ 
document.getElementById("csCt").innerHTML=loadstr;
var url=NewClientsActStr + "&sid=" + Math.random()
xmlHttp=GetXmlHttpObject(ShowNewClientsState)
xmlHttp.open("GET", url , true)
xmlHttp.send(null)

} 

 

function  ShowNewClientsState() 
{ 

if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")

	{ 
ShowNewClientsStateRe   =   xmlHttp.responseText ; 
 	c   =   ShowNewClientsStateRe.split("$$$");  
	document.getElementById("csCt").innerHTML=c[0];
	document.getElementById("csPageOpt").innerHTML=c[1];
	}

} 




//显示首页产品分类
function ShowProduct(ProductStr)

{ 
document.getElementById("pdCt").innerHTML=loadstr;
var url=ProductStr + "&sid=" + Math.random()
xmlHttp=GetXmlHttpObject(ShowProductState)
xmlHttp.open("GET", url , true)
xmlHttp.send(null)

} 

 

function  ShowProductState() 
{ 

if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")

	{ 
	ShowProductStateRe   =   xmlHttp.responseText ; 
	c   =   ShowProductStateRe.split("$$$");  
	document.getElementById("pdCt").innerHTML=c[0];
	document.getElementById("allpdc").innerHTML=c[1];
	}

}


//显示内页左侧广告
function ShowAdLeft(AdLeftStr)

{ 
document.getElementById("adlogo").innerHTML=loadstr;
var url=AdLeftStr + "&sid=" + Math.random()
xmlHttp=GetXmlHttpObject(ShowAdLeftState)
xmlHttp.open("GET", url , true)
xmlHttp.send(null)

} 

 

function  ShowAdLeftState() 
{ 

if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")

	{ 
	ShowAdLeftStateRe   =   xmlHttp.responseText ; 
	document.getElementById("adlogo").innerHTML=ShowAdLeftStateRe;
	}

}

//重新订

function SubscripbeNew(IdstrN){ 
var url="GetXmlData.asp?ac=SubscripbeNew&Id="+IdstrN+"&sid=" + Math.random()
xmlHttp=GetXmlHttpObject(SubscripbeNewState)
xmlHttp.open("GET", url , true)
xmlHttp.send(null)

} 

 

function  SubscripbeNewState() 
{ 

if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")

	{ 
SubscripbeNewStateRe   =   xmlHttp.responseText ; 
	document.getElementById("SubscribeResult").innerHTML=SubscripbeNewStateRe;
	}

}

//退订

function SubscripbeDel(Idstr){ 
var url="GetXmlData.asp?ac=SubscripbeDel&Id="+Idstr+"&sid=" + Math.random()
xmlHttp=GetXmlHttpObject(SubscripbeDelState)
xmlHttp.open("GET", url , true)
xmlHttp.send(null)

} 

 

function  SubscripbeDelState() 
{ 

if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")

	{ 
SubscripbeDelStateRe   =   xmlHttp.responseText ; 
	document.getElementById("SubscribeResult").innerHTML=SubscripbeDelStateRe;
	}

}


//订阅/退订
function SubscripbeExe(T1,T2){ 

if (T1.length < 2 ) {
alert("\请输入您的姓名或称呼!!")
form.BookName.focus()
return false;
}

	if( T2.length<8 || T2.length>64 || !validateEmail(T2) ) {
		alert("\请您输入正确的邮箱地址 !!")
		form.BookEmail.focus()
		return false;
	}

var url="GetXmlData.asp?ac=SubscripbeExe&Enames="+T1+"&Emails="+T2+"&sid=" + Math.random()
xmlHttp=GetXmlHttpObject(SubscripbeExeState)
xmlHttp.open("GET", url , true)
xmlHttp.send(null)

} 

 

function  SubscripbeExeState() 
{ 

if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")

	{ 
SubscripbeExeStateRe   =   xmlHttp.responseText ; 
	document.getElementById("SubscribeResult").innerHTML=SubscripbeExeStateRe;
	}

}



function CheckSubscribeNum(){ 
var url="GetXmlData.asp?ac=CheckSubscribeNum&sid=" + Math.random()
xmlHttp=GetXmlHttpObject(CheckSubscribeNumState)
xmlHttp.open("GET", url , true)
xmlHttp.send(null)

} 

 

function  CheckSubscribeNumState() 
{ 

if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")

	{ 
CheckSubscribeNumStateRe   =   xmlHttp.responseText ; 
		document.getElementById("sTitle").innerHTML='<label for="">订户数量</label>';
		document.getElementById("sTextA").innerHTML=CheckSubscribeNumStateRe;
	}

}

function GetXmlHttpObject(handler)
{ 
var objXmlHttp=null
if (navigator.userAgent.indexOf("Opera")>=0)
	{
		alert("This example doesn't work in Opera") 
		return;
}

if (navigator.userAgent.indexOf("MSIE")>=0)
{ 
var strName="Msxml2.XMLHTTP"
if (navigator.appVersion.indexOf("MSIE 5.5")>=0)
	{
	strName="Microsoft.XMLHTTP"
	} 
try
	{ 
	objXmlHttp=new ActiveXObject(strName)
	objXmlHttp.onreadystatechange=handler 
	return objXmlHttp
	} 
catch(e)
	{ 
	alert("Error. Scripting for ActiveX might be disabled") 
	return 
	} 

} 

if (navigator.userAgent.indexOf("Mozilla")>=0)
	{
	objXmlHttp=new XMLHttpRequest()
	objXmlHttp.onload=handler
	objXmlHttp.onerror=handler 
	return objXmlHttp
	}

} 

function validateEmail(emailStr){
	var re=/^[\w-]+(\.*[\w-]+)*@([0-9a-z]+(([0-9a-z]*)|([0-9a-z-]*[0-9a-z]))+\.)+[a-z]{2,3}$/i;
	if(re.test(emailStr))
		return true;
	else
		return false;
}