﻿var pageName="";var curPageName=null;var fontbegin=null;var fontend=null;var ubbObj=null;var curQuote=null;var h_list=new Array(10);var h_index=0;function createXmlHttp(){if(window.ActiveXObject){xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");}else{if(window.XMLHttpRequest){xmlHttp=new XMLHttpRequest();}};return xmlHttp;};function getFormXmlBySign(sign){var xmlDoc="";var eList=document.getElementsByTagName("input");for(var i=0;i<eList.length;i++){if(isDataControl(eList[i].id,sign)){var columnName=getDataColumnName(eList[i].id,sign);if(eList[i].type=="checkbox"){if(eList[i].checked){xmlDoc+="<"+columnName+">1</"+columnName+">";}else{xmlDoc+="<"+columnName+">0</"+columnName+">";}}else{xmlDoc+="<"+columnName+"><![CDATA["+eList[i].value+"]]></"+columnName+">";columnName=null;}}};eList=document.getElementsByTagName("select");for(var i=0;i<eList.length;i++){if(isDataControl(eList[i].id,sign)){var columnName=getDataColumnName(eList[i].id,sign);xmlDoc+="<"+columnName+"><![CDATA["+eList[i].value+"]]></"+columnName+">";columnName=null;}};eList=document.getElementsByTagName("textarea");for(var i=0;i<eList.length;i++){if(isDataControl(eList[i].id,sign)){var columnName=getDataColumnName(eList[i].id,sign);xmlDoc+="<"+columnName+"><![CDATA["+eList[i].value+"]]></"+columnName+">";columnName=null;}};return xmlDoc;};function getFormXml(){return getFormXmlBySign('t_');};function isDataControl(controlId,sign){if(controlId.substring(0,sign.length)==sign){return true;}else{return false;}};function getDataColumnName(controlId,sign){return controlId.substr(sign.length);};function getModelList(model){g("showModel").value=model;getPageTable(1);};function getTypeList(type){g("condition").value="";g("typeId").value=type;getPageTable(1);};function getTableByCondition(obj){g("typeId").value="";g("condition").value=g("columnName").value+" like '%"+g("columnValue").value+"%'";getPageTable(1);};function getPageTable(curPage){var conditionValue=null;conditionValue=g("condition").value;if(g("typeId").value!=""){conditionValue+=((conditionValue=="")?"":" and ")+"(b.fid='"+g("typeId").value+"' or b.fparentId like '%"+g("typeId").value+"_')";};conditionValue="condition="+escape(conditionValue);setAjax("POST",'type=getPageTable&linkUrl='+pageLinkUrl+'&curPage='+curPage+'&showModel='+g("showModel").value,conditionValue,false,"listDiv",'waitInfo',null,"listDiv",null,true);};function loginOut(){setAjax("GET",'type=loginOut',null,false,null,null,null,null,"g('Side_userInfo').style.display=\"none\";",false);};function login(obj){var runCode="var messValue=xmlHttp.responseText;if(messValue!=\"suc\"){if(messValue==\"验证码已经过期，请重新输入！\"){getNewCheckCode();}alert(messValue);}else{loginSuc();}";setAjax("POST",'type=login&linkUrl='+pageLinkUrl,"<table>"+getFormXml()+"</table>",true,null,null,obj,null,runCode,false);};function loginSuc(){setAjax("GET",'type=getUserInfo&linkUrl='+pageLinkUrl,null,false,null,null,null,"Side_userInfo_content","g('Side_userInfo').style.display='';showPage('index');",false);};function register(obj){setAjax("POST",'type=register&linkUrl='+pageLinkUrl,"<table>"+getFormXml()+"</table>",true,null,null,obj,null,"if(xmlHttp.responseText!='suc'){alert(xmlHttp.responseText);}else{loginSuc();}",false);};function checkName(){if(g("t_fname").value==""){alert('请输入呢称！');return;};setAjax("GET",'type=checkName&name='+escape(g("t_fname").value),null,false,null,null,null,'checkInfo',null,false);};function sendUserMessage(userId,name,ev){　ev=ev||window.event;var objPos=getMousePos(ev);setAjax("GET",'type=getUserRank',null,false,null,null,null,null,"sendUserMessageWindow('"+userId+"','"+name+"',"+objPos.Left+","+objPos.Top+",xmlHttp.responseText);",false);};function sendUserMessageWindow(userId,name,left,top,type){var objPos=getNullPos();objPos.Left=left;objPos.Top=top;if(type=="0"||type=="1"){showMessageBox("给<strong>"+name+"</strong>发送短消息：","<div style='margin:5px;'><textarea style=\"width:90%;height:80px;\" id=\"uMes_fcontent\"></textarea><input type=\"hidden\" value=\""+userId+"\" id=\"uMes_fto\" /><div style=\"text-align:center\"><input type=\"button\" value=\"发送\" onclick=\"sendUserMes(this);\" class=\"button\" /><input type=\"button\" value=\"取消\" onclick=\"closeWindow();\" class=\"button\" /></div></div>",objPos,300,true);}else{showMessageBox("提醒：","<div style='margin:10px;'>只有注册用户才能发送短信息，你可以:<br /> "+getCommonLink("closeWindow();showPage('login');","登陆")+" 或是 "+getCommonLink("closeWindow();showPage('register');;","注册成为新会员")+"！</div>",objPos,300,true);setTimeout(closeWindow,3000);}};function sendUserMes(obj){setAjax("POST",'type=addUserMessage',"<table>"+getFormXmlBySign("uMes_")+"</table>",true,null,null,obj,null,"sendUserMes_value(xmlHttp.responseText,curBtn);",false);};function sendUserMes_value(backValue,obj){if(!checkError(backValue)){return;};obj.parentNode.parentNode.innerHTML=backValue;setTimeout(closeWindow,2000);};function delUserMessage(id){setAjax("GET",'type=delUserMessage&id='+id+'&curPage='+g('curPage').value,null,false,null,null,null,'listDiv',null,false);};function setCss(){if(g('cssSelect').value==""){return;};g("cssLink").href=pageLinkUrl+"skins/"+g('cssSelect').value+"/styles.css";setAjax("GET",'type=setCss&cssUrl='+g('cssSelect').value,null,false,null,null,null,null,"changeSkin(xmlHttp.responseText);",false);};function setCssByUrl(skinUrl){g("cssLink").href=pageLinkUrl+"skins/"+skinUrl+"/styles.css";setAjax("GET",'type=setCss&cssUrl='+skinUrl,null,false,null,null,null,null,"changeSkin(xmlHttp.responseText);",false);};function changeSkin(backValue){if(g('cssSelect')!=null){g('cssSelect').value="";g('cssSelect').blur();};var cssHtml=backValue.split('###');if(g('skinInfo')!=null){g('skinInfo').innerHTML=cssHtml[0];};resetSider(cssHtml[1]);eval(cssHtml[2]);};function resetSider(siderList){var siderItem=siderList.split('§§')[0].split(',');var tempItem=null;var pNode=g("siderMiddle");for(var i=0;i<siderItem.length;i++){temp=g('Side_'+siderItem[i]);if(temp!=null){temp.parentNode.removeChild(temp);pNode.appendChild(temp);}};siderItem=siderList.split('§§')[1].split(',');pNode=g("siderMiddle1");for(var i=0;i<siderItem.length;i++){temp=g('Side_'+siderItem[i]);if(temp!=null){temp.parentNode.removeChild(temp);pNode.appendChild(temp);}}};function getCalenderHtml(year,month){setAjax("GET",'type=calender&year='+year+'&month='+month,null,false,null,null,null,'Side_calendar_content',null,false);};function prevyear(year,month){getCalenderHtml(year-1,month);};function nextyear(year,month){getCalenderHtml(year+1,month);};function prevmonth(year,month){if(month==1){getCalenderHtml(year-1,12);}else{getCalenderHtml(year,month-1);}};function nextmonth(year,month){if(month==12){getCalenderHtml(year+1,1);}else{getCalenderHtml(year,month+1);}};function chooseday(year,month,day){g("typeId").value="";g("condition").value="year(fcreatetime)="+year+" and month(fcreateTime)="+month+" and day(fcreateTime)="+day;getPageTable(1);};function getArtByCondition(conValue){g("typeId").value="";g("condition").value=conValue;getPageTable(1);};function getArticleByTags(tag){g("typeId").value="";g("condition").value="fkey like '%"+tag+"%'";getPageTable(1);};function getMessageBoardPageList(curPage){setAjax("GET",'type=getMessageBoardTable&linkUrl='+pageLinkUrl+'&curPage='+curPage,null,false,"restoreList","waitInfo",null,null,"getMessageBoardValue(xmlHttp.responseText);",false);};function checkBackValue(backValue){if(backValue=="checkCodeError"){alert("输入的验证码不正确！");return false;};if(backValue=="checkCodeTimeOut"){alert("验证码已经过期，请重新输入！");getNewCheckCode();return false;};if(backValue=="noName"){alert("请输入你的大名！");return false;};if(backValue=="noContent"){alert("请控制输入的内容在1-1000字节内！");return false;};if(backValue=="noEmail"){alert("输入了非法的Email地址！");return false;};if(backValue=="noUrl"){alert("输入了非法的主页地址！");return false;};if(backValue=="noIp"){alert("您的IP已经被本站列为黑名单，所有发言被禁止！");return false;};if(backValue=="noText"){alert("您的发言中存在被禁止的词语，发言提交失败！");return false;};if(backValue=="setNoApp"){alert("您的发言中存在被禁止的词语，发言需要经过站长的审核，目前不会显示出来！");getNewCheckCode();return false;};return true;};function getMessageBoardValue(backValue){if(!checkBackValue(backValue)){return;};g('restoreList').innerHTML=backValue;g('t_fcontent').value='';g('t_checkCodeInput').value='';getNewCheckCode();};function addMessageBoard(obj){setAjax("POST",'type=addMessageBoard&linkUrl='+pageLinkUrl,"<table>"+getFormXml()+"</table>",true,"restoreList","waitInfo",obj,null,"getMessageBoardValue(xmlHttp.responseText);",false);};function getNewCheckCode(){var runCode="objdiv= g('checkCodePic');if(objdiv!=null){objdiv.style.display='';objdiv.src=pageLinkUrl+\"common/control/checkCode.aspx?checkCode=\"+xmlHttp.responseText;}";setAjax("GET",'type=getCheckCode',null,false,null,null,null,null,runCode,true);};function onTitleClick(obj){if(obj.parentNode.childNodes[1].style.display=="none"){obj.parentNode.childNodes[1].style.display=""}else{obj.parentNode.childNodes[1].style.display="none"}};function getUserMessagePageList(curPage){curPageName="";setAjax("GET",'type=getUserMessage&curPage='+curPage,null,false,'contentMiddle','waitInfo',null,'contentMiddle',null,true);};function showMoreArticle(newId){if(g(newId+'_moreInfo').style.display=="none"){g(newId+'vCount').innerHTML=++g(newId+'vCount').innerHTML;g(newId+'Link').innerHTML="[返回摘要]";g(newId+'_moreInfo').style.display="";setAjax("GET",'type=getMoreArticle&linkUrl='+pageLinkUrl+'&id='+newId,null,false,null,null,null,null,null,false);}else{g(newId+'Link').innerHTML="[查看全文]";g(newId+'_moreInfo').style.display="none";}};function showRssAddWindow(ev){ev=ev||window.event;var objPos=getMousePos(ev);showMessageBox('申请加入RSS收藏',"<div style='margin:50px;text-align:center;'>正在读取申请表，请稍等。。。</div>",objPos,400,true);setAjax("GET",'type=getAddRssWindow',null,false,null,null,null,'mesWindowContent',null,false);};function showPage(pageName){var runCode="curPageName='"+pageName+"';switch (curPageName){case \"index\":g('condition').value='';g('typeId').value='';break;case \"messageBoard\":getNewCheckCode();break;case  \"login\":getNewCheckCode();break;default:saveHistory();}";setAjax("GET",'type=showMainPage&linkUrl='+pageLinkUrl+'&pageName='+pageName,null,false,"contentMiddle","#",null,"contentMiddle",runCode,false);};function showArticleInfo(newId){curPageName="articleView";setAjax("GET",'type=getArticleInfo&linkUrl='+pageLinkUrl+'&id='+newId,null,false,"contentMiddle","#",null,"contentMiddle","getNewCheckCode();",false);};function showArticleRestore(newId,curPage){if(g(newId+'reInfo').innerHTML=="+"){g(newId+'rAdd').innerHTML="+";g(newId+'TrackBack').innerHTML="+";g(newId+'reInfo').innerHTML="-";g(newId+'otherInfo').parentNode.style.display="";getRestorePageList(newId,curPage);}else{g(newId+'reInfo').innerHTML="+";g(newId+'otherInfo').parentNode.style.display="none";}};function getRestorePageList(newId,curPage){setAjax("GET",'type=getRestorePageTable&linkUrl='+pageLinkUrl+'&curPage='+curPage+'&id='+newId,null,false,newId+'otherInfo',null,null,newId+'otherInfo',null,false);};function showAjaxRestoreForm(newId){if(g(newId+'rAdd').innerHTML=="+"){g(newId+'reInfo').innerHTML="+";g(newId+'TrackBack').innerHTML="+";g(newId+'rAdd').innerHTML="-";g(newId+'otherInfo').parentNode.style.display="";setAjax("GET",'type=getAjaxRestoreForm&id='+newId+'&linkUrl='+pageLinkUrl,null,false,newId+'otherInfo',null,null,newId+'otherInfo',"if(curQuote){g('"+newId+"_fcontent').value=curQuote;}",false);}else{g(newId+'rAdd').innerHTML="+";g(newId+'otherInfo').parentNode.style.display="none";}};function showTrackBack(newId,fno){if(g(newId+'TrackBack').innerHTML=="+"){if(g(newId+'reInfo')!=null){g(newId+'reInfo').innerHTML="+";g(newId+'rAdd').innerHTML="+";};g(newId+'TrackBack').innerHTML="-";g(newId+'otherInfo').parentNode.style.display="";setAjax("GET",'type=getTrackBack&id='+fno+'&linkUrl='+pageLinkUrl,null,false,newId+'otherInfo',null,null,newId+'otherInfo',null,false);}else{g(newId+'TrackBack').innerHTML="+";g(newId+'otherInfo').parentNode.style.display="none";}};function addRestore(obj,newId){setAjax("POST",'type=addRestore&linkUrl='+pageLinkUrl+'&id='+newId,"<table>"+getFormXmlBySign(newId+"_")+"</table>",true,newId+'otherInfo',null,obj,null,"addRestoreValue('"+newId+"',xmlHttp.responseText);",false);};function addRestoreValue(newId,backValue){if(!checkBackValue(backValue)){return;};g(newId+'otherInfo').innerHTML=backValue;g(newId+'rAdd').innerHTML=g(newId+'rAdd').innerHTML.replace("-","+");g(newId+'reInfo').innerHTML=g(newId+'reInfo').innerHTML.replace("+","-");g(newId+'rCount').innerHTML=++g(newId+'rCount').innerHTML;};function view_addRestore(obj,newId){setAjax("POST",'type=view_addRestore&linkUrl='+pageLinkUrl+'&id='+newId,"<table>"+getFormXml()+"</table>",true,"restoreList","waitInfo",obj,null,"view_getRestoreValue(xmlHttp.responseText);",false);};function view_getRestorePageList(newId,curPage){setAjax("GET",'type=view_getRestorePageTable&linkUrl='+pageLinkUrl+'&curPage='+curPage+'&id='+newId,null,false,"restoreList","waitInfo",null,null,"view_getRestoreValue(xmlHttp.responseText);",false);};function view_getRestoreValue(backValue){if(!checkBackValue(backValue)){return;};g('restoreList').innerHTML=backValue;g('t_fcontent').value='';g('t_checkCodeInput').value='';getNewCheckCode();};function FxGetTxt(ubbTxtId,open,close){var selLength=g(ubbTxtId).textLength;var selStart=g(ubbTxtId).selectionStart;var selEnd=g(ubbTxtId).selectionEnd;if(selEnd==1||selEnd==2)selEnd=selLength;var s1=(g(ubbTxtId).value).substring(0,selStart);var s2=(g(ubbTxtId).value).substring(selStart,selEnd);var s3=(g(ubbTxtId).value).substring(selEnd,selLength);g(ubbTxtId).value=s1+open+s2+close+s3;return;};function setBold(ubbTxtId){if(document.selection&&document.selection.type=="Text"){var range=document.selection.createRange();range.text="[b]"+range.text+"[/b]";}else if(!window.all&&g(ubbTxtId).selectionEnd){txt=FxGetTxt(ubbTxtId,"[b]","[/b]");return;}else{txt=prompt("请输入要加粗的文字：","");if(txt!=null){g(ubbTxtId).value+="[b]"+txt+"[/b]";}}};function setItalic(ubbTxtId){if(document.selection&&document.selection.type=="Text"){var range=document.selection.createRange();range.text="[i]"+range.text+"[/i]";}else if(!window.all&&g(ubbTxtId).selectionEnd){txt=FxGetTxt(ubbTxtId,"[i]","[/i]");return;}else{txt=prompt("请输入要加斜体的文字：","");if(txt!=null){g(ubbTxtId).value+="[i]"+txt+"[/i]";}}};function setUnderline(ubbTxtId){if(document.selection&&document.selection.type=="Text"){var range=document.selection.createRange();range.text="[u]"+range.text+"[/u]";}else if(!window.all&&g(ubbTxtId).selectionEnd){txt=FxGetTxt(ubbTxtId,"[u]","[/u]");return;}else{txt=prompt("请输入要加下划线的文字：","");if(txt!=null){g(ubbTxtId).value+="[u]"+txt+"[/u]";}}};function setImage(ubbTxtId){txt=prompt("请输入图片的地址：","http://");if(txt!=null){g(ubbTxtId).value+="[img]"+txt+"[/img]";}};function setLink(ubbTxtId){if(document.selection&&document.selection.type=="Text"){var range=document.selection.createRange();txt=prompt("请输入链接的地址：","http://");range.text="[url="+txt+"]"+range.text+"[/url]";}else if(!window.all&&g(ubbTxtId).selectionEnd){txt=prompt("请输入链接的地址：","http://");txt=FxGetTxt(ubbTxtId,"[url="+txt+"]","[/url]");return;}else{txt2=prompt("请输入超链接的显示的名称：","");if(txt2!=null){txt=prompt("请输入链接的地址","http://");if(txt!=null){if(txt2==""){g(ubbTxtId).value+="[url]"+txt+"[/url]";}else{g(ubbTxtId).value+="[url="+txt+"]"+txt2+"[/url]";}}}}};function setMail(ubbTxtId){txt=prompt("请输入邮件地址：","@");if(txt!=null){g(ubbTxtId).value+="[email]"+txt+"[/email]";}};function addEmot(emotName,ubbTxtId){closeWindow();if(!g(ubbTxtId)){return;};if(document.selection&&document.selection.type=="Text"){var range=document.selection.createRange();range.text=range.text+emotName;}else if(!window.all&&g(ubbTxtId).selectionEnd){txt=FxGetTxt(ubbTxtId,"",emotName);return;}else{g(ubbTxtId).value+=emotName;}};function setQuote(rsign,auther,newId,restoreId){setScroll("mesForm");var quo="[quote="+auther+"]";if(window.ActiveXObject){quo+=g('com'+restoreId+'_content').innerText;}else{quo+=g('com'+restoreId+'_content').textContent;};quo+="[/quote]";if(g(rsign+'_fcontent')!=null){g(rsign+'_fcontent').value=quo+g(rsign+'_fcontent').value;g(rsign+'_fcontent').focus();}else{curQuote=quo;showAjaxRestoreForm(newId);}};function setSinQuote(ubbTxtId){txt=prompt("请输入要引用的文字：","");if(txt!=null){g(ubbTxtId).value+="[quote]"+txt+"[/quote]";}};function setEmotPanel(ev,txtId){ev=ev||window.event;var objPos=getMousePos(ev);showMessageBox("请选择表情","<div style=\"margin-top:30px;margin-bottom:30px;text-align:center\">正在读取表情。。。</div>",objPos,330,false);if(g('emotDiv')==null){setAjax("GET","type=getEmot&txtId="+txtId+"&linkUrl="+pageLinkUrl,null,false,null,null,null,null,"createEmotDiv(xmlHttp.responseText);g('mesWindowContent').innerHTML=g('emotDiv').innerHTML;",false);}else{g('mesWindowContent').innerHTML=g('emotDiv').innerHTML;}};function createEmotDiv(backValue){var objDiv=document.createElement("div");objDiv.id="emotDiv";objDiv.innerHTML=backValue;objDiv.style.cssText="display:none";document.body.appendChild(objDiv);};function MediaShow(strType,obj,strURL,intWidth,intHeight){if(obj.innerHTML.substr(0,1)=="-"){obj.parentNode.childNodes[1].innerHTML="";obj.innerHTML="+在线播放";}else{switch(strType){case"swf":tmpstr='<div style="height:6px;overflow:hidden"></div><object codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+intWidth+'" height="'+intHeight+'"><param name="movie" value="'+strURL+'" /><param name="quality" value="high" /><param name="AllowScriptAccess" value="never" /><embed src="'+strURL+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+intWidth+'" height="'+intHeight+'" /></object>';break;case"wma":tmpstr='<object classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"  id="MediaPlayer" width="'+intWidth+'" height="'+intHeight+'"><param name=""howStatusBar" value="-1"><param name="AutoStart" value="False"><param name="Filename" value="'+strURL+'"></object>';break;case"wmv":tmpstr='<div style="height:6px;overflow:hidden"></div><object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,02,902" type="application/x-oleobject" standby="Loading..." width="'+intWidth+'" height="'+intHeight+'"><param name="FileName" VALUE="'+strURL+'" /><param name="ShowStatusBar" value="-1" /><param name="AutoStart" value="true" /><embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" src="'+strURL+'" autostart="true" width="'+intWidth+'" height="'+intHeight+'" /></object>';break;case"rm":tmpstr='<div style="height:6px;overflow:hidden"></div><object classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" width="'+intWidth+'" height="'+intHeight+'"><param name="SRC" value="'+strURL+'" /><param name="CONTROLS" VALUE="ImageWindow" /><param name="CONSOLE" value="one" /><param name="AUTOSTART" value="true" /><embed src="'+strURL+'" nojava="true" controls="ImageWindow" console="one" width="'+intWidth+'" height="'+intHeight+'"></object>'+'<br/><object classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" width="'+intWidth+'" height="32" /><param name="CONTROLS" value="StatusBar" /><param name="AUTOSTART" value="true" /><param name="CONSOLE" value="one" /><embed src="'+strURL+'" nojava="true" controls="StatusBar" console="one" width="'+intWidth+'" height="24" /></object>'+'<br /><object classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" width="'+intWidth+'" height="32" /><param name="CONTROLS" value="ControlPanel" /><param name="AUTOSTART" value="true" /><param name="CONSOLE" value="one" /><embed src="'+strURL+'" nojava="true" controls="ControlPanel" console="one" width="'+intWidth+'" height="24" autostart="true" loop="false" /></object>';break;case"flv":tmpstr='<embed src="http://video.google.com/googleplayer.swf?videoUrl='+strURL+'&amp;playerMode=normal" width="'+intWidth+'" height="'+intHeight+'" scale="showall" play="true" loop="true" menu="true" wmode="Window" quality="1" type="application/x-shockwave-flash"></embed>';break;}obj.parentNode.childNodes[1].innerHTML=tmpstr;obj.innerHTML="-关闭在线播放";}};function runHtml(obj){var code=obj.parentNode.childNodes[0].value;if(code!=""){var newwin=window.open('','','');newwin.opener=null;newwin.document.write(code);newwin.document.close();}};function copyHtml(obj){if(document.all){textRange=obj.parentNode.childNodes[0].createTextRange();textRange.execCommand("Copy");}};function setBallotValue(itemId,vTxt,style){if(style==0){vTxt.value=itemId;};if(style==1){if(vTxt.value.indexOf(itemId)>-1){vTxt.value=vTxt.value.replace(itemId+",","");}else{vTxt.value+=itemId+",";}}};var curBallot=null;function ballot(vTxt,ballotId,style,ipStyle,isUser,obj){if(vTxt.value==""){alert('请先选择投票项！');return;};setAjax("POST",'type=ballot&linkUrl='+pageLinkUrl+"&style="+style+"&ipStyle="+ipStyle+"&isUser="+isUser+"&ballotId="+ballotId,"itemId="+vTxt.value,false,null,null,obj,null,"getBallotRes(xmlHttp.responseText,'"+ballotId+"');",false);};function getBallotRes(backValue,ballotId){if(backValue.indexOf("message_")==0){alert(backValue.substr(8,backValue.length-8));return;};g(ballotId+'_item').style.display="none";g(ballotId+'_res').style.display="";g(ballotId+'_res').innerHTML=backValue;};function backBallot(ballotId){g(ballotId+'_item').style.display="";g(ballotId+'_res').style.display="none";};function showBallotRes(ballotId){setAjax("GET",'type=showBallotRes&linkUrl='+pageLinkUrl+"&ballotId="+ballotId,null,false,null,null,null,null,"getBallotRes(xmlHttp.responseText,'"+ballotId+"');",false);};function getPicBoxClassPage(curPage){setAjax("GET",'type=getPicBoxClass&linkUrl='+pageLinkUrl+'&curPage='+curPage,null,false,'listDiv','waitInfo',null,'listDiv',null,true);};function getPicBoxPage(curPage,classId){setAjax("GET",'type=getPicBox&linkUrl='+pageLinkUrl+'&curPage='+curPage+'&picBoxId='+classId,null,false,'listDiv','waitInfo',null,'listDiv',null,true);};function changePicBoxValue(){if(xmlHttp.readyState==4){clearWaitInfo();if(xmlHttp.status==200){g('listDiv').innerHTML=xmlHttp.responseText;saveHistory();}}};function getSinglePicInfo(id){curPageName="picBox";setAjax("GET",'type=getSinglePic&id='+id+'&linkUrl='+pageLinkUrl,null,false,'listDiv','waitInfo',null,'listDiv',"getNewCheckCode();",true);};function getContentByInput(fno,inputValue,state,isSplit,obj){setAjax("GET",'type=getContentByInput&fno='+fno+'&inputValue='+escape(inputValue)+'&linkUrl='+pageLinkUrl+'&state='+state+'&isSplit='+isSplit,null,false,null,null,obj,null,"getContentByInputValue(xmlHttp.responseText,curBtn);",false);};function getContentByInputValue(backValue,curBtn){if(backValue.substr(0,6)=="error_"){alert(backValue.substring(6));return;};curBtn.parentNode.innerHTML=backValue;};function showUserContent(fno,obj){setAjax("GET",'type=getUserContent&fno='+fno+'&linkUrl='+pageLinkUrl,null,false,null,null,obj,null,"getContentByInputValue(xmlHttp.responseText,curBtn);",false);};function getAllTrackBack(curPage){setAjax("GET",'type=getAllTrackBack&linkUrl='+pageLinkUrl+'&curPage='+curPage,null,false,'listDiv','waitInfo',null,'listDiv',null,true);};function getCorrArticlePage(tags,id,curPage){setAjax("GET",'type=getCorrArticle&linkUrl='+pageLinkUrl+'&curPage='+curPage+'&tags='+tags+'&id='+id,null,false,'corrArticle',null,null,'corrArticle',null,false);};function setTypeState(obj,typeid){if(g(typeid+"child").style.display=='none'){obj.src=pageLinkUrl+"common/images/commonModel/typetree/minus.gif";g(typeid+"child").style.display='';}else{obj.src=pageLinkUrl+"common/images/commonModel/typetree/plus.gif";g(typeid+"child").style.display='none';}};function getRssPage(curPage){setAjax("GET",'type=getRssPage&linkUrl='+pageLinkUrl+'&curPage='+curPage+'&rssClassId='+g('rssClassId').value+'&rssNo='+g('rssNo').value+'&showType='+g('rssShowType').value,null,false,'rssBak_list','waitInfo',null,'rssBak_list',null,true);};function selectItem(type,obj){var pObj=obj.parentNode;switch(type){case"topMenu":for(var i=0;i<pObj.childNodes.length;i++){if(pObj.childNodes[i]==obj){pObj.childNodes[i].className='selectedItem';}else{pObj.childNodes[i].className='';}};break;}};function writeFlash(Path,Width,Height,Transparent,objName){var Temp,T="";Temp='<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" id="FlashH" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" border="0" width="'+Width+'" height="'+Height+'">';Temp+='<param name="movie" value="'+Path+'"/>';Temp+='<param name="quality" value="High"/>';Temp+='<param name="scale" value="ExactFit"/>';if(Transparent=='1'){Temp+=' <param name="wmode" value="transparent"/>';T='wmode="transparent"';};Temp+='<embed src="'+Path+'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="FlashH" width="'+Width+'" height="'+Height+'" quality="High"'+T+' scale="ExactFit"/>';Temp+='</object>';if(objName=="top"){g("topFlash").innerHTML=Temp;}};function saveHistory(){if(g('hisStoryFrame')){if(h_index==9){h_index=0;}else{h_index++;};h_list[h_index]=g("pageMiddle").innerHTML;g('hisStoryFrame').src=pageLinkUrl+'common/control/history.htm?'+h_index;}};function getHisStory(curIndex){if(curIndex!=h_index){if(h_list[curIndex]){h_index=curIndex;g("pageMiddle").innerHTML=h_list[curIndex];}}};function showLinkWindow(obj,ev){ev=ev||window.event;var objPos=getMousePos(ev);showMessageBox('申请加入友情链接',"<div style='margin:50px;text-align:center;'>正在读取申请表，请稍等。。。</div>",objPos,400,true);setAjax("GET",'type=getAddLinkWindow',null,false,null,null,null,'mesWindowContent',null,false);};function link_add(obj){setAjax("POST",'type=addLink&linkUrl='+pageLinkUrl,'<table>'+getFormXmlBySign("link_")+'</table>',true,null,null,obj,null,"addWindow_value(xmlHttp.responseText);",false);};function rss_add(obj){setAjax("POST",'type=addRss&linkUrl='+pageLinkUrl,'<table>'+getFormXmlBySign("rss_")+'</table>',true,null,null,obj,null,"addWindow_value(xmlHttp.responseText);",false);};function addWindow_value(backValue){if(backValue=='suc'){setInnerHtml('mesWindowContent',"<div style='margin:50px;text-align:center;'>操作成功！<br />2秒后会关闭此窗口</div>");window.setTimeout(closeWindow,2000);}else{alert(backValue);}};function showUserInfoWindow(ev,userRank,id,name,mail,www){if(g('mesWindow')!=null){closeWindow();return;};ev=ev||window.event;var objPos=getMousePos(ev);showMessageBox(((userRank==1)?'会员':'游客')+'：'+name,"<div style='margin:5px;'>"+((userRank==1)?"<div><span class='linkSpan' onclick=\"sendUserMessage('"+id+"','"+name+"',event);\" onmouseover=\"this.className='spanHover';\" onmouseout=\"this.className='linkSpan';\">发送短消息</span>":"")+"<div>Email："+((mail=="")?"":"<a href='mailto:"+mail+"'>"+mail+"</a>")+"</div><div>个人主页："+((www==""||www.toLowerCase()=="http://")?"":"<a target='_blank' href='"+www+"'>"+www+"</a>")+"</div></div>",objPos,270,false);};function setReRestore(rid,reRid,newId,type,ev){ev=ev||window.event;var objPos=getMousePos(ev);showMessageBox(((reRid=="")?"添加":"修改")+'对于此'+((type=="messageBoard")?"留言":"评论")+"的回复：","<div style='margin:50px;text-align:center;'>正在读取数据，请稍等。。。</div>",objPos,300,true);setAjax("GET","type=getReRestoreWindow&rid="+rid+"&reRid="+reRid+"&newId="+newId+"&rType="+type,null,false,null,null,null,"mesWindowContent",null,false);};function reRestore_edit(obj,type,newId){setAjax("POST",'type=editReRestore&linkUrl='+pageLinkUrl,'<table>'+getFormXmlBySign("reRe_")+'</table>',true,null,null,obj,null,"reRestore_value(xmlHttp.responseText,'"+type+"','"+newId+"');",false);};function reRestore_value(backValue,type,newId){if(backValue=='suc'){closeWindow();switch(type){case"restoreView":view_getRestorePageList(newId,g('curPage').value);break;case"restore":getRestorePageList(newId,g(newId+'curPage').value);break;case"messageBoard":getMessageBoardPageList(g('curPage').value);break;}}else{alert(backValue);}};function delRestore(rid,newId,type){setAjax("GET",'type=delRestore&rid='+rid+"&newId='"+newId,null,false,null,null,null,null,"reRestore_value(xmlHttp.responseText,'"+type+"','"+newId+"');",false);};var isIe=(window.ActiveXObject)?true:false;var pageLinkUrl="";function g(nodeId){return document.getElementById(nodeId);};function setInnerHtml(objName,dcontent){if(g(objName)!=null){g(objName).innerHTML=dcontent;}};function getPos(obj){this.Left=0;this.Top=0;this.Height=obj.offsetHeight;this.Width=obj.offsetWidth;var tempObj=obj;while(tempObj.tagName.toLowerCase()!="body"&&tempObj.tagName.toLowerCase()!="html"){this.Left+=tempObj.offsetLeft;this.Top+=tempObj.offsetTop;tempObj=tempObj.offsetParent;}};function getNullPos(){return{Left:0,Top:0}};function getMousePos(ev){if(ev.pageX||ev.pageY){return{Left:ev.pageX,Top:ev.pageY};};return{Left:ev.clientX+document.documentElement.scrollLeft,Top:ev.clientY+document.documentElement.scrollTop};};function setSelectState(state){var objl=document.getElementsByTagName('select');for(var i=0;i<objl.length;i++){objl[i].style.visibility=state;}};function showMessageBox(wTitle,content,pos,wWidth,isModel){closeWindow();var bWidth=parseInt(document.documentElement.scrollWidth);var bHeight=parseInt(document.documentElement.scrollHeight);if(isModel){if(isIe){setSelectState('hidden');};var back=document.createElement("div");back.id="back";var styleStr="top:0px;left:0px;position:absolute;background:#333;width:"+bWidth+"px;height:"+bHeight+"px;";styleStr+=(isIe)?"filter:alpha(opacity=50);":"opacity:0.5;";back.style.cssText=styleStr;document.body.appendChild(back);};var mesW=document.createElement("div");mesW.id="mesWindow";mesW.className="mesWindow";mesW.innerHTML="<div class='mesWindowTop'><table width='100%' height='100%'><tr><td>"+wTitle+"</td><td style='width:1px;'><img alt='close' style='margin:3px;cursor:pointer;' onclick='closeWindow();' src='"+pageLinkUrl+"common/images/commonModel/close.gif' border='0' title='关闭窗口' /></td></tr></table></div><div class='mesWindowContent' id='mesWindowContent'>"+content+"</div><div class='mesWindowBottom'></div>";if(bWidth-pos.Left<wWidth){styleStr="left:"+(pos.Left-wWidth)+"px;";}else{styleStr="left:"+(pos.Left)+"px;";};styleStr+="top:"+pos.Top+"px;position:absolute;width:"+wWidth+"px;";mesW.style.cssText=styleStr;document.body.appendChild(mesW);};function closeWindow(){if(g('back')!=null){g('back').parentNode.removeChild(g('back'));};if(g('mesWindow')!=null){g('mesWindow').parentNode.removeChild(g('mesWindow'));};if(isIe){setSelectState('');}};function setWaitInfo(parentObjId){if(!g(parentObjId)){return;};var newd=document.createElement("div");newd.id="waitInfo";newd.className="waitInfo";newd.innerHTML="正在读取信息，请稍候。。。";if(g(parentObjId).firstChild!=null){g(parentObjId).insertBefore(newd,g(parentObjId).firstChild);}else{g(parentObjId).appendChild(newd);}};function clearWaitInfo(){var newd=g("waitInfo");if(newd!=null){newd.parentNode.removeChild(newd);}};function setScroll(objId){if(g(objId)){var objPos=new getPos(g(objId));scroll(0,objPos.Top);}};function createXmlHttp(){var ajaxObj=null;if(window.ActiveXObject){ajaxObj=new ActiveXObject("Microsoft.XMLHTTP");}else{if(window.XMLHttpRequest){ajaxObj=new XMLHttpRequest();}};return ajaxObj;};function setAjax(postType,requst,postXml,isXml,waitObjId,scrollId,curBtn,resObjId,runCode,isHistory){if(curBtn!=null){curBtn.disabled=true;};if(waitObjId!=null){setWaitInfo(waitObjId);};if(scrollId!=null){if(scrollId=="#"){scroll(0,0);}else{setScroll(scrollId);}};var xmlHttp=createXmlHttp();xmlHttp.onreadystatechange=function(){backAjaxValue(xmlHttp,curBtn,resObjId,runCode,isHistory)};if(postType=="GET"){xmlHttp.open(postType,pageLinkUrl+'common/serverpage.aspx?roid='+Math.random()+'&'+requst);xmlHttp.send(null);}else{xmlHttp.open(postType,pageLinkUrl+'common/serverpage.aspx?roid='+Math.random()+'&'+requst,true);if(!isXml){xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");};xmlHttp.send(postXml);}};function backAjaxValue(xmlHttp,curBtn,resObjId,runCode,isHistory){if(xmlHttp.readyState==4){clearWaitInfo();if(curBtn!=null){curBtn.disabled=false;};if(xmlHttp.status==200){if(resObjId!=null){if(resObjId=='listDiv'||resObjId=='contentMiddle'){closeWindow();};g(resObjId).innerHTML=xmlHttp.responseText;};if(runCode!=null){eval(runCode);};if(isHistory){saveHistory();}}}};function getCommonLink(command,text){return"<span class='linkSpan' onclick=\""+command+"\" onmouseover=\"this.className='spanHover';\" onmouseout=\"this.className='linkSpan';\">"+text+"</span>"};function checkError(backValue){if(backValue.substr(0,6)=="error_"){alert(backValue.substr(6));return false;}else{return true;}}
