﻿function RegUserName(url){
	RegxmlHttp=getXMLHttpRequest();
	RegxmlHttp.open("get", url, false);
	RegxmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	RegxmlHttp.setRequestHeader("Content-Length",length);
	RegxmlHttp.send();
	document.getElementById("RegMessage").innerHTML=(RegxmlHttp.ResponseText);
}

//-------页头导航显示子分类或专题--------
function HeadNaviShowClassOrTopic(url,ShowDataUrl,TableName,ClassStr,Numb,ButtonName,NonceUrl){
	document.getElementById("HeadNavi1").className='WebNavi';
	document.getElementById("HeadNavi2").className='WebNavi';
	document.getElementById("HeadNavi3").className='WebNavi';
	document.getElementById("HeadNavi4").className='WebNavi';
	document.getElementById("HeadNavi5").className='WebNavi';
	document.getElementById("HeadNavi6").className='WebNavi';
	document.getElementById("HeadNavi7").className='WebNavi';
	document.getElementById("HeadNavi8").className='WebNavi';
	document.getElementById("HeadNavi9").className='WebNavi';
	
	document.getElementById("NaviShowClassAndTopic").innerHTML="<img border='0' src='/images/DotIco/loading2.gif'>数据加载中....";
	
	xmlHttp=getXMLHttpRequest();
	
	xmlHttp.open("get", url+"?ClassStr="+ClassStr+"&Numb="+Numb+"&ShowDataUrl="+ShowDataUrl+"&ButtonName="+ButtonName+"&NonceUrl="+NonceUrl, true);
	xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	xmlHttp.setRequestHeader("Content-Length",length);
	xmlHttp.onreadystatechange = HeadNaviShowClassOrTopicReadyStateChange;
	xmlHttp.send();
}
function HeadNaviShowClassOrTopicReadyStateChange(){
	if (xmlHttp.readyState == 4){
		if (xmlHttp.status == 200){
			document.getElementById("NaviShowClassAndTopic").innerHTML=(xmlHttp.ResponseText);
  		}
  	}
}

//-------显示专题--------
function TopicSelectData(url){
	TopicxmlHttp=getXMLHttpRequest();
	TopicxmlHttp.open("get", url, true);
	TopicxmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	TopicxmlHttp.setRequestHeader("Content-Length",length);
	TopicxmlHttp.onreadystatechange = TopicSelectDataReadyStateChange;
	TopicxmlHttp.send();
}
function TopicSelectDataReadyStateChange(){
	if (TopicxmlHttp.readyState == 4){
		if (TopicxmlHttp.status == 200){
			document.getElementById("TopicSelect").innerHTML=(TopicxmlHttp.ResponseText);
  		}
  	}
}

//-------显示所有专题--------
function ShowAllTopicNav(url){
	AllTopicxmlHttp=getXMLHttpRequest();
	AllTopicxmlHttp.open("get", url, true);
	AllTopicxmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	AllTopicxmlHttp.setRequestHeader("Content-Length",length);
	AllTopicxmlHttp.onreadystatechange = ShowAllTopicNavReadyStateChange;
	AllTopicxmlHttp.send();
}
function ShowAllTopicNavReadyStateChange(){
	if (AllTopicxmlHttp.readyState == 4){
		if (AllTopicxmlHttp.status == 200){
			document.getElementById("ShowAllTopicNavData").innerHTML=(AllTopicxmlHttp.ResponseText);
  		}
  	}
}

//-------显示BBS--------
function ShowBBS(url){
	BBSxmlHttp=getXMLHttpRequest();
	BBSxmlHttp.open("get", url, true);
	BBSxmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	BBSxmlHttp.setRequestHeader("Content-Length",length);
	BBSxmlHttp.onreadystatechange = ShowBBSReadyStateChange;
	BBSxmlHttp.send();
}
function ShowBBSReadyStateChange(){
	if (BBSxmlHttp.readyState == 4){
		if (BBSxmlHttp.status == 200){
			document.getElementById("ShowBbsData").innerHTML=(BBSxmlHttp.ResponseText);
		}
  	}
}

//-------显示Flash--------
function ShowFlash(url){
	FlashxmlHttp=getXMLHttpRequest();
	FlashxmlHttp.open("get", url, true);
	FlashxmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	FlashxmlHttp.setRequestHeader("Content-Length",length);
	FlashxmlHttp.onreadystatechange = FlashDataReadyStateChange;
	FlashxmlHttp.send();
}
function FlashDataReadyStateChange(){
	if (FlashxmlHttp.readyState == 4){
		if (FlashxmlHttp.status == 200){
			document.getElementById("FlashData").innerHTML=(FlashxmlHttp.ResponseText);
		}
  	}
}

