/*publish date:2011-12-08 14:55:47*/
if(typeof ZB=="undefined"||!ZB){var ZB={};var FILE_INCLUDE="ZOLBBS"}ZB.base_url="http://bbs.xgo.com.cn";ZB.js_base_url="http://h.xgo-img.com.cn/bbs/js";ZB.version="4.1";ZB.$=function(a){if(typeof a=="object"){return a}else{return document.getElementById(a)}};ZB.getRadioVal=function(a){var d=document.getElementsByName(a);for(var c=0;c<d.length;c++){if(d[c].checked==true){if(typeof d[c].value=="undefined"){return""}else{return d[c].value}}}};ZB.getCheckboxVal=function(a){var e=document.getElementsByName(a);var d=new Array();for(var c=0;c<e.length;c++){if(e[c].checked==true){d.push(e[c].value)}}return d};ZB.getSelectVal=function(a){return ZB.$(a).options[ZB.$(a).selectedIndex].value};ZB.add=function(c){var a=document.createElement(c);return a};ZB.addBefore=function(d,c){var a=ZB.add(d);return c.parentNode.insertBefore(a,c)};ZB.bind=function(d,a,c){this.callback=c;if(this.$(d).addEventListener){this.$(d).addEventListener(a,this.callback,false)}else{this.$(d).attachEvent("on"+a,this.callback)}};ZB.f_cache=new Array();ZB.loadFile=function(c,d){if(true==this.checkLoaded(c)){d();return}var a=document.getElementsByTagName("head")[0];scriptObj=document.createElement("script");scriptObj.language="javaScript";scriptObj.type="text/JavaScript";scriptObj.src=c;a.appendChild(scriptObj);ZB.onLoaded(scriptObj,function(){ZB.f_cache.push(c);if(typeof d=="function"){d()}})};ZB.loadAfterLoaded=function(a){if(true==this.checkLoaded(a)){callback();return}scriptObj=document.createElement("script");scriptObj.language="javaScript";scriptObj.type="text/JavaScript";scriptObj.src=a;document.body.appendChild(scriptObj)};ZB.onLoaded=function(a,c){if(document.all){a.onreadystatechange=function(){if(this.readyState==4||this.readyState=="complete"||this.readyState=="loaded"){c()}}}else{a.onload=function(){c()}}};ZB.DOMLoaded=function(){if(document.all){if(document.readyState==4||document.readyState=="complete"||document.readyState=="loaded"){return true}return false}else{return true}};ZB.checkBrowser=function(){var a={ie:false,ff:false,chrome:false,opera:false,safari:false};var c=navigator.userAgent.toLowerCase();if(b=c.match(/msie\s([\d]+)/)){a.ie=b[1]}else{if(b=c.match(/firefox\/([\d]+)/)){a.ff=b[1]}else{if(b=c.match(/chrome\/([\d]+)/)){a.chrome=b[1]}else{if(b=c.match(/opera.([\d]+)/)){a.opera=b[1]}else{if(b=c.match(/version\/([\d]+)/)){a.safari=b[1]}}}}}return a};ZB.checkLoaded=function(c){for(var a=0;a<this.f_cache.length;a++){if(this.f_cache[a]==c){return true}}return false};ZB.pageWH=function(){var c=document.body.scrollHeight?document.body.scrollHeight:document.documentElement.clientHeight;var a=document.body.scrollWidth?document.body.scrollWidth:document.documentElement.clientWidth;return{width:a,height:c}};ZB.scrollTL=function(){var c=document.body.scrollTop?document.body.scrollTop:document.documentElement.scrollTop;var a=document.body.scrollLeft?document.body.scrollLeft:document.documentElement.scrollLeft;return{top:c,left:a}};ZB.catchMouseCoord=function(c){c=c?c:(window.event?window.event:null);var a=document.body.scrollLeft+document.documentElement.scrollLeft;var d=document.body.scrollTop+document.documentElement.scrollTop;return{x:c.clientX+a,y:c.clientY+d}};ZB.catchObjectcoord=function(a){return{x:parseInt(ZB.$(a).style.left),y:parseInt(ZB.$(a).style.top)}};ZB.getAbsCoord=function(d){var c=ZB.$(d);var a=c.offsetLeft,e=c.offsetTop;while(c=c.offsetParent){a+=c.offsetLeft;e+=c.offsetTop}return{x:a,y:e}};if(typeof HTMLElement!="undefined"){HTMLElement.prototype.contains=function(a){while(a!=null&&typeof a.tagName!="undefind"){if(a==this){return true}a=a.parentNode}return false}}String.prototype.trim=function(){return this.replace(/(^\s*)|(\s*$)/g,"")};ZB.domContains=function(d,a){d=window.event||d;var c=d.toElement||d.relatedTarget;if(typeof c!="undefined"&&ZB.$(a).contains(c)){return false}return true};ZB.strlen=function(d){var a=0;for(var c=0;c<d.length;c++){a+=d.charCodeAt(c)<0||d.charCodeAt(c)>255?2:1}return a};ZB.AddText=function(d,a){if(!d.hasfocus){d.focus()}if(document.selection){selection=document.selection}if(ZB.checkBrowser().ie==false){var e=d.selectionStart;d.value=d.value.substr(0,d.selectionStart)+a+d.value.substr(d.selectionEnd);d.selectionStart=e+a.length;d.selectionEnd=d.selectionStart}else{if(selection&&selection.createRange){var c=selection.createRange();c.text=a}else{d.value+=a}}};ZB.readCookie=function(a){var d="";var c=a+"=";if(document.cookie.length>0){offset=document.cookie.indexOf(c);if(offset!=-1){offset+=c.length;end=document.cookie.indexOf(";",offset);if(end==-1){end=document.cookie.length}d=unescape(document.cookie.substring(offset,end))}}return d};ZB.writeCookieDomain=function(d,e,a){var c="";if(a!=null){c=new Date((new Date()).getTime()+a*3600000);c="; expires="+c.toGMTString()}document.cookie=d+"="+escape(e)+c+" ; domain = xgo.com.cn"};window.onload=function(){};ZB.loadFile(ZB.js_base_url+"/swfobject.js");if(ZB.checkBrowser().ie==6){ZB.loadFile(ZB.js_base_url+"/inf/box.js?v="+ZB.version);ZB.loadFile(ZB.js_base_url+"/inf/ajax.js?v="+ZB.version);ZB.loadFile(ZB.js_base_url+"/inf/list.js?v="+ZB.version)}ZB.confirmSearch=function(){if(ZB.$("kword").value==""){alert("¹Ø¼ü×Ö²»ÄÜÎª¿Õ");return false}if(ZB.getSelectVal("ws")=="pro"){ZB.$("search_form").action="/search_pro.php"}return true};ZB.searchList=function(c,a){if(!ZB.DOMLoaded()){return}ZB.$("keyword").value="";ZB.loadFile(ZB.js_base_url+"/inf/droplist.js?v="+ZB.version,function(){new ZB.dropList({subcatid:c,manuid:a})})};ZB.showSelectTab=function(a){ZB.loadFile(ZB.js_base_url+"/inf/tab.js?v="+ZB.version,function(){new ZB.tab(a)})};
