function LoadContent(Tab,id,PageNum){
	createXmlHttp();
    xmlHttp.open("post", "Inc/Ajax.asp", true);
	xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
    xmlHttp.send("Action=LoadContent&Tab="+Tab+"&id="+id+"&PageNum="+PageNum);
	xmlHttp.onreadystatechange=function(){
		if(xmlHttp.readyState == 4) {
			if(xmlHttp.status == 200) {
				showLoadingImg(0);
				$("Content").innerHTML=xmlHttp.responseText
			}
   		}
	}
}



function LoadArtList(divObj,TableName,ArtType,PageNum,Page_Size,ReadPage){ 
	createXmlHttp();
    xmlHttp.open("post", "Inc/Ajax.asp", true);
	xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
    xmlHttp.send("Action=LoadArtList&divObj="+divObj+"&TableName="+TableName+"&ArtType="+ArtType+"&PageNum="+PageNum+"&Page_Size="+Page_Size+"&ReadPage="+ReadPage);
	xmlHttp.onreadystatechange=function(){
		if(xmlHttp.readyState == 4) {
			if(xmlHttp.status == 200) {
				showLoadingImg(0);
				$(divObj).innerHTML=xmlHttp.responseText
				//alert(xmlHttp.responseText)
			}
   		}
	}
}

function LoadProList(divObj,TableName,ArtType,PageNum,Page_Size,ReadPage){ 
	createXmlHttp();
    xmlHttp.open("post", "Inc/Ajax.asp", true);
	xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
    xmlHttp.send("Action=LoadProList&divObj="+divObj+"&TableName="+TableName+"&ArtType="+ArtType+"&PageNum="+PageNum+"&Page_Size="+Page_Size+"&ReadPage="+ReadPage);
	xmlHttp.onreadystatechange=function(){
		if(xmlHttp.readyState == 4) {
			if(xmlHttp.status == 200) {
				showLoadingImg(0);
				$(divObj).innerHTML=xmlHttp.responseText
				//alert(xmlHttp.responseText)
			}
   		}
	}
}

function LoadArt(Table,tid,PageNum){
	createXmlHttp();
    xmlHttp.open("post", "Inc/Ajax.asp", true);
	xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
    xmlHttp.send("Action=LoadArt&Table="+Table+"&tid="+tid+"&PageNum="+PageNum);
	xmlHttp.onreadystatechange=function(){
		if(xmlHttp.readyState == 4) {
			if(xmlHttp.status == 200) {
				showLoadingImg(0);
				$("Content").innerHTML=xmlHttp.responseText
			}
   		}
	}
}

function LoadPro(Table,tid,PageNum){
	createXmlHttp();
    xmlHttp.open("post", "Inc/Ajax.asp", true);
	xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
    xmlHttp.send("Action=LoadPro&Table="+Table+"&tid="+tid+"&PageNum="+PageNum);
	xmlHttp.onreadystatechange=function(){
		if(xmlHttp.readyState == 4) {
			if(xmlHttp.status == 200) {
				showLoadingImg(0);
				$("Content").innerHTML=xmlHttp.responseText
			}
   		}
	}
}

function LoadGbook(PageNum){
	PageNum==null?PageNum=1:true;
	createXmlHttp();
    xmlHttp.open("post", "Inc/Ajax.asp", true);
	xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
    xmlHttp.send("Action=LoadGbook&PageNum="+PageNum);
	xmlHttp.onreadystatechange=function(){
		if(xmlHttp.readyState == 4) {
			if(xmlHttp.status == 200) {
				showLoadingImg(0);
				$("Gbook").innerHTML=xmlHttp.responseText
			}
   		}
	}
}

function SaveGbook(){
	var sendStr="";
	for(i=0;i<document.gbookForm.elements.length-2;i++){
		sendStr+="&"+document.gbookForm.elements[i].name+"="+escape(document.gbookForm.elements[i].value);
	}
	createXmlHttp();
    xmlHttp.open("post", "Inc/Ajax.asp", true);
	xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
    xmlHttp.send("Action=SaveGbook"+sendStr);
	xmlHttp.onreadystatechange=function(){
		if(xmlHttp.readyState == 4) {
			if(xmlHttp.status == 200) {
				showLoadingImg(0);
				document.gbookForm.sb.disabled=false;
				document.gbookForm.sb.value="Μα½»";
				var requestStr=xmlHttp.responseText;
				requestStr=requestStr.split("|")
				if(requestStr[4]!="") alert(requestStr[4]);
				if(requestStr[0]=="T") window.location.reload();
				if(requestStr[1]=="T") LoadGbook();
				if(requestStr[2]=="T"){
					document.gbookForm.VerifyCode.value="";
					$("VerifyCodeImg").src="Inc/Code.asp?n="+Math.random();
				}
				if(requestStr[3]=="T") document.gbookForm.Reset.click();
			}
   		}
	}
}