//-------显示友情链接--------
function ShowFriendLink(url){
	FriendLinkxmlHttp=getXMLHttpRequest();
	FriendLinkxmlHttp.open("get", url, true);
	FriendLinkxmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	FriendLinkxmlHttp.setRequestHeader("Content-Length",length);
	FriendLinkxmlHttp.onreadystatechange = FriendLinkDataReadyStateChange;
	FriendLinkxmlHttp.send();
}
function FriendLinkDataReadyStateChange(){
	if (FriendLinkxmlHttp.readyState == 4){
		if (FriendLinkxmlHttp.status == 200){
			document.getElementById("FriendLinkData").innerHTML=(FriendLinkxmlHttp.ResponseText);
  		}
  	}
}

//-------显示内容右半部分--------
function DetailsRightShowNumbData(url,Id,TableName,ShowNumb){
	DetailsRightxmlHttp=getXMLHttpRequest();
	DetailsRightxmlHttp.open("get", url+"?Id="+Id+"&TableName="+TableName+"&ShowNumb="+ShowNumb, true);
	DetailsRightxmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	DetailsRightxmlHttp.setRequestHeader("Content-Length",length);
	DetailsRightxmlHttp.onreadystatechange = DetailsRightShowReadyStateChange;
	DetailsRightxmlHttp.send();
}
function DetailsRightShowReadyStateChange(){
	if (DetailsRightxmlHttp.readyState == 4){
		if (DetailsRightxmlHttp.status == 200){
			document.getElementById("ShowDetailsRightData").outerHTML=(DetailsRightxmlHttp.ResponseText);
  		}
  	}
}

//-------添加文章到收藏夹--------
function AddFavorite(Url,TitleStr){
	var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
	xmlDoc.async="false";
	xmlDoc.load(Url+"&TableTitle="+encodeURIComponent(TitleStr));
	root = xmlDoc.documentElement;
	alert(xmlDoc.getElementsByTagName("Message")[0].childNodes[0].xml);
}

//-------显示相关文章--------
function ShowLikeArticleIndexList(url,TierX,ShowNumb){
	LikeArticleIndexListHttp=getXMLHttpRequest();
	LikeArticleIndexListHttp.open("get", url+"&TierX="+TierX+"&ShowNumb="+ShowNumb, true);
	LikeArticleIndexListHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	LikeArticleIndexListHttp.setRequestHeader("Content-Length",length);
	LikeArticleIndexListHttp.onreadystatechange = ShowLikeArticleIndexListReadyStateChange;
	LikeArticleIndexListHttp.send();
}
function ShowLikeArticleIndexListReadyStateChange(){
	if (LikeArticleIndexListHttp.readyState == 4){
		if (LikeArticleIndexListHttp.status == 200){
			document.getElementById("ShowLikeArticleIndexListData").outerHTML=(LikeArticleIndexListHttp.ResponseText);
  		}
  	}
}

//-------显示相关导航网址--------
function ShowDh(url){
	ShowDhHttp=getXMLHttpRequest();
	ShowDhHttp.open("get", url, true);
	ShowDhHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	ShowDhHttp.setRequestHeader("Content-Length",length);
	ShowDhHttp.onreadystatechange = ShowDhReadyStateChange;
	ShowDhHttp.send();
}
function ShowDhReadyStateChange(){
	if (ShowDhHttp.readyState == 4){
		if (ShowDhHttp.status == 200){
			document.getElementById("ShowDhData").innerHTML=(ShowDhHttp.ResponseText);
  		}
  	}
}


//-------显示高级搜索--------
function ShowHiSearchForm(url){
	HiSearchFormHttp=getXMLHttpRequest();
	HiSearchFormHttp.open("get", url, true);
	HiSearchFormHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	HiSearchFormHttp.setRequestHeader("Content-Length",length);
	HiSearchFormHttp.onreadystatechange = HiSearchFormReadyStateChange;
	HiSearchFormHttp.send();
}
function HiSearchFormReadyStateChange(){
	if (HiSearchFormHttp.readyState == 4){
		if (HiSearchFormHttp.status == 200){
			document.getElementById("HiSearchForm").innerHTML=(HiSearchFormHttp.ResponseText);
  		}
  	}
}

//-------显示阶段导航--------
function ShowFacilityNavi(url){
	ShowFacilityNaviHttp=getXMLHttpRequest();
	ShowFacilityNaviHttp.open("get", url, true);
	ShowFacilityNaviHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	ShowFacilityNaviHttp.setRequestHeader("Content-Length",length);
	ShowFacilityNaviHttp.onreadystatechange = ShowFacilityNaviReadyStateChange;
	ShowFacilityNaviHttp.send();
}
function ShowFacilityNaviReadyStateChange(){
	if (ShowFacilityNaviHttp.readyState == 4){
		if (ShowFacilityNaviHttp.status == 200){
			document.getElementById("FacilityNavi").innerHTML=(ShowFacilityNaviHttp.ResponseText);
  		}
  	}
}