if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={}}YAHOO.namespace=function(){var a=arguments,b=null,d,e,c;for(d=0;d<a.length;d=d+1){c=(""+a[d]).split(".");b=YAHOO;for(e=(c[0]=="YAHOO")?1:0;e<c.length;e=e+1){b[c[e]]=b[c[e]]||{};b=b[c[e]]}}return b};YAHOO.log=function(b,a,c){var d=YAHOO.widget.Logger;if(d&&d.log){return d.log(b,a,c)}else{return false}};YAHOO.register=function(d,i,a){var e=YAHOO.env.modules,c,f,g,h,b;if(!e[d]){e[d]={versions:[],builds:[]}}c=e[d];f=a.version;g=a.build;h=YAHOO.env.listeners;c.name=d;c.version=f;c.build=g;c.versions.push(f);c.builds.push(g);c.mainClass=i;for(b=0;b<h.length;b=b+1){h[b](c)}if(i){i.VERSION=f;i.BUILD=g}else{YAHOO.log("mainClass is undefined for module "+d,"warn")}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null};YAHOO.env.ua=function(){var b={ie:0,opera:0,gecko:0,webkit:0,mobile:null,air:0,caja:0},c=navigator.userAgent,a;if((/KHTML/).test(c)){b.webkit=1}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){b.webkit=parseFloat(a[1]);if(/ Mobile\//.test(c)){b.mobile="Apple"}else{a=c.match(/NokiaN[^\/]*/);if(a){b.mobile=a[0]}}a=c.match(/AdobeAIR\/([^\s]*)/);if(a){b.air=a[0]}}if(!b.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){b.opera=parseFloat(a[1]);a=c.match(/Opera Mini[^;]*/);if(a){b.mobile=a[0]}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){b.ie=parseFloat(a[1])}else{a=c.match(/Gecko\/([^\s]*)/);if(a){b.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){b.gecko=parseFloat(a[1])}}}}}a=c.match(/Caja\/([^\s]*)/);if(a&&a[1]){b.caja=parseFloat(a[1])}return b}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var d=YAHOO_config.listener,a=YAHOO.env.listeners,b=true,c;if(d){for(c=0;c<a.length;c=c+1){if(a[c]==d){b=false;break}}if(b){a.push(d)}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,b="[object Array]",e="[object Function]",a=Object.prototype,c=["toString","valueOf"],d={isArray:function(g){return a.toString.apply(g)===b},isBoolean:function(g){return typeof g==="boolean"},isFunction:function(g){return a.toString.apply(g)===e},isNull:function(g){return g===null},isNumber:function(g){return typeof g==="number"&&isFinite(g)},isObject:function(g){return(g&&(typeof g==="object"||f.isFunction(g)))||false},isString:function(g){return typeof g==="string"},isUndefined:function(g){return typeof g==="undefined"},_IEEnumFix:(YAHOO.env.ua.ie)?function(i,j){var k,g,h;for(k=0;k<c.length;k=k+1){g=c[k];h=j[g];if(f.isFunction(h)&&h!=a[g]){i[g]=h}}}:function(){},extend:function(h,g,i){if(!g||!h){throw new Error("extend failed, please check that all dependencies are included.")}var j=function(){},k;j.prototype=g.prototype;h.prototype=new j();h.prototype.constructor=h;h.superclass=g.prototype;if(g.prototype.constructor==a.constructor){g.prototype.constructor=g}if(i){for(k in i){if(f.hasOwnProperty(i,k)){h.prototype[k]=i[k]}}f._IEEnumFix(h.prototype,i)}},augmentObject:function(h,i){if(!i||!h){throw new Error("Absorb failed, verify dependencies.")}var l=arguments,j,g,k=l[2];if(k&&k!==true){for(j=2;j<l.length;j=j+1){h[l[j]]=i[l[j]]}}else{for(g in i){if(k||!(g in h)){h[g]=i[g]}}f._IEEnumFix(h,i)}},augmentProto:function(g,h){if(!h||!g){throw new Error("Augment failed, verify dependencies.")}var j=[g.prototype,h.prototype],i;for(i=2;i<arguments.length;i=i+1){j.push(arguments[i])}f.augmentObject.apply(this,j)},dump:function(o,j){var m,k,h=[],g="{...}",n="f(){...}",i=", ",l=" => ";if(!f.isObject(o)){return o+""}else{if(o instanceof Date||("nodeType" in o&&"tagName" in o)){return o}else{if(f.isFunction(o)){return n}}}j=(f.isNumber(j))?j:3;if(f.isArray(o)){h.push("[");for(m=0,k=o.length;m<k;m=m+1){if(f.isObject(o[m])){h.push((j>0)?f.dump(o[m],j-1):g)}else{h.push(o[m])}h.push(i)}if(h.length>1){h.pop()}h.push("]")}else{h.push("{");for(m in o){if(f.hasOwnProperty(o,m)){h.push(m+l);if(f.isObject(o[m])){h.push((j>0)?f.dump(o[m],j-1):g)}else{h.push(o[m])}h.push(i)}}if(h.length>1){h.pop()}h.push("}")}return h.join("")},substitute:function(g,u,n){var q,r,s,k,j,h,l=[],t,p="dump",m=" ",v="{",i="}",o;for(;;){q=g.lastIndexOf(v);if(q<0){break}r=g.indexOf(i,q);if(q+1>=r){break}t=g.substring(q+1,r);k=t;h=null;s=k.indexOf(m);if(s>-1){h=k.substring(s+1);k=k.substring(0,s)}j=u[k];if(n){j=n(k,j,h)}if(f.isObject(j)){if(f.isArray(j)){j=f.dump(j,parseInt(h,10))}else{h=h||"";o=h.indexOf(p);if(o>-1){h=h.substring(4)}if(j.toString===a.toString||o>-1){j=f.dump(j,parseInt(h,10))}else{j=j.toString()}}}else{if(!f.isString(j)&&!f.isNumber(j)){j="~-"+l.length+"-~";l[l.length]=t}}g=g.substring(0,q)+j+g.substring(r+1)}for(q=l.length-1;q>=0;q=q-1){g=g.replace(new RegExp("~-"+q+"-~"),"{"+l[q]+"}","g")}return g},trim:function(h){try{return h.replace(/^\s+|\s+$/g,"")}catch(g){return h}},merge:function(){var g={},i=arguments,j=i.length,h;for(h=0;h<j;h=h+1){f.augmentObject(g,i[h],true)}return g},later:function(h,n,g,l,k){h=h||0;n=n||{};var m=g,i=l,j,o;if(f.isString(g)){m=n[g]}if(!m){throw new TypeError("method undefined")}if(!f.isArray(i)){i=[l]}j=function(){m.apply(n,i)};o=(k)?setInterval(j,h):setTimeout(j,h);return{interval:k,cancel:function(){if(this.interval){clearInterval(o)}else{clearTimeout(o)}}}},isValue:function(g){return(f.isObject(g)||f.isString(g)||f.isNumber(g)||f.isBoolean(g))}};f.hasOwnProperty=(a.hasOwnProperty)?function(h,g){return h&&h.hasOwnProperty(g)}:function(h,g){return !f.isUndefined(h[g])&&h.constructor.prototype[g]!==h[g]};d.augmentObject(f,d,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend})();YAHOO.register("yahoo",YAHOO,{version:"2.7.0",build:"1799"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var ao=YAHOO.util,ai=YAHOO.lang,aE=YAHOO.env.ua,at=YAHOO.lang.trim,aN={},aJ={},ag=/^t(?:able|d|h)$/i,y=/color$/i,aj=window.document,z=aj.documentElement,aM="ownerDocument",aD="defaultView",av="documentElement",ax="compatMode",aP="offsetLeft",ae="offsetTop",aw="offsetParent",x="parentNode",aF="nodeType",aq="tagName",af="scrollLeft",aI="scrollTop",ad="getBoundingClientRect",au="getComputedStyle",aQ="currentStyle",ah="CSS1Compat",aO="BackCompat",aK="class",an="className",ak="",ar=" ",ay="(?:^|\\s)",aG="(?= |$)",Y="g",aB="position",aL="fixed",G="relative",aH="left",aC="top",az="medium",aA="borderLeftWidth",ac="borderTopWidth",ap=aE.opera,al=aE.webkit,am=aE.gecko,aa=aE.ie;ao.Dom={CUSTOM_ATTRIBUTES:(!z.hasAttribute)?{"for":"htmlFor","class":an}:{htmlFor:"for",className:aK},get:function(f){var e,d,c,a,b;if(f){if(f[aF]||f.item){return f}if(typeof f==="string"){e=f;f=aj.getElementById(f);if(f&&f.id===e){return f}else{if(f&&aj.all){f=null;d=aj.all[e];for(a=0,b=d.length;a<b;++a){if(d[a].id===e){return d[a]}}}}return f}if(f.DOM_EVENTS){f=f.get("element")}if("length" in f){c=[];for(a=0,b=f.length;a<b;++a){c[c.length]=ao.Dom.get(f[a])}return c}return f}return null},getComputedStyle:function(a,b){if(window[au]){return a[aM][aD][au](a,null)[b]}else{if(a[aQ]){return ao.Dom.IE_ComputedStyle.get(a,b)}}},getStyle:function(a,b){return ao.Dom.batch(a,ao.Dom._getStyle,b)},_getStyle:function(){if(window[au]){return function(b,d){d=(d==="float")?d="cssFloat":ao.Dom._toCamel(d);var a=b.style[d],c;if(!a){c=b[aM][aD][au](b,null);if(c){a=c[d]}}return a}}else{if(z[aQ]){return function(b,e){var a;switch(e){case"opacity":a=100;try{a=b.filters["DXImageTransform.Microsoft.Alpha"].opacity}catch(d){try{a=b.filters("alpha").opacity}catch(c){}}return a/100;case"float":e="styleFloat";default:e=ao.Dom._toCamel(e);a=b[aQ]?b[aQ][e]:null;return(b.style[e]||a)}}}}}(),setStyle:function(b,c,a){ao.Dom.batch(b,ao.Dom._setStyle,{prop:c,val:a})},_setStyle:function(){if(aa){return function(c,b){var a=ao.Dom._toCamel(b.prop),d=b.val;if(c){switch(a){case"opacity":if(ai.isString(c.style.filter)){c.style.filter="alpha(opacity="+d*100+")";if(!c[aQ]||!c[aQ].hasLayout){c.style.zoom=1}}break;case"float":a="styleFloat";default:c.style[a]=d}}else{}}}else{return function(c,b){var a=ao.Dom._toCamel(b.prop),d=b.val;if(c){if(a=="float"){a="cssFloat"}c.style[a]=d}else{}}}}(),getXY:function(a){return ao.Dom.batch(a,ao.Dom._getXY)},_canPosition:function(a){return(ao.Dom._getStyle(a,"display")!=="none"&&ao.Dom._inDoc(a))},_getXY:function(){if(aj[av][ad]){return function(j){var i,a,h,c,d,e,f,l,k,g=Math.floor,b=false;if(ao.Dom._canPosition(j)){h=j[ad]();c=j[aM];i=ao.Dom.getDocumentScrollLeft(c);a=ao.Dom.getDocumentScrollTop(c);b=[g(h[aH]),g(h[aC])];if(aa&&aE.ie<8){d=2;e=2;f=c[ax];l=ab(c[av],aA);k=ab(c[av],ac);if(aE.ie===6){if(f!==aO){d=0;e=0}}if((f==aO)){if(l!==az){d=parseInt(l,10)}if(k!==az){e=parseInt(k,10)}}b[0]-=d;b[1]-=e}if((a||i)){b[0]+=i;b[1]+=a}b[0]=g(b[0]);b[1]=g(b[1])}else{}return b}}else{return function(h){var a,g,f,d,c,e=false,b=h;if(ao.Dom._canPosition(h)){e=[h[aP],h[ae]];a=ao.Dom.getDocumentScrollLeft(h[aM]);g=ao.Dom.getDocumentScrollTop(h[aM]);c=((am||aE.webkit>519)?true:false);while((b=b[aw])){e[0]+=b[aP];e[1]+=b[ae];if(c){e=ao.Dom._calcBorders(b,e)}}if(ao.Dom._getStyle(h,aB)!==aL){b=h;while((b=b[x])&&b[aq]){f=b[aI];d=b[af];if(am&&(ao.Dom._getStyle(b,"overflow")!=="visible")){e=ao.Dom._calcBorders(b,e)}if(f||d){e[0]-=d;e[1]-=f}}e[0]+=a;e[1]+=g}else{if(ap){e[0]-=a;e[1]-=g}else{if(al||am){e[0]+=a;e[1]+=g}}}e[0]=Math.floor(e[0]);e[1]=Math.floor(e[1])}else{}return e}}}(),getX:function(a){var b=function(c){return ao.Dom.getXY(c)[0]};return ao.Dom.batch(a,b,ao.Dom,true)},getY:function(a){var b=function(c){return ao.Dom.getXY(c)[1]};return ao.Dom.batch(a,b,ao.Dom,true)},setXY:function(b,a,c){ao.Dom.batch(b,ao.Dom._setXY,{pos:a,noRetry:c})},_setXY:function(i,f){var e=ao.Dom._getStyle(i,aB),g=ao.Dom.setStyle,b=f.pos,a=f.noRetry,d=[parseInt(ao.Dom.getComputedStyle(i,aH),10),parseInt(ao.Dom.getComputedStyle(i,aC),10)],c,h;if(e=="static"){e=G;g(i,aB,e)}c=ao.Dom._getXY(i);if(!b||c===false){return false}if(isNaN(d[0])){d[0]=(e==G)?0:i[aP]}if(isNaN(d[1])){d[1]=(e==G)?0:i[ae]}if(b[0]!==null){g(i,aH,b[0]-c[0]+d[0]+"px")}if(b[1]!==null){g(i,aC,b[1]-c[1]+d[1]+"px")}if(!a){h=ao.Dom._getXY(i);if((b[0]!==null&&h[0]!=b[0])||(b[1]!==null&&h[1]!=b[1])){ao.Dom._setXY(i,{pos:b,noRetry:true})}}},setX:function(b,a){ao.Dom.setXY(b,[a,null])},setY:function(a,b){ao.Dom.setXY(a,[null,b])},getRegion:function(a){var b=function(c){var d=false;if(ao.Dom._canPosition(c)){d=ao.Region.getRegion(c)}else{}return d};return ao.Dom.batch(a,b,ao.Dom,true)},getClientWidth:function(){return ao.Dom.getViewportWidth()},getClientHeight:function(){return ao.Dom.getViewportHeight()},getElementsByClassName:function(f,b,e,c,j,d){f=ai.trim(f);b=b||"*";e=(e)?ao.Dom.get(e):null||aj;if(!e){return[]}var a=[],k=e.getElementsByTagName(b),h=ao.Dom.hasClass;for(var i=0,g=k.length;i<g;++i){if(h(k[i],f)){a[a.length]=k[i]}}if(c){ao.Dom.batch(a,c,j,d)}return a},hasClass:function(b,a){return ao.Dom.batch(b,ao.Dom._hasClass,a)},_hasClass:function(a,c){var b=false,d;if(a&&c){d=ao.Dom.getAttribute(a,an)||ak;if(c.exec){b=c.test(d)}else{b=c&&(ar+d+ar).indexOf(ar+c+ar)>-1}}else{}return b},addClass:function(b,a){return ao.Dom.batch(b,ao.Dom._addClass,a)},_addClass:function(a,c){var b=false,d;if(a&&c){d=ao.Dom.getAttribute(a,an)||ak;if(!ao.Dom._hasClass(a,c)){ao.Dom.setAttribute(a,an,at(d+ar+c));b=true}}else{}return b},removeClass:function(b,a){return ao.Dom.batch(b,ao.Dom._removeClass,a)},_removeClass:function(f,a){var e=false,d,c,b;if(f&&a){d=ao.Dom.getAttribute(f,an)||ak;ao.Dom.setAttribute(f,an,d.replace(ao.Dom._getClassRegex(a),ak));c=ao.Dom.getAttribute(f,an);if(d!==c){ao.Dom.setAttribute(f,an,at(c));e=true;if(ao.Dom.getAttribute(f,an)===""){b=(f.hasAttribute&&f.hasAttribute(aK))?aK:an;f.removeAttribute(b)}}}else{}return e},replaceClass:function(a,c,b){return ao.Dom.batch(a,ao.Dom._replaceClass,{from:c,to:b})},_replaceClass:function(g,a){var f,c,e,b=false,d;if(g&&a){c=a.from;e=a.to;if(!e){b=false}else{if(!c){b=ao.Dom._addClass(g,a.to)}else{if(c!==e){d=ao.Dom.getAttribute(g,an)||ak;f=(ar+d.replace(ao.Dom._getClassRegex(c),ar+e)).split(ao.Dom._getClassRegex(e));f.splice(1,0,ar+e);ao.Dom.setAttribute(g,an,at(f.join(ak)));b=true}}}}else{}return b},generateId:function(b,a){a=a||"yui-gen";var c=function(e){if(e&&e.id){return e.id}var d=a+YAHOO.env._id_counter++;if(e){if(e[aM].getElementById(d)){return ao.Dom.generateId(e,d+a)}e.id=d}return d};return ao.Dom.batch(b,c,ao.Dom,true)||c.apply(ao.Dom,arguments)},isAncestor:function(c,a){c=ao.Dom.get(c);a=ao.Dom.get(a);var b=false;if((c&&a)&&(c[aF]&&a[aF])){if(c.contains&&c!==a){b=c.contains(a)}else{if(c.compareDocumentPosition){b=!!(c.compareDocumentPosition(a)&16)}}}else{}return b},inDocument:function(a,b){return ao.Dom._inDoc(ao.Dom.get(a),b)},_inDoc:function(c,a){var b=false;if(c&&c[aq]){a=a||c[aM];b=ao.Dom.isAncestor(a[av],c)}else{}return b},getElementsBy:function(a,b,f,d,i,e,c){b=b||"*";f=(f)?ao.Dom.get(f):null||aj;if(!f){return[]}var j=[],k=f.getElementsByTagName(b);for(var h=0,g=k.length;h<g;++h){if(a(k[h])){if(c){j=k[h];break}else{j[j.length]=k[h]}}}if(d){ao.Dom.batch(j,d,i,e)}return j},getElementBy:function(a,b,c){return ao.Dom.getElementsBy(a,b,c,null,null,null,true)},batch:function(a,c,f,e){var g=[],d=(e)?f:window;a=(a&&(a[aq]||a.item))?a:ao.Dom.get(a);if(a&&c){if(a[aq]||a.length===undefined){return c.call(d,a,f)}for(var b=0;b<a.length;++b){g[g.length]=c.call(d,a[b],f)}}else{return false}return g},getDocumentHeight:function(){var b=(aj[ax]!=ah||al)?aj.body.scrollHeight:z.scrollHeight,a=Math.max(b,ao.Dom.getViewportHeight());return a},getDocumentWidth:function(){var b=(aj[ax]!=ah||al)?aj.body.scrollWidth:z.scrollWidth,a=Math.max(b,ao.Dom.getViewportWidth());return a},getViewportHeight:function(){var a=self.innerHeight,b=aj[ax];if((b||aa)&&!ap){a=(b==ah)?z.clientHeight:aj.body.clientHeight}return a},getViewportWidth:function(){var a=self.innerWidth,b=aj[ax];if(b||aa){a=(b==ah)?z.clientWidth:aj.body.clientWidth}return a},getAncestorBy:function(a,b){while((a=a[x])){if(ao.Dom._testElement(a,b)){return a}}return null},getAncestorByClassName:function(c,b){c=ao.Dom.get(c);if(!c){return null}var a=function(d){return ao.Dom.hasClass(d,b)};return ao.Dom.getAncestorBy(c,a)},getAncestorByTagName:function(c,b){c=ao.Dom.get(c);if(!c){return null}var a=function(d){return d[aq]&&d[aq].toUpperCase()==b.toUpperCase()};return ao.Dom.getAncestorBy(c,a)},getPreviousSiblingBy:function(a,b){while(a){a=a.previousSibling;if(ao.Dom._testElement(a,b)){return a}}return null},getPreviousSibling:function(a){a=ao.Dom.get(a);if(!a){return null}return ao.Dom.getPreviousSiblingBy(a)},getNextSiblingBy:function(a,b){while(a){a=a.nextSibling;if(ao.Dom._testElement(a,b)){return a}}return null},getNextSibling:function(a){a=ao.Dom.get(a);if(!a){return null}return ao.Dom.getNextSiblingBy(a)},getFirstChildBy:function(b,a){var c=(ao.Dom._testElement(b.firstChild,a))?b.firstChild:null;return c||ao.Dom.getNextSiblingBy(b.firstChild,a)},getFirstChild:function(a,b){a=ao.Dom.get(a);if(!a){return null}return ao.Dom.getFirstChildBy(a)},getLastChildBy:function(b,a){if(!b){return null}var c=(ao.Dom._testElement(b.lastChild,a))?b.lastChild:null;return c||ao.Dom.getPreviousSiblingBy(b.lastChild,a)},getLastChild:function(a){a=ao.Dom.get(a);return ao.Dom.getLastChildBy(a)},getChildrenBy:function(c,d){var a=ao.Dom.getFirstChildBy(c,d),b=a?[a]:[];ao.Dom.getNextSiblingBy(a,function(e){if(!d||d(e)){b[b.length]=e}return false});return b},getChildren:function(a){a=ao.Dom.get(a);if(!a){}return ao.Dom.getChildrenBy(a)},getDocumentScrollLeft:function(a){a=a||aj;return Math.max(a[av].scrollLeft,a.body.scrollLeft)},getDocumentScrollTop:function(a){a=a||aj;return Math.max(a[av].scrollTop,a.body.scrollTop)},insertBefore:function(b,a){b=ao.Dom.get(b);a=ao.Dom.get(a);if(!b||!a||!a[x]){return null}return a[x].insertBefore(b,a)},insertAfter:function(b,a){b=ao.Dom.get(b);a=ao.Dom.get(a);if(!b||!a||!a[x]){return null}if(a.nextSibling){return a[x].insertBefore(b,a.nextSibling)}else{return a[x].appendChild(b)}},getClientRegion:function(){var a=ao.Dom.getDocumentScrollTop(),c=ao.Dom.getDocumentScrollLeft(),d=ao.Dom.getViewportWidth()+c,b=ao.Dom.getViewportHeight()+a;return new ao.Region(a,d,b,c)},setAttribute:function(c,b,a){b=ao.Dom.CUSTOM_ATTRIBUTES[b]||b;c.setAttribute(b,a)},getAttribute:function(b,a){a=ao.Dom.CUSTOM_ATTRIBUTES[a]||a;return b.getAttribute(a)},_toCamel:function(c){var a=aN;function b(e,d){return d.toUpperCase()}return a[c]||(a[c]=c.indexOf("-")===-1?c:c.replace(/-([a-z])/gi,b))},_getClassRegex:function(b){var a;if(b!==undefined){if(b.exec){a=b}else{a=aJ[b];if(!a){b=b.replace(ao.Dom._patterns.CLASS_RE_TOKENS,"\\$1");a=aJ[b]=new RegExp(ay+b+aG,Y)}}}return a},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}])/g},_testElement:function(a,b){return a&&a[aF]==1&&(!b||b(a))},_calcBorders:function(a,d){var c=parseInt(ao.Dom[au](a,ac),10)||0,b=parseInt(ao.Dom[au](a,aA),10)||0;if(am){if(ag.test(a[aq])){c=0;b=0}}d[0]+=b;d[1]+=c;return d}};var ab=ao.Dom[au];if(aE.opera){ao.Dom[au]=function(c,b){var a=ab(c,b);if(y.test(b)){a=ao.Dom.Color.toRGB(a)}return a}}if(aE.webkit){ao.Dom[au]=function(c,b){var a=ab(c,b);if(a==="rgba(0, 0, 0, 0)"){a="transparent"}return a}}})();YAHOO.util.Region=function(c,b,a,d){this.top=c;this.y=c;this[1]=c;this.right=b;this.bottom=a;this.left=d;this.x=d;this[0]=d;this.width=this.right-this.left;this.height=this.bottom-this.top};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(b){var d=Math.max(this.top,b.top),c=Math.min(this.right,b.right),a=Math.min(this.bottom,b.bottom),e=Math.max(this.left,b.left);if(a>=d&&c>=e){return new YAHOO.util.Region(d,c,a,e)}else{return null}};YAHOO.util.Region.prototype.union=function(b){var d=Math.min(this.top,b.top),c=Math.max(this.right,b.right),a=Math.max(this.bottom,b.bottom),e=Math.min(this.left,b.left);return new YAHOO.util.Region(d,c,a,e)};YAHOO.util.Region.prototype.toString=function(){return("Region {top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}")};YAHOO.util.Region.getRegion=function(d){var b=YAHOO.util.Dom.getXY(d),e=b[1],c=b[0]+d.offsetWidth,a=b[1]+d.offsetHeight,f=b[0];return new YAHOO.util.Region(e,c,a,f)};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0]}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a)};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var v=YAHOO.util,w="clientTop",r="clientLeft",n="parentNode",m="right",a="hasLayout",o="px",c="opacity",l="auto",t="borderLeftWidth",q="borderTopWidth",h="borderRightWidth",b="borderBottomWidth",e="visible",g="transparent",j="height",s="width",p="style",d="currentStyle",f=/^width|height$/,i=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,k={get:function(A,y){var z="",x=A[d][y];if(y===c){z=v.Dom.getStyle(A,c)}else{if(!x||(x.indexOf&&x.indexOf(o)>-1)){z=x}else{if(v.Dom.IE_COMPUTED[y]){z=v.Dom.IE_COMPUTED[y](A,y)}else{if(i.test(x)){z=v.Dom.IE.ComputedStyle.getPixel(A,y)}else{z=x}}}}return z},getOffset:function(A,z){var x=A[d][z],E=z.charAt(0).toUpperCase()+z.substr(1),D="offset"+E,C="pixel"+E,y="",B;if(x==l){B=A[D];if(B===undefined){y=0}y=B;if(f.test(z)){A[p][z]=B;if(A[D]>B){y=B-(A[D]-B)}A[p][z]=l}}else{if(!A[p][C]&&!A[p][z]){A[p][z]=x}y=A[p][C]}return y+o},getBorderWidth:function(z,x){var y=null;if(!z[d][a]){z[p].zoom=1}switch(x){case q:y=z[w];break;case b:y=z.offsetHeight-z.clientHeight-z[w];break;case t:y=z[r];break;case h:y=z.offsetWidth-z.clientWidth-z[r];break}return y+o},getPixel:function(A,B){var y=null,x=A[d][m],z=A[d][B];A[p][m]=z;y=A[p].pixelRight;A[p][m]=x;return y+o},getMargin:function(y,z){var x;if(y[d][z]==l){x=0+o}else{x=v.Dom.IE.ComputedStyle.getPixel(y,z)}return x},getVisibility:function(y,z){var x;while((x=y[d])&&x[z]=="inherit"){y=y[n]}return(x)?x[z]:e},getColor:function(x,y){return v.Dom.Color.toRGB(x[d][y])||g},getBorderColor:function(z,A){var y=z[d],x=y[A]||y.color;return v.Dom.Color.toRGB(v.Dom.Color.toHex(x))}},u={};u.top=u.right=u.bottom=u.left=u[s]=u[j]=k.getOffset;u.color=k.getColor;u[q]=u[h]=u[b]=u[t]=k.getBorderWidth;u.marginTop=u.marginRight=u.marginBottom=u.marginLeft=k.getMargin;u.visibility=k.getVisibility;u.borderColor=u.borderTopColor=u.borderRightColor=u.borderBottomColor=u.borderLeftColor=k.getBorderColor;v.Dom.IE_COMPUTED=u;v.Dom.IE_ComputedStyle=k})();(function(){var c="toString",a=parseInt,d=RegExp,b=YAHOO.util;b.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!b.Dom.Color.re_RGB.test(e)){e=b.Dom.Color.toHex(e)}if(b.Dom.Color.re_hex.exec(e)){e="rgb("+[a(d.$1,16),a(d.$2,16),a(d.$3,16)].join(", ")+")"}return e},toHex:function(e){e=b.Dom.Color.KEYWORDS[e]||e;if(b.Dom.Color.re_RGB.exec(e)){var f=(d.$1.length===1)?"0"+d.$1:Number(d.$1),g=(d.$2.length===1)?"0"+d.$2:Number(d.$2),h=(d.$3.length===1)?"0"+d.$3:Number(d.$3);e=[f[c](16),g[c](16),h[c](16)].join("")}if(e.length<6){e=e.replace(b.Dom.Color.re_hex3,"$1$1")}if(e!=="transparent"&&e.indexOf("#")<0){e="#"+e}return e.toLowerCase()}}}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.7.0",build:"1799"});YAHOO.util.CustomEvent=function(c,d,e,a){this.type=c;this.scope=d||window;this.silent=e;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var b="_YUICEOnSubscribe";if(c!==b){this.subscribeEvent=new YAHOO.util.CustomEvent(b,this,true)}this.lastError=null};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(a,c,b){if(!a){throw new Error("Invalid callback for subscriber to '"+this.type+"'")}if(this.subscribeEvent){this.subscribeEvent.fire(a,c,b)}this.subscribers.push(new YAHOO.util.Subscriber(a,c,b))},unsubscribe:function(d,b){if(!d){return this.unsubscribeAll()}var c=false;for(var f=0,a=this.subscribers.length;f<a;++f){var e=this.subscribers[f];if(e&&e.contains(d,b)){this._delete(f);c=true}}return c},fire:function(){this.lastError=null;var g=[],m=this.subscribers.length;if(!m&&this.silent){return true}var i=[].slice.call(arguments,0),k=true,a,h=false;if(!this.silent){}var b=this.subscribers.slice(),d=YAHOO.util.Event.throwErrors;for(a=0;a<m;++a){var e=b[a];if(!e){h=true}else{if(!this.silent){}var f=e.getScope(this.scope);if(this.signature==YAHOO.util.CustomEvent.FLAT){var c=null;if(i.length>0){c=i[0]}try{k=e.fn.call(f,c,e.obj)}catch(l){this.lastError=l;if(d){throw l}}}else{try{k=e.fn.call(f,this.type,i,e.obj)}catch(j){this.lastError=j;if(d){throw j}}}if(false===k){if(!this.silent){}break}}}return(k!==false)},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b)}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+"', context: "+this.scope}};YAHOO.util.Subscriber=function(a,c,b){this.fn=a;this.obj=YAHOO.lang.isUndefined(c)?null:c;this.overrideContext=b};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj}else{return this.overrideContext}}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+", overrideContext: "+(this.overrideContext||"no")+" }"};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var i=false;var h=[];var g=[];var j=[];var l=[];var b=0;var k=[];var c=[];var d=0;var a={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9};var f=YAHOO.env.ua.ie?"focusin":"focus";var e=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,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 n=this;var m=function(){n._tryPreloadAttach()};this._interval=setInterval(m,this.POLL_INTERVAL)}},onAvailable:function(m,q,o,n,p){var s=(YAHOO.lang.isString(m))?[m]:m;for(var r=0;r<s.length;r=r+1){k.push({id:s[r],fn:q,obj:o,overrideContext:n,checkReady:p})}b=this.POLL_RETRYS;this.startInterval()},onContentReady:function(m,p,o,n){this.onAvailable(m,p,o,n,true)},onDOMReady:function(o,n,m){if(this.DOMReady){setTimeout(function(){var p=window;if(m){if(m===true){p=n}else{p=m}}o.call(p,"DOMReady",[],n)},0)}else{this.DOMReadyEvent.subscribe(o,n,m)}},_addListener:function(x,z,n,t,p,A){if(!n||!n.call){return false}if(this._isValidCollection(x)){var m=true;for(var s=0,q=x.length;s<q;++s){m=this.on(x[s],z,n,t,p)&&m}return m}else{if(YAHOO.lang.isString(x)){var u=this.getEl(x);if(u){x=u}else{this.onAvailable(x,function(){YAHOO.util.Event.on(x,z,n,t,p)});return true}}}if(!x){return false}if("unload"==z&&t!==this){g[g.length]=[x,z,n,t,p];return true}var y=x;if(p){if(p===true){y=t}else{y=p}}var w=function(C){return n.call(y,YAHOO.util.Event.getEvent(C,x),t)};var B=[x,z,n,w,y,t,p];var r=h.length;h[r]=B;if(this.useLegacyEvent(x,z)){var v=this.getLegacyIndex(x,z);if(v==-1||x!=j[v][0]){v=j.length;c[x.id+z]=v;j[v]=[x,z,x["on"+z]];l[v]=[];x["on"+z]=function(C){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(C),v)}}l[v].push(B)}else{try{this._simpleAdd(x,z,w,A)}catch(o){this.lastError=o;this.removeListener(x,z,n);return false}}return true},addListener:function(p,m,q,o,n){return this._addListener(p,m,q,o,n,false)},addFocusListener:function(o,p,n,m){return this._addListener(o,f,p,n,m,true)},removeFocusListener:function(m,n){return this.removeListener(m,f,n)},addBlurListener:function(o,p,n,m){return this._addListener(o,e,p,n,m,true)},removeBlurListener:function(m,n){return this.removeListener(m,e,n)},fireLegacyEvent:function(q,s){var o=true,v,m,n,u,p;m=l[s].slice();for(var t=0,r=m.length;t<r;++t){n=m[t];if(n&&n[this.WFN]){u=n[this.ADJ_SCOPE];p=n[this.WFN].call(u,q);o=(o&&p)}}v=j[s];if(v&&v[2]){v[2](q)}return o},getLegacyIndex:function(n,m){var o=this.generateId(n)+m;if(typeof c[o]=="undefined"){return -1}else{return c[o]}},useLegacyEvent:function(n,m){return(this.webkit&&this.webkit<419&&("click"==m||"dblclick"==m))},removeListener:function(w,x,o){var t,q,m;if(typeof w=="string"){w=this.getEl(w)}else{if(this._isValidCollection(w)){var n=true;for(t=w.length-1;t>-1;t--){n=(this.removeListener(w[t],x,o)&&n)}return n}}if(!o||!o.call){return this.purgeElement(w,false,x)}if("unload"==x){for(t=g.length-1;t>-1;t--){m=g[t];if(m&&m[0]==w&&m[1]==x&&m[2]==o){g.splice(t,1);return true}}return false}var s=null;var r=arguments[3];if("undefined"===typeof r){r=this._getCacheIndex(w,x,o)}if(r>=0){s=h[r]}if(!w||!s){return false}if(this.useLegacyEvent(w,x)){var u=this.getLegacyIndex(w,x);var v=l[u];if(v){for(t=0,q=v.length;t<q;++t){m=v[t];if(m&&m[this.EL]==w&&m[this.TYPE]==x&&m[this.FN]==o){v.splice(t,1);break}}}}else{try{this._simpleRemove(w,x,s[this.WFN],false)}catch(p){this.lastError=p;return false}}delete h[r][this.WFN];delete h[r][this.FN];h.splice(r,1);return true},getTarget:function(m,n){var o=m.target||m.srcElement;return this.resolveTextNode(o)},resolveTextNode:function(m){try{if(m&&3==m.nodeType){return m.parentNode}}catch(n){}return m},getPageX:function(m){var n=m.pageX;if(!n&&0!==n){n=m.clientX||0;if(this.isIE){n+=this._getScrollLeft()}}return n},getPageY:function(n){var m=n.pageY;if(!m&&0!==m){m=n.clientY||0;if(this.isIE){m+=this._getScrollTop()}}return m},getXY:function(m){return[this.getPageX(m),this.getPageY(m)]},getRelatedTarget:function(m){var n=m.relatedTarget;if(!n){if(m.type=="mouseout"){n=m.toElement}else{if(m.type=="mouseover"){n=m.fromElement}}}return this.resolveTextNode(n)},getTime:function(m){if(!m.time){var n=new Date().getTime();try{m.time=n}catch(o){this.lastError=o;return n}}return m.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(n,p){var o=n||window.event;if(!o){var m=this.getEvent.caller;while(m){o=m.arguments[0];if(o&&Event==o.constructor){break}m=m.caller}}return o},getCharCode:function(m){var n=m.keyCode||m.charCode||0;if(YAHOO.env.ua.webkit&&(n in a)){n=a[n]}return n},_getCacheIndex:function(n,m,o){for(var p=0,q=h.length;p<q;p=p+1){var r=h[p];if(r&&r[this.FN]==o&&r[this.EL]==n&&r[this.TYPE]==m){return p}}return -1},generateId:function(n){var m=n.id;if(!m){m="yuievtautoid-"+d;++d;n.id=m}return m},_isValidCollection:function(m){try{return(m&&typeof m!=="string"&&m.length&&!m.tagName&&!m.alert&&typeof m[0]!=="undefined")}catch(n){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(m){if(!i){i=true;var n=YAHOO.util.Event;n._ready();n._tryPreloadAttach()}},_ready:function(m){var n=YAHOO.util.Event;if(!n.DOMReady){n.DOMReady=true;n.DOMReadyEvent.fire();n._simpleRemove(document,"DOMContentLoaded",n._ready)}},_tryPreloadAttach:function(){if(k.length===0){b=0;if(this._interval){clearInterval(this._interval);this._interval=null}return}if(this.locked){return}if(this.isIE){if(!this.DOMReady){this.startInterval();return}}this.locked=true;var n=!i;if(!n){n=(b>0&&k.length>0)}var o=[];var m=function(v,u){var w=v;if(u.overrideContext){if(u.overrideContext===true){w=u.obj}else{w=u.overrideContext}}u.fn.call(w,u.obj)};var s,t,p,q,r=[];for(s=0,t=k.length;s<t;s=s+1){p=k[s];if(p){q=this.getEl(p.id);if(q){if(p.checkReady){if(i||q.nextSibling||!n){r.push(p);k[s]=null}}else{m(q,p);k[s]=null}}else{o.push(p)}}}for(s=0,t=r.length;s<t;s=s+1){p=r[s];m(this.getEl(p.id),p)}b--;if(n){for(s=k.length-1;s>-1;s--){p=k[s];if(!p||!p.id){k.splice(s,1)}}this.startInterval()}else{if(this._interval){clearInterval(this._interval);this._interval=null}}this.locked=false},purgeElement:function(p,o,m){var r=(YAHOO.lang.isString(p))?this.getEl(p):p;var n=this.getListeners(r,m),q,t;if(n){for(q=n.length-1;q>-1;q--){var s=n[q];this.removeListener(r,s.type,s.fn)}}if(o&&r&&r.childNodes){for(q=0,t=r.childNodes.length;q<t;++q){this.purgeElement(r.childNodes[q],o,m)}}},getListeners:function(t,v){var q=[],u;if(!v){u=[h,g]}else{if(v==="unload"){u=[g]}else{u=[h]}}var o=(YAHOO.lang.isString(t))?this.getEl(t):t;for(var r=0;r<u.length;r=r+1){var m=u[r];if(m){for(var p=0,n=m.length;p<n;++p){var s=m[p];if(s&&s[this.EL]===o&&(!v||v===s[this.TYPE])){q.push({type:s[this.TYPE],fn:s[this.FN],obj:s[this.OBJ],adjust:s[this.OVERRIDE],scope:s[this.ADJ_SCOPE],index:p})}}}}return(q.length)?q:null},_unload:function(n){var t=YAHOO.util.Event,q,r,s,o,p,m=g.slice(),u;for(q=0,o=g.length;q<o;++q){s=m[q];if(s){u=window;if(s[t.ADJ_SCOPE]){if(s[t.ADJ_SCOPE]===true){u=s[t.UNLOAD_OBJ]}else{u=s[t.ADJ_SCOPE]}}s[t.FN].call(u,t.getEvent(n,s[t.EL]),s[t.UNLOAD_OBJ]);m[q]=null}}s=null;u=null;g=null;if(h){for(r=h.length-1;r>-1;r--){s=h[r];if(s){t.removeListener(s[t.EL],s[t.TYPE],s[t.FN],r)}}s=null}j=null;t._simpleRemove(window,"unload",t._unload)},_getScrollLeft:function(){return this._getScroll()[1]},_getScrollTop:function(){return this._getScroll()[0]},_getScroll:function(){var n=document.documentElement,m=document.body;if(n&&(n.scrollTop||n.scrollLeft)){return[n.scrollTop,n.scrollLeft]}else{if(m){return[m.scrollTop,m.scrollLeft]}else{return[0,0]}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(n,m,o,p){n.addEventListener(m,o,(p))}}else{if(window.attachEvent){return function(n,m,o,p){n.attachEvent("on"+m,o)}}else{return function(){}}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(n,m,o,p){n.removeEventListener(m,o,(p))}}else{if(window.detachEvent){return function(n,m,o){n.detachEvent("on"+m,o)}}else{return 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 b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null}catch(c){}},a.POLL_INTERVAL)}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){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,e,b,c){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(e,b,c)}else{this.__yui_subscribers=this.__yui_subscribers||{};var f=this.__yui_subscribers;if(!f[a]){f[a]=[]}f[a].push({fn:e,obj:b,overrideContext:c})}},unsubscribe:function(f,d,b){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(f){var c=a[f];if(c){return c.unsubscribe(d,b)}}else{var g=true;for(var e in a){if(YAHOO.lang.hasOwnProperty(a,e)){g=g&&a[e].unsubscribe(d,b)}}return g}return false},unsubscribeAll:function(a){return this.unsubscribe(a)},createEvent:function(g,a){this.__yui_events=this.__yui_events||{};var d=a||{};var e=this.__yui_events;if(e[g]){}else{var f=d.scope||this;var i=(d.silent);var c=new YAHOO.util.CustomEvent(g,f,i,YAHOO.util.CustomEvent.FLAT);e[g]=c;if(d.onSubscribeCallback){c.subscribeEvent.subscribe(d.onSubscribeCallback)}this.__yui_subscribers=this.__yui_subscribers||{};var h=this.__yui_subscribers[g];if(h){for(var b=0;b<h.length;++b){c.subscribe(h[b].fn,h[b].obj,h[b].overrideContext)}}}return e[g]},fireEvent:function(d,e,a,f){this.__yui_events=this.__yui_events||{};var b=this.__yui_events[d];if(!b){return null}var g=[];for(var c=1;c<arguments.length;++c){g.push(arguments[c])}return b.fire.apply(b,g)},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true}}return false}};(function(){var a=YAHOO.util.Event,b=YAHOO.lang;YAHOO.util.KeyListener=function(i,d,h,g){if(!i){}else{if(!d){}else{if(!h){}}}if(!g){g=YAHOO.util.KeyListener.KEYDOWN}var f=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(b.isString(i)){i=document.getElementById(i)}if(b.isFunction(h)){f.subscribe(h)}else{f.subscribe(h.fn,h.scope,h.correctScope)}function e(m,n){if(!d.shift){d.shift=false}if(!d.alt){d.alt=false}if(!d.ctrl){d.ctrl=false}if(m.shiftKey==d.shift&&m.altKey==d.alt&&m.ctrlKey==d.ctrl){var l,o=d.keys,j;if(YAHOO.lang.isArray(o)){for(var k=0;k<o.length;k++){l=o[k];j=a.getCharCode(m);if(l==j){f.fire(j,m);break}}}else{j=a.getCharCode(m);if(o==j){f.fire(j,m)}}}}this.enable=function(){if(!this.enabled){a.on(i,g,e);this.enabledEvent.fire(d)}this.enabled=true};this.disable=function(){if(this.enabled){a.removeListener(i,g,e);this.disabledEvent.fire(d)}this.enabled=false};this.toString=function(){return"KeyListener ["+d.keys+"] "+i.tagName+(i.id?"["+i.id+"]":"")}};var c=YAHOO.util.KeyListener;c.KEYDOWN="keydown";c.KEYUP="keyup";c.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.7.0",build:"1799"});YAHOO.register("yahoo-dom-event",YAHOO,{version:"2.7.0",build:"1799"});(function(){var a=YAHOO.util;a.Selector={_foundCache:[],_regexCache:{},_re:{nth:/^(?:([-]?\d*)(n){1}|(odd|even)$)*([-+]?\d*)$/,attr:/(\[.*\])/g,urls:/^(?:href|src)/},document:window.document,attrAliases:{},shorthand:{"\\#(-?[_a-z]+[-\\w]*)":"[id=$1]","\\.(-?[_a-z]+[-\\w]*)":"[class~=$1]"},operators:{"=":function(c,b){return c===b},"!=":function(c,b){return c!==b},"~=":function(d,b){var c=" ";return(c+d+c).indexOf((c+b+c))>-1},"|=":function(c,b){return c===b||c.slice(0,b.length+1)===b+"-"},"^=":function(c,b){return c.indexOf(b)===0},"$=":function(c,b){return c.slice(-b.length)===b},"*=":function(c,b){return c.indexOf(b)>-1},"":function(c,b){return c}},pseudos:{root:function(b){return b===b.ownerDocument.documentElement},"nth-child":function(c,b){return a.Selector._getNth(c,b)},"nth-last-child":function(c,b){return a.Selector._getNth(c,b,null,true)},"nth-of-type":function(c,b){return a.Selector._getNth(c,b,c.tagName)},"nth-last-of-type":function(c,b){return a.Selector._getNth(c,b,c.tagName,true)},"first-child":function(b){return a.Selector._getChildren(b.parentNode)[0]===b},"last-child":function(b){var c=a.Selector._getChildren(b.parentNode);return c[c.length-1]===b},"first-of-type":function(c,b){return a.Selector._getChildren(c.parentNode,c.tagName)[0]},"last-of-type":function(c,b){var d=a.Selector._getChildren(c.parentNode,c.tagName);return d[d.length-1]},"only-child":function(b){var c=a.Selector._getChildren(b.parentNode);return c.length===1&&c[0]===b},"only-of-type":function(b){return a.Selector._getChildren(b.parentNode,b.tagName).length===1},empty:function(b){return b.childNodes.length===0},not:function(c,b){return !a.Selector.test(c,b)},contains:function(d,b){var c=d.innerText||d.textContent||"";return c.indexOf(b)>-1},checked:function(b){return b.checked===true}},test:function(b,d){b=a.Selector.document.getElementById(b)||b;if(!b){return false}var e=d?d.split(","):[];if(e.length){for(var c=0,f=e.length;c<f;++c){if(a.Selector._test(b,e[c])){return true}}return false}return a.Selector._test(b,d)},_test:function(b,i,j,k){j=j||a.Selector._tokenize(i).pop()||{};if(!b.tagName||(j.tag!=="*"&&b.tagName!==j.tag)||(k&&b._found)){return false}if(j.attributes.length){var d,h,c=a.Selector._re.urls;if(!b.attributes||!b.attributes.length){return false}for(var g=0,e;e=j.attributes[g++];){h=(c.test(e[0]))?2:0;d=b.getAttribute(e[0],h);if(d===null||d===undefined){return false}if(a.Selector.operators[e[1]]&&!a.Selector.operators[e[1]](d,e[2])){return false}}}if(j.pseudos.length){for(var g=0,f=j.pseudos.length;g<f;++g){if(a.Selector.pseudos[j.pseudos[g][0]]&&!a.Selector.pseudos[j.pseudos[g][0]](b,j.pseudos[g][1])){return false}}}return(j.previous&&j.previous.combinator!==",")?a.Selector._combinators[j.previous.combinator](b,j):true},filter:function(e,f){e=e||[];var c,g=[],b=a.Selector._tokenize(f);if(!e.item){for(var d=0,h=e.length;d<h;++d){if(!e[d].tagName){c=a.Selector.document.getElementById(e[d]);if(c){e[d]=c}else{}}}}g=a.Selector._filter(e,a.Selector._tokenize(f)[0]);return g},_filter:function(f,d,c,g){var h=c?null:[],b=a.Selector._foundCache;for(var e=0,i=f.length;e<i;e++){if(!a.Selector._test(f[e],"",d,g)){continue}if(c){return f[e]}if(g){if(f[e]._found){continue}f[e]._found=true;b[b.length]=f[e]}h[h.length]=f[e]}return h},query:function(d,c,b){var e=a.Selector._query(d,c,b);return e},_query:function(m,h,g,o){var e=(g)?null:[],p;if(!m){return e}var b=m.split(",");if(b.length>1){var f;for(var l=0,k=b.length;l<k;++l){f=arguments.callee(b[l],h,g,true);e=g?f:e.concat(f)}a.Selector._clearFoundCache();return e}if(h&&!h.nodeName){h=a.Selector.document.getElementById(h);if(!h){return e}}h=h||a.Selector.document;if(h.nodeName!=="#document"){a.Dom.generateId(h);m=h.tagName+"#"+h.id+" "+m;p=h;h=h.ownerDocument}var i=a.Selector._tokenize(m);var j=i[a.Selector._getIdTokenIndex(i)],d=[],c,n=i.pop()||{};if(j){c=a.Selector._getId(j.attributes)}if(c){p=p||a.Selector.document.getElementById(c);if(p&&(h.nodeName==="#document"||a.Dom.isAncestor(h,p))){if(a.Selector._test(p,null,j)){if(j===n){d=[p]}else{if(j.combinator===" "||j.combinator===">"){h=p}}}}else{return e}}if(h&&!d.length){d=h.getElementsByTagName(n.tag)}if(d.length){e=a.Selector._filter(d,n,g,o)}return e},_clearFoundCache:function(){var b=a.Selector._foundCache;for(var d=0,e=b.length;d<e;++d){try{delete b[d]._found}catch(c){b[d].removeAttribute("_found")}}b=[]},_getRegExp:function(b,d){var c=a.Selector._regexCache;d=d||"";if(!c[b+d]){c[b+d]=new RegExp(b,d)}return c[b+d]},_getChildren:function(){if(document.documentElement.children){return function(b,c){return(c)?b.children.tags(c):b.children||[]}}else{return function(c,f){if(c._children){return c._children}var d=[],b=c.childNodes;for(var e=0,g=b.length;e<g;++e){if(b[e].tagName){if(!f||b[e].tagName===f){d[d.length]=b[e]}}}c._children=d;return d}}}(),_combinators:{" ":function(b,c){while((b=b.parentNode)){if(a.Selector._test(b,"",c.previous)){return true}}return false},">":function(b,c){return a.Selector._test(b.parentNode,null,c.previous)},"+":function(b,c){var d=b.previousSibling;while(d&&d.nodeType!==1){d=d.previousSibling}if(d&&a.Selector._test(d,null,c.previous)){return true}return false},"~":function(b,c){var d=b.previousSibling;while(d){if(d.nodeType===1&&a.Selector._test(d,null,c.previous)){return true}d=d.previousSibling}return false}},_getNth:function(c,g,e,l){a.Selector._re.nth.test(g);var h=parseInt(RegExp.$1,10),d=RegExp.$2,k=RegExp.$3,j=parseInt(RegExp.$4,10)||0,f=[],n;var i=a.Selector._getChildren(c.parentNode,e);if(k){h=2;n="+";d="n";j=(k==="odd")?1:0}else{if(isNaN(h)){h=(d)?1:0}}if(h===0){if(l){j=i.length-j+1}if(i[j-1]===c){return true}else{return false}}else{if(h<0){l=!!l;h=Math.abs(h)}}if(!l){for(var b=j-1,m=i.length;b<m;b+=h){if(b>=0&&i[b]===c){return true}}}else{for(var b=i.length-j,m=i.length;b>=0;b-=h){if(b<m&&i[b]===c){return true}}}return false},_getId:function(c){for(var b=0,d=c.length;b<d;++b){if(c[b][0]=="id"&&c[b][1]==="="){return c[b][2]}}},_getIdTokenIndex:function(b){for(var c=0,d=b.length;c<d;++c){if(a.Selector._getId(b[c].attributes)){return c}}return -1},_patterns:{tag:/^((?:-?[_a-z]+[\w-]*)|\*)/i,attributes:/^\[([a-z]+\w*)+([~\|\^\$\*!=]=?)?['"]?([^\]]*?)['"]?\]/i,pseudos:/^:([-\w]+)(?:\(['"]?(.+)['"]?\))*/i,combinator:/^\s*([>+~]|\s)\s*/},_tokenize:function(i){var g={},c=[],b,d=false,e=a.Selector._patterns,h;i=a.Selector._replaceShorthand(i);do{d=false;for(var f in e){if(YAHOO.lang.hasOwnProperty(e,f)){if(f!="tag"&&f!="combinator"){g[f]=g[f]||[]}if((h=e[f].exec(i))){d=true;if(f!="tag"&&f!="combinator"){if(f==="attributes"&&h[1]==="id"){g.id=h[3]}g[f].push(h.slice(1))}else{g[f]=h[1]}i=i.replace(h[0],"");if(f==="combinator"||!i.length){g.attributes=a.Selector._fixAttributes(g.attributes);g.pseudos=g.pseudos||[];g.tag=g.tag?g.tag.toUpperCase():"*";c.push(g);g={previous:g}}}}}}while(d);return c},_fixAttributes:function(d){var c=a.Selector.attrAliases;d=d||[];for(var b=0,e=d.length;b<e;++b){if(c[d[b][0]]){d[b][0]=c[d[b][0]]}if(!d[b][1]){d[b][1]=""}}return d},_replaceShorthand:function(f){var e=a.Selector.shorthand;var d=f.match(a.Selector._re.attr);if(d){f=f.replace(a.Selector._re.attr,"REPLACED_ATTRIBUTE")}for(var b in e){if(YAHOO.lang.hasOwnProperty(e,b)){f=f.replace(a.Selector._getRegExp(b,"gi"),e[b])}}if(d){for(var c=0,g=d.length;c<g;++c){f=f.replace("REPLACED_ATTRIBUTE",d[c])}}return f}};if(YAHOO.env.ua.ie&&YAHOO.env.ua.ie<8){a.Selector.attrAliases["class"]="className";a.Selector.attrAliases["for"]="htmlFor"}})();YAHOO.register("selector",YAHOO.util.Selector,{version:"2.7.0",build:"1799"});var $Y=YAHOO.util,$D=$Y.Dom,$E=$Y.Event,$$=$Y.Selector.query,$=$D.get,FD=YAHOO.namespace("FD");var FYU=YAHOO.util,FYD=$Y.Dom,FYE=$Y.Event,FYS=$Y.Selector.query,FYG=$D.get;FD.namespace=function(){var a=Array.prototype.slice.call(arguments,0),b;for(b=0;b<a.length;++b){if(a[b].indexOf("FD")!=0){a[b]="FD."+a[b]}}return YAHOO.namespace.apply(null,a)};FD.namespace("core","util","widget");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)}}if(!String.prototype.lenB){String.prototype.lenB=function(){return this.replace(/[^\x00-\xff]/g,"**").length}}if(!String.prototype.cut){String.prototype.cut=function(a){var e=this;if(e=="undefined"){return""}var b=0;a=parseInt(a);if(e.lenB()<a){return e}for(var c=0;c<e.length;c++){var d=e.charCodeAt(c);if(d<0||d>255){b+=2}else{b++}if(b>a){return e.substr(0,c==0?c=1:c)}}return""}}FD.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},goTo:function(e){var d=document.createElement("a"),c="_blank",f=document.body,g=arguments[1]==c?c:"_self";if(!d.click){return window.open(e,g)}d.setAttribute("target",g);d.setAttribute("href",e);d.style.display="none";if(!f){return}f.appendChild(d);d.click();if(g==c){setTimeout(function(){try{f.removeChild(d)}catch(a){}},500)}},concat:function(){var d=arguments;var a=[],b,f;outer:for(var e=0,b=d.length;e<b;e++){inner:for(var c=0,f=d[e].length;c<f;c++){a.push(d[e][c])}}return a},getFormAction:function(a){a=FYG(a);if(a&&a.tagName.toLowerCase()=="form"){return a.attributes.getNamedItem("action").value}return null},formSerialize:function(a,c,b){a=FYG(a);b=b||"&";var k="";if(a&&a.tagName.toLowerCase()=="form"){var h=a.getElementsByTagName("input");var d=a.getElementsByTagName("select");var l=a.getElementsByTagName("textarea");h=FD.common.concat(h,d,l);var g=h.length;while(g-->0){var f=h[g].name+"="+encodeURIComponent(h[g].value);if(k==""){k+=f}else{k+=b+f}}}if(YAHOO.lang.isObject(c)){for(var j in c){var f=j+"="+encodeURIComponent(c[j]);if(k==""){k+=f}else{k+=b+f}}}return k},parse:function(str){var jsn;try{jsn=YAHOO.lang.JSON.parse(str)}catch(x){try{eval("jsn = "+str)}catch(e){}}return jsn}};FD.version="0.6.2009-5-5";
/*
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.7.0
*/
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.scope||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.7.0",build:"1799"});
/*
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.7.0
*/
(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,F,E){var D=this.getEl();if(this.patterns.noNegatives.test(C)){F=(F>0)?F:0;}if("style" in D){B.Dom.setStyle(D,C,F+E);}else{if(C in D){D[C]=F;}}},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("style" in E){if(F||(B.Dom.getStyle(E,"position")=="absolute"&&H)){G=E["offset"+D[0].charAt(0).toUpperCase()+D[0].substr(1)];}else{G=0;}}else{if(C in E){G=E[C];}}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;})();
/*
TERMS OF USE - EASING EQUATIONS
Open source under the BSD License.
Copyright 2001 Robert Penner All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
* Neither the name of the author nor the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
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.7.0",build:"1799"});
/*
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.7.0
*/
YAHOO.util.Connect={_msxml_progid:["Microsoft.XMLHTTP","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP"],_http_headers:{},_has_http_headers:false,_use_default_post_header:true,_default_post_header:"application/x-www-form-urlencoded; charset=UTF-8",_default_form_header:"application/x-www-form-urlencoded",_use_default_xhr_header:true,_default_xhr_header:"XMLHttpRequest",_has_default_headers:true,_default_headers:{},_isFormSubmit:false,_isFileUpload:false,_formNode:null,_sFormData:null,_poll:{},_timeOut:{},_polling_interval:50,_transaction_id:0,_submitElementValue:null,_hasSubmitListener:(function(){if(YAHOO.util.Event){YAHOO.util.Event.addListener(document,"click",function(C){var B=YAHOO.util.Event.getTarget(C),A=B.nodeName.toLowerCase();if((A==="input"||A==="button")&&(B.type&&B.type.toLowerCase()=="submit")){YAHOO.util.Connect._submitElementValue=encodeURIComponent(B.name)+"="+encodeURIComponent(B.value);}});return true;}return false;})(),startEvent:new YAHOO.util.CustomEvent("start"),completeEvent:new YAHOO.util.CustomEvent("complete"),successEvent:new YAHOO.util.CustomEvent("success"),failureEvent:new YAHOO.util.CustomEvent("failure"),uploadEvent:new YAHOO.util.CustomEvent("upload"),abortEvent:new YAHOO.util.CustomEvent("abort"),_customEvents:{onStart:["startEvent","start"],onComplete:["completeEvent","complete"],onSuccess:["successEvent","success"],onFailure:["failureEvent","failure"],onUpload:["uploadEvent","upload"],onAbort:["abortEvent","abort"]},setProgId:function(A){this._msxml_progid.unshift(A);},setDefaultPostHeader:function(A){if(typeof A=="string"){this._default_post_header=A;}else{if(typeof A=="boolean"){this._use_default_post_header=A;}}},setDefaultXhrHeader:function(A){if(typeof A=="string"){this._default_xhr_header=A;}else{this._use_default_xhr_header=A;}},setPollingInterval:function(A){if(typeof A=="number"&&isFinite(A)){this._polling_interval=A;}},createXhrObject:function(F){var E,A;try{A=new XMLHttpRequest();E={conn:A,tId:F};}catch(D){for(var B=0;B<this._msxml_progid.length;++B){try{A=new ActiveXObject(this._msxml_progid[B]);E={conn:A,tId:F};break;}catch(C){}}}finally{return E;}},getConnectionObject:function(A){var C;var D=this._transaction_id;try{if(!A){C=this.createXhrObject(D);}else{C={};C.tId=D;C.isUpload=true;}if(C){this._transaction_id++;}}catch(B){}finally{return C;}},asyncRequest:function(F,C,E,A){var D=(this._isFileUpload)?this.getConnectionObject(true):this.getConnectionObject();var B=(E&&E.argument)?E.argument:null;if(!D){return null;}else{if(E&&E.customevents){this.initCustomEvents(D,E);}if(this._isFormSubmit){if(this._isFileUpload){this.uploadFile(D,E,C,A);return D;}if(F.toUpperCase()=="GET"){if(this._sFormData.length!==0){C+=((C.indexOf("?")==-1)?"?":"&")+this._sFormData;}}else{if(F.toUpperCase()=="POST"){A=A?this._sFormData+"&"+A:this._sFormData;}}}if(F.toUpperCase()=="GET"&&(E&&E.cache===false)){C+=((C.indexOf("?")==-1)?"?":"&")+"rnd="+new Date().valueOf().toString();}D.conn.open(F,C,true);if(this._use_default_xhr_header){if(!this._default_headers["X-Requested-With"]){this.initHeader("X-Requested-With",this._default_xhr_header,true);}}if((F.toUpperCase()==="POST"&&this._use_default_post_header)&&this._isFormSubmit===false){this.initHeader("Content-Type",this._default_post_header);}if(this._has_default_headers||this._has_http_headers){this.setHeader(D);}this.handleReadyState(D,E);D.conn.send(A||"");if(this._isFormSubmit===true){this.resetFormState();}this.startEvent.fire(D,B);if(D.startEvent){D.startEvent.fire(D,B);}return D;}},initCustomEvents:function(A,C){var B;for(B in C.customevents){if(this._customEvents[B][0]){A[this._customEvents[B][0]]=new YAHOO.util.CustomEvent(this._customEvents[B][1],(C.scope)?C.scope:null);A[this._customEvents[B][0]].subscribe(C.customevents[B]);}}},handleReadyState:function(C,D){var B=this;var A=(D&&D.argument)?D.argument:null;if(D&&D.timeout){this._timeOut[C.tId]=window.setTimeout(function(){B.abort(C,D,true);},D.timeout);}this._poll[C.tId]=window.setInterval(function(){if(C.conn&&C.conn.readyState===4){window.clearInterval(B._poll[C.tId]);delete B._poll[C.tId];if(D&&D.timeout){window.clearTimeout(B._timeOut[C.tId]);delete B._timeOut[C.tId];}B.completeEvent.fire(C,A);if(C.completeEvent){C.completeEvent.fire(C,A);}B.handleTransactionResponse(C,D);}},this._polling_interval);},handleTransactionResponse:function(F,G,A){var D,C;var B=(G&&G.argument)?G.argument:null;try{if(F.conn.status!==undefined&&F.conn.status!==0){D=F.conn.status;}else{D=13030;}}catch(E){D=13030;}if(D>=200&&D<300||D===1223){C=this.createResponseObject(F,B);if(G&&G.success){if(!G.scope){G.success(C);}else{G.success.apply(G.scope,[C]);}}this.successEvent.fire(C);if(F.successEvent){F.successEvent.fire(C);}}else{switch(D){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:C=this.createExceptionObject(F.tId,B,(A?A:false));if(G&&G.failure){if(!G.scope){G.failure(C);}else{G.failure.apply(G.scope,[C]);}}break;default:C=this.createResponseObject(F,B);if(G&&G.failure){if(!G.scope){G.failure(C);}else{G.failure.apply(G.scope,[C]);}}}this.failureEvent.fire(C);if(F.failureEvent){F.failureEvent.fire(C);}}this.releaseObject(F);C=null;},createResponseObject:function(A,G){var D={};var I={};try{var C=A.conn.getAllResponseHeaders();var F=C.split("\n");for(var E=0;E<F.length;E++){var B=F[E].indexOf(":");if(B!=-1){I[F[E].substring(0,B)]=F[E].substring(B+2);}}}catch(H){}D.tId=A.tId;D.status=(A.conn.status==1223)?204:A.conn.status;D.statusText=(A.conn.status==1223)?"No Content":A.conn.statusText;D.getResponseHeader=I;D.getAllResponseHeaders=C;D.responseText=A.conn.responseText;D.responseXML=A.conn.responseXML;if(G){D.argument=G;}return D;},createExceptionObject:function(H,D,A){var F=0;var G="communication failure";var C=-1;var B="transaction aborted";var E={};E.tId=H;if(A){E.status=C;E.statusText=B;}else{E.status=F;E.statusText=G;}if(D){E.argument=D;}return E;},initHeader:function(A,D,C){var B=(C)?this._default_headers:this._http_headers;B[A]=D;if(C){this._has_default_headers=true;
}else{this._has_http_headers=true;}},setHeader:function(A){var B;if(this._has_default_headers){for(B in this._default_headers){if(YAHOO.lang.hasOwnProperty(this._default_headers,B)){A.conn.setRequestHeader(B,this._default_headers[B]);}}}if(this._has_http_headers){for(B in this._http_headers){if(YAHOO.lang.hasOwnProperty(this._http_headers,B)){A.conn.setRequestHeader(B,this._http_headers[B]);}}delete this._http_headers;this._http_headers={};this._has_http_headers=false;}},resetDefaultHeaders:function(){delete this._default_headers;this._default_headers={};this._has_default_headers=false;},setForm:function(M,H,C){var L,B,K,I,P,J=false,F=[],O=0,E,G,D,N,A;this.resetFormState();if(typeof M=="string"){L=(document.getElementById(M)||document.forms[M]);}else{if(typeof M=="object"){L=M;}else{return;}}if(H){this.createFrame(C?C:null);this._isFormSubmit=true;this._isFileUpload=true;this._formNode=L;return;}for(E=0,G=L.elements.length;E<G;++E){B=L.elements[E];P=B.disabled;K=B.name;if(!P&&K){K=encodeURIComponent(K)+"=";I=encodeURIComponent(B.value);switch(B.type){case"select-one":if(B.selectedIndex>-1){A=B.options[B.selectedIndex];F[O++]=K+encodeURIComponent((A.attributes.value&&A.attributes.value.specified)?A.value:A.text);}break;case"select-multiple":if(B.selectedIndex>-1){for(D=B.selectedIndex,N=B.options.length;D<N;++D){A=B.options[D];if(A.selected){F[O++]=K+encodeURIComponent((A.attributes.value&&A.attributes.value.specified)?A.value:A.text);}}}break;case"radio":case"checkbox":if(B.checked){F[O++]=K+I;}break;case"file":case undefined:case"reset":case"button":break;case"submit":if(J===false){if(this._hasSubmitListener&&this._submitElementValue){F[O++]=this._submitElementValue;}J=true;}break;default:F[O++]=K+I;}}}this._isFormSubmit=true;this._sFormData=F.join("&");this.initHeader("Content-Type",this._default_form_header);return this._sFormData;},resetFormState:function(){this._isFormSubmit=false;this._isFileUpload=false;this._formNode=null;this._sFormData="";},createFrame:function(A){var B="yuiIO"+this._transaction_id;var C;if(YAHOO.env.ua.ie){C=document.createElement('<iframe id="'+B+'" name="'+B+'" />');if(typeof A=="boolean"){C.src="javascript:false";}}else{C=document.createElement("iframe");C.id=B;C.name=B;}C.style.position="absolute";C.style.top="-1000px";C.style.left="-1000px";document.body.appendChild(C);},appendPostData:function(A){var D=[],B=A.split("&"),C,E;for(C=0;C<B.length;C++){E=B[C].indexOf("=");if(E!=-1){D[C]=document.createElement("input");D[C].type="hidden";D[C].name=decodeURIComponent(B[C].substring(0,E));D[C].value=decodeURIComponent(B[C].substring(E+1));this._formNode.appendChild(D[C]);}}return D;},uploadFile:function(D,N,E,C){var I="yuiIO"+D.tId,J="multipart/form-data",L=document.getElementById(I),O=this,K=(N&&N.argument)?N.argument:null,M,H,B,G;var A={action:this._formNode.getAttribute("action"),method:this._formNode.getAttribute("method"),target:this._formNode.getAttribute("target")};this._formNode.setAttribute("action",E);this._formNode.setAttribute("method","POST");this._formNode.setAttribute("target",I);if(YAHOO.env.ua.ie){this._formNode.setAttribute("encoding",J);}else{this._formNode.setAttribute("enctype",J);}if(C){M=this.appendPostData(C);}this._formNode.submit();this.startEvent.fire(D,K);if(D.startEvent){D.startEvent.fire(D,K);}if(N&&N.timeout){this._timeOut[D.tId]=window.setTimeout(function(){O.abort(D,N,true);},N.timeout);}if(M&&M.length>0){for(H=0;H<M.length;H++){this._formNode.removeChild(M[H]);}}for(B in A){if(YAHOO.lang.hasOwnProperty(A,B)){if(A[B]){this._formNode.setAttribute(B,A[B]);}else{this._formNode.removeAttribute(B);}}}this.resetFormState();var F=function(){if(N&&N.timeout){window.clearTimeout(O._timeOut[D.tId]);delete O._timeOut[D.tId];}O.completeEvent.fire(D,K);if(D.completeEvent){D.completeEvent.fire(D,K);}G={tId:D.tId,argument:N.argument};try{G.responseText=L.contentWindow.document.body?L.contentWindow.document.body.innerHTML:L.contentWindow.document.documentElement.textContent;G.responseXML=L.contentWindow.document.XMLDocument?L.contentWindow.document.XMLDocument:L.contentWindow.document;}catch(P){}if(N&&N.upload){if(!N.scope){N.upload(G);}else{N.upload.apply(N.scope,[G]);}}O.uploadEvent.fire(G);if(D.uploadEvent){D.uploadEvent.fire(G);}YAHOO.util.Event.removeListener(L,"load",F);setTimeout(function(){document.body.removeChild(L);O.releaseObject(D);},100);};YAHOO.util.Event.addListener(L,"load",F);},abort:function(E,G,A){var D;var B=(G&&G.argument)?G.argument:null;if(E&&E.conn){if(this.isCallInProgress(E)){E.conn.abort();window.clearInterval(this._poll[E.tId]);delete this._poll[E.tId];if(A){window.clearTimeout(this._timeOut[E.tId]);delete this._timeOut[E.tId];}D=true;}}else{if(E&&E.isUpload===true){var C="yuiIO"+E.tId;var F=document.getElementById(C);if(F){YAHOO.util.Event.removeListener(F,"load");document.body.removeChild(F);if(A){window.clearTimeout(this._timeOut[E.tId]);delete this._timeOut[E.tId];}D=true;}}else{D=false;}}if(D===true){this.abortEvent.fire(E,B);if(E.abortEvent){E.abortEvent.fire(E,B);}this.handleTransactionResponse(E,G,true);}return D;},isCallInProgress:function(B){if(B&&B.conn){return B.conn.readyState!==4&&B.conn.readyState!==0;}else{if(B&&B.isUpload===true){var A="yuiIO"+B.tId;return document.getElementById(A)?true:false;}else{return false;}}},releaseObject:function(A){if(A&&A.conn){A.conn=null;A=null;}}};YAHOO.register("connection",YAHOO.util.Connect,{version:"2.7.0",build:"1799"});
/**
* FD.Ali
*
* 阿里巴巴相关操作集合
* 限制：必须包含core/fdev.js文件
*
* @author  yaosl<happyyaosl@gmail.com>
* @link    http://www.fdev-lib.cn/
*/
FD.Ali = {
/**
* 判断是否安装了阿里旺旺
*/
checkAliTalk: function(){
if (!YAHOO.env.ua.ie) return false;		//无法判断的情况下默认没有安装
try {
var ww5 = new ActiveXObject("Ali_Check.InfoCheck");
} catch (e) {return false;}
try {
var ww6 = new ActiveXObject("aliimx.wangwangx");
} catch (e) {return false;}
return true;
},
/**
* 判断是否安装了阿里工具条
*/
checkAliTool: function(){
if (!YAHOO.env.ua.ie) return false;		//无法判断的情况下默认没有安装
try {
var tool = new ActiveXObject("YAliALive.Live");
} catch (e) { return false;}
return true;
}
}
/**
* FD.widget.Scroll
*
* 滚动类
* 限制：
* 		1、container 必须是一个<ul>
* 		2、必须包含js/core/fdev.js和js/core/yui/animation-min.js两个js文件
* 调用方法：
* 		……
*		<ul id="scroll1">
*			<li><a href="#">内容1内容1内容1内容1内容1</a></li>
*			<li><a href="#">内容2内容2内容2内容2内容2</a></li>
*			<li><a href="#">内容3内容3内容3内容3内容3</a></li>
*		</ul>
*		……
*		<script type="text/javascript">
*			FD.widget.Scroll.init('scroll1',{});
*		</script>
*
* @author 	yaosl<happyyaosl@gmail.com>
* @link    http://www.fdev-lib.cn/
*/
FD.widget.Scroll = new function() {
var defConfig = {
delay: 2,
speed: 20,
startDelay: 2,
direction: 'vertical',	/* 'horizontal(h)' or 'vertical(v)'. defaults to vertical. */
disableAutoPlay: false,
distance: 'auto',
scrollItemCount: 1  	/* 随同一行滚动的li数量，默认1 */
}
/**
* decorate 开始滚动
* @param {Object} container 必须是一个ul
* @param {Object} config
*/
this.init = function(container, config) {
container = $(container);
config = FD.common.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;});
FD.common.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;
}
};
/*
* @fileoverview 该文件封装了Alitalk初始化功能，构建一个组群实例方法为：FD.widget.Alitalk(...)，组件需要用到online这个全局变量，谨防冲突。
* @author Denis<danxia.shidx@alibaba-inc.com>
* @link http://page.china.alibaba.com/shtml/alitalk/alitalk-demo.html
* @version 2.0.1
*/
var online=null;
(function(w) {
/*
* 实例化Alitalk的入口.
* @param {HTMLElement|Array} Dom单一元素或元素组
* @param {object} opts 配置参数
*/
var Alitalk=function(els,opts) {
this.init(els,opts);
},
//是否为IE浏览器
isIE=!!(YAHOO.env.ua.ie),
//保存贸易通版本号，目前为5或6
version,
//是否安装贸易通或阿里旺旺
isInstalled=(function() {
var vers={
'aliimx.wangwangx': 6,
'Ali_Check.InfoCheck': 5
};
for(var p in vers) {
try {
new ActiveXObject(p)
version=vers[p];
return true;
} catch(e) { }
}
version=0;
return false;
})(),
//弹出阿里旺旺下载页
getAlitalk=function() {
window.open('http://alitalk.alibaba.com.cn/index.html','_blank');
},
//自动登陆
autoLogin=function(id) {
if(version==5) {
location.href='alitalk:'
} else {
id=id?'?uid='+id:'';
window.location.href='aliim:login'+id;
}
},
//默认配置
defaults={
type: 2,
//数组对应的类型依次为自定义、按钮和图标
cls: [{},{ base: 'btnAlitalk',on: 'btn-on',off: 'btn-off',mb: 'btn-mb' },{ base: 'iconAlitalk',on: 'icon-on',off: 'icon-off',mb: 'icon-mb'}],
siteID: 'cnalichn',
//是否请求用户在线状态
remote: true,
//实例化过程中是否开启自动登陆
autoLogin: false,
prop: ''
},
//回调函数
success=function(ali) {
for(var i=0;i<ali.els.length;i++) {
if(ali.els[i].opt.remote) { //对没有指定remote为false的判断在线状态并加上相应样式
ali.els[i].online=online[i]; //把在线状态保存到元素属性以便于后期调用
$D.addClass(ali.els[i],ali.els[i].opt.cls[ali.els[i].opt.type].base); //上基样式
switch(online[i]) {
case 0:
case 2:
case 6:
default: //不在线
$D.addClass(ali.els[i],ali.els[i].opt.cls[ali.els[i].opt.type].off);
break;
case 1: //在线
$D.addClass(ali.els[i],ali.els[i].opt.cls[ali.els[i].opt.type].on);
break;
case 4:
case 5: //手机在线
$D.addClass(ali.els[i],ali.els[i].opt.cls[ali.els[i].opt.type].mb);
break;
}
}
}
//重置
online=null;
};
Alitalk.prototype={
/*
* 实例化Alitalk的入口. 这是组件实例唯一暴露在外的方法
* @param {HTMLElement|Array} Dom单一对象或对象组
* @param {object} opts 配置参数
*/
init: function(els,opts) {
//防止多次调用online冲突
if(online!=null) {
setTimeout(function() { new w.Alitalk(els,opts); },Math.random()*1000+1000);
return;
} else {
this.opts=FD.common.applyIf(opts||{},defaults);
if(this.opts.remote) online=[];
}
if(els.nodeType) els=[els];
if(!els.length) return;
this.els=els;
var ids='',that=this;
for(var i=0;i<els.length;i++) {
var o=FD.common.applyIf(eval('('+($D.getAttribute(els[i],'alitalk')||'{}')+')'),this.opts);
els[i].opt=o;
ids+=o.id+';';
}
//给按钮注册点击事件
$E.addListener(els,'click',function(e) {
$E.preventDefault(e);
//非ie浏览器不支持
if(!isIE) return;
//静态模式下 设置默认状态为在线
if(!that.opts.remote) this.online=1;
//还没有获取到状态
if(this.online==null) return;
//解析用户id
var userID=eval('('+($D.getAttribute(this,'alitalk')||'{}')+')').id;
switch(version) {
case 0:
default:
getAlitalk(); //下载阿里旺旺
break;
case 5:
window.location='Alitalk:Send'+(this.online==4?'Sms':'IM')+'?'+userID+'&siteid='+that.opts.siteID+'&status='+this.online+that.opts.prop;
break;
case 6:
if(this.online==4) window.location='aliim:smssendmsg?touid=cnalichn'+userID+that.opts.prop;
else window.location='aliim:sendmsg?touid=cnalichn'+userID+'&siteid='+that.opts.siteID+'&status='+this.online+that.opts.prop;
break;
}
});
//从阿里软件获取在线状态
if(this.opts.remote)
YAHOO.util.Get.script('http://amos.im.alisoft.com/muliuserstatus.aw?uids='+ids+'&site='+that.opts.siteID,{ charset: 'gb2312',onSuccess: function() { success(that); },onFailure: function() { online=null; },onTimeout: function() { online=null; } });
//自动登录
if(isIE&&this.opts.autoLogin)
autoLogin();
}
};
/*
* 静态变量及方法
*/
w.Alitalk=Alitalk;
/*
* Alitalk客户端版本
*/
w.Alitalk.version=version;
/*
* 客户端是否安装了Alitalk
*/
w.Alitalk.isInstalled=isInstalled;
/*
* 弹出alitalk下载页面
*/
w.Alitalk.getAlitalk=getAlitalk;
/*
* 自动启动alitalk客户端软件
*/
w.Alitalk.autoLogin=autoLogin;
})(FD.widget);
/**
* @author search-engineer
* @version 2009-01-19
* 以下这些函数是由工程师写的函数，需遵循一定的命名规则
* 命名规则如下:
* <pre>
* S(表示search)_产品线+展示方式（共有的用P,public的缩写）_功能描述
* I、产品:命名规则如下:
* 		供应offer(列表)   S_S(sale)L(列表)_ 功能描述(eg:S_SL_getOfferName)
* 		供应offer(图文)   F_ST_功能描述(eg:S_ST_getOfferType)
* 		供应offer(橱窗)   F_SW_功能描述(eg:S_SW_getWindowID)
* 		注:如果是这个函数或者变量同时被上面三种情况公用，则命名如下:
* 		S_P_功能描述
*
* II、买家:对应的命名规则如下:
* 		买家列表: S_B(buy)L(列表)_ 功能描述(eg:S_BL_getBuyerName)
* 		买家图文: S_B(buy)T(图文)_ 功能描述(eg:S_BT_getBuyerID)
*
* III、公司:对应的命名规则如下
* 		公司列表:S_COMP_功能描述(eg:S_COMP_getCompanyName)
*
*
* Js函数根下的变量规则：（避免混淆）
* S(表示search)_产品线+展示方式（共有的用P,public的缩写）_ 变量描述
* </pre>
*
*/
/**
* 展示伪类目
* @method showul
* @param {String} ulId
* @param {String} liclsname
* @param{Boolean} showmorename
* @static
*
*/
function showul(ulId,liclsname,showmorename){
var showmore = document.getElementById(showmorename);
var disp = "none";
if(showmore){
if(showmore.className == "showmore"){
showmore.innerHTML = "<a href=javascript:showul('"+ulId+"','more','"+showmorename+"')>&lt;&lt;精简显示</a>";
showmore.className = "showless";
disp = "block";
}else{
showmore.innerHTML = "<a href=javascript:showul('"+ulId+"','more','"+showmorename+"')>显示更多&gt;&gt;</a>";
showmore.className = "showmore";
disp = "none";
}
}
var e = document.getElementById(ulId);
if(e){
for (var j = 0; j < e.childNodes.length; j++) {
var child = e.childNodes.item(j);
if (child && (child.nodeName.toLowerCase() == 'li') && child.className && child.className == liclsname)child.style.display=disp;
}
}
}
/**
* 侵权投诉
* @method doLaegal
* @param {String} userId
* @param {String} url
* @static
*/
function doLegal(userId,url){
var count = 0;
var ids = "";
var obj = document.batchForm.elements;
for(var i = 0;i < obj.length;i++){
if(obj[i].id.indexOf('compareBox') != -1){
if(obj[i].checked){
count++;
if(ids == ""){
ids = obj[i].name;
}else{
ids = ids + ","+obj[i].name;
}
}
}
}
if(count < 1){
alert("请至少选择1条信息进行投诉!");
return false;
}else if(count > 100){
alert("您已经选择了"+count+"条供应信息,候选供应信息不能超过50条");
return false;
}
url = url + "?offer_ids="+ids+"&user_id="+userId;
var inside_cooperate = window.open(url,"_inside_cooperate_legal");
inside_cooperate.focus();
}
/**
* @method actCheckbox
* @param {String} sign
* @param {String} keywords
* @static
*/
function actCheckbox(sign,keywords){
var count = 0;
var ids = "";
var obj = document.batchForm.elements;
for(var i = 0;i < obj.length;i++){
if(obj[i].id.indexOf('compareBox') != -1){
if(obj[i].checked){
count++;
if(ids == ""){
ids = obj[i].name;
}else{
ids = ids + ","+obj[i].name;
}
}
}
}
if(count < 1){
alert("请至少选择1条信息进行询价!");
return false;
}else if(count > 5){
alert("您已经选择了"+count+"条供应信息,候选供应信息不能超过5条");
return false;
}
var url = "";
if(sign == "inc"){
url = "http://redirect.china.alibaba.com/gateway/10023"+"?offer_ids="+ids+"&keywords="+keywords+"&tracelog=saleofferlist_feedbacks";
}else if(sign == "noimg"){
url = "http://redirect.china.alibaba.com/gateway/10023"+"?offer_ids="+ids+"&keywords="+keywords+"&tracelog=saleofferlist_feedbacks_nopic";
}
FD.common.goTo(url,'_blank');
//window.open(url);
}
/**
* 鹦鹉项目-询价留言及贸易通点击的反馈打点跟踪
* @method doParrotTrace
* @param {HTMLElement} logElem
* @param {String} logString
*/
function doParrotTrace(logElem, logString) {
var logURL = "http://stat.china.alibaba.com/feedback/click.html";
var d = new Date();
var cosite = "";
try{ cosite = document.cookie.match(/track_cookie[^;]*cosite=(\w+)/)[1]; }catch(e){}
logURL =logURL + logString + "&fromsite=" + cosite;
if(document.images) {
(new Image()).src=logURL + "&time=" + d.getTime();
}
}
/**
* @method doBatchParrotTrace
* @param {HTMLElement} logElem
* @param {String} logString
* @static
*/
function doBatchParrotTrace(logElem, logString) {
var logURL = "http://stat.china.alibaba.com/feedback/click.html";
var d = new Date();
var obj = document.batchForm.elements;
var cosite = "";
try{
try{ cosite = document.cookie.match(/track_cookie[^;]*cosite=(\w+)/)[1]; }catch(e){}
tmpLogURL =logURL + logString + "&fromsite=" + cosite;
for(var i = 0;i < obj.length;i++){
if(obj[i].id.indexOf('compareBox') != -1){
if(obj[i].checked){
logURL = tmpLogURL + "&toid=" + obj[i].getAttribute("memberId");
if(document.images) {
(new Image()).src=logURL + "&time=" + d.getTime();
}
}
}
}
} catch(e) {}
}
/**
* 获取cookie
* @param {String} name
* @static
*/
function getCookie(name) {
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i=0;
while(i<clen) {
var j=i+alen;
if (document.cookie.substring(i, j) == arg) {
return www_helpor_net(j);
}
i=document.cookie.indexOf(" ",i)+1;if(i==0)
break;
}
return null;
}
/**
* @method www_helpor_net
* @param {Object} offset
* @static
*/
function www_helpor_net(offset) {
var endstr=document.cookie.indexOf(";",offset);
if (endstr == -1) {
endstr = document.cookie.length;
}
return unescape(document.cookie.substring(offset,endstr));
}
var cookieName = "offerId";
var domainName = ".alibaba.com";
var prefix = "";
var defaultClassName = "offer";
var checkedClassName = "offer_select";
var categoryId = 0;
var inside_cooperate_id = false;
var tempCount = 0;
var url;
//初始化cookie中的offerId
function initOfferId(){
var c = getCookie("categoryId");
if (c == null || c == "null" ){
addCookie("categoryId",categoryId);
if (categoryId !=null && categoryId!=""){
clearCookie(cookieName);
}
}else if(c != categoryId){
clearCookie("categoryId");
clearCookie(cookieName);
}
}
function addCookie(name,value) {
value = value+prefix;
if(categoryId =="")return;
document.cookie = name + "=" + value +";path=/;"+ "domain="+domainName;;
}
function clearCookie(name) {
var value = "null";
cookieValue= name + "=" + value + ";path=/;" + "domain="+domainName;
document.cookie = cookieValue;
}
function addOfferId(arg, box) {
arg  = arg + prefix;
if(hasOfferId(arg)) {
alert("要选择的商机已存在");
box.checked=false;
return;
}
if(arg == "") {
return;
}
value = getCookie(cookieName);
if(value == null || value == "null" ) {
value = arg ;
} else {
value=value+"x"+ arg;
}
cookieValue = cookieName + "=" + value + ";path=/;" + "domain="+domainName;
document.cookie = cookieValue;
var countId = box.id.substring("compareBox".length,box.id.length);
var trTag = document.getElementById("compareColor"+countId);
trTag.className=checkedClassName;
}
function delOfferId(arg) {
arg = arg + prefix;
if(!hasOfferId(arg)) {
alert("要删除的商机不存在");
return;
}
value = getCookie(cookieName);
var offerIds = stringToArray(value);
var len = offerIds.length;
var result = "";
var counter = 0;
for(var i=0;i<len;i++) {
if(offerIds[i] != arg) {
if(counter == 0) {
result = offerIds[i];
} else {
result = result + "x" + offerIds[i];
}
counter++;
}
}
cookieValue = cookieName + "=" + result + ";path=/;" + "domain="+domainName;
document.cookie = cookieValue;
}
function hasOfferId(arg) {
var value = getCookie(cookieName);
if(value == null || value == "null" || value.indexOf(arg) == -1 ) {
return false;
} else {
return true;
}
}
function getOfferIdCount() {
value = getCookie(cookieName);
if(value == null || value == 'null') {
return 0;
}
var count = 1;
while(value.indexOf("x") != -1) {
var position = value.indexOf("x");
var len = value.length;
value =  value.substring(position+1,len);
count++;
}
return count;
}
function stringToArray(str) {
var temp = str;
var strArray = new Array();
var count = 0;
while(temp.indexOf("x") != -1) {
var position = temp.indexOf("x");
strArray[count] = temp.substring(0,position);
count++;
var len = temp.length;
temp =  temp.substring(position+1,len);
}
strArray[count] = temp;
return strArray;
}
function clickcompareBox(id,box) {
if(box.checked){
if(getOfferIdCount()>=10 && !inside_cooperate_id){
alert('您已经选择了10条供应信息，候选供应信息不能超过10个');
box.checked=false;
}else{
addOfferId(id, box);
}
} else {
delOfferId(id);
var countId = box.id.substring("compareBox".length,box.id.length);
var trTag = document.getElementById("compareColor"+countId);
trTag.className=defaultClassName;
}
}
function doCompare(){
if(getOfferIdCount()<=1){
alert('请至少选择2条信息进行对比!');
}else if(getOfferIdCount()>10){
alert('您已经选择了10条供应信息，候选供应信息不能超过10个');
}else{
FD.common.goTo(url+'/offer/offer_compare.htm','_blank');
//window.open(url+'/offer/offer_compare.htm');
}
}
function cleanCookie() {
if(confirm("您确认执行清空操作吗？")){
var value = "null";
cookieValue= cookieName + "=" + value + ";path=/;" + "domain="+domainName;
document.cookie = cookieValue;
for(var i=1;i<=tempCount;i++){
var elem = document.getElementById("compareBox"+i);
if(elem != null && elem.checked){
elem.checked = false;
elem = document.getElementById("compareColor"+i);
elem.className=defaultClassName;
}
}
}
}
function iniOfferId(arg, value) {
if(value == null || value == "null" || value.indexOf(arg) == -1 ) {
return false;
} else {
return true;
}
}
//初始化
function initCheckbox(offerCount,catId,insideCooperateId,currentServer){
tempCount = offerCount + 1;
categoryId = catId;
inside_cooperate_id = insideCooperateId;
url = currentServer;
initOfferId();
var tempValue = getCookie(cookieName);
for(var i = 1;i < tempCount ;i++){
var cpbox = document.getElementById("compareBox"+i);
var cpcolor = document.getElementById("compareColor"+i);
if(cpbox!= null){
if(iniOfferId(cpbox.name, tempValue)){
cpbox.checked = true;
if(cpcolor != null){
cpcolor.className=checkedClassName;
}
tempValue = tempValue.replace(cpbox.name,"");
}else{
cpbox.checked = false;
}
}
}
}
//用于列表页面
function changeNoimgScreen(value){
var lowStyle;
if(value >= 0){
lowStyle = false;
}else{
lowStyle = true;
}
if(lowStyle){
document.write("<link rel=\"stylesheet\" rev=\"stylesheet\" href=\"http://style.china.alibaba.com/css/alisearch/1.0.0/list/offer/offer-noimg-low.css\" type=\"text/css\" media=\"screen\" />");
}
}
//用于图文页面
function changeImgScreen(showProperties){
var screenWidth = screen.width;
if(!showProperties){
document.write("<link rel='stylesheet' rev='stylesheet' href='http://style.china.alibaba.com/css/alisearch/1.0.0/list/offer/offer-img-low.css' type='text/css' media='screen'/>");
}
}
function boxSearchCheck(obj,searchTrace){
var k = obj.keywords;
if(k) {
var v = k.value;
if(v.length > 100){
alert("您输入的关键字过长！");
k.select();
return false;
}
if(v == "" || v.substring(0,3) =="请输入") {
alert("请输入关键字！");
k.focus();
return false;
}
}
var tracelog = "?searchtrace="+searchTrace;
aliclick(this,tracelog);
}
function topSearchCheck(obj,searchTopTrace){
return boxSearchCheck(obj,searchTopTrace);
}
function bottomSearchCheck(obj,searchBottomTrace){
return boxSearchCheck(obj,searchBottomTrace);
}
function zeroSearchCheck(obj,searchZeroTrace){
return boxSearchCheck(obj,searchZeroTrace);
}
function shieldOncontextmenu() {
var  target = getEvent().target || getEvent().srcElement; // 获得事件源
if(target.src){
return false;
}
}
function getEvent(e) {
var ev = e || window.event;
if (!ev) {
var c = this.getEvent.caller;
while (c) {
ev = c.arguments[0];
if (ev && Event == ev.constructor) {
break;
}
c = c.caller;
}
}
return ev;
}
//禁止右键点击图片链接
function unpremitImgUrl(){
document.oncontextmenu=shieldOncontextmenu
}
//右侧阿里旺旺群的显示,被阿里软件的ajax返回数据调用，零结果页面不调用
function display_alitalk(alitalkObj){
if(alitalkObj.length==0||alitalkObj=='error') {
return;
}
var htmlobj="";
for(i=0;i<alitalkObj.length;i++){
var url="http://www2.im.alisoft.com/webim/tribe/tribe_detail.htm?tribeId="+alitalkObj[i].id+"&userId=cnalichn"+"&isSingle=y";
htmlobj+="<li>" + '<span class="pd_h">' +"<a href=\"#\" onclick=\"javascript:popwin('" + url + "');return false;\" target=\"_blank\"  onmousedown=\"aliclick(this,'?searchtrace=list_nav_alitalk')\" >" + alitalkObj[i].name + "</a></span></li>";
}
document.getElementById("alitalk_group").innerHTML = htmlobj;
document.getElementById("alitalk_list").style.display = "block";
}
function popwin(theurl)
{
window.open(theurl, '', 'height=400, width=500, top=60, left=150, toolbar=no, menubar=no, scrollbars=yes, resizable=no,location=no, status=no');
}
(function(){
var rkCookieName = "h_keys";
//记录最近搜索词,零结果页面不记录
window.recordKeywords=function(keywords){
if(keywords != null && keywords != ""){
var needWrite =true;
var r_keywords = keywords.replace(/&#39;/g,"\'").replace(/#/g,"");
var h_keys_v =r_keywords;
var keys = getCookie(rkCookieName);
if(keys!=null){
var keys_array = keys.split("#");
for(var i=0;i < keys_array.length && i < 9 && needWrite;i++){
if(r_keywords == keys_array[i]){
if(i == 0)needWrite = false;
}else{
h_keys_v += "#"+keys_array[i];
}
}
}
if(needWrite){
addTimeCookie(rkCookieName,h_keys_v);
}
}
}
})();
function addTimeCookie(name,value) {
var expDate = new Date();
expDate.setYear(expDate.getFullYear()+1);
document.cookie = name + "=" + escape(value) +";expires="+ expDate.toGMTString()+";path=/;"+ "domain="+domainName;
}
(function(){
var _trustscoreUrl;
var _activeScoreUrl;
var _defaultSortUrl;
var _pageUrl;
var _showfeatureUrl;
var _noimgStyleUrl;
var _imgStyleUrl;
var _shopwindowStyleUrl;
var _priceSortUrl;
//初始化url
window.initSortTypeUrl = function(trustscoreUrl,activeScoreUrl,defaultSortUrl,pageUrl,showfeatureUrl,noimgStyleUrl,imgStyleUrl,shopwindowStyleUrl,priceSortUrl){
_trustscoreUrl = trustscoreUrl;
_activeScoreUrl = activeScoreUrl;
_defaultSortUrl = defaultSortUrl;
_pageUrl = pageUrl;
_showfeatureUrl = showfeatureUrl;
_noimgStyleUrl = noimgStyleUrl;
_imgStyleUrl = imgStyleUrl;
_shopwindowStyleUrl = shopwindowStyleUrl;
_priceSortUrl = priceSortUrl||"";
}
//诚信通排序
window.change_to_trustscore=function(){
if(_trustscoreUrl != ""){
FD.common.goTo(_trustscoreUrl);
//window.location.href=_trustscoreUrl ;
}
}
//阿里旺旺排序
window.sort_by_activescore=function(){
if(_activeScoreUrl != ""){
FD.common.goTo(_activeScoreUrl);
//window.location.href=_activeScoreUrl;
}
}
//默认排序
window.sort_by_default=function(){
if(_defaultSortUrl != ""){
FD.common.goTo(_defaultSortUrl);
//window.location.href=_defaultSortUrl;
}
}
window.sort_by_price=function(){
if(_priceSortUrl&&_priceSortUrl!=""){
FD.common.goTo(_priceSortUrl);
}
}
/**
* 属性下拉框
* @method change_show_fid
* @param {Int} v
* @static
*/
window.change_show_fid=function(v){
if(_pageUrl.indexOf("?") > 0){
FD.common.goTo(_showfeatureUrl+"&showFid=" + v);
//window.location.href = _showfeatureUrl+"&showFid=" + v;
}else{
FD.common.goTo(_showfeatureUrl+"?showFid=" + v);
//window.location.href = _showfeatureUrl+"?showFid=" + v;
}
}
/**
* 展示方式切换
* @method showstyle
* @param {String} v
* @static
*/
window.showstyle=function(v){
if(v =="noimg"){
FD.common.goTo(_noimgStyleUrl);
//window.location.href = _noimgStyleUrl;
}else if(v == "img"){
FD.common.goTo(_imgStyleUrl);
//window.location.href = _imgStyleUrl;
}else if(v == "shopwindow"){
FD.common.goTo(_shopwindowStyleUrl);
//window.location.href = _shopwindowStyleUrl;
}
}
})();
/**
* 地区下拉框回显
* @method changeprovince
* @param {String} province
* @param {String} beforeProvince
* @param {String} beforeCity
* @static
*/
function changeprovince(province,beforeProvince,beforeCity){
if(province != null){
for (var i=0;i<province.options.length;i++) {
var provinceValue = province.options[i].value;
var cityValue = province.options[i].getAttribute("city");
if(provinceValue == beforeProvince && (!cityValue || cityValue == beforeCity)){
province.options[i].selected=true;
break;
}
}
}
}
/**
* 地区下拉框筛选
* @method filtByCentralArea
* @param {Object} optionObj
* @static
*/
function filtByCentralArea(optionObj) {
var optionElem = optionObj.options[optionObj.selectedIndex];
var province = optionElem.value;
var city = optionElem.getAttribute("city");
changeRegion(province, city);
try{document.getElementById("sx_ctrl_btn").click();}catch(e){}
}
/**
* "联系方式"打点
* @param {String} linkObj
* @param {Boolean} isFreeMember
* @param {String} phponeTracelog
* @param {String} keywords
* @static
* @static
*/
function clickAddParam(linkObj, isFreeMember, phoneTracelog,keywords){
aliclick(linkObj,"?searchtrace=" + phoneTracelog);
addParam(linkObj,'contactFrom','sellofferlist_contact');
if(isFreeMember) {
if(keywords != ""){
addParam(linkObj,'keywords',keywords);
}
addParam(linkObj,'openContact','y#lxfs');
}
}
/**
* 阿里工具条的打点
* @param {String} ftrace
* @param {Strinh} query
* @return {Boolean} true
* @static
*/
function aliBussToolTrace(ftrace,query) {
var url = document.location;
var vNum=Math.random();
var t = Math.round(vNum*100000000);
var ourl="http://count.soft.cn.yahoo.com/count/icon?";
var log_str=ourl+"f="+ftrace+"&u="+encodeURIComponent(url)+"&q="+query+"&t="+t;
if(document.images){
(new Image()).src = log_str;
}
return true;
}
function focusit(inputobj){
if(inputobj.value.indexOf('请输入')!=-1)inputobj.value='';
inputobj.style.color="#666666";
}
function blurit(inputobj){
if(trim(inputobj.value)=="")inputobj.value=inputobj.title;
inputobj.style.color="#666666";
}
function trim(inputString) {
return inputString.replace(/^ +/,"").replace(/ +$/,"");
}
function showLessOrMore(obj){
if(obj.className == "ml5px less"){
if(document.getElementById('sx_self_param')){
document.getElementById('sx_more_param').style.display = "none";
document.getElementById('sx_top').style.height  = "36px";
document.getElementById('sx_ctrl_btn').className = "sx_but_small";
}else{
document.getElementById('sx_top').style.display  = "none";
}
obj.className = "ml5px more";
obj.innerHTML = "<span class='ml15px'>更多</span>";
document.frmAreaSearch.sm.value="";
}else{
if(document.getElementById('sx_self_param')){
document.getElementById('sx_more_param').style.display = "block";
document.getElementById('sx_top').style.height  = "62px";
document.getElementById('sx_ctrl_btn').className = "sx_but_big";
}else{
document.getElementById('sx_top').style.display  = "block";
}
obj.className = "ml5px less";
obj.innerHTML = "<span class='ml15px'>精简</span>";
document.frmAreaSearch.sm.value="true";
}
}
function displayMore() {
var obj = document.getElementById("sx_ctrl_a");
obj.className = "ml5px more";
showLessOrMore(obj);
}
function doQuickFilt() {
document.getElementById('sx_ctrl_btn').click();
}
function setOnlineStatus() {
var onlineStatus = document.getElementById("_onlineStatus").value;
if(onlineStatus == "all" || onlineStatus == "") {
onlineStatus = "yes";
}else if (onlineStatus == "yes") {
onlineStatus = "all";
}
document.getElementById("_onlineStatus").value = onlineStatus;
}
function setMemberlevelAndPmType(select) {
var option = select.options[select.selectedIndex];
var memberlevel = document.getElementById("_memberlevel").value;
var pmType = document.getElementById("_pmType").value;
if (option.value == "allTrust") {
memberlevel = "pm";
pmType = "";
} else if (option.value == "enterpriseTrust") {
memberlevel = "pm";
pmType = "enterprise";
} else if (option.value == "personalTrust") {
memberlevel = "pm";
pmType = "person";
} else if (option.value == "abroadTrust") {
memberlevel = "pm";
pmType = "etc";
var _province = document.getElementById("_province");
_province.value='';
document.getElementById("city_slt").value = "";
if(document.getElementById("_onlineStatus")){
document.getElementById("_onlineStatus").value = '';
}
if(document.getElementById("_onlyOnePrice")){
document.getElementById("_onlyOnePrice").value = '';
}
} else {
memberlevel = "";
pmType = "";
}
document.getElementById("_memberlevel").value = memberlevel;
document.getElementById("_pmType").value = pmType;
}
function setOnlyOnePrice(){
try{
var onlyOnePrice = document.getElementById("_onlyOnePrice").value;
if(onlyOnePrice == "true"){
document.getElementById("_onlyOnePrice").value = "";
} else {
document.getElementById("_onlyOnePrice").value = "true";
}
}catch(e){}
}
var qFilt = "_";
var oFilt = "_";
var count;
var trace_f ="";
var provincesel;
var citysel;
var _province;
var abroadTraceLog;
var escapeKeywords ;
var traceHead;
function initFIltParam(escapeKeywords,abroadTraceLog,traceHead){
this.provincesel = document.getElementById("province_slt");
this.citysel     = document.getElementById("city_slt");
this._province   = document.getElementById("_province");
this.abroadTraceLog = abroadTraceLog;
this.escapeKeywords = escapeKeywords;
this.traceHead = traceHead;
}
function changeProvince(list) {
if (list.selectedIndex<=0) {
provincesel.options[0].selected=true;
var len = citysel.options.length;
for (var i=len-1;i>0;i--){
citysel.options[i]=null;
}
}else {
var boards = catArr1[list.selectedIndex-1].getOptions();
var len = citysel.options.length;
for (var i=len-1;i>0;i--){
citysel.options[i]=null;
}
for (var i=0;i<boards.length;i++) {
citysel.options[i+1]=boards[i];
}
var tmpPro = list.options[list.selectedIndex].value;
//当省份只有一个城市的,不要显示city
var tmpCityList = "|北京|上海|天津|重庆|HK|MO|TW|海外|";
if(tmpCityList.indexOf("|" + tmpPro + "|") != -1) {
citysel.value = '';
citysel.disabled = true;
}else {
citysel.disabled = false;
}
}
var memberTypeSel = document.getElementById("memberType");
if(provincesel.value =='海外'){
for (var i=0;i<memberTypeSel.options.length;i++) {
if(memberTypeSel.options[i].value=='abroadTrust'){
memberTypeSel.options[i].selected=true;
setMemberlevelAndPmType(memberTypeSel);
}
}
_province.value = '';
aliclick(this,"?searchtrace="+abroadTraceLog);
}else{
if(memberTypeSel && memberTypeSel.value=='abroadTrust'){
memberTypeSel.options[0].selected=true;
setMemberlevelAndPmType(memberTypeSel);
}
_province.value = provincesel.value
}
}
function changeRegion(province,city) {
for (var i=0;i<catArr1.length;i++) {
provincesel.options[i+1]=new Option(catArr1[i].title,catArr1[i].id);
//设置省选择框的选择值
if(provincesel.options[i+1].value == province){
provincesel.options[i+1].selected=true;
}
}
changeProvince(provincesel);
var len = citysel.options.length;
for (var i=0;i<len;i++) {
//设置城市选择框的选择值
if(citysel.options[i].value == city) {
citysel.options[i].selected=true;
}
}
}
function onSearch(form,keywords){
var patrn=/^[1-9]\d*$/;
if(form.priceStart !=null) {
form.priceStart.value=form.priceStart.value.replace(/(^\s*)|(\s*$)/g,"");
if(form.priceStart.value!=""){
if(isNaN(form.priceStart.value)){
form.priceStart.focus();
alert("请输入正确的数字进行价格筛选！");
return false;
}else if(parseFloat(form.priceStart.value)>1000000000||parseFloat(form.priceStart.value)<0){
form.priceStart.focus();
alert("请输入正确的数字进行价格筛选！");
return false;
}
}
}
if(form.priceEnd !=null) {
form.priceEnd.value=form.priceEnd.value.replace(/(^\s*)|(\s*$)/g,"");
if(form.priceEnd.value!=""){
if(isNaN(form.priceEnd.value)){
form.priceEnd.focus();
alert("请输入正确的数字进行价格筛选！");
return false;
}else if(parseFloat(form.priceEnd.value)>1000000000||parseFloat(form.priceEnd.value)<0){
form.priceEnd.focus();
alert("请输入正确的数字进行价格筛选！");
return false;
}
}
}
if(form.quantityBegin!=null){
form.quantityBegin.value=form.quantityBegin.value.replace(/(^\s*)|(\s*$)/g,"");
if(form.quantityBegin.value!=""){
if((!patrn.exec(form.quantityBegin.value))||(parseInt(form.quantityBegin.value)>2147483647)){
form.quantityBegin.focus();
alert("请输入正确的数字进行起定量筛选！");
return false;
}
}
}
if(form.province != null && form.city != null){
if(form.province != null && form.province.value !=""){
qFilt=qFilt+ 'p';
}
if(form.city != null && form.city.value !=""){
qFilt= qFilt +'c';
}
}else{
qFilt= qFilt + "_";
}
if(form.postTime != null && form.postTime.value !=""){
qFilt= qFilt + "_" + form.postTime.value;
form.isNoRepost.value=true;
}else{
qFilt= qFilt + "_";
form.isNoRepost.value=false;
}
if(form.biztype != null && form.biztype.value !=""){
qFilt= qFilt + "_" + form.biztype.value;
}else{
qFilt= qFilt + "_";
}
if(form.established_year != null && form.established_year.value !=""){
qFilt= qFilt + "_" + form.established_year.value;
}else{
qFilt= qFilt + "_";
}
if(document.getElementById("memberType") != null && document.getElementById("memberType").value != "all"){
qFilt= qFilt + "_" + document.getElementById("memberType").value;
}else{
qFilt= qFilt + "_";
}
if(form.onlineStatus != null && form.onlineStatus.value == 'yes' ){
qFilt=qFilt+"_"+'2';
}else{
qFilt= qFilt + "_";
}
if(form.onlyOnePrice != null && form.onlyOnePrice.value == 'true' ){
qFilt=qFilt+"_"+'biz';
}else{
qFilt= qFilt + "_";
}
if(form.priceStart != null || form.priceEnd != null || form.quantityBegin || form.keywords != null){
if( (form.priceStart != null && form.priceStart.value !="") || (form.priceEnd != null && form.priceEnd.value !="")){
oFilt=oFilt+'s';
}
if(form.quantityBegin != null && form.quantityBegin.value !="" ){
oFilt=oFilt+'q';
}
if(form.keywords != null && form.keywords.value != keywords){
oFilt=oFilt+'k';
}
}else{
oFilt=oFilt+'_';
}
var str_tlog = "?searchtrace="+traceHead;
if(qFilt != ""){
str_tlog = str_tlog + qFilt ;
}
if(oFilt != ""){
str_tlog = str_tlog + oFilt + trace_f ;
}
str_tlog = str_tlog + "_" + escapeKeywords;
aliclick(this,str_tlog);
}
function onChangeFeature(list){
onChange(list);
trace_f='f';
}
function onChange(list){
var sel = list.options[list.selectedIndex]
var value =sel.value;
}
function filtByArea(id) {
if(id > 0) {
document.getElementById("townId").value = id;
document.getElementById("province_slt").value = "";
document.getElementById("city_slt").value = "";
try{
document.getElementById("sx_ctrl_btn").click();
}catch(e){}
}
}
function cleanArea() {
document.getElementById("townId").value = "";
document.getElementById("province_slt").value = "";
document.getElementById("city_slt").value = "";
try{
document.getElementById("sx_ctrl_btn").click();
}catch(e){}
}
function pop() {
if ( checkAlitalkpopup() )
{
window.open('http://china.alibaba.com/alitalk/3jump.html', 'myt','left=0,top=10,width=265, height=140,location=no,toolbar=no,status=no,resizable=no,scrollbars=no');
setCookieAlitalkpopup() ;
}
}
function p4pSearchClick(eurl){
var d = new Date();
if (document.images) {
(new Image()).src = eurl + "&j=1&time=" + d.getTime();
}
}
function showMoreS70Div(){
var divArray = YAHOO.util.Dom.getElementsByClassName('view-s70');
if(divArray[3].style.display == "")
{
for(var i = 3; i < divArray.length; i++)
{
divArray[i].style.display="none";
}
YAHOO.util.Dom.get('s70shownoreButton').innerHTML = '显示更多选择';
YAHOO.util.Dom.get('s70shownoreButton').style.backgroundImage = 'url(http://img.china.alibaba.com/images/cn/cms/1.gif)';
}
else
{
for(var i = 3; i < divArray.length; i++)
{
divArray[i].style.display="";
}
YAHOO.util.Dom.get('s70shownoreButton').innerHTML = '隐藏更多选择';
YAHOO.util.Dom.get('s70shownoreButton').style.backgroundImage = 'url(http://img.china.alibaba.com/images/cn/cms/2.gif)';
}
}
function initShortcutShowMore(){
if(YAHOO.util.Dom.getElementsByClassName('view-s70')){
var shorcutDivArr = YAHOO.util.Dom.getElementsByClassName('view-s70');
if(shorcutDivArr.length > 3){
for(var i = 3; i < shorcutDivArr.length; i++)
{
shorcutDivArr[i].style.display="none";
}
YAHOO.util.Dom.get('s70shownore').innerHTML='<div style="width:80%;float:left;"><span id="s70shownoreButton" onclick="showMoreS70Div()" style="background:url(http://img.china.alibaba.com/images/cn/cms/1.gif) no-repeat;width:120px;padding-left:18px;line-height:24px;cursor:pointer;">显示更多选择</span></div>';
}
}
}
initShortcutShowMore();
function setCookieAlitalkpopup()
{
if ( getCookieAlitalkpopup("alitalkpromote") == null )
{
var expires = new Date();
expires.setTime(expires.getTime() + 4*60*60*1000);
var the_cookie = "alitalkpromote=viewed;path=/;domain=.alibaba.com;expires=" + expires.toGMTString();
document.cookie = the_cookie;
}
}
function getCookieAlitalkpopup(cookieName) {
var cookieString = document.cookie;
var start = cookieString.indexOf(cookieName + '=');
if (start == -1)
return null;
start += cookieName.length + 1;
var end = cookieString.indexOf(';', start);
if (end == -1) return unescape(cookieString.substring(start));
return unescape(cookieString.substring(start, end));
}
function newCheckAlitalkInstalled()
{
var obj5,obj6;
try{
obj5 = new ActiveXObject("Ali_Check.InfoCheck");
}catch(e){
obj5 = null;
}
if (obj5 != null) {
alitalkVersion = 5;
return true;
}
try{
obj6 = new ActiveXObject("aliimx.wangwangx");
}catch(e){
obj6 = null;
}
if (obj6 != null) {
alitalkVersion = 6;
return true;
}
return false;
}
function checkAlitalkInstalledG(){
if (document.all&&!document.opera) {
var obj5 = obj6 = null;
try {
obj5 = new ActiveXObject("Ali_Check.InfoCheck");
}
catch (e) {
}
try {
obj6 = new ActiveXObject("aliimx.wangwangx");
}
catch (e) {
}
if (obj5 || obj6) {
return true;
}
else {
return false;
}
}else{
return true;
}
}
function checkAlitalkpopup()
{
if (checkAlitalkInstalledG())
{
setCookieAlitalkpopup() ;
return false;
}
if ( getCookieAlitalkpopup("alitalkpromote") != null )
{
return false;
}
return true;
}
function newCheckAlitoolbarInstalled()
{
var obj;
try{
obj = new ActiveXObject("YAliALive.Live");
}
catch(e){
}
if (null!=obj){
return true;
} else {
return false;
}
}
function checkAlitoolbarpopup()
{
if (newCheckAlitoolbarInstalled())
{
return false;
}
return true;
}
function addListener(el,eventType,fn){
if(el.addEventListener){
el.addEventListener(eventType,fn,false);
}else if(el.attachEvent){
el.attachEvent("on" + eventType,fn);
}else{
el["on"+eventType] = fn;
}
}
/*
Copyright (c) 2008, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.5.1
*/
YAHOO.namespace("util");YAHOO.util.Cookie={_createCookieString:function(B,D,C,A){var F=YAHOO.lang;var E=encodeURIComponent(B)+"="+(C?encodeURIComponent(D):D);if(F.isObject(A)){if(A.expires instanceof Date){E+="; expires="+A.expires.toGMTString();}if(F.isString(A.path)&&A.path!=""){E+="; path="+A.path;}if(F.isString(A.domain)&&A.domain!=""){E+="; domain="+A.domain;}if(A.secure===true){E+="; secure";}}return E;},_createCookieHashString:function(B){var D=YAHOO.lang;if(!D.isObject(B)){throw new TypeError("Cookie._createCookieHashString(): Argument must be an object.");}var C=new Array();for(var A in B){if(D.hasOwnProperty(B,A)&&!D.isFunction(B[A])&&!D.isUndefined(B[A])){C.push(encodeURIComponent(A)+"="+encodeURIComponent(String(B[A])));}}return C.join("&");},_parseCookieHash:function(E){var D=E.split("&");var F=null;var C=new Object();for(var B=0,A=D.length;B<A;B++){F=D[B].split("=");C[decodeURIComponent(F[0])]=decodeURIComponent(F[1]);}return C;},_parseCookieString:function(I,A){var J=new Object();if(YAHOO.lang.isString(I)&&I.length>0){var B=(A===false||1?function(K){return K;}:decodeURIComponent);if(/[^=]+=[^=;]?(?:; [^=]+=[^=]?)?/.test(I)){var G=I.split(/;\s/g);var H=null;var C=null;var E=null;for(var D=0,F=G.length;D<F;D++){E=G[D].match(/([^=]+)=/i);if(E instanceof Array){H=decodeURIComponent(E[1]);C=B(G[D].substring(H.length+1));}else{H=decodeURIComponent(G[D]);C=H;}J[H]=C;}}}return J;},get:function(A,B){var D=YAHOO.lang;var C=this._parseCookieString(document.cookie);if(!D.isString(A)||A===""){throw new TypeError("Cookie.get(): Cookie name must be a non-empty string.");}if(D.isUndefined(C[A])){return null;}if(!D.isFunction(B)){return C[A];}else{return B(C[A]);}},getSub:function(A,C,B){var E=YAHOO.lang;var D=this.getSubs(A);if(D!==null){if(!E.isString(C)||C===""){throw new TypeError("Cookie.getSub(): Subcookie name must be a non-empty string.");}if(E.isUndefined(D[C])){return null;}if(!E.isFunction(B)){return D[C];}else{return B(D[C]);}}else{return null;}},getSubs:function(A){if(!YAHOO.lang.isString(A)||A===""){throw new TypeError("Cookie.getSubs(): Cookie name must be a non-empty string.");}var B=this._parseCookieString(document.cookie,false);if(YAHOO.lang.isString(B[A])){return this._parseCookieHash(B[A]);}return null;},remove:function(B,A){if(!YAHOO.lang.isString(B)||B===""){throw new TypeError("Cookie.remove(): Cookie name must be a non-empty string.");}A=A||{};A.expires=new Date(0);return this.set(B,"",A);},set:function(B,C,A){var E=YAHOO.lang;if(!E.isString(B)){throw new TypeError("Cookie.set(): Cookie name must be a string.");}if(E.isUndefined(C)){throw new TypeError("Cookie.set(): Value cannot be undefined.");}var D=this._createCookieString(B,C,true,A);document.cookie=D;return D;},setSub:function(B,D,C,A){var F=YAHOO.lang;if(!F.isString(B)||B===""){throw new TypeError("Cookie.setSub(): Cookie name must be a non-empty string.");}if(!F.isString(D)||D===""){throw new TypeError("Cookie.setSub(): Subcookie name must be a non-empty string.");}if(F.isUndefined(C)){throw new TypeError("Cookie.setSub(): Subcookie value cannot be undefined.");}var E=this.getSubs(B);if(!F.isObject(E)){E=new Object();}E[D]=C;return this.setSubs(B,E,A);},setSubs:function(B,C,A){var E=YAHOO.lang;if(!E.isString(B)){throw new TypeError("Cookie.setSubs(): Cookie name must be a string.");}if(!E.isObject(C)){throw new TypeError("Cookie.setSubs(): Cookie value must be an object.");}var D=this._createCookieString(B,this._createCookieHashString(C),false,A);document.cookie=D;return D;}};YAHOO.register("cookie",YAHOO.util.Cookie,{version:"2.5.1",build:"984"});
var t1Option = "";
var mid = "";
var time="";
var _ =	function(el){return YAHOO.util.Dom.get(el);};
function popShow(e){//显示信息
mid = "mid="+e.id;//根据userID发了请求
var handleSuccess = function(o){
var prod = eval("(" + o.responseText + ")");
t1Option = '<p><span class="excellingl">笔名：</span><a href="http://gonglue-test.china.alibaba.com:1111/user/profile.html?mid='+e.id+'">'+prod["n"]+'</a> <span class="leva_'+prod["l"]+'"></span>'
if(prod["e"]&&prod["e"]=="Y"){t1Option = t1Option + '<span class="pro2"></span>';}
t1Option = t1Option +'</p><p class="clr"><span class="excellingl">擅长领域：</span><span class="excellingr">'+prod["s"]+'</span></p><p class="clr"><span class="excellingl">回答次数：</span><span class="excellingr">'+prod["a"]+'</span></p>';
var showMsg = _("pop");
var opn = t1Option;
showMsg.innerHTML = opn; //浮动层输出
showMsg.style.display = "block"; //层显示
var xy = YAHOO.util.Dom.getXY(e);
xy[0,1] = xy[0,1]-23;//加上input框高度20
xy[1,0] = xy[1,0]+52;//加上input框高度20
YAHOO.util.Dom.setXY(showMsg, xy);
YAHOO.util.Event.addListener(showMsg, "mouseout", pophid);
YAHOO.util.Event.addListener(e, "mouseout", pophid);
YAHOO.util.Event.addListener(showMsg, "mouseover", popshw);
}
var handleFailure = function(){alert('操作失败！');}
var callback =
{
success:handleSuccess,
failure: handleFailure,
argument: e,
timeout: 5000
};
var request = YAHOO.util.Connect.asyncRequest('POST', 'http://gonglue-test.china.alibaba.com:1111/user/tip.html', callback, mid);
}
function popHidden(){//隐藏信息
var showMsg = _("pop");
showMsg.style.display = 'none';
}
function popshw(){//显示信息
clearTimeout(time);
var showMsg = _("pop");
showMsg.style.display = 'block';
}
function pophid(){
time = setTimeout("popHidden()",1500);
}
function doext(){
if(_("doext").className == "opn"){
_("extshow").className = "uloff";
_("doext").className = "cle";
_("doext").innerHTML = "收起";
}
else{
_("extshow").className = "ulon";
_("doext").className = "opn";
_("doext").innerHTML = "显示全部";
}
}
function aliclick(u, param) {
d = new Date();
if(document.images) {
var img_aliclick = new Image();
img_aliclick.src="http://stat.china.alibaba.com/tracelog/click.html" + param + "&time=" + d.getTime();
}
return true;
}
function etcclick(u, param) {
d = new Date();
if(document.images) {
var img_etc_aliclick = new Image();
img_etc_aliclick.src="http://stat.china.alibaba.com/etclistquery.html" + param + "&time=" + d.getTime();
}
return true;
}
function aliclickType(u, param){
var urlTxt = window.location.href;
if(urlTxt){
var urlType = urlTxt.substring(urlTxt.lastIndexOf('/')+1,urlTxt.lastIndexOf('.'));
}
aliclick(u, param+'_'+urlType);
}
function eeclick(u, param) {
d = new Date();
if (document.images) {
(new Image()).src = "http://stat.china.alibaba.com/ee.html" + param + "&time=" + d.getTime();
}
return true;
}
