
var globalImgServer='http://img.empresabio.com';
//var globalImgServer='http://img.alibaba.com';

if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C<A.length;C=C+1){D=A[C].split(".");E=YAHOO;for(B=(D[0]=="YAHOO")?1:0;B<D.length;B=B+1){E[D[B]]=E[D[B]]||{};E=E[D[B]];}}return E;};YAHOO.log=function(D,A,C){var B=YAHOO.widget.Logger;if(B&&B.log){return B.log(D,A,C);}else{return false;}};YAHOO.register=function(A,E,D){var I=YAHOO.env.modules;if(!I[A]){I[A]={versions:[],builds:[]};}var B=I[A],H=D.version,G=D.build,F=YAHOO.env.listeners;B.name=A;B.version=H;B.build=G;B.versions.push(H);B.builds.push(G);B.mainClass=E;for(var C=0;C<F.length;C=C+1){F[C](B);}if(E){E.VERSION=H;E.BUILD=G;}else{YAHOO.log("mainClass is undefined for module "+A,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(A){return YAHOO.env.modules[A]||null;};YAHOO.env.ua=function(){var C={ie:0,opera:0,gecko:0,webkit:0,mobile:null,air:0};var B=navigator.userAgent,A;if((/KHTML/).test(B)){C.webkit=1;}A=B.match(/AppleWebKit\/([^\s]*)/);if(A&&A[1]){C.webkit=parseFloat(A[1]);if(/ Mobile\//.test(B)){C.mobile="Apple";}else{A=B.match(/NokiaN[^\/]*/);if(A){C.mobile=A[0];}}A=B.match(/AdobeAIR\/([^\s]*)/);if(A){C.air=A[0];}}if(!C.webkit){A=B.match(/Opera[\s\/]([^\s]*)/);if(A&&A[1]){C.opera=parseFloat(A[1]);A=B.match(/Opera Mini[^;]*/);if(A){C.mobile=A[0];}}else{A=B.match(/MSIE\s([^;]*)/);if(A&&A[1]){C.ie=parseFloat(A[1]);}else{A=B.match(/Gecko\/([^\s]*)/);if(A){C.gecko=1;A=B.match(/rv:([^\s\)]*)/);if(A&&A[1]){C.gecko=parseFloat(A[1]);}}}}}return C;}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var B=YAHOO_config.listener,A=YAHOO.env.listeners,D=true,C;if(B){for(C=0;C<A.length;C=C+1){if(A[C]==B){D=false;break;}}if(D){A.push(B);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var A=YAHOO.lang,C=["toString","valueOf"],B={isArray:function(D){if(D){return A.isNumber(D.length)&&A.isFunction(D.splice);}return false;},isBoolean:function(D){return typeof D==="boolean";},isFunction:function(D){return typeof D==="function";},isNull:function(D){return D===null;},isNumber:function(D){return typeof D==="number"&&isFinite(D);},isObject:function(D){return(D&&(typeof D==="object"||A.isFunction(D)))||false;},isString:function(D){return typeof D==="string";},isUndefined:function(D){return typeof D==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(F,E){for(var D=0;D<C.length;D=D+1){var H=C[D],G=E[H];if(A.isFunction(G)&&G!=Object.prototype[H]){F[H]=G;}}}:function(){},extend:function(H,I,G){if(!I||!H){throw new Error("extend failed, please check that "+"all dependencies are included.");}var E=function(){};E.prototype=I.prototype;H.prototype=new E();H.prototype.constructor=H;H.superclass=I.prototype;if(I.prototype.constructor==Object.prototype.constructor){I.prototype.constructor=I;}if(G){for(var D in G){if(A.hasOwnProperty(G,D)){H.prototype[D]=G[D];}}A._IEEnumFix(H.prototype,G);}},augmentObject:function(H,G){if(!G||!H){throw new Error("Absorb failed, verify dependencies.");}var D=arguments,F,I,E=D[2];if(E&&E!==true){for(F=2;F<D.length;F=F+1){H[D[F]]=G[D[F]];}}else{for(I in G){if(E||!(I in H)){H[I]=G[I];}}A._IEEnumFix(H,G);}},augmentProto:function(G,F){if(!F||!G){throw new Error("Augment failed, verify dependencies.");}var D=[G.prototype,F.prototype];for(var E=2;E<arguments.length;E=E+1){D.push(arguments[E]);}A.augmentObject.apply(this,D);},dump:function(D,I){var F,H,K=[],L="{...}",E="f(){...}",J=", ",G=" => ";if(!A.isObject(D)){return D+"";}else{if(D instanceof Date||("nodeType"in D&&"tagName"in D)){return D;}else{if(A.isFunction(D)){return E;}}}I=(A.isNumber(I))?I:3;if(A.isArray(D)){K.push("[");for(F=0,H=D.length;F<H;F=F+1){if(A.isObject(D[F])){K.push((I>0)?A.dump(D[F],I-1):L);}else{K.push(D[F]);}K.push(J);}if(K.length>1){K.pop();}K.push("]");}else{K.push("{");for(F in D){if(A.hasOwnProperty(D,F)){K.push(F+G);if(A.isObject(D[F])){K.push((I>0)?A.dump(D[F],I-1):L);}else{K.push(D[F]);}K.push(J);}}if(K.length>1){K.pop();}K.push("}");}return K.join("");},substitute:function(S,E,L){var I,H,G,O,P,R,N=[],F,J="dump",M=" ",D="{",Q="}";for(;;){I=S.lastIndexOf(D);if(I<0){break;}H=S.indexOf(Q,I);if(I+1>=H){break;}F=S.substring(I+1,H);O=F;R=null;G=O.indexOf(M);if(G>-1){R=O.substring(G+1);O=O.substring(0,G);}P=E[O];if(L){P=L(O,P,R);}if(A.isObject(P)){if(A.isArray(P)){P=A.dump(P,parseInt(R,10));}else{R=R||"";var K=R.indexOf(J);if(K>-1){R=R.substring(4);}if(P.toString===Object.prototype.toString||K>-1){P=A.dump(P,parseInt(R,10));}else{P=P.toString();}}}else{if(!A.isString(P)&&!A.isNumber(P)){P="~-"+N.length+"-~";N[N.length]=F;}}S=S.substring(0,I)+P+S.substring(H+1);}for(I=N.length-1;I>=0;I=I-1){S=S.replace(new RegExp("~-"+I+"-~"),"{"+N[I]+"}","g");}return S;},trim:function(D){try{return D.replace(/^\s+|\s+$/g,"");}catch(E){return D;}},merge:function(){var G={},E=arguments;for(var F=0,D=E.length;F<D;F=F+1){A.augmentObject(G,E[F],true);}return G;},later:function(K,E,L,G,H){K=K||0;E=E||{};var F=L,J=G,I,D;if(A.isString(L)){F=E[L];}if(!F){throw new TypeError("method undefined");}if(!A.isArray(J)){J=[G];}I=function(){F.apply(E,J);};D=(H)?setInterval(I,K):setTimeout(I,K);return{interval:H,cancel:function(){if(this.interval){clearInterval(D);}else{clearTimeout(D);}}};},isValue:function(D){return(A.isObject(D)||A.isString(D)||A.isNumber(D)||A.isBoolean(D));}};A.hasOwnProperty=(Object.prototype.hasOwnProperty)?function(D,E){return D&&D.hasOwnProperty(E);}:function(D,E){return!A.isUndefined(D[E])&&D.constructor.prototype[E]!==D[E];};B.augmentObject(A,B,true);YAHOO.util.Lang=A;A.augment=A.augmentProto;YAHOO.augment=A.augmentProto;YAHOO.extend=A.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.6.0",build:"1321"});YAHOO.util.Get=function(){var M={},L=0,R=0,E=false,N=YAHOO.env.ua,S=YAHOO.lang;var J=function(W,T,X){var U=X||window,Y=U.document,Z=Y.createElement(W);for(var V in T){if(T[V]&&YAHOO.lang.hasOwnProperty(T,V)){Z.setAttribute(V,T[V]);}}return Z;};var I=function(T,U,W){var V=W||"utf-8";return J("link",{"id":"yui__dyn_"+(R++),"type":"text/css","charset":V,"rel":"stylesheet","href":T},U);};var P=function(T,U,W){var V=W||"utf-8";return J("script",{"id":"yui__dyn_"+(R++),"type":"text/javascript","charset":V,"src":T},U);};var A=function(T,U){return{tId:T.tId,win:T.win,data:T.data,nodes:T.nodes,msg:U,purge:function(){D(this.tId);}};};var B=function(T,W){var U=M[W],V=(S.isString(T))?U.win.document.getElementById(T):T;if(!V){Q(W,"target node not found: "+T);}return V;};var Q=function(W,V){var T=M[W];if(T.onFailure){var U=T.scope||T.win;T.onFailure.call(U,A(T,V));}};var C=function(W){var T=M[W];T.finished=true;if(T.aborted){var V="transaction "+W+" was aborted";Q(W,V);return;}if(T.onSuccess){var U=T.scope||T.win;T.onSuccess.call(U,A(T));}};var O=function(V){var T=M[V];if(T.onTimeout){var U=T.context||T;T.onTimeout.call(U,A(T));}};var G=function(V,Z){var U=M[V];if(U.timer){U.timer.cancel();}if(U.aborted){var X="transaction "+V+" was aborted";Q(V,X);return;}if(Z){U.url.shift();if(U.varName){U.varName.shift();}}else{U.url=(S.isString(U.url))?[U.url]:U.url;if(U.varName){U.varName=(S.isString(U.varName))?[U.varName]:U.varName;}}var c=U.win,b=c.document,a=b.getElementsByTagName("head")[0],W;if(U.url.length===0){if(U.type==="script"&&N.webkit&&N.webkit<420&&!U.finalpass&&!U.varName){var Y=P(null,U.win,U.charset);Y.innerHTML='YAHOO.util.Get._finalize("'+V+'");';U.nodes.push(Y);a.appendChild(Y);}else{C(V);}return;}var T=U.url[0];if(!T){U.url.shift();return G(V);}if(U.timeout){U.timer=S.later(U.timeout,U,O,V);}if(U.type==="script"){W=P(T,c,U.charset);}else{W=I(T,c,U.charset);}F(U.type,W,V,T,c,U.url.length);U.nodes.push(W);if(U.insertBefore){var e=B(U.insertBefore,V);if(e){e.parentNode.insertBefore(W,e);}}else{a.appendChild(W);}if((N.webkit||N.gecko)&&U.type==="css"){G(V,T);}};var K=function(){if(E){return;}E=true;for(var T in M){var U=M[T];if(U.autopurge&&U.finished){D(U.tId);delete M[T];}}E=false;};var D=function(a){var X=M[a];if(X){var Z=X.nodes,T=Z.length,Y=X.win.document,W=Y.getElementsByTagName("head")[0];if(X.insertBefore){var V=B(X.insertBefore,a);if(V){W=V.parentNode;}}for(var U=0;U<T;U=U+1){W.removeChild(Z[U]);}X.nodes=[];}};var H=function(U,T,V){var X="q"+(L++);V=V||{};if(L%YAHOO.util.Get.PURGE_THRESH===0){K();}M[X]=S.merge(V,{tId:X,type:U,url:T,finished:false,aborted:false,nodes:[]});var W=M[X];W.win=W.win||window;W.scope=W.scope||W.win;W.autopurge=("autopurge"in W)?W.autopurge:(U==="script")?true:false;S.later(0,W,G,X);return{tId:X};};var F=function(c,X,W,U,Y,Z,b){var a=b||G;if(N.ie){X.onreadystatechange=function(){var d=this.readyState;if("loaded"===d||"complete"===d){X.onreadystatechange=null;a(W,U);}};}else{if(N.webkit){if(c==="script"){if(N.webkit>=420){X.addEventListener("load",function(){a(W,U);});}else{var T=M[W];if(T.varName){var V=YAHOO.util.Get.POLL_FREQ;T.maxattempts=YAHOO.util.Get.TIMEOUT/V;T.attempts=0;T._cache=T.varName[0].split(".");T.timer=S.later(V,T,function(j){var f=this._cache,e=f.length,d=this.win,g;for(g=0;g<e;g=g+1){d=d[f[g]];if(!d){this.attempts++;if(this.attempts++>this.maxattempts){var h="Over retry limit, giving up";T.timer.cancel();Q(W,h);}else{}return;}}T.timer.cancel();a(W,U);},null,true);}else{S.later(YAHOO.util.Get.POLL_FREQ,null,a,[W,U]);}}}}else{X.onload=function(){a(W,U);};}}};return{POLL_FREQ:10,PURGE_THRESH:20,TIMEOUT:2000,_finalize:function(T){S.later(0,null,C,T);},abort:function(U){var V=(S.isString(U))?U:U.tId;var T=M[V];if(T){T.aborted=true;}},script:function(T,U){return H("script",T,U);},css:function(T,U){return H("css",T,U);}};}();YAHOO.register("get",YAHOO.util.Get,{version:"2.6.0",build:"1321"});(function(){var Y=YAHOO,util=Y.util,lang=Y.lang,env=Y.env,PROV="_provides",SUPER="_supersedes",REQ="expanded",AFTER="_after";var YUI={dupsAllowed:{"yahoo":true,"get":true},info:{"root":"2.6.0/build/","base":"http://yui.yahooapis.com/2.6.0/build/","comboBase":"http://yui.yahooapis.com/combo?","skin":{"defaultSkin":"sam","base":"assets/skins/","path":"skin.css","after":["reset","fonts","grids","base"],"rollup":3},dupsAllowed:["yahoo","get"],"moduleInfo":{"animation":{"type":"js","path":"animation/animation-min.js","requires":["dom","event"]},"autocomplete":{"type":"js","path":"autocomplete/autocomplete-min.js","requires":["dom","event","datasource"],"optional":["connection","animation"],"skinnable":true},"base":{"type":"css","path":"base/base-min.css","after":["reset","fonts","grids"]},"button":{"type":"js","path":"button/button-min.js","requires":["element"],"optional":["menu"],"skinnable":true},"calendar":{"type":"js","path":"calendar/calendar-min.js","requires":["event","dom"],"skinnable":true},"carousel":{"type":"js","path":"carousel/carousel-beta-min.js","requires":["element"],"optional":["animation"],"skinnable":true},"charts":{"type":"js","path":"charts/charts-experimental-min.js","requires":["element","json","datasource"]},"colorpicker":{"type":"js","path":"colorpicker/colorpicker-min.js","requires":["slider","element"],"optional":["animation"],"skinnable":true},"connection":{"type":"js","path":"connection/connection-min.js","requires":["event"]},"container":{"type":"js","path":"container/container-min.js","requires":["dom","event"],"optional":["dragdrop","animation","connection"],"supersedes":["containercore"],"skinnable":true},"containercore":{"type":"js","path":"container/container_core-min.js","requires":["dom","event"],"pkg":"container"},"cookie":{"type":"js","path":"cookie/cookie-min.js","requires":["yahoo"]},"datasource":{"type":"js","path":"datasource/datasource-min.js","requires":["event"],"optional":["connection"]},"datatable":{"type":"js","path":"datatable/datatable-min.js","requires":["element","datasource"],"optional":["calendar","dragdrop","paginator"],"skinnable":true},"dom":{"type":"js","path":"dom/dom-min.js","requires":["yahoo"]},"dragdrop":{"type":"js","path":"dragdrop/dragdrop-min.js","requires":["dom","event"]},"editor":{"type":"js","path":"editor/editor-min.js","requires":["menu","element","button"],"optional":["animation","dragdrop"],"supersedes":["simpleeditor"],"skinnable":true},"element":{"type":"js","path":"element/element-beta-min.js","requires":["dom","event"]},"event":{"type":"js","path":"event/event-min.js","requires":["yahoo"]},"fonts":{"type":"css","path":"fonts/fonts-min.css"},"get":{"type":"js","path":"get/get-min.js","requires":["yahoo"]},"grids":{"type":"css","path":"grids/grids-min.css","requires":["fonts"],"optional":["reset"]},"history":{"type":"js","path":"history/history-min.js","requires":["event"]},"imagecropper":{"type":"js","path":"imagecropper/imagecropper-beta-min.js","requires":["dom","event","dragdrop","element","resize"],"skinnable":true},"imageloader":{"type":"js","path":"imageloader/imageloader-min.js","requires":["event","dom"]},"json":{"type":"js","path":"json/json-min.js","requires":["yahoo"]},"layout":{"type":"js","path":"layout/layout-min.js","requires":["dom","event","element"],"optional":["animation","dragdrop","resize","selector"],"skinnable":true},"logger":{"type":"js","path":"logger/logger-min.js","requires":["event","dom"],"optional":["dragdrop"],"skinnable":true},"menu":{"type":"js","path":"menu/menu-min.js","requires":["containercore"],"skinnable":true},"paginator":{"type":"js","path":"paginator/paginator-min.js","requires":["element"],"skinnable":true},"profiler":{"type":"js","path":"profiler/profiler-min.js","requires":["yahoo"]},"profilerviewer":{"type":"js","path":"profilerviewer/profilerviewer-beta-min.js","requires":["profiler","yuiloader","element"],"skinnable":true},"reset":{"type":"css","path":"reset/reset-min.css"},"reset-fonts-grids":{"type":"css","path":"reset-fonts-grids/reset-fonts-grids.css","supersedes":["reset","fonts","grids","reset-fonts"],"rollup":4},"reset-fonts":{"type":"css","path":"reset-fonts/reset-fonts.css","supersedes":["reset","fonts"],"rollup":2},"resize":{"type":"js","path":"resize/resize-min.js","requires":["dom","event","dragdrop","element"],"optional":["animation"],"skinnable":true},"selector":{"type":"js","path":"selector/selector-beta-min.js","requires":["yahoo","dom"]},"simpleeditor":{"type":"js","path":"editor/simpleeditor-min.js","requires":["element"],"optional":["containercore","menu","button","animation","dragdrop"],"skinnable":true,"pkg":"editor"},"slider":{"type":"js","path":"slider/slider-min.js","requires":["dragdrop"],"optional":["animation"],"skinnable":true},"tabview":{"type":"js","path":"tabview/tabview-min.js","requires":["element"],"optional":["connection"],"skinnable":true},"treeview":{"type":"js","path":"treeview/treeview-min.js","requires":["event","dom"],"skinnable":true},"uploader":{"type":"js","path":"uploader/uploader-experimental.js","requires":["element"]},"utilities":{"type":"js","path":"utilities/utilities.js","supersedes":["yahoo","event","dragdrop","animation","dom","connection","element","yahoo-dom-event","get","yuiloader","yuiloader-dom-event"],"rollup":8},"yahoo":{"type":"js","path":"yahoo/yahoo-min.js"},"yahoo-dom-event":{"type":"js","path":"yahoo-dom-event/yahoo-dom-event.js","supersedes":["yahoo","event","dom"],"rollup":3},"yuiloader":{"type":"js","path":"yuiloader/yuiloader-min.js","supersedes":["yahoo","get"]},"yuiloader-dom-event":{"type":"js","path":"yuiloader-dom-event/yuiloader-dom-event.js","supersedes":["yahoo","dom","event","get","yuiloader","yahoo-dom-event"],"rollup":5},"yuitest":{"type":"js","path":"yuitest/yuitest-min.js","requires":["logger"],"skinnable":true}}},ObjectUtil:{appendArray:function(o,a){if(a){for(var i=0;i<a.length;i=i+1){o[a[i]]=true;}}},keys:function(o,ordered){var a=[],i;for(i in o){if(lang.hasOwnProperty(o,i)){a.push(i);}}return a;}},ArrayUtil:{appendArray:function(a1,a2){Array.prototype.push.apply(a1,a2);},indexOf:function(a,val){for(var i=0;i<a.length;i=i+1){if(a[i]===val){return i;}}return-1;},toObject:function(a){var o={};for(var i=0;i<a.length;i=i+1){o[a[i]]=true;}return o;},uniq:function(a){return YUI.ObjectUtil.keys(YUI.ArrayUtil.toObject(a));}}};YAHOO.util.YUILoader=function(o){this._internalCallback=null;this._useYahooListener=false;this.onSuccess=null;this.onFailure=Y.log;this.onProgress=null;this.onTimeout=null;this.scope=this;this.data=null;this.insertBefore=null;this.charset=null;this.varName=null;this.base=YUI.info.base;this.comboBase=YUI.info.comboBase;this.combine=false;this.root=YUI.info.root;this.timeout=0;this.ignore=null;this.force=null;this.allowRollup=true;this.filter=null;this.required={};this.moduleInfo=lang.merge(YUI.info.moduleInfo);this.rollups=null;this.loadOptional=false;this.sorted=[];this.loaded={};this.dirty=true;this.inserted={};var self=this;env.listeners.push(function(m){if(self._useYahooListener){self.loadNext(m.name);}});this.skin=lang.merge(YUI.info.skin);this._config(o);};Y.util.YUILoader.prototype={FILTERS:{RAW:{"searchExp":"-min\\.js","replaceStr":".js"},DEBUG:{"searchExp":"-min\\.js","replaceStr":"-debug.js"}},SKIN_PREFIX:"skin-",_config:function(o){if(o){for(var i in o){if(lang.hasOwnProperty(o,i)){if(i=="require"){this.require(o[i]);}else{this[i]=o[i];}}}}var f=this.filter;if(lang.isString(f)){f=f.toUpperCase();if(f==="DEBUG"){this.require("logger");}if(!Y.widget.LogWriter){Y.widget.LogWriter=function(){return Y;};}this.filter=this.FILTERS[f];}},addModule:function(o){if(!o||!o.name||!o.type||(!o.path&&!o.fullpath)){return false;}o.ext=("ext"in o)?o.ext:true;o.requires=o.requires||[];this.moduleInfo[o.name]=o;this.dirty=true;return true;},require:function(what){var a=(typeof what==="string")?arguments:what;this.dirty=true;YUI.ObjectUtil.appendArray(this.required,a);},_addSkin:function(skin,mod){var name=this.formatSkin(skin),info=this.moduleInfo,sinf=this.skin,ext=info[mod]&&info[mod].ext;if(!info[name]){this.addModule({"name":name,"type":"css","path":sinf.base+skin+"/"+sinf.path,"after":sinf.after,"rollup":sinf.rollup,"ext":ext});}if(mod){name=this.formatSkin(skin,mod);if(!info[name]){var mdef=info[mod],pkg=mdef.pkg||mod;this.addModule({"name":name,"type":"css","after":sinf.after,"path":pkg+"/"+sinf.base+skin+"/"+mod+".css","ext":ext});}}return name;},getRequires:function(mod){if(!mod){return[];}if(!this.dirty&&mod.expanded){return mod.expanded;}mod.requires=mod.requires||[];var i,d=[],r=mod.requires,o=mod.optional,info=this.moduleInfo,m;for(i=0;i<r.length;i=i+1){d.push(r[i]);m=info[r[i]];YUI.ArrayUtil.appendArray(d,this.getRequires(m));}if(o&&this.loadOptional){for(i=0;i<o.length;i=i+1){d.push(o[i]);YUI.ArrayUtil.appendArray(d,this.getRequires(info[o[i]]));}}mod.expanded=YUI.ArrayUtil.uniq(d);return mod.expanded;},getProvides:function(name,notMe){var addMe=!(notMe),ckey=(addMe)?PROV:SUPER,m=this.moduleInfo[name],o={};if(!m){return o;}if(m[ckey]){return m[ckey];}var s=m.supersedes,done={},me=this;var add=function(mm){if(!done[mm]){done[mm]=true;lang.augmentObject(o,me.getProvides(mm));}};if(s){for(var i=0;i<s.length;i=i+1){add(s[i]);}}m[SUPER]=o;m[PROV]=lang.merge(o);m[PROV][name]=true;return m[ckey];},calculate:function(o){if(o||this.dirty){this._config(o);this._setup();this._explode();if(this.allowRollup){this._rollup();}this._reduce();this._sort();this.dirty=false;}},_setup:function(){var info=this.moduleInfo,name,i,j;for(name in info){if(lang.hasOwnProperty(info,name)){var m=info[name];if(m&&m.skinnable){var o=this.skin.overrides,smod;if(o&&o[name]){for(i=0;i<o[name].length;i=i+1){smod=this._addSkin(o[name][i],name);}}else{smod=this._addSkin(this.skin.defaultSkin,name);}m.requires.push(smod);}}}var l=lang.merge(this.inserted);if(!this._sandbox){l=lang.merge(l,env.modules);}if(this.ignore){YUI.ObjectUtil.appendArray(l,this.ignore);}if(this.force){for(i=0;i<this.force.length;i=i+1){if(this.force[i]in l){delete l[this.force[i]];}}}for(j in l){if(lang.hasOwnProperty(l,j)){lang.augmentObject(l,this.getProvides(j));}}this.loaded=l;},_explode:function(){var r=this.required,i,mod;for(i in r){if(lang.hasOwnProperty(r,i)){mod=this.moduleInfo[i];if(mod){var req=this.getRequires(mod);if(req){YUI.ObjectUtil.appendArray(r,req);}}}}},_skin:function(){},formatSkin:function(skin,mod){var s=this.SKIN_PREFIX+skin;if(mod){s=s+"-"+mod;}return s;},parseSkin:function(mod){if(mod.indexOf(this.SKIN_PREFIX)===0){var a=mod.split("-");return{skin:a[1],module:a[2]};}return null;},_rollup:function(){var i,j,m,s,rollups={},r=this.required,roll,info=this.moduleInfo;if(this.dirty||!this.rollups){for(i in info){if(lang.hasOwnProperty(info,i)){m=info[i];if(m&&m.rollup){rollups[i]=m;}}}this.rollups=rollups;}for(;;){var rolled=false;for(i in rollups){if(!r[i]&&!this.loaded[i]){m=info[i];s=m.supersedes;roll=false;if(!m.rollup){continue;}var skin=(m.ext)?false:this.parseSkin(i),c=0;if(skin){for(j in r){if(lang.hasOwnProperty(r,j)){if(i!==j&&this.parseSkin(j)){c++;roll=(c>=m.rollup);if(roll){break;}}}}}else{for(j=0;j<s.length;j=j+1){if(this.loaded[s[j]]&&(!YUI.dupsAllowed[s[j]])){roll=false;break;}else{if(r[s[j]]){c++;roll=(c>=m.rollup);if(roll){break;}}}}}if(roll){r[i]=true;rolled=true;this.getRequires(m);}}}if(!rolled){break;}}},_reduce:function(){var i,j,s,m,r=this.required;for(i in r){if(i in this.loaded){delete r[i];}else{var skinDef=this.parseSkin(i);if(skinDef){if(!skinDef.module){var skin_pre=this.SKIN_PREFIX+skinDef.skin;for(j in r){if(lang.hasOwnProperty(r,j)){m=this.moduleInfo[j];var ext=m&&m.ext;if(!ext&&j!==i&&j.indexOf(skin_pre)>-1){delete r[j];}}}}}else{m=this.moduleInfo[i];s=m&&m.supersedes;if(s){for(j=0;j<s.length;j=j+1){if(s[j]in r){delete r[s[j]];}}}}}}},_onFailure:function(msg){YAHOO.log("Failure","info","loader");var f=this.onFailure;if(f){f.call(this.scope,{msg:"failure: "+msg,data:this.data,success:false});}},_onTimeout:function(){YAHOO.log("Timeout","info","loader");var f=this.onTimeout;if(f){f.call(this.scope,{msg:"timeout",data:this.data,success:false});}},_sort:function(){var s=[],info=this.moduleInfo,loaded=this.loaded,checkOptional=!this.loadOptional,me=this;var requires=function(aa,bb){var mm=info[aa];if(loaded[bb]||!mm){return false;}var ii,rr=mm.expanded,after=mm.after,other=info[bb],optional=mm.optional;if(rr&&YUI.ArrayUtil.indexOf(rr,bb)>-1){return true;}if(after&&YUI.ArrayUtil.indexOf(after,bb)>-1){return true;}if(checkOptional&&optional&&YUI.ArrayUtil.indexOf(optional,bb)>-1){return true;}var ss=info[bb]&&info[bb].supersedes;if(ss){for(ii=0;ii<ss.length;ii=ii+1){if(requires(aa,ss[ii])){return true;}}}if(mm.ext&&mm.type=="css"&&!other.ext&&other.type=="css"){return true;}return false;};for(var i in this.required){if(lang.hasOwnProperty(this.required,i)){s.push(i);}}var p=0;for(;;){var l=s.length,a,b,j,k,moved=false;for(j=p;j<l;j=j+1){a=s[j];for(k=j+1;k<l;k=k+1){if(requires(a,s[k])){b=s.splice(k,1);s.splice(j,0,b[0]);moved=true;break;}}if(moved){break;}else{p=p+1;}}if(!moved){break;}}this.sorted=s;},toString:function(){var o={type:"YUILoader",base:this.base,filter:this.filter,required:this.required,loaded:this.loaded,inserted:this.inserted};lang.dump(o,1);},_combine:function(){this._combining=[];var self=this,s=this.sorted,len=s.length,js=this.comboBase,css=this.comboBase,target,startLen=js.length,i,m,type=this.loadType;YAHOO.log("type "+type);for(i=0;i<len;i=i+1){m=this.moduleInfo[s[i]];if(m&&!m.ext&&(!type||type===m.type)){target=this.root+m.path;target+="&";if(m.type=="js"){js+=target;}else{css+=target;}this._combining.push(s[i]);}}if(this._combining.length){YAHOO.log("Attempting to combine: "+this._combining,"info","loader");var callback=function(o){var c=this._combining,len=c.length,i,m;for(i=0;i<len;i=i+1){this.inserted[c[i]]=true;}this.loadNext(o.data);},loadScript=function(){if(js.length>startLen){YAHOO.util.Get.script(self._filter(js),{data:self._loading,onSuccess:callback,onFailure:self._onFailure,onTimeout:self._onTimeout,insertBefore:self.insertBefore,charset:self.charset,timeout:self.timeout,scope:self});}};if(css.length>startLen){YAHOO.util.Get.css(this._filter(css),{data:this._loading,onSuccess:loadScript,onFailure:this._onFailure,onTimeout:this._onTimeout,insertBefore:this.insertBefore,charset:this.charset,timeout:this.timeout,scope:self});}else{loadScript();}return;}else{this.loadNext(this._loading);}},insert:function(o,type){this.calculate(o);this._loading=true;this.loadType=type;if(this.combine){return this._combine();}if(!type){var self=this;this._internalCallback=function(){self._internalCallback=null;self.insert(null,"js");};this.insert(null,"css");return;}this.loadNext();},sandbox:function(o,type){this._config(o);if(!this.onSuccess){throw new Error("You must supply an onSuccess handler for your sandbox");}this._sandbox=true;var self=this;if(!type||type!=="js"){this._internalCallback=function(){self._internalCallback=null;self.sandbox(null,"js");};this.insert(null,"css");return;}if(!util.Connect){var ld=new YAHOO.util.YUILoader();ld.insert({base:this.base,filter:this.filter,require:"connection",insertBefore:this.insertBefore,charset:this.charset,onSuccess:function(){this.sandbox(null,"js");},scope:this},"js");return;}this._scriptText=[];this._loadCount=0;this._stopCount=this.sorted.length;this._xhr=[];this.calculate();var s=this.sorted,l=s.length,i,m,url;for(i=0;i<l;i=i+1){m=this.moduleInfo[s[i]];if(!m){this._onFailure("undefined module "+m);for(var j=0;j<this._xhr.length;j=j+1){this._xhr[j].abort();}return;}if(m.type!=="js"){this._loadCount++;continue;}url=m.fullpath;url=(url)?this._filter(url):this._url(m.path);var xhrData={success:function(o){var idx=o.argument[0],name=o.argument[2];this._scriptText[idx]=o.responseText;if(this.onProgress){this.onProgress.call(this.scope,{name:name,scriptText:o.responseText,xhrResponse:o,data:this.data});}this._loadCount++;if(this._loadCount>=this._stopCount){var v=this.varName||"YAHOO";var t="(function() {\n";var b="\nreturn "+v+";\n})();";var ref=eval(t+this._scriptText.join("\n")+b);this._pushEvents(ref);if(ref){this.onSuccess.call(this.scope,{reference:ref,data:this.data});}else{this._onFailure.call(this.varName+" reference failure");}}},failure:function(o){this.onFailure.call(this.scope,{msg:"XHR failure",xhrResponse:o,data:this.data});},scope:this,argument:[i,url,s[i]]};this._xhr.push(util.Connect.asyncRequest("GET",url,xhrData));}},loadNext:function(mname){if(!this._loading){return;}if(mname){if(mname!==this._loading){return;}this.inserted[mname]=true;if(this.onProgress){this.onProgress.call(this.scope,{name:mname,data:this.data});}}var s=this.sorted,len=s.length,i,m;for(i=0;i<len;i=i+1){if(s[i]in this.inserted){continue;}if(s[i]===this._loading){return;}m=this.moduleInfo[s[i]];if(!m){this.onFailure.call(this.scope,{msg:"undefined module "+m,data:this.data});return;}if(!this.loadType||this.loadType===m.type){this._loading=s[i];var fn=(m.type==="css")?util.Get.css:util.Get.script,url=m.fullpath,self=this,c=function(o){self.loadNext(o.data);};url=(url)?this._filter(url):this._url(m.path);if(env.ua.webkit&&env.ua.webkit<420&&m.type==="js"&&!m.varName){c=null;this._useYahooListener=true;}fn(url,{data:s[i],onSuccess:c,onFailure:this._onFailure,onTimeout:this._onTimeout,insertBefore:this.insertBefore,charset:this.charset,timeout:this.timeout,varName:m.varName,scope:self});return;}}this._loading=null;if(this._internalCallback){var f=this._internalCallback;this._internalCallback=null;f.call(this);}else{if(this.onSuccess){this._pushEvents();this.onSuccess.call(this.scope,{data:this.data});}}},_pushEvents:function(ref){var r=ref||YAHOO;if(r.util&&r.util.Event){r.util.Event._load();}},_filter:function(str){var f=this.filter;return(f)?str.replace(new RegExp(f.searchExp),f.replaceStr):str;},_url:function(path){var u=this.base||"",f=this.filter;u=u+path;return this._filter(u);}};})();(function(){var B=YAHOO.util,F=YAHOO.lang,L,J,K={},G={},N=window.document;YAHOO.env._id_counter=YAHOO.env._id_counter||0;var C=YAHOO.env.ua.opera,M=YAHOO.env.ua.webkit,A=YAHOO.env.ua.gecko,H=YAHOO.env.ua.ie;var E={HYPHEN:/(-[a-z])/i,ROOT_TAG:/^body|html$/i,OP_SCROLL:/^(?:inline|table-row)$/i};var O=function(Q){if(!E.HYPHEN.test(Q)){return Q;}if(K[Q]){return K[Q];}var R=Q;while(E.HYPHEN.exec(R)){R=R.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase());}K[Q]=R;return R;};var P=function(R){var Q=G[R];if(!Q){Q=new RegExp("(?:^|\\s+)"+R+"(?:\\s+|$)");G[R]=Q;}return Q;};if(N.defaultView&&N.defaultView.getComputedStyle){L=function(Q,T){var S=null;if(T=="float"){T="cssFloat";}var R=Q.ownerDocument.defaultView.getComputedStyle(Q,"");if(R){S=R[O(T)];}return Q.style[T]||S;};}else{if(N.documentElement.currentStyle&&H){L=function(Q,S){switch(O(S)){case"opacity":var U=100;try{U=Q.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(T){try{U=Q.filters("alpha").opacity;}catch(T){}}return U/100;case"float":S="styleFloat";default:var R=Q.currentStyle?Q.currentStyle[S]:null;return(Q.style[S]||R);}};}else{L=function(Q,R){return Q.style[R];};}}if(H){J=function(Q,R,S){switch(R){case"opacity":if(F.isString(Q.style.filter)){Q.style.filter="alpha(opacity="+S*100+")";if(!Q.currentStyle||!Q.currentStyle.hasLayout){Q.style.zoom=1;}}break;case"float":R="styleFloat";default:Q.style[R]=S;}};}else{J=function(Q,R,S){if(R=="float"){R="cssFloat";}Q.style[R]=S;};}var D=function(Q,R){return Q&&Q.nodeType==1&&(!R||R(Q));};YAHOO.util.Dom={get:function(S){if(S){if(S.nodeType||S.item){return S;}if(typeof S==="string"){return N.getElementById(S);}if("length"in S){var T=[];for(var R=0,Q=S.length;R<Q;++R){T[T.length]=B.Dom.get(S[R]);}return T;}return S;}return null;},getStyle:function(Q,S){S=O(S);var R=function(T){return L(T,S);};return B.Dom.batch(Q,R,B.Dom,true);},setStyle:function(Q,S,T){S=O(S);var R=function(U){J(U,S,T);};B.Dom.batch(Q,R,B.Dom,true);},getXY:function(Q){var R=function(S){if((S.parentNode===null||S.offsetParent===null||this.getStyle(S,"display")=="none")&&S!=S.ownerDocument.body){return false;}return I(S);};return B.Dom.batch(Q,R,B.Dom,true);},getX:function(Q){var R=function(S){return B.Dom.getXY(S)[0];};return B.Dom.batch(Q,R,B.Dom,true);},getY:function(Q){var R=function(S){return B.Dom.getXY(S)[1];};return B.Dom.batch(Q,R,B.Dom,true);},setXY:function(Q,T,S){var R=function(W){var V=this.getStyle(W,"position");if(V=="static"){this.setStyle(W,"position","relative");V="relative";}var Y=this.getXY(W);if(Y===false){return false;}var X=[parseInt(this.getStyle(W,"left"),10),parseInt(this.getStyle(W,"top"),10)];if(isNaN(X[0])){X[0]=(V=="relative")?0:W.offsetLeft;}if(isNaN(X[1])){X[1]=(V=="relative")?0:W.offsetTop;}if(T[0]!==null){W.style.left=T[0]-Y[0]+X[0]+"px";}if(T[1]!==null){W.style.top=T[1]-Y[1]+X[1]+"px";}if(!S){var U=this.getXY(W);if((T[0]!==null&&U[0]!=T[0])||(T[1]!==null&&U[1]!=T[1])){this.setXY(W,T,true);}}};B.Dom.batch(Q,R,B.Dom,true);},setX:function(R,Q){B.Dom.setXY(R,[Q,null]);},setY:function(Q,R){B.Dom.setXY(Q,[null,R]);},getRegion:function(Q){var R=function(S){if((S.parentNode===null||S.offsetParent===null||this.getStyle(S,"display")=="none")&&S!=S.ownerDocument.body){return false;}var T=B.Region.getRegion(S);return T;};return B.Dom.batch(Q,R,B.Dom,true);},getClientWidth:function(){return B.Dom.getViewportWidth();},getClientHeight:function(){return B.Dom.getViewportHeight();},getElementsByClassName:function(U,Y,V,W){U=F.trim(U);Y=Y||"*";V=(V)?B.Dom.get(V):null||N;if(!V){return[];}var R=[],Q=V.getElementsByTagName(Y),X=P(U);for(var S=0,T=Q.length;S<T;++S){if(X.test(Q[S].className)){R[R.length]=Q[S];if(W){W.call(Q[S],Q[S]);}}}return R;},hasClass:function(S,R){var Q=P(R);var T=function(U){return Q.test(U.className);};return B.Dom.batch(S,T,B.Dom,true);},addClass:function(R,Q){var S=function(T){if(this.hasClass(T,Q)){return false;}T.className=F.trim([T.className,Q].join(" "));return true;};return B.Dom.batch(R,S,B.Dom,true);},removeClass:function(S,R){var Q=P(R);var T=function(W){var V=false,X=W.className;if(R&&X&&this.hasClass(W,R)){W.className=X.replace(Q," ");if(this.hasClass(W,R)){this.removeClass(W,R);}W.className=F.trim(W.className);if(W.className===""){var U=(W.hasAttribute)?"class":"className";W.removeAttribute(U);}V=true;}return V;};return B.Dom.batch(S,T,B.Dom,true);},replaceClass:function(T,R,Q){if(!Q||R===Q){return false;}var S=P(R);var U=function(V){if(!this.hasClass(V,R)){this.addClass(V,Q);return true;}V.className=V.className.replace(S," "+Q+" ");if(this.hasClass(V,R)){this.removeClass(V,R);}V.className=F.trim(V.className);return true;};return B.Dom.batch(T,U,B.Dom,true);},generateId:function(Q,S){S=S||"yui-gen";var R=function(T){if(T&&T.id){return T.id;}var U=S+YAHOO.env._id_counter++;if(T){T.id=U;}return U;};return B.Dom.batch(Q,R,B.Dom,true)||R.apply(B.Dom,arguments);},isAncestor:function(R,S){R=B.Dom.get(R);S=B.Dom.get(S);var Q=false;if((R&&S)&&(R.nodeType&&S.nodeType)){if(R.contains&&R!==S){Q=R.contains(S);}else{if(R.compareDocumentPosition){Q=!!(R.compareDocumentPosition(S)&16);}}}else{}return Q;},inDocument:function(Q){return this.isAncestor(N.documentElement,Q);},getElementsBy:function(X,R,S,U){R=R||"*";S=(S)?B.Dom.get(S):null||N;if(!S){return[];}var T=[],W=S.getElementsByTagName(R);for(var V=0,Q=W.length;V<Q;++V){if(X(W[V])){T[T.length]=W[V];if(U){U(W[V]);}}}return T;},batch:function(U,X,W,S){U=(U&&(U.tagName||U.item))?U:B.Dom.get(U);if(!U||!X){return false;}var T=(S)?W:window;if(U.tagName||U.length===undefined){return X.call(T,U,W);}var V=[];for(var R=0,Q=U.length;R<Q;++R){V[V.length]=X.call(T,U[R],W);}return V;},getDocumentHeight:function(){var R=(N.compatMode!="CSS1Compat")?N.body.scrollHeight:N.documentElement.scrollHeight;var Q=Math.max(R,B.Dom.getViewportHeight());return Q;},getDocumentWidth:function(){var R=(N.compatMode!="CSS1Compat")?N.body.scrollWidth:N.documentElement.scrollWidth;var Q=Math.max(R,B.Dom.getViewportWidth());return Q;},getViewportHeight:function(){var Q=self.innerHeight;var R=N.compatMode;if((R||H)&&!C){Q=(R=="CSS1Compat")?N.documentElement.clientHeight:N.body.clientHeight;}return Q;},getViewportWidth:function(){var Q=self.innerWidth;var R=N.compatMode;if(R||H){Q=(R=="CSS1Compat")?N.documentElement.clientWidth:N.body.clientWidth;}return Q;},getAncestorBy:function(Q,R){while((Q=Q.parentNode)){if(D(Q,R)){return Q;}}return null;},getAncestorByClassName:function(R,Q){R=B.Dom.get(R);if(!R){return null;}var S=function(T){return B.Dom.hasClass(T,Q);};return B.Dom.getAncestorBy(R,S);},getAncestorByTagName:function(R,Q){R=B.Dom.get(R);if(!R){return null;}var S=function(T){return T.tagName&&T.tagName.toUpperCase()==Q.toUpperCase();};return B.Dom.getAncestorBy(R,S);},getPreviousSiblingBy:function(Q,R){while(Q){Q=Q.previousSibling;if(D(Q,R)){return Q;}}return null;},getPreviousSibling:function(Q){Q=B.Dom.get(Q);if(!Q){return null;}return B.Dom.getPreviousSiblingBy(Q);},getNextSiblingBy:function(Q,R){while(Q){Q=Q.nextSibling;if(D(Q,R)){return Q;}}return null;},getNextSibling:function(Q){Q=B.Dom.get(Q);if(!Q){return null;}return B.Dom.getNextSiblingBy(Q);},getFirstChildBy:function(Q,S){var R=(D(Q.firstChild,S))?Q.firstChild:null;return R||B.Dom.getNextSiblingBy(Q.firstChild,S);},getFirstChild:function(Q,R){Q=B.Dom.get(Q);if(!Q){return null;}return B.Dom.getFirstChildBy(Q);},getLastChildBy:function(Q,S){if(!Q){return null;}var R=(D(Q.lastChild,S))?Q.lastChild:null;return R||B.Dom.getPreviousSiblingBy(Q.lastChild,S);},getLastChild:function(Q){Q=B.Dom.get(Q);return B.Dom.getLastChildBy(Q);},getChildrenBy:function(R,T){var S=B.Dom.getFirstChildBy(R,T);var Q=S?[S]:[];B.Dom.getNextSiblingBy(S,function(U){if(!T||T(U)){Q[Q.length]=U;}return false;});return Q;},getChildren:function(Q){Q=B.Dom.get(Q);if(!Q){}return B.Dom.getChildrenBy(Q);},getDocumentScrollLeft:function(Q){Q=Q||N;return Math.max(Q.documentElement.scrollLeft,Q.body.scrollLeft);},getDocumentScrollTop:function(Q){Q=Q||N;return Math.max(Q.documentElement.scrollTop,Q.body.scrollTop);},insertBefore:function(R,Q){R=B.Dom.get(R);Q=B.Dom.get(Q);if(!R||!Q||!Q.parentNode){return null;}return Q.parentNode.insertBefore(R,Q);},insertAfter:function(R,Q){R=B.Dom.get(R);Q=B.Dom.get(Q);if(!R||!Q||!Q.parentNode){return null;}if(Q.nextSibling){return Q.parentNode.insertBefore(R,Q.nextSibling);}else{return Q.parentNode.appendChild(R);}},getClientRegion:function(){var S=B.Dom.getDocumentScrollTop(),R=B.Dom.getDocumentScrollLeft(),T=B.Dom.getViewportWidth()+R,Q=B.Dom.getViewportHeight()+S;return new B.Region(S,T,Q,R);}};var I=function(){if(N.documentElement.getBoundingClientRect){return function(S){var T=S.getBoundingClientRect(),R=Math.round;var Q=S.ownerDocument;return[R(T.left+B.Dom.getDocumentScrollLeft(Q)),R(T.top+B.Dom.getDocumentScrollTop(Q))];};}else{return function(S){var T=[S.offsetLeft,S.offsetTop];var R=S.offsetParent;var Q=(M&&B.Dom.getStyle(S,"position")=="absolute"&&S.offsetParent==S.ownerDocument.body);if(R!=S){while(R){T[0]+=R.offsetLeft;T[1]+=R.offsetTop;if(!Q&&M&&B.Dom.getStyle(R,"position")=="absolute"){Q=true;}R=R.offsetParent;}}if(Q){T[0]-=S.ownerDocument.body.offsetLeft;T[1]-=S.ownerDocument.body.offsetTop;}R=S.parentNode;while(R.tagName&&!E.ROOT_TAG.test(R.tagName)){if(R.scrollTop||R.scrollLeft){T[0]-=R.scrollLeft;T[1]-=R.scrollTop;}R=R.parentNode;}return T;};}}();})();YAHOO.util.Region=function(C,D,A,B){this.top=C;this[1]=C;this.right=D;this.bottom=A;this.left=B;this[0]=B;};YAHOO.util.Region.prototype.contains=function(A){return(A.left>=this.left&&A.right<=this.right&&A.top>=this.top&&A.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(E){var C=Math.max(this.top,E.top);var D=Math.min(this.right,E.right);var A=Math.min(this.bottom,E.bottom);var B=Math.max(this.left,E.left);if(A>=C&&D>=B){return new YAHOO.util.Region(C,D,A,B);}else{return null;}};YAHOO.util.Region.prototype.union=function(E){var C=Math.min(this.top,E.top);var D=Math.max(this.right,E.right);var A=Math.max(this.bottom,E.bottom);var B=Math.min(this.left,E.left);return new YAHOO.util.Region(C,D,A,B);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}");};YAHOO.util.Region.getRegion=function(D){var F=YAHOO.util.Dom.getXY(D);var C=F[1];var E=F[0]+D.offsetWidth;var A=F[1]+D.offsetHeight;var B=F[0];return new YAHOO.util.Region(C,E,A,B);};YAHOO.util.Point=function(A,B){if(YAHOO.lang.isArray(A)){B=A[1];A=A[0];}this.x=this.right=this.left=this[0]=A;this.y=this.top=this.bottom=this[1]=B;};YAHOO.util.Point.prototype=new YAHOO.util.Region();YAHOO.register("dom",YAHOO.util.Dom,{version:"2.6.0",build:"1321"});YAHOO.util.CustomEvent=function(D,B,C,A){this.type=D;this.scope=B||window;this.silent=C;this.signature=A||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var E="_YUICEOnSubscribe";if(D!==E){this.subscribeEvent=new YAHOO.util.CustomEvent(E,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(B,C,A){if(!B){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(B,C,A);}this.subscribers.push(new YAHOO.util.Subscriber(B,C,A));},unsubscribe:function(D,F){if(!D){return this.unsubscribeAll();}var E=false;for(var B=0,A=this.subscribers.length;B<A;++B){var C=this.subscribers[B];if(C&&C.contains(D,F)){this._delete(B);E=true;}}return E;},fire:function(){this.lastError=null;var K=[],E=this.subscribers.length;if(!E&&this.silent){return true;}var I=[].slice.call(arguments,0),G=true,D,J=false;if(!this.silent){}var C=this.subscribers.slice(),A=YAHOO.util.Event.throwErrors;for(D=0;D<E;++D){var M=C[D];if(!M){J=true;}else{if(!this.silent){}var L=M.getScope(this.scope);if(this.signature==YAHOO.util.CustomEvent.FLAT){var B=null;if(I.length>0){B=I[0];}try{G=M.fn.call(L,B,M.obj);}catch(F){this.lastError=F;if(A){throw F;}}}else{try{G=M.fn.call(L,this.type,I,M.obj);}catch(H){this.lastError=H;if(A){throw H;}}}if(false===G){if(!this.silent){}break;}}}return(G!==false);},unsubscribeAll:function(){for(var A=this.subscribers.length-1;A>-1;A--){this._delete(A);}this.subscribers=[];return A;},_delete:function(A){var B=this.subscribers[A];if(B){delete B.fn;delete B.obj;}this.subscribers.splice(A,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"scope: "+this.scope;}};YAHOO.util.Subscriber=function(B,C,A){this.fn=B;this.obj=YAHOO.lang.isUndefined(C)?null:C;this.override=A;};YAHOO.util.Subscriber.prototype.getScope=function(A){if(this.override){if(this.override===true){return this.obj;}else{return this.override;}}return A;};YAHOO.util.Subscriber.prototype.contains=function(A,B){if(B){return(this.fn==A&&this.obj==B);}else{return(this.fn==A);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", override: "+(this.override||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var H=false;var I=[];var J=[];var G=[];var E=[];var C=0;var F=[];var B=[];var A=0;var D={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9};var K=YAHOO.env.ua.ie?"focusin":"focus";var L=YAHOO.env.ua.ie?"focusout":"blur";return{POLL_RETRYS:2000,POLL_INTERVAL:20,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:YAHOO.env.ua.ie,_interval:null,_dri:null,DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){var M=this;var N=function(){M._tryPreloadAttach();};this._interval=setInterval(N,this.POLL_INTERVAL);}},onAvailable:function(R,O,S,Q,P){var M=(YAHOO.lang.isString(R))?[R]:R;for(var N=0;N<M.length;N=N+1){F.push({id:M[N],fn:O,obj:S,override:Q,checkReady:P});}C=this.POLL_RETRYS;this.startInterval();},onContentReady:function(O,M,P,N){this.onAvailable(O,M,P,N,true);},onDOMReady:function(M,O,N){if(this.DOMReady){setTimeout(function(){var P=window;if(N){if(N===true){P=O;}else{P=N;}}M.call(P,"DOMReady",[],O);},0);}else{this.DOMReadyEvent.subscribe(M,O,N);}},_addListener:function(O,M,X,S,N,a){if(!X||!X.call){return false;}if(this._isValidCollection(O)){var Y=true;for(var T=0,V=O.length;T<V;++T){Y=this._addListener(O[T],M,X,S,N,a)&&Y;}return Y;}else{if(YAHOO.lang.isString(O)){var R=this.getEl(O);if(R){O=R;}else{this.onAvailable(O,function(){YAHOO.util.Event._addListener(O,M,X,S,N,a);});return true;}}}if(!O){return false;}if("unload"==M&&S!==this){J[J.length]=[O,M,X,S,N,a];return true;}var b=O;if(N){if(N===true){b=S;}else{b=N;}}var P=function(c){return X.call(b,YAHOO.util.Event.getEvent(c,O),S);};var Z=[O,M,X,P,b,S,N,a];var U=I.length;I[U]=Z;if(this.useLegacyEvent(O,M)){var Q=this.getLegacyIndex(O,M);if(Q==-1||O!=G[Q][0]){Q=G.length;B[O.id+M]=Q;G[Q]=[O,M,O["on"+M]];E[Q]=[];O["on"+M]=function(c){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(c),Q);};}E[Q].push(Z);}else{try{this._simpleAdd(O,M,P,a);}catch(W){this.lastError=W;this._removeListener(O,M,X,a);return false;}}return true;},addListener:function(O,Q,N,P,M){return this._addListener(O,Q,N,P,M,false);},addFocusListener:function(O,N,P,M){return this._addListener(O,K,N,P,M,true);},removeFocusListener:function(N,M){return this._removeListener(N,K,M,true);},addBlurListener:function(O,N,P,M){return this._addListener(O,L,N,P,M,true);},removeBlurListener:function(N,M){return this._removeListener(N,L,M,true);},fireLegacyEvent:function(Q,O){var S=true,M,U,T,V,R;U=E[O].slice();for(var N=0,P=U.length;N<P;++N){T=U[N];if(T&&T[this.WFN]){V=T[this.ADJ_SCOPE];R=T[this.WFN].call(V,Q);S=(S&&R);}}M=G[O];if(M&&M[2]){M[2](Q);}return S;},getLegacyIndex:function(N,O){var M=this.generateId(N)+O;if(typeof B[M]=="undefined"){return-1;}else{return B[M];}},useLegacyEvent:function(M,N){return(this.webkit&&this.webkit<419&&("click"==N||"dblclick"==N));},_removeListener:function(N,M,V,Y){var Q,T,X;if(typeof N=="string"){N=this.getEl(N);}else{if(this._isValidCollection(N)){var W=true;for(Q=N.length-1;Q>-1;Q--){W=(this._removeListener(N[Q],M,V,Y)&&W);}return W;}}if(!V||!V.call){return this.purgeElement(N,false,M);}if("unload"==M){for(Q=J.length-1;Q>-1;Q--){X=J[Q];if(X&&X[0]==N&&X[1]==M&&X[2]==V){J.splice(Q,1);return true;}}return false;}var R=null;var S=arguments[4];if("undefined"===typeof S){S=this._getCacheIndex(N,M,V);}if(S>=0){R=I[S];}if(!N||!R){return false;}if(this.useLegacyEvent(N,M)){var P=this.getLegacyIndex(N,M);var O=E[P];if(O){for(Q=0,T=O.length;Q<T;++Q){X=O[Q];if(X&&X[this.EL]==N&&X[this.TYPE]==M&&X[this.FN]==V){O.splice(Q,1);break;}}}}else{try{this._simpleRemove(N,M,R[this.WFN],Y);}catch(U){this.lastError=U;return false;}}delete I[S][this.WFN];delete I[S][this.FN];I.splice(S,1);return true;},removeListener:function(N,O,M){return this._removeListener(N,O,M,false);},getTarget:function(O,N){var M=O.target||O.srcElement;return this.resolveTextNode(M);},resolveTextNode:function(N){try{if(N&&3==N.nodeType){return N.parentNode;}}catch(M){}return N;},getPageX:function(N){var M=N.pageX;if(!M&&0!==M){M=N.clientX||0;if(this.isIE){M+=this._getScrollLeft();}}return M;},getPageY:function(M){var N=M.pageY;if(!N&&0!==N){N=M.clientY||0;if(this.isIE){N+=this._getScrollTop();}}return N;},getXY:function(M){return[this.getPageX(M),this.getPageY(M)];},getRelatedTarget:function(N){var M=N.relatedTarget;if(!M){if(N.type=="mouseout"){M=N.toElement;}else{if(N.type=="mouseover"){M=N.fromElement;}}}return this.resolveTextNode(M);},getTime:function(O){if(!O.time){var N=new Date().getTime();try{O.time=N;}catch(M){this.lastError=M;return N;}}return O.time;},stopEvent:function(M){this.stopPropagation(M);this.preventDefault(M);},stopPropagation:function(M){if(M.stopPropagation){M.stopPropagation();}else{M.cancelBubble=true;}},preventDefault:function(M){if(M.preventDefault){M.preventDefault();}else{M.returnValue=false;}},getEvent:function(O,M){var N=O||window.event;if(!N){var P=this.getEvent.caller;while(P){N=P.arguments[0];if(N&&Event==N.constructor){break;}P=P.caller;}}return N;},getCharCode:function(N){var M=N.keyCode||N.charCode||0;if(YAHOO.env.ua.webkit&&(M in D)){M=D[M];}return M;},_getCacheIndex:function(Q,R,P){for(var O=0,N=I.length;O<N;O=O+1){var M=I[O];if(M&&M[this.FN]==P&&M[this.EL]==Q&&M[this.TYPE]==R){return O;}}return-1;},generateId:function(M){var N=M.id;if(!N){N="yuievtautoid-"+A;++A;M.id=N;}return N;},_isValidCollection:function(N){try{return(N&&typeof N!=="string"&&N.length&&!N.tagName&&!N.alert&&typeof N[0]!=="undefined");}catch(M){return false;}},elCache:{},getEl:function(M){return(typeof M==="string")?document.getElementById(M):M;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",this),_load:function(N){if(!H){H=true;var M=YAHOO.util.Event;M._ready();M._tryPreloadAttach();}},_ready:function(N){var M=YAHOO.util.Event;if(!M.DOMReady){M.DOMReady=true;M.DOMReadyEvent.fire();M._simpleRemove(document,"DOMContentLoaded",M._ready);}},_tryPreloadAttach:function(){if(F.length===0){C=0;clearInterval(this._interval);this._interval=null;return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var S=!H;if(!S){S=(C>0&&F.length>0);}var R=[];var T=function(V,W){var U=V;if(W.override){if(W.override===true){U=W.obj;}else{U=W.override;}}W.fn.call(U,W.obj);};var N,M,Q,P,O=[];for(N=0,M=F.length;N<M;N=N+1){Q=F[N];if(Q){P=this.getEl(Q.id);if(P){if(Q.checkReady){if(H||P.nextSibling||!S){O.push(Q);F[N]=null;}}else{T(P,Q);F[N]=null;}}else{R.push(Q);}}}for(N=0,M=O.length;N<M;N=N+1){Q=O[N];T(this.getEl(Q.id),Q);}C--;if(S){for(N=F.length-1;N>-1;N--){Q=F[N];if(!Q||!Q.id){F.splice(N,1);}}this.startInterval();}else{clearInterval(this._interval);this._interval=null;}this.locked=false;},purgeElement:function(Q,R,T){var O=(YAHOO.lang.isString(Q))?this.getEl(Q):Q;var S=this.getListeners(O,T),P,M;if(S){for(P=S.length-1;P>-1;P--){var N=S[P];this._removeListener(O,N.type,N.fn,N.capture);}}if(R&&O&&O.childNodes){for(P=0,M=O.childNodes.length;P<M;++P){this.purgeElement(O.childNodes[P],R,T);}}},getListeners:function(O,M){var R=[],N;if(!M){N=[I,J];}else{if(M==="unload"){N=[J];}else{N=[I];}}var T=(YAHOO.lang.isString(O))?this.getEl(O):O;for(var Q=0;Q<N.length;Q=Q+1){var V=N[Q];if(V){for(var S=0,U=V.length;S<U;++S){var P=V[S];if(P&&P[this.EL]===T&&(!M||M===P[this.TYPE])){R.push({type:P[this.TYPE],fn:P[this.FN],obj:P[this.OBJ],adjust:P[this.OVERRIDE],scope:P[this.ADJ_SCOPE],capture:P[this.CAPTURE],index:S});}}}}return(R.length)?R:null;},_unload:function(S){var M=YAHOO.util.Event,P,O,N,R,Q,T=J.slice();for(P=0,R=J.length;P<R;++P){N=T[P];if(N){var U=window;if(N[M.ADJ_SCOPE]){if(N[M.ADJ_SCOPE]===true){U=N[M.UNLOAD_OBJ];}else{U=N[M.ADJ_SCOPE];}}N[M.FN].call(U,M.getEvent(S,N[M.EL]),N[M.UNLOAD_OBJ]);T[P]=null;N=null;U=null;}}J=null;if(I){for(O=I.length-1;O>-1;O--){N=I[O];if(N){M._removeListener(N[M.EL],N[M.TYPE],N[M.FN],N[M.CAPTURE],O);}}N=null;}G=null;M._simpleRemove(window,"unload",M._unload);},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var M=document.documentElement,N=document.body;if(M&&(M.scrollTop||M.scrollLeft)){return[M.scrollTop,M.scrollLeft];}else{if(N){return[N.scrollTop,N.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(O,P,N,M){O.addEventListener(P,N,(M));};}else{if(window.attachEvent){return function(O,P,N,M){O.attachEvent("on"+P,N);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(O,P,N,M){O.removeEventListener(P,N,(M));};}else{if(window.detachEvent){return function(N,O,M){N.detachEvent("on"+O,M);};}else{return function(){};}}}()};}();(function(){var EU=YAHOO.util.Event;EU.on=EU.addListener;EU.onFocus=EU.addFocusListener;EU.onBlur=EU.addBlurListener;if(EU.isIE){YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var n=document.createElement("p");EU._dri=setInterval(function(){try{n.doScroll("left");clearInterval(EU._dri);EU._dri=null;EU._ready();n=null;}catch(ex){}},EU.POLL_INTERVAL);}else{if(EU.webkit&&EU.webkit<525){EU._dri=setInterval(function(){var rs=document.readyState;if("loaded"==rs||"complete"==rs){clearInterval(EU._dri);EU._dri=null;EU._ready();}},EU.POLL_INTERVAL);}else{EU._simpleAdd(document,"DOMContentLoaded",EU._ready);}}EU._simpleAdd(window,"load",EU._load);EU._simpleAdd(window,"unload",EU._unload);EU._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(A,C,F,E){this.__yui_events=this.__yui_events||{};var D=this.__yui_events[A];if(D){D.subscribe(C,F,E);}else{this.__yui_subscribers=this.__yui_subscribers||{};var B=this.__yui_subscribers;if(!B[A]){B[A]=[];}B[A].push({fn:C,obj:F,override:E});}},unsubscribe:function(C,E,G){this.__yui_events=this.__yui_events||{};var A=this.__yui_events;if(C){var F=A[C];if(F){return F.unsubscribe(E,G);}}else{var B=true;for(var D in A){if(YAHOO.lang.hasOwnProperty(A,D)){B=B&&A[D].unsubscribe(E,G);}}return B;}return false;},unsubscribeAll:function(A){return this.unsubscribe(A);},createEvent:function(G,D){this.__yui_events=this.__yui_events||{};var A=D||{};var I=this.__yui_events;if(I[G]){}else{var H=A.scope||this;var E=(A.silent);var B=new YAHOO.util.CustomEvent(G,H,E,YAHOO.util.CustomEvent.FLAT);I[G]=B;if(A.onSubscribeCallback){B.subscribeEvent.subscribe(A.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var F=this.__yui_subscribers[G];if(F){for(var C=0;C<F.length;++C){B.subscribe(F[C].fn,F[C].obj,F[C].override);}}}return I[G];},fireEvent:function(E,D,A,C){this.__yui_events=this.__yui_events||{};var G=this.__yui_events[E];if(!G){return null;}var B=[];for(var F=1;F<arguments.length;++F){B.push(arguments[F]);}return G.fire.apply(G,B);},hasEvent:function(A){if(this.__yui_events){if(this.__yui_events[A]){return true;}}return false;}};YAHOO.util.KeyListener=function(A,F,B,C){if(!A){}else{if(!F){}else{if(!B){}}}if(!C){C=YAHOO.util.KeyListener.KEYDOWN;}var D=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(typeof A=="string"){A=document.getElementById(A);}if(typeof B=="function"){D.subscribe(B);}else{D.subscribe(B.fn,B.scope,B.correctScope);}function E(J,I){if(!F.shift){F.shift=false;}if(!F.alt){F.alt=false;}if(!F.ctrl){F.ctrl=false;}if(J.shiftKey==F.shift&&J.altKey==F.alt&&J.ctrlKey==F.ctrl){var G;if(F.keys instanceof Array){for(var H=0;H<F.keys.length;H++){G=F.keys[H];if(G==J.charCode){D.fire(J.charCode,J);break;}else{if(G==J.keyCode){D.fire(J.keyCode,J);break;}}}}else{G=F.keys;if(G==J.charCode){D.fire(J.charCode,J);}else{if(G==J.keyCode){D.fire(J.keyCode,J);}}}}}this.enable=function(){if(!this.enabled){YAHOO.util.Event.addListener(A,C,E);this.enabledEvent.fire(F);}this.enabled=true;};this.disable=function(){if(this.enabled){YAHOO.util.Event.removeListener(A,C,E);this.disabledEvent.fire(F);}this.enabled=false;};this.toString=function(){return"KeyListener ["+F.keys+"] "+A.tagName+(A.id?"["+A.id+"]":"");};};YAHOO.util.KeyListener.KEYDOWN="keydown";YAHOO.util.KeyListener.KEYUP="keyup";YAHOO.util.KeyListener.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};YAHOO.register("event",YAHOO.util.Event,{version:"2.6.0",build:"1321"});YAHOO.register("yuiloader-dom-event",YAHOO,{version:"2.6.0",build:"1321"});

if(!Array.prototype.indexOf){Array.prototype.indexOf=function(C,B){if(B==null){B=0}else{if(B<0){B=Math.max(0,this.length+B)}}for(var A=B;A<this.length;A++){if(this[A]===C){return A}}return-1}}if(!Array.prototype.lastIndexOf){Array.prototype.lastIndexOf=function(C,B){if(B==null){B=this.length-1}else{if(B<0){B=Math.max(0,this.length+B)}}for(var A=B;A>=0;A--){if(this[A]===C){return A}}return-1}}if(!Array.prototype.forEach){Array.prototype.forEach=function(C,D){var A=this.length;for(var B=0;B<A;B++){C.call(D,this[B],B,this)}}}if(!Array.prototype.filter){Array.prototype.filter=function(D,E){var A=this.length;var C=[];for(var B=0;B<A;B++){if(D.call(E,this[B],B,this)){C.push(this[B])}}return C}}if(!Array.prototype.map){Array.prototype.map=function(D,E){var A=this.length;var C=[];for(var B=0;B<A;B++){C.push(D.call(E,this[B],B,this))}return C}}if(!Array.prototype.some){Array.prototype.some=function(C,D){var A=this.length;for(var B=0;B<A;B++){if(C.call(D,this[B],B,this)){return true}}return false}}if(!Array.prototype.every){Array.prototype.every=function(C,D){var A=this.length;for(var B=0;B<A;B++){if(!C.call(D,this[B],B,this)){return false}}return true}}Array.prototype.contains=function(A){return this.indexOf(A)!=-1};Array.prototype.copy=function(A){return this.concat()};Array.prototype.insertAt=function(B,A){this.splice(A,0,B)};Array.prototype.insertBefore=function(C,B){var A=this.indexOf(B);if(A==-1){this.push(C)}else{this.splice(A,0,C)}};Array.prototype.removeAt=function(A){this.splice(A,1)};Array.prototype.remove=function(B){var A=this.indexOf(B);if(A!=-1){this.splice(A,1)}};if(!String.prototype.toQueryParams){String.prototype.toQueryParams=function(){var F={};var G=this.split("&");var D=/([^=]*)=(.*)/;for(var B=0;B<G.length;B++){var A=D.exec(G[B]);if(!A){continue}var C=decodeURIComponent(A[1]);var E=A[2]?decodeURIComponent(A[2]):undefined;if(F[C]!==undefined){if(F[C].constructor!=Array){F[C]=[F[C]]}if(E){F[C].push(E)}}else{F[C]=E}}return F}}if(!String.prototype.trim){String.prototype.trim=function(){var A=/^\s+|\s+$/g;return function(){return this.replace(A,"")}}()}if(!String.prototype.replaceAll){String.prototype.replaceAll=function(B,A){return this.replace(new RegExp(B,"gm"),A)}}Math.randomInt=function(A){return Math.floor(Math.random()*(A+1))};$D=YAHOO.util.Dom;$E=YAHOO.util.Event;$=$D.get;TB={};TB.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C<A.length;C=C+1){D=A[C].split(".");E=TB;for(B=(D[0]=="TB")?1:0;B<D.length;B=B+1){E[D[B]]=E[D[B]]||{};E=E[D[B]]}}return E};TB.namespace("env");TB.env={hostname:"taobao.com",debug:false,lang:"zh-cn"};TB.namespace("locale");TB.locale={Messages:{},getMessage:function(A){return TB.locale.Messages[A]||A},setMessage:function(A,B){TB.locale.Messages[A]=B}};$M=TB.locale.getMessage;TB.trace=function(A){if(!TB.env.debug){return}if(window.console){window.console.debug(A)}else{alert(A)}};TB.init=function(){this.namespace("widget","dom","bom","util","form","anim");if(location.hostname.indexOf("taobao.com")==-1){TB.env.hostname=location.hostname;TB.env.debug=true}var A=document.getElementsByTagName("script");var C=/tbra(?:[\w\.\-]*?)\.js(?:$|\?(.*))/;var E;for(var B=0;B<A.length;++B){if(E=C.exec(A[B].src)){TB.env["path"]=A[B].src.substring(0,E.index);if(E[1]){var D=E[1].toQueryParams();for(n in D){if(n=="t"||n=="timestamp"){TB.env["timestamp"]=parseInt(D[n]);continue}TB.env[n]=D[n]}}}}
TB.locale.Messages={loading:"Loading...",pleaseWait:"Please waiting...",ajaxError:"System Error",prevPageText:"Next Page",nextPageText:"Previous Page",year:"year",month:"month",day:"day",hour:"hour",minute:"minute",second:"second",timeoutText:"Timeout"}};TB.init();TB.common={trim:function(A){return A.replace(/(^\s*)|(\s*$)/g,"")},escapeHTML:function(B){var C=document.createElement("div");var A=document.createTextNode(B);C.appendChild(A);return C.innerHTML},unescapeHTML:function(A){var B=document.createElement("div");B.innerHTML=A.replace(/<\/?[^>]+>/gi,"");return B.childNodes[0]?B.childNodes[0].nodeValue:""},stripTags:function(A){return A.replace(/<\/?[^>]+>/gi,"")},toArray:function(B,D){var C=[];for(var A=D||0;A<B.length;A++){C[C.length]=B[A]}return C},applyIf:function(C,A){if(C&&A&&typeof A=="object"){for(var B in A){if(!YAHOO.lang.hasOwnProperty(C,B)){C[B]=A[B]}}}return C},apply:function(C,A){if(C&&A&&typeof A=="object"){for(var B in A){C[B]=A[B]}}return C},formatMessage:function(D,A,B){var C=/\{([\w-]+)?\}/g;return function(G,E,F){return G.replace(C,function(H,I){return F?F(E[I],I):E[I]})}}(),parseUri:(function(){var B=["source","prePath","scheme","username","password","host","port","path","dir","file","query","fragment"];var A=/^((?:([^:\/?#.]+):)?(?:\/\/)?(?:([^:@]*):?([^:@]*)?@)?([^:\/?#]*)(?::(\d*))?)((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?/;return function(F){var E={};var C=A.exec(F);for(var D=0;D<C.length;++D){E[B[D]]=(C[D]?C[D]:"")}return E}})()};TB.applyIf=TB.common.applyIf;TB.apply=TB.common.apply;(function(){var E=navigator.userAgent.toLowerCase();var B=E.indexOf("opera")!=-1,G=E.indexOf("safari")!=-1,A=!B&&!G&&E.indexOf("gecko")>-1,C=!B&&E.indexOf("msie")!=-1,F=!B&&E.indexOf("msie 6")!=-1,D=!B&&E.indexOf("msie 7")!=-1;TB.bom={isOpera:B,isSafari:G,isGecko:A,isIE:C,isIE6:F,isIE7:D,getCookie:function(H){var I=document.cookie.match("(?:^|;)\\s*"+H+"=([^;]*)");return I?unescape(I[1]):""},setCookie:function(J,L,H,K,M){L=escape(L);L+=(K)?"; domain="+K:"";L+=(M)?"; path="+M:"";if(H){var I=new Date();I.setTime(I.getTime()+(H*86400000));L+="; expires="+I.toGMTString()}document.cookie=J+"="+L},removeCookie:function(H){this.setCookie(H,"",-1)},pickDocumentDomain:function(){var K=arguments[1]||location.hostname;var J=K.split("."),H=J.length;var I=arguments[0]||(H<3?0:1);if(I>=H||H-I<2){I=H-2}return J.slice(I).join(".")},addBookmark:function(I,H){if(window.sidebar){window.sidebar.addPanel(I,H,"")}else{if(document.external){window.external.AddFavorite(H,I)}else{}}}}})();TB.dom={insertAfter:function(B,A){return $D.insertAfter(B,A)},getAncestorByTagName:function(B,A){return $D.getAncestorByTagName(B,A)},getAncestorByClassName:function(B,A){return $D.getAncestorByClassName(B,A)},getNextSibling:function(A){return $D.getNextSibling(A)},getPreviousSibling:function(A){return $D.getPreviousSibling(A)},getFieldLabelHtml:function(E,D){var B=$(E),F=(D||B.parentNode).getElementsByTagName("label");for(var C=0;C<F.length;C++){var A=F[C].htmlFor||F[C].getAttribute("for");if(A==B.id){return F[C].innerHTML}}return null},getIframeDocument:function(B){var A=$(B);return A.contentWindow?A.contentWindow.document:A.contentDocument},setFormAction:function(E,C){E=$(E);var B=E.elements["action"];var D;if(B){var A=E.removeChild(B);D=function(){E.appendChild(A)}}E.action=C;if(D){D()}return true},addCSS:function(A,C){C=C||document;var B=C.createElement("style");B.type="text/css";if(B.styleSheet){B.styleSheet.cssText=A}else{B.appendChild(C.createTextNode(A))}C.getElementsByTagName("head")[0].appendChild(B)},getScriptParams:function(C){var F=/\?(.*?)($|\.js)/;var B;if(YAHOO.lang.isObject(C)&&C.tagName&&C.tagName.toLowerCase()=="script"){if(C.src&&(B=C.src.match(F))){console.debug(B);return B[1].toQueryParams()}}else{if(YAHOO.lang.isString(C)){C=new RegExp(C,"i")}var A=document.getElementsByTagName("script");var G,E;for(var D=0;D<A.length;++D){E=A[D].src;if(E&&C.test(E)&&(B=E.match(F))){return B[1].toQueryParams()}}}}};TB.anim.Highlight=function(B,A){if(!B){return}this.init(B,A)};TB.anim.Highlight.defConfig={startColor:"#ffff99",duration:0.5,keepBackgroundImage:true};TB.anim.Highlight.prototype.init=function(E,D){var G=YAHOO.util;D=TB.applyIf(D||{},TB.anim.Highlight.defConfig);var A={backgroundColor:{from:D.startColor}};var F=new G.ColorAnim(E,A,D.duration);var B=F.getAttribute("backgroundColor");F.attributes["backgroundColor"]["to"]=B;if(D.keepBackgroundImage){var C=$D.getStyle(E,"background-image");F.onComplete.subscribe(function(){$D.setStyle(E,"background-image",C)})}this.onComplete=F.onComplete;this.animate=function(){$D.setStyle(E,"background-image","none");F.animate()}};TB.widget.InputHint=new function(){var B={hintMessage:"",hintClass:"InputHint",appearOnce:false};var D=/^\s*$/;var A=function(E,F){F.disappear()};var C=function(E,F){F.appear()};this.decorate=function(E,F){E=$(E);F=TB.applyIf(F||{},B);var H=F.hintMessage||E.title;var G={};G.disappear=function(){if(H==E.value){E.value="";$D.removeClass(E,F.hintClass)}};G.appear=function(){if(D.test(E.value)||H==E.value){E.value=H;$D.addClass(E,F.hintClass)}};E.setAttribute("title",H);$E.on(E,"focus",A,G);$E.on(E,"drop",A,G);if(!F.appearOnce){$E.on(E,"blur",C,G)}G.appear();return G}};TB.widget.SimplePopup=new function(){var F=YAHOO.util;var E={position:"right",autoFit:true,eventType:"mouse",delay:0.1,disableClick:true,width:200,height:200};var D=function(H){var I=$E.getTarget(H);if(D._target==I){this.popup.style.display=="block"?this.hide():this.show()}else{this.show()}$E.preventDefault(H);D._target=I};var G=function(I){clearTimeout(this._popupHideTimeId);var H=this;this._popupShowTimeId=setTimeout(function(){H.show()},this.config.delay*1000);if(this.config.disableClick&&!this.trigger.onclick){this.trigger.onclick=function(J){$E.preventDefault($E.getEvent(J))}}};var C=function(H){clearTimeout(this._popupShowTimeId);if(!$D.isAncestor(this.popup,$E.getRelatedTarget(H))){this.delayHide()}$E.preventDefault(H)};var B=function(H){var I=this.currentHandle?this.currentHandle:this;clearTimeout(I._popupHideTimeId)};var A=function(H){var I=this.currentHandle?this.currentHandle:this;if(!$D.isAncestor(I.popup,$E.getRelatedTarget(H))){I.delayHide()}};this.decorate=function(J,H,K){if(YAHOO.lang.isArray(J)||(YAHOO.lang.isObject(J)&&J.length)){K.shareSinglePopup=true;var M={};M._handles=[];for(var L=0;L<J.length;L++){var N=this.decorate(J[L],H,K);N._beforeShow=function(){M.currentHandle=this;return true};M._handles[L]=N}if(K.eventType=="mouse"){$E.on(H,"mouseover",B,M,true);$E.on(H,"mouseout",A,M,true)}return M}J=$(J);H=$(H);if(!J||!H){return}K=TB.applyIf(K||{},E);var P={};P._popupShowTimeId=null;P._popupHideTimeId=null;P._beforeShow=function(){return true};var I=new F.CustomEvent("onShow",P,false,F.CustomEvent.FLAT);if(K.onShow){I.subscribe(K.onShow)}var O=new F.CustomEvent("onHide",P,false,F.CustomEvent.FLAT);if(K.onHide){O.subscribe(K.onHide)}if(K.eventType=="mouse"){$E.on(J,"mouseover",G,P,true);$E.on(J,"mouseout",C,P,true);if(!K.shareSinglePopup){$E.on(H,"mouseover",B,P,true);$E.on(H,"mouseout",A,P,true)}}else{if(K.eventType=="click"){$E.on(J,"click",D,P,true)}}TB.apply(P,{popup:H,trigger:J,config:K,show:function(){if(!this._beforeShow()){return}var Y=$D.getXY(this.trigger);if(YAHOO.lang.isArray(this.config.offset)){Y[0]+=parseInt(this.config.offset[0]);Y[1]+=parseInt(this.config.offset[1])}var V=this.trigger.offsetWidth,R=this.trigger.offsetHeight;var Z=K.width,W=K.height;var Q=$D.getViewportWidth(),X=$D.getViewportHeight();var T=Math.max(document.documentElement.scrollLeft,document.body.scrollLeft);var b=Math.max(document.documentElement.scrollTop,document.body.scrollTop);var S=Y[0],a=Y[1];if(K.position=="left"){S=Y[0]-Z}else{if(K.position=="right"){S=Y[0]+V}else{if(K.position=="bottom"){a=a+R}else{if(K.position=="top"){a=a-W;if(a<0){a=0}}}}}if(this.config.autoFit){if(a-b+W>X){a=X-W+b-2;if(a<0){a=0}}}this.popup.style.position="absolute";this.popup.style.top=a+"px";this.popup.style.left=S+"px";if(this.config.effect){if(this.config.effect=="fade"){$D.setStyle(this.popup,"opacity",0);this.popup.style.display="block";var U=new F.Anim(this.popup,{opacity:{to:1}},0.4);U.animate()}}else{this.popup.style.display="block"}I.fire()},hide:function(){$D.setStyle(this.popup,"display","none");O.fire()},delayHide:function(){var Q=this;this._popupHideTimeId=setTimeout(function(){Q.hide()},this.config.delay*1000)}});$D.setStyle(H,"display","none");return P}};TB.widget.SimpleRating=new function(){var defConfig={rateUrl:"",rateParams:"",scoreParamName:"score",topScore:5,currentRatingClass:"current-rating"};var rateHandler=function(ev,handle){$E.stopEvent(ev);var aEl=$E.getTarget(ev);var score=parseInt(aEl.innerHTML);try{aEl.blur()}catch(e){}handle.rate(score)};var updateCurrentRating=function(currentRatingLi,avg,config){if(currentRatingLi){currentRatingLi.innerHTML=avg}$D.setStyle(currentRatingLi,"width",avg*100/config.topScore+"%")};this.decorate=function(ratingContainer,config){ratingContainer=$(ratingContainer);config=TB.applyIf(config||{},defConfig);var currentRatingLi=$D.getElementsByClassName(config.currentRatingClass,"li",ratingContainer)[0];var onRateEvent=new YAHOO.util.CustomEvent("onRate",null,false,YAHOO.util.CustomEvent.FLAT);if(config.onRate){onRateEvent.subscribe(config.onRate)}var handle={};handle.init=function(avg){updateCurrentRating(currentRatingLi,avg,config)};handle.update=function(ret){if(ret&&ret.Average&&currentRatingLi){updateCurrentRating(currentRatingLi,ret.Average,config)}$E.purgeElement(ratingContainer,true,"click");for(var lis=ratingContainer.getElementsByTagName("li"),i=lis.length-1;i>0;i--){ratingContainer.removeChild(lis[i])}onRateEvent.fire(ret)};handle.rate=function(score){var indicator=TB.util.Indicator.attach(ratingContainer,{message:$M("pleaseWait")});indicator.show();ratingContainer.style.display="none";var postData=config.scoreParamName+"="+score;if(config.rateParams){postData+="&"+config.rateParams}YAHOO.util.Connect.asyncRequest("POST",config.rateUrl,{success:function(req){indicator.hide();ratingContainer.style.display="";var ret=eval("("+req.responseText+")");if(ret.Error){alert(ret.Error.Message);return}else{handle.update(ret)}},failure:function(req){indicator.hide();ratingContainer.style.display="";TB.trace($M("ajaxError"))}},postData)};handle.onRate=function(callback){if(YAHOO.lang.isFunction(callback)){onRateEvent.subscribe(callback)}};var triggers=ratingContainer.getElementsByTagName("a");for(var i=0;i<triggers.length;i++){$E.on(triggers[i],"click",rateHandler,handle)}return handle}};TB.widget.SimpleScroll=new function(){var Y=YAHOO.util;var defConfig={delay:2,speed:20,startDelay:2,direction:"vertical",disableAutoPlay:false,distance:"auto",scrollItemCount:1};this.decorate=function(container,config){container=$(container);config=TB.applyIf(config||{},defConfig);var step=2;if(config.speed<20){step=5}if(config.lineHeight){config.distance=config.lineHeight}var scrollTimeId=null,startTimeId=null,startDelayTimeId=null;var isHorizontal=(config.direction.toLowerCase()=="horizontal")||(config.direction.toLowerCase()=="h");var handle={};handle._distance=0;handle.scrollable=true;handle.distance=config.distance;handle._distance=0;handle.suspend=false;handle.paused=false;var _onScrollEvent=new Y.CustomEvent("_onScroll",handle,false,Y.CustomEvent.FLAT);_onScrollEvent.subscribe(function(){var curLi=container.getElementsByTagName("li")[0];if(!curLi){this.scrollable=false;return}this.distance=(config.distance=="auto")?curLi[isHorizontal?"offsetWidth":"offsetHeight"]:config.distance;with(container){if(isHorizontal){this.scrollable=(scrollWidth-scrollLeft-offsetWidth)>=this.distance}else{this.scrollable=(scrollHeight-scrollTop-offsetHeight)>=this.distance}}});var onScrollEvent=new Y.CustomEvent("onScroll",handle,false,Y.CustomEvent.FLAT);if(config.onScroll){onScrollEvent.subscribe(config.onScroll)}else{onScrollEvent.subscribe(function(){for(var i=0;i<config.scrollItemCount;i++){container.appendChild(container.getElementsByTagName("li")[0])}container[isHorizontal?"scrollLeft":"scrollTop"]=0})}var scroll=function(){if(handle.suspend){return}handle._distance+=step;var _d;if((_d=handle._distance%handle.distance)<step){container[isHorizontal?"scrollLeft":"scrollTop"]+=(step-_d);clearInterval(scrollTimeId);onScrollEvent.fire();_onScrollEvent.fire();startTimeId=null;if(handle.scrollable&&!handle.paused){handle.play()}}else{container[isHorizontal?"scrollLeft":"scrollTop"]+=step}};var start=function(){if(handle.paused){return}handle._distance=0;scrollTimeId=setInterval(scroll,config.speed)};$E.on(container,"mouseover",function(){handle.suspend=true});$E.on(container,"mouseout",function(){handle.suspend=false});TB.apply(handle,{subscribeOnScroll:function(func,override){if(override===true&&onScrollEvent.subscribers.length>0){onScrollEvent.unsubscribeAll()}onScrollEvent.subscribe(func)},pause:function(){this.paused=true;clearTimeout(startTimeId);startTimeId=null},play:function(){this.paused=false;if(startDelayTimeId){clearTimeout(startDelayTimeId)}if(!startTimeId){startTimeId=setTimeout(start,config.delay*1000)}}});handle.onScroll=handle.subscribeOnScroll;_onScrollEvent.fire();if(!config.disableAutoPlay){startDelayTimeId=setTimeout(function(){handle.play()},config.startDelay*1000)}return handle}};(function(){var A=YAHOO.util;TB.widget.Slide=function(B,C){this.init(B,C)};TB.widget.Slide.defConfig={slidesClass:"Slides",triggersClass:"SlideTriggers",currentClass:"Current",eventType:"click",autoPlayTimeout:5,disableAutoPlay:false};TB.widget.Slide.prototype={init:function(B,C){this.container=$(B);this.config=TB.applyIf(C||{},TB.widget.Slide.defConfig);try{this.slidesUL=$D.getElementsByClassName(this.config.slidesClass,"ul",this.container)[0];this.slides=$D.getChildren(this.slidesUL);if(this.slides.length==0){throw new Error()}}catch(D){throw new Error("can't find slides!")}this.delayTimeId=null;this.autoPlayTimeId=null;this.curSlide=-1;this.sliding=false;this.pause=false;this.onSlide=new A.CustomEvent("onSlide",this,false,A.CustomEvent.FLAT);if(YAHOO.lang.isFunction(this.config.onSlide)){this.onSlide.subscribe(this.config.onSlide,this,true)}this.initSlides();this.initTriggers();if(this.slides.length>0){this.play(1)}if(!this.config.disableAutoPlay){this.autoPlay()}if(YAHOO.lang.isFunction(this.config.onInit)){this.config.onInit.call(this)}},initTriggers:function(){var D=document.createElement("ul");this.container.appendChild(D);for(var C=0;C<this.slides.length;C++){var B=document.createElement("li");B.innerHTML=C+1;D.appendChild(B)}D.className=this.config.triggersClass;this.triggersUL=D;if(this.config.eventType=="mouse"){$E.on(this.triggersUL,"mouseover",this.mouseHandler,this,true);$E.on(this.triggersUL,"mouseout",function(E){clearTimeout(this.delayTimeId);this.pause=false},this,true)}else{$E.on(this.triggersUL,"click",this.clickHandler,this,true)}},initSlides:function(){$E.on(this.slides,"mouseover",function(){this.pause=true},this,true);$E.on(this.slides,"mouseout",function(){this.pause=false},this,true);$D.setStyle(this.slides,"display","none")},clickHandler:function(D){var C=$E.getTarget(D);var B=parseInt(TB.common.stripTags(C.innerHTML));while(C!=this.container){if(C.nodeName.toUpperCase()=="LI"){if(!this.sliding){this.play(B,true)}break}else{C=C.parentNode}}},mouseHandler:function(E){var D=$E.getTarget(E);var B=parseInt(TB.common.stripTags(D.innerHTML));while(D!=this.container){if(D.nodeName.toUpperCase()=="LI"){var C=this;this.delayTimeId=setTimeout(function(){C.play(B,true);C.pause=true},(C.sliding?0.5:0.1)*1000);break}else{D=D.parentNode}}},play:function(E,C){E=E-1;if(E==this.curSlide){return}var B=this.curSlide>=0?this.curSlide:0;if(C&&this.autoPlayTimeId){clearInterval(this.autoPlayTimeId)}var D=this.triggersUL.getElementsByTagName("li");D[B].className="";D[E].className=this.config.currentClass;this.slide(E);this.curSlide=E;if(C&&!this.config.disableAutoPlay){this.autoPlay()}},slide:function(C){var B=this.curSlide>=0?this.curSlide:0;this.sliding=true;$D.setStyle(this.slides[B],"display","none");$D.setStyle(this.slides[C],"display","block");this.sliding=false;this.onSlide.fire(C)},autoPlay:function(){var B=this;var C=function(){if(!B.pause&&!B.sliding){var D=(B.curSlide+1)%B.slides.length+1;B.play(D,false)}};this.autoPlayTimeId=setInterval(C,this.config.autoPlayTimeout*1000)}};TB.widget.ScrollSlide=function(B,C){this.init(B,C)};YAHOO.extend(TB.widget.ScrollSlide,TB.widget.Slide,{initSlides:function(){TB.widget.ScrollSlide.superclass.initSlides.call(this);$D.setStyle(this.slides,"display","")},slide:function(E){var B=this.curSlide>=0?this.curSlide:0;var C={scroll:{by:[0,this.slidesUL.offsetHeight*(E-B)]}};var D=new A.Scroll(this.slidesUL,C,0.5,A.Easing.easeOutStrong);D.onComplete.subscribe(function(){this.sliding=false;this.onSlide.fire(E)},this,true);D.animate();this.sliding=true}});TB.widget.FadeSlide=function(B,C){this.init(B,C)};YAHOO.extend(TB.widget.FadeSlide,TB.widget.Slide,{initSlides:function(){TB.widget.FadeSlide.superclass.initSlides.call(this);$D.setStyle(this.slides,"position","absolute");$D.setStyle(this.slides,"top",this.config.slideOffsetY||0);$D.setStyle(this.slides,"left",this.config.slideOffsetX||0);$D.setStyle(this.slides,"z-index",1)},slide:function(D){if(this.curSlide==-1){$D.setStyle(this.slides[D],"display","block")}else{var B=this.slides[this.curSlide];$D.setStyle(B,"display","block");$D.setStyle(B,"z-index",10);var C=new A.Anim(B,{opacity:{to:0}},0.5,A.Easing.easeNone);C.onComplete.subscribe(function(){$D.setStyle(B,"z-index",1);$D.setStyle(B,"display","none");$D.setStyle(B,"opacity",1);this.sliding=false;this.onSlide.fire(D)},this,true);$D.setStyle(this.slides[D],"display","block");C.animate();this.sliding=true}}})})();TB.widget.SimpleSlide=new function(){this.decorate=function(A,B){if(!A){return}B=B||{};if(B.effect=="scroll"){if(TB.bom.isGecko){if(YAHOO.util.Dom.get(A).getElementsByTagName("iframe").length>0){new TB.widget.Slide(A,B);return}}new TB.widget.ScrollSlide(A,B)}else{if(B.effect=="fade"){new TB.widget.FadeSlide(A,B)}else{new TB.widget.Slide(A,B)}}}};TB.widget.SimpleTab=new function(){var C=YAHOO.util;var A={eventType:"click",currentClass:"Current",tabClass:"",autoSwitchToFirst:true,stopEvent:true,delay:0.1};var B=function(F){var D=[];if(!F){return D}for(var E=0,G=F.childNodes;E<G.length;E++){if(G[E].nodeType==1){D[D.length]=G[E]}}return D};this.decorate=function(D,G){D=$(D);G=TB.applyIf(G||{},A);var K={};var L=B(D);var F=L.shift(0);var E=F.getElementsByTagName("li");var I,N;if(G.tabClass){I=$D.getElementsByClassName(G.tabClass,"*",D)}else{I=TB.common.toArray(F.getElementsByTagName("a"))}var O=new C.CustomEvent("onSwitch",null,false,C.CustomEvent.FLAT);if(G.onSwitch){O.subscribe(G.onSwitch)}var J=function(Q){if(N){M()}var P=I.indexOf(this);K.switchTab(P);if(G.stopEvent){try{$E.stopEvent(Q)}catch(R){}}return!G.stopEvent};var H=function(P){var Q=this;N=setTimeout(function(){J.call(Q,P)},G.delay*1000);if(G.stopEvent){$E.stopEvent(P)}return!G.stopEvent};var M=function(){clearTimeout(N)};if(G.eventType=="mouse"){$E.on(I,"focus",J);$E.on(I,"mouseover",G.delay?H:J);$E.on(I,"mouseout",M)}else{$E.on(I,"click",J)}TB.apply(K,{switchTab:function(P){$D.setStyle(L,"display","none");$D.removeClass(E,G.currentClass);$D.addClass(E[P],G.currentClass);$D.setStyle(L[P],"display","block");O.fire(P)},subscribeOnSwitch:function(P){O.subscribe(P)}});K.onSwitch=K.subscribeOnSwitch;$D.setStyle(L,"display","none");if(G.autoSwitchToFirst){K.switchTab(0)}return K}};TB.util.CountdownTimer=new function(){var F=YAHOO.util;var E=60;var D=E*60;var G=D*24;var C={formatStyle:"short",formatPattern:"",hideZero:true,timeoutText:"timeoutText",updatable:true};var A=function(H){return((H<10)?"0":"")+H};var B=function(H){return function(J,I){switch(I){case"d":return parseInt(H/G);case"dd":return A(parseInt(H/G));case"hh":return A(parseInt(H%G/D));case"h":return parseInt(H%G/D);case"mm":return A(parseInt(H%G%D/E));case"m":return parseInt(H%G%D/E);case"ss":return A(parseInt(H%G%D%E));case"s":return parseInt(H%G%D%E)}}};this.attach=function(H,I,K){H=$(H);I=parseInt(I);K=TB.applyIf(K||{},C);var N={};var O=new F.CustomEvent("onStart",null,false,F.CustomEvent.FLAT);if(K.onStart){O.subscribe(K.onStart)}var J=new F.CustomEvent("onEnd",null,false,F.CustomEvent.FLAT);if(K.onEnd){J.subscribe(K.onEnd)}var L=parseInt(new Date().getTime()/1000);var M=L+I;var P=function(){N.update()};N.update=function(){var T=K.formatPattern,R={},S=1;if(K.formatStyle=="long"){T="{d}"+$M("day")+"{hh}"+$M("hour")+"{mm}"+$M("minute")+"{ss}"+$M("second")}var Q=M-parseInt(new Date().getTime()/1000);if(Q<=0){H.innerHTML=$M(K.timeoutText);J.fire();return}else{if(Q>G){if(K.formatStyle=="short"){T="{d}"+$M("day")+"{hh}"+$M("hour");S=Math.floor(Q%G%D)||D}}else{if(Q>D){if(K.formatStyle=="short"){T="{hh}"+$M("hour")+"{mm}"+$M("minute");S=Math.floor(Q%D%E)||E}else{if(K.formatStyle=="long"&&K.hideZero){T="{hh}"+$M("hour")+"{mm}"+$M("minute")+"{ss}"+$M("second")}}}else{if(Q>0){if(K.formatStyle=="short"||(K.formatStyle=="long"&&K.hideZero)){T="{mm}"+$M("minute")+"{ss}"+$M("second")}}}}}H.innerHTML=TB.common.formatMessage(T,R,B(Q));if(K.updatable&&S>0){setTimeout(P,S*1000)}};N.init=function(){this.update();O.fire()};N.init();return N}};TB.util.Indicator=new function(){var A={message:"loading",useShim:false,useIFrame:false,centerIndicator:true};var B=function(D,C){shim=document.createElement("div");shim.className="tb-indic-shim";$D.setStyle(shim,"display","none");D.parentNode.insertBefore(shim,D);if(C){var E=document.createElement("iframe");E.setAttribute("frameBorder",0);E.className="tb-indic-shim-iframe";D.parentNode.insertBefore(E,D)}return shim};this.attach=function(F,D){F=$(F);D=TB.applyIf(D||{},A);var C=document.createElement("div");C.className="tb-indic";$D.setStyle(C,"display","none");$D.setStyle(C,"position","static");C.innerHTML="<span>"+$M(D.message)+"</span>";if(D.useShim){var G=B(F,D.useIFrame);G.appendChild(C)}else{F.parentNode.insertBefore(C,F)}var E={};E.show=function(I){if(D.useShim){var H=$D.getRegion(F);var K=C.parentNode;$D.setStyle(K,"display","block");$D.setXY(K,[H[0],H[1]]);$D.setStyle(K,"width",(H.right-H.left)+"px");$D.setStyle(K,"height",(H.bottom-H.top)+"px");if(D.useIFrame){var J=K.nextSibling;$D.setStyle(J,"width",(H.right-H.left)+"px");$D.setStyle(J,"height",(H.bottom-H.top)+"px");$D.setStyle(J,"display","block")}$D.setStyle(C,"display","block");$D.setStyle(C,"position","absolute");if(D.centerIndicator){$D.setStyle(C,"top","50%");$D.setStyle(C,"left","50%");C.style.marginTop=-(C.offsetHeight/2)+"px";C.style.marginLeft=-(C.offsetWidth/2)+"px"}}else{$D.setStyle(C,"display","");if(I){$D.setStyle(C,"position","absolute");$D.setXY(C,I)}}};E.hide=function(){if(D.useShim){var I=C.parentNode;$D.setStyle(C,"display","none");$D.setStyle(I,"display","none");if(D.useIFrame){$D.setStyle(C.parentNode.nextSibling,"display","none")}try{if(D.useIFrame){I.parentNode.removeChild(I.nextSibling)}I.parentNode.removeChild(I)}catch(H){}}else{$D.setStyle(C,"display","none");try{C.parentNode.removeChild(C)}catch(H){}}};return E}};TB.util.Pagination=new function(){var PAGE_SEPARATOR="...";var defConfig={pageUrl:"",prevPageClass:"PrevPage",noPrevClass:"NoPrev",prevPageText:"prevPageText",nextPageClass:"NextPage",nextPageText:"nextPageText",noNextClass:"NoNext",currPageClass:"CurrPage",pageParamName:"page",appendParams:"",pageBarMode:"bound",showIndicator:true,cachePageData:false};var cancelHandler=function(ev){$E.stopEvent(ev)};var pageHandler=function(ev,args){$E.stopEvent(ev);var target=$E.getTarget(ev);args[1].gotoPage(args[0])};var buildBoundPageList=function(pageIndex,pageCount){var l=[];var leftStart=1;var leftEnd=2;var mStart=pageIndex-2;var mEnd=pageIndex+2;var rStart=pageCount-1;var rEnd=pageCount;if(mStart<=leftEnd){leftStart=0;leftEnd=0;mStart=1}if(mEnd>=rStart){rStart=0;rEnd=0;mEnd=pageCount}if(leftEnd>leftStart){for(var i=leftStart;i<=leftEnd;++i){l[l.length]=""+i}if((leftEnd+1)<mStart){l[l.length]=PAGE_SEPARATOR}}for(var i=mStart;i<=mEnd;++i){l[l.length]=""+i}if(rEnd>rStart){if((mEnd+1)<rStart){l[l.length]=PAGE_SEPARATOR}for(var i=rStart;i<=rEnd;++i){l[l.length]=""+i}}return l};var buildPageEntry=function(idx,config){var liEl=document.createElement("li");if(idx!=PAGE_SEPARATOR){$D.addClass(liEl,(idx=="prev")?config.prevPageClass:(idx=="next")?config.nextPageClass:"");var aEl=document.createElement("a");aEl.setAttribute("title",(idx=="prev")?$M(config.prevPageText):(idx=="next")?$M(config.nextPageText):""+idx);aEl.href=buildPageUrl(idx,config)+"&t="+new Date().getTime();aEl.innerHTML=(idx=="prev")?$M(config.prevPageText):(idx=="next")?$M(config.nextPageText):idx;liEl.appendChild(aEl)}else{liEl.innerHTML=PAGE_SEPARATOR}return liEl};var buildPageUrl=function(idx,config){var url=config.pageUrl+(config.pageUrl.lastIndexOf("?")!=-1?"&":"?")+config.pageParamName+"="+idx;if(config.appendParams){url+="&"+config.appendParams}return url};this.attach=function(pageBarContainer,pageDataContainer,config){pageBarContainer=$(pageBarContainer);pageDataContainer=$(pageDataContainer);config=TB.applyIf(config||{},defConfig);if(config.cachePageData){var pageDataCache={}}var ulEl=document.createElement("ul");pageBarContainer.appendChild(ulEl);var pageLoadEvent=new YAHOO.util.CustomEvent("pageLoad",null,false,YAHOO.util.CustomEvent.FLAT);var handle={};handle.rebuildPageBar=function(pageObj){if(!pageObj){return}this.pageIndex=parseInt(pageObj.PageIndex);this.totalCount=parseInt(pageObj.TotalCount);this.pageCount=parseInt(pageObj.PageCount);this.pageSize=parseInt(pageObj.PageSize);ulEl.innerHTML="";var list=this.repaginate();var prevLiEl=buildPageEntry("prev",config);if(!this.isPrevPageAvailable()){$D.addClass(prevLiEl,config.noPrevClass);$E.on(prevLiEl,"click",cancelHandler)}else{$E.on(prevLiEl,"click",pageHandler,[this.pageIndex-1,this])}ulEl.appendChild(prevLiEl);for(var i=0;i<list.length;i++){var liEl=buildPageEntry(list[i],config);if(list[i]==this.pageIndex){$D.addClass(liEl,config.currPageClass);$E.on(liEl,"click",cancelHandler)}else{$E.on(liEl,"click",pageHandler,[list[i],this])}ulEl.appendChild(liEl)}var nextLiEl=buildPageEntry("next",config);if(!this.isNextPageAvailable()){$D.addClass(nextLiEl,config.noNextClass);$E.on(nextLiEl,"click",cancelHandler)}else{$E.on(nextLiEl,"click",pageHandler,[this.pageIndex+1,this])}ulEl.appendChild(nextLiEl)};handle.repaginate=function(){var mode=config.pageBarMode;if(mode=="bound"){return buildBoundPageList(parseInt(this.pageIndex),parseInt(this.pageCount))}else{if(mode=="line"){var l=[];for(var i=1;i<=this.pageCount;i++){l.push(i)}return l}else{if(mode=="eye"){return[]}}}};handle.gotoPage=function(idx){this.disablePageBar();if(config.showIndicator){$D.setStyle(pageDataContainer,"display","none");var indicator=TB.util.Indicator.attach(pageDataContainer,{message:$M("loading")});indicator.show()}var url=buildPageUrl(idx,config);if(config.cachePageData){if(pageDataCache[url]){handle.showPage(pageDataCache[url]);return}}YAHOO.util.Connect.asyncRequest("GET",url+"&t="+new Date().getTime(),{success:function(req){var resultSet=eval("("+req.responseText+")");handle.showPage(resultSet.Pagination);if(config.cachePageData){pageDataCache[url]=resultSet.Pagination}if(config.showIndicator){indicator.hide();$D.setStyle(pageDataContainer,"display","block")}},failure:function(req){if(config.showIndicator){$D.setStyle(pageDataContainer,"display","block");indicator.hide()}handle.rebuildPageBar();alert($M("ajaxError"))}})};handle.showPage=function(pageObj){this._showPage(pageObj);this.rebuildPageBar(pageObj);pageLoadEvent.fire(pageObj)};handle._showPage=function(pageObj){if(pageObj.PageData&&YAHOO.lang.isString(pageObj.PageData)){pageDataContainer.innerHTML=pageObj.PageData}};handle.isNextPageAvailable=function(){return this.pageIndex<this.pageCount};handle.isPrevPageAvailable=function(){return this.pageIndex>1};handle.disablePageBar=function(){$D.addClass(pageBarContainer,"Disabled");$E.purgeElement(pageBarContainer,true,"click");var els=TB.common.toArray(pageBarContainer.getElementsByTagName("a"));els.forEach(function(el,i){$E.on(el,"click",cancelHandler);el.disabled=1})};handle.onPageLoad=function(callback){if(YAHOO.lang.isFunction(callback)){pageLoadEvent.subscribe(callback)}};handle.setAppendParams=function(params){config.appendParams=params};return handle}};TB.util.QueryData=function(){this.data=[];this.addField=function(A){for(var B=0;B<arguments.length;B++){var C=arguments[B];if(C){this.add(C.name,encodeURIComponent(C.value))}}};this.add=function(A,B){this.data.push({"name":A,"value":B})};this.get=function(A){for(var B=0;B<this.data.length;B++){if(this.data[B].name===A){return this.data[B].value}}return null};this.toQueryString=function(){var A=this.data.map(function(C,B){return C.name+"="+C.value});return A.join("&")}};TB.form.CheckboxGroup=new function(){var E=YAHOO.util;var B={checkAllBox:"CheckAll",checkAllBoxClass:"tb:chack-all",checkOnInit:true};var D=function(G,F){return G.checked};var A=function(G,F){if(G.type&&G.type.toLowerCase()=="checkbox"){G.checked=true}};var C=function(G,F){if(G.type&&G.type.toLowerCase()=="checkbox"){G.checked=false}};this.attach=function(K,G){G=TB.applyIf(G||{},B);var J={};var H=new E.CustomEvent("onCheck",J,false,E.CustomEvent.FLAT);var I=[];if(K){if(K.length){I=TB.common.toArray(K)}else{I[0]=K}}var L=[];if(G.checkAllBoxClass){L=$D.getElementsByClassName(G.checkAllBoxClass,null,I[0].form)}if($(G.checkAllBox)){L.push($(G.checkAllBox))}var F=function(){var O=I.filter(D);if(I.length==0){L.forEach(C)}else{L.forEach((O.length==I.length)?A:C)}J._checkedBoxCount=O.length};var M=function(O){var P=$E.getTarget(O);F();H.fire(P);return true};TB.apply(J,{_checkedBoxCount:0,onCheck:function(O){H.subscribe(O)},isCheckAll:function(){return this._checkedBoxCount==I.length},isCheckNone:function(){return this._checkedBoxCount==0},isCheckSome:function(){return this._checkedBoxCount!=0},isCheckSingle:function(){return this._checkedBoxCount==1},isCheckMulti:function(){return this._checkedBoxCount>1},toggleCheckAll:function(){var O=I.every(D);I.forEach(O?C:A);if(I.length==0){L.forEach(C)}else{L.forEach(O?C:A)}J._checkedBoxCount=(O)?0:I.length;I.forEach(function(P){H.fire(P)})},toggleChecked:function(O){O.checked=!O.checked;F();H.fire(O)},getCheckedBoxes:function(){return I.filter(D)}});$E.on(I,"click",M);if(G.onCheck&&YAHOO.lang.isFunction(G.onCheck)){H.subscribe(G.onCheck,J,true)}if(L.length>0){$E.on(L,"click",J.toggleCheckAll)}if(G.checkOnInit){F();var N=function(){I.forEach(function(O){H.fire(O)})};setTimeout(N,10)}return J}};TB.form.TagAssistor=new function(){var B={separator:" ",selectedClass:"Selected"};var A=function(E,D){return E.indexOf(TB.common.trim(D.innerHTML))!=-1};var C=function(D,E){var F=D.value.replace(/\s+/g," ").trim();if(F.length>0){return F.split(E)}else{return[]}};this.attach=function(E,F,G){E=$(E);F=$(F);G=TB.applyIf(G||{},B);var H=TB.common.toArray(F.getElementsByTagName("a"));var J=function(L){var K=C(E,G.separator);var M=$E.getTarget(L);if(A(K,M)){K.remove(TB.common.trim(M.innerHTML))}else{K.push(TB.common.trim(M.innerHTML))}D(K);E.value=K.join(G.separator)};var D=function(K){H.forEach(function(M,L){if(A(K,M)){$D.addClass(M,G.selectedClass)}else{$D.removeClass(M,G.selectedClass)}})};var I={};I.init=function(){var K=C(E,G.separator);H.forEach(function(M,L){if(A(K,M)){$D.addClass(M,G.selectedClass)}$E.on(M,"click",J)});$E.on(E,"keyup",function(M){var L=C(E,G.separator);D(L)})};I.init()}}

var AE={};AE.widget=TB.widget;AE.browse=TB.bom;AE.bom=TB.bom;AE.common=TB.common;AE.dom=TB.dom;AE.namespace=function(){var a=arguments,o=null,i,j,d;for(i=0;i<a.length;i=i+1){d=a[i].split(".");o=AE;for(j=(d[0]=="AE")?1:0;j<d.length;j=j+1){o[d[j]]=o[d[j]]||{};o=o[d[j]];}}
return o;};AE.cpAttribute=function(obj,config){if(obj&&config&&typeof config=='object'){for(var p in config){if(!YAHOO.lang.hasOwnProperty(obj,p))
obj[p]=config[p];}}
return obj;}
if(!IL){var IL={ok:"Ok",cancel:"Cancel"};}
var YL=YAHOO.lang;var YUD=YAHOO.util.Dom;var YUE=YAHOO.util.Event;YUD.setCookie=TB.bom.setCookie;YUD.getCookie=TB.bom.getCookie;YUD.deleteCookie=TB.bom.removeCookie;function vd(p){}
String.prototype.ltrim=function(){return this.replace(/(^\s*)/g,"");}
String.prototype.rtrim=function(){return this.replace(/(\s*$)/g,"");}
String.prototype.isEmpty=function(){if(this==""||this==''){return true;}else{return false;}}
YL.isEnglish=function(sValue){var myReg=/[^\x00-\x80]/g;if(myReg.test(sValue)){return false;}else{return true;}}
YL.isAscii=function(sValue){var myReg=/[^\x00-\xFF]/g;if(myReg.test(sValue)){return false}else{return true;}}
var get=YUD.get;function controlListShow(e,sClassName,sTagName,sParentNodeId,sVisible){var items=YUD.getElementsByClassName(sClassName,sTagName,get(sParentNodeId));if(sVisible||sVisible==''||sVisible==""){YUD.setStyle(items,"display",sVisible);}else{if(items[0].style.display=="none"){YUD.setStyle(items,"display","");}else{YUD.setStyle(items,"display","none");}}}
function addMoreAttributeContent(sContent,sButtonId,sContainerTagName){var oActionButton=get(sButtonId);var span=document.createElement(sContainerTagName);var separator=document.createElement('div');separator.style.Clear="both";span.innerHTML=sContent;oActionButton.parentNode.insertBefore(separator,oActionButton);oActionButton.parentNode.insertBefore(span,oActionButton);}

(function(){var B=YAHOO.util;var A=function(D,C,E,F){if(!D){}this.init(D,C,E,F);};A.NAME="Anim";A.prototype={toString:function(){var C=this.getEl()||{};var D=C.id||C.tagName;return(this.constructor.NAME+": "+D);},patterns:{noNegatives:/width|height|opacity|padding/i,offsetAttribute:/^((width|height)|(top|left))$/,defaultUnit:/width|height|top$|bottom$|left$|right$/i,offsetUnit:/\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i},doMethod:function(C,E,D){return this.method(this.currentFrame,E,D-E,this.totalFrames);},setAttribute:function(C,E,D){if(this.patterns.noNegatives.test(C)){E=(E>0)?E:0;}B.Dom.setStyle(this.getEl(),C,E+D);},getAttribute:function(C){var E=this.getEl();var G=B.Dom.getStyle(E,C);if(G!=="auto"&&!this.patterns.offsetUnit.test(G)){return parseFloat(G);}var D=this.patterns.offsetAttribute.exec(C)||[];var H=!!(D[3]);var F=!!(D[2]);if(F||(B.Dom.getStyle(E,"position")=="absolute"&&H)){G=E["offset"+D[0].charAt(0).toUpperCase()+D[0].substr(1)];}else{G=0;}return G;},getDefaultUnit:function(C){if(this.patterns.defaultUnit.test(C)){return"px";}return"";},setRuntimeAttribute:function(D){var I;var E;var F=this.attributes;this.runtimeAttributes[D]={};var H=function(J){return(typeof J!=="undefined");};if(!H(F[D]["to"])&&!H(F[D]["by"])){return false;}I=(H(F[D]["from"]))?F[D]["from"]:this.getAttribute(D);if(H(F[D]["to"])){E=F[D]["to"];}else{if(H(F[D]["by"])){if(I.constructor==Array){E=[];for(var G=0,C=I.length;G<C;++G){E[G]=I[G]+F[D]["by"][G]*1;}}else{E=I+F[D]["by"]*1;}}}this.runtimeAttributes[D].start=I;this.runtimeAttributes[D].end=E;this.runtimeAttributes[D].unit=(H(F[D].unit))?F[D]["unit"]:this.getDefaultUnit(D);return true;},init:function(E,J,I,C){var D=false;var F=null;var H=0;E=B.Dom.get(E);this.attributes=J||{};this.duration=!YAHOO.lang.isUndefined(I)?I:1;this.method=C||B.Easing.easeNone;this.useSeconds=true;this.currentFrame=0;this.totalFrames=B.AnimMgr.fps;this.setEl=function(M){E=B.Dom.get(M);};this.getEl=function(){return E;};this.isAnimated=function(){return D;};this.getStartTime=function(){return F;};this.runtimeAttributes={};this.animate=function(){if(this.isAnimated()){return false;}this.currentFrame=0;this.totalFrames=(this.useSeconds)?Math.ceil(B.AnimMgr.fps*this.duration):this.duration;if(this.duration===0&&this.useSeconds){this.totalFrames=1;}B.AnimMgr.registerElement(this);return true;};this.stop=function(M){if(!this.isAnimated()){return false;}if(M){this.currentFrame=this.totalFrames;this._onTween.fire();}B.AnimMgr.stop(this);};var L=function(){this.onStart.fire();this.runtimeAttributes={};for(var M in this.attributes){this.setRuntimeAttribute(M);}D=true;H=0;F=new Date();};var K=function(){var O={duration:new Date()-this.getStartTime(),currentFrame:this.currentFrame};O.toString=function(){return("duration: "+O.duration+", currentFrame: "+O.currentFrame);};this.onTween.fire(O);var N=this.runtimeAttributes;for(var M in N){this.setAttribute(M,this.doMethod(M,N[M].start,N[M].end),N[M].unit);}H+=1;};var G=function(){var M=(new Date()-F)/1000;var N={duration:M,frames:H,fps:H/M};N.toString=function(){return("duration: "+N.duration+", frames: "+N.frames+", fps: "+N.fps);};D=false;H=0;this.onComplete.fire(N);};this._onStart=new B.CustomEvent("_start",this,true);this.onStart=new B.CustomEvent("start",this);this.onTween=new B.CustomEvent("tween",this);this._onTween=new B.CustomEvent("_tween",this,true);this.onComplete=new B.CustomEvent("complete",this);this._onComplete=new B.CustomEvent("_complete",this,true);this._onStart.subscribe(L);this._onTween.subscribe(K);this._onComplete.subscribe(G);}};B.Anim=A;})();YAHOO.util.AnimMgr=new function(){var C=null;var B=[];var A=0;this.fps=1000;this.delay=1;this.registerElement=function(F){B[B.length]=F;A+=1;F._onStart.fire();this.start();};this.unRegister=function(G,F){F=F||E(G);if(!G.isAnimated()||F==-1){return false;}G._onComplete.fire();B.splice(F,1);A-=1;if(A<=0){this.stop();}return true;};this.start=function(){if(C===null){C=setInterval(this.run,this.delay);}};this.stop=function(H){if(!H){clearInterval(C);for(var G=0,F=B.length;G<F;++G){this.unRegister(B[0],0);}B=[];C=null;A=0;}else{this.unRegister(H);}};this.run=function(){for(var H=0,F=B.length;H<F;++H){var G=B[H];if(!G||!G.isAnimated()){continue;}if(G.currentFrame<G.totalFrames||G.totalFrames===null){G.currentFrame+=1;if(G.useSeconds){D(G);}G._onTween.fire();}else{YAHOO.util.AnimMgr.stop(G,H);}}};var E=function(H){for(var G=0,F=B.length;G<F;++G){if(B[G]==H){return G;}}return-1;};var D=function(G){var J=G.totalFrames;var I=G.currentFrame;var H=(G.currentFrame*G.duration*1000/G.totalFrames);var F=(new Date()-G.getStartTime());var K=0;if(F<G.duration*1000){K=Math.round((F/H-1)*G.currentFrame);}else{K=J-(I+1);}if(K>0&&isFinite(K)){if(G.currentFrame+K>=J){K=J-(I+1);}G.currentFrame+=K;}};};YAHOO.util.Bezier=new function(){this.getPosition=function(E,D){var F=E.length;var C=[];for(var B=0;B<F;++B){C[B]=[E[B][0],E[B][1]];}for(var A=1;A<F;++A){for(B=0;B<F-A;++B){C[B][0]=(1-D)*C[B][0]+D*C[parseInt(B+1,10)][0];C[B][1]=(1-D)*C[B][1]+D*C[parseInt(B+1,10)][1];}}return[C[0][0],C[0][1]];};};(function(){var A=function(F,E,G,H){A.superclass.constructor.call(this,F,E,G,H);};A.NAME="ColorAnim";A.DEFAULT_BGCOLOR="#fff";var C=YAHOO.util;YAHOO.extend(A,C.Anim);var D=A.superclass;var B=A.prototype;B.patterns.color=/color$/i;B.patterns.rgb=/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i;B.patterns.hex=/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i;B.patterns.hex3=/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i;B.patterns.transparent=/^transparent|rgba\(0, 0, 0, 0\)$/;B.parseColor=function(E){if(E.length==3){return E;}var F=this.patterns.hex.exec(E);if(F&&F.length==4){return[parseInt(F[1],16),parseInt(F[2],16),parseInt(F[3],16)];}F=this.patterns.rgb.exec(E);if(F&&F.length==4){return[parseInt(F[1],10),parseInt(F[2],10),parseInt(F[3],10)];}F=this.patterns.hex3.exec(E);if(F&&F.length==4){return[parseInt(F[1]+F[1],16),parseInt(F[2]+F[2],16),parseInt(F[3]+F[3],16)];}return null;};B.getAttribute=function(E){var G=this.getEl();if(this.patterns.color.test(E)){var I=YAHOO.util.Dom.getStyle(G,E);var H=this;if(this.patterns.transparent.test(I)){var F=YAHOO.util.Dom.getAncestorBy(G,function(J){return!H.patterns.transparent.test(I);});if(F){I=C.Dom.getStyle(F,E);}else{I=A.DEFAULT_BGCOLOR;}}}else{I=D.getAttribute.call(this,E);}return I;};B.doMethod=function(F,J,G){var I;if(this.patterns.color.test(F)){I=[];for(var H=0,E=J.length;H<E;++H){I[H]=D.doMethod.call(this,F,J[H],G[H]);}I="rgb("+Math.floor(I[0])+","+Math.floor(I[1])+","+Math.floor(I[2])+")";}else{I=D.doMethod.call(this,F,J,G);}return I;};B.setRuntimeAttribute=function(F){D.setRuntimeAttribute.call(this,F);if(this.patterns.color.test(F)){var H=this.attributes;var J=this.parseColor(this.runtimeAttributes[F].start);var G=this.parseColor(this.runtimeAttributes[F].end);if(typeof H[F]["to"]==="undefined"&&typeof H[F]["by"]!=="undefined"){G=this.parseColor(H[F].by);for(var I=0,E=J.length;I<E;++I){G[I]=J[I]+G[I];}}this.runtimeAttributes[F].start=J;this.runtimeAttributes[F].end=G;}};C.ColorAnim=A;})();YAHOO.util.Easing={easeNone:function(B,A,D,C){return D*B/C+A;},easeIn:function(B,A,D,C){return D*(B/=C)*B+A;},easeOut:function(B,A,D,C){return-D*(B/=C)*(B-2)+A;},easeBoth:function(B,A,D,C){if((B/=C/2)<1){return D/2*B*B+A;}return-D/2*((--B)*(B-2)-1)+A;},easeInStrong:function(B,A,D,C){return D*(B/=C)*B*B*B+A;},easeOutStrong:function(B,A,D,C){return-D*((B=B/C-1)*B*B*B-1)+A;},easeBothStrong:function(B,A,D,C){if((B/=C/2)<1){return D/2*B*B*B*B+A;}return-D/2*((B-=2)*B*B*B-2)+A;},elasticIn:function(C,A,G,F,B,E){if(C==0){return A;}if((C/=F)==1){return A+G;}if(!E){E=F*0.3;}if(!B||B<Math.abs(G)){B=G;var D=E/4;}else{var D=E/(2*Math.PI)*Math.asin(G/B);}return-(B*Math.pow(2,10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E))+A;},elasticOut:function(C,A,G,F,B,E){if(C==0){return A;}if((C/=F)==1){return A+G;}if(!E){E=F*0.3;}if(!B||B<Math.abs(G)){B=G;var D=E/4;}else{var D=E/(2*Math.PI)*Math.asin(G/B);}return B*Math.pow(2,-10*C)*Math.sin((C*F-D)*(2*Math.PI)/E)+G+A;},elasticBoth:function(C,A,G,F,B,E){if(C==0){return A;}if((C/=F/2)==2){return A+G;}if(!E){E=F*(0.3*1.5);}if(!B||B<Math.abs(G)){B=G;var D=E/4;}else{var D=E/(2*Math.PI)*Math.asin(G/B);}if(C<1){return-0.5*(B*Math.pow(2,10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E))+A;}return B*Math.pow(2,-10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E)*0.5+G+A;},backIn:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158;}return E*(B/=D)*B*((C+1)*B-C)+A;},backOut:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158;}return E*((B=B/D-1)*B*((C+1)*B+C)+1)+A;},backBoth:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158;}if((B/=D/2)<1){return E/2*(B*B*(((C*=(1.525))+1)*B-C))+A;}return E/2*((B-=2)*B*(((C*=(1.525))+1)*B+C)+2)+A;},bounceIn:function(B,A,D,C){return D-YAHOO.util.Easing.bounceOut(C-B,0,D,C)+A;},bounceOut:function(B,A,D,C){if((B/=C)<(1/2.75)){return D*(7.5625*B*B)+A;}else{if(B<(2/2.75)){return D*(7.5625*(B-=(1.5/2.75))*B+0.75)+A;}else{if(B<(2.5/2.75)){return D*(7.5625*(B-=(2.25/2.75))*B+0.9375)+A;}}}return D*(7.5625*(B-=(2.625/2.75))*B+0.984375)+A;},bounceBoth:function(B,A,D,C){if(B<C/2){return YAHOO.util.Easing.bounceIn(B*2,0,D,C)*0.5+A;}return YAHOO.util.Easing.bounceOut(B*2-C,0,D,C)*0.5+D*0.5+A;}};(function(){var A=function(H,G,I,J){if(H){A.superclass.constructor.call(this,H,G,I,J);}};A.NAME="Motion";var E=YAHOO.util;YAHOO.extend(A,E.ColorAnim);var F=A.superclass;var C=A.prototype;C.patterns.points=/^points$/i;C.setAttribute=function(G,I,H){if(this.patterns.points.test(G)){H=H||"px";F.setAttribute.call(this,"left",I[0],H);F.setAttribute.call(this,"top",I[1],H);}else{F.setAttribute.call(this,G,I,H);}};C.getAttribute=function(G){if(this.patterns.points.test(G)){var H=[F.getAttribute.call(this,"left"),F.getAttribute.call(this,"top")];}else{H=F.getAttribute.call(this,G);}return H;};C.doMethod=function(G,K,H){var J=null;if(this.patterns.points.test(G)){var I=this.method(this.currentFrame,0,100,this.totalFrames)/100;J=E.Bezier.getPosition(this.runtimeAttributes[G],I);}else{J=F.doMethod.call(this,G,K,H);}return J;};C.setRuntimeAttribute=function(P){if(this.patterns.points.test(P)){var H=this.getEl();var J=this.attributes;var G;var L=J["points"]["control"]||[];var I;var M,O;if(L.length>0&&!(L[0]instanceof Array)){L=[L];}else{var K=[];for(M=0,O=L.length;M<O;++M){K[M]=L[M];}L=K;}if(E.Dom.getStyle(H,"position")=="static"){E.Dom.setStyle(H,"position","relative");}if(D(J["points"]["from"])){E.Dom.setXY(H,J["points"]["from"]);}else{E.Dom.setXY(H,E.Dom.getXY(H));}G=this.getAttribute("points");if(D(J["points"]["to"])){I=B.call(this,J["points"]["to"],G);var N=E.Dom.getXY(this.getEl());for(M=0,O=L.length;M<O;++M){L[M]=B.call(this,L[M],G);}}else{if(D(J["points"]["by"])){I=[G[0]+J["points"]["by"][0],G[1]+J["points"]["by"][1]];for(M=0,O=L.length;M<O;++M){L[M]=[G[0]+L[M][0],G[1]+L[M][1]];}}}this.runtimeAttributes[P]=[G];if(L.length>0){this.runtimeAttributes[P]=this.runtimeAttributes[P].concat(L);}this.runtimeAttributes[P][this.runtimeAttributes[P].length]=I;}else{F.setRuntimeAttribute.call(this,P);}};var B=function(G,I){var H=E.Dom.getXY(this.getEl());G=[G[0]-H[0]+I[0],G[1]-H[1]+I[1]];return G;};var D=function(G){return(typeof G!=="undefined");};E.Motion=A;})();(function(){var D=function(F,E,G,H){if(F){D.superclass.constructor.call(this,F,E,G,H);}};D.NAME="Scroll";var B=YAHOO.util;YAHOO.extend(D,B.ColorAnim);var C=D.superclass;var A=D.prototype;A.doMethod=function(E,H,F){var G=null;if(E=="scroll"){G=[this.method(this.currentFrame,H[0],F[0]-H[0],this.totalFrames),this.method(this.currentFrame,H[1],F[1]-H[1],this.totalFrames)];}else{G=C.doMethod.call(this,E,H,F);}return G;};A.getAttribute=function(E){var G=null;var F=this.getEl();if(E=="scroll"){G=[F.scrollLeft,F.scrollTop];}else{G=C.getAttribute.call(this,E);}return G;};A.setAttribute=function(E,H,G){var F=this.getEl();if(E=="scroll"){F.scrollLeft=H[0];F.scrollTop=H[1];}else{C.setAttribute.call(this,E,H,G);}};B.Scroll=D;})();YAHOO.register("animation",YAHOO.util.Anim,{version:"2.6.0",build:"1321"});

AE.namespace('AE.widget.message');AE.widget.message=function(){var _self=this;var msgData=[];currentIndex=-1;_self.init=function(){}
_self.getMsgData=function(){return msgData;}
_self.pushMsg=function(msgContent,msgName,msgCode){msgData.push((new dataItem(msgContent,msgName,msgCode)));return true;}
_self.fetch=function(){var i=++currentIndex;if(msgData[i]){return msgData[i]}else{currentIndex=-1;return false;}}
_self.getItem=function(i){i=(i>=0)?i:0;return msgData[i]?msgData[i]:false;}
_self.isError=function(){currentIndex=-1;for(var i=0,n=msgData.length;i<n;i++){if(msgData[i].isError()){return true;}}
return false;}
_self.getContent=function(i){var r=_self.getItem(i);return r?r.getContent():null;}
_self.getItemByName=function(msgName){var item={};var returnArr=[];for(var i=0,n=msgData.length;i<n;i++){if(msgData[i].getName()==msgName){returnArr.push(msgData[i]);}}
return returnArr;}
_self.getAllErrorMsg=function(){currentIndex=-1;var item={};var returnArr=[];for(var i=0,n=msgData.length;i<n;i++){if(msgData[i].isError()){returnArr.push(msgData[i]);}}
return returnArr;}
_self.toObject=function(){var returnObj={};var item={};for(var i=0,n=msgData.length;i<n;i++){if(msgData[i].getName()&&!msgData[i].getName().isEmpty()){returnObj[msgData[i].getName()]=msgData[i].getContent();}}
return returnObj;}
var dataItem=function(msgContent,msgName,msgCode){this.msgContent=msgContent;this.msgName=msgName;this.msgCode=msgCode;}
dataItem.prototype.isError=function(){try{return(this.msgCode.toString().indexOf('1')==0);}catch(E){return false;}};dataItem.prototype.getContent=function(){return this.msgContent;}
dataItem.prototype.getName=function(){return this.msgName;}
dataItem.prototype.getCode=function(){return this.msgCode;}};

function setCheckedFlag(formObj,eleNameArr,checkedFlag){for(var i=0;i<formObj.elements.length;i++){var ele=formObj.elements[i];for(var j=0;j<eleNameArr.length;j++){if(ele.name==eleNameArr[j]){ele.checked=checkedFlag;break;}}}}
function getCheckedRecordNum(formObj,eleNameArr){var checkedNum=0;for(var i=0;i<formObj.elements.length;i++){var ele=formObj.elements[i];for(var j=0;j<eleNameArr.length;j++){if(ele.name==eleNameArr[j]&&ele.checked){checkedNum++;break;}}}
return checkedNum;}
function trim(str){return(trimExt(str,' '));}
function trimExt(str,ch){if(str==null)return(null);var start=0,end=0;var i=0;while(i<str.length){if(str.charAt(i)==ch){i++;}else{start=i;break;}}
i=str.length-1;while(i>=0){if(str.charAt(i)==ch){i--;}else{end=i+1;break;}}
return(str.substring(start,end));}
function isNumber(value){if(trim(value)!=''&&!isNaN(value)&&(value.indexOf('.')==-1)){return(true);}
return(false);}
function initSelectWithValue(selectObj,oldValue){for(var i=0;i<selectObj.length;i++){if(selectObj[i].value==oldValue){selectObj[i].selected=true;break;}}}
function initGsSelectWithValue(selectObj,oldValue,searchtype){if("offer_en"==searchtype||"product_en"==searchtype){for(var i=0;i<selectObj.length;i++){if(selectObj.options[i].value==searchtype){selectObj.options[i].selected=true;break;}}}
else{for(var i=0;i<selectObj.length;i++){if(selectObj.options[i].value==oldValue){selectObj.options[i].selected=true;break;}}}}
function encode(str){if(str==null)return'';var retStr=escape(str);if(str.indexOf('+')!=-1){retStr=retStr.replace(/\+/g,'%2B');}
return retStr;}
function XMLEncode(str){str=trim(str);str=str.replace("&","&amp;");str=str.replace("<","&lt;");str=str.replace(">","&gt;");str=str.replace("'","&apos;");str=str.replace("\"","&quot;");return str;}
function XMLDecode(str){str=trim(str);str=str.replace("&amp;","&");str=str.replace("&lt;","<");str=str.replace("&gt;",">");str=str.replace("&apos;","'");str=str.replace("&quot;","\"");return str;}
function adjustImageSize(imageObj,maxHeight,maxWidth){if(maxHeight<imageObj.height){imageObj.height=maxHeight;}
if(maxWidth<imageObj.width){imageObj.width=maxWidth;}}
function setImgSize(theURL,sImage){var imgObj;var sizeStand=180;if(arguments.length>=3){sizeStand=arguments[2];}
imgObj=new Image();imgObj.src=theURL;if((imgObj.width!=0)&&(imgObj.height!=0)){if(imgObj.width>sizeStand||imgObj.height>sizeStand){if(imgObj.width>imgObj.height){var iHeight=imgObj.height*sizeStand/imgObj.width;sImage.height=iHeight;sImage.width=sizeStand;}else{var iWidth=imgObj.width*sizeStand/imgObj.height;sImage.width=iWidth;sImage.height=sizeStand;}}else{sImage.width=imgObj.width;sImage.height=imgObj.height;}}else{sImage.width=sizeStand;sImage.height=sizeStand;}}
function setImgSizeWH(theURL,sImage,imgW,imgH){var imgObj;imgObj=new Image();imgObj.src=theURL;if((imgObj.width!=0)&&(imgObj.height!=0)){if(imgObj.width>imgW||imgObj.height>imgH){var iHeight=imgObj.height*imgW/imgObj.width;if(iHeight<=imgH){sImage.width=imgW;sImage.height=iHeight;}else{var iWidth=imgObj.width*imgH/imgObj.height;sImage.width=iWidth;sImage.height=imgH;}}else{sImage.width=imgObj.width;sImage.height=imgObj.height;}}else{sImage.width=imgW;sImage.height=imgH;}}
function setBigImgSize(theURL,sImage){var imgObj;var sizeStand=360;if(arguments.length>=3){sizeStand=arguments[2];}
imgObj=new Image();imgObj.src=theURL;imgObj.onLoad=setBigImgInner(imgObj,sImage,sizeStand);}
function fixOverflowBox(objID,maxWidth,minWidth){obj=document.getElementById(objID);if(!obj){return;}
obj.style.overflow="hidden";if(isIEBrowse()){if(window.screen.width>=1024){obj.style.width=maxWidth+"px";}else if(window.screen.width<1024){obj.style.width=minWidth+"px";}}}
function setBigImgInner(imgObj,sImage,sizeStand){if((imgObj.width!=0)&&(imgObj.height!=0)){if(imgObj.width>sizeStand||imgObj.height>sizeStand){if(imgObj.width>imgObj.height){var iHeight=imgObj.height*sizeStand/imgObj.width;sImage.height=iHeight;sImage.width=sizeStand;}else{var iWidth=imgObj.width*sizeStand/imgObj.height;sImage.width=iWidth;sImage.height=sizeStand;}}else{sImage.width=imgObj.width;sImage.height=imgObj.height;}}else{sImage.width=sizeStand;sImage.height=sizeStand;}}
function setGsBigImgSize(theURL,sImage){var imgObj;var sizeStand=360;imgObj=new Image();imgObj.src=theURL;imgObj.onLoad=setGsImgInner(imgObj,sImage,sizeStand);}
function setGsImgInner(imgObj,sImage,sizeStand){if((imgObj.width!=0)&&(imgObj.height!=0)){if(imgObj.width>sizeStand){var iHeight=imgObj.height*sizeStand/imgObj.width;sImage.height=iHeight;sImage.width=sizeStand;}else{sImage.width=imgObj.width;sImage.height=imgObj.height;}}else{sImage.width=sizeStand;sImage.height=sizeStand;}}
function bbimg(o){var zoom=parseInt(o.style.zoom,10)||100;zoom+=event.wheelDelta/12;if(zoom>0)o.style.zoom=zoom+'%';return false;}
function clk(tl){if(document.images){var _random=(new Date()).getTime();new Image().src="http://tracelog.www.alibaba.com/null.gif?fresh="+_random+"&tracelog="+escape(tl);}
return true;}
var initText=new Array('Enter product keyword');function clearSearchText(obj){if(obj==null)return;for(var i=0;i<initText.length;i++){if(initText[i]==obj.value){obj.value='';return;}}}
function isIEBrowse(){var name=navigator.appName;if(name=="Microsoft Internet Explorer"){return true;}else{return false;}}
function adjustScreenWidth(divId){if(document.getElementById(divId)!=null)return;if(isIEBrowse()){if(window.screen.width>=1024){document.write("<div id='"+divId+"' style='width:982px'>");}else if(window.screen.width<1024){document.write("<div id='"+divId+"' style='width:758px'>");}}
else{document.write("<div id='"+divId+"'>");}}
function encodeKeyword(str){if(str==null)return'';str=str.replace(/(^\s*)|(\s*$)/g,"");str=str.replace(/(\s+)/g,"_");str=encode(str);return encode(str);}
function loadscript(newSrc,replaceID){var oldscript=document.getElementById(replaceID)
var newscript=document.createElement("script")
newscript.type="text/javascript";newscript.id=replaceID;newscript.src=newSrc;if(oldscript==null){document.getElementsByTagName('body')[0].appendChild(newscript);}
else{document.getElementsByTagName('body')[0].replaceChild(newscript,oldscript);}}
function tempTrackObj(code){if(document.images)
{new Image().src="http://tracelog.www.alibaba.com/null.gif?tracelog="+escape(code);}
return true;}
function agTrack(code1,code2){return tempTrackObj("angel_"+code1+"_"+code2);}
function loadHtml(theSrc){if(theSrc==null)return;var iframe=document.createElement("iframe");iframe.frameborder='0';iframe.height='0';iframe.width='0';iframe.scrolling='no'
iframe.style.display="none";iframe.src=theSrc;document.getElementsByTagName('body')[0].appendChild(iframe);}
function writeHiddenIFrame(iframeWidth,iframeHeight){if(!iframeWidth){iframeWidth=0;}
if(!iframeHeight){iframeHeight=0;}
document.write('<div style="display:none">');document.write('<iframe name="_SearchDictFrame" scrolling="no" id="_SearchDictFrame" frameborder="0" width="'+iframeWidth+'" height="'+iframeHeight+'"  marginwidth="0" marginheight="0" hspace="0" vspace="0" ></iframe>');document.write('</div>');}
function openWinForReferrer(url){var a=document.createElement('a');if(!a.click){window.open(url);return;}
a.setAttribute('href',url);a.setAttribute('target','_blank');a.style.display='none';document.body.appendChild(a);a.click();}
function gotoUrlForReferrer(url){var a=document.createElement('a');if(!a.click){window.location=url;return;}
a.setAttribute('href',url);a.style.display='none';document.body.appendChild(a);a.click();}

function AC_AX_RunContent(){var ret=AC_AX_GetArgs(arguments);AC_Generateobj(ret.objAttrs,ret.params,ret.embedAttrs);}
function AC_AX_GetArgs(args){var ret=new Object();ret.embedAttrs=new Object();ret.params=new Object();ret.objAttrs=new Object();for(var i=0;i<args.length;i=i+2){var currArg=args[i].toLowerCase();switch(currArg){case"pluginspage":case"type":case"src":ret.embedAttrs[args[i]]=args[i+1];break;case"data":case"codebase":case"classid":case"id":case"onafterupdate":case"onbeforeupdate":case"onblur":case"oncellchange":case"onclick":case"ondblClick":case"ondrag":case"ondragend":case"ondragenter":case"ondragleave":case"ondragover":case"ondrop":case"onfinish":case"onfocus":case"onhelp":case"onmousedown":case"onmouseup":case"onmouseover":case"onmousemove":case"onmouseout":case"onkeypress":case"onkeydown":case"onkeyup":case"onload":case"onlosecapture":case"onpropertychange":case"onreadystatechange":case"onrowsdelete":case"onrowenter":case"onrowexit":case"onrowsinserted":case"onstart":case"onscroll":case"onbeforeeditfocus":case"onactivate":case"onbeforedeactivate":case"ondeactivate":ret.objAttrs[args[i]]=args[i+1];break;case"width":case"height":case"align":case"vspace":case"hspace":case"class":case"title":case"accesskey":case"name":case"tabindex":ret.embedAttrs[args[i]]=ret.objAttrs[args[i]]=args[i+1];break;default:ret.embedAttrs[args[i]]=ret.params[args[i]]=args[i+1];}}
return ret;}

function AC_AddExtension(src,ext)
{if(src.indexOf('?')!=-1)
return src.replace(/\?/,ext+'?');else
return src+ext;}
function AC_Generateobj(objAttrs,params,embedAttrs)
{var str='<object ';for(var i in objAttrs)
str+=i+'="'+objAttrs[i]+'" ';str+='>';for(var i in params)
str+='<param name="'+i+'" value="'+params[i]+'" /> ';str+='<embed ';for(var i in embedAttrs)
str+=i+'="'+embedAttrs[i]+'" ';str+=' ></embed></object>';document.write(str);}
function AC_FL_RunContent(){for(var i=0,n=arguments.length;i<n;i++){if((arguments[i]=="src"||arguments[i]=="movie")&&(arguments[i+1].indexOf(".swf")>0)){arguments[i+1]=arguments[i+1].substring(0,arguments[i+1].lastIndexOf(".swf"));}}
var ret=AC_GetArgs
(arguments,".swf","movie","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash");AC_Generateobj(ret.objAttrs,ret.params,ret.embedAttrs);}
function AC_AL_RunContent(){var ret=AC_GetArgs
(arguments,"","movie","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash");return AC_AL_Generateobj(ret.objAttrs,ret.params,ret.embedAttrs);}
function AC_AL_Generateobj(objAttrs,params,embedAttrs)
{var str='<object ';for(var i in objAttrs)
str+=i+'="'+objAttrs[i]+'" ';str+='>';for(var i in params)
str+='<param name="'+i+'" value="'+params[i]+'" /> ';str+='<embed ';for(var i in embedAttrs)
str+=i+'="'+embedAttrs[i]+'" ';str+=' ></embed></object>';return str;}
function AC_SW_RunContent(){var ret=AC_GetArgs
(arguments,".dcr","src","clsid:166B1BCA-3F9C-11CF-8075-444553540000",null);AC_Generateobj(ret.objAttrs,ret.params,ret.embedAttrs);}
function AC_GetArgs(args,ext,srcParamName,classid,mimeType){var ret=new Object();ret.embedAttrs=new Object();ret.params=new Object();ret.objAttrs=new Object();for(var i=0;i<args.length;i=i+2){var currArg=args[i].toLowerCase();switch(currArg){case"classid":break;case"pluginspage":ret.embedAttrs[args[i]]=args[i+1];break;case"src":case"movie":args[i+1]=AC_AddExtension(args[i+1],ext);ret.embedAttrs["src"]=args[i+1];ret.params[srcParamName]=args[i+1];break;case"onafterupdate":case"onbeforeupdate":case"onblur":case"oncellchange":case"onclick":case"ondblClick":case"ondrag":case"ondragend":case"ondragenter":case"ondragleave":case"ondragover":case"ondrop":case"onfinish":case"onfocus":case"onhelp":case"onmousedown":case"onmouseup":case"onmouseover":case"onmousemove":case"onmouseout":case"onkeypress":case"onkeydown":case"onkeyup":case"onload":case"onlosecapture":case"onpropertychange":case"onreadystatechange":case"onrowsdelete":case"onrowenter":case"onrowexit":case"onrowsinserted":case"onstart":case"onscroll":case"onbeforeeditfocus":case"onactivate":case"onbeforedeactivate":case"ondeactivate":case"type":case"codebase":ret.objAttrs[args[i]]=args[i+1];break;case"width":case"height":case"align":case"vspace":case"hspace":case"class":case"title":case"accesskey":case"name":case"id":case"tabindex":ret.embedAttrs[args[i]]=ret.objAttrs[args[i]]=args[i+1];break;default:ret.embedAttrs[args[i]]=ret.params[args[i]]=args[i+1];}}
ret.objAttrs["classid"]=classid;if(mimeType)ret.embedAttrs["type"]=mimeType;return ret;}

var ELE_NAME_ARRAY=new Array('chkBuyOfferIds','chkSellOfferIds','chkProductIds','chkCompanyIds');var MY_WEB_SERVER="http://my.alibaba.com";var US_MY_ALIBABA="http://us.my.alibaba.com";var WWW_SERVER="http://www.empresabio.com";function check(checked){setCheckedFlag(document.form,ELE_NAME_ARRAY,checked);}
function inquiryNow(){var checkedNum=getCheckedNum();var basketItemNum=parseInt(document.form.basketItemNum.value);var urlString=document.location+"";if(checkedNum==0){if(basketItemNum==0){alert("No item(s) selected.")
return;}else{document.form.action=US_MY_ALIBABA+"/mcweb/inquiry_basket.htm";document.form.target="_blank";document.form.submit();}}
if(checkedNum>0){document.form.action=US_MY_ALIBABA+"/mcweb/contact.htm?action=mcweb:contact_action";document.form.target="_blank";document.form.submit();}}
function addBasket(){var basketItemMax=parseInt(document.form.basketItemMax.value);var basketItemNum=parseInt(document.form.basketItemNum.value);var num=getCheckedNum();var urlString=document.location+"";if(num==0){alert("No item(s) selected.")
return;}
if(basketItemMax<(basketItemNum+num)){var alertMessage="Your Inquiry Basket is full. It can store a maximum of "+basketItemMax+" inquiries.";alert(alertMessage);return;}
document.form.action=window.location.href;document.form.target="";document.form.submit();}
function getCheckedNum(){return getCheckedRecordNum(document.form,ELE_NAME_ARRAY);}
function getBuyOfferCheckedNum(){return getCheckedItemNum('chkBuyOfferIds');}
function getSellOfferCheckedNum(){return getCheckedItemNum('chkSellOfferIds');}
function getCompanyCheckedNum(){return getCheckedItemNum('chkCompanyIds');}
function getProductCheckedNum(){return getCheckedItemNum('chkProductIds');}
function getCheckedItemNum(item){return getCheckedRecordNum(document.form,new Array(item));}
function uncheckQuote(){setCheckedFlag(document.form,new Array('chkBuyOfferIds'),false);}
function uncheckRFQ(){setCheckedFlag(document.form,new Array('chkSellOfferIds','chkProductIds','chkCompanyIds'),false);}
function singleInquiryNow(inquiryType,id){var chkbox=document.getElementById("chk"+id);if(chkbox&&chkbox.checked)
{document.form.action=US_MY_ALIBABA+"/mcweb/contact.htm?action=mcweb:contact_action";}
else{document.form.action=US_MY_ALIBABA+"/mcweb/contact.htm?action=mcweb:contact_action&"+inquiryType+"="+id;}
document.form.target="_blank";document.form.submit();}
function fixTextOverflowY(casingId,detailId,pointsId)
{var casingObject=document.getElementById(casingId);var detailObject=document.getElementById(detailId);var potinsObject=document.getElementById(pointsId);if(casingObject.offsetHeight<detailObject.offsetHeight){potinsObject.style.display="block";}else{potinsObject.style.display="none";}}
function openGsIcon(){win=open(globalImgServer+'/hermes/goldsuppliers.html','forbuyerchina','width=600,height=450,location=no,toolbar=no,status=no,resizable=yes,scrollbars=yes');win.focus();}
function openTPIcon(){win=open(globalImgServer+'/others/popup/trust_030325.html','forbuyerchina','width=600,height=470,location=no,toolbar=no,status=no,resizable=yes,scrollbars=yes');win.focus();}

function logger(theUrl){if(theUrl==null)return;window.setTimeout("loadHtml('"+theUrl+"')",10);}
function doIfExploreIsNotSupport(){alert("Only Available to Microsoft Internet Explorer and FireFox 1.5 or above.");}
function doForwardTrademanagerIfNotInstalled(isNewWindow){var url='http://trademanager.empresabio.com';if(checkIE()){if(isNewWindow){window.open(url);}else{window.location=url;}}else if(checkFirefoxIsBigThan15()){if(!hasBeenInstancePlugIn&&confirm("You need the Firefox plug-in. Click the Confirm button to download it.")){if(window.InstallTrigger){InstallTrigger.install({'empresabio':'http://download.alitalk.empresabio.com/TradeManager/download/aliww.xpi'});}}else if(hasBeenInstancePlugIn){if(isNewWindow){window.open(url);}else{window.location=url;}}}}
function doOpenDialogifNotInstalled(nextUrl){if(checkIE()){win=open(nextUrl,'installNow','width=600,height=500,location=no,toolbar=no,status=no,resizable=yes,scrollbars=yes');}else if(checkFirefoxIsBigThan15()){if(!hasBeenInstancePlugIn&&confirm("You need the Firefox plug-in. Click the Confirm button to download it.")){if(window.InstallTrigger){InstallTrigger.install({'empresabio':'http://download.alitalk.empresabio.com/TradeManager/download/aliww.xpi'});}}else if(hasBeenInstancePlugIn){win=open(nextUrl,'installNow','width=600,height=500,location=no,toolbar=no,status=no,resizable=yes,scrollbars=yes');}}}
function doForwardifNotInstalled(nextUrl){if(checkIE()){window.location=nextUrl;}else if(checkFirefoxIsBigThan15()){if(!hasBeenInstancePlugIn&&confirm("You need the Firefox plug-in. Click the Confirm button to download it.")){if(window.InstallTrigger){InstallTrigger.install({'empresabio':'http://download.alitalk.empresabio.com/TradeManager/download/aliww.xpi'});}}else if(hasBeenInstancePlugIn){window.location=nextUrl;}}}
function OnlyCheckAlitalkInstalled(){return checkInstallEnaliint();}
function newCheckAlitalkInstalled(){return checkInstallEnaliint();}
function clickAlitalk(uid){var binstalled=checkInstallEnaliint();var isIE=true;if(isIE==true){if(binstalled!="-1"){sendMessageNotEn(uid);}else{doForwardTrademanagerIfNotInstalled();}}else{doIfExploreIsNotSupport();}}
function alitalkEncrypt(memberId,from,id){var binstalled=checkInstallEnaliint();var isIE=true;var para="";var selfpara="";if(isIE==true){if(binstalled!="-1"){var referUrl=document.URL;var timestamp=new Date();para="&url2=http://dmtracking2.empresabio.com/feedbackfromalitalk.html?from="+from+"#id="+id+"#refer="+referUrl.replace(/&/ig,"$")+"#time="+timestamp.getTime();selfpara="http://dmtracking2.empresabio.com/feedbackfromalitalk.html?STEP=CLICK&from="+from+"&id="+id+"&refer="+referUrl.replace(/&/ig,"$")+"&time"+timestamp.getTime();logger(selfpara);sendMessage(memberId,para);}else{if(OnLine==1){win=open(getWebAtmUrl(from,memberId,id),Math.round(Math.random()*24*100),'width=785,height=600,location=no,toolbar=no,status=no,resizable=yes,scrollbars=no');win.focus();}else{doForwardTrademanagerIfNotInstalled();}}}else{doIfExploreIsNotSupport();}}
function getWebAtmUrl(from,receiverId,id){var webAtmUrl="";var referUrl=document.URL;webAtmUrl="http://us.my.empresabio.com/user/webatm/start_web_atm.htm?enemberId="+encode(receiverId)+"&from="+from+"&id="+id+"&refer="+referUrl.replace(/&/ig,"$");return webAtmUrl;}
function alitalkInstallOrLogin(){var binstalled=checkInstallEnaliint();var isIE=checkIEorFirefox();if(isIE==true){if(binstalled!="-1"){startWW("","","");}else{doForwardTrademanagerIfNotInstalled(true);}}else{doIfExploreIsNotSupport();}}
function alitalkEncryptFormyalibaba(memberid,from,id,displayName,messageType){var binstalled=checkInstallEnaliint();var isIE=true;var para="";var selfpara="";if(isIE==true){if(binstalled!="-1"){var referUrl=document.URL;var timestamp=new Date();para="&url2=http://dmtracking2.empresabio.com/feedbackfromalitalk.html?from="+from+"#id="+id+"#refer="+referUrl.replace(/&/ig,"$")+"#time="+timestamp.getTime();selfpara="http://dmtracking2.empresabio.com/feedbackfromalitalk.html?STEP=CLICK&from="+from+"&id="+id+"&refer="+referUrl.replace(/&/ig,"$")+"&time="+timestamp.getTime();logger(selfpara);sendMessage(memberid,para);}else{var url="http://us.my.empresabio.com/mcweb/sendMessage.htm?";url+="selectedIds="+id+"&selectedNames="+escape(displayName)+"&messageType="+messageType;window.open(url);}}else{doIfExploreIsNotSupport();}}
function sendMessage(memberId,paras){sendClientMsg("","","enaliint",memberId,1,"&encrypt=1"+paras);}
function sendMessageNotEn(uid,paras){sendClientMsg("","","enaliint",memberId,1,"&encrypt=1"+paras);}
function alitalkFeedback(memberId,from,id){var binstalled=checkInstallEnaliint();var isIE=true;var para="";if(isIE==true){if(binstalled!="-1"){var referUrl=document.URL;var timestamp=new Date();para="&url2=http://dmtracking2.empresabio.com/feedbackfromalitalk.html?type=client&STEP=CLICK#from="+from+"#id="+id+"#refer="+referUrl.replace(/&/ig,"$")+"#time="+timestamp.getTime();sendMessageNotEn(memberId,para);}else{doForwardTrademanagerIfNotInstalled();}}else{doIfExploreIsNotSupport();}}
function multiImg(maxLen){for(var i=0;i<maxLen;i++){var j=i+1;var alit=document.getElementById("talkId"+j);var noalit=document.getElementById("noAlitalkId"+j);if(online[i]==1){if(alit!=null){alit.className="atm32";alit.innerHTML='I\'m online<br />Chat now!';alit.href=alit.href.replace("isOnline","1");alit.title="TradeManager";}}else if(online[i]==2||online[i]==0){if(alit!=null){alit.className="atm32grey";alit.innerHTML='Offline';alit.href=alit.href.replace("isOnline",online[i].toString());alit.title="Leave me a message";}}}}
function multiImgById(maxLen,id,needInner){if(id==null)return;id=(needInner==1)?"atm32":"atm16";for(var i=0;i<maxLen;i++){var j=i+1;var alit=document.getElementById("talkId"+j);var noalit=document.getElementById("noAlitalkId"+j);if(online[i]==1){if(alit!=null){alit.className=id;if(needInner==1)alit.innerHTML='I\'m online<br />Chat now!';alit.href=alit.href.replace("isOnline","1");alit.title="TradeManager";}}else if(online[i]==2||online[i]==0){if(alit!=null){alit.className=id+"grey";if(needInner==1)alit.innerHTML='Offline';alit.href=alit.href.replace("isOnline",online[i].toString());alit.title="Leave me a message";}}}}
function singleUserImgById(id,needInner){var alit=document.getElementById("talkId32");var noalit=document.getElementById("noAlitalkId32");if(OnLine==1){if(alit!=null){alit.className=id;if(needInner==1)alit.innerHTML='I\'m online<br />Chat now!';alit.href=alit.href.replace("isOnline","1");alit.title="TradeManager";}}else if(OnLine==2||OnLine==0){if(alit!=null){alit.className=id+"grey";if(needInner==1)alit.innerHTML='Offline';alit.href=alit.href.replace("isOnline",OnLine.toString());alit.title="Leave me a message";}}}
function singleUserImgSmall(alitalkId){var alit=document.getElementById(alitalkId);var noalit=document.getElementById("noAli"+alitalkId);if(OnLine==1){if(alit!=null){alit.className="atm32";alit.innerHTML='I\'m online<br />Chat now!';alit.href=alit.href.replace("isOnline","1");alit.title="Chat with me now";}}else if(OnLine==2||OnLine==0){if(alit!=null){alit.className="atm32grey";alit.innerHTML='Offline';alit.href=alit.href.replace("isOnline",OnLine.toString());alit.title="Leave me a message";}}}
function SetCookie(sName,sValue)
{var life=new Date();life.setTime(life.getTime()+365*24*60*60*1000);document.cookie=sName+"="+escape(sValue)+"; expires="+life.toGMTString();;}
function GetCookie(sName)
{var aCookie=document.cookie.split("; ");for(var i=0;i<aCookie.length;i++)
{var aCrumb=aCookie[i].split("=");if(sName==aCrumb[0])
return unescape(aCrumb[1]);}}
function DelCookie(sName)
{var sValue="false";document.cookie=sName+"="+escape(sValue)+"; expires=Fri, 31 Dec 1999 23:59:59 GMT;";}
function clickSave(box){if(box.checked){SetCookie("notShowMsg","true");}else{DelCookie("notShowMsg");}}
function singleUserImg32(alitalkId){YUE.on(window,"load",function(){try{var alitId=alitalkId||"talkId32";var alit=document.getElementById(alitId);var noalit=document.getElementById("noAlitalkId32");if(OnLine==1){if(alit!=null){alit.className="atm48";alit.innerHTML='I\'m online<br />Chat now!';alit.href=alit.href.replace("isOnline","1");alit.title="Chat with me now";}}else if(OnLine==2||OnLine==0){if(alit!=null){alit.className="atm48grey";alit.innerHTML='Offline';alit.href=alit.href.replace("isOnline",OnLine.toString());alit.title="Leave me a message";}}}catch(e){}});}
function singleUserImg16(){YUE.on(window,"load",function(){try{var alit=document.getElementById("talkId16");var noalit=document.getElementById("noAlitalkId16");if(OnLine==1){if(alit!=null){alit.className="atm32";alit.innerHTML='I\'m online<br />Chat now!';alit.href=alit.href.replace("isOnline","1");alit.title="Chat with me now";}}else if(OnLine==2||OnLine==0){if(alit!=null){alit.className="atm32grey";alit.innerHTML='Offline';alit.href=alit.href.replace("isOnline",OnLine.toString());alit.title="Leave me a message";}}}catch(E){}});}
function singleUserImg32test(){var alit=document.getElementById("talkId32");var noalit=document.getElementById("noAlitalkId32");if(OnLine==1){if(alit!=null){alit.className="atm32";alit.innerHTML='Online Chat';alit.href=alit.href.replace("isOnline","1");alit.title="Send an instant message";}}else{if(OnLine==2){if(alit!=null){alit.className="atm32grey";alit.innerHTML='Offline';alit.href=alit.href.replace("isOnline",OnLine.toString());alit.title="Send email message now";}}
else if(OnLine==0){if(alit!=null){alit.className="atm32grey";alit.innerHTML='Offline';alit.href=alit.href.replace("isOnline","0");alit.title="Leave an instant message";}}}}
function singleUserImg16test(){var alit=document.getElementById("talkId16");var noalit=document.getElementById("noAlitalkId16");if(OnLine==1){if(alit!=null){alit.className="atm16";alit.innerHTML='Online Chat';alit.href=alit.href.replace("isOnline","1");alit.title="Send an instant message";}}else{if(OnLine==2){if(alit!=null){alit.className="atm16grey";alit.innerHTML='Offline';alit.href=alit.href.replace("isOnline",OnLine.toString());alit.title="Send email message now";}}
else if(OnLine==0){if(alit!=null){alit.className="atm16grey";alit.innerHTML='Offline';alit.href=alit.href.replace("isOnline","0");alit.title="Leave an instant message";}}}}
var fromSellLeads="0";var fromProduct="1";var fromCompany="2";var fromBuyLead="10";var fromFreeFeedBack="20";var fromGScontact="30";var fromGSFeedBack="40";var wwwServer="http://www.empresabio.com";var imageServer=globalImgServer;function alitalkEncryptNew(enemberId,from,id){var binstalled=checkInstallEnaliint();var isIE=true;var para="";var selfpara="";var nextUrl="";if(isIE==true){if(fromBuyLead==from){buyingLeadsCheckRight(enemberId,from,id)
return;}
if(binstalled!="-1"){var referUrl=document.URL;var timestamp=new Date();if(OnLine==2){para="url2=http://dmtracking2.empresabio.com/feedbackfromalitalk.html?from="+from+"#id="+id+"#refer="+referUrl.replace(/&/ig,"$")+"#time="+timestamp.getTime();selfpara="http://dmtracking2.empresabio.com/feedbackfromalitalk.html?type=client&STEP=CLICK&from="+from+"&id="+id+"&refer="+referUrl.replace(/&/ig,"$")+"&time="+timestamp.getTime();logger(selfpara);win=open(getFeedBackUrl(from,id),'feedBack','fullscreen=yes,location=no,toolbar=no,status=no,resizable=yes,scrollbars=yes');win.focus();}else{para="&url2=http://dmtracking2.empresabio.com/feedbackfromalitalk.html?from="+from+"#id="+id+"#refer="+referUrl.replace(/&/ig,"$")+"#time="+timestamp.getTime();selfpara="http://dmtracking2.empresabio.com/feedbackfromalitalk.html?type=client&STEP=CLICK&from="+from+"&id="+id+"&refer="+referUrl.replace(/&/ig,"$")+"&time="+timestamp.getTime();logger(selfpara);sendMessage(enemberId,para);}}else{if(OnLine==1){win=open(getWebAtmUrl(from,enemberId,id),Math.round(Math.random()*24*100),'width=785,height=600,location=no,toolbar=no,status=no,resizable=yes,scrollbars=no');win.focus();}else{win=open(getFeedBackUrl(from,id),'feedBack','fullscreen=yes,location=no,toolbar=no,status=no,resizable=yes,scrollbars=yes');win.focus();}}}else{doIfExploreIsNotSupport();}}
function targetToWebMessage(enemberId,from,id){var iframe=document.getElementById("webmessagehelpframe")
if(iframe==null){iframe=document.createElement("iframe");iframe.id="webmessagehelpframe"
iframe.width=0;iframe.height=0;document.body.appendChild(iframe);}
iframe.src="http://www.empresabio.com/alitalk/innerie/webMessageCheckPage.htm?needEncypt=true&targetid="+encode(enemberId)+"&from="+from+"&id="+id;}
function alitalkEncryptNew_back(enemberId,from,id){var binstalled=checkInstallEnaliint();var isIE=true;var para="";var selfpara="";var nextUrl="";if(isIE==true){if(fromBuyLead==from){buyingLeadsCheckRight(enemberId,from,id)
return;}
if(binstalled!="-1"){var referUrl=document.URL;var timestamp=new Date();if(OnLine==2){para="url2=http://dmtracking2.empresabio.com/feedbackfromalitalk.html?from="+from+"#id="+id+"#refer="+referUrl.replace(/&/ig,"$")+"#time="+timestamp.getTime();selfpara="http://dmtracking2.empresabio.com/feedbackfromalitalk.html?STEP=CLICK&from="+from+"&id="+id+"&refer="+referUrl.replace(/&/ig,"$")+"&time="+timestamp.getTime();logger(selfpara);startWW("","","");nextUrl=wwwServer+"/others/popup/errormsg_add_invite.html"+"?id="+id+"&fm="+from+"&md="+encode(enemberId);win=open(nextUrl,'addInvite','width=800,height=550,toolbar=no,status=no,resizable=yes,scrollbars=yes');win.focus();}
else{para="url2=http://dmtracking2.empresabio.com/feedbackfromalitalk.html?from="+from+"#id="+id+"#refer="+referUrl.replace(/&/ig,"$")+"#time="+timestamp.getTime();selfpara="http://dmtracking2.empresabio.com/feedbackfromalitalk.html?STEP=CLICK&from="+from+"&id="+id+"&refer="+referUrl.replace(/&/ig,"$")+"&time="+timestamp.getTime();logger(selfpara);window.location="TradeManager:SendIM_Encrypted?"+enemberId+"&"+para;}}else{if(OnLine==1){nextUrl=wwwServer+"/others/popup/errormsg_browser_installtmnow.html"+"?id="+id+"&fm="+from+"&md="+encode(enemberId);doOpenDialogifNotInstalled(nextUrl);}
else{win=open(getFeedBackUrl(from,id),'feedBack','fullscreen=yes,location=no,toolbar=no,status=no,resizable=yes,scrollbars=yes');win.focus();}}}else{doIfExploreIsNotSupport();}}
function alitalkEncryptGetLive(){var binstalled=checkInstallEnaliint();var isIE=checkIEorFirefox();var para="";var selfpara="";var nextUrl="";if(isIE==true){if(binstalled!="-1"){startWW("","","");}else{nextUrl=wwwServer+"/others/popup/errorMsg_Browser_Installnow_For_LiveHelp.vhtml";win=open(nextUrl,'installNow','width=600,height=500,location=no,toolbar=no,status=no,resizable=yes,scrollbars=yes');win.focus();}}else{doIfExploreIsNotSupport();}}
function alitalkEncryptLiveInput(url){var binstalled=checkInstallEnaliint();var isIE=true;var para="";var selfpara="";var nextUrl="";if(isIE==true){if(binstalled!="-1"){startWW("","","");}else{nextUrl=wwwServer+url;win=open(nextUrl,'liveinput','width=600,height=500,location=no,toolbar=no,status=no,resizable=yes,scrollbars=yes');win.focus();}}else{doIfExploreIsNotSupport();}}
function getFeedBackUrl(from,id)
{var feedBackUrl="";if(fromSellLeads==from){feedBackUrl="http://my.empresabio.com/apps/feedback?req_page=feedback.init&domain=0&id="+id;}
else
{feedBackUrl="http://my.empresabio.com/apps/feedback?req_page=feedback.init&domain="+from+"&id="+id;}
return feedBackUrl;}
function urlAddQueryString(baseUrl,queryString){if(baseUrl!=null){if(baseUrl.indexOf("?")==-1){return baseUrl+"?"+queryString;}
return baseUrl+"&"+queryString;}
return baseUrl;}
function makeFeedBackElement(elementId,from,id,openStyle){var fbElement=document.getElementById(elementId);if(fbElement==null)return;feedbackUrl=getFeedBackUrl(from,id);if(openStyle=="0"){fbElement.href=feedbackUrl;}
else{var winUrl=feedbackUrl;fbElement.href="javascript:openMaxWin('"+winUrl+"'"+",'');";}}
function makeFeedBackButton(elementId,from){var fbElement=document.getElementById(elementId);if(fbElement==null)return;if(fromSellLeads==from||fromProduct==from||fromCompany==from){fbElement.src=imageServer+"/images/eng/style/button/inquire_now.gif";fbElement.alt="Inquire Now";}
else{fbElement.src=imageServer+"/images/eng/style/button/send_quotation.gif";fbElement.alt="Quotation Now";}}
function openMaxWin(winUrl,name){if(winUrl==null)return;win=open(winUrl,name,'fullscreen=yes,menubar=no,toolbar=no,directories=no,location=no,status=no,scrollbars=yes,resizable=yes');win.focus();}
function startTM(from,id){var binstalled=checkInstallEnaliint();var isIE=true;if(isIE==true&&binstalled!="-1"){startWW("","","");}}
function validateTM(enemberId,from,id){var binstalled=checkInstallEnaliint();var isIE=true;if(isIE==true&&binstalled!="-1"){var referUrl=document.URL;var timestamp=new Date();para="&url2=http://dmtracking2.empresabio.com/feedbackfromalitalk.html?from="+from+"#id="+id+"#refer="+referUrl.replace(/&/ig,"$")+"#time="+timestamp.getTime();sendMessage(enemberId,para);}}
function buyingLeadsCheckRight(enemberId,from,id){checkUrl=wwwServer+"/others/popup/TmBuyingLeadsStepAfterSignIn.html"+"?offerid="+id+"&fm="+from+"&md="+encode(enemberId);win=open(checkUrl,'checkRight'+Math.round(Math.random()*24*100),'width=800,height=550,location=no,toolbar=no,status=no,resizable=yes,scrollbars=yes');win.focus();}
function alitalkEncryptNewBuyingLeads(enemberId,from,id){var binstalled=checkInstallEnaliint();var isIE=true;var para="";var selfpara="";var nextUrl="";if(isIE==true){if(binstalled!="-1"){var referUrl=document.URL;var timestamp=new Date();if(OnLine==2){para="url2=http://dmtracking2.empresabio.com/feedbackfromalitalk.html?from="+from+"#id="+id+"#refer="+referUrl.replace(/&/ig,"$")+"#time="+timestamp.getTime();selfpara="http://dmtracking2.empresabio.com/feedbackfromalitalk.html?type=client&STEP=CLICK&from="+from+"&id="+id+"&refer="+referUrl.replace(/&/ig,"$")+"&time="+timestamp.getTime();logger(selfpara);win=open(getFeedBackUrl(from,id),'feedBack','fullscreen=yes,location=no,toolbar=no,status=no,resizable=yes,scrollbars=yes');win.focus();}
else{para="&url2=http://dmtracking2.empresabio.com/feedbackfromalitalk.html?from="+from+"#id="+id+"#refer="+referUrl.replace(/&/ig,"$")+"#time="+timestamp.getTime();selfpara="http://dmtracking2.empresabio.com/feedbackfromalitalk.html?type=client&STEP=CLICK&from="+from+"&id="+id+"&refer="+referUrl.replace(/&/ig,"$")+"&time="+timestamp.getTime();logger(selfpara);sendMessage(enemberId,para);window.setTimeout("window.close()",1000);}}else{if(OnLine==1){window.location=getWebAtmUrl(from,enemberId,id);window.moveTo(0,0);window.resizeTo(785,710);}else{window.location=getFeedBackUrl(from,id)
window.moveTo(0,0);window.resizeTo(screen.availWidth,screen.availHeight);}}}else{doIfExploreIsNotSupport();}}
function startorInstallTM(enemberId){var binstalled=checkInstallEnaliint();var isIE=true;if(isIE==true){if(binstalled!="-1"){startWW("","","");}
else{alert("you must first install TradeManager.");doForwardTrademanagerIfNotInstalled();}}else{doIfExploreIsNotSupport();}}
function multiImgSmall(maxLen){for(var i=0;i<maxLen;i++){var j=i+1;var alit=document.getElementById("talkId"+j);var noalit=document.getElementById("noAlitalkId"+j);if(online[i]==1){if(alit!=null){alit.className="atm32";alit.innerHTML='I\'m online<br />Chat now!';alit.href=alit.href.replace("isOnline","1");alit.title="Chat with me now";}}else if(online[i]==2||online[i]==0){if(alit!=null){alit.className="atm32grey";alit.innerHTML='Offline';alit.href=alit.href.replace("isOnline",online[i].toString());alit.title="Leave me a message";}}}}
function startAlitalk(){var binstalled=checkInstallEnaliint();var isIE=true;if(isIE==true){if(binstalled!="-1"){startWW("","","");}else{doForwardTrademanagerIfNotInstalled();}}else{doIfExploreIsNotSupport();}}
function userDefineATM(objId,id,needInner){var alit=document.getElementById(objId);if(OnLine==1){if(alit!=null){alit.className=id;if(needInner==1)alit.innerHTML='I\'m online<br />Chat now!';alit.href=alit.href.replace("isOnline","1");alit.title="Chat with me now";}}else if(OnLine==2||OnLine==0){if(alit!=null){alit.className=id+"grey";if(needInner==1)alit.innerHTML='Offline';alit.href=alit.href.replace("isOnline",OnLine.toString());alit.title="Leave me a message";}}}
function singleUserImg24(talkId){var id=talkId||'talkId24';YUE.on(window,"load",function(){try{var alit=document.getElementById(id);var noalit=document.getElementById('noAli'+id);if(OnLine==1){if(alit!=null){alit.className="atm48";if(id=="talkId16")alit.className="atm16";if(id=="talkId24")alit.className="atm32";if(id=="talkId32")alit.className="atm48";if(id=="talkId16"){alit.innerHTML='Chat now!';}else{alit.innerHTML='I\'m online<br />Chat now!';}
alit.href=alit.href.replace("isOnline","1");alit.title="Chat with me now";}}else if(OnLine==2||OnLine==0){if(alit!=null){alit.className="atm48grey";if(id=="talkId16")alit.className="atm16grey";if(id=="talkId24")alit.className="atm32grey";if(id=="talkId32")alit.className="atm48grey";alit.innerHTML='Offline';alit.href=alit.href.replace("isOnline",OnLine.toString());alit.title="Leave me a message";}}}catch(E){}});}
function singleUserImg48(talkId){var id=talkId||'talkId48';YUE.on(window,"load",function(){try{var alit=document.getElementById(id);var noalit=document.getElementById('noAli'+id);if(OnLine==1){if(alit!=null){alit.className="atm48";alit.innerHTML='I\'m online<br />Chat now!';alit.href=alit.href.replace("isOnline","1");alit.title="Chat with me now";}}else if(OnLine==2||OnLine==0){if(alit!=null){alit.className="atm48grey";alit.innerHTML='Offline';alit.href=alit.href.replace("isOnline",OnLine.toString());alit.title="Leave me a message";}}}catch(E){}});}
function atmMultiImg(maxLen,atmClass,needInner){for(var i=0;i<maxLen;i++){var j=i+1;var alit=document.getElementById("talkId"+j);var noalit=document.getElementById("noAlitalkId"+j);if(online[i]==1&&alit!=null){alit.className=atmClass;alit.innerHTML=(needInner)?'I\'m online<br />Chat now!':'';alit.href=alit.href.replace("isOnline","1");alit.title="TradeManager";}else if((online[i]==2||online[i]==0)&&alit!=null){alit.className=atmClass+"grey";alit.innerHTML=(needInner)?'Offline':'';alit.href=alit.href.replace("isOnline",online[i].toString());alit.title="Leave me a message";}}}
function atmSingleImg(atmId,atmClass,needInner,userText){atmId=atmId||'talkId32';atmClass=atmClass||'atm32';userText=userText||['I\'m online<br />Chat now!','Offline'];var alit=document.getElementById(atmId);var noalit=document.getElementById('noAli'+atmId);if(OnLine==1&&alit!=null){alit.className=atmClass;alit.innerHTML=(needInner)?userText[0]:'';alit.href=alit.href.replace("isOnline","1");alit.title="TradeManager";}else if((OnLine==2||OnLine==0)&&alit!=null){alit.className=atmClass+"grey";alit.innerHTML=(needInner)?userText[1]:'';alit.href=alit.href.replace("isOnline",OnLine.toString());alit.title="Leave me a message";}}

divCycle=function(){var oComponent=this;var oDefConfig={sTabClass:'productCycleTab',sItemClass:'productCycleItem',oParentNode:document.body,sSwitchEvent:'click',iDelayTime:3000,iCycleTimes:1,sCurrentClass:'current',sOrder:'asc',currentIndex:null}
var aTabs,aItems,oParent;var iDelayTime;var oTimer;var currentIndex=0;var dataLength;var iCycleTimes=0;var isLock=false;oComponent.onSwitch=new YAHOO.util.CustomEvent("switch");oComponent.init=function(oConfig){oDefConfig=YL.merge(oDefConfig,oConfig||{});aTabs=YUD.getElementsByClassName(oDefConfig.sTabClass,'*',oDefConfig.oParentNode);aItems=YUD.getElementsByClassName(oDefConfig.sItemClass,'*',oDefConfig.oParentNode);oParent=oDefConfig.oParentNode;dataLength=Math.min(aTabs.length,aItems.length);if(oDefConfig.sOrder=="desc"&&!oDefConfig.currentIndex){currentIndex=dataLength-1;}else if(oDefConfig.currentIndex){currentIndex=oDefConfig.currentIndex;}
YUE.on(aTabs,"mouseover",oComponent.stop);YUE.on(aTabs,"mouseout",oComponent.start);YUE.on(aItems,"mouseover",oComponent.stop);YUE.on(aItems,"mouseout",oComponent.start);for(i=0;i<dataLength;i++){YUE.on(aTabs[i],oDefConfig.sSwitchEvent,oComponent.show,i);}
if(oDefConfig.iCycleTimes>0){oComponent.start();}else{switchItem();}}
oComponent.start=function(){clearInterval(oTimer);oTimer=setInterval(switchItem,oDefConfig.iDelayTime);}
oComponent.stop=function(){clearInterval(oTimer);}
oComponent.show=function(e,iIndex){if(isLock||!YL.isNumber(iIndex)||iIndex<0||iIndex>=dataLength){return false;}
currentIndex=iIndex;var f1=function(element){return YUD.removeClass(element,oDefConfig.sCurrentClass);}
YUD.batch(aTabs,f1);YUD.addClass(aTabs[iIndex],oDefConfig.sCurrentClass);YUD.setStyle(aItems,"display","none");YUD.setStyle(aItems[iIndex],"display","");oComponent.onSwitch.fire();}
var switchItem=function(){if(isLock){return;};oComponent.show(null,currentIndex);if(iCycleTimes>=oDefConfig.iCycleTimes){oComponent.stop();YUE.removeListener(aTabs,"mouseover",oComponent.stop);YUE.removeListener(aTabs,"mouseout",oComponent.start);YUE.removeListener(aItems,"mouseover",oComponent.stop);YUE.removeListener(aItems,"mouseout",oComponent.start);switch(oDefConfig.sOrder){case("asc"):{}
case("desc"):{break;}}}
switch(oDefConfig.sOrder){case("asc"):{currentIndex++;if(currentIndex>=dataLength){currentIndex=0;iCycleTimes++;}
break;}
case("desc"):{currentIndex--;if(currentIndex<0){currentIndex=dataLength-1;iCycleTimes++;}
break;}}}
oComponent.getCurrentIndex=function(){return currentIndex;}
oComponent.lock=function(){isLock=true;}
oComponent.unLock=function(){isLock=false;}}

floatDiv=function(){var oComponent=this;var oTarget,oContent,aExcursion;var hiddenDelayTimer;var showDelayTimer;var contentAnimShow,contentAnimHidden;var canClose=true;var oDefaultConfig={showConfig:{opacity:{to:1}},hiddenConfig:{opacity:{to:0}},showTime:0.8,hiddenTime:0.3,sFireEvent:"mouseover",needMask:false,oAppliedFunction:YAHOO.util.Easing.easeOut}
var maskIframe,isShowed=false;oComponent.init=function(sTagId,sContentId,excursion,oConfig){YL.isArray(excursion)?aExcursion=excursion:aExcursion=[0,0];oTarget=get(sTagId);oContent=get(sContentId);if(!oConfig&&!YL.isObject(oConfig)){oConfig={}}
(YL.isObject(oConfig.showConfig))?oDefaultConfig.showConfig=oConfig.showConfig:null;(YL.isObject(oConfig.hiddenConfig))?oDefaultConfig.hiddenConfig=oConfig.hiddenConfig:null;(YL.isNumber(oConfig.showTime))?oDefaultConfig.showTime=oConfig.showTime:null;(YL.isNumber(oConfig.hiddenTime))?oDefaultConfig.hiddenTime=oConfig.hiddenTime:null;(YL.isString(oConfig.sFireEvent))?oDefaultConfig.sFireEvent=oConfig.sFireEvent:null;(YL.isFunction(oConfig.oAppliedFunction))?oDefaultConfig.oAppliedFunction=oConfig.oAppliedFunction:null;(YL.isBoolean(oConfig.needMask))?oDefaultConfig.needMask=oConfig.needMask:null;contentAnimShow=new YAHOO.util.Anim(oContent,oDefaultConfig.showConfig,oDefaultConfig.showTime,oDefaultConfig.oAppliedFunction);contentAnimHidden=new YAHOO.util.Anim(oContent,oDefaultConfig.hiddenConfig,oDefaultConfig.hiddenTime,oDefaultConfig.oAppliedFunction);contentAnimShow.onStart.subscribe(oComponent.openDirect);contentAnimShow.onComplete.subscribe(afterShowAnim);contentAnimHidden.onComplete.subscribe(oComponent.closeDirect);if(oDefaultConfig.sFireEvent=="click"){YUE.on(oTarget,"mouseover",function(){canClose=false;});YUE.on(oTarget,"mouseout",function(){canClose=true;});YUE.on(oContent,"mouseover",function(){canClose=false;});YUE.on(oContent,"mouseout",function(){canClose=true;});YUE.on(oTarget,oDefaultConfig.sFireEvent,oComponent.showContent);YUE.on(document.body,oDefaultConfig.sFireEvent,oComponent.hiddenContent);}else{YUE.on(oTarget,"mouseover",function(){canClose=false;});YUE.on(oTarget,"mouseout",function(){canClose=true;});YUE.on(oContent,"mouseover",function(){canClose=false;});YUE.on(oContent,"mouseout",function(){canClose=true;});YUE.on(oTarget,oDefaultConfig.sFireEvent,oComponent.showContent);YUE.on(oTarget,"mouseout",oComponent.hiddenContent);YUE.on(oContent,oDefaultConfig.sFireEvent,oComponent.showContent);YUE.on(oContent,"mouseout",oComponent.hiddenContent);}
if(oDefaultConfig.needMask){maskIframe=document.createElement("iframe");maskIframe.className="maskIframe";maskIframe.zIndex=oContent.zIndex+1;maskIframe.frameborder=0;document.body.appendChild(maskIframe);maskIframe.style.display="none";}else{maskIframe=null;}}
var showContentDelay=function(e){try{YUE.stopEvent(e);}catch(E){}
contentAnimHidden.stop(false);var xy=YUD.getXY(oTarget);oContent.style.display="";YUD.setXY(oContent,[(xy[0]+aExcursion[0]),(xy[1]+aExcursion[1])]);if(maskIframe){maskIframe.style.display="";YUD.setXY(maskIframe,[(xy[0]+aExcursion[0]),(xy[1]+aExcursion[1])]);}
contentAnimShow.animate();isShowed=true;}
oComponent.hiddenContentDelay=function(e){if(!canClose){return;}
contentAnimShow.stop(false);contentAnimHidden.animate();isShowed=false;}
oComponent.hiddenContentForce=function(e){contentAnimShow.stop(false);contentAnimHidden.animate();isShowed=false;}
oComponent.closeDirect=function(e){try{YUE.stopEvent(e);}catch(E){}
oContent.style.display="none";if(maskIframe){maskIframe.style.display="none";}
isShowed=false;}
oComponent.openDirect=function(e){try{YUE.stopEvent(e);}catch(E){}
oContent.style.display="";if(maskIframe){maskIframe.style.display="";var w,h;(contentAnimShow.attributes.width&&contentAnimShow.attributes.width.to)?w=contentAnimShow.attributes.width.to:w=oContent.offsetWidth;(contentAnimShow.attributes.height&&contentAnimShow.attributes.height.to)?h=contentAnimShow.attributes.height.to:h=oContent.offsetHeight;maskIframe.style.width=w+"px";maskIframe.style.height=h+"px";}
isShowed=true;}
var afterShowAnim=function(){if(maskIframe){maskIframe.style.width=oContent.offsetWidth+"px";maskIframe.style.height=oContent.offsetHeight+"px";}}
oComponent.showContent=function(e){try{YUE.stopEvent(e);}catch(E){}
(showDelayTimer!=null)?clearTimeout(showDelayTimer):false;showDelayTimer=setTimeout(showContentDelay,200);}
oComponent.hiddenContent=function(e){(hiddenDelayTimer!=null)?clearTimeout(hiddenDelayTimer):false;hiddenDelayTimer=setTimeout(oComponent.hiddenContentDelay,200);}}

if(!AE.widget.itemViewer){AE.widget.itemViewer=function(){var oComponent=this;var oDefConfig={itemSize:[0,0],itemNum:6,showenItemNum:0,step:3,animTime:1,orientation:"h",toward:-1,fireFunction:YAHOO.util.Easing.easeBothStrong,itemContainerId:"itemViewerContainer",itemClassName:"itemViewerItem",preBtnId:"itemViewerPre",nextBtnId:"itemViewerNext",navContainerId:"itemViewerNav",getDataUrl:false,dataFormId:false,upFront:2,btnFireEvent:"click",navFireEvent:"click",autoCycleTimes:false,cycleDelay:2000,loadTextLength:50,navCurrentClass:"current"}
var config;var preBtn,nextBtn,navContainer,itemContainer;var anim;var isInited=false;var basePoint=[0,0];var currentIndex=0;var pageNum,loadedItemNum;var loadDataForm,canGetData=true,loadDataLength;var cycleTimer,cycleTimes=0;oComponent.onDisablePre=new YAHOO.util.CustomEvent("disablePre",oComponent);oComponent.onEnablePre=new YAHOO.util.CustomEvent("enablePre",oComponent);oComponent.onDisableNext=new YAHOO.util.CustomEvent("disableNext",oComponent);oComponent.onEnableNext=new YAHOO.util.CustomEvent("enableNext",oComponent);oComponent.init=function(oConfig){if(isInited)return false;config=AE.cpAttribute(oConfig,oDefConfig);if(config.itemNum<0){isInited=true;return false;}
try{preBtn=get(config.preBtnId);nextBtn=get(config.nextBtnId);}catch(E){preBtn=false;nextBtn=false;}
if(config.showenItemNum==0)
config.showenItemNum=config.step;itemContainer=get(config.itemContainerId);if(config.step!=0){pageNum=Math.ceil((config.itemNum-config.showenItemNum)/config.step)+1;}else{pageNum=0;}
creatNav();basePoint=YUD.getXY(itemContainer.parentNode);loadedItemNum=YUD.getElementsByClassName(config.itemClassName,'*',itemContainer).length;loadDataLength=loadedItemNum.toString();fixContainer();anim=new YAHOO.util.Motion(config.itemContainerId,{points:{to:basePoint}},config.animTime,config.fireFunction)
if(config.dataFormId)createForm();if(preBtn){YUE.on(preBtn,config.btnFireEvent,oComponent.fPre);YUE.on(nextBtn,config.btnFireEvent,oComponent.fNext);}
setPointTo(0);createAutoCycle();isInited=true;return true;};oComponent.fPre=function(e){if(e)YUE.stopEvent(e);if(anim.isAnimated())return false;--currentIndex;if(setPointTo(currentIndex)){setCurrentNavClass(currentIndex);anim.animate();}};oComponent.fNext=function(e){if(e)YUE.stopEvent(e);if(anim.isAnimated())return false;++currentIndex;if(setPointTo(currentIndex)){setCurrentNavClass(currentIndex);anim.animate();}};oComponent.show=function(e,iPageNum){if(e)YUE.stopEvent(e);if(anim.isAnimated())return false;if(!YL.isNumber(iPageNum))return false;var iIndex=iPageNum-1;if(iIndex<0){iIndex=0}
if(iIndex>=pageNum){iIndex=pageNum-1}
currentIndex=iIndex;if(setPointTo(currentIndex)){setCurrentNavClass(currentIndex);anim.animate();}};oComponent.showDirectly=function(e,iPageNum){if(e)YUE.stopEvent(e);if(anim.isAnimated())return false;if(!YL.isNumber(iPageNum))return false;var iIndex=iPageNum-1;if(iIndex<0){iIndex=0}
if(iIndex>=pageNum){iIndex=pageNum-1}
currentIndex=iIndex;if(setPointTo(currentIndex)){setCurrentNavClass(currentIndex);anim.animate();anim.stop(true);}};oComponent.getIndex=function(){return currentIndex;}
var creatNav=function(){try{navContainer=get(config.navContainerId)}catch(E){navContainer=false;return false;}
if(!navContainer)return false;for(var i=1,tmpA={};i<=pageNum;i++){tmpA=document.createElement("a");tmpA.href="javascript:void(0)";if(i==1){tmpA.className=config.navCurrentClass}
tmpA.innerHTML=i;YUE.on(tmpA,config.navFireEvent,oComponent.show,i);navContainer.appendChild(tmpA);}};var setCurrentNavClass=function(iIndex){if(!navContainer)return false;var items=navContainer.getElementsByTagName("a");YUD.removeClass(items,config.navCurrentClass);YUD.addClass(items[iIndex],config.navCurrentClass);}
var createAutoCycle=function(){if(!config.autoCycleTimes)return false;cycleTimer=setTimeout(doCycle,config.cycleDelay);if(navContainer){YUE.on(navContainer,"mouseover",cycleStop);YUE.on(navContainer,"mouseout",cycleStart);YUE.on(itemContainer,"mouseover",cycleStop);YUE.on(itemContainer,"mouseout",cycleStart);}
if(preBtn){YUE.on(preBtn,"mouseover",cycleStop);YUE.on(preBtn,"mouseout",cycleStart);YUE.on(nextBtn,"mouseover",cycleStop);YUE.on(nextBtn,"mouseout",cycleStart);}}
var cycleStop=function(e){YUE.stopEvent(e);clearTimeout(cycleTimer);}
var cycleStart=function(e){YUE.stopEvent(e);cycleTimer=setTimeout(doCycle,config.cycleDelay);}
var doCycle=function(){clearTimeout(cycleTimer);if(currentIndex>=pageNum-1){currentIndex=-1;cycleTimes++;}
if(cycleTimes>=config.autoCycleTimes){clearTimeout(cycleTimer);if(navContainer){YUE.removeListener(navContainer,"mouseover",cycleStop);YUE.removeListener(navContainer,"mouseout",cycleStart);}
if(preBtn){YUE.removeListener(preBtn,"mouseover",cycleStop);YUE.removeListener(preBtn,"mouseout",cycleStart);YUE.removeListener(nextBtn,"mouseover",cycleStop);YUE.removeListener(nextBtn,"mouseout",cycleStart);}
YUE.removeListener(itemContainer,"mouseover",cycleStop);YUE.removeListener(itemContainer,"mouseout",cycleStart);oComponent.show(null,1);return;}else{cycleTimer=setTimeout(doCycle,config.cycleDelay);}
oComponent.fNext();}
var setPointTo=function(targetIndex){if(targetIndex<=0){disablePre();if(targetIndex<0){currentIndex=0;return false;}}else{enablePre();}
if(targetIndex>=pageNum-1){disableNext();if(targetIndex>=pageNum){currentIndex=pageNum-1;return false;}}else{enableNext();}
if(config.dataFormId)getItems(targetIndex+1);basePoint=YUD.getXY(itemContainer.parentNode);var x=targetIndex*config.step*config.toward*config.itemSize[0]+basePoint[0];var y=targetIndex*config.step*config.toward*config.itemSize[1]+basePoint[1];switch(config.orientation){case"h":{anim.attributes.points.to=[basePoint[0],y];break;}
case"w":{anim.attributes.points.to=[x,basePoint[1]];break;}};return true;}
var disablePre=function(){oComponent.onDisablePre.fire();};var enablePre=function(){oComponent.onEnablePre.fire();};var disableNext=function(){oComponent.onDisableNext.fire();};var enableNext=function(){oComponent.onEnableNext.fire();};var fixContainer=function(){switch(config.orientation){case"h":{var h=config.itemSize[1]*config.itemNum;itemContainer.style.height=h+"px";break;}
case"w":{var w=config.itemSize[0]*config.itemNum;itemContainer.style.width=w+"px";break;}};};var createForm=function(){loadDataForm=get(config.dataFormId);YUD.setStyle(loadDataForm,"display","none");}
var getItems=function(iPageNum){if(!canGetData)return false;var currentRequestLength=iPageNum*config.step;if(currentRequestLength<=loadedItemNum-(config.step*config.upFront)||loadedItemNum>=config.itemNum)return false;var getItemsCallback={success:getItemsSuccess,failure:getItemsFailure,argument:[]};if(!config.getDataUrl)return false;canGetData=false;loadDataForm.startIndex.value=loadedItemNum;YAHOO.util.Connect.setForm(loadDataForm.id);var request=YAHOO.util.Connect.asyncRequest('POST',config.getDataUrl,getItemsCallback);};var getItemsSuccess=function(o){if(o.responseText!==undefined){itemContainer.innerHTML+=o.responseText;loadedItemNum=YUD.getElementsByClassName(config.itemClassName,'*',itemContainer).length;}
canGetData=true;};var getItemsFailure=function(o){if(o.responseText!==undefined){}
canGetData=true;};}}

if(!AE.widget.clickShow){AE.widget.clickShow=function(){var _self=this;var defConfig={targetId:"clickShowTargetId",switchId:"",contentId:"clickShowContentId",bodyClickClose:true,showOrHidden:true,needMask:false,needXY:true,excursion:[0,0],closeBtnsClassName:"",onInit:function(){},unInit:function(){},onShow:function(){},unShow:function(){},onHidden:function(){},unHidden:function(){}};var config;var isInited=false;var dTarget,dContent,dSwitch,iframeMask;var canClose=true;_self.init=function(oConfig){if(isInited)return false;config=TB.applyIf(oConfig||{},defConfig);config.onInit.apply(_self);dTarget=get(config.targetId);dContent=get(config.contentId);dSwitch=(config.switchId==""?dTarget:get(config.switchId));dCloseBtns=(config.closeBtnsClassName==""?[]:YUD.getElementsByClassName(config.closeBtnsClassName,"*",dContent));if(!dSwitch)
return;YUE.on(dTarget,"click",_self.showDirectly);if(config.bodyClickClose){YUE.on(document.body,"click",_self.hiddenDirectly);}
if(dCloseBtns){YUE.on(dCloseBtns,"click",function(){_self.hiddenDirectly(null,true)});}
YUE.on(dSwitch,"mouseover",function(){canClose=false;});YUE.on(dContent,"mouseover",function(){canClose=false;});YUE.on(dSwitch,"mouseout",function(){canClose=true;});YUE.on(dContent,"mouseout",function(){canClose=true;});if(config.needMask){iframeMask=document.createElement("iframe");iframeMask.className="maskIframe";iframeMask.style.display="none";iframeMask.style.zIndex=YUD.getStyle(dContent,'zIndex')-1;iframeMask.style.top="0px";iframeMask.style.left="0px";iframeMask.frameBorder=0;dContent.parentNode.appendChild(iframeMask);}
config.unInit.apply(_self);_self.afterHidden=new YAHOO.util.CustomEvent("afterHidden",_self);};_self.showDirectly=function(){config.onShow.apply(_self);if(config.showOrHidden&&dContent.style.display!="none"){canClose=false;_self.hiddenDirectly(null,true);return;}
if(config.needXY){var xy=YUD.getXY(dTarget);dContent.style.visibility='hidden';dContent.style.display="";parsePos(config.excursion);xy[0]+=config.excursion[0];xy[1]+=config.excursion[1];dContent.style.visibility='visible';YUD.setXY(dContent,xy);}else{dContent.style.display="";}
if(config.needMask){iframeMask.style.display="";iframeMask.style.width=dContent.offsetWidth+"px";iframeMask.style.height=dContent.offsetHeight+"px";if(config.needXY){YUD.setXY(iframeMask,xy);}
iframeMask.style.visibility="visible";}
config.unShow.apply(_self);};_self.hiddenDirectly=function(ev,force){config.onHidden.apply(_self);if(canClose||force){_self.afterHidden.fire();dContent.style.display="none";if(config.needMask){iframeMask.style.display="none";}
config.unHidden.apply(_self);}};_self.getConfig=function(){return config;};var parsePos=function(aPos){if(typeof(aPos[0])=="string"){switch(aPos[0]){case'center':aPos[0]=parseInt(dTarget.offsetWidth/2);break;case'right':aPos[0]=(dSwitch.offsetWidth-dContent.offsetWidth);break;default:aPos[0]=0;}}
if(typeof(aPos[1])=="string"){switch(aPos[1]){case'center':aPos[1]=paseInt(dTarget.offsetHeight/2);break;case'bottom':aPos[1]=dTarget.offsetHeight;break;default:aPos[1]=0;}}
return aPos;}};}

function noticeCycle(objArray,speed,outTime,divHeight){if(!YL.isArray(objArray)){objArray=[];}
this.divHeight=divHeight;this.speed=speed;this.outTime=outTime;this.lastID=0;this.divObjArray=objArray;this.counter=0;this.timer;this.nextID=this.lastID+1;if(this.nextID>=this.divObjArray.length){this.nextID=0;}
if(this.divObjArray.length>0){this.divObjArray[0].style.top="0px";}
this.doCycle=function(objName){if(this.divObjArray.length<=1){this.stop();return false;}
var nextCounter=this.divHeight-this.counter;this.divObjArray[this.lastID].style.top="-"+this.counter+"px";this.divObjArray[this.nextID].style.top=nextCounter+"px";this.counter++;if(this.counter>this.divHeight){this.counter=0;this.clearTimer();this.lastID=this.nextID;if(this.lastID>=this.divObjArray.length){this.lastID=0;}
this.nextID=this.lastID+1;if(this.nextID>=this.divObjArray.length){this.nextID=0;}
this.clearTimer();this.timer=setTimeout(objName+".doCycle('"+objName+"');",this.outTime);return;}
this.clearTimer();this.timer=setTimeout(objName+".doCycle('"+objName+"');",this.speed);}
this.stop=function(){this.clearTimer();return;}
this.start=function(objName){this.clearTimer();this.timer=setTimeout(objName+".doCycle('"+objName+"')",this.outTime);return;}
this.clearTimer=function(){if(this.timer){clearTimeout(this.timer);return;}}}

if(!AE.widget.overShow){AE.widget.overShow=function(){var oComponent=this;var oDefConfig={targetId:"overShowTargetId",positionId:false,contentId:"overShowContentId",showDelayTime:200,hiddenDelayTime:200,excursion:[0,0],needMask:false,needXY:true,closeBtnClass:"close-button"};var config;var isInited=false;var dTarget,dPosition,dContent,iframeMask;var delayTimer=false;var canClose=true,contentShowed=false,holded=false;oComponent.hold=function(){holded=true;}
oComponent.setFree=function(){holded=false;}
oComponent.afterShow=new YAHOO.util.CustomEvent("afterShow",oComponent);oComponent.afterShowDelay=new YAHOO.util.CustomEvent("afterShowDelay",oComponent);oComponent.afterHidden=new YAHOO.util.CustomEvent("afterHidden",oComponent);oComponent.afterHiddenDelay=new YAHOO.util.CustomEvent("afterHiddenDelay",oComponent);oComponent.init=function(oConfig){if(isInited)return false;config=AE.cpAttribute(oConfig,oDefConfig);dTarget=get(config.targetId);dPosition=config.positionId?get(config.positionId):false;dContent=get(config.contentId);YUE.on(dTarget,"mouseover",oComponent.showDelay);YUE.on(dContent,"mouseover",oComponent.showDelay);YUE.on(dTarget,"mouseout",oComponent.hiddenDelay);YUE.on(dContent,"mouseout",oComponent.hiddenDelay);YUE.on(dTarget,"mouseover",function(){canClose=false;});YUE.on(dContent,"mouseover",function(){canClose=false;});YUE.on(dTarget,"mouseout",function(){canClose=true;});YUE.on(dContent,"mouseout",function(){canClose=true;});if(config.needMask){iframeMask=document.createElement("iframe");iframeMask.className="maskIframe";iframeMask.style.display="none";iframeMask.style.zIndex=YUD.getStyle(dContent,'zIndex')-1;iframeMask.style.top="0px";iframeMask.style.left="0px";iframeMask.frameBorder=0;dContent.parentNode.appendChild(iframeMask);}
var closeBtns=YUD.getElementsByClassName(config.closeBtnClass);if(closeBtns){YUE.on(closeBtns,"click",function(){canClose=true;oComponent.hiddenDirectly();});}}
oComponent.showDelay=function(e){oComponent.afterShowDelay.fire();if(delayTimer){clearTimeout(delayTimer);}
delayTimer=setTimeout(oComponent.showDirectly,config.showDelayTime);}
oComponent.showDirectly=function(){if(contentShowed||holded){return;}
dContent.style.visibility='hidden';dContent.style.display="";if(config.needXY){var xy=YUD.getXY(dPosition||dTarget);parsePos(config.excursion);xy[0]+=config.excursion[0];xy[1]+=config.excursion[1];}
dContent.style.visibility='visible';dContent.style.display='';if(config.needXY){YUD.setXY(dContent,xy);}
oComponent.afterShow.fire();contentShowed=true;if(config.needMask){iframeMask.style.display="";iframeMask.style.width=dContent.offsetWidth+"px";iframeMask.style.height=dContent.offsetHeight+"px";if(config.needXY){YUD.setXY(iframeMask,xy);}
iframeMask.style.visibility="visible";}}
oComponent.hiddenDelay=function(e){oComponent.afterHiddenDelay.fire();if(holded==true){return;}
if(delayTimer){clearTimeout(delayTimer);}
delayTimer=setTimeout(oComponent.hiddenDirectly,config.hiddenDelayTime);}
oComponent.hiddenDirectly=function(){if(!canClose){return false;}
oComponent.afterHidden.fire();dContent.style.display="none";if(config.needMask){iframeMask.style.display="none";}
contentShowed=false;}
var parsePos=function(aPos){if(typeof(aPos[0])=='string'){if(aPos[0]=='auto'){(isContentOverflow())?aPos[0]='right':aPos[0]='left';}
switch(aPos[0]){case'center':aPos[0]=paseInt(dPosition?dPosition.offsetWidth/2:dTarget.offsetWidth/2);break;case'right':aPos[0]=((dPosition?dPosition.offsetWidth:dTarget.offsetWidth)-dContent.offsetWidth);break;default:aPos[0]=0;}}
if(typeof(aPos[1])=='string'){switch(aPos[1]){case'center':aPos[1]=paseInt(dPosition?dPosition.offsetHeight/2:dTarget.offsetHeight/2);break;case'bottom':aPos[1]=dPosition?dPosition.offsetHeight:dTarget.offsetHeight;break;default:aPos[1]=0;}}
return aPos;}
var isContentOverflow=function(){return document.body.offsetWidth<(YUD.getX(dPosition||dTarget)+dContent.offsetWidth);}}}

AE.namespace('AE.fix.imageLoader');AE.fix.imageLoader=function(){var im=new Image();for(var i=0,j=arguments.length;i<j;i++){im.src=arguments[i];}};

AE.namespace('AE.widget.scriptLoader');AE.widget.scriptLoader=function(){var _self=this;var requestQuee=[];var defConfig={onSuccess:function(){},isLoadImmediately:false,isParallelLoad:false};var config={};var loadedCounter=0,requestCounter=0;var canRunSuccessFun=false;_self.init=function(oConfig){config=YL.merge(defConfig,oConfig||{});};_self.pushRequest=function(sRequestUrl){requestQuee.push(sRequestUrl);++requestCounter;if(config.isLoadImmediately){if(config.isParallelLoad){parallelLoad();}else{serialLoad();}}};_self.load=function(onSuccessFun){if(onSuccessFun){config.onSuccess=onSuccessFun;}
canRunSuccessFun=true;if(config.isParallelLoad){parallelLoad();}else{serialLoad();}};var serialLoad=function(){if(requestQuee.length>0){var sUrl=requestQuee[0];requestQuee=requestQuee.slice(1);YAHOO.util.Get.script(sUrl,{onSuccess:loadSuccess});}};var parallelLoad=function(){while(requestQuee.length){YAHOO.util.Get.script(requestQuee[0],{onSuccess:loadSuccess});requestQuee=requestQuee.slice(1);}};var loadSuccess=function(){++loadedCounter;if(loadedCounter>=requestCounter&&canRunSuccessFun){config.onSuccess();}else if(loadedCounter<requestCounter&&!config.isParallelLoad){serialLoad();}else{return;}};};

AE.namespace('AE.tools');AE.tools.depthMerge=function(){var o={},a=arguments;for(var i=0,l=a.length;i<l;i++){for(var key in a[i]){if(YL.isArray(a[i][key])||YL.isFunction(a[i][key])||!YL.isObject(a[i][key])){o[key]=a[i][key];continue;}
if(o[key]==null){o[key]={};}
o[key]=AE.tools.depthMerge(o[key],a[i][key]);}}
return o;};

var getMessageStatus=function(){var _self=this;var oConfig={targetCtn:'check_message',getDataUrl:'http://topmsg.empresabio.com/getStatus.js',inboxUrl:'http://us.my.empresabio.com/mcadmin/inbox/inboxList.htm',bulkUrl:'http://us.my.empresabio.com/mcadmin/bulkfolder/bulkfolder_list.htm'};var messageData={inbox:-1,bulk:-1,dataReady:true,inboxLinkHTML:'<span style="padding:0 20px 0 0;font-weight:bold;">Inbox <span id="highLightTips"><strong></strong></span></span>',noneMsgHTML:'Check Messages',notLoginHasMsg:'New Messages',notLoginMsg:'Check Messages',totalUnreadHTML:'Inbox (<strong></strong>)',bulkLinkHTML:'Bulk Folder (<strong></strong>)'};var statusReady={isUserStatusReady:false,isUserLogin:false,isNeedCheckMessage:false,memberSeq:''};var sysLanguage=navigator.browserLanguage?navigator.browserLanguage:navigator.language;var defConfig,msgConfig;_self.userStatusMgr=function(){var _user=this;var userStatus={isLoggedIn:false,formChina:false,firstIn:false,firstName:'',serviceType:'',memberSeq:''};var clearSignInInfo=function(){userStatus.isLoggedIn=false;userStatus.formChina=false;userStatus.firstIn=false;userStatus.firstName='';userStatus.serviceType='';userStatus.memberSeq='';};var doInitUserStatus=function(){try{var userCookie=AE.bom.getCookie('ali_non_s_ever');var isLoginCookie=AE.bom.getCookie('ali_non_s_temp');if(isLoginCookie){if(isLoginCookie=='is_sign=y'){userStatus.isLoggedIn=true;statusReady.isUserLogin=true;}}
if(!userCookie){clearSignInInfo();}else{userCookie=userCookie.split('-_-');if(userCookie.length<5){clearSignInInfo();}else{userStatus.firstName=userCookie[1];userStatus.serviceType=userCookie[3];userStatus.memberSeq=userCookie[4];}}
if(_user.hasLoggedIn()){if(_user.getServiceType()=='cgs'||_user.getServiceType()=='hkgs'||_user.getServiceType()=='gs'||_user.getServiceType()=='cfm'||_user.getServiceType()=='twgs'){userStatus.fromChina=true;}else{userStatus.fromChina=false;}}else{if(_user.getServiceType()=='cgs'||_user.getServiceType()=='hkgs'||_user.getServiceType()=='gs'||_user.getServiceType()=='cfm'||_user.getServiceType()=='twgs'){userStatus.fromChina=true;}else if(_user.getServiceType()){userStatus.fromChina=false;}else{if(sysLanguage.toLowerCase()=='zh-cn'){userStatus.fromChina=true;}else{userStatus.fromChina=false;}}}
if(AE.bom.getCookie('ali_intl_firstIn').isEmpty()){userStatus.firstIn=true;AE.bom.setCookie('ali_intl_firstIn','n',true);}
statusReady.isUserStatusReady=true;return true;}catch(e){statusReady.isUserStatusReady=false;return false;}};_user.hasLoggedIn=function(){return userStatus.isLoggedIn;};_user.getFirstName=function(){return userStatus.firstName;};_user.getServiceType=function(){return userStatus.serviceType;};_user.isChinaUser=function(){return userStatus.fromChina;};_user.isFirstIn=function(){return userStatus.firstIn;};_user.getMemberSeq=function(){return userStatus.memberSeq;};var switchByUserStatus=function(){if(!_user.isChinaUser()){if(!_user.isFirstIn()){if(_user.hasLoggedIn()&&!_user.getFirstName().trim().isEmpty()){statusReady.isNeedCheckMessage=true;statusReady.memberSeq=_user.getMemberSeq();}else if(!_user.getFirstName().trim().isEmpty()){statusReady.isNeedCheckMessage=true;statusReady.memberSeq=_user.getMemberSeq();}else{statusReady.isNeedCheckMessage=true;}}else{statusReady.isNeedCheckMessage=false;}}};_user.init=function(){if(doInitUserStatus()&&statusReady.isUserStatusReady){switchByUserStatus();}}};_self.unreadMessageMgr=function(){var _msg=this;_msg.getCurrentData=function(){try{if(typeof(top_msgdata)==='object'){msgConfig.inbox=top_msgdata.inbox;msgConfig.bulk=top_msgdata.bulk;}else{msgConfig.dataReady=false;}}catch(e){msgConfig.dataReady=false;return;}};_msg.doGetMessage=function(){var random=new Date();var thisUrl=defConfig.getDataUrl+'?id='+statusReady.memberSeq+'&'+random;YAHOO.util.Get.script(thisUrl,{onSuccess:goNext});}};_self.containerMgr=function(){var _ctn=this;var setLink=function(hasUnread,html,url){var tmpLink=document.createElement('a');tmpLink.innerHTML=html;tmpLink.href=defConfig.inboxUrl;if(get(defConfig.targetCtn)){get(defConfig.targetCtn).innerHTML='';get(defConfig.targetCtn).appendChild(tmpLink);}};_ctn.checkMessage=function(){if(statusReady.isUserLogin&&statusReady.isNeedCheckMessage){if(msgConfig.inbox<1&&msgConfig.bulk<1){setLink(false,msgConfig.noneMsgHTML,defConfig.inboxUrl);}else if(msgConfig.inbox>0&&msgConfig.bulk<1){if(msgConfig.inbox<1000){setLink(true,msgConfig.inboxLinkHTML,defConfig.inboxUrl);}}else if(msgConfig.inbox<1&&msgConfig.bulk>0){}else{if(msgConfig.inbox<1000){setLink(true,msgConfig.inboxLinkHTML,defConfig.inboxUrl);}}}else{if(msgConfig.inbox>0){setLink(false,msgConfig.notLoginHasMsg,defConfig.inboxUrl);}else{setLink(false,msgConfig.notLoginMsg,defConfig.inboxUrl);}}};_ctn.setDataToCtn=function(){if(get(defConfig.targetCtn)&&get(defConfig.targetCtn).getElementsByTagName('strong')[0]){dataCtn=get(defConfig.targetCtn).getElementsByTagName('strong')[0];dataCtn.innerHTML=msgConfig.inbox;}};_ctn.init=function(){_ctn.checkMessage();if(msgConfig.dataReady){_ctn.setDataToCtn();}}}
var userStatus=new _self.userStatusMgr();var unreadMsg=new _self.unreadMessageMgr();var linkCtn=new _self.containerMgr();var goNext=function(){unreadMsg.getCurrentData();linkCtn.init();}
_self.init=function(config,mConfig){defConfig=TB.applyIf(config||{},oConfig);msgConfig=TB.applyIf(mConfig||{},messageData);userStatus.init();if(statusReady.isNeedCheckMessage){unreadMsg.doGetMessage(mConfig);}}}

AE.namespace('AE.run.inboxIcon');AE.run.inboxIcon=function(){var _self=this;var oConfig={getDataUrl:'http://topmsg.empresabio.com/getStatus.js',inboxUrl:'http://us.my.empresabio.com/mcadmin/inbox/inboxList.htm',bulkUrl:'http://us.my.empresabio.com/mcadmin/bulkfolder/bulkfolder_list.htm',inboxNum:{elementId:'inboxNum',styleDisplay:'none',linkEnable:false},welcomeBox:{elementId:'log-info'}};var objInboxNum=oConfig.inboxNum;var objWelcomeBox=oConfig.welcomeBox;var messageData={inbox:-1,bulk:-1,dataReady:true};var statusReady={isUserStatusReady:false,isUserLogin:false,isNeedCheckMessage:false,memberSeq:''};var sysLanguage=navigator.browserLanguage?navigator.browserLanguage:navigator.language;var defConfig,msgConfig;_self.userStatusMgr=function(){var _user=this;var userStatus={isLoggedIn:false,formChina:false,firstIn:false,firstName:'',serviceType:'',memberSeq:''};var clearSignInInfo=function(){userStatus.isLoggedIn=false;userStatus.formChina=false;userStatus.firstIn=false;userStatus.firstName='';userStatus.serviceType='';userStatus.memberSeq='';};var doInitUserStatus=function(){try{var userCookie=AE.bom.getCookie('ali_non_s_ever');var isLoginCookie=AE.bom.getCookie('ali_non_s_temp');if(isLoginCookie){if(isLoginCookie=='is_sign=y'){userStatus.isLoggedIn=true;statusReady.isUserLogin=true;}}
if(!userCookie){clearSignInInfo();}else{userCookie=userCookie.split('-_-');if(userCookie.length<5){clearSignInInfo();}else{userStatus.firstName=userCookie[1];userStatus.serviceType=userCookie[3];userStatus.memberSeq=userCookie[4];}}
if(_user.hasLoggedIn()){if(_user.getServiceType()=='cgs'||_user.getServiceType()=='hkgs'||_user.getServiceType()=='gs'||_user.getServiceType()=='cfm'||_user.getServiceType()=='twgs'){userStatus.fromChina=true;}else{userStatus.fromChina=false;}}else{if(_user.getServiceType()=='cgs'||_user.getServiceType()=='hkgs'||_user.getServiceType()=='gs'||_user.getServiceType()=='cfm'||_user.getServiceType()=='twgs'){userStatus.fromChina=true;}else if(_user.getServiceType()){userStatus.fromChina=false;}else{if(sysLanguage.toLowerCase()=='zh-cn'){userStatus.fromChina=true;}else{userStatus.fromChina=false;}}}
if(AE.bom.getCookie('ali_intl_firstIn').isEmpty()){userStatus.firstIn=true;AE.bom.setCookie('ali_intl_firstIn','n',true);}
statusReady.isUserStatusReady=true;return true;}catch(e){statusReady.isUserStatusReady=false;return false;}};_user.hasLoggedIn=function(){return userStatus.isLoggedIn;};_user.getFirstName=function(){return userStatus.firstName;};_user.getServiceType=function(){return userStatus.serviceType;};_user.isChinaUser=function(){return userStatus.fromChina;};_user.isFirstIn=function(){return userStatus.firstIn;};_user.getMemberSeq=function(){return userStatus.memberSeq;};var switchByUserStatus=function(){if(!_user.isChinaUser()){if(!_user.isFirstIn()){if(_user.hasLoggedIn()&&!_user.getFirstName().trim().isEmpty()){statusReady.isNeedCheckMessage=true;statusReady.memberSeq=_user.getMemberSeq();}else if(!_user.getFirstName().trim().isEmpty()){statusReady.isNeedCheckMessage=true;statusReady.memberSeq=_user.getMemberSeq();}else{statusReady.isNeedCheckMessage=true;}}else{statusReady.isNeedCheckMessage=false;}}
else{statusReady.isNeedCheckMessage=false;if(get(objWelcomeBox.elementId)){YUE.onDOMReady(function(){if(!_user.getFirstName().trim().isEmpty()&&!YUD.hasClass(objWelcomeBox.elementId,'AE:noLoginMsg')){if(statusReady.isUserLogin){if(!!defConfig.businessRole&&defConfig.businessRole=='BusinessRole[buyer]')get(objWelcomeBox.elementId).innerHTML='<a href="http://sh.vip.empresabio.com/product/buyoffer/post_buying_lead.htm" style="font-weight:bold;text-decoration:underline;">Post your Buying Leads free</a> | '+get(objWelcomeBox.elementId).innerHTML;else get(objWelcomeBox.elementId).innerHTML='<a href="http://sh.vip.empresabio.com/product/post_product.htm" style="font-weight:bold;text-decoration:underline;">Display your Products free</a> '+get(objWelcomeBox.elementId).innerHTML;}
else{get(objWelcomeBox.elementId).innerHTML='Chat online free with <a href="http://trademanager.empresabio.com/" style="font-weight:bold;text-decoration:underline;">TradeManager</a> '+get(objWelcomeBox.elementId).innerHTML;}}});}}};_user.init=function(){if(doInitUserStatus()&&statusReady.isUserStatusReady){switchByUserStatus();}}};_self.unreadMessageMgr=function(){var _msg=this;_msg.getCurrentData=function(){try{if(typeof(top_msgdata)==='object'){msgConfig.inbox=top_msgdata.inbox;msgConfig.bulk=top_msgdata.bulk;}else{msgConfig.dataReady=false;}}catch(e){msgConfig.dataReady=false;return;}};_msg.doGetMessage=function(){var random=new Date();var thisUrl=defConfig.getDataUrl+'?id='+statusReady.memberSeq+'&'+random;YAHOO.util.Get.script(thisUrl,{onSuccess:goNext});}};_self.containerMgr=function(){var _ctn=this;_ctn.checkMessage=function(){if(statusReady.isUserLogin&&statusReady.isNeedCheckMessage){if(msgConfig.inbox>0){objInboxNum.styleDisplay='';inboxNumShow=(msgConfig.inbox>999)?'999+':msgConfig.inbox;if(objInboxNum.linkEnable){get(objInboxNum.elementId).innerHTML='(<a href="'+defConfig.inboxUrl+'" class="num">'+inboxNumShow+'</a>)';}else{get(objInboxNum.elementId).innerHTML='(<span class="num">'+inboxNumShow+'</span>)';}}}else{if(msgConfig.inbox>0){objInboxNum.styleDisplay='';get(objInboxNum.elementId).innerHTML='( <img src="'+globalImgServer+'/images/eng/style/icon/no_read.gif" border="0" /> )';}}
if(get(objWelcomeBox.elementId)){YUE.onDOMReady(function(){if(msgConfig.inbox>0){inboxNumShow=(msgConfig.inbox>999)?'999+':msgConfig.inbox;if(!userStatus.getFirstName().trim().isEmpty()&&!YUD.hasClass(objWelcomeBox.elementId,'AE:noLoginMsg')){if(statusReady.isUserLogin)
get(objWelcomeBox.elementId).innerHTML='<a href="'+defConfig.inboxUrl+'" style="font-weight:bold;text-decoration:underline;">You have '+inboxNumShow+' new messages</a> '+get(objWelcomeBox.elementId).innerHTML;else
get(objWelcomeBox.elementId).innerHTML='<a href="'+defConfig.inboxUrl+'" style="font-weight:bold;text-decoration:underline;">You have new messages</a> '+get(objWelcomeBox.elementId).innerHTML;}}
else{if(!userStatus.getFirstName().trim().isEmpty()&&!YUD.hasClass(objWelcomeBox.elementId,'AE:noLoginMsg')){if(statusReady.isUserLogin){if(!!defConfig.businessRole&&defConfig.businessRole=='BusinessRole[buyer]')get(objWelcomeBox.elementId).innerHTML='<a href="http://us.my.empresabio.com/product/buyoffer/post_buying_lead.htm" style="font-weight:bold;text-decoration:underline;">Post your Buying Leads free</a> '+get(objWelcomeBox.elementId).innerHTML;else get(objWelcomeBox.elementId).innerHTML='<a href="http://us.my.empresabio.com/product/post_product.htm" style="font-weight:bold;text-decoration:underline;">Display your Products free</a> '+get(objWelcomeBox.elementId).innerHTML;}
else{get(objWelcomeBox.elementId).innerHTML='Chat online free with <a href="http://trademanager.empresabio.com/" style="font-weight:bold;text-decoration:underline;">TradeManager</a> '+get(objWelcomeBox.elementId).innerHTML;}}}});}};_ctn.setDataToCtn=function(){if(get(defConfig.targetCtn)&&get(defConfig.targetCtn).getElementsByTagName('strong')[0]){dataCtn=get(defConfig.targetCtn).getElementsByTagName('strong')[0];dataCtn.innerHTML=msgConfig.inbox;}
YUD.setStyle(objInboxNum.elementId,'display',objInboxNum.styleDisplay);};_ctn.init=function(){_ctn.checkMessage();if(msgConfig.dataReady){_ctn.setDataToCtn();}}};var userStatus=new _self.userStatusMgr();var unreadMsg=new _self.unreadMessageMgr();var linkCtn=new _self.containerMgr();var goNext=function(){unreadMsg.getCurrentData();linkCtn.init();};_self.init=function(config,mConfig){defConfig=TB.applyIf(config||{},oConfig);msgConfig=TB.applyIf(mConfig||{},messageData);userStatus.init();if(statusReady.isNeedCheckMessage){unreadMsg.doGetMessage(mConfig);}};}

var DEFAULT_VERSION="unknown";function sendClientMsg(fromSite,fromUid,toSite,toUid,imstatus,moreProperties){if(fromSite==""){fromSite=toSite;}
var result=checkInstallEnaliint();if(result=="-1"){downloadEnaliint();}
else if(result=="0"){location.href="TradeManager:SendIM_Encrypted?"+toUid+getMoreProperties(moreProperties);}
else if(result=="1"){if(imstatus==4){command="aliim:smssendmsg?uid="+fromSite+fromUid+"&touid="+toUid+"&suid="+fromUid+"&encrypt=true";}else{command="aliim:sendmsg?uid="+fromSite+fromUid+"&touid="+toUid+"&siteid="+toSite+"&status="+imstatus+getMoreProperties(moreProperties)+"&encrypt=true";}
execCommand(command);}}
function addContact(fromSite,fromUid,toSite,toUid,moreProperties){var result=checkInstallEnaliint();if(result=="-1"){downloadEnaliint();}
else if(result=="0"){window.location="Trademanager:AddContact?uid="+toUid+"&checkcrm=true";setTimeout(function(){window.close()},"500");}
else if(result=="1"){command="aliim:addcontact?uid="+fromSite+fromUid+"&touid="+toSite+toUid+getMoreProperties(moreProperties);execCommand(command);}}
function startWW(siteid,uid,moreProperties){var fromSite=siteid;var result=checkInstallEnaliint();if(result=="-1"){return;}else if(result=="0"){location.href="TradeManager:";}else if(result=="1"){var command="aliim:login?uid="+uid+"&autologin=0&weblogin=1"+moreProperties;execCommand(command);}}
function OnlyCheckOldAlitalkInstalled(){var obj;try{hasBeeninstancedFireFox();obj=new ActiveXObject("TradeManagerSetup.Install.1");}catch(e){return"-1";}
if(null!=obj){return"0";}else{return"-1";}}
function checkInstallEnaliint(){var tempInstall="-1";try{var wwx=new ActiveXObject("aliimx.atmx");var tempVer=wwx.GetWangWangVersion();if(wwx!=null){tempInstall="1";wwx=null;return tempInstall;}
wwx=null;}catch(e){}
tempInstall=OnlyCheckOldAlitalkInstalled();return tempInstall;}
function downloadEnaliint(){alert("\u4f60\u7684\u7248\u672c\u8fc7\u65e7\uff0c\u6ca1\u6709\u8be5\u529f\u80fd\uff0c\u8bf7\u4e0b\u8f7d\u6700\u65b0\u7248\u672c!");alert('��ת������վ��������ҳ��!');}
function getMoreProperties(moreProperties){var p="";if(moreProperties!=""){if(moreProperties.substring(0,1)!="&"){p="&"+moreProperties;}else{p=moreProperties;}}
return p;}
function checkNavigat(){if(checkIE()){}else if(checkFirefoxIsBigThan15()){hasBeeninstancedFireFox();if(!hasBeenInstancePlugIn&&confirm("You need the Firefox plug-in. Click the Confirm button to download it.")){if(window.InstallTrigger){InstallTrigger.install({'empresabio':'http://download.alitalk.empresabio.com/TradeManager/download/aliww.xpi'});}}else if(hasBeenInstancePlugIn){win=open(nextUrl,'installNow','width=600,height=500,location=no,toolbar=no,status=no,resizable=yes,scrollbars=yes');}}}
var hasBeenInstancePlugIn=false;function hasBeeninstancedFireFox(){if(checkFirefoxIsBigThan15()){var mimetype=navigator.mimeTypes["application/ww-plugin"];if(mimetype){hasBeenInstancePlugIn=true;var plugin=mimetype.enabledPlugin
if(plugin){document.write("<embed id=\"chk_ww\" name=\"chk_ww\" type=\"application/ww-plugin\" width=1 height=1 hidden=\"true\" >");hasBeeninstanced=document.getElementById("chk_ww").isInstalled(2);}}}else{hasBeeninstanced=false;}}
function checkIE(){var name=navigator.appName;if(name=="Microsoft Internet Explorer"){return true;}else{return false;}}
function checkIEorFirefox(){var name=navigator.appName;if(name=="Microsoft Internet Explorer"||checkFirefoxIsBigThan15()){return true;}else{return false;}}
function checkFirefoxIsBigThan15(){if(window.navigator.userAgent.indexOf("Firefox")>=1){userAgent=window.navigator.userAgent;Findex=userAgent.indexOf("Firefox/");versionName=userAgent.substr(Findex+"Firefox/".length,3);if(versionName>="1.5"){return true;}}
return false;}
function execCommand(command){try{var wwx=new ActiveXObject("aliimx.atmx");wwx.ExecCmd(command);}catch(e){}}
