window.ZENG=window.ZENG||{};ZENG.dom={getById:function(a){return document.getElementById(a)},get:function(a){return(typeof(a)=="string")?document.getElementById(a):a},createElementIn:function(f,c,d,b){var a=(c=ZENG.dom.get(c)||document.body).ownerDocument.createElement(f||"div"),e;if(typeof(b)=="object"){for(e in b){if(e=="class"){a.className=b[e]}else{if(e=="style"){a.style.cssText=b[e]}else{a[e]=b[e]}}}}d?c.insertBefore(a,c.firstChild):c.appendChild(a);return a},getStyle:function(c,d){c=ZENG.dom.get(c);if(!c||c.nodeType==9){return null}var h=document.defaultView&&document.defaultView.getComputedStyle,a=!h?null:document.defaultView.getComputedStyle(c,""),g="";switch(d){case"float":d=h?"cssFloat":"styleFloat";break;case"opacity":if(!h){var f=100;try{f=c.filters["DXImageTransform.Microsoft.Alpha"].opacity}catch(b){try{f=c.filters("alpha").opacity}catch(b){}}return f/100}else{return parseFloat((a||c.style)[d])}break;case"backgroundPositionX":if(h){d="backgroundPosition";return((a||c.style)[d]).split(" ")[0]}break;case"backgroundPositionY":if(h){d="backgroundPosition";return((a||c.style)[d]).split(" ")[1]}break}if(h){return(a||c.style)[d]}else{return(c.currentStyle[d]||c.style[d])}},setStyle:function(b,d,h){if(!(b=ZENG.dom.get(b))||b.nodeType!=1){return false}var f,a=true,i=(f=document.defaultView)&&f.getComputedStyle,e=/z-?index|font-?weight|opacity|zoom|line-?height/i;if(typeof(d)=="string"){f=d;d={};d[f]=h}for(var c in d){h=d[c];if(c=="float"){c=i?"cssFloat":"styleFloat"}else{if(c=="opacity"){if(!i){c="filter";h=h>=1?"":("alpha(opacity="+Math.round(h*100)+")")}}else{if(c=="backgroundPositionX"||c=="backgroundPositionY"){f=c.slice(-1)=="X"?"Y":"X";if(i){var g=ZENG.dom.getStyle(b,"backgroundPosition"+f);c="backgroundPosition";typeof(h)=="number"&&(h=h+"px");h=f=="Y"?(h+" "+(g||"top")):((g||"left")+" "+h)}}}}if(typeof b.style[c]!="undefined"){b.style[c]=h+(typeof h==="number"&&!e.test(c)?"px":"");a=a&&true}else{a=a&&false}}return a},getScrollTop:function(b){var a=b||document;return Math.max(a.documentElement.scrollTop,a.body.scrollTop)},getClientHeight:function(b){var a=b||document;return a.compatMode=="CSS1Compat"?a.documentElement.clientHeight:a.body.clientHeight}};ZENG.string={RegExps:{trim:/^\s+|\s+$/g,ltrim:/^\s+/,rtrim:/\s+$/,nl2br:/\n/g,s2nb:/[\x20]{2}/g,URIencode:/[\x09\x0A\x0D\x20\x21-\x29\x2B\x2C\x2F\x3A-\x3F\x5B-\x5E\x60\x7B-\x7E]/g,escHTML:{re_amp:/&/g,re_lt://g,re_apos:/\x27/g,re_quot:/\x22/g},escString:{bsls:/\\/g,sls:/\//g,nl:/\n/g,rt:/\r/g,tab:/\t/g},restXHTML:{re_amp:/&/g,re_lt:/</g,re_gt:/>/g,re_apos:/&(?:apos|#0?39);/g,re_quot:/"/g},write:/\{(\d{1,2})(?:\:([xodQqb]))?\}/g,isURL:/^(?:ht|f)tp(?:s)?\:\/\/(?:[\w\-\.]+)\.\w+/i,cut:/[\x00-\xFF]/,getRealLen:{r0:/[^\x00-\xFF]/g,r1:/[\x00-\xFF]/g},format:/\{([\d\w\.]+)\}/g},commonReplace:function(c,a,b){return c.replace(a,b)},format:function(b){var a=Array.prototype.slice.call(arguments),c;b=String(a.shift());if(a.length==1&&typeof(a[0])=="object"){a=a[0]}ZENG.string.RegExps.format.lastIndex=0;return b.replace(ZENG.string.RegExps.format,function(d,e){c=ZENG.object.route(a,e);return c===undefined?d:c})}};ZENG.object={routeRE:/([\d\w_]+)/g,route:function(b,c){b=b||{};c=String(c);var d=ZENG.object.routeRE,a;d.lastIndex=0;while((a=d.exec(c))!==null){b=b[a[0]];if(b===undefined||b===null){break}}return b}};var ua=ZENG.userAgent={},agent=navigator.userAgent;ua.ie=9-((agent.indexOf("Trident/5.0")>-1)?0:1)-(window.XDomainRequest?0:1)-(window.XMLHttpRequest?0:1);if(typeof(ZENG.msgbox)=="undefined"){ZENG.msgbox={}}ZENG.msgbox._timer=null;ZENG.msgbox.loadingAnimationPath=ZENG.msgbox.loadingAnimationPath||("loading.gif");ZENG.msgbox.show=function(d,i,g,e){if(typeof(e)=="number"){e={topPosition:e}}e=e||{};var a=ZENG.msgbox,f='',b='',j=[0,0,0,0,"succ","fail","clear"],c,h;a._loadCss&&a._loadCss(e.cssPath);c=ZENG.dom.get("q_Msgbox")||ZENG.dom.createElementIn("div",document.body,false,{className:"zeng_msgbox_layer_wrap"});c.id="q_Msgbox";c.style.display="";c.innerHTML=ZENG.string.format(f,{type:j[i]||"hits",msgHtml:d||"",loadIcon:i==6?b:""});a._setPosition(c,g,e.topPosition)};ZENG.msgbox._setPosition=function(f,e,g){e=e||5000;var a=ZENG.msgbox,b=ZENG.dom.getScrollTop(),c=ZENG.dom.getClientHeight(),d=Math.floor(c/2)-40;ZENG.dom.setStyle(f,"top",((document.compatMode=="BackCompat"||ZENG.userAgent.ie<7)?b:0)+((typeof(g)=="number")?g:d)+"px");clearTimeout(a._timer);f.firstChild.style.display="";e&&(a._timer=setTimeout(a.hide,e))};ZENG.msgbox.hide=function(b){var a=ZENG.msgbox;if(b){clearTimeout(a._timer);a._timer=setTimeout(a._hide,b)}else{a._hide()}};ZENG.msgbox._hide=function(){var a=ZENG.dom.get("q_Msgbox"),b=ZENG.msgbox;clearTimeout(b._timer);if(a){var c=a.firstChild;ZENG.dom.setStyle(a,"display","none")}};