var globalImgServer="http://style.trademars.com";if(typeof YAHOO=="undefined"||!YAHOO)var YAHOO={};YAHOO.namespace=function(){var a=arguments,c=null,d,b,k;for(d=0;d<a.length;d+=1){k=a[d].split(".");c=YAHOO;for(b=k[0]=="YAHOO"?1:0;b<k.length;b+=1){c[k[b]]=c[k[b]]||{};c=c[k[b]]}}return c}; YAHOO.register=function(a,c,d){var b=YAHOO.env.modules;b[a]||(b[a]={versions:[],builds:[]});b=b[a];var k=d.version;d=d.build;var m=YAHOO.env.listeners;b.name=a;b.version=k;b.build=d;b.versions.push(k);b.builds.push(d);b.mainClass=c;for(var l=0;l<m.length;l+=1)m[l](b);if(c){c.VERSION=k;c.BUILD=d}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 a={ie:0,opera:0,gecko:0,webkit:0,mobile:null,air:0},c=navigator.userAgent,d;if(/KHTML/.test(c))a.webkit=1;if((d=c.match(/AppleWebKit\/([^\s]*)/))&&d[1]){a.webkit=parseFloat(d[1]);if(/ Mobile\//.test(c))a.mobile="Apple";else if(d=c.match(/NokiaN[^\/]*/))a.mobile=d[0];if(d=c.match(/AdobeAIR\/([^\s]*)/))a.air=d[0]}if(!a.webkit)if((d=c.match(/Opera[\s\/]([^\s]*)/))&&d[1]){a.opera=parseFloat(d[1]);if(d=c.match(/Opera Mini[^;]*/))a.mobile=d[0]}else if((d=c.match(/MSIE\s([^;]*)/))&& d[1])a.ie=parseFloat(d[1]);else if(d=c.match(/Gecko\/([^\s]*)/)){a.gecko=1;if((d=c.match(/rv:([^\s\)]*)/))&&d[1])a.gecko=parseFloat(d[1])}return a}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var a=YAHOO_config.listener,c=YAHOO.env.listeners,d=true,b;if(a){for(b=0;b<c.length;b+=1)if(c[b]==a){d=false;break}d&&c.push(a)}}})();YAHOO.lang=YAHOO.lang||{}; (function(){var a=YAHOO.lang,c=["toString","valueOf"],d={isArray:function(b){if(b)return a.isNumber(b.length)&&a.isFunction(b.splice);return false},isBoolean:function(b){return typeof b==="boolean"},isFunction:function(b){return typeof b==="function"},isNull:function(b){return b===null},isNumber:function(b){return typeof b==="number"&&isFinite(b)},isObject:function(b){return b&&(typeof b==="object"||a.isFunction(b))||false},isString:function(b){return typeof b==="string"},isUndefined:function(b){return typeof b=== "undefined"},_IEEnumFix:YAHOO.env.ua.ie?function(b,k){for(var m=0;m<c.length;m+=1){var l=c[m],s=k[l];if(a.isFunction(s)&&s!=Object.prototype[l])b[l]=s}}:function(){},extend:function(b,k,m){if(!k||!b)throw new Error("extend failed, please check that all dependencies are included.");var l=function(){};l.prototype=k.prototype;b.prototype=new l;b.prototype.constructor=b;b.superclass=k.prototype;if(k.prototype.constructor==Object.prototype.constructor)k.prototype.constructor=k;if(m){for(var s in m)if(a.hasOwnProperty(m, s))b.prototype[s]=m[s];a._IEEnumFix(b.prototype,m)}},augmentObject:function(b,k){if(!k||!b)throw new Error("Absorb failed, verify dependencies.");var m=arguments,l,s=m[2];if(s&&s!==true)for(l=2;l<m.length;l+=1)b[m[l]]=k[m[l]];else{for(l in k)if(s||!(l in b))b[l]=k[l];a._IEEnumFix(b,k)}},augmentProto:function(b,k){if(!k||!b)throw new Error("Augment failed, verify dependencies.");for(var m=[b.prototype,k.prototype],l=2;l<arguments.length;l+=1)m.push(arguments[l]);a.augmentObject.apply(this,m)},dump:function(b, k){var m,l,s=[];if(a.isObject(b))if(b instanceof Date||"nodeType"in b&&"tagName"in b)return b;else{if(a.isFunction(b))return"f(){...}"}else return b+"";k=a.isNumber(k)?k:3;if(a.isArray(b)){s.push("[");m=0;for(l=b.length;m<l;m+=1){a.isObject(b[m])?s.push(k>0?a.dump(b[m],k-1):"{...}"):s.push(b[m]);s.push(", ")}s.length>1&&s.pop();s.push("]")}else{s.push("{");for(m in b)if(a.hasOwnProperty(b,m)){s.push(m+" => ");a.isObject(b[m])?s.push(k>0?a.dump(b[m],k-1):"{...}"):s.push(b[m]);s.push(", ")}s.length> 1&&s.pop();s.push("}")}return s.join("")},substitute:function(b,k,m){for(var l,s,v,p,t,r=[],h;;){l=b.lastIndexOf("{");if(l<0)break;s=b.indexOf("}",l);if(l+1>=s)break;p=h=b.substring(l+1,s);t=null;v=p.indexOf(" ");if(v>-1){t=p.substring(v+1);p=p.substring(0,v)}v=k[p];if(m)v=m(p,v,t);if(a.isObject(v))if(a.isArray(v))v=a.dump(v,parseInt(t,10));else{t=t||"";p=t.indexOf("dump");if(p>-1)t=t.substring(4);v=v.toString===Object.prototype.toString||p>-1?a.dump(v,parseInt(t,10)):v.toString()}else if(!a.isString(v)&& !a.isNumber(v)){v="~-"+r.length+"-~";r[r.length]=h}b=b.substring(0,l)+v+b.substring(s+1)}for(l=r.length-1;l>=0;l-=1)b=b.replace(new RegExp("~-"+l+"-~"),"{"+r[l]+"}","g");return b},trim:function(b){try{return b.replace(/^\s+|\s+$/g,"")}catch(k){return b}},merge:function(){for(var b={},k=arguments,m=0,l=k.length;m<l;m+=1)a.augmentObject(b,k[m],true);return b},later:function(b,k,m,l,s){b=b||0;k=k||{};var v=m,p=l,t;if(a.isString(m))v=k[m];if(!v)throw new TypeError("method undefined");a.isArray(p)||(p= [l]);m=function(){v.apply(k,p)};t=s?setInterval(m,b):setTimeout(m,b);return{interval:s,cancel:function(){this.interval?clearInterval(t):clearTimeout(t)}}},isValue:function(b){return a.isObject(b)||a.isString(b)||a.isNumber(b)||a.isBoolean(b)}};a.hasOwnProperty=Object.prototype.hasOwnProperty?function(b,k){return b&&b.hasOwnProperty(k)}:function(b,k){return!a.isUndefined(b[k])&&b.constructor.prototype[k]!==b[k]};d.augmentObject(a,d,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 a={},c=0,d=0,b=false,k=YAHOO.env.ua,m=YAHOO.lang,l=function(g,o,q){g=(q||window).document.createElement(g);for(var w in o)o[w]&&YAHOO.lang.hasOwnProperty(o,w)&&g.setAttribute(w,o[w]);return g},s=function(g,o,q){return l("script",{id:"yui__dyn_"+d++,type:"text/javascript",charset:q||"utf-8",src:g},o)},v=function(g,o){return{tId:g.tId,win:g.win,data:g.data,nodes:g.nodes,msg:o,purge:function(){u(this.tId)}}},p=function(g,o){var q=a[o];(q=m.isString(g)?q.win.document.getElementById(g): g)||t(o,"target node not found: "+g);return q},t=function(g,o){var q=a[g];if(q.onFailure)q.onFailure.call(q.scope||q.win,v(q,o))},r=function(g){var o=a[g];o.finished=true;if(o.aborted)t(g,"transaction "+g+" was aborted");else if(o.onSuccess)o.onSuccess.call(o.scope||o.win,v(o))},h=function(g){g=a[g];if(g.onTimeout)g.onTimeout.call(g.context||g,v(g))},n=function(g,o){var q=a[g];q.timer&&q.timer.cancel();if(q.aborted)t(g,"transaction "+g+" was aborted");else{if(o){q.url.shift();q.varName&&q.varName.shift()}else{q.url= m.isString(q.url)?[q.url]:q.url;if(q.varName)q.varName=m.isString(q.varName)?[q.varName]:q.varName}var w=q.win,x=w.document.getElementsByTagName("head")[0],y;if(q.url.length===0)if(q.type==="script"&&k.webkit&&k.webkit<420&&!q.finalpass&&!q.varName){var z=s(null,q.win,q.charset);z.innerHTML='YAHOO.util.Get._finalize("'+g+'");';q.nodes.push(z);x.appendChild(z)}else r(g);else{z=q.url[0];if(!z){q.url.shift();return n(g)}if(q.timeout)q.timer=m.later(q.timeout,q,h,g);if(q.type==="script")y=s(z,w,q.charset); else{y=q.charset||"utf-8";y=l("link",{id:"yui__dyn_"+d++,type:"text/css",charset:y,rel:"stylesheet",href:z},w)}y=y;f(q.type,y,g,z,w,q.url.length);q.nodes.push(y);if(q.insertBefore)(x=p(q.insertBefore,g))&&x.parentNode.insertBefore(y,x);else x.appendChild(y);if((k.webkit||k.gecko)&&q.type==="css")n(g,z)}}},u=function(g){var o=a[g];if(o){var q=o.nodes,w=q.length,x=o.win.document.getElementsByTagName("head")[0];if(o.insertBefore)if(g=p(o.insertBefore,g))x=g.parentNode;for(g=0;g<w;g+=1)x.removeChild(q[g]); o.nodes=[]}},e=function(g,o,q){var w="q"+c++;q=q||{};if(k.ie!==6&&c%YAHOO.util.Get.PURGE_THRESH===0)if(!b){b=true;for(var x in a){var y=a[x];if(y.autopurge&&y.finished){u(y.tId);delete a[x]}}b=false}a[w]=m.merge(q,{tId:w,type:g,url:o,finished:false,aborted:false,nodes:[]});o=a[w];o.win=o.win||window;o.scope=o.scope||o.win;o.autopurge="autopurge"in o?o.autopurge:g==="script"?true:false;m.later(0,o,n,w);return{tId:w}},f=function(g,o,q,w,x,y,z){var A=z||n;if(k.ie)o.onreadystatechange=function(){var C= this.readyState;if("loaded"===C||"complete"===C){o.onreadystatechange=null;A(q,w)}};else if(k.webkit){if(g==="script")if(k.webkit>=420)o.addEventListener("load",function(){A(q,w)});else{var B=a[q];if(B.varName){g=YAHOO.util.Get.POLL_FREQ;B.maxattempts=YAHOO.util.Get.TIMEOUT/g;B.attempts=0;B._cache=B.varName[0].split(".");B.timer=m.later(g,B,function(){var C=this._cache,F=C.length,E=this.win,D;for(D=0;D<F;D+=1){E=E[C[D]];if(!E){this.attempts++;if(this.attempts++>this.maxattempts){B.timer.cancel(); t(q,"Over retry limit, giving up")}return}}B.timer.cancel();A(q,w)},null,true)}else m.later(YAHOO.util.Get.POLL_FREQ,null,A,[q,w])}}else o.onload=function(){A(q,w)}};return{POLL_FREQ:10,PURGE_THRESH:20,TIMEOUT:2E3,_finalize:function(g){m.later(0,null,r,g)},abort:function(g){g=m.isString(g)?g:g.tId;if(g=a[g])g.aborted=true},script:function(g,o){return e("script",g,o)},css:function(g,o){return e("css",g,o)}}}();YAHOO.register("get",YAHOO.util.Get,{version:"2.6.0",build:"1321"}); (function(){var a=YAHOO.util,c=YAHOO.lang,d,b,k={},m={},l=window.document;YAHOO.env._id_counter=YAHOO.env._id_counter||0;var s=YAHOO.env.ua.opera,v=YAHOO.env.ua.webkit,p=YAHOO.env.ua.ie,t={HYPHEN:/(-[a-z])/i,ROOT_TAG:/^body|html$/i,OP_SCROLL:/^(?:inline|table-row)$/i},r=function(e){if(!t.HYPHEN.test(e))return e;if(k[e])return k[e];for(var f=e;t.HYPHEN.exec(f);)f=f.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase());return k[e]=f},h=function(e){var f=m[e];if(!f){f=new RegExp("(?:^|\\s+)"+e+"(?:\\s+|$)"); m[e]=f}return f};d=l.defaultView&&l.defaultView.getComputedStyle?function(e,f){var g=null;if(f=="float")f="cssFloat";var o=e.ownerDocument.defaultView.getComputedStyle(e,"");if(o)g=o[r(f)];return e.style[f]||g}:l.documentElement.currentStyle&&p?function(e,f){switch(r(f)){case "opacity":var g=100;try{g=e.filters["DXImageTransform.Microsoft.Alpha"].opacity}catch(o){try{g=e.filters("alpha").opacity}catch(q){}}return g/100;case "float":f="styleFloat";default:g=e.currentStyle?e.currentStyle[f]:null;return e.style[f]|| g}}:function(e,f){return e.style[f]};b=p?function(e,f,g){switch(f){case "opacity":if(c.isString(e.style.filter)){e.style.filter="alpha(opacity="+g*100+")";if(!e.currentStyle||!e.currentStyle.hasLayout)e.style.zoom=1}break;case "float":f="styleFloat";default:e.style[f]=g}}:function(e,f,g){if(f=="float")f="cssFloat";e.style[f]=g};var n=function(e,f){return e&&e.nodeType==1&&(!f||f(e))};YAHOO.util.Dom={get:function(e){if(e){if(e.nodeType||e.item)return e;if(typeof e==="string")return l.getElementById(e); if("length"in e){for(var f=[],g=0,o=e.length;g<o;++g)f[f.length]=a.Dom.get(e[g]);return f}return e}return null},getStyle:function(e,f){f=r(f);return a.Dom.batch(e,function(g){return d(g,f)},a.Dom,true)},setStyle:function(e,f,g){f=r(f);a.Dom.batch(e,function(o){b(o,f,g)},a.Dom,true)},getXY:function(e){return a.Dom.batch(e,function(f){if((f.parentNode===null||f.offsetParent===null||this.getStyle(f,"display")=="none")&&f!=f.ownerDocument.body)return false;return u(f)},a.Dom,true)},getX:function(e){return a.Dom.batch(e, function(f){return a.Dom.getXY(f)[0]},a.Dom,true)},getY:function(e){return a.Dom.batch(e,function(f){return a.Dom.getXY(f)[1]},a.Dom,true)},setXY:function(e,f,g){a.Dom.batch(e,function(o){var q=this.getStyle(o,"position");if(q=="static"){this.setStyle(o,"position","relative");q="relative"}var w=this.getXY(o);if(w===false)return false;var x=[parseInt(this.getStyle(o,"left"),10),parseInt(this.getStyle(o,"top"),10)];if(isNaN(x[0]))x[0]=q=="relative"?0:o.offsetLeft;if(isNaN(x[1]))x[1]=q=="relative"?0: o.offsetTop;if(f[0]!==null)o.style.left=f[0]-w[0]+x[0]+"px";if(f[1]!==null)o.style.top=f[1]-w[1]+x[1]+"px";if(!g){q=this.getXY(o);if(f[0]!==null&&q[0]!=f[0]||f[1]!==null&&q[1]!=f[1])this.setXY(o,f,true)}},a.Dom,true)},setX:function(e,f){a.Dom.setXY(e,[f,null])},setY:function(e,f){a.Dom.setXY(e,[null,f])},getRegion:function(e){return a.Dom.batch(e,function(f){if((f.parentNode===null||f.offsetParent===null||this.getStyle(f,"display")=="none")&&f!=f.ownerDocument.body)return false;return a.Region.getRegion(f)}, a.Dom,true)},getClientWidth:function(){return a.Dom.getViewportWidth()},getClientHeight:function(){return a.Dom.getViewportHeight()},getElementsByClassName:function(e,f,g,o){e=c.trim(e);f=f||"*";g=g?a.Dom.get(g):l;if(!g)return[];var q=[];f=g.getElementsByTagName(f);e=h(e);g=0;for(var w=f.length;g<w;++g)if(e.test(f[g].className)){q[q.length]=f[g];o&&o.call(f[g],f[g])}return q},hasClass:function(e,f){var g=h(f);return a.Dom.batch(e,function(o){return g.test(o.className)},a.Dom,true)},addClass:function(e, f){return a.Dom.batch(e,function(g){if(this.hasClass(g,f))return false;g.className=c.trim([g.className,f].join(" "));return true},a.Dom,true)},removeClass:function(e,f){var g=h(f);return a.Dom.batch(e,function(o){var q=false,w=o.className;if(f&&w&&this.hasClass(o,f)){o.className=w.replace(g," ");this.hasClass(o,f)&&this.removeClass(o,f);o.className=c.trim(o.className);if(o.className==="")o.removeAttribute(o.hasAttribute?"class":"className");q=true}return q},a.Dom,true)},replaceClass:function(e,f, g){if(!g||f===g)return false;var o=h(f);return a.Dom.batch(e,function(q){if(!this.hasClass(q,f)){this.addClass(q,g);return true}q.className=q.className.replace(o," "+g+" ");this.hasClass(q,f)&&this.removeClass(q,f);q.className=c.trim(q.className);return true},a.Dom,true)},generateId:function(e,f){f=f||"yui-gen";var g=function(o){if(o&&o.id)return o.id;var q=f+YAHOO.env._id_counter++;if(o)o.id=q;return q};return a.Dom.batch(e,g,a.Dom,true)||g.apply(a.Dom,arguments)},isAncestor:function(e,f){e=a.Dom.get(e); f=a.Dom.get(f);var g=false;if(e&&f&&e.nodeType&&f.nodeType)if(e.contains&&e!==f)g=e.contains(f);else if(e.compareDocumentPosition)g=!!(e.compareDocumentPosition(f)&16);return g},inDocument:function(e){return this.isAncestor(l.documentElement,e)},getElementsBy:function(e,f,g,o){f=f||"*";g=g?a.Dom.get(g):l;if(!g)return[];var q=[];f=g.getElementsByTagName(f);g=0;for(var w=f.length;g<w;++g)if(e(f[g])){q[q.length]=f[g];o&&o(f[g])}return q},batch:function(e,f,g,o){e=e&&(e.tagName||e.item)?e:a.Dom.get(e); if(!e||!f)return false;o=o?g:window;if(e.tagName||e.length===undefined)return f.call(o,e,g);for(var q=[],w=0,x=e.length;w<x;++w)q[q.length]=f.call(o,e[w],g);return q},getDocumentHeight:function(){return Math.max(l.compatMode!="CSS1Compat"?l.body.scrollHeight:l.documentElement.scrollHeight,a.Dom.getViewportHeight())},getDocumentWidth:function(){return Math.max(l.compatMode!="CSS1Compat"?l.body.scrollWidth:l.documentElement.scrollWidth,a.Dom.getViewportWidth())},getViewportHeight:function(){var e=self.innerHeight, f=l.compatMode;if((f||p)&&!s)e=f=="CSS1Compat"?l.documentElement.clientHeight:l.body.clientHeight;return e},getViewportWidth:function(){var e=self.innerWidth,f=l.compatMode;if(f||p)e=f=="CSS1Compat"?l.documentElement.clientWidth:l.body.clientWidth;return e},getAncestorBy:function(e,f){for(;e=e.parentNode;)if(n(e,f))return e;return null},getAncestorByClassName:function(e,f){e=a.Dom.get(e);if(!e)return null;return a.Dom.getAncestorBy(e,function(g){return a.Dom.hasClass(g,f)})},getAncestorByTagName:function(e, f){e=a.Dom.get(e);if(!e)return null;return a.Dom.getAncestorBy(e,function(g){return g.tagName&&g.tagName.toUpperCase()==f.toUpperCase()})},getPreviousSiblingBy:function(e,f){for(;e;){e=e.previousSibling;if(n(e,f))return e}return null},getPreviousSibling:function(e){e=a.Dom.get(e);if(!e)return null;return a.Dom.getPreviousSiblingBy(e)},getNextSiblingBy:function(e,f){for(;e;){e=e.nextSibling;if(n(e,f))return e}return null},getNextSibling:function(e){e=a.Dom.get(e);if(!e)return null;return a.Dom.getNextSiblingBy(e)}, getFirstChildBy:function(e,f){return(n(e.firstChild,f)?e.firstChild:null)||a.Dom.getNextSiblingBy(e.firstChild,f)},getFirstChild:function(e){e=a.Dom.get(e);if(!e)return null;return a.Dom.getFirstChildBy(e)},getLastChildBy:function(e,f){if(!e)return null;return(n(e.lastChild,f)?e.lastChild:null)||a.Dom.getPreviousSiblingBy(e.lastChild,f)},getLastChild:function(e){e=a.Dom.get(e);return a.Dom.getLastChildBy(e)},getChildrenBy:function(e,f){var g=a.Dom.getFirstChildBy(e,f),o=g?[g]:[];a.Dom.getNextSiblingBy(g, function(q){if(!f||f(q))o[o.length]=q;return false});return o},getChildren:function(e){e=a.Dom.get(e);return a.Dom.getChildrenBy(e)},getDocumentScrollLeft:function(e){e=e||l;return Math.max(e.documentElement.scrollLeft,e.body.scrollLeft)},getDocumentScrollTop:function(e){e=e||l;return Math.max(e.documentElement.scrollTop,e.body.scrollTop)},insertBefore:function(e,f){e=a.Dom.get(e);f=a.Dom.get(f);if(!e||!f||!f.parentNode)return null;return f.parentNode.insertBefore(e,f)},insertAfter:function(e,f){e= a.Dom.get(e);f=a.Dom.get(f);if(!e||!f||!f.parentNode)return null;return f.nextSibling?f.parentNode.insertBefore(e,f.nextSibling):f.parentNode.appendChild(e)},getClientRegion:function(){var e=a.Dom.getDocumentScrollTop(),f=a.Dom.getDocumentScrollLeft(),g=a.Dom.getViewportWidth()+f,o=a.Dom.getViewportHeight()+e;return new a.Region(e,g,o,f)}};var u=function(){return l.documentElement.getBoundingClientRect?function(e){var f=e.getBoundingClientRect(),g=Math.round;e=e.ownerDocument;return[g(f.left+a.Dom.getDocumentScrollLeft(e)), g(f.top+a.Dom.getDocumentScrollTop(e))]}:function(e){var f=[e.offsetLeft,e.offsetTop],g=e.offsetParent,o=v&&a.Dom.getStyle(e,"position")=="absolute"&&e.offsetParent==e.ownerDocument.body;if(g!=e)for(;g;){f[0]+=g.offsetLeft;f[1]+=g.offsetTop;if(!o&&v&&a.Dom.getStyle(g,"position")=="absolute")o=true;g=g.offsetParent}if(o){f[0]-=e.ownerDocument.body.offsetLeft;f[1]-=e.ownerDocument.body.offsetTop}for(g=e.parentNode;g.tagName&&!t.ROOT_TAG.test(g.tagName);){if(g.scrollTop||g.scrollLeft){f[0]-=g.scrollLeft; f[1]-=g.scrollTop}g=g.parentNode}return f}}()})();YAHOO.register("dom",YAHOO.util.Dom,{version:"2.6.0",build:"1321"});YAHOO.util.CustomEvent=function(a,c,d,b){this.type=a;this.scope=c||window;this.silent=d;this.signature=b||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(a!=="_YUICEOnSubscribe")this.subscribeEvent=new YAHOO.util.CustomEvent("_YUICEOnSubscribe",this,true);this.lastError=null};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1; YAHOO.util.CustomEvent.prototype={subscribe:function(a,c,d){if(!a)throw new Error("Invalid callback for subscriber to '"+this.type+"'");this.subscribeEvent&&this.subscribeEvent.fire(a,c,d);this.subscribers.push(new YAHOO.util.Subscriber(a,c,d))},unsubscribe:function(a,c){if(!a)return this.unsubscribeAll();for(var d=false,b=0,k=this.subscribers.length;b<k;++b){var m=this.subscribers[b];if(m&&m.contains(a,c)){this._delete(b);d=true}}return d},fire:function(){this.lastError=null;var a=this.subscribers.length; if(!a&&this.silent)return true;var c=[].slice.call(arguments,0),d=true,b,k=this.subscribers.slice(),m=YAHOO.util.Event.throwErrors;for(b=0;b<a;++b){var l=k[b];if(l){var s=l.getScope(this.scope);if(this.signature==YAHOO.util.CustomEvent.FLAT){var v=null;if(c.length>0)v=c[0];try{d=l.fn.call(s,v,l.obj)}catch(p){this.lastError=p;if(m)throw p;}}else try{d=l.fn.call(s,this.type,c,l.obj)}catch(t){this.lastError=t;if(m)throw t;}if(false===d)break}}return d!==false},unsubscribeAll:function(){for(var a=this.subscribers.length- 1;a>-1;a--)this._delete(a);this.subscribers=[];return a},_delete:function(a){var c=this.subscribers[a];if(c){delete c.fn;delete c.obj}this.subscribers.splice(a,1)},toString:function(){return"CustomEvent: '"+this.type+"', scope: "+this.scope}};YAHOO.util.Subscriber=function(a,c,d){this.fn=a;this.obj=YAHOO.lang.isUndefined(c)?null:c;this.override=d};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.override)return this.override===true?this.obj:this.override;return a}; YAHOO.util.Subscriber.prototype.contains=function(a,c){return c?this.fn==a&&this.obj==c: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 a=false,c=[],d=[],b=[],k=[],m=0,l=[],s=[],v=0,p={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},t=YAHOO.env.ua.ie?"focusin":"focus",r=YAHOO.env.ua.ie?"focusout":"blur";return{POLL_RETRYS:2E3,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 h= this;this._interval=setInterval(function(){h._tryPreloadAttach()},this.POLL_INTERVAL)}},onAvailable:function(h,n,u,e,f){h=YAHOO.lang.isString(h)?[h]:h;for(var g=0;g<h.length;g+=1)l.push({id:h[g],fn:n,obj:u,override:e,checkReady:f});m=this.POLL_RETRYS;this.startInterval()},onContentReady:function(h,n,u,e){this.onAvailable(h,n,u,e,true)},onDOMReady:function(h,n,u){this.DOMReady?setTimeout(function(){var e=window;if(u)e=u===true?n:u;h.call(e,"DOMReady",[],n)},0):this.DOMReadyEvent.subscribe(h,n,u)}, _addListener:function(h,n,u,e,f,g){if(!u||!u.call)return false;if(this._isValidCollection(h)){for(var o=true,q=0,w=h.length;q<w;++q)o=this._addListener(h[q],n,u,e,f,g)&&o;return o}else if(YAHOO.lang.isString(h))if(o=this.getEl(h))h=o;else{this.onAvailable(h,function(){YAHOO.util.Event._addListener(h,n,u,e,f,g)});return true}if(!h)return false;if("unload"==n&&e!==this){d[d.length]=[h,n,u,e,f,g];return true}var x=h;if(f)x=f===true?e:f;o=function(A){return u.call(x,YAHOO.util.Event.getEvent(A,h),e)}; q=[h,n,u,o,x,e,f,g];c[c.length]=q;if(this.useLegacyEvent(h,n)){var y=this.getLegacyIndex(h,n);if(y==-1||h!=b[y][0]){y=b.length;s[h.id+n]=y;b[y]=[h,n,h["on"+n]];k[y]=[];h["on"+n]=function(A){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(A),y)}}k[y].push(q)}else try{this._simpleAdd(h,n,o,g)}catch(z){this.lastError=z;this._removeListener(h,n,u,g);return false}return true},addListener:function(h,n,u,e,f){return this._addListener(h,n,u,e,f,false)},addFocusListener:function(h,n,u,e){return this._addListener(h, t,n,u,e,true)},removeFocusListener:function(h,n){return this._removeListener(h,t,n,true)},addBlurListener:function(h,n,u,e){return this._addListener(h,r,n,u,e,true)},removeBlurListener:function(h,n){return this._removeListener(h,r,n,true)},fireLegacyEvent:function(h,n){var u=true,e,f,g;e=k[n].slice();for(var o=0,q=e.length;o<q;++o)if((f=e[o])&&f[this.WFN]){g=f[this.ADJ_SCOPE];f=f[this.WFN].call(g,h);u=u&&f}(e=b[n])&&e[2]&&e[2](h);return u},getLegacyIndex:function(h,n){var u=this.generateId(h)+n;return typeof s[u]== "undefined"?-1:s[u]},useLegacyEvent:function(h,n){return this.webkit&&this.webkit<419&&("click"==n||"dblclick"==n)},_removeListener:function(h,n,u,e,f){var g,o;if(typeof h=="string")h=this.getEl(h);else if(this._isValidCollection(h)){f=true;for(g=h.length-1;g>-1;g--)f=this._removeListener(h[g],n,u,e)&&f;return f}if(!u||!u.call)return this.purgeElement(h,false,n);if("unload"==n){for(g=d.length-1;g>-1;g--)if((o=d[g])&&o[0]==h&&o[1]==n&&o[2]==u){d.splice(g,1);return true}return false}g=null;f=f;if("undefined"=== typeof f)f=this._getCacheIndex(h,n,u);if(f>=0)g=c[f];if(!h||!g)return false;if(this.useLegacyEvent(h,n)){g=this.getLegacyIndex(h,n);var q=k[g];if(q){g=0;for(e=q.length;g<e;++g)if((o=q[g])&&o[this.EL]==h&&o[this.TYPE]==n&&o[this.FN]==u){q.splice(g,1);break}}}else try{this._simpleRemove(h,n,g[this.WFN],e)}catch(w){this.lastError=w;return false}delete c[f][this.WFN];delete c[f][this.FN];c.splice(f,1);return true},removeListener:function(h,n,u){return this._removeListener(h,n,u,false)},getTarget:function(h){return this.resolveTextNode(h.target|| h.srcElement)},resolveTextNode:function(h){try{if(h&&3==h.nodeType)return h.parentNode}catch(n){}return h},getPageX:function(h){var n=h.pageX;if(!n&&0!==n){n=h.clientX||0;if(this.isIE)n+=this._getScrollLeft()}return n},getPageY:function(h){var n=h.pageY;if(!n&&0!==n){n=h.clientY||0;if(this.isIE)n+=this._getScrollTop()}return n},getXY:function(h){return[this.getPageX(h),this.getPageY(h)]},getRelatedTarget:function(h){var n=h.relatedTarget;if(!n)if(h.type=="mouseout")n=h.toElement;else if(h.type=="mouseover")n= h.fromElement;return this.resolveTextNode(n)},getTime:function(h){if(!h.time){var n=(new Date).getTime();try{h.time=n}catch(u){this.lastError=u;return n}}return h.time},stopEvent:function(h){this.stopPropagation(h);this.preventDefault(h)},stopPropagation:function(h){if(h.stopPropagation)h.stopPropagation();else h.cancelBubble=true},preventDefault:function(h){if(h.preventDefault)h.preventDefault();else h.returnValue=false},getEvent:function(h){h=h||window.event;if(!h)for(var n=this.getEvent.caller;n;){if((h= n.arguments[0])&&Event==h.constructor)break;n=n.caller}return h},getCharCode:function(h){h=h.keyCode||h.charCode||0;if(YAHOO.env.ua.webkit&&h in p)h=p[h];return h},_getCacheIndex:function(h,n,u){for(var e=0,f=c.length;e<f;e+=1){var g=c[e];if(g&&g[this.FN]==u&&g[this.EL]==h&&g[this.TYPE]==n)return e}return-1},generateId:function(h){var n=h.id;if(!n){n="yuievtautoid-"+v;++v;h.id=n}return n},_isValidCollection:function(h){try{return h&&typeof h!=="string"&&h.length&&!h.tagName&&!h.alert&&typeof h[0]!== "undefined"}catch(n){return false}},elCache:{},getEl:function(h){return typeof h==="string"?document.getElementById(h):h},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",this),_load:function(){if(!a){a=true;var h=YAHOO.util.Event;h._ready();h._tryPreloadAttach()}},_ready:function(){var h=YAHOO.util.Event;if(!h.DOMReady){h.DOMReady=true;h.DOMReadyEvent.fire();h._simpleRemove(document,"DOMContentLoaded",h._ready)}},_tryPreloadAttach:function(){if(l.length===0){m=0;clearInterval(this._interval); this._interval=null}else if(!this.locked){if(this.isIE)if(!this.DOMReady){this.startInterval();return}this.locked=true;var h=!a;h||(h=m>0&&l.length>0);var n=[],u=function(w,x){var y=w;if(x.override)y=x.override===true?x.obj:x.override;x.fn.call(y,x.obj)},e,f,g,o,q=[];e=0;for(f=l.length;e<f;e+=1)if(g=l[e])if(o=this.getEl(g.id))if(g.checkReady){if(a||o.nextSibling||!h){q.push(g);l[e]=null}}else{u(o,g);l[e]=null}else n.push(g);e=0;for(f=q.length;e<f;e+=1){g=q[e];u(this.getEl(g.id),g)}m--;if(h){for(e= l.length-1;e>-1;e--){g=l[e];if(!g||!g.id)l.splice(e,1)}this.startInterval()}else{clearInterval(this._interval);this._interval=null}this.locked=false}},purgeElement:function(h,n,u){h=YAHOO.lang.isString(h)?this.getEl(h):h;var e=this.getListeners(h,u),f;if(e)for(f=e.length-1;f>-1;f--){var g=e[f];this._removeListener(h,g.type,g.fn,g.capture)}if(n&&h&&h.childNodes){f=0;for(e=h.childNodes.length;f<e;++f)this.purgeElement(h.childNodes[f],n,u)}},getListeners:function(h,n){var u=[],e;e=n?n==="unload"?[d]: [c]:[c,d];for(var f=YAHOO.lang.isString(h)?this.getEl(h):h,g=0;g<e.length;g+=1){var o=e[g];if(o)for(var q=0,w=o.length;q<w;++q){var x=o[q];if(x&&x[this.EL]===f&&(!n||n===x[this.TYPE]))u.push({type:x[this.TYPE],fn:x[this.FN],obj:x[this.OBJ],adjust:x[this.OVERRIDE],scope:x[this.ADJ_SCOPE],capture:x[this.CAPTURE],index:q})}}return u.length?u:null},_unload:function(h){var n=YAHOO.util.Event,u,e,f,g=d.slice();u=0;for(f=d.length;u<f;++u)if(e=g[u]){var o=window;if(e[n.ADJ_SCOPE])o=e[n.ADJ_SCOPE]===true? e[n.UNLOAD_OBJ]:e[n.ADJ_SCOPE];e[n.FN].call(o,n.getEvent(h,e[n.EL]),e[n.UNLOAD_OBJ]);g[u]=null}d=null;if(c)for(h=c.length-1;h>-1;h--)(e=c[h])&&n._removeListener(e[n.EL],e[n.TYPE],e[n.FN],e[n.CAPTURE],h);b=null;n._simpleRemove(window,"unload",n._unload)},_getScrollLeft:function(){return this._getScroll()[1]},_getScrollTop:function(){return this._getScroll()[0]},_getScroll:function(){var h=document.documentElement,n=document.body;return h&&(h.scrollTop||h.scrollLeft)?[h.scrollTop,h.scrollLeft]:n?[n.scrollTop, n.scrollLeft]:[0,0]},regCE:function(){},_simpleAdd:function(){return window.addEventListener?function(h,n,u,e){h.addEventListener(n,u,e)}:window.attachEvent?function(h,n,u){h.attachEvent("on"+n,u)}:function(){}}(),_simpleRemove:function(){return window.removeEventListener?function(h,n,u,e){h.removeEventListener(n,u,e)}:window.detachEvent?function(h,n,u){h.detachEvent("on"+n,u)}:function(){}}()}}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener; if(a.isIE){YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var c=document.createElement("p");a._dri=setInterval(function(){try{c.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();c=null}catch(d){}},a.POLL_INTERVAL)}else if(a.webkit&&a.webkit<525)a._dri=setInterval(function(){var d=document.readyState;if("loaded"==d||"complete"==d){clearInterval(a._dri);a._dri=null;a._ready()}},a.POLL_INTERVAL);else a._simpleAdd(document,"DOMContentLoaded",a._ready); a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach()})()}YAHOO.util.EventProvider=function(){}; YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,d,b){this.__yui_events=this.__yui_events||{};var k=this.__yui_events[a];if(k)k.subscribe(c,d,b);else{k=this.__yui_subscribers=this.__yui_subscribers||{};k[a]||(k[a]=[]);k[a].push({fn:c,obj:d,override:b})}},unsubscribe:function(a,c,d){var b=this.__yui_events=this.__yui_events||{};if(a){if(b=b[a])return b.unsubscribe(c,d)}else{a=true;for(var k in b)if(YAHOO.lang.hasOwnProperty(b,k))a=a&&b[k].unsubscribe(c, d);return a}return false},unsubscribeAll:function(a){return this.unsubscribe(a)},createEvent:function(a,c){this.__yui_events=this.__yui_events||{};var d=c||{},b=this.__yui_events;if(!b[a]){var k=new YAHOO.util.CustomEvent(a,d.scope||this,d.silent,YAHOO.util.CustomEvent.FLAT);b[a]=k;d.onSubscribeCallback&&k.subscribeEvent.subscribe(d.onSubscribeCallback);this.__yui_subscribers=this.__yui_subscribers||{};if(d=this.__yui_subscribers[a])for(var m=0;m<d.length;++m)k.subscribe(d[m].fn,d[m].obj,d[m].override)}return b[a]}, fireEvent:function(a){this.__yui_events=this.__yui_events||{};var c=this.__yui_events[a];if(!c)return null;for(var d=[],b=1;b<arguments.length;++b)d.push(arguments[b]);return c.fire.apply(c,d)},hasEvent:function(a){if(this.__yui_events)if(this.__yui_events[a])return true;return false}}; YAHOO.util.KeyListener=function(a,c,d,b){function k(l){if(!c.shift)c.shift=false;if(!c.alt)c.alt=false;if(!c.ctrl)c.ctrl=false;if(l.shiftKey==c.shift&&l.altKey==c.alt&&l.ctrlKey==c.ctrl){var s;if(c.keys instanceof Array)for(var v=0;v<c.keys.length;v++){s=c.keys[v];if(s==l.charCode){m.fire(l.charCode,l);break}else if(s==l.keyCode){m.fire(l.keyCode,l);break}}else{s=c.keys;if(s==l.charCode)m.fire(l.charCode,l);else s==l.keyCode&&m.fire(l.keyCode,l)}}}if(!b)b=YAHOO.util.KeyListener.KEYDOWN;var m=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);typeof d=="function"?m.subscribe(d):m.subscribe(d.fn,d.scope,d.correctScope);this.enable=function(){if(!this.enabled){YAHOO.util.Event.addListener(a,b,k);this.enabledEvent.fire(c)}this.enabled=true};this.disable=function(){if(this.enabled){YAHOO.util.Event.removeListener(a,b,k);this.disabledEvent.fire(c)}this.enabled=false};this.toString= function(){return"KeyListener ["+c.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"});var YL=YAHOO.lang,YUD=YAHOO.util.Dom,YUE=YAHOO.util.Event,get=YUD.get,AE={};AE.namespace=function(){var a=arguments,c=null,d,b,k;for(d=0;d<a.length;d+=1){k=a[d].split(".");c=AE;for(b=k[0]=="AE"?1:0;b<k.length;b+=1){c[k[b]]=c[k[b]]||{};c=c[k[b]]}}return c};AE.namespace("AE.widget");AE.namespace("AE.bom"); AE.bom={isGecko:YAHOO.env.ua.gecko>0,isIE:YAHOO.env.ua.ie>0,isIE6:YAHOO.env.ua.ie==6,isIE7:YAHOO.env.ua.ie==7,isIE8:YAHOO.env.ua.ie==8,isOpera:YAHOO.env.ua.opera>0,isSafari:navigator.userAgent.toLowerCase().indexOf("safari")!=-1,getCookie:function(a){return(a=document.cookie.match("(?:^|;)\\s*"+a+"=([^;]*)"))?unescape(a[1]):""},setCookie:function(a,c,d,b,k){c=escape(c);c+=b?"; domain="+b:"";c+=k?"; path="+k:"";if(d){b=new Date;b.setTime(b.getTime()+d*864E5);c+="; expires="+b.toGMTString()}document.cookie= a+"="+c},removeCookie:function(a){this.setCookie(a,"",-1)}};AE.cpAttribute=function(a,c){return YL.merge(c,a)};YL.isEnglish=function(a){return/[^\x00-\x80]/g.test(a)?false:true};YL.isAscii=function(a){return/[^\x00-\xFF]/g.test(a)?false:true};var trim=YL.trim;String.prototype.trim=function(){return YL.trim(this)};String.prototype.isEmpty=function(){return this==""};function encode(a){if(a==null)return"";var c=escape(a);if(a.indexOf("+")!=-1)c=c.replace(/\+/g,"%2B");return c} function encodeKeyword(a){if(a==null)return"";a=a.replace(/^\s*|\s*$/g,"");a=a.replace(/\s+/g,"_");a=encode(a);return encode(a)}function XMLEncode(a){a=trim(a);a=a.replace(/&/g,"&amp;");a=a.replace(/</g,"&lt;");a=a.replace(/>/g,"&gt;");a=a.replace(/\'/g,"&#39;");return a.replace(/\"/g,"&quot;")}function XMLDecode(a){a=trim(a);a=a.replace(/&amp;/g,"&");a=a.replace(/&lt;/g,"<");a=a.replace(/&gt;/g,">");a=a.replace(/&apos;|&#39;/g,"'");return a.replace(/&quot;/g,'"')} function toggleClass(a,c){for(var d=a.length||YL.isArray(a)?a:[a],b=0,k=d.length;b<k;b++)YUD.hasClass(d[b],c)?YUD.removeClass(d[b],c):YUD.addClass(d[b],c)}AE.namespace("AE.fix.imageLoader");AE.fix.imageLoader=function(){for(var a=new Image,c=0,d=arguments.length;c<d;c++)a.src=arguments[c]}; divCycle=function(){var a=this,c={sTabClass:"productCycleTab",sItemClass:"productCycleItem",oParentNode:document.body,sSwitchEvent:"click",iDelayTime:3E3,iCycleTimes:1,sCurrentClass:"current",sOrder:"asc",currentIndex:null},d,b,k,m=0,l,s=0,v=false;a.onSwitch=new YAHOO.util.CustomEvent("switch");a.init=function(t){c=YL.merge(c,t||{});d=YUD.getElementsByClassName(c.sTabClass,"*",c.oParentNode);b=YUD.getElementsByClassName(c.sItemClass,"*",c.oParentNode);l=Math.min(d.length,b.length);if(c.sOrder=="desc"&& !c.currentIndex)m=l-1;else if(c.currentIndex)m=c.currentIndex;YUE.on(d,"mouseover",a.stop);YUE.on(d,"mouseout",a.start);YUE.on(b,"mouseover",a.stop);YUE.on(b,"mouseout",a.start);for(i=0;i<l;i++)YUE.on(d[i],c.sSwitchEvent,a.show,i);c.iCycleTimes>0?a.start():p()};a.start=function(){clearInterval(k);k=setInterval(p,c.iDelayTime)};a.stop=function(){clearInterval(k)};a.show=function(t,r){if(v||!YL.isNumber(r)||r<0||r>=l)return false;m=r;YUD.batch(d,function(h){return YUD.removeClass(h,c.sCurrentClass)}); YUD.addClass(d[r],c.sCurrentClass);YUD.setStyle(b,"display","none");YUD.setStyle(b[r],"display","");a.onSwitch.fire()};var p=function(){if(!v){a.show(null,m);if(s>=c.iCycleTimes){a.stop();YUE.removeListener(d,"mouseover",a.stop);YUE.removeListener(d,"mouseout",a.start);YUE.removeListener(b,"mouseover",a.stop);YUE.removeListener(b,"mouseout",a.start);switch(c.sOrder){case "asc":case "desc":break}}switch(c.sOrder){case "asc":m++;if(m>=l){m=0;s++}break;case "desc":m--;if(m<0){m=l-1;s++}break}}};a.getCurrentIndex= function(){return m};a.lock=function(){v=true};a.unLock=function(){v=false}};var DEFAULT_VERSION="unknown"; function sendClientMsg(a,c,d,b,k,m){if(a=="")a=d;var l=checkInstallEnaliint();if(l==-1)downloadEnaliint();else if(l==0)location.href="TradeManager:SendIM_Encrypted?"+b;else if(l==1){a=k==4?"aliim:smssendmsg?uid="+a+c+"&touid="+b+"&suid="+c+"&encrypt=true":"aliim:sendmsg?uid="+a+c+"&touid="+b+"&siteid="+d+"&status="+k+getMoreProperties(m);execCommand(a)}else if(l==2){a="aliim:sendmsg?uid="+a+c+"&touid="+b+"&siteid="+d+"&status="+k+getMoreProperties(m);document.getElementById("chk_ww").SendCommand(a, 2)}}function addContact(a,c,d,b,k){var m=checkInstallEnaliint();if(m==-1)downloadEnaliint();else if(m==0){window.location="Trademanager:AddContact?uid="+b+"&checkcrm=true";setTimeout(function(){window.close()},"500")}else if(m==1){command="aliim:addcontact?uid="+a+c+"&touid="+d+b+getMoreProperties(k);execCommand(command)}}function startWW(a,c,d){a=checkInstallEnaliint();if(a!=-1)if(a==0)location.href="TradeManager:";else a==1&&execCommand("aliim:login?uid="+c+"&autologin=0&weblogin=1"+d)} function OnlyCheckOldAlitalkInstalled(){var a;try{hasBeeninstancedFireFox();a=new ActiveXObject("TradeManagerSetup.Install.1")}catch(c){return-1}return null!=a?0:-1}function checkInstallEnaliint(){var a=-1;if(checkIE()){try{var c=new ActiveXObject("aliimx.atmx");c.GetWangWangVersion();if(c!=null)return 1}catch(d){}a=OnlyCheckOldAlitalkInstalled()}else{hasBeeninstancedFireFox();if(hasBeeninstanced==1)return 2}return a}function downloadEnaliint(){window.open("")} function getMoreProperties(a){var c="";if(a!="")c=a.substring(0,1)!="&"?"&"+a:a;return c}function checkNavigat(){if(!checkIE())if(checkFirefoxIsBigThan15()){hasBeeninstancedFireFox();if(!hasBeenInstancePlugIn&&confirm("You need the Firefox plug-in. Click the Confirm button to download it."))window.InstallTrigger&&window.InstallTrigger.install();else hasBeenInstancePlugIn&&window.open()}}var hasBeenInstancePlugIn=false,hasBeeninstanced=0; function hasBeeninstancedFireFox(){if(checkFirefoxIsBigThan15()){var a=navigator.mimeTypes["application/ww-plugin"];if(a){hasBeenInstancePlugIn=true;if(a.enabledPlugin){if(!document.getElementById("chk_ww")){a=document.createElement("DIV");a.style.height="1px";a.style.width="1px";a.style.overflow="hidden";a.innerHTML='<embed id="chk_ww" name="chk_ww" type="application/ww-plugin" width=1 height=1 hidden="true" >';document.body.appendChild(a)}hasBeeninstanced=document.getElementById("chk_ww").isInstalled(2)}}}else hasBeeninstanced= false}function checkIE(){return navigator.appName=="Microsoft Internet Explorer"?true:false}function checkIEorFirefox(){return navigator.appName=="Microsoft Internet Explorer"||checkFirefoxIsBigThan15()?true:false}function checkFirefoxIsBigThan15(){if(window.navigator.userAgent.indexOf("Firefox")>=1){userAgent=window.navigator.userAgent;var a=userAgent.indexOf("Firefox/");if(userAgent.substr(a+8,3)>="1.5")return true}return false} function execCommand(a){try{(new ActiveXObject("aliimx.atmx")).ExecCmd(a)}catch(c){}}AE.namespace("AE.run.inboxIcon"); AE.run.inboxIcon=function(){var a={isUserStatusReady:false,isUserLogin:false,isNeedCheckMessage:false,memberSeq:""},c=navigator.browserLanguage?navigator.browserLanguage:navigator.language;this.userStatusMgr=function(){var m=this,l={isNew:false,isLoggedIn:false,formChina:false,firstIn:false,firstName:"",serviceType:"",memberSeq:""},s=function(){l.isNew=true;l.isLoggedIn=false;l.formChina=false;l.firstIn=false;l.firstName="";l.serviceType="";l.memberSeq="";a.isUserLogin=false};m.hasLoggedIn=function(){return l.isLoggedIn}; m.getFirstName=function(){return l.firstName};m.getServiceType=function(){return l.serviceType};m.isChinaUser=function(){return l.fromChina};m.isFirstIn=function(){return l.firstIn};m.getMemberSeq=function(){return l.memberSeq};m.isNewUser=function(){return l.isNew};m.init=function(){try{var v=AE.bom.getCookie("ali_non_s_temp"),p=AE.bom.getCookie("ali_non_s_ever");if(v)if(v=="is_sign=y"){l.isLoggedIn=true;a.isUserLogin=true}if(p){p=p.split("-_-");if(p.length<5)s();else{l.firstName=p[1];l.serviceType= p[3];l.memberSeq=p[4]}}else s();l.fromChina=m.hasLoggedIn()?m.getServiceType()=="cgs"||m.getServiceType()=="hkgs"||m.getServiceType()=="gs"||m.getServiceType()=="cfm"||m.getServiceType()=="twgs"?true:false:m.getServiceType()=="cgs"||m.getServiceType()=="hkgs"||m.getServiceType()=="gs"||m.getServiceType()=="cfm"||m.getServiceType()=="twgs"?true:m.getServiceType()?false:c.toLowerCase()=="zh-cn"?true:false;if(AE.bom.getCookie("ali_intl_firstIn").isEmpty()){l.firstIn=true;AE.bom.setCookie("ali_intl_firstIn", "n",true)}a.isUserStatusReady=true}catch(t){a.isUserStatusReady=false}}};this.unreadMessageMgr=function(){this.getCurrentData=function(){};this.doGetMessage=function(){YAHOO.util.Get.script((void 0).getDataUrl+"?id="+a.memberSeq+"&t="+new Date,{onSuccess:k})}};this.containerMgr=function(){};new this.userStatusMgr;var d=new this.unreadMessageMgr,b=new this.containerMgr,k=function(){d.getCurrentData();b.init()}}; if(!AE.widget.overShow)AE.widget.overShow=function(){var a=this,c={targetId:"overShowTargetId",positionId:false,contentId:"overShowContentId",showDelayTime:200,hiddenDelayTime:200,excursion:[0,0],needMask:false,needXY:true,closeBtnClass:"close-button"},d,b,k,m,l,s=false,v=true,p=false,t=false;a.hold=function(){t=true};a.setFree=function(){t=false};a.afterShow=new YAHOO.util.CustomEvent("afterShow",a);a.afterShowDelay=new YAHOO.util.CustomEvent("afterShowDelay",a);a.afterHidden=new YAHOO.util.CustomEvent("afterHidden", a);a.afterHiddenDelay=new YAHOO.util.CustomEvent("afterHiddenDelay",a);a.init=function(r){d=AE.cpAttribute(r,c);b=get(d.targetId);k=d.positionId?get(d.positionId):false;m=get(d.contentId);YUE.on(b,"mouseover",a.showDelay);YUE.on(m,"mouseover",a.showDelay);YUE.on(b,"mouseout",a.hiddenDelay);YUE.on(m,"mouseout",a.hiddenDelay);YUE.on(b,"mouseover",function(){v=false});YUE.on(m,"mouseover",function(){v=false});YUE.on(b,"mouseout",function(){v=true});YUE.on(m,"mouseout",function(){v=true});if(d.needMask){l= document.createElement("iframe");l.className="maskIframe";l.style.display="none";if(AE.bom.isIE6&&location.protocol=="https:")l.src=globalImgServer+"/js/blank.html";l.style.zIndex=YUD.getStyle(m,"zIndex")-1;l.style.top="0px";l.style.left="0px";l.frameBorder=0;m.parentNode.appendChild(l)}(r=YUD.getElementsByClassName(d.closeBtnClass))&&YUE.on(r,"click",function(){v=true;a.hiddenDirectly()})};a.showDelay=function(){a.afterShowDelay.fire();s&&clearTimeout(s);s=setTimeout(a.showDirectly,d.showDelayTime)}; a.showDirectly=function(){if(!(p||t)){m.style.visibility="hidden";m.style.display="";if(d.needXY){var r=YUD.getXY(k||b),h=d.excursion;if(typeof h[0]=="string"){if(h[0]=="auto")document.body.offsetWidth<YUD.getX(k||b)+m.offsetWidth?(h[0]="right"):(h[0]="left");switch(h[0]){case "center":h[0]=paseInt(k?k.offsetWidth/2:b.offsetWidth/2);break;case "right":h[0]=(k?k.offsetWidth:b.offsetWidth)-m.offsetWidth;break;default:h[0]=0}}if(typeof h[1]=="string")switch(h[1]){case "center":h[1]=paseInt(k?k.offsetHeight/ 2:b.offsetHeight/2);break;case "bottom":h[1]=k?k.offsetHeight:b.offsetHeight;break;default:h[1]=0}r[0]+=d.excursion[0];r[1]+=d.excursion[1]}m.style.visibility="visible";m.style.display="";d.needXY&&YUD.setXY(m,r);a.afterShow.fire();p=true;if(d.needMask){l.style.display="";l.style.width=m.offsetWidth+"px";l.style.height=m.offsetHeight+"px";d.needXY&&YUD.setXY(l,r);l.style.visibility="visible"}}};a.hiddenDelay=function(){a.afterHiddenDelay.fire();if(t!=true){s&&clearTimeout(s);s=setTimeout(a.hiddenDirectly, d.hiddenDelayTime)}};a.hiddenDirectly=function(){if(!v)return false;a.afterHidden.fire();m.style.display="none";if(d.needMask)l.style.display="none";p=false}};AE.namespace("AE.widget.intelligentSearch"); AE.widget.intelligentSearch=function(){this.inputEl=null;this.jsonData=[];this.selectedOption=[-1,"",""];this.config={};this._defConfig={url:"",inputElId:"",listCssClass:"intelligentList",listCssStyle:"left:0px;top:0px;width:200px;height:auto;z-index:100",keyWordClass:"",listItemNum:10,requestDelay:0.15,enableResultCount:1,returnVarName:"intelSearchData",isNeedSubmit:true};this.init=function(a){this.config=YL.merge(this._defConfig,a);this.inputEl=get(this.config.inputElId);this.UIController=YL.merge(this.UIController, {});this.requestHander=YL.merge(this.requestHander,{});this.dataParser=YL.merge(this.dataParser,{});this.UIController.init(this);this.onInit.fire()};this.initOnActive=function(){if(this.requestHander.requestCount==0&&!this.dataParser.isInit){this.requestHander.init(this);this.dataParser.init(this);this.UIController.initEvts();this.onActive.fire();return true}return false};this.onInit=new YAHOO.util.CustomEvent("onInit",this);this.onActive=new YAHOO.util.CustomEvent("onActive",this);this.onRequestSent= new YAHOO.util.CustomEvent("onRequestSent",this);this.onRequestFailure=new YAHOO.util.CustomEvent("onRequestFailure",this);this.onRequestSuccess=new YAHOO.util.CustomEvent("onRequestSuccess",this);this.onListDisplay=new YAHOO.util.CustomEvent("onListDisplay",this);this.onListDisplayed=new YAHOO.util.CustomEvent("onListDisplayed",this);this.onListHide=new YAHOO.util.CustomEvent("onListHide",this);this.onListHidden=new YAHOO.util.CustomEvent("onListHidden",this);this.onOptionClick=new YAHOO.util.CustomEvent("onOptionClick", this);this.onOptionMouseDown=new YAHOO.util.CustomEvent("onOptionMouseDown",this);this.onInputKeyDown=new YAHOO.util.CustomEvent("onInputKeyDown",this)}; AE.widget.intelligentSearch.prototype={requestHander:{_parent:null,_timer:null,_processor:null,_isLoading:false,disabled:false,requestCount:0,previousQuery:"",returnDataLength:0,init:function(a){this._parent=a},send:function(){var a=this,c=this._parent,d=c.config,b=c.dataParser.HTMLElements.inputEl;if(!(this.disabled||this._isLoading)){this._isLoading=true;this._timer=setTimeout(function(){var k=b.value.toLowerCase().replace(/^\s+/,"").replace(/\s{2,}/g," ");if(trim(k)=="")c.UIController.hideList(); else if(k==a.previousQuery)a.returnDataLength>0&&c.UIController.displayList();else{c.onRequestSent.fire();a.requestCount++;a._processor=YAHOO.util.Get.script(a._buildURL(k),{onSuccess:a._onSuccess,scope:a,charset:"iso-8859-1",data:k,insertBefore:c.inputEl})}a._isLoading=false},d.requestDelay*1E3)}},_onSuccess:function(a){var c=this._parent;c.jsonData=eval("window."+c.config.returnVarName);if(!YL.isArray(c.jsonData)||c.jsonData.length==0||trim(c.inputEl.value)==""){this.returnDataLength=0;c.UIController.hideList()}else{this.returnDataLength= c.jsonData.length;c.dataParser.update(c);c.UIController.displayList();c.onRequestSuccess.fire()}c.selectedOption[2]=this.previousQuery=a.data;c.jsonData=null;a.purge()},_buildURL:function(a){var c=this._parent.config,d="",b=c.url;if(b.indexOf("?")!=-1){d=b.split("?");b=d[0];d="&"+d[1]}return b+"?keyword="+encodeURIComponent(a)+"&varname="+c.returnVarName+"&__number="+c.enableResultCount+"&time="+(new Date).getTime()+d}},dataParser:{_parent:null,isInit:false,HTMLElements:{docEl:document,inputEl:null, listBox:null,iframeMask:null,showBtn:null,hideBtn:null,optionList:[]},init:function(a){var c=a.config,d=a.inputEl,b=this.HTMLElements;this._parent=a;b.inputEl=d;b.iframeMask=this._insertHTMLAfter(b.inputEl,this._buildHTML(c.listCssClass,c.listItemNum));b.listBox=YUD.getNextSibling(b.iframeMask);this._initHTMLElements(b.listBox);this._formatHTML();this.isInit=true},update:function(a){var c=this.HTMLElements,d=c.optionList,b=this._parent.jsonData;this.isInit||this.init(a);i=0;for(j=d.length;i<j;i++){a= d[i];c.inputEl.value.toLowerCase().replace(/^\s+/,"").replace(/\s{2,}/g," ");i<b.length||YUD.setStyle(a,"display","none")}},_insertHTMLAfter:function(a,c){if(a.insertAdjacentHTML)a.insertAdjacentHTML("AfterEnd",c);else{var d=a.ownerDocument.createRange();d.setStartAfter(a);d=d.createContextualFragment(c);a.parentNode.insertBefore(d,a.nextSibling)}return a.nextSibling},_initHTMLElements:function(a){var c=this.HTMLElements,d=[];c.showBtn=a.firstChild;c.hideBtn=YUD.getFirstChild(YUD.getNextSibling(c.showBtn)); d=a.getElementsByTagName("p");a=0;for(var b=d.length;a<b;a++);c.optionList=d},_formatHTML:function(){var a=this._parent.config,c=this.HTMLElements,d=c.listBox;c=c.iframeMask;if(!(!a.listCssStyle||a.listCssStyle=="")){a.listCssStyle=a.listCssStyle.replace(/\s/ig,"");a=a.listCssStyle.split(";");for(var b=0;b<a.length;b++){var k=a[b].split(":"),m=k[0];k=k[1];if(m)switch(m.toLowerCase()){case "z-index":YUD.setStyle(d,m,k);YUD.setStyle(c,"z-index",YUD.getStyle(d,"z-index")-1);break;case "top":case "left":case "width":case "height":YUD.setStyle([d, c],m,k);break;default:YUD.setStyle(d,m,k)}}d.orgWidth=d.clientWidth+"px"}},_boldKeyWords:function(a,c,d){if(!c)return a;return a.replace(c,'<span class="'+d+'">'+c+"</span>")}},UIController:{_els:{},_parent:null,_currentListItemIndex:-1,isOptionBoxOpen:false,isOptionListOpen:true,init:function(a){this._parent=a;a=get(a.config.inputElId);YUE.on(a,"click",this._inputElOnClick,this);YUE.on(a,"keydown",this._inputElOnKeydown,this)},initEvts:function(){if(this._parent&&this._parent.dataParser.isInit){this._els= this._parent.dataParser.HTMLElements;this.bindListeners(this._evtsMap)}},_evtsMap:[["docEl","click","_documentOnClick"],["inputEl","keyup","_inputElOnKeyup"],["inputEl","paste","_inputElOnKeyup"],["showBtn","click","_showBtnOnClick"],["hideBtn","click","_hideBtnOnClick"],["optionList","click","_optionOnClick"],["optionList","mouseover","_optionOnMouseover"],["optionList","mousedown","_optionOnMousedown"]],bindListeners:function(a){for(var c=0;c<a.length;c++){var d=a[c];YUE.on(this._els[d[0]],d[1], this[d[2]],this)}},_inputElOnKeyup:function(a,c){c._parent.requestHander.send()},_inputElOnKeydown:function(a,c){c._parent.initOnActive();c._parent.onInputKeyDown.fire(a.keyCode);c.isOptionListOpen&&c.moveListItem(a.keyCode)},_inputElOnClick:function(a,c){YUE.stopEvent(a);var d=c._parent;d.initOnActive();d.requestHander.send()},_documentOnClick:function(a,c){c.isOptionBoxOpen&&c.hideList()},_showBtnOnClick:function(a,c){YUE.stopEvent(a);YUD.setStyle(c._els.hideBtn,"display","");YUD.setStyle(YUD.getNextSibling(this), "display","");YUD.setStyle(this,"display","none");c.displayList(c._els.listBox.orgWidth);c.isOptionListOpen=true},_hideBtnOnClick:function(a,c){YUE.stopEvent(a);YUD.setStyle(c._els.showBtn,"display","");YUD.setStyle(this.parentNode,"display","none");YUD.setStyle(this,"display","none");c.isOptionListOpen=false;c.hideList("auto")},_optionOnClick:function(a,c){var d=c._parent.config;c._parent.onOptionClick.fire(this);YUE.stopEvent(a);d.isNeedSubmit&&d.isNeedSubmit==true&&c.submitSelect(c._els.inputEl.form); c.hideList()},_optionOnMouseover:function(a,c){var d=this.id.replace("listItem","");YUE.stopEvent(a);c.transListItem(d);c.setListItemIndex(d)},_optionOnMousedown:function(a,c){var d=this.id.replace("listItem","");c._parent.selectedOption[0]=d;c.setInputElValue(c._els.optionList[d]);c._parent.onOptionMouseDown.fire(this)},displayList:function(a){var c=this._els;a&&YUD.setStyle(c.listBox,"width",a);this.syncMaskWH();if(!this.isOptionBoxOpen){this._parent.onListDisplay.fire();YUD.setStyle([c.listBox, c.iframeMask],"visibility","visible");this.isOptionBoxOpen=true;this._parent.onListDisplayed.fire()}},hideList:function(a){var c=this._els;a&&YUD.setStyle(c.listBox,"width",a);if(this.isOptionBoxOpen){this._parent.onListHide.fire();YUD.setStyle([c.listBox,c.iframeMask],"visibility","hidden");YUD.removeClass(c.optionList,"current");this.isOptionBoxOpen=false;this._currentListItemIndex=-1;this._parent.onListHidden.fire()}},moveListItem:function(a){var c=this._els.optionList,d=this._currentListItemIndex, b=this._parent.requestHander.returnDataLength;if(!(b<=0||a!=38&&a!=40)){if(a==38){d--;if(d<0)d=b-1}else if(a==40){d++;if(d>=b)d=0}this.transListItem(d);this.setListItemIndex(d);this._parent.selectedOption[0]=d;this.setInputElValue(c[d])}},transListItem:function(a){var c=this._currentListItemIndex;c>=0&&YUD.removeClass(this._els.optionList[c],"current");YUD.addClass(this._els.optionList[a],"current")},submitSelect:function(a){this._els.inputEl.value.replace(/\s/g,"")!=""&&a.submit()},setListItemIndex:function(a){this._currentListItemIndex= parseInt(a)},setInputElValue:function(a){var c=a.innerText||a.textContent;a=YUD.getElementsByClassName("s","span",a);if(a.length==1){a=a[0];c=c.replace(a.innerText||a.textContent,"")}this._parent.requestHander.disabled=true;this._parent.selectedOption[1]=c;this._els.inputEl.value=c},syncMaskWH:function(){var a=this._els.listBox,c=this._els.iframeMask;YUD.setStyle(c,"width",a.offsetWidth+"px");YUD.setStyle(c,"height",a.offsetHeight+"px")}}};AE.namespace("AE.widget.xSelector"); AE.widget.xSelector=function(){var a=this,c=false;a.orgSelect=null;a.options=null;a.selectedIndex=-1;a.browseIndex=0;a.addNodeStatus=0;a.DATA={selectBox:null,inputEl:null,arrowEl:null,optionBox:null,optionOl:null,optionLis:[],mask:null};a.onChange=new YAHOO.util.CustomEvent("onChange",a);var d={selectId:"",fakeSelectId:"",selectBoxWH:[200,18],selectBoxZIndex:0,visibleOptions:20,optionBoxTop:"",arrowBoxLeft:"",isStick:0};a.init=function(p){p=d=YL.merge(d,p);var t=a.DATA;a.orgSelect=get(p.selectId); t.selectBox=get(p.fakeSelectId);t.inputEl=YUD.getElementsByClassName("inputEl","input",t.selectBox)[0];t.arrowEl=YUD.getElementsByClassName("arrowNormal","div",t.selectBox)[0];if(a.orgSelect){a.options=a.orgSelect.options;a.selectedIndex=a.orgSelect.selectedIndex;t.inputEl.value=a.orgSelect[a.selectedIndex].text;b();p=d;t=a.DATA;var r=p.selectBoxWH[0]+"px",h=p.selectBoxWH[1]+"px";YUD.setStyle(t.selectBox,"z-index",p.selectBoxZIndex);parseInt(YAHOO.env.ua.ie)==8&&YUD.setStyle(t.selectBox,"display", "inline-block");YUD.setStyle(t.inputEl,"width",r);YUD.setStyle(t.inputEl,"height",h);YUD.setStyle(t.inputEl,"line-height",h);YUD.setStyle(t.arrowEl,"left",p.arrowBoxLeft);YUD.setStyle(t.arrowEl,"z-index",p.selectBoxZIndex+2);a.orgSelect.fakeSelect=a}};a.dropdown=function(){var p=a.DATA;YUD.getStyle(p.optionBox,"visibility")=="hidden"&&YUD.setStyle([p.optionBox,p.mask],"visibility","visible")};a.rollup=function(){var p=a.DATA;YUD.getStyle(p.optionBox,"visibility")=="visible"&&YUD.setStyle([p.optionBox, p.mask],"visibility","hidden");d.isStick&&YUD.get("allCate")&&YUD.setStyle(YUD.get("allCate"),"visibility","hidden")};a.select=function(p){var t=a.DATA,r=t.optionLis[p];if(r.innerHTML!=""&&p!=a.selectedIndex){t.inputEl.value=r.childNodes[0].nodeValue;a.orgSelect.options[p].selected=true;a.selectedIndex=p;a.onChange.fire(a.orgSelect)}};var b=function(){var p=a.DATA;YUE.on(p.selectBox,"click",function(t){YUE.stopEvent(t);p.inputEl.focus();if(!c){t=a.DATA;t.optionBox=s("div",{"class":"optionBox"});for(var r= '<ol class="optionOl">',h=0;h<a.options.length;h++){var n=a.options[h];r+=n.text.match(/^-{3,}$/ig)!=null?'<li id="simulateOption'+h+'" class="optionLi subLine"></li>':'<li id="simulateOption'+h+'" class="optionLi '+n.className+'">'+n.text+"</li>"}r+="</ol>";t.optionBox.innerHTML=r;t.selectBox.appendChild(t.optionBox);t.optionOl=t.optionBox.firstChild;t.optionLis=t.optionOl.getElementsByTagName("li");t=d;r=a.DATA;t.optionBoxTop&&t.optionBoxTop!=""&&YUD.setStyle(r.optionBox,"top",t.optionBoxTop);YUD.setStyle(r.optionBox, "z-index",t.selectBoxZIndex+1);YUD.setStyle(r.optionBox,"visibility","hidden");AE.bom.isIE6&&YUD.setStyle(r.optionBox,"width","10px");r.optionOl.offsetWidth<r.inputEl.offsetWidth?YUD.setStyle(r.optionBox,"width",r.inputEl.offsetWidth+"px"):YUD.setStyle(r.optionBox,"width",r.optionOl.offsetWidth+"px");r.optionLis.length>t.visibleOptions&&YUD.setStyle(r.optionBox,"height",r.optionLis[0].offsetHeight*t.visibleOptions+"px");YUD.setStyle(r.optionOl,"overflow","hidden");k();t=d;r=a.DATA;r.mask=s("iframe", {frameBorder:"0",width:r.optionBox.offsetWidth,height:r.optionBox.offsetHeight});YUD.setStyle(r.mask,"position","absolute");YUD.setStyle(r.mask,"left",YUD.getStyle(r.optionBox,"left"));YUD.setStyle(r.mask,"top",YUD.getStyle(r.optionBox,"top"));YUD.setStyle(r.mask,"visibility","hidden");YUD.setStyle(r.mask,"z-index",t.selectBoxZIndex);r.selectBox.appendChild(r.mask);c=true}if(YUD.getStyle(p.optionBox,"visibility")=="hidden"){p.optionBox.scrollTop=a.selectedIndex*p.optionLis[0].offsetHeight;l(a.selectedIndex); a.dropdown();d.isStick&&v()}else a.rollup()});YUE.on(p.selectBox,"mouseover",function(){YUD.addClass(p.arrowEl,"arrowMouseover")});YUE.on(p.selectBox,"mouseout",function(){YUD.removeClass(p.arrowEl,"arrowMouseover")})},k=function(){var p=a.DATA,t=d;YUE.on(document,"click",a.rollup);YUE.on(p.inputEl,"keydown",function(n){YUE.stopEvent(n);if(n.altKey&&(n.keyCode==38||n.keyCode==40))if(YUD.getStyle(p.optionBox,"visibility")=="hidden"){l(a.selectedIndex);a.dropdown()}else a.rollup();if(!n.altKey){var u= 0,e=p.optionLis[0].offsetHeight,f=Math.floor(p.optionBox.scrollTop/e);if(n.keyCode==38){u=a.browseIndex<1?0:a.browseIndex-1;if(a.browseIndex==f)p.optionBox.scrollTop=(f-1)*e;l(u);a.select(u)}else if(n.keyCode==40){u=a.browseIndex+1>=p.optionLis.length?p.optionLis.length-1:a.browseIndex+1;if(a.browseIndex==f+t.visibleOptions-1)p.optionBox.scrollTop=(f+1)*e;l(u);a.select(u)}else if(n.keyCode==13){a.rollup();a.select(a.browseIndex)}}});for(var r=0;r<p.optionLis.length;r++){var h=p.optionLis[r];YUE.on(h, "click",function(n){YUE.stopEvent(n);a.select(m(this));a.rollup()});YUE.on(h,"mouseover",function(n){YUE.stopEvent(n);l(m(this))})}},m=function(p){return parseInt(p.id.replace("simulateOption",""))},l=function(p){var t=a.DATA;if(t.optionLis[p].innerHTML!=""){YUD.removeClass(YUD.getElementsByClassName("currentLi","li",t.optionOl),"currentLi");YUD.addClass(t.optionLis[p],"currentLi");d.isStick&&YUD.get("allCate")&&YUD.removeClass(YUD.get("allCate"),"currentLi")}a.browseIndex=p},s=function(p,t){var r= document.createElement(p);for(var h in t)h=="class"?YUD.addClass(r,t[h]):r.setAttribute(h,t[h]);return r},v=function(){var p=a.DATA,t=p.optionBox.getElementsByTagName("li")[p.optionBox.getElementsByTagName("li").length-1];if(a.addNodeStatus){r=YUD.get("allCate");YUD.setStyle(r,"visibility","visible")}else{var r=document.createElement("div"),h=document.createElement("div");tAllCate=document.createTextNode("\u00a0 In All Categories");liHeight=34;startTop=p.optionBox.offsetTop+p.optionBox.offsetHeight- liHeight;cateWidth=p.optionBox.clientWidth;h.className="stickSubLine";r.setAttribute("id","allCate");r.className="stickAllCate";r.style.cssText="top:"+startTop+"px;width:"+cateWidth+"px;";r.appendChild(h);r.appendChild(tAllCate);p.selectBox.appendChild(r);a.addNodeStatus=1}YUE.on(r,"click",function(n){YUE.stopEvent(n);a.select(m(t));a.rollup()});YUE.on(r,"mouseover",function(n){YUE.stopEvent(n);n=m(t);YUD.removeClass(YUD.getElementsByClassName("currentLi","li",a.DATA.optionOl),"currentLi");YUD.addClass(r, "currentLi");a.browseIndex=n})}}; var Cookies={set:function(a,c){var d=arguments,b=arguments.length,k=b>2?d[2]:null,m=b>3?d[3]:null,l=b>4?d[4]:"/";d=b>5?d[5]:false;document.cookie=a+"="+escape(c)+(k==null?"":"; expires="+k.toGMTString())+(l==null?"":"; path="+l)+(m==null?"":"; domain="+m)+(d==true?"; secure":"")},get:function(a){a+="=";for(var c=a.length,d=document.cookie.length,b=0,k=0;b<d;){k=b+c;if(document.cookie.substring(b,k)==a)return this.__get(k);b=document.cookie.indexOf(" ",b)+1;if(b==0)break}return null},__get:function(a){var c= document.cookie.indexOf(";",a);if(c==-1)c=document.cookie.length;return unescape(document.cookie.substring(a,c))},clear:function(a){var c=arguments,d=arguments.length,b=d>1?c[1]:null;c=d>2?c[2]:"/";if(this.get(a))document.cookie=a+"="+(c?"; path="+c:"")+(b?"; domain="+b:"")+"; expires=Thu, 01-Jan-70 00:00:01 GMT"},cookieCache:{},getCookieTable:function(a,c){var d=Cookies.cookieCache[a];if(null==d||d.changed){d=new CookieTable(a);var b=Cookies.get(a);null!=b&&b!=""&&d.parseFromString(b);if(c)d.domain= c;Cookies.cookieCache[a]=d}return d}},noExpires=new Date;noExpires.setTime(noExpires.getTime()+5184E6);var SEP_GROUP="\n\n",SEP_GROUP_NAME="^\n",SEP_GROUP_ITEM="$\n",SEP_ATTR="\t",NO_SET_STR="NOSET";function isArray(a){return a!=null&&typeof a=="object"&&"join"in a} function CookieTable(a,c,d,b,k,m){this.expires=d?d:noExpires;this.domain=b?b:null;this.path=k?k:"/";this.secure=m?m:false;this.name=a?a:null;this.groups=c&&isArray(c)?c:[];this.__tree={};this.changed=false;this.buildString=function(l){if(null!=l&&l.length>0)return l.join(SEP_GROUP);return null};this.parseFromString=function(l){if(null==l||""==l)return this;l=l.split(SEP_GROUP);this.removeAll();for(var s=0;s<l.length;s++)if(null!=l[s]&&""!=l[s]){var v=new CookieGroup;v.parseFromString(l[s]);this.add(v)}return this}; this.toString=function(){return this.buildString(this.groups)};this.size=function(){return this.groups.length};this.arrange=function(){for(var l=[],s={},v=0;v<this.size();v++)if(null!=this.groups[v]){l[l.length]=this.groups[v];s[this.groups[v].name]=this.groups[v]}this.removeAll();this.groups=l;this.__tree=s};this.__clearTree=function(){this.__tree={}};this.__addToTree=function(l){if(null!=l)this.__tree[l.name]=l};this.__removeFromTree=function(l){null!=l&&delete this.__tree[l.name]};this.removeAll= function(){this.groups=[];this.__clearTree()};this.get=function(l){if(this.__tree[l])return this.__tree[l];return null};this.add=function(l){if(null!=l){for(var s=0;s<this.size();s++)l.name.toLowerCase()==this.groups[s].name.toLowerCase()&&this.remove(l.name);l.parent=this;this.groups[this.size()]=l;this.__addToTree(l);return this}};this.remove=function(l){if(!(null==l||""==l)){for(var s=0;s<this.size();s++)if(l.toLowerCase()==this.groups[s].name.toLowerCase()){this.__removeFromTree(this.groups[s]); this.groups[s]=null}this.arrange();return this}};this.save=function(){this.changed=true;Cookies.set(this.name,this.toString(),this.expires,this.domain,this.path,this.secure)};this.clear=function(){Cookies.clear(this.name)};if(this.name!=null&&typeof c=="string")this.parseFromString(c);else if(this.name!=null&&isArray(c))for(a=0;a<this.size();a++)if(null!=this.groups[a]){this.__addToTree(this.groups[a]);this.groups[a].parent=this}} function CookieGroup(a,c){this.name=a?a:null;this.items=c&&isArray(c)?c:[];this.__tree={};this.max=20;this.parent=null;this.buildString=function(b){var k=this.name?this.name:NO_SET_STR;if(null!=b&&b.length>0)return k+SEP_GROUP_NAME+b.join(SEP_GROUP_ITEM);return k};this.parseFromString=function(b){if(null==b||""==b)return this;var k=b.indexOf(SEP_GROUP_NAME);if(k>-1){this.name=b.substring(0,k);b=b.substring(k+SEP_GROUP_NAME.length);if(null!=b&&b!=""){this.removeAll();b=b.split(SEP_GROUP_ITEM);for(k= 0;k<b.length;k++)if(null!=b[k]&&""!=b[k]){var m=new CookieItem;m.parseFromString(b[k]);this.add(m)}}}else this.name=b;return this};this.toString=function(){return this.buildString(this.items)};this.getReverse=function(){if(this.size()>0)return this.items.slice(0,this.items.length).reverse();return[]};this.setMax=function(b){this.max=b;this.arrange()};this.size=function(){return this.items.length};this.arrange=function(){for(var b=[],k={},m=0;m<this.size();m++)if(null!=this.items[m])b[b.length]=this.items[m]; if(b.length>this.max)b=b.slice(b.length-this.max,b.length);for(m=0;m<b.length;m++)k[b.key]=b[m];this.removeAll();this.items=b;this.__tree=k};this.__clearTree=function(){this.__tree={}};this.__addToTree=function(b){if(null!=b)this.__tree[b.key]=b};this.__removeFromTree=function(b){null!=b&&delete this.__tree[b.key]};this.removeAll=function(){this.items=[];this.__clearTree()};this.get=function(b){if(this.__tree[b])return this.__tree[b];return null};this.add=function(b){if(null!=b){for(var k=0;k<this.size();k++)b.key.toLowerCase()== this.items[k].key.toLowerCase()&&this.remove(b.key);b.parent=this;this.items[this.size()]=b;this.__addToTree(b);return this}};this.remove=function(b){if(!(null==b||""==b)){for(var k=0;k<this.size();k++)if(b.toLowerCase()==this.items[k].key.toLowerCase()){this.__removeFromTree(this.items[k]);this.items[k]=null}this.arrange();return this}};this.save=function(){if(null!=this.parent){this.arrange();this.parent.save()}};if(this.name!=null&&typeof c=="string")this.parseFromString(this.name+SEP_GROUP_NAME+ c);else if(this.name!=null&&isArray(c))for(var d=0;d<this.size();d++)if(null!=this.items[d]){this.__addToTree(this.items[d]);this.items[d].parent=this}} function CookieItem(a,c){this.key=a?a:null;this.attributes=c&&isArray(c)?c:[];this.max=20;this.parent=null;this.buildString=function(d){var b=this.key?this.key:NO_SET_STR;if(null!=d&&d.length>0)return b+SEP_ATTR+d.join(SEP_ATTR);return b};this.parseFromString=function(d){if(null==d||""==d)return this;d=d.split(SEP_ATTR);if(d.length>0){this.key=d[0];this.attributes=d.slice(1,d.length)}return this};this.setMax=function(d){this.max=d;this.arrange()};this.size=function(){return this.attributes.length}; this.toString=function(){return this.buildString(this.attributes)};this.getReverse=function(){if(this.size()>0)return this.attributes.slice(0,this.attributes.length).reverse();return[]};this.reverseString=function(){return this.buildString(this.getReverse())};this.arrange=function(){for(var d=[],b=0;b<this.size();b++)if(null!=this.attributes[b])d[d.length]=this.attributes[b];this.attributes=d.length>this.max?d.slice(d.length-this.max,d.length):d};this.removeAll=function(){this.attributes=[]};this.get= function(d){return d<this.size()?this.attributes[d]:null};this.add=function(d){if(!(null==d||""==d)){this.remove(d);this.attributes[this.size()]=d;this.arrange();return this}};this.remove=function(d){if(!(null==d||""==d)){for(var b=0;b<this.size();b++)if(d.toLowerCase()==this.attributes[b].toLowerCase())this.attributes[b]=null;this.arrange();return this}};this.contains=function(d){for(var b=0;b<this.size();b++)if(d.toLowerCase()==this.attributes[b].toLowerCase())return true};this.save=function(){if(null!= this.parent){this.arrange();this.parent.save()}};this.key!=null&&typeof c=="string"&&this.parseFromString(this.key+SEP_ATTR+c)}var TOP_DOMAIN="",HISTORY_COOKIE_NAME="history",GROUP_KEYWORDS="keywords",GROUP_PRODUCT="product",GROUP_SELLOFFER="selloffer",GROUP_BUYOFFER="buyoffer",GROUP_COMPANY="company",GROUP_CATEGORY="category",GROUP_PRODUCT_SELLOFFER=GROUP_PRODUCT+"_"+GROUP_SELLOFFER,MAX_KEYWORDS=8,MAX_PRODUCT=8,MAX_SELLOFFER=8,MAX_BUYOFFER=6,MAX_COMPANY=4,MAX_CATEGORY=6,MAX_PRODUCT_SELLOFFER=8; function getHistoryCookieTable(){return Cookies.getCookieTable(HISTORY_COOKIE_NAME,TOP_DOMAIN)}function getHistoryCookieGroup(a){var c=getHistoryCookieTable(),d=c.get(a);if(null==d){d=new CookieGroup(a);c.add(d);d.parent=c}return d} function addOrUpdateHistoryCookieItem(a,c,d,b){if(!(null==d||""==d)){var k=getHistoryCookieGroup(a),m=k.get(c),l=false;if(isArray(d))m=new CookieItem(c,d);else{m=null==m?new CookieItem(c):m;m.add(d)}l=true;k.add(m);a==GROUP_KEYWORDS?m.setMax(b):k.setMax(b);l&&k.save()}}function logKeywordsHistory(a){addOrUpdateHistoryCookieItem(GROUP_KEYWORDS,GROUP_KEYWORDS,a,MAX_KEYWORDS)}function logProductHistory(a,c){addOrUpdateHistoryCookieItem(GROUP_PRODUCT_SELLOFFER,a,c,MAX_PRODUCT_SELLOFFER)} function logSellOfferHistory(a,c){addOrUpdateHistoryCookieItem(GROUP_PRODUCT_SELLOFFER,a,c,MAX_PRODUCT_SELLOFFER)}function logCompanyHistory(a,c){addOrUpdateHistoryCookieItem(GROUP_COMPANY,a,c,MAX_COMPANY)}function logBuyOfferHistory(a,c){addOrUpdateHistoryCookieItem(GROUP_BUYOFFER,a,c,MAX_BUYOFFER)}function logCategoryHistory(a,c){addOrUpdateHistoryCookieItem(GROUP_CATEGORY,a,c,MAX_CATEGORY)} var adsDsiplayVerify=function(){var a={},c={isLogin:false,servType:"",productNum:"",tradeType:"",ipRegion:""};this.isInit=false;this.init=function(d){a=YL.merge(c,d);this.isInit=true};this.verify=function(d){if(!this.isInit)return true;if(!YL.isObject(d))return true;for(var b in d){var k=a[b],m=d[b];switch(b){case "isLogin":if(m!==k)return false;break;case "productNum":if(!eval(k+m))return false;break;case "tradeType":if(m!==k)return false;break;case "servType":if(m!=k&&!this.contain(k,m))return false; break;case "ipRegion":if(m!=k&&!this.contain(k,m))return false}}return true};this.contain=function(d,b){var k=(","+b+",").replace("!","").replace(/,\s*,/g,",");k=(new RegExp(","+d+",","ig")).test(k);var m=b.substr(0,1)=="!";return k!==m};this.checkTimeIn=function(d){var b;b=AE.bom.getCookie("aisn_home_firstIn");if(b==""){b=new Date;AE.bom.setCookie("aisn_home_firstIn",b,720);return true}else if(b=="expired")return false;else{var k=new Date;b=b;if((Date.parse(k)-Date.parse(b))/1E3<d*3600)return true; else{AE.bom.setCookie("aisn_home_firstIn","expired",720);return false}}}};AE.namespace("AE.widget.SimpleScroll"); AE.widget.SimpleScroll=new (function(){var a=YAHOO.util,c={delay:2,speed:20,startDelay:2,direction:"vertical",disableAutoPlay:false,distance:"auto",scrollItemCount:1};this.decorate=function(d,b){d=get(d);b=YL.merge(c,b||{});if(null!==d){var k=2;if(b.speed<20)k=5;if(b.lineHeight)b.distance=b.lineHeight;var m=null,l=null,s=null,v=b.direction.toLowerCase()=="horizontal"||b.direction.toLowerCase()=="h",p={};p._distance=0;p.scrollable=true;p.distance=b.distance;p._distance=0;p.suspend=false;p.paused=false; var t=new a.CustomEvent("_onScroll",p,false,a.CustomEvent.FLAT);t.subscribe(function(){var u=d.getElementsByTagName("li")[0];if(u){this.distance=b.distance=="auto"?u[v?"offsetWidth":"offsetHeight"]:b.distance;with(d)this.scrollable=v?scrollWidth-scrollLeft-offsetWidth>=this.distance:scrollHeight-scrollTop-offsetHeight>=this.distance}else this.scrollable=false});var r=new a.CustomEvent("onScroll",p,false,a.CustomEvent.FLAT);b.onScroll?r.subscribe(b.onScroll):r.subscribe(function(){for(var u=0;u<b.scrollItemCount;u++)d.appendChild(d.getElementsByTagName("li")[0]); d[v?"scrollLeft":"scrollTop"]=0});var h=function(){if(!p.suspend){p._distance+=k;var u;if((u=p._distance%p.distance)<k){d[v?"scrollLeft":"scrollTop"]+=k-u;clearInterval(m);r.fire();t.fire();l=null;p.scrollable&&!p.paused&&p.play()}else d[v?"scrollLeft":"scrollTop"]+=k}},n=function(){if(!p.paused){p._distance=0;m=setInterval(h,b.speed)}};YUE.on(d,"mouseover",function(){p.suspend=true});YUE.on(d,"mouseout",function(){p.suspend=false});p=YL.merge(p,{subscribeOnScroll:function(u,e){e===true&&r.subscribers.length> 0&&r.unsubscribeAll();r.subscribe(u)},pause:function(){this.paused=true;clearTimeout(l);l=null},play:function(){this.paused=false;s&&clearTimeout(s);l||(l=setTimeout(n,b.delay*1E3))}});p.onScroll=p.subscribeOnScroll;t.fire();b.disableAutoPlay||(s=setTimeout(function(){p.play()},b.startDelay*1E3));return p}}});AE.namespace("AE.app"); AE.app.categories=function(){this.config={rootTarget:get("categories"),subTarget:get("categories-subs"),afterLoadClass:"after-load-subs",itemCurrentClass:"current",afterShowSubClass:"after-show-sub",afterShowNextItemClass:"active-border-color",showDelayTime:50,hiddenDelayTime:50,excursion:[184,0]};this.temp={rootItems:[],subItems:{}};this.onAfterShow=new YAHOO.util.CustomEvent("onAfterShow",this);this.onAfterHide=new YAHOO.util.CustomEvent("onAfterHide",this);return this}; AE.app.categories.prototype={afterShow:function(a,c,d){a=this.config;this.onAfterShow.fire(this);if(d.subItem.offsetHeight+YUD.getY(d.subItem)>YUD.getViewportHeight()+YUD.getDocumentScrollTop()&&d.subItem.offsetHeight+110<YUD.getY(d.subItem)+d.rootItem.offsetHeight){c=YUD.getY(d.subItem)+YUD.getViewportHeight()+YUD.getDocumentScrollTop()-(d.subItem.offsetHeight+YUD.getY(d.subItem));if(c+d.subItem.offsetHeight<YUD.getY(d.subItem)+d.rootItem.offsetHeight+3)c+=YUD.getY(d.subItem)+d.rootItem.offsetHeight+ 3-(c+d.subItem.offsetHeight);YUD.setY(d.subItem,c)}a.afterShowSubClass&&YUD.addClass(a.rootTarget,a.afterShowSubClass);YUD.addClass(d.nextItem,a.afterShowNextItemClass);YUD.addClass(d.rootItem.parentNode,a.itemCurrentClass)},afterHidden:function(a,c,d){a=this.config;this.onAfterHide.fire(this);a.afterShowSubClass&&YUD.removeClass(a.rootTarget,a.afterShowSubClass);YUD.removeClass(d.nextItem,a.afterShowNextItemClass);YUD.removeClass(d.rootItem.parentNode,a.itemCurrentClass)},init:function(a){a=this.config= YL.merge(this.config,a||{});for(var c=a.subTarget.getElementsByTagName("ul"),d=0;d<c.length;d++){var b=c[d];this.temp.subItems[trim(b.getAttribute("rel")).toUpperCase()]=b}c=a.rootTarget.getElementsByTagName("a");for(d=0;d<c.length;d++){var k=c[d];b=trim(k.innerText?k.innerText:k.textContent).toUpperCase();if(this.temp.subItems[b]){var m=k.overShow=new AE.widget.overShow;b=this.temp.subItems[b];var l=c[d+1]?c[d+1]:null;m.afterShow.subscribe(this.afterShow,{rootItem:k,subItem:b,nextItem:l},this);m.afterHidden.subscribe(this.afterHidden, {rootItem:k,subItem:b,nextItem:l},this);m.init({targetId:k,contentId:b,showDelayTime:a.showDelayTime,hiddenDelayTime:a.hiddenDelayTime,excursion:a.excursion})}this.temp.rootItems.push(k)}YUD.addClass(a.rootTarget,a.afterLoadClass);AE.bom.isIE&&CollectGarbage();return this}};
