
var s_GridView_CurrenPage='1';var tiaojian='';var xmlHttp;var xmlHttpGet;var shuoming=0;function GetXmlHttpObject(){var xmlHttpNew=null;try{xmlHttpNew=new XMLHttpRequest();}
catch(e){try{xmlHttpNew=new ActiveXObject("Msxml2.XMLHTTP");}
catch(e){xmlHttpNew=new ActiveXObject("Microsoft.XMLHTTP");}}
return xmlHttpNew;}
function addBook(colorvlaue,s_Param_PageNumber,str){shuoming=1;if(colorvlaue=="")
{shuoming=2;}
tiaojian=str;s_GridView_CurrenPage=s_Param_PageNumber;xmlHttp=GetXmlHttpObject();if(xmlHttp==null){alert("浏览器不支持 AJAX!");return;}
var postParam='id=';var checkbox=document.getElementsByName("checkbox1");for(var i=0;i<checkbox.length;i++){if(checkbox[i].checked){postParam+=checkbox[i].value+",";}}
if(postParam!="id=")
{loadding();var url='biaoji.aspx';url=url+"?SID="+Math.random();url=url+"&color="+colorvlaue;xmlHttp.onreadystatechange=addBookOK;xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xmlHttp.send(postParam);}
else
{alert("请先选择!");}}
function addBookOK(){if(xmlHttp.readyState==4){if(xmlHttp.responseText.indexOf('错误')>=0){alert(xmlHttp.responseText);}
else{GuestBook();}}}
function GuestBook(){xmlHttpGet=GetXmlHttpObject();if(xmlHttpGet==null){alert("浏览器不支持 AJAX!");return;}
var url='index_read.aspx';url=url+"?SID="+Math.random();url=url+"&page="+s_GridView_CurrenPage;url=url+tiaojian;url=url.replace("undefined","");xmlHttpGet.onreadystatechange=BookGetOK;xmlHttpGet.open("GET",url,true);xmlHttpGet.send(null);}
function BookGetOK(){if(xmlHttpGet.readyState==4){var gustBookDiv=document.getElementById("middle3");gustBookDiv.innerHTML=xmlHttpGet.responseText;if(shuoming!=0)
{loadbiaoji(shuoming);var intervalid=setTimeout("fun();",4000);}
try
{var selObj=document.getElementById('PageNumber');var selObj1=document.getElementById('PageNumber1');selObj.options[s_GridView_CurrenPage-1].selected=true;selObj1.options[s_GridView_CurrenPage-1].selected=true;}
catch(err)
{}}}
function Paging(s_Param_PageNumber,str){loadding();shuoming=0;tiaojian=str;s_GridView_CurrenPage=s_Param_PageNumber;GuestBook();}
function Pagpage(str){loadding();shuoming=0;tiaojian=str;s_GridView_CurrenPage=document.getElementById("PageNumber").options[document.getElementById("PageNumber").options.selectedIndex].value;GuestBook();}
function Pagpage1(str){loadding();shuoming=0;tiaojian=str;s_GridView_CurrenPage=document.getElementById("PageNumber1").options[document.getElementById("PageNumber1").options.selectedIndex].value;GuestBook();}
function ButtonSearch(){loadding();shuoming=0;s_GridView_CurrenPage='1';var ddl=document.getElementById("language");var index=ddl.selectedIndex;var searchstr=document.getElementById("search").value;var account=document.getElementById("zhanghu").value;tiaojian="&search="+searchstr+"&lang="+ddl.options[index].value+"&account="+account+"";GuestBook();}