var idSeed=0,ua=navigator.userAgent.toLowerCase(),check=function(a){return a.test(ua)},isOpera=check(/opera/),isChrome=check(/chrome/),isWebKit=check(/webkit/),isSafari=!isChrome&&check(/safari/),isSafari3=isSafari&&check(/version\/3/),isSafari4=isSafari&&check(/version\/4/),isIE=!isOpera&&check(/msie/),isIE7=isIE&&check(/msie 7/),isIE8=isIE&&check(/msie 8/),isIE6=isIE&&!isIE7&&!isIE8,isGecko=!isWebKit&&check(/gecko/),isGecko3=isGecko&&check(/rv:1\.9/),isWindows=check(/windows|win32/),isMac=check(/macintosh|mac os x/),isLinux=check(/linux/);var ebl={};ebl.tpl=ebl.tpl||{_DEBUG:false,_CONFIG:"public/config.xml",_HEADERFILE:"public/body_header.html",_FOTTERFILE:"public/body_footer.html",isHome:document.location.href.indexOf("index")!=-1||document.location.href.substring(document.location.href.length-1,document.location.href.length)=="/",_hd:document.getElementsByTagName("head")[0],_te:document.getElementsByTagName("title")[0],_bd:document.getElementsByTagName("body")[0],_bdHd:document.getElementById("bd-hd"),_bdFr:document.getElementById("footer"),sendRequest:function(b,e,a){createXMLHTTPObject=function(){var f=[function(){return new XMLHttpRequest()},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}];var h=false;for(var g=0;g<f.length;g++){try{h=f[g]()}catch(j){continue}break}return h};var c=createXMLHTTPObject();if(!c){return}var d=(a)?"POST":"GET";c.open(d,b,true);c.setRequestHeader("User-Agent","XMLHTTP/1.0");if(a){c.setRequestHeader("Content-type","application/x-www-form-urlencoded")}c.onreadystatechange=function(){if(c.readyState!=4){return}if(c.status!=200&&c.status!=304){alert("HTTP error "+c.status);return}e(c)};if(c.readyState==4){return}c.send(a)},setMark:function(){formatBody=function(f){var d=f.responseXML;var c=d.getElementsByTagName("title")[0].firstChild.nodeValue;var b=d.getElementsByTagName("domain")[0].firstChild.nodeValue;var e=d.getElementsByTagName("domainSuffix")[0].firstChild.nodeValue;if(ebl.tpl._DEBUG){isIE?ebl.tpl_te=c:ebl.tpl._te.firstChild.nodeValue=c}ebl.tpl._bd.className+=" "+b+"_public "+b+"_page";if(ebl.tpl.isHome){ebl.tpl._bd.className=ebl.tpl._bd.className.replace("page","home")}ebl.tpl._bd.id="www-"+b+"-"+e;ebl.tpl._bd.removeAttribute("src")};var a=[" ",isIE?"ebl_ie "+(isIE6?"ebl_ie6":(isIE7?"ebl_ie7":"ebl_ie8")):isGecko?"ebl_gecko "+("ebl_gecko3"):isOpera?"ebl_opera":isWebKit?"ebl_webkit":""];ebl.tpl._bd.className+=a.join(" ");if(this._DEBUG){this.sendRequest(this._CONFIG,formatBody);if(ebl.tpl._bdHd){this.sendRequest(ebl.tpl._HEADERFILE,function(b){ebl.tpl._bdHd.innerHTML=b.responseText})}if(ebl.tpl._bdFr){this.sendRequest(ebl.tpl._FOTTERFILE,function(b){ebl.tpl._bdFr.innerHTML=b.responseText})}window.onload=function(){var b=document.createElement("div");b.id="debug-warn";b.className="debug_warn";b.style.position="absolute";b.style.top="0";b.style.width="130px";b.style.height="30px";b.style.backgroundColor="#ffffe0";b.style.fontFamily="monaco";b.style.fontSize="17px";b.style.color="red";b.innerHTML="_DEBUG = true";ebl.tpl._bd.appendChild(b)}}},loadScript:function(a){var c=new Date;var b=document.createElement("script");b.setAttribute("src",a+"?v="+c.getMilliseconds());b.setAttribute("type","text/javascript");this._bd.appendChild(b)}};ebl.widget=ebl.widget||{$:function(){var c=new Array();for(var b=0;b<arguments.length;b++){var a=arguments[b];if(typeof a==="string"){a=document.getElementById(a)}if(arguments.length==1){return a}c.push(a)}return c},navigation:function(c,b,a){if(this.$(c)){var f=this.$(c).getElementsByTagName(b);var h=f[0].getElementsByTagName("a")[0].className;var e=new Array;for(var d=0;d<f.length;d++){if(f[d].className.indexOf("first")!==-1){e.push(f[d].getElementsByTagName("a")[0])}f[d].onmouseover=function(){if(this.getElementsByTagName(a)[0]){this.getElementsByTagName("a")[0].className+="_hover";this.className=this.className.replace("off","on")}};f[d].onmouseout=function(){if(this.getElementsByTagName(a)[0]){this.getElementsByTagName("a")[0].className=this.getElementsByTagName("a")[0].className.replace("_hover","");this.className=this.className.replace("on","off")}}}for(var g=0;g<e.length;g++){e[g].className+=" first_link"+g}}},searchText:function(b,a){if(this.$(b)){var c=" "+this.$(b).className+"_remind";this.$(b).value=a;this.$(b).className+=c;this.$(b).onfocus=function(){this.value="";this.className=this.className.replace(c," ")};this.$(b).onblur=function(){this.value=a;this.className=this.className.replace(" ",c)}}},reStr:function(b){var a=/(.)(?=.*\1)/ig;return b.replace(a,"")},addBookmarks:function(c){var a=window.location.href;var b=document.getElementsByTagName("title")[0].innerHTML;this.$.onclick=function(){if(document.all){window.external.addFavorite(a,b)}else{if(window.sidebar){window.sidebar.addPanel(b,a,"")}}}},setHome:function(a){this.$.onclick=function(){if(window.sidebar){alert("\u9009\u4e2d\u5730\u5740,\u76f4\u63a5\u62d6\u81f3\u4e3b\u9875\u6309\u94ae\u5373\u53ef")}this.style.behavior="url(#default#homepage)";this.setHomePage(window.location.href);return(false)}},pageScroll:function(){var a=screen.availHeight-300;$(window).scroll(function(){$("#qq").css("top",$(document).scrollTop()+80)})},pixelPerfect:function(d,c,a){var b=document.createElement("img");b.src=d;b.style.position="absolute";c?b.style.top=c:b.style.top=0;a?b.style.left=a:b.style.left="129px";setOp=function(e){b.style.opacity=e};b.style.filter="alpha(Opacity=50)";ebl.tpl._bdHd.onclick=function(){setOp(0);setTimeout("setOp(0.1)",1000);setTimeout("setOp(0.2)",1050);setTimeout("setOp(0.3)",1100);setTimeout("setOp(0.4)",1150);setTimeout("setOp(0.5)",1200);document.getElementsByTagName("body")[0].appendChild(b)};document.getElementsByTagName("body")[0].ondblclick=function(){document.getElementsByTagName("body")[0].removeChild(b)}}};ebl.tpl.setMark();ebl.tpl.loadScript("js/main.js");

