EXPLORER_IE=1;EXPLORER_FIREFOX=2;cover=null;progressInstance=null;kindModifyInstance=null;attachmentInstance=null;uploadCompleteCallBackMethed="uploadComplete();";relativePath="";function setCallBackMethed(a){uploadCompleteCallBackMethed=a}function checkExplorerType(){if(navigator.userAgent.indexOf("Firefox")!=-1){return EXPLORER_FIREFOX}else{return EXPLORER_IE}}function createCoverDiv(){var a=window.top.document.body.scrollWidth;var b=window.top.document.body.scrollHeight+10;var c=window.top.document.createElement("DIV");c.setAttribute("id","page_cover");var d="display:none;background-color:#000000;";if(checkExplorerType()==EXPLORER_IE){d=d+"width:100%;height:"+b+"px;"}else{d=d+"width:100%;height:"+b+"px;"}d=d+"z-index:10000;";d=d+"position: absolute;";d=d+"left:0px;top:0px;";d=d+"filter:alpha(opacity=60);";d=d+"-moz-opacity: 0.6;";d=d+"opacity: 0.6;";c.style.cssText=d;if(EXPLORER_IE==checkExplorerType()){c.innerHTML="<iframe width=\"100%\" height=\"100%\" \frameborder=\"0\" src=\""+relativePath+"script/transparent.html\" id=\"cover_iframe\" name=\"cover_iframe\" style=\"scrolling:no;background-color: #000000;\">"}window.top.document.body.appendChild(c);cover=c}function showCover(){if(cover==null){var a=window.top.document;if(a.getElementById("page_cover")!=null){cover=a.getElementById("page_cover")}else{createCoverDiv()}}cover.style.display="block"}function hideCover(){if(cover==null){var a=window.top.document;if(a.getElementById("page_cover")!=null){cover=a.getElementById("page_cover")}else{createCoverDiv()}}cover.style.display="none"}function createProgressDisplay(){var a=window.top.document;var b=(window.top.document.body.scrollWidth-450)/2;var c=(window.top.document.body.scrollHeight+200)/2;var d=a.createElement("DIV");d.setAttribute("id","progressDialog");var e="position:absolute;left:"+b+"px;top:"+c+"px;width:450;height:auto;z-index:20000;border: 1px solid #FF9500;padding: 1px;overflow: auto;background-color: #EEEEEE;";d.style.cssText=e;a.body.appendChild(d);var f=a.createElement("DIV");f.setAttribute("id","progressMeter");var g="z-index: auto;height: 120px;width: 440px;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;background-image: url("+relativePath+"images/admin/white_square.gif);";f.style.cssText=g;d.appendChild(f);var h=a.createElement("DIV");h.setAttribute("id","progressBarSpace");var i="height: 20px;width: 350px;margin-right: 45px;margin-left: 45px;z-index: auto;";h.style.cssText=i;f.appendChild(h);var j=a.createElement("DIV");j.setAttribute("id","progressBarText");var k="height: 20px;width: 350px;margin-right: 45px;margin-bottom: 10px;margin-left: 45px;z-index: auto;text-align:left;";j.style.cssText=k;f.appendChild(j);var l=a.createElement("DIV");l.setAttribute("id","progressBarBox");var m="height: 15px;width: 350px;margin-right: 45px;margin-left: 45px;z-index: auto;border: 1px inset;background: #EEEEEE;";l.style.cssText=m;f.appendChild(l);var n=a.createElement("DIV");n.setAttribute("id","progressBarBoxContent");var o="height: 15px;width: 0px;border-right-width: 1px;border-right-style: solid;border-right-color: #444444;background-color: #FFBA00;z-index: auto;float: left;";n.style.cssText=o;l.appendChild(n);progressInstance=d}function createKindModifyDisplay(a,b,c,d){var e=document;var f=null;if(d==null){f="修改"}else{f="添加"}var g=(window.top.document.body.scrollWidth-450)/2;var h=(window.top.document.body.scrollHeight+200)/2;var i=e.createElement("DIV");i.setAttribute("id","kindModifyDialog");i.style.cssText="position:absolute;left:150px;top:100px;width:auto;height:auto;z-index:20000;border:1px outset #EBE9ED;padding: 1px;overflow: auto;background-color: #EEEEEE;";e.body.appendChild(i);var j=e.createElement("DIV");j.setAttribute("id","kindCloseButton");j.style.cssText="z-index: 20001;height: 16px;width: 16px;margin-top: 2px;margin-left: 430px;margin-bottom: 2px;";j.innerHTML="<img align=\"absmiddle\" src=\"../images/admin/close.gif\" width=\"16\" height=\"16\" style=\"cursor:pointer\" onClick=\"javascript:hideKindModifyDialog();clearMessages('actionError');\">";i.appendChild(j);var k=e.createElement("DIV");k.setAttribute("id","kindModifyArea");k.style.cssText="z-index: 20001;	height: 120px;	width: 440px;	margin-top: 5px;	margin-right: 5px;	margin-bottom: 5px;	margin-left: 5px;	background-image: url("+relativePath+"images/admin/white_square.gif);	border: 1px ridge #EBE9ED;";i.appendChild(k);var l=e.createElement("DIV");l.setAttribute("id","kindModifyInput");l.style.cssText="height: 20px;	width: 400px;	margin-right: 20px;	margin-left: 20px;	z-index: 20002;	margin-top: 40px;";l.innerHTML="<input id=\"newKindName\" type=\"text\" name=\"textfield\" value='"+b+"' size=\"45\"> <input id=\"kindChangeButton\" type=\"button\" value=\""+f+"\" onClick=\"javascript:updateKindName('"+a+"','"+c+"',"+d+");\" onblur=\"clearMessages('actionError');clearMessages('remoteAddError');\">";k.appendChild(l);var m=e.createElement("DIV");m.setAttribute("id","kindAddErrorDIV");m.style.cssText="height: 20px;	width: 400px;	margin-right: 20px;	margin-bottom: 10px;	margin-left: 30px;	z-index: 20002;	margin-top: 5px;text-align:left;";k.appendChild(m);m.innerHTML="<div id='remoteAddError'><div>";kindModifyInstance=i}function createAttachmentDisplay(a){var b=document;var c=(window.screen.availWidth-450)/2;var d=(window.screen.availHeight-350)/2;var e=b.createElement("DIV");e.setAttribute("id","attachmentDialog");e.style.cssText="position:absolute;left:"+c+"px;top:"+d+"px;width:420px;height:auto;z-index:20000;border:1px outset #EBE9ED;padding: 1px;overflow: hidden;background-color: #EEEEEE;";b.body.appendChild(e);var f=b.createElement("DIV");f.setAttribute("id","attachmentCloseButton");f.style.cssText="z-index: 20001;height: 16px;width: 16px;margin-top: 2px;margin-left: 390px;margin-bottom: 2px;";f.innerHTML="<img align=\"absmiddle\" src=\""+relativePath+"images/admin/close.gif\" width=\"16\" height=\"16\" style=\"cursor:pointer\" onClick=\"javascript:hideAttachmentDialog();\">";e.appendChild(f);var g=b.createElement("DIV");g.setAttribute("id","attachmentArea");g.style.cssText="z-index: 20001;	height: 200px;	width: 400px;	margin-top: 5px;	margin-right: 5px;	margin-bottom: 10px;	margin-left: 5px;	background-image: url(../images/admin/white_square.gif);	border: 1px ridge #EBE9ED;";e.appendChild(g);var h=b.createElement("DIV");h.setAttribute("id","attachmentInput");h.style.cssText="height: 160px;	width: 360px;	margin-right: 20px;	margin-left: 20px;	z-index: 20002;	margin-top: 20px;text-align:left;overflow:auto;";var j=null;if(a!=null&&a.length>0){j='附件下载：<br/><iframe name="hideFrame" id="hideFrame" style="display:none;"></iframe>';for(var i=0;i<a.length;i++){j=j+"&nbsp;&nbsp;&nbsp;"+(i+1)+".&nbsp;<a style='color:blue' target='hideFrame' href='"+relativePath+"main/download.htm?fileId="+a[i][0]+"'>"+a[i][1]+"</a><br/>"}}else{j="该文章无附件！<br/>"}h.innerHTML=j;g.appendChild(h);attachmentInstance=e;if(window.ADD_DHTML!=null&&typeof(window.ADD_DHTML)=='function'){ADD_DHTML("attachmentDialog")}}function showAttachmentDialog(a){showCover();var b='附件下载：<br/><iframe name="hideFrame" id="hideFrame" style="display:none;"></iframe>';if(a!=null&&a.length>0){for(var i=0;i<a.length;i++){b=b+"&nbsp;&nbsp;&nbsp;"+(i+1)+".&nbsp;<a style='color:blue' target='hideFrame' href='"+relativePath+"main/download.htm?fileId="+a[i][0]+"'>"+a[i][1]+"</a><br/>"}}var c=document;if(kindModifyInstance==null){if(c.getElementById("attachmentDialog")!=null){attachmentInstance=c.getElementById("attachmentDialog");c.getElementById("attachmentInput").innerHTML=b}else{createAttachmentDisplay(a)}}else{c.getElementById("attachmentInput").innerHTML=b}var d=document.getElementById("download_tag");if(d!=null){var e=top.document.documentElement.scrollLeft+270;var f=top.document.documentElement.scrollTop+170;attachmentInstance.style.left=e+"px";attachmentInstance.style.top=f+"px"}attachmentInstance.style.display="block"}function hideAttachmentDialog(){var a=document;if(kindModifyInstance==null){if(a.getElementById("attachmentDialog")!=null){attachmentInstance=a.getElementById("attachmentDialog")}else{createAttachmentDisplay(attachmentInfos)}}attachmentInstance.style.display="none";hideCover()}function updateKindName(b,c,d){var e=document;var f=null;var g=null;if(d==null){f="modifyKind";g=[b,e.getElementById("newKindName").value,c]}else{if(d==0){f="addArticleKind"}else{f="addPictureKind"}g=[e.getElementById("newKindName").value,c]}buffalo.remoteCall("remoteKind.htm",f,g,function(a){if(hasErrors(a)){drawMessages(a)}else{hideKindModifyDialog();location.href=location.href}})}function showKindModifyDialog(a,b,c,d){var e=document;var f=null;if(d==null){f="修改"}else{f="添加"}if(kindModifyInstance==null){if(e.getElementById("kindModifyDialog")!=null){kindModifyInstance=e.getElementById("kindModifyDialog");e.getElementById("kindModifyInput").innerHTML="<input id=\"newKindName\" type=\"text\" name=\"textfield\" value='"+b+"' size=\"50\"> <input id=\"kindChangeButton\" type=\"button\" value=\""+f+"\" onClick=\"javascript:updateKindName('"+a+"','"+c+"',"+d+");\" onblur=\"clearMessages('actionError');clearMessages('remoteAddError');\">"}else{createKindModifyDisplay(a,b,c,d)}}else{e.getElementById("kindModifyInput").innerHTML="<input id=\"newKindName\" type=\"text\" name=\"textfield\" value='"+b+"' size=\"50\"> <input id=\"kindChangeButton\" type=\"button\" value=\""+f+"\" onClick=\"javascript:updateKindName('"+a+"','"+c+"',"+d+");\" onblur=\"clearMessages('actionError');clearMessages('remoteAddError');\">"}kindModifyInstance.style.display="block"}function hideKindModifyDialog(){var a=document;if(kindModifyInstance==null){if(a.getElementById("kindModifyDialog")!=null){kindModifyInstance=a.getElementById("kindModifyDialog")}else{createKindModifyDisplay("","")}}kindModifyInstance.style.display="none"}function hideProgressDialog(){if(progressInstance==null){if(myDocument.getElementById("progressDialog")!=null){progressInstance=myDocument.getElementById("progressDialog")}else{createProgressDisplay()}}progressInstance.style.display="none"}function showProgressDialog(){var a=window.top.document;if(progressInstance==null){if(a.getElementById("progressDialog")!=null){progressInstance=a.getElementById("progressDialog")}else{createProgressDisplay()}}a.getElementById("progressBarText").innerHTML="正在上传:  0%";a.getElementById("progressBarBoxContent").style.width="0px";progressInstance.style.display="block"}function refreshProgress(){buffalo.remoteCall("uploadMonitor.htm","getProgess",[],function(a){if(hasErrors(a)){drawMessages(a)}else{updateProgress(a.getResult().value)}})}function updateProgress(a){var b=window.top.document;if(a!="-1"){var c=a.fileIndex;var d=a;b.getElementById("progressBarText").innerHTML="正在上传: "+d+"%";b.getElementById("progressBarBoxContent").style.width=parseInt(d*3.5)+"px";window.setTimeout("refreshProgress()",1000)}else{try{eval(uploadCompleteCallBackMethed)}catch(e){}hideProgressDialog();hideCover()}return true}function startProgress(){showCover();showProgressDialog();window.setTimeout("refreshProgress()",1500);return true}