﻿(function(){var g=this,p,w=g.jQuery,y=g.$,j=g.jQuery=g.$=function(E,F){return new j.fn.init(E,F);},B=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,a=/^.[^:#\[\.,]*$/;j.fn=j.prototype={init:function(I,G){I=I||document;if(I.nodeType){this[0]=I;this.length=1;this.context=I;return this;}if(typeof I==="string"){var F=B.exec(I);if(F&&(F[1]||!G)){if(F[1]){I=j.clean([F[1]],G);}else{var H=document.getElementById(F[3]);if(H&&H.id!=F[3]){return j().find(I);}var E=j(H||[]);E.context=document;E.selector=I;return E;}}else{return j(G).find(I);}}else{if(j.isFunction(I)){return j(document).ready(I);}}if(I.selector&&I.context){this.selector=I.selector;this.context=I.context;}return this.setArray(j.isArray(I)?I:j.makeArray(I));},selector:"",jquery:"1.3.2",size:function(){return this.length;},get:function(E){return E===p?Array.prototype.slice.call(this):this[E];},pushStack:function(H,F,G){var E=j(H);E.prevObject=this;E.context=this.context;if(F==="find"){E.selector=this.selector+(this.selector?" ":"")+G;}else{if(F){E.selector=this.selector+"."+F+"("+G+")";}}return E;},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this;},each:function(F,E){return j.each(this,F,E);},index:function(E){return j.inArray(E&&E.jquery?E[0]:E,this);},attr:function(H,F,E){var G=H;if(typeof H==="string"){if(F===p){return this[0]&&j[E||"attr"](this[0],H);}else{G={};G[H]=F;}}return this.each(function(I){for(H in G){j.attr(E?this.style:this,H,j.prop(this,G[H],E,I,H));}});},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=p;}return this.attr(E,F,"curCSS");},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F));}var E="";j.each(F||this,function(){j.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:j.fn.text([this]);}});});return E;},wrapAll:function(E){if(this[0]){var F=j(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0]);}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild;}return G;}).append(this);}return this;},wrapInner:function(E){return this.each(function(){j(this).contents().wrapAll(E);});},wrap:function(E){return this.each(function(){j(this).wrapAll(E);});},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E);}});},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild);}});},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this);});},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling);});},end:function(){return this.prevObject||j([]);},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;j.find(E,this[0],F);return F;}else{return this.pushStack(j.unique(j.map(this,function(G){return j.find(E,G);})),"find",E);}},clone:function(E){var G=this.map(function(){if(!j.support.noCloneEvent&&!j.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML;}return j.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0];}else{return this.cloneNode(true);}});if(E===true){var F=this.find("*").andSelf(),H=0;G.find("*").andSelf().each(function(){if(this.nodeName!==F[H].nodeName){return;}var I=j.data(F[H],"events");for(var K in I){for(var J in I[K]){j.event.add(this,K,I[K][J],I[K][J].data);}}H++;});}return G;},filter:function(E){return this.pushStack(j.isFunction(E)&&j.grep(this,function(F,G){return E.call(F,G);})||j.multiFilter(E,j.grep(this,function(F){return F.nodeType===1;})),"filter",E);},closest:function(F){var E=j.expr.match.POS.test(F)?j(F):null,G=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(E?E.index(H)>-1:j(H).is(F)){j.data(H,"closest",G);return H;}H=H.parentNode;G++;}});},not:function(E){if(typeof E==="string"){if(a.test(E)){return this.pushStack(j.multiFilter(E,this,true),"not",E);}else{E=j.multiFilter(E,this);}}var F=E.length&&E[E.length-1]!==p&&!E.nodeType;return this.filter(function(){return F?j.inArray(this,E)<0:this!=E;});},add:function(E){return this.pushStack(j.unique(j.merge(this.get(),typeof E==="string"?j(E):j.makeArray(E))));},is:function(E){return !!E&&j.multiFilter(E,this).length>0;},hasClass:function(E){return !!E&&this.is("."+E);},val:function(J){if(J===p){var M=this[0];if(M){if(j.nodeName(M,"option")){return(M.attributes.value||{}).specified?M.value:M.text;}if(j.nodeName(M,"select")){var H=M.selectedIndex,K=[],L=M.options,G=M.type=="select-one";if(H<0){return null;}for(var E=G?H:0,I=G?H+1:L.length;E<I;E++){var F=L[E];if(F.selected){J=j(F).val();if(G){return J;}K.push(J);}}return K;}return(M.value||"").replace(/\r/g,"");}return p;}if(typeof J==="number"){J+="";}return this.each(function(){if(this.nodeType!=1){return;}if(j.isArray(J)&&/radio|checkbox/.test(this.type)){this.checked=(j.inArray(this.value,J)>=0||j.inArray(this.name,J)>=0);}else{if(j.nodeName(this,"select")){var N=j.makeArray(J);j("option",this).each(function(){this.selected=(j.inArray(this.value,N)>=0||j.inArray(this.text,N)>=0);});if(!N.length){this.selectedIndex=-1;}}else{this.value=J;}}});},html:function(E){return E===p?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E);},replaceWith:function(E){return this.after(E).remove();},eq:function(E){return this.slice(E,+E+1);},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","));},map:function(E){return this.pushStack(j.map(this,function(F,G){return E.call(F,G,F);}));},andSelf:function(){return this.add(this.prevObject);},domManip:function(I,L,K){if(this[0]){var H=(this[0].ownerDocument||this[0]).createDocumentFragment(),E=j.clean(I,(this[0].ownerDocument||this[0]),H),G=H.firstChild;if(G){for(var F=0,M=this.length;F<M;F++){K.call(J(this[F],G),this.length>1||F>0?H.cloneNode(true):H);}}if(E){j.each(E,x);}}return this;function J(N,O){return L&&j.nodeName(N,"table")&&j.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N;}}};j.fn.init.prototype=j.fn;function x(E,F){if(F.src){j.ajax({url:F.src,async:false,dataType:"script"});}else{j.globalEval(F.text||F.textContent||F.innerHTML||"");}if(F.parentNode){F.parentNode.removeChild(F);}}function u(){return +new Date;}j.extend=j.fn.extend=function(){var I=arguments[0]||{},G=1,H=arguments.length,L=false,F;if(typeof I==="boolean"){L=I;I=arguments[1]||{};G=2;}if(typeof I!=="object"&&!j.isFunction(I)){I={};}if(H==G){I=this;--G;}for(;G<H;G++){if((F=arguments[G])!=null){for(var E in F){var J=I[E],K=F[E];if(I===K){continue;}if(L&&K&&typeof K==="object"&&!K.nodeType){I[E]=j.extend(L,J||(K.length!=null?[]:{}),K);}else{if(K!==p){I[E]=K;}}}}}return I;};var C=/z-?index|font-?weight|opacity|zoom|line-?height/i,l=document.defaultView||{},n=Object.prototype.toString;j.extend({noConflict:function(E){g.$=y;if(E){g.jQuery=w;}return j;},isFunction:function(E){return n.call(E)==="[object Function]";},isArray:function(E){return n.call(E)==="[object Array]";},isXMLDoc:function(E){return E.nodeType===9&&E.documentElement.nodeName!=="HTML"||!!E.ownerDocument&&j.isXMLDoc(E.ownerDocument);},globalEval:function(E){if(E&&/\S/.test(E)){var G=document.getElementsByTagName("head")[0]||document.documentElement,F=document.createElement("script");F.type="text/javascript";if(j.support.scriptEval){F.appendChild(document.createTextNode(E));}else{F.text=E;}G.insertBefore(F,G.firstChild);G.removeChild(F);}},nodeName:function(F,E){return F.nodeName&&F.nodeName.toUpperCase()==E.toUpperCase();},each:function(G,H,I){var E,J=0,F=G.length;if(I){if(F===p){for(E in G){if(H.apply(G[E],I)===false){break;}}}else{for(;J<F;){if(H.apply(G[J++],I)===false){break;}}}}else{if(F===p){for(E in G){if(H.call(G[E],E,G[E])===false){break;}}}else{for(var K=G[0];J<F&&H.call(K,J,K)!==false;K=G[++J]){}}}return G;},prop:function(G,H,F,E,I){if(j.isFunction(H)){H=H.call(G,E);}return typeof H==="number"&&F=="curCSS"&&!C.test(I)?H+"px":H;},className:{add:function(E,F){j.each((F||"").split(/\s+/),function(G,H){if(E.nodeType==1&&!j.className.has(E.className,H)){E.className+=(E.className?" ":"")+H;}});},remove:function(E,F){if(E.nodeType==1){E.className=F!==p?j.grep(E.className.split(/\s+/),function(G){return !j.className.has(F,G);}).join(" "):"";}},has:function(F,E){return F&&j.inArray(E,(F.className||F).toString().split(/\s+/))>-1;}},swap:function(G,F,H){var I={};for(var E in F){I[E]=G.style[E];G.style[E]=F[E];}H.call(G);for(var E in F){G.style[E]=I[E];}},css:function(G,E,I,L){if(E=="width"||E=="height"){var K,F={position:"absolute",visibility:"hidden",display:"block"},J=E=="width"?["Left","Right"]:["Top","Bottom"];function H(){K=E=="width"?G.offsetWidth:G.offsetHeight;if(L==="border"){return;}j.each(J,function(){if(!L){K-=parseFloat(j.curCSS(G,"padding"+this,true))||0;}if(L==="margin"){K+=parseFloat(j.curCSS(G,"margin"+this,true))||0;}else{K-=parseFloat(j.curCSS(G,"border"+this+"Width",true))||0;}});}if(G.offsetWidth!==0){H();}else{j.swap(G,F,H);}return Math.max(0,Math.round(K));}return j.curCSS(G,E,I);},curCSS:function(H,E,F){var K,M=H.style;if(E=="opacity"&&!j.support.opacity){K=j.attr(M,"opacity");return K==""?"1":K;}if(E.match(/float/i)){E=r;}if(!F&&M&&M[E]){K=M[E];}else{if(l.getComputedStyle){if(E.match(/float/i)){E="float";}E=E.replace(/([A-Z])/g,"-$1").toLowerCase();var L=l.getComputedStyle(H,null);if(L){K=L.getPropertyValue(E);}if(E=="opacity"&&K==""){K="1";}}else{if(H.currentStyle){var I=E.replace(/\-(\w)/g,function(N,O){return O.toUpperCase();});K=H.currentStyle[E]||H.currentStyle[I];if(!/^\d+(px)?$/i.test(K)&&/^\d/.test(K)){var G=M.left,J=H.runtimeStyle.left;H.runtimeStyle.left=H.currentStyle.left;M.left=K||0;K=M.pixelLeft+"px";M.left=G;H.runtimeStyle.left=J;}}}}return K;},clean:function(E,J,H){J=J||document;if(typeof J.createElement==="undefined"){J=J.ownerDocument||J[0]&&J[0].ownerDocument||document;}if(!H&&E.length===1&&typeof E[0]==="string"){var G=/^<(\w+)\s*\/?>$/.exec(E[0]);if(G){return[J.createElement(G[1])];}}var F=[],L=[],K=J.createElement("div");j.each(E,function(R,S){if(typeof S==="number"){S+="";}if(!S){return;}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(T,U,V){return V.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?T:U+"></"+V+">";});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!O.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!O.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!O.indexOf("<td")||!O.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!O.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!j.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];K.innerHTML=Q[1]+S+Q[2];while(Q[0]--){K=K.lastChild;}if(!j.support.tbody){var M=/<tbody/i.test(S),N=!O.indexOf("<table")&&!M?K.firstChild&&K.firstChild.childNodes:Q[1]=="<table>"&&!M?K.childNodes:[];for(var P=N.length-1;P>=0;--P){if(j.nodeName(N[P],"tbody")&&!N[P].childNodes.length){N[P].parentNode.removeChild(N[P]);}}}if(!j.support.leadingWhitespace&&/^\s/.test(S)){K.insertBefore(J.createTextNode(S.match(/^\s*/)[0]),K.firstChild);}S=j.makeArray(K.childNodes);}if(S.nodeType){F.push(S);}else{F=j.merge(F,S);}});if(H){for(var I=0;F[I];I++){if(j.nodeName(F[I],"script")&&(!F[I].type||F[I].type.toLowerCase()==="text/javascript")){L.push(F[I].parentNode?F[I].parentNode.removeChild(F[I]):F[I]);}else{if(F[I].nodeType===1){F.splice.apply(F,[I+1,0].concat(j.makeArray(F[I].getElementsByTagName("script"))));}H.appendChild(F[I]);}}return L;}return F;},attr:function(I,F,J){if(!I||I.nodeType==3||I.nodeType==8){return p;}var G=!j.isXMLDoc(I),K=J!==p;F=G&&j.props[F]||F;if(I.tagName){var E=/href|src|style/.test(F);if(F=="selected"&&I.parentNode){I.parentNode.selectedIndex;}if(F in I&&G&&!E){if(K){if(F=="type"&&j.nodeName(I,"input")&&I.parentNode){throw"type property can't be changed";}I[F]=J;}if(j.nodeName(I,"form")&&I.getAttributeNode(F)){return I.getAttributeNode(F).nodeValue;}if(F=="tabIndex"){var H=I.getAttributeNode("tabIndex");return H&&H.specified?H.value:I.nodeName.match(/(button|input|object|select|textarea)/i)?0:I.nodeName.match(/^(a|area)$/i)&&I.href?0:p;}return I[F];}if(!j.support.style&&G&&F=="style"){return j.attr(I.style,"cssText",J);}if(K){I.setAttribute(F,""+J);}var L=!j.support.hrefNormalized&&G&&E?I.getAttribute(F,2):I.getAttribute(F);return L===null?p:L;}if(!j.support.opacity&&F=="opacity"){if(K){I.zoom=1;I.filter=(I.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(J)+""=="NaN"?"":"alpha(opacity="+J*100+")");}return I.filter&&I.filter.indexOf("opacity=")>=0?(parseFloat(I.filter.match(/opacity=([^)]*)/)[1])/100)+"":"";}F=F.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase();});if(K){I[F]=J;}return I[F];},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"");},makeArray:function(E){var F=[];if(E!=null){var G=E.length;if(G==null||typeof E==="string"||j.isFunction(E)||E.setInterval){F[0]=E;}else{while(G){F[--G]=E[G];}}}return F;},inArray:function(E,F){for(var G=0,H=F.length;G<H;G++){if(F[G]===E){return G;}}return -1;},merge:function(G,I){var E=0,F,H=G.length;if(!j.support.getAll){while((F=I[E++])!=null){if(F.nodeType!=8){G[H++]=F;}}}else{while((F=I[E++])!=null){G[H++]=F;}}return G;},unique:function(I){var J=[],H={};try{for(var E=0,K=I.length;E<K;E++){var F=j.data(I[E]);if(!H[F]){H[F]=true;J.push(I[E]);}}}catch(G){J=I;}return J;},grep:function(G,F,H){var E=[];for(var I=0,J=G.length;I<J;I++){if(!H!=!F(G[I],I)){E.push(G[I]);}}return E;},map:function(F,H){var G=[];for(var E=0,I=F.length;E<I;E++){var J=H(F[E],E);if(J!=null){G[G.length]=J;}}return G.concat.apply([],G);}});var b=navigator.userAgent.toLowerCase();j.browser={version:(b.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(b),opera:/opera/.test(b),msie:/msie/.test(b)&&!/opera/.test(b),mozilla:/mozilla/.test(b)&&!/(compatible|webkit)/.test(b)};j.each({parent:function(E){return E.parentNode;},parents:function(E){return j.dir(E,"parentNode");},next:function(E){return j.nth(E,2,"nextSibling");},prev:function(E){return j.nth(E,2,"previousSibling");},nextAll:function(E){return j.dir(E,"nextSibling");},prevAll:function(E){return j.dir(E,"previousSibling");},siblings:function(E){return j.sibling(E.parentNode.firstChild,E);},children:function(E){return j.sibling(E.firstChild);},contents:function(E){return j.nodeName(E,"iframe")?E.contentDocument||E.contentWindow.document:j.makeArray(E.childNodes);}},function(E,F){j.fn[E]=function(G){var H=j.map(this,F);if(G&&typeof G=="string"){H=j.multiFilter(G,H);}return this.pushStack(j.unique(H),E,G);};});j.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(E,F){j.fn[E]=function(K){var J=[],L=j(K);for(var H=0,G=L.length;H<G;H++){var I=(H>0?this.clone(true):this).get();j.fn[F].apply(j(L[H]),I);J=J.concat(I);}return this.pushStack(J,E,K);};});j.each({removeAttr:function(E){j.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E);}},addClass:function(E){j.className.add(this,E);},removeClass:function(E){j.className.remove(this,E);},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!j.className.has(this,F);}j.className[E?"add":"remove"](this,F);},remove:function(E){if(!E||j.filter(E,[this]).length){j("*",this).add([this]).each(function(){j.event.remove(this);j.removeData(this);});if(this.parentNode){this.parentNode.removeChild(this);}}},empty:function(){j(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild);}}},function(E,F){j.fn[E]=function(){return this.each(F,arguments);};});function e(E,F){return E[0]&&parseInt(j.curCSS(E[0],F,true),10)||0;}var s="jQuery"+u(),q=0,A={};j.extend({cache:{},data:function(H,G,E){H=H==g?A:H;var F=H[s];if(!F){F=H[s]=++q;}if(G&&!j.cache[F]){j.cache[F]={};}if(E!==p){j.cache[F][G]=E;}return G?j.cache[F][G]:F;},removeData:function(H,G){H=H==g?A:H;var F=H[s];if(G){if(j.cache[F]){delete j.cache[F][G];G="";for(G in j.cache[F]){break;}if(!G){j.removeData(H);}}}else{try{delete H[s];}catch(E){if(H.removeAttribute){H.removeAttribute(s);}}delete j.cache[F];}},queue:function(H,G,F){if(H){G=(G||"fx")+"queue";var E=j.data(H,G);if(!E||j.isArray(F)){E=j.data(H,G,j.makeArray(F));}else{if(F){E.push(F);}}}return E;},dequeue:function(F,E){var G=j.queue(F,E),H=G.shift();if(!E||E==="fx"){H=G[0];}if(H!==p){H.call(F);}}});j.fn.extend({data:function(G,E){var F=G.split(".");F[1]=F[1]?"."+F[1]:"";if(E===p){var H=this.triggerHandler("getData"+F[1]+"!",[F[0]]);if(H===p&&this.length){H=j.data(this[0],G);}return H===p&&F[1]?this.data(F[0]):H;}else{return this.trigger("setData"+F[1]+"!",[F[0],E]).each(function(){j.data(this,G,E);});}},removeData:function(E){return this.each(function(){j.removeData(this,E);});},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx";}if(F===p){return j.queue(this[0],E);}return this.each(function(){var G=j.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this);}});},dequeue:function(E){return this.each(function(){j.dequeue(this,E);});}});(function(){var H=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,N=0,J=Object.prototype.toString;var E=function(Z,Ac,Ag,U){Ag=Ag||[];Ac=Ac||document;if(Ac.nodeType!==1&&Ac.nodeType!==9){return[];}if(!Z||typeof Z!=="string"){return Ag;}var Ad=[],Ae,W,V,Ab,Ah,Aa,Y=true;H.lastIndex=0;while((Ae=H.exec(Z))!==null){Ad.push(Ae[1]);if(Ae[2]){Aa=RegExp.rightContext;break;}}if(Ad.length>1&&S.exec(Z)){if(Ad.length===2&&K.relative[Ad[0]]){W=L(Ad[0]+Ad[1],Ac);}else{W=K.relative[Ad[0]]?[Ac]:E(Ad.shift(),Ac);while(Ad.length){Z=Ad.shift();if(K.relative[Z]){Z+=Ad.shift();}W=L(Z,W);}}}else{var X=U?{expr:Ad.pop(),set:O(U)}:E.find(Ad.pop(),Ad.length===1&&Ac.parentNode?Ac.parentNode:Ac,R(Ac));W=E.filter(X.expr,X.set);if(Ad.length>0){V=O(W);}else{Y=false;}while(Ad.length){var Aj=Ad.pop(),Af=Aj;if(!K.relative[Aj]){Aj="";}else{Af=Ad.pop();}if(Af==null){Af=Ac;}K.relative[Aj](V,Af,R(Ac));}}if(!V){V=W;}if(!V){throw"Syntax error, unrecognized expression: "+(Aj||Z);}if(J.call(V)==="[object Array]"){if(!Y){Ag.push.apply(Ag,V);}else{if(Ac.nodeType===1){for(var T=0;V[T]!=null;T++){if(V[T]&&(V[T]===true||V[T].nodeType===1&&M(Ac,V[T]))){Ag.push(W[T]);}}}else{for(var T=0;V[T]!=null;T++){if(V[T]&&V[T].nodeType===1){Ag.push(W[T]);}}}}}else{O(V,Ag);}if(Aa){E(Aa,Ac,Ag,U);if(Q){hasDuplicate=false;Ag.sort(Q);if(hasDuplicate){for(var T=1;T<Ag.length;T++){if(Ag[T]===Ag[T-1]){Ag.splice(T--,1);}}}}}return Ag;};E.matches=function(U,T){return E(U,null,null,T);};E.find=function(T,U,Y){var Ab,Z;if(!T){return[];}for(var X=0,W=K.order.length;X<W;X++){var Aa=K.order[X],Z;if((Z=K.match[Aa].exec(T))){var V=RegExp.leftContext;if(V.substr(V.length-1)!=="\\"){Z[1]=(Z[1]||"").replace(/\\/g,"");Ab=K.find[Aa](Z,U,Y);if(Ab!=null){T=T.replace(K.match[Aa],"");break;}}}}if(!Ab){Ab=U.getElementsByTagName("*");}return{set:Ab,expr:T};};E.filter=function(Ac,U,Ag,Af){var Ae=Ac,V=[],Ab=U,Z,X,Ad=U&&U[0]&&R(U[0]);while(Ac&&U.length){for(var Ah in K.filter){if((Z=K.match[Ah].exec(Ac))!=null){var Aa=K.filter[Ah],Aj,T;X=false;if(Ab==V){V=[];}if(K.preFilter[Ah]){Z=K.preFilter[Ah](Z,Ab,Ag,V,Af,Ad);if(!Z){X=Aj=true;}else{if(Z===true){continue;}}}if(Z){for(var Y=0;(T=Ab[Y])!=null;Y++){if(T){Aj=Aa(T,Z,Y,Ab);var W=Af^!!Aj;if(Ag&&Aj!=null){if(W){X=true;}else{Ab[Y]=false;}}else{if(W){V.push(T);X=true;}}}}}if(Aj!==p){if(!Ag){Ab=V;}Ac=Ac.replace(K.match[Ah],"");if(!X){return[];}break;}}}if(Ac==Ae){if(X==null){throw"Syntax error, unrecognized expression: "+Ac;}else{break;}}Ae=Ac;}return Ab;};var K=E.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(T){return T.getAttribute("href");}},relative:{"+":function(T,U,Ab){var Z=typeof U==="string",Y=Z&&!/\W/.test(U),Aa=Z&&!Y;if(Y&&!Ab){U=U.toUpperCase();}for(var X=0,W=T.length,V;X<W;X++){if((V=T[X])){while((V=V.previousSibling)&&V.nodeType!==1){}T[X]=Aa||V&&V.nodeName===U?V||false:V===U;}}if(Aa){E.filter(U,T,true);}},">":function(Aa,V,T){var Y=typeof V==="string";if(Y&&!/\W/.test(V)){V=T?V:V.toUpperCase();for(var W=0,U=Aa.length;W<U;W++){var Z=Aa[W];if(Z){var X=Z.parentNode;Aa[W]=X.nodeName===V?X:false;}}}else{for(var W=0,U=Aa.length;W<U;W++){var Z=Aa[W];if(Z){Aa[W]=Y?Z.parentNode:Z.parentNode===V;}}if(Y){E.filter(V,Aa,true);}}},"":function(X,U,T){var V=N++,Y=I;if(!U.match(/\W/)){var W=U=T?U:U.toUpperCase();Y=G;}Y("parentNode",U,V,X,W,T);},"~":function(X,U,T){var V=N++,Y=I;if(typeof U==="string"&&!U.match(/\W/)){var W=U=T?U:U.toUpperCase();Y=G;}Y("previousSibling",U,V,X,W,T);}},find:{ID:function(T,U,V){if(typeof U.getElementById!=="undefined"&&!V){var W=U.getElementById(T[1]);return W?[W]:[];}},NAME:function(V,T,U){if(typeof T.getElementsByName!=="undefined"){var X=[],Z=T.getElementsByName(V[1]);for(var Y=0,W=Z.length;Y<W;Y++){if(Z[Y].getAttribute("name")===V[1]){X.push(Z[Y]);}}return X.length===0?null:X;}},TAG:function(U,T){return T.getElementsByTagName(U[1]);}},preFilter:{CLASS:function(X,V,W,U,Aa,T){X=" "+X[1].replace(/\\/g,"")+" ";if(T){return X;}for(var Y=0,Z;(Z=V[Y])!=null;Y++){if(Z){if(Aa^(Z.className&&(" "+Z.className+" ").indexOf(X)>=0)){if(!W){U.push(Z);}}else{if(W){V[Y]=false;}}}}return false;},ID:function(T){return T[1].replace(/\\/g,"");},TAG:function(T,V){for(var U=0;V[U]===false;U++){}return V[U]&&R(V[U])?T[1]:T[1].toUpperCase();},CHILD:function(U){if(U[1]=="nth"){var T=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(U[2]=="even"&&"2n"||U[2]=="odd"&&"2n+1"||!/\D/.test(U[2])&&"0n+"+U[2]||U[2]);U[2]=(T[1]+(T[2]||1))-0;U[3]=T[3]-0;}U[0]=N++;return U;},ATTR:function(Z,U,V,T,W,X){var Y=Z[1].replace(/\\/g,"");if(!X&&K.attrMap[Y]){Z[1]=K.attrMap[Y];}if(Z[2]==="~="){Z[4]=" "+Z[4]+" ";}return Z;},PSEUDO:function(Y,U,V,T,W){if(Y[1]==="not"){if(Y[3].match(H).length>1||/^\w/.test(Y[3])){Y[3]=E(Y[3],null,null,U);}else{var X=E.filter(Y[3],U,V,true^W);if(!V){T.push.apply(T,X);}return false;}}else{if(K.match.POS.test(Y[0])||K.match.CHILD.test(Y[0])){return true;}}return Y;},POS:function(T){T.unshift(true);return T;}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden";},disabled:function(T){return T.disabled===true;},checked:function(T){return T.checked===true;},selected:function(T){T.parentNode.selectedIndex;return T.selected===true;},parent:function(T){return !!T.firstChild;},empty:function(T){return !T.firstChild;},has:function(U,T,V){return !!E(V[3],U).length;},header:function(T){return/h\d/i.test(T.nodeName);},text:function(T){return"text"===T.type;},radio:function(T){return"radio"===T.type;},checkbox:function(T){return"checkbox"===T.type;},file:function(T){return"file"===T.type;},password:function(T){return"password"===T.type;},submit:function(T){return"submit"===T.type;},image:function(T){return"image"===T.type;},reset:function(T){return"reset"===T.type;},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON";},input:function(T){return/input|select|textarea|button/i.test(T.nodeName);}},setFilters:{first:function(T,U){return U===0;},last:function(U,T,W,V){return T===V.length-1;},even:function(T,U){return U%2===0;},odd:function(T,U){return U%2===1;},lt:function(U,T,V){return T<V[3]-0;},gt:function(U,T,V){return T>V[3]-0;},nth:function(U,T,V){return V[3]-0==T;},eq:function(U,T,V){return V[3]-0==T;}},filter:{PSEUDO:function(Aa,W,X,T){var V=W[1],Y=K.filters[V];if(Y){return Y(Aa,X,W,T);}else{if(V==="contains"){return(Aa.textContent||Aa.innerText||"").indexOf(W[3])>=0;}else{if(V==="not"){var Z=W[3];for(var X=0,U=Z.length;X<U;X++){if(Z[X]===Aa){return false;}}return true;}}}},CHILD:function(V,Y){var Ac=Y[1],W=V;switch(Ac){case"only":case"first":while(W=W.previousSibling){if(W.nodeType===1){return false;}}if(Ac=="first"){return true;}W=V;case"last":while(W=W.nextSibling){if(W.nodeType===1){return false;}}return true;case"nth":var X=Y[2],T=Y[3];if(X==1&&T==0){return true;}var Ab=Y[0],Z=V.parentNode;if(Z&&(Z.sizcache!==Ab||!V.nodeIndex)){var Aa=0;for(W=Z.firstChild;W;W=W.nextSibling){if(W.nodeType===1){W.nodeIndex=++Aa;}}Z.sizcache=Ab;}var U=V.nodeIndex-T;if(X==0){return U==0;}else{return(U%X==0&&U/X>=0);}}},ID:function(T,U){return T.nodeType===1&&T.getAttribute("id")===U;},TAG:function(T,U){return(U==="*"&&T.nodeType===1)||T.nodeName===U;},CLASS:function(T,U){return(" "+(T.className||T.getAttribute("class"))+" ").indexOf(U)>-1;},ATTR:function(T,Y){var V=Y[1],Z=K.attrHandle[V]?K.attrHandle[V](T):T[V]!=null?T[V]:T.getAttribute(V),U=Z+"",W=Y[2],X=Y[4];return Z==null?W==="!=":W==="="?U===X:W==="*="?U.indexOf(X)>=0:W==="~="?(" "+U+" ").indexOf(X)>=0:!X?U&&Z!==false:W==="!="?U!=X:W==="^="?U.indexOf(X)===0:W==="$="?U.substr(U.length-X.length)===X:W==="|="?U===X||U.substr(0,X.length+1)===X+"-":false;},POS:function(Y,U,V,T){var W=U[2],X=K.setFilters[W];if(X){return X(Y,V,U,T);}}}};var S=K.match.POS;for(var F in K.match){K.match[F]=RegExp(K.match[F].source+/(?![^\[]*\])(?![^\(]*\))/.source);}var O=function(T,U){T=Array.prototype.slice.call(T);if(U){U.push.apply(U,T);return U;}return T;};try{Array.prototype.slice.call(document.documentElement.childNodes);}catch(P){O=function(X,W){var U=W||[];if(J.call(X)==="[object Array]"){Array.prototype.push.apply(U,X);}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V<T;V++){U.push(X[V]);}}else{for(var V=0;X[V];V++){U.push(X[V]);}}}return U;};}var Q;if(document.documentElement.compareDocumentPosition){Q=function(T,V){var U=T.compareDocumentPosition(V)&4?-1:T===V?0:1;if(U===0){hasDuplicate=true;}return U;};}else{if("sourceIndex" in document.documentElement){Q=function(T,V){var U=T.sourceIndex-V.sourceIndex;if(U===0){hasDuplicate=true;}return U;};}else{if(document.createRange){Q=function(W,U){var V=W.ownerDocument.createRange(),T=U.ownerDocument.createRange();V.selectNode(W);V.collapse(true);T.selectNode(U);T.collapse(true);var X=V.compareBoundaryPoints(Range.START_TO_END,T);if(X===0){hasDuplicate=true;}return X;};}}}(function(){var T=document.createElement("form"),U="script"+(new Date).getTime();T.innerHTML="<input name='"+U+"'/>";var V=document.documentElement;V.insertBefore(T,V.firstChild);if(!!document.getElementById(U)){K.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:p:[];}};K.filter.ID=function(X,Y){var W=typeof X.getAttributeNode!=="undefined"&&X.getAttributeNode("id");return X.nodeType===1&&W&&W.nodeValue===Y;};}V.removeChild(T);})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){K.find.TAG=function(W,V){var U=V.getElementsByTagName(W[1]);if(W[1]==="*"){var Y=[];for(var X=0;U[X];X++){if(U[X].nodeType===1){Y.push(U[X]);}}U=Y;}return U;};}T.innerHTML="<a href='#'></a>";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){K.attrHandle.href=function(U){return U.getAttribute("href",2);};}})();if(document.querySelectorAll){(function(){var U=E,T=document.createElement("div");T.innerHTML="<p class='TEST'></p>";if(T.querySelectorAll&&T.querySelectorAll(".TEST").length===0){return;}E=function(X,W,Z,V){W=W||document;if(!V&&W.nodeType===9&&!R(W)){try{return O(W.querySelectorAll(X),Z);}catch(Y){}}return U(X,W,Z,V);};E.find=U.find;E.filter=U.filter;E.selectors=U.selectors;E.matches=U.matches;})();}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="<div class='test e'></div><div class='test'></div>";if(T.getElementsByClassName("e").length===0){return;}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return;}K.order.splice(1,0,"CLASS");K.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1]);}};})();}function G(X,Ad,Ac,W,V,T){var Aa=X=="previousSibling"&&!T;for(var Z=0,Y=W.length;Z<Y;Z++){var U=W[Z];if(U){if(Aa&&U.nodeType===1){U.sizcache=Ac;U.sizset=Z;}U=U[X];var Ab=false;while(U){if(U.sizcache===Ac){Ab=W[U.sizset];break;}if(U.nodeType===1&&!T){U.sizcache=Ac;U.sizset=Z;}if(U.nodeName===Ad){Ab=U;break;}U=U[X];}W[Z]=Ab;}}}function I(X,Ad,Ac,W,V,T){var Aa=X=="previousSibling"&&!T;for(var Z=0,Y=W.length;Z<Y;Z++){var U=W[Z];if(U){if(Aa&&U.nodeType===1){U.sizcache=Ac;U.sizset=Z;}U=U[X];var Ab=false;while(U){if(U.sizcache===Ac){Ab=W[U.sizset];break;}if(U.nodeType===1){if(!T){U.sizcache=Ac;U.sizset=Z;}if(typeof Ad!=="string"){if(U===Ad){Ab=true;break;}}else{if(E.filter(Ad,[U]).length>0){Ab=U;break;}}}U=U[X];}W[Z]=Ab;}}}var M=document.compareDocumentPosition?function(T,U){return T.compareDocumentPosition(U)&16;}:function(T,U){return T!==U&&(T.contains?T.contains(U):true);};var R=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&R(T.ownerDocument);};var L=function(U,T){var X=[],Y="",Z,W=T.nodeType?[T]:T;while((Z=K.match.PSEUDO.exec(U))){Y+=Z[0];U=U.replace(K.match.PSEUDO,"");}U=K.relative[U]?U+"*":U;for(var Aa=0,V=W.length;Aa<V;Aa++){E(U,W[Aa],X);}return E.filter(Y,X);};j.find=E;j.filter=E.filter;j.expr=E.selectors;j.expr[":"]=j.expr.filters;E.selectors.filters.hidden=function(T){return T.offsetWidth===0||T.offsetHeight===0;};E.selectors.filters.visible=function(T){return T.offsetWidth>0||T.offsetHeight>0;};E.selectors.filters.animated=function(T){return j.grep(j.timers,function(U){return T===U.elem;}).length;};j.multiFilter=function(U,V,T){if(T){U=":not("+U+")";}return E.matches(U,V);};j.dir=function(U,T){var W=[],V=U[T];while(V&&V!=document){if(V.nodeType==1){W.push(V);}V=V[T];}return W;};j.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break;}}return X;};j.sibling=function(U,T){var V=[];for(;U;U=U.nextSibling){if(U.nodeType==1&&U!=T){V.push(U);}}return V;};return;g.Sizzle=E;})();j.event={add:function(F,H,J,I){if(F.nodeType==3||F.nodeType==8){return;}if(F.setInterval&&F!=g){F=g;}if(!J.guid){J.guid=this.guid++;}if(I!==p){var G=J;J=this.proxy(G);J.data=I;}var E=j.data(F,"events")||j.data(F,"events",{}),K=j.data(F,"handle")||j.data(F,"handle",function(){return typeof j!=="undefined"&&!j.event.triggered?j.event.handle.apply(arguments.callee.elem,arguments):p;});K.elem=F;j.each(H.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();J.type=O.slice().sort().join(".");var L=E[N];if(j.event.specialAll[N]){j.event.specialAll[N].setup.call(F,I,O);}if(!L){L=E[N]={};if(!j.event.special[N]||j.event.special[N].setup.call(F,I,O)===false){if(F.addEventListener){F.addEventListener(N,K,false);}else{if(F.attachEvent){F.attachEvent("on"+N,K);}}}}L[J.guid]=J;j.event.global[N]=true;});F=null;},guid:1,global:{},remove:function(J,G,I){if(J.nodeType==3||J.nodeType==8){return;}var F=j.data(J,"events"),E,L;if(F){if(G===p||(typeof G==="string"&&G.charAt(0)==".")){for(var H in F){this.remove(J,H+(G||""));}}else{if(G.type){I=G.handler;G=G.type;}j.each(G.split(/\s+/),function(P,M){var O=M.split(".");M=O.shift();var Q=RegExp("(^|\\.)"+O.slice().sort().join(".*\\.")+"(\\.|$)");if(F[M]){if(I){delete F[M][I.guid];}else{for(var N in F[M]){if(Q.test(F[M][N].type)){delete F[M][N];}}}if(j.event.specialAll[M]){j.event.specialAll[M].teardown.call(J,O);}for(E in F[M]){break;}if(!E){if(!j.event.special[M]||j.event.special[M].teardown.call(J,O)===false){if(J.removeEventListener){J.removeEventListener(M,j.data(J,"handle"),false);}else{if(J.detachEvent){J.detachEvent("on"+M,j.data(J,"handle"));}}}E=null;delete F[M];}}});}for(E in F){break;}if(!E){var K=j.data(J,"handle");if(K){K.elem=null;}j.removeData(J,"events");j.removeData(J,"handle");}}},trigger:function(H,J,G,L){var F=H.type||H;if(!L){H=typeof H==="object"?H[s]?H:j.extend(j.Event(F),H):j.Event(F);if(F.indexOf("!")>=0){H.type=F=F.slice(0,-1);H.exclusive=true;}if(!G){H.stopPropagation();if(this.global[F]){j.each(j.cache,function(){if(this.events&&this.events[F]){j.event.trigger(H,J,this.handle.elem);}});}}if(!G||G.nodeType==3||G.nodeType==8){return p;}H.result=p;H.target=G;J=j.makeArray(J);J.unshift(H);}H.currentTarget=G;var I=j.data(G,"handle");if(I){I.apply(G,J);}if((!G[F]||(j.nodeName(G,"a")&&F=="click"))&&G["on"+F]&&G["on"+F].apply(G,J)===false){H.result=false;}if(!L&&G[F]&&!H.isDefaultPrevented()&&!(j.nodeName(G,"a")&&F=="click")){this.triggered=true;try{G[F]();}catch(K){}}this.triggered=false;if(!H.isPropagationStopped()){var E=G.parentNode||G.ownerDocument;if(E){j.event.trigger(H,J,E,true);}}},handle:function(J){var I,L;J=arguments[0]=j.event.fix(J||g.event);J.currentTarget=this;var K=J.type.split(".");J.type=K.shift();I=!K.length&&!J.exclusive;var H=RegExp("(^|\\.)"+K.slice().sort().join(".*\\.")+"(\\.|$)");L=(j.data(this,"events")||{})[J.type];for(var F in L){var G=L[F];if(I||H.test(G.type)){J.handler=G;J.data=G.data;var E=G.apply(this,arguments);if(E!==p){J.result=E;if(E===false){J.preventDefault();J.stopPropagation();}}if(J.isImmediatePropagationStopped()){break;}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(I){if(I[s]){return I;}var G=I;I=j.Event(G);for(var E=this.props.length,F;E;){F=this.props[--E];I[F]=G[F];}if(!I.target){I.target=I.srcElement||document;}if(I.target.nodeType==3){I.target=I.target.parentNode;}if(!I.relatedTarget&&I.fromElement){I.relatedTarget=I.fromElement==I.target?I.toElement:I.fromElement;}if(I.pageX==null&&I.clientX!=null){var J=document.documentElement,H=document.body;I.pageX=I.clientX+(J&&J.scrollLeft||H&&H.scrollLeft||0)-(J.clientLeft||0);I.pageY=I.clientY+(J&&J.scrollTop||H&&H.scrollTop||0)-(J.clientTop||0);}if(!I.which&&((I.charCode||I.charCode===0)?I.charCode:I.keyCode)){I.which=I.charCode||I.keyCode;}if(!I.metaKey&&I.ctrlKey){I.metaKey=I.ctrlKey;}if(!I.which&&I.button){I.which=(I.button&1?1:(I.button&2?3:(I.button&4?2:0)));}return I;},proxy:function(F,E){E=E||function(){return F.apply(this,arguments);};E.guid=F.guid=F.guid||E.guid||this.guid++;return E;},special:{ready:{setup:h,teardown:function(){}}},specialAll:{live:{setup:function(E,F){j.event.add(this,F[0],D);},teardown:function(E){if(E.length){var F=0,G=RegExp("(^|\\.)"+E[0]+"(\\.|$)");j.each((j.data(this,"events").live||{}),function(){if(G.test(this.type)){F++;}});if(F<1){j.event.remove(this,E[0],D);}}}}}};j.Event=function(E){if(!this.preventDefault){return new j.Event(E);}if(E&&E.type){this.originalEvent=E;this.type=E.type;}else{this.type=E;}this.timeStamp=u();this[s]=true;};function f(){return false;}function t(){return true;}j.Event.prototype={preventDefault:function(){this.isDefaultPrevented=t;var E=this.originalEvent;if(!E){return;}if(E.preventDefault){E.preventDefault();}E.returnValue=false;},stopPropagation:function(){this.isPropagationStopped=t;var E=this.originalEvent;if(!E){return;}if(E.stopPropagation){E.stopPropagation();}E.cancelBubble=true;},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=t;this.stopPropagation();},isDefaultPrevented:f,isPropagationStopped:f,isImmediatePropagationStopped:f};var k=function(G){var F=G.relatedTarget;while(F&&F!=this){try{F=F.parentNode;}catch(E){F=this;}}if(F!=this){G.type=G.data;j.event.handle.apply(this,arguments);}};j.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){j.event.special[E]={setup:function(){j.event.add(this,F,k,E);},teardown:function(){j.event.remove(this,F,k);}};});j.fn.extend({bind:function(G,E,F){return G=="unload"?this.one(G,E,F):this.each(function(){j.event.add(this,G,F||E,F&&E);});},one:function(E,F,H){var G=j.event.proxy(H||F,function(I){j(this).unbind(I,G);return(H||F).apply(this,arguments);});return this.each(function(){j.event.add(this,E,G,H&&F);});},unbind:function(F,E){return this.each(function(){j.event.remove(this,F,E);});},trigger:function(E,F){return this.each(function(){j.event.trigger(E,F,this);});},triggerHandler:function(F,E){if(this[0]){var G=j.Event(F);G.preventDefault();G.stopPropagation();j.event.trigger(G,E,this[0]);return G.result;}},toggle:function(E){var F=arguments,G=1;while(G<F.length){j.event.proxy(E,F[G++]);}return this.click(j.event.proxy(E,function(H){this.lastToggle=(this.lastToggle||0)%G;H.preventDefault();return F[this.lastToggle++].apply(this,arguments)||false;}));},hover:function(E,F){return this.mouseenter(E).mouseleave(F);},ready:function(E){h();if(j.isReady){E.call(document,j);}else{j.readyList.push(E);}return this;},live:function(E,G){var F=j.event.proxy(G);F.guid+=this.selector+E;j(document).bind(d(E,this.selector),this.selector,F);return this;},die:function(F,E){j(document).unbind(d(F,this.selector),E?{guid:E.guid+this.selector+F}:null);return this;}});function D(F){var G=RegExp("(^|\\.)"+F.type+"(\\.|$)"),E=true,H=[];j.each(j.data(this,"events").live||[],function(I,J){if(G.test(J.type)){var K=j(F.target).closest(J.data)[0];if(K){H.push({elem:K,fn:J});}}});H.sort(function(J,I){return j.data(J.elem,"closest")-j.data(I.elem,"closest");});j.each(H,function(){if(this.fn.call(this.elem,F,this.fn.data)===false){return(E=false);}});return E;}function d(F,E){return["live",F,E.replace(/\./g,"`").replace(/ /g,"|")].join(".");}j.extend({isReady:false,readyList:[],ready:function(){if(!j.isReady){j.isReady=true;if(j.readyList){j.each(j.readyList,function(){this.call(document,j);});j.readyList=null;}j(document).triggerHandler("ready");}}});var z=false;function h(){if(z){return;}z=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);j.ready();},false);}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);j.ready();}});if(document.documentElement.doScroll&&g==g.top){(function(){if(j.isReady){return;}try{document.documentElement.doScroll("left");}catch(E){setTimeout(arguments.callee,0);return;}j.ready();})();}}}j.event.add(g,"load",j.ready);}j.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(F,E){j.fn[E]=function(G){return G?this.bind(E,G):this.trigger(E);};});j(g).bind("unload",function(){for(var E in j.cache){if(E!=1&&j.cache[E].handle){j.event.remove(j.cache[E].handle.elem);}}});(function(){j.support={};var H=document.documentElement,G=document.createElement("script"),I=document.createElement("div"),E="script"+(new Date).getTime();I.style.display="none";I.innerHTML='   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var J=I.getElementsByTagName("*"),K=I.getElementsByTagName("a")[0];if(!J||!J.length||!K){return;}j.support={leadingWhitespace:I.firstChild.nodeType==3,tbody:!I.getElementsByTagName("tbody").length,objectAll:!!I.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!I.getElementsByTagName("link").length,style:/red/.test(K.getAttribute("style")),hrefNormalized:K.getAttribute("href")==="/a",opacity:K.style.opacity==="0.5",cssFloat:!!K.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};G.type="text/javascript";try{G.appendChild(document.createTextNode("window."+E+"=1;"));}catch(F){}H.insertBefore(G,H.firstChild);if(g[E]){j.support.scriptEval=true;delete g[E];}H.removeChild(G);if(I.attachEvent&&I.fireEvent){I.attachEvent("onclick",function(){j.support.noCloneEvent=false;I.detachEvent("onclick",arguments.callee);});I.cloneNode(true).fireEvent("onclick");}j(function(){var L=document.createElement("div");L.style.width=L.style.paddingLeft="1px";document.body.appendChild(L);j.boxModel=j.support.boxModel=L.offsetWidth===2;document.body.removeChild(L).style.display="none";});})();var r=j.support.cssFloat?"cssFloat":"styleFloat";j.props={"for":"htmlFor","class":"className","float":r,cssFloat:r,styleFloat:r,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};j.fn.extend({_load:j.fn.load,load:function(G,E,H){if(typeof G!=="string"){return this._load(G);}var F=G.indexOf(" ");if(F>=0){var K=G.slice(F,G.length);G=G.slice(0,F);}var J="GET";if(E){if(j.isFunction(E)){H=E;E=null;}else{if(typeof E==="object"){E=j.param(E);J="POST";}}}var I=this;j.ajax({url:G,type:J,dataType:"html",data:E,complete:function(M,L){if(L=="success"||L=="notmodified"){I.html(K?j("<div/>").append(M.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(K):M.responseText);}if(H){I.each(H,[M.responseText,L,M]);}}});return this;},serialize:function(){return j.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return this.elements?j.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type));}).map(function(F,G){var E=j(this).val();return E==null?null:j.isArray(E)?j.map(E,function(H,I){return{name:G.name,value:H};}):{name:G.name,value:E};}).get();}});j.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){j.fn[F]=function(G){return this.bind(F,G);};});var m=u();j.extend({get:function(G,E,F,H){if(j.isFunction(E)){F=E;E=null;}return j.ajax({type:"GET",url:G,data:E,success:F,dataType:H});},getScript:function(E,F){return j.get(E,null,F,"script");},getJSON:function(F,G,E){return j.get(F,G,E,"json");},post:function(G,E,F,H){if(j.isFunction(E)){F=E;E={};}return j.ajax({type:"POST",url:G,data:E,success:F,dataType:H});},ajaxSetup:function(E){j.extend(j.ajaxSettings,E);},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return g.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(G){G=j.extend(true,G,j.extend(true,{},j.ajaxSettings,G));var P,K=/=\?(&|$)/g,V,O,L=G.type.toUpperCase();if(G.data&&G.processData&&typeof G.data!=="string"){G.data=j.param(G.data);}if(G.dataType=="jsonp"){if(L=="GET"){if(!G.url.match(K)){G.url+=(G.url.match(/\?/)?"&":"?")+(G.jsonp||"callback")+"=?";}}else{if(!G.data||!G.data.match(K)){G.data=(G.data?G.data+"&":"")+(G.jsonp||"callback")+"=?";}}G.dataType="json";}if(G.dataType=="json"&&(G.data&&G.data.match(K)||G.url.match(K))){P="jsonp"+m++;if(G.data){G.data=(G.data+"").replace(K,"="+P+"$1");}G.url=G.url.replace(K,"="+P+"$1");G.dataType="script";g[P]=function(X){O=X;R();F();g[P]=p;try{delete g[P];}catch(Y){}if(Q){Q.removeChild(M);}};}if(G.dataType=="script"&&G.cache==null){G.cache=false;}if(G.cache===false&&L=="GET"){var J=u();var N=G.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+J+"$2");G.url=N+((N==G.url)?(G.url.match(/\?/)?"&":"?")+"_="+J:"");}if(G.data&&L=="GET"){G.url+=(G.url.match(/\?/)?"&":"?")+G.data;G.data=null;}if(G.global&&!j.active++){j.event.trigger("ajaxStart");}var U=/^(\w+:)?\/\/([^\/?#]+)/.exec(G.url);if(G.dataType=="script"&&L=="GET"&&U&&(U[1]&&U[1]!=location.protocol||U[2]!=location.host)){var Q=document.getElementsByTagName("head")[0];var M=document.createElement("script");M.src=G.url;if(G.scriptCharset){M.charset=G.scriptCharset;}if(!P){var I=false;M.onload=M.onreadystatechange=function(){if(!I&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){I=true;R();F();M.onload=M.onreadystatechange=null;Q.removeChild(M);}};}Q.appendChild(M);return p;}var E=false;var S=G.xhr();if(G.username){S.open(L,G.url,G.async,G.username,G.password);}else{S.open(L,G.url,G.async);}try{if(G.data){S.setRequestHeader("Content-Type",G.contentType);}if(G.ifModified){S.setRequestHeader("If-Modified-Since",j.lastModified[G.url]||"Thu, 01 Jan 1970 00:00:00 GMT");}S.setRequestHeader("X-Requested-With","XMLHttpRequest");S.setRequestHeader("Accept",G.dataType&&G.accepts[G.dataType]?G.accepts[G.dataType]+", */*":G.accepts._default);}catch(W){}if(G.beforeSend&&G.beforeSend(S,G)===false){if(G.global&&!--j.active){j.event.trigger("ajaxStop");}S.abort();return false;}if(G.global){j.event.trigger("ajaxSend",[S,G]);}var H=function(Y){if(S.readyState==0){if(T){clearInterval(T);T=null;if(G.global&&!--j.active){j.event.trigger("ajaxStop");}}}else{if(!E&&S&&(S.readyState==4||Y=="timeout")){E=true;if(T){clearInterval(T);T=null;}V=Y=="timeout"?"timeout":!j.httpSuccess(S)?"error":G.ifModified&&j.httpNotModified(S,G.url)?"notmodified":"success";if(V=="success"){try{O=j.httpData(S,G.dataType,G);}catch(X){V="parsererror";}}if(V=="success"){var Z;try{Z=S.getResponseHeader("Last-Modified");}catch(X){}if(G.ifModified&&Z){j.lastModified[G.url]=Z;}if(!P){R();}}else{j.handleError(G,S,V);}F();if(Y){S.abort();}if(G.async){S=null;}}}};if(G.async){var T=setInterval(H,13);if(G.timeout>0){setTimeout(function(){if(S&&!E){H("timeout");}},G.timeout);}}try{S.send(G.data);}catch(W){j.handleError(G,S,null,W);}if(!G.async){H();}function R(){if(G.success){G.success(O,V);}if(G.global){j.event.trigger("ajaxSuccess",[S,G]);}}function F(){if(G.complete){G.complete(S,V);}if(G.global){j.event.trigger("ajaxComplete",[S,G]);}if(G.global&&!--j.active){j.event.trigger("ajaxStop");}}return S;},handleError:function(H,F,G,E){if(H.error){H.error(F,G,E);}if(H.global){j.event.trigger("ajaxError",[F,H,E]);}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223;}catch(E){}return false;},httpNotModified:function(E,G){try{var F=E.getResponseHeader("Last-Modified");return E.status==304||F==j.lastModified[G];}catch(H){}return false;},httpData:function(F,I,G){var E=F.getResponseHeader("content-type"),H=I=="xml"||!I&&E&&E.indexOf("xml")>=0,J=H?F.responseXML:F.responseText;if(H&&J.documentElement.tagName=="parsererror"){throw"parsererror";}if(G&&G.dataFilter){J=G.dataFilter(J,I);}if(typeof J==="string"){if(I=="script"){j.globalEval(J);}if(I=="json"){J=g["eval"]("("+J+")");}}return J;},param:function(G){var E=[];function F(I,J){E[E.length]=encodeURIComponent(I)+"="+encodeURIComponent(J);}if(j.isArray(G)||G.jquery){j.each(G,function(){F(this.name,this.value);});}else{for(var H in G){if(j.isArray(G[H])){j.each(G[H],function(){F(H,this);});}else{F(H,j.isFunction(G[H])?G[H]():G[H]);}}}return E.join("&").replace(/%20/g,"+");}});var v={},i,c=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function o(G,F){var E={};j.each(c.concat.apply([],c.slice(0,F)),function(){E[this]=G;});return E;}j.fn.extend({show:function(I,K){if(I){return this.animate(o("show",3),I,K);}else{for(var G=0,E=this.length;G<E;G++){var L=j.data(this[G],"olddisplay");this[G].style.display=L||"";if(j.css(this[G],"display")==="none"){var F=this[G].tagName,J;if(v[F]){J=v[F];}else{var H=j("<"+F+" />").appendTo("body");J=H.css("display");if(J==="none"){J="block";}H.remove();v[F]=J;}j.data(this[G],"olddisplay",J);}}for(var G=0,E=this.length;G<E;G++){this[G].style.display=j.data(this[G],"olddisplay")||"";}return this;}},hide:function(G,H){if(G){return this.animate(o("hide",3),G,H);}else{for(var F=0,E=this.length;F<E;F++){var I=j.data(this[F],"olddisplay");if(!I&&I!=="none"){j.data(this[F],"olddisplay",j.css(this[F],"display"));}}for(var F=0,E=this.length;F<E;F++){this[F].style.display="none";}return this;}},_toggle:j.fn.toggle,toggle:function(E,G){var F=typeof E==="boolean";return j.isFunction(E)&&j.isFunction(G)?this._toggle.apply(this,arguments):E==null||F?this.each(function(){var H=F?E:j(this).is(":hidden");j(this)[H?"show":"hide"]();}):this.animate(o("toggle",3),E,G);},fadeTo:function(F,E,G){return this.animate({opacity:E},F,G);},animate:function(H,E,G,F){var I=j.speed(E,G,F);return this[I.queue===false?"each":"queue"](function(){var M=j.extend({},I),K,J=this.nodeType==1&&j(this).is(":hidden"),L=this;for(K in H){if(H[K]=="hide"&&J||H[K]=="show"&&!J){return M.complete.call(this);}if((K=="height"||K=="width")&&this.style){M.display=j.css(this,"display");M.overflow=this.style.overflow;}}if(M.overflow!=null){this.style.overflow="hidden";}M.curAnim=j.extend({},H);j.each(H,function(Q,P){var T=new j.fx(L,M,Q);if(/toggle|show|hide/.test(P)){T[P=="toggle"?J?"show":"hide":P](H);}else{var S=P.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),O=T.cur(true)||0;if(S){var R=parseFloat(S[2]),N=S[3]||"px";if(N!="px"){L.style[Q]=(R||1)+N;O=((R||1)/T.cur(true))*O;L.style[Q]=O+N;}if(S[1]){R=((S[1]=="-="?-1:1)*R)+O;}T.custom(O,R,N);}else{T.custom(O,P,"");}}});return true;});},stop:function(G,F){var E=j.timers;if(G){this.queue([]);}this.each(function(){for(var H=E.length-1;H>=0;H--){if(E[H].elem==this){if(F){E[H](true);}E.splice(H,1);}}});if(!F){this.dequeue();}return this;}});j.each({slideDown:o("show",1),slideUp:o("hide",1),slideToggle:o("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){j.fn[E]=function(G,H){return this.animate(F,G,H);};});j.extend({speed:function(E,F,H){var G=typeof E==="object"?E:{complete:H||!H&&F||j.isFunction(E)&&E,duration:E,easing:H&&F||F&&!j.isFunction(F)&&F};G.duration=j.fx.off?0:typeof G.duration==="number"?G.duration:j.fx.speeds[G.duration]||j.fx.speeds._default;G.old=G.complete;G.complete=function(){if(G.queue!==false){j(this).dequeue();}if(j.isFunction(G.old)){G.old.call(this);}};return G;},easing:{linear:function(E,F,G,H){return G+H*E;},swing:function(E,F,G,H){return((-Math.cos(E*Math.PI)/2)+0.5)*H+G;}},timers:[],fx:function(G,F,E){this.options=F;this.elem=G;this.prop=E;if(!F.orig){F.orig={};}}});j.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this);}(j.fx.step[this.prop]||j.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block";}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop];}var E=parseFloat(j.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(j.curCSS(this.elem,this.prop))||0;},custom:function(H,G,F){this.startTime=u();this.start=H;this.end=G;this.unit=F||this.unit||"px";this.now=this.start;this.pos=this.state=0;var I=this;function E(J){return I.step(J);}E.elem=this.elem;if(E()&&j.timers.push(E)&&!i){i=setInterval(function(){var K=j.timers;for(var J=0;J<K.length;J++){if(!K[J]()){K.splice(J--,1);}}if(!K.length){clearInterval(i);i=p;}},13);}},show:function(){this.options.orig[this.prop]=j.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());j(this.elem).show();},hide:function(){this.options.orig[this.prop]=j.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0);},step:function(I){var G=u();if(I||G>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var F=true;for(var E in this.options.curAnim){if(this.options.curAnim[E]!==true){F=false;}}if(F){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(j.css(this.elem,"display")=="none"){this.elem.style.display="block";}}if(this.options.hide){j(this.elem).hide();}if(this.options.hide||this.options.show){for(var J in this.options.curAnim){j.attr(this.elem.style,J,this.options.orig[J]);}}this.options.complete.call(this.elem);}return false;}else{var H=G-this.startTime;this.state=H/this.options.duration;this.pos=j.easing[this.options.easing||(j.easing.swing?"swing":"linear")](this.state,H,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update();}return true;}};j.extend(j.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){j.attr(E.elem.style,"opacity",E.now);},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit;}else{E.elem[E.prop]=E.now;}}}});if(document.documentElement.getBoundingClientRect){j.fn.offset=function(){if(!this[0]){return{top:0,left:0};}if(this[0]===this[0].ownerDocument.body){return j.offset.bodyOffset(this[0]);}var F=this[0].getBoundingClientRect(),I=this[0].ownerDocument,E=I.body,L=I.documentElement,K=L.clientTop||E.clientTop||0,J=L.clientLeft||E.clientLeft||0,H=F.top+(self.pageYOffset||j.boxModel&&L.scrollTop||E.scrollTop)-K,G=F.left+(self.pageXOffset||j.boxModel&&L.scrollLeft||E.scrollLeft)-J;return{top:H,left:G};};}else{j.fn.offset=function(){if(!this[0]){return{top:0,left:0};}if(this[0]===this[0].ownerDocument.body){return j.offset.bodyOffset(this[0]);}j.offset.initialized||j.offset.initialize();var I=this[0],F=I.offsetParent,E=I,N=I.ownerDocument,L,G=N.documentElement,J=N.body,K=N.defaultView,O=K.getComputedStyle(I,null),M=I.offsetTop,H=I.offsetLeft;while((I=I.parentNode)&&I!==J&&I!==G){L=K.getComputedStyle(I,null);M-=I.scrollTop,H-=I.scrollLeft;if(I===F){M+=I.offsetTop,H+=I.offsetLeft;if(j.offset.doesNotAddBorder&&!(j.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(I.tagName))){M+=parseInt(L.borderTopWidth,10)||0,H+=parseInt(L.borderLeftWidth,10)||0;}E=F,F=I.offsetParent;}if(j.offset.subtractsBorderForOverflowNotVisible&&L.overflow!=="visible"){M+=parseInt(L.borderTopWidth,10)||0,H+=parseInt(L.borderLeftWidth,10)||0;}O=L;}if(O.position==="relative"||O.position==="static"){M+=J.offsetTop,H+=J.offsetLeft;}if(O.position==="fixed"){M+=Math.max(G.scrollTop,J.scrollTop),H+=Math.max(G.scrollLeft,J.scrollLeft);}return{top:M,left:H};};}j.offset={initialize:function(){if(this.initialized){return;}var K=document.body,E=document.createElement("div"),G,F,M,H,L,N,I=K.style.marginTop,J='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';L={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(N in L){E.style[N]=L[N];}E.innerHTML=J;K.insertBefore(E,K.firstChild);G=E.firstChild,F=G.firstChild,H=G.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(F.offsetTop!==5);this.doesAddBorderForTableAndCells=(H.offsetTop===5);G.style.overflow="hidden",G.style.position="relative";this.subtractsBorderForOverflowNotVisible=(F.offsetTop===-5);K.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(K.offsetTop===0);K.style.marginTop=I;K.removeChild(E);this.initialized=true;},bodyOffset:function(F){j.offset.initialized||j.offset.initialize();var E=F.offsetTop,G=F.offsetLeft;if(j.offset.doesNotIncludeMarginInBodyOffset){E+=parseInt(j.curCSS(F,"marginTop",true),10)||0,G+=parseInt(j.curCSS(F,"marginLeft",true),10)||0;}return{top:E,left:G};}};j.fn.extend({position:function(){var J=0,I=0,G;if(this[0]){var E=this.offsetParent(),F=this.offset(),H=/^body|html$/i.test(E[0].tagName)?{top:0,left:0}:E.offset();F.top-=e(this,"marginTop");F.left-=e(this,"marginLeft");H.top+=e(E,"borderTopWidth");H.left+=e(E,"borderLeftWidth");G={top:F.top-H.top,left:F.left-H.left};}return G;},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&j.css(E,"position")=="static")){E=E.offsetParent;}return j(E);}});j.each(["Left","Top"],function(G,F){var E="scroll"+F;j.fn[E]=function(H){if(!this[0]){return null;}return H!==p?this.each(function(){this==g||this==document?g.scrollTo(!G?H:j(g).scrollLeft(),G?H:j(g).scrollTop()):this[E]=H;}):this[0]==g||this[0]==document?self[G?"pageYOffset":"pageXOffset"]||j.boxModel&&document.documentElement[E]||document.body[E]:this[0][E];};});j.each(["Height","Width"],function(J,G){var F=J?"Left":"Top",I=J?"Right":"Bottom",E=G.toLowerCase();j.fn["inner"+G]=function(){return this[0]?j.css(this[0],E,false,"padding"):null;};j.fn["outer"+G]=function(K){return this[0]?j.css(this[0],E,false,K?"margin":"border"):null;};var H=G.toLowerCase();j.fn[H]=function(K){return this[0]==g?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===p?(this.length?j.css(this[0],H):null):this.css(H,typeof K==="string"?K:K+"px");};});})();Function.prototype.bind=function(){var D=this,F=Array.from(arguments),E=F.shift();return function(){if(typeof Array.from=="function"){return D.apply(E,F.concat(Array.from(arguments)));}};};Function.prototype.bindAsEventListener=function(E){var D=this,F=Array.from(arguments),E=F.shift();return function(A){if(typeof Array.from=="function"){return D.apply(E,[A||window.event].concat(F));}};};var Class={create:function(){return function(){this.initialize.apply(this,arguments);};}};Object.extend=function(D,F){for(var E in F){D[E]=F[E];}return D;};Object.clone=function(F){var D;if(Object.isNull(F)){return null;}if(F.constructor==Object){D=new F.constructor();}else{D=new F.constructor(F.valueOf());}for(var E in F){if(D[E]!=F[E]){if(typeof(F[E])=="object"){D[E]=Object.clone(F[E]);}else{D[E]=F[E];}}}D.toString=F.toString;D.valueOf=F.valueOf;return D;};Object.isNull=function(B){return typeof(B)=="undefined"||B==null;};Array.from=function(H){if(!H){return[];}if(H.toArray){return H.toArray();}else{var G=[];for(var F=0,E=H.length;F<E;F++){G.push(H[F]);}return G;}};Object.extend(String,{interpret:function(B){return B==null?"":String(B);},specialChar:{"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\\":"\\\\"}});Object.extend(String.prototype,{trim:function(){return this.replace(/(^[\s　]*)|([\s　]*$)/g,"");},lTrim:function(){return this.replace(/(^[\s　]*)/g,"");},rTrim:function(){return this.replace(/([\s　]*$)/g,"");},bytelength:function(){var B=this.match(/[^\x00-\xff]/ig);return this.length+(B==null?0:B.length);},cut:function(B){if(B>this.length){return this;}return this.substring(0,B);},formatWithWBR:function(){var P=arguments,M=10;if(P.length>0){var N=parseInt(P[0]);if(!isNaN(N)&&N>0){M=N;}}var O=this,K=[],Q=0,L=0,S;for(var T=1,R=O.length;T<R;T++){S=O.charAt(T);if(/\s/.test(S)){L=T;}else{if((T-L)==M){K.push(O.substring(Q,T));K.push("<wbr>");Q=L=T;}}}K.push(O.substr(Q));return K.join("");},gsub:function(G,I){var F="",J=this,H;I=arguments.callee.prepareReplacement(I);while(J.length>0){if(H=J.match(G)){F+=J.slice(0,H.index);F+=String.interpret(I(H));J=J.slice(H.index+H[0].length);}else{F+=J,J="";}}return F;},sub:function(E,F,D){F=this.gsub.prepareReplacement(F);D=D===undefined?1:D;return this.gsub(E,function(A){if(--D<0){return A[0];}return F(A);});},scan:function(D,C){this.gsub(D,C);return this;},truncate:function(D,C){D=D||30;C=C===undefined?"...":C;return this.length>D?this.slice(0,D-C.length)+C:this;},strip:function(){return this.replace(/^\s+/,"").replace(/\s+$/,"");},stripTags:function(){return this.replace(/<\/?[^>]+>/gi,"");},stripScripts:function(){return this.replace(new RegExp(Prototype.ScriptFragment,"img"),"");},extractScripts:function(){var C=new RegExp(Prototype.ScriptFragment,"img");var D=new RegExp(Prototype.ScriptFragment,"im");return(this.match(C)||[]).map(function(A){return(A.match(D)||["",""])[1];});},evalScripts:function(){return this.extractScripts().map(function(script){return eval(script);});},escapeHTML:function(){var B=arguments.callee;B.text.data=this;return B.div.innerHTML;},unescapeHTML:function(){var B=document.createElement("div");B.innerHTML=this.stripTags();return B.childNodes[0]?(B.childNodes.length>1?$A(B.childNodes).inject("",function(A,D){return A+D.nodeValue;}):B.childNodes[0].nodeValue):"";},toQueryParams:function(C){var D=this.strip().match(/([^?#]*)(#.*)?$/);if(!D){return{};}return D[1].split(C||"&").inject({},function(B,A){if((A=A.split("="))[0]){var G=decodeURIComponent(A.shift());var H=A.length>1?A.join("="):A[0];if(H!=undefined){H=decodeURIComponent(H);}if(G in B){if(B[G].constructor!=Array){B[G]=[B[G]];}B[G].push(H);}else{B[G]=H;}}return B;});},toArray:function(){return this.split("");},succ:function(){return this.slice(0,this.length-1)+String.fromCharCode(this.charCodeAt(this.length-1)+1);},times:function(D){var E="";for(var F=0;F<D;F++){E+=this;}return E;},camelize:function(){var G=this.split("-"),E=G.length;if(E==1){return G[0];}var H=this.charAt(0)=="-"?G[0].charAt(0).toUpperCase()+G[0].substring(1):G[0];for(var F=1;F<E;F++){H+=G[F].charAt(0).toUpperCase()+G[F].substring(1);}return H;},capitalize:function(){return this.charAt(0).toUpperCase()+this.substring(1).toLowerCase();},underscore:function(){return this.gsub(/::/,"/").gsub(/([A-Z]+)([A-Z][a-z])/,"#{1}_#{2}").gsub(/([a-z\d])([A-Z])/,"#{1}_#{2}").gsub(/-/,"_").toLowerCase();},dasherize:function(){return this.gsub(/_/,"-");},inspect:function(C){var D=this.gsub(/[\x00-\x1f\\]/,function(A){var B=String.specialChar[A[0]];return B?B:"\\u00"+A[0].charCodeAt().toPaddedString(2,16);});if(C){return'"'+D.replace(/"/g,'\\"')+'"';}return"'"+D.replace(/'/g,"\\'")+"'";},toJSON:function(){return this.inspect(true);},unfilterJSON:function(B){return this.sub(B||Prototype.JSONFilter,"#{1}");},isJSON:function(){var B=this.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,"");return(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(B);},evalJSON:function(sanitize){var json=this.unfilterJSON();try{if(!sanitize||json.isJSON()){return eval("("+json+")");}}catch(e){}throw new SyntaxError("Badly formed JSON string: "+this.inspect());},include:function(B){return this.indexOf(B)>-1;},startsWith:function(B){return this.indexOf(B)===0;},endsWith:function(C){var D=this.length-C.length;return D>=0&&this.lastIndexOf(C)===D;},empty:function(){return this.trim()=="";},blank:function(){return/^\s*$/.test(this);}});String.isNullOrEmpty=function(B){return B==undefined||B==null||B.empty();};String.format=function(){var H=arguments,J=H.length;if(J==0){return"";}if(J==1){return H[0];}var I=/{(\d+)?}/g,G,F;if(H[1] instanceof Array){G=H[1];F=H[0].replace(I,function(A,B){return G[parseInt(B)];});}else{G=H;F=H[0].replace(I,function(A,B){return G[parseInt(B)+1];});}return F;};String.prototype.gsub.prepareReplacement=function(D){if(typeof D=="function"){return D;}var C=new Template(D);return function(A){return C.evaluate(A);};};var Template=Class.create();Template.Pattern=/(^|.|\r|\n)(#\{(.*?)\})/;Template.prototype={initialize:function(C,D){this.template=C.toString();this.pattern=D||Template.Pattern;},eval:function(B){return this.template.gsub(this.pattern,function(D){var A=D[1];if(A=="\\"){return D[2];}return A+String.interpret(B[D[3]]);});}};function StringBuilder(){this.strings=[];}StringBuilder.prototype.append=function(B){this.strings.push(B);};StringBuilder.prototype.toString=function(){if(arguments.length==0){return this.strings.join("");}else{return this.strings.join(arguments[0]);}};StringBuilder.prototype.clear=function(){this.strings.clear();};StringBuilder.prototype.backspace=function(){this.strings.pop();};if(!window.Event){var Event=new Object();}Object.extend(Event,{KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,KEY_HOME:36,KEY_END:35,KEY_PAGEUP:33,KEY_PAGEDOWN:34,element:function(B){return $(B.target||B.srcElement);},isLeftClick:function(B){return(((B.which)&&(B.which==1))||((B.button)&&(B.button==1)));},pointerX:function(B){return B.pageX||(B.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft));},pointerY:function(B){return B.pageY||(B.clientY+(document.documentElement.scrollTop||document.body.scrollTop));},stop:function(B){if(B.preventDefault){B.preventDefault();B.stopPropagation();}else{B.returnValue=false;B.cancelBubble=true;}},findElement:function(D,F){var E=Event.element(D);while(E.parentNode&&(!E.tagName||(E.tagName.toUpperCase()!=F.toUpperCase()))){E=E.parentNode;}return E;},observers:false,_observeAndCache:function(H,E,F,G){if(!this.observers){this.observers=[];}if(H.addEventListener){this.observers.push([H,E,F,G]);H.addEventListener(E,F,G);}else{if(H.attachEvent){this.observers.push([H,E,F,G]);H.attachEvent("on"+E,F);}}},unloadCache:function(){if(!Event.observers){return;}for(var C=0,D=Event.observers.length;C<D;C++){Event.stopObserving.apply(this,Event.observers[C]);Event.observers[C][0]=null;}Event.observers=false;},observe:function(H,E,F,G){H=$(H);G=G||false;if(E=="keypress"&&(Prototype.Browser.WebKit||H.attachEvent)){E="keydown";}Event._observeAndCache(H,E,F,G);},stopObserving:function(I,F,G,H){I=$(I);H=H||false;if(F=="keypress"&&(Prototype.Browser.WebKit||I.attachEvent)){F="keydown";}if(I.removeEventListener){I.removeEventListener(F,G,H);}else{if(I.detachEvent){try{I.detachEvent("on"+F,G);}catch(J){}}}}});var Globals={ScriptContentFragment:"<script.*?>((\n|\r|.)*?)</script>",ScriptSrcFragment:'<script.*?src="([?=/.A-Za-z0-9_]*)".*?></script>',StyleContentFragment:"<style.*?>((\n|\r|.)*?)</style>",StyleHrefFragment:'<link.*?href="([/.A-Za-z0-9_]*)".*?></link>',addIE6Filter:function(width,height,left,top){if($.browser.msie&&$.browser.version<7){var filterTemplate=new Template('<iframe style="position: absolute; z-index: 1; width:#{width}px;height:#{height}px; top: #{top}px; left: #{left}px;border:0px solid #000;filter:alpha(opacity=0);-moz-opacity:0"></iframe>');return $(filterTemplate.eval({width:width+2,height:height+2,left:left,top:top})).appendTo($("#m_contentend"));}},closeIE6Fliter:function(B){if(!Object.isNull(B)){B.remove();B=null;}},registerSelectFixIE:function(I){if(!$.browser.msie){return;}var H=function(D){var M=Event.element(D);var A=M.data("isOpen");if(!Object.isNull(A)||A){return;}M.data("isOpen",true);var N=M.position();var C=M.width();var E=M.data("clone");if(E==null){E=$("<select style='visibility:hidden'></select>").insertBefore(M);E.addClass(M[0].className);M.data("clone",E);}M.css("width","auto");var B=M.width();if(C>=B){M.css("width",C);}M.css("top",N.top+"px");M.css("left",N.left+"px");M.css("position","absolute");M.css("z-index","1000");};var F=function(B){var C=Event.element(B);var A=C.data("isOpen");if(A){var D=C.data("clone");C.css("position","");C.css("width",D.css("width"));C.css("top","");C.css("left","");C.css("z-index",D.css("z-index"));C.data("isOpen",null);C.data("clone",null);D.remove();}};for(var J=0;J<arguments.length;J++){var G=arguments[J];G.bind("mousedown",function(A){H(A);});G.bind("blur",function(A){F(A);});G.bind("change",function(A){F(A);});}},getScrollPosition:function(){var B={x:0,y:0};if(typeof(window.pageYOffset)=="number"){B.x=window.pageXOffset;B.y=window.pageYOffset;}else{if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){B.x=document.body.scrollLeft;B.y=document.body.scrollTop;}else{if(document.documentElement){B.x=document.documentElement.scrollLeft;B.y=document.documentElement.scrollTop;}}}return B;},browserDimensions:function(){var B={width:0,height:0};if($.browser.msie){B.height=document.documentElement.clientHeight;B.width=document.documentElement.clientWidth;}else{B.height=window.innerHeight;B.width=document.width||document.body.offsetWidth;}return B;},getParam:function(D){var C=this._getParams();if(Object.isNull(C)){return"";}return C[D];},_getParams:function(){var H={};var G=document.location.search.substr(1).split("&");if(String.isNullOrEmpty(G)){return null;}for(var K=0,L=G.length;K<L;K++){try{var I=G[K].split("=");if(I.length<2){continue;}H[I[0]]=I[1].Trim();}catch(J){}}return H;},copyToClipboard:function(O){if(window.clipboardData){window.clipboardData.clearData();window.clipboardData.setData("Text",O);}else{if($.browser.opera){window.location=O;}else{if($.browser.mozilla){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");}catch(K){alert("你的firefox安全限制限制您进行剪贴板操作，请在地址栏输入: about:config 将signed.applets.codebase_principal_support设置为true之后重试");return false;}var I=Components.classes["@mozilla.org/widget/clipboard;1"].createInstance(Components.interfaces.nsIClipboard);if(!I){return false;}var L=Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable);if(!L){return false;}L.addDataFlavor("text/unicode");var M={};var N=Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);var P=O;N.data=P;L.setTransferData("text/unicode",N,P.length*2);var J=Components.interfaces.nsIClipboard;if(!I){return false;}I.setData(L,null,J.kGlobalClipboard);}}}return true;},hideSelect:function(){if($.browser.msie){var E=document.getElementsByTagName("SELECT");for(var F=0,D=E.length;F<D;F++){E[F].style.visibility="hidden";}}},showSelect:function(){if($.browser.msie){var E=document.getElementsByTagName("SELECT");for(var F=0,D=E.length;F<D;F++){E[F].style.visibility="visible";}}},loadScript:function(I,J){if(arguments.length<=1){J=true;}var G=document.getElementsByTagName("head")[0];var K=false;var L=document.createElement("script");if(J){L.type="text/javascript";L.src=I;I=L.src;var H=jQuery("script[src='"+I+"']",G);if(H&&H.size()>0){K=true;}}if(!K){G.appendChild(L);}else{L=null;}},loadCss:function(J,K){if(arguments.length<=1){K=true;}var G=document.getElementsByTagName("head")[0];var L=false;if(K){var H=jQuery("link[href='"+J+"']",G);if(H&&H.size()>0){L=true;}}if(!L){var I=document.createElement("link");I.type="text/css";I.rel="stylesheet";I.href=J;G.appendChild(I);}},cookie:function(o,V,e,p){if(typeof e!="undefined"){p=p||{};if(e===null){e="";p.expires=-1;}var l="";if(p.expires&&(typeof p.expires=="number"||p.expires.toUTCString)){var X;if(typeof p.expires=="number"){X=new Date();X.setTime(X.getTime()+(p.expires*24*60*60*1000));}else{X=p.expires;}l="; expires="+X.toUTCString();}var k=window.location.host.split(".");var W=k.length>=2?String.format(";domain={0}.{1}",k[k.length-2],k[k.length-1]):"";var j=p.path?"; path="+(p.path):";path=/";var a=p.domain?"; domain="+(p.domain):W;var Y=p.secure?"; secure":"";if(typeof e=="object"){var b=0;var m="";for(var d in e){if(b>0){m+="&";}m+=d+"="+encodeURIComponent(e[d]);b++;}e=m;}else{e=encodeURIComponent(e);}document.cookie=[o,"=",e,l,j,a,Y].join("");}else{var n=null;if(document.cookie&&document.cookie!=""){var Z=document.cookie.split(";");for(var c=0;c<Z.length;c++){var h=jQuery.trim(Z[c]);if(h.substring(0,o.length+1)==(o+"=")){n=decodeURIComponent(h.substring(o.length+1));if(typeof V!="undefined"&&V!=null&&V!=""){var i=n.toString().split("&");for(var g=0;g<i.length;g++){var f=jQuery.trim(i[g]);if(f.substring(0,V.length+1)==(V+"=")){n=decodeURIComponent(f.substring(V.length+1));break;}}}break;}}}return n;}},searchObj:function(patternField,patternValue,searchData){var result=[];if(searchData){for(var i=0;i<searchData.length;i++){var tempValue=null;eval("tempValue = searchData[i]."+patternField);if(tempValue!=null&&tempValue.toLowerCase()==patternValue.toLowerCase()){result.push(searchData[i]);continue;}}}else{alert("Globals.searchObj方法没有检测到数据源参数：searchObj");}return result;}};(function($){function toIntegersAtLease(n){return n<10?"0"+n:n;}Date.prototype.toJSON=function(date){return this.getUTCFullYear()+"-"+toIntegersAtLease(this.getUTCMonth())+"-"+toIntegersAtLease(this.getUTCDate());};var escapeable=/["\\\x00-\x1f\x7f-\x9f]/g;var meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};$.quoteString=function(string){if(escapeable.test(string)){return'"'+string.replace(escapeable,function(a){var c=meta[a];if(typeof c==="string"){return c;}c=a.charCodeAt();return"\\u00"+Math.floor(c/16).toString(16)+(c%16).toString(16);})+'"';}return'"'+string+'"';};$.toJSON=function(o,compact){var type=typeof(o);if(type=="undefined"){return"undefined";}else{if(type=="number"||type=="boolean"){return o+"";}else{if(o===null){return"null";}}}if(type=="string"){return $.quoteString(o);}if(type=="object"&&typeof o.toJSON=="function"){return o.toJSON(compact);}if(type!="function"&&typeof(o.length)=="number"){var ret=[];for(var i=0;i<o.length;i++){ret.push($.toJSON(o[i],compact));}if(compact){return"["+ret.join(",")+"]";}else{return"["+ret.join(", ")+"]";}}if(type=="function"){throw new TypeError("Unable to convert object of type 'function' to json.");}var ret=[];for(var k in o){var name;type=typeof(k);if(type=="number"){name='"'+k+'"';}else{if(type=="string"){name=$.quoteString(k);}else{continue;}}var val=$.toJSON(o[k],compact);if(typeof(val)!="string"){continue;}if(compact){ret.push(name+":"+val);}else{ret.push(name+": "+val);}}return"{"+ret.join(", ")+"}";};$.compactJSON=function(o){return $.toJSON(o,true);};$.evalJSON=function(src){return eval("("+src+")");};$.secureEvalJSON=function(src){var filtered=src;filtered=filtered.replace(/\\["\\\/bfnrtu]/g,"@");filtered=filtered.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]");filtered=filtered.replace(/(?:^|:|,)(?:\s*\[)+/g,"");if(/^[\],:{}\s]*$/.test(filtered)){return eval("("+src+")");}else{throw new SyntaxError("Error parsing JSON, source is not valid.");}};})(Globals);FunctionExt={createCallback:function(F){var E=arguments;var D=F;return function(){return D.apply(window,E);};},createDelegate:function(H,J,G,I){var F=H;return function(){var B=G||arguments;if(I===true){B=Array.prototype.slice.call(arguments,0);B=B.concat(G);}else{if(typeof I=="number"){B=Array.prototype.slice.call(arguments,0);var A=[I,0].concat(G);Array.prototype.splice.apply(B,A);}}return F.apply(J||window,B);};},defer:function(I,K,L,H,J){var G=this.createDelegate(I,L,H,J);if(K){return setTimeout(G,K);}G();return 0;}};var elongAjax={requestQueue:[],callBack:function(J,N,R,Q,L,P,M){N=this.buildArgObject(Object.clone(N));var O=true;if(!R||R==null){O=false;}if(O){var K={args:N,url:J,clientCallBack:R,submitButton:P,method:L,dequeue:this.dequeue.bind(this)};if(this.inQueue(K)){return;}this.requestQueue.push(K);}jQuery.ajax({type:Object.isNull(L)?"GET":L,url:J,cache:Object.isNull(Q)?false:Q,data:N,requestObj:K,error:this.onError,success:this.onSuccess,complete:this.onComplete,dataType:Object.isNull(M)?"json":M,timeout:60000});},buildArgObject:function(L,G,K){if(G==null){G=L;}if(K==null){K="";}for(var I in L){if($.isFunction(L[I])){L[I]=null;delete L[I];break;}if($.isArray(L[I])){for(var J=0;J<L[I].length;J++){if(typeof(L[I][J])=="object"){this.buildArgObject(L[I][J],G,K+I+"["+J+"].");}else{var H=K+I+"["+J+"]";G[H]=L[I][J];}}L[I]=null;delete L[I];}else{if(typeof(L[I])=="object"){this.buildArgObject(L[I],G,K+I+".");L[I]=null;delete L[I];}else{var H=isNaN(parseInt(I,10))?K+I:K.substr(0,K.length-1);G[H]=L[I];}}}return L;},toQueryString:function(G){var J="";if(G){var H=[];for(var I=0,F=G.length;I<F;I++){H.push("&Ajax_CallBackArgument");H.push(I);H.push("=");H.push(encodeURIComponent(G[I]));}J=H.join("");}return J;},inQueue:function(J){if(this.requestQueue.length>0){var I=this.requestQueue,G=null;for(var H=0,F=I.length;H<F;H++){G=I[H];if(G==J){return true;}else{if(this.equal(G,J)){return true;}}}return false;}},dequeue:function(L){if(this.requestQueue.length>0){var J=this.requestQueue,H=null,K=-1;for(var I=0,G=J.length;I<G;I++){H=J[I];if(H==L){K=I;break;}else{if(this.equal(H,L)){K=I;break;}}}if(K>=0){J.splice(K,1);}}},equal:function(C,D){if(C.url==D.url&&C.args==D.args){return true;}return false;},onError:function(E,D,F){FunctionExt.defer(this.requestObj.clientCallBack,1,null,[{success:false,status:D,value:E.responseText}]);},onSuccess:function(D,C){FunctionExt.defer(this.requestObj.clientCallBack,1,null,[D]);},onComplete:function(D,C){this.requestObj.dequeue(this.requestObj);this.requestObj=null;delete this.requestObj;},addOverlay:function(G){if(Object.isNull(G)){return;}var J=new Date().getTime();var I="submitOverlay_"+J;var F=G.parentNode;var H=Element.extend(document.createElement("div"));H.id=I;H.className="submiting";$("contentEnd").appendChild(H);Position.clone(G,H);G._overlay=H;},removeOverlay:function(B){if(typeof B==="undefined"||B===null){return;}if(B._overlay){$("contentEnd").removeChild(B._overlay);B._overlay=null;}}};function $ready(B){if(!Object.isNull(B)){B();}}var Elong={version:"0.1",author:"zhi.luo",renderAds:function(){var N=$("#m_adsContainer");if(N.length==0){return;}var L=/<script.*>(.|\n)*<\/script>/i;for(var H=0;H<N.children().length;H++){var K=N.children().eq(H);var I=K.attr("name");if(String.isNullOrEmpty(I)||$("#"+I).length==0){continue;}var J=K.html();K.find(":descendant").each(function(){if(!$(this).is("script")){$(this).remove();}});var M=J.replace(L,"");if(String.isNullOrEmpty(M)){$("#"+I).hide();}else{$("#"+I).html(M);}}},login:function(uid,pwd,vcode,callback,cardno,isEn){var params={action:String.isNullOrEmpty(cardno)?"login":"cardLogin",loginname:uid,pwd:pwd,vcode:vcode,cardno:cardno};var host="www.elong.com";var arr=window.location.host.split(".");if(arr.length>=2){host=String.format("www.{0}.{1}",arr[arr.length-2],arr[arr.length-1]);}elongAjax.callBack(String.format("http://{0}/myelong/ajaxproxy/UserLoginProxy.aspx",host),params,function(res){if(res.MemberLoginCode==102&&!Object.isNull(res.CardNoList)&&res.CardNoList.length>0){var sb=new StringBuilder();var temp=!isEn?new Template("<div class='com_dialog-content com_widget-content'><ul><li>我们查找到了您的会员记录，请选择一张您常用的卡，我们将把订单记在此卡号下，可享受艺龙积分换礼品。</li>#{list}<li class='mt10 tc'><input mtd='ok' type='button' value='确认'><input mtd='cancel' type='button' value='取消' class='ml10'></li></ul></div>"):new Template("<div class='com_dialog-content com_widget-content'><ul><li>We find you have several accounts, please choose the one you want to use from below. </li>#{list}<li class='mt10 tc'><input mtd='ok' type='button' value='OK'><input mtd='cancel' type='button' value='Cancel' class='ml10'></li></ul></div>");var str=isEn?"Card":"卡号";for(var i=0;i<res.CardNoList.length;i++){sb.append(String.format("<li class='mt10'><label>"+str+"：<input type='radio' value='{0}' name='cd'>{0}</label></li>",res.CardNoList[i]));}var wind=new Dialog({title:"",htmlContent:temp.eval({list:sb.toString()}),width:400,initEvent:function(window){window.bind("click",function(evt){var element=Event.element(evt);var method=element.attr("mtd");switch(method){case"ok":if(window.find("input[checked]").length==0){return;}Elong.login(uid,pwd,vcode,callback,window.find("input[checked]").val(),isEn);wind.close();break;case"cancel":wind.close();break;}}.bind(this));}.bind(this)});wind.show();}else{res.SelectedCardNo=cardno;callback(res);}},false,"GET",null,"jsonp");},namespace:function(){var H=arguments,G=null,I,J,F;for(I=0;I<H.length;I=I+1){F=H[I].split(".");G=Elong;for(J=(F[0]=="Elong")?1:0;J<F.length;J=J+1){G[F[J]]=G[F[J]]||{};G=G[F[J]];}}return G;}};Elong.namespace("Elong.Control","Elong.Page","Elong.Utility");$(document).ready(function(){Elong.renderAds();});function $loginDialog(E,F){F=Object.isNull(F)?true:F;var D=new Dialog({title:F?"登录提示":"Sign In",htmlContent:String.format("<div><iframe frameborder='0'  src='{0}' width='480px' height='210px' ></iframe></div>",E),width:500,height:250,initEvent:function(A){}.bind(this)});D.show();}var ValidatorClass=Elong.Utility.ValidatorClass=Class.create();Object.extend(ValidatorClass.prototype,{name:"ValidatorClass",initialize:function(){},validType:{notEmpty:null,email:/^\w+((-\w+)|(\.\w+))*\@\w+((\.|-)\w+)*\.\w+$/,textRange:20,loginName:/[^@]+@{1}[^@\.]+\.+[^@]+|[0-9a-zA-Z\u4e00-\u9fa5]*/,passengerName:/^[a-zA-Z_]{1,20}\/[a-zA-Z_]{1,20}((| )[a-zA-Z_]{1,20}){0,1}$/,nickName:/^([a-zA-Z]|[\u4e00-\u9fa5]|\/| )+$/,enString:/^[a-zA-Z]+$/,cnString:/^[\u4e00-\u9fa5]+$/,nonSpecialSign:/^[^~!@#$%^&*！￥…]*$/,date:null,dateEn:null,dateRange:null,fileName:/^[a-z]:(\\[^\\\/:\*\?"><|]+)*\\?$/i,directoryName:/^[a-z]:(\\[^\\\/:\*\?"><|]+)+$/i,picFileName:/\.(jpg)|(jpeg)|(png)|(gif)$/i,attachFileName:/\.(doc)|(xls)|(txt)|(zip)|(rar)$/i,number:/^\d+$/,zipCode:/^\d{6}$/,idCard:null,year:/^[1-2][0-9]{3}$/,integer:/^-?[0-9]{1,9}$/,real:/^-?[0-9]{1,28}(\.[0-9]*)?$/,phone:/^\d{3,4}-\d{7,8}((\s|;)+\d{3,4}-\d{7,8})*$/,mobile:/^(13|15|18)[0123456789]{1}[0-9]{8}$/},valid:function(J,M,I){if(arguments.length<2){alert("validator.valid()缺少参数");}var L=true;var K=M.trim().split("&");for(var N=0;N<K.length;N++){if(!L){return false;}var H=K[N].trim();switch(H){case"notEmpty":L=!String.isNullOrEmpty(J);break;case"textRange":if(arguments.length<4){return false;}L=this.validateTextLength(J,arguments[2],arguments[3]);break;case"idCard":L=this.validateIDCard(J);break;case"date":L=this.validateDate(J);break;case"dateEn":L=this.validateDate(this.reFormatDateString(J));break;case"dateRange":if(arguments.length<4&&!this.validateDate(J)){return false;}L=this.validateDateRange(J,arguments[2],arguments[3]);break;default:L=this.regularValidate(J,this.validType[H]);break;}}return L;},validateIDCard:function(K){K=K.toString();if(K.length==18){var H,I,J;if(!this.valid(K.substr(0,17),"number")){return false;}H=parseInt(K.substr(0,1))*7+parseInt(K.substr(1,1))*9+parseInt(K.substr(2,1))*10;H=H+parseInt(K.substr(3,1))*5+parseInt(K.substr(4,1))*8+parseInt(K.substr(5,1))*4;H=H+parseInt(K.substr(6,1))*2+parseInt(K.substr(7,1))*1+parseInt(K.substr(8,1))*6;H=H+parseInt(K.substr(9,1))*3+parseInt(K.substr(10,1))*7+parseInt(K.substr(11,1))*9;H=H+parseInt(K.substr(12,1))*10+parseInt(K.substr(13,1))*5+parseInt(K.substr(14,1))*8;H=H+parseInt(K.substr(15,1))*4+parseInt(K.substr(16,1))*2;I=H%11;if(I==2){J=K.substr(17,1).toUpperCase();}else{J=parseInt(K.substr(17,1));}switch(I){case 0:if(J!=1){return false;}break;case 1:if(J!=0){return false;}break;case 2:if(J!="X"){return false;}break;case 3:if(J!=9){return false;}break;case 4:if(J!=8){return false;}break;case 5:if(J!=7){return false;}break;case 6:if(J!=6){return false;}break;case 7:if(J!=5){return false;}break;case 8:if(J!=4){return false;}break;case 9:if(J!=3){return false;}break;case 10:if(J!=2){return false;}}}else{if(!this.valid(K,"number")){return false;}}switch(K.length){case 15:var L="19"+K.substr(6,2)+"-"+K.substr(8,2)+"-"+K.substr(10,2);return this.valid(L,"date");case 18:var G=K.substr(6,4)+"-"+K.substr(10,2)+"-"+K.substr(12,2);return this.valid(G,"date");}return false;},validateTextLength:function(F,H,G){var E=F.trim().bytelength();if(Object.isNull(H)){H=0;}if(Object.isNull(G)){G=9999999;}return(E>=H)&&(E<=G);},validateDateRange:function(D,E,F){if(Object.isNull(E)){E="0001-01-01";}if(Object.isNull(F)){F="9999-12-31";}return this.reFormatDateString(D)>=this.reFormatDateString(E)&&this.reFormatDateString(D)<=this.reFormatDateString(F);},regularValidate:function(C,D){D.lastIndex=-1;if(C.length>0){return D.test(C);}return true;},validateDate:function(K){if(!this.regularValidate(K,/^\d{4}-\d{1,2}-\d{1,2}$/)){return false;}var I=[31,28,31,30,31,30,31,31,30,31,30,31];var L=new Array(3);var N,J,P;var O=true;var M=K;if(M.length!=0){L=M.split("-");if(L.length!=3||L[1].length>2||L[2].length>2||L[1].length<1||L[2].length<1){O=false;}N=parseInt(L[0],10);J=parseInt(L[1],10);P=parseInt(L[2],10);if(isNaN(N)||isNaN(J)||isNaN(P)){O=false;}if(N<1900||N>2100){O=false;}if(((N%4==0)&&(N%100!=0))||(N%400==0)){I[1]=29;}if(J<1||J>12||P<1||P>I[J-1]){O=false;}}else{O=false;}return O;},reFormatDateString:function(H){var G=new Array(3);var I,F,J;if(H.length==0){return"";}if(H.indexOf("-")>-1){G=H.split("-");if(G.length!=3){return"";}I=G[0];F=G[1];J=G[2];}else{G=H.split("/");if(G.length!=3){return"";}I=G[2];F=G[0];J=G[1];}if(I.length<=2){I="19"+I;}if(F.length==1){F="0"+F;}if(J.length==1){J="0"+J;}return I+"-"+F+"-"+J;},reFormatDateStringEn:function(H){var G=new Array(3);var I,F,J;if(H.length==0){return"";}if(H.indexOf("-")>-1){G=H.split("-");if(G.length!=3){return"";}I=G[0];F=G[1];J=G[2];}if(I.length<=2){I="20"+I;}if(F.length==1){F="0"+F;}if(J.length==1){J="0"+J;}return F+"/"+J+"/"+I;},getTodayString:function(){var B=new Date();return this.getDateString(B);},getDateString:function(L){var I=L.getMonth()+1;var K=L.getDate();var J=I>9?I.toString():"0"+I.toString();var G=K>9?K.toString():"0"+K.toString();var H=L.getFullYear().toString()+"-"+J+"-"+G;return H;},convertDate:function(G){if(G.length==0){return null;}var K=this.reFormatDateString(G);var J,I,L;if(K.indexOf("-")>-1){var H=K.split("-");if(H.length!=3){return null;}J=H[0];I=H[1];L=H[2];}return new Date(J,parseInt(I,10)-1,L);}});var validator=new ValidatorClass();var TipWindow=Elong.Control.TipWindow;TipWindow=Class.create();Object.extend(TipWindow.prototype,{name:"TipWindow",template:new Template('<div class="com_way" style="display:none; position: absolute; z-index: 20;width: #{width}px;#{height}"><div m="z" class="z" style="width: #{twidth}px;"></div><div m="bj" class="bj"></div><div class="clear"></div><div class="bk" style="width: #{cwidth}px;#{cheight}"><div class="bk_1" style="width: #{bwidth}px; #{bheight}">#{content}</div></div><div m="nz" class="none" style="width: #{twidth}px;"></div><div m="nbj" class="none"></div><div class="clear"></div></div>'),options:{htmlContent:"",eventElement:null,buildHtmlContent:null,width:381,height:0,defer:false,autoClose:true,initEvent:function(){}},initialize:function(B){Object.extend(Object.extend(this,this.options),B);this.eventElement.bind("mouseout",this.onMouseOutElement.bindAsEventListener(this));if(this.defer){this.showTimer=FunctionExt.defer(function(){if(!Object.isNull(this.buildHtmlContent)){this.buildHtmlContent(this);}else{this.show();}clearTimeout(this.showTimer);this.showTimer=null;},600,this);}else{if(!Object.isNull(this.buildHtmlContent)){this.buildHtmlContent(this);}else{this.show();}}},show:function(){this.initializeDOM();this.initializeEvent();this.render();this.initEvent(this.windowElement);},initializeDOM:function(){this.contentEndRegion=$("#m_contentend");var content=this.template.eval({width:this.width,height:this.height==0?"":String.format("height:{0}px;",this.height),twidth:this.width-29,cwidth:this.width-2,cheight:this.height==0?"":String.format("height:{0}px;",this.height-8),bwidth:this.width-32,bheight:this.height==0?"":String.format("height:{0}px;",this.height-36),content:this.htmlContent});this.windowElement=$(content).appendTo(this.contentEndRegion);},destroyDOM:function(){this.htmlContent="";this.windowElement=null;this.eventElement=null;this.contentEndRegion=null;},initializeEvent:function(){this.windowElement.bind("mouseout",this.onMouseOutRegion.bindAsEventListener(this));this.windowElement.bind("mouseover",this.onMouseOverRegion.bindAsEventListener(this));FunctionExt.defer(this.onOutClick.bindAsEventListener(this),100);},destroyEvent:function(){$(document).unbind("click",this.onOutClickHandler);this.windowElement.unbind("mouseout");this.windowElement.unbind("mouseover");this.eventElement.unbind("mouseout");},onMouseOutElement:function(){if(this.showTimer!=null){clearTimeout(this.showTimer);this.showTimer=null;this.eventElement.unbind("mouseout");}this.setOutTimer();},onMouseOverRegion:function(B){if(this.outTimer!=null){clearTimeout(this.outTimer);this.outTimer=null;}},onMouseOutRegion:function(B){this.setOutTimer();},setOutTimer:function(){this.outTimer=FunctionExt.defer(function(){if(this.autoClose){this.close();}}.bind(this),2000,this);},onOutClick:function(){this.onOutClickHandler=function(C){var D=Event.element(C);if(D.index(this.eventElement)==0){$(document).one("click",this.onOutClickHandler);}else{if(this.windowElement.find(":descendant").index(D)==-1){if(this.autoClose){this.close();}}}}.bindAsEventListener(this);$(document).one("click",this.onOutClickHandler);},render:function(){var D,F;var E=this.getWindowZone(this.eventElement,this.windowElement);switch(E){case"leftTop":D=this.eventElement.offset().top-this.windowElement.height();F=this.eventElement.offset().left-this.width+this.eventElement.width()/2+24;this.windowElement.find("div[m='z']").attr("class","none");this.windowElement.find("div[m='bj']").attr("class","none");this.windowElement.find("div[m='nz']").attr("class","z_br");this.windowElement.find("div[m='nbj']").attr("class","bj_br");this.windowElement.find("div.bk").attr("class","bk_top");this.windowElement.find("div.bk_1").attr("class","bk_top_1");break;case"leftBottom":D=this.eventElement.offset().top+this.eventElement.height()+3;F=this.eventElement.offset().left-this.width+this.eventElement.width()/2+24;break;case"rightTop":D=this.eventElement.offset().top-this.windowElement.height();F=this.eventElement.offset().left+this.eventElement.outerWidth()/2-24;this.windowElement.find("div[m='z']").attr("class","none");this.windowElement.find("div[m='bj']").attr("class","none");this.windowElement.find("div[m='nz']").attr("class","z_bl");this.windowElement.find("div[m='nbj']").attr("class","bj_bl");this.windowElement.find("div.bk").attr("class","bk_top");this.windowElement.find("div.bk_1").attr("class","bk_top_1");break;case"rightBottom":D=this.eventElement.offset().top+this.eventElement.height()+3;F=this.eventElement.offset().left+this.eventElement.outerWidth()/2-24;this.windowElement.find("div[m='z']").attr("class","z_tl");this.windowElement.find("div[m='bj']").attr("class","bj_tl");this.windowElement.find("div[m='nz']").attr("class","none");this.windowElement.find("div[m='nbj']").attr("class","none");break;}this.windowElement[0].style.top=D+"px";this.windowElement[0].style.left=F+"px";this.ie6FilterIFrame=Globals.addIE6Filter(this.windowElement.width(),this.windowElement.height(),F,D);this.windowElement.fadeIn("normal");},getWindowZone:function(G,K){var L={leftTop:"leftTop",leftBottom:"leftBottom",rightTop:"rightTop",rightBottom:"rightBottom"};var J=Globals.getScrollPosition();var H=Globals.browserDimensions();var I=true;if(H.width-(G.offset().left-J.x)<K.width()&&G.offset().left-J.x>K.width()){I=false;}if(I){if(H.height-(G.offset().top-J.y)>K.height()){return L.rightBottom;}else{if(G.offset().top-J.y>K.height()){return L.rightTop;}else{return L.rightBottom;}}}else{if(H.height-(G.offset().top-J.y)>K.height()){return L.leftBottom;}else{if(G.offset().top-J.y>K.height()){return L.leftTop;}else{return L.leftBottom;}}}},close:function(){this.dispose();},dispose:function(){if(this.windowElement){this.windowElement.fadeOut("normal");FunctionExt.defer(function(){if(this.windowElement){Globals.closeIE6Fliter(this.ie6FilterIFrame);this.windowElement.remove();this.destroyEvent();this.destroyDOM();}}.bind(this),500);}}});var ErrorTipWindow=Elong.Control.ErrorTipWindow;ErrorTipWindow=Class.create();Object.extend(ErrorTipWindow.prototype,{name:"ErrorTipWindow",templateRegion:'<div style="display:none; position: absolute; z-index: 5000; " class="com_bug"><div class="w">{0}</div></div>',options:{errorMsg:"",eventElement:null},initialize:function(B){Object.extend(Object.extend(this,this.options),B);this.initializeDOM();this.initializeEvent();this.render();},initializeDOM:function(){this.contentEndRegion=$("#m_contentend");this.windowElement=$(String.format(this.templateRegion,this.errorMsg)).appendTo(this.contentEndRegion);},destroyDOM:function(){this.errorMsg="";this.windowElement=null;this.eventElement=null;this.contentEndRegion=null;},initializeEvent:function(){FunctionExt.defer(this.onOutClick.bindAsEventListener(this),100);},destroyEvent:function(){$(document).unbind("click",this.onOutClickHandler);this.windowElement.unbind("mouseout");this.windowElement.unbind("mouseover");},onOutClick:function(){this.onOutClickHandler=function(C){var D=Event.element(C);if(this.windowElement.find(":descendant").index(D)==-1){this.dispose();}else{$(document).one("click",this.onOutClickHandler);}}.bindAsEventListener(this);$(document).one("click",this.onOutClickHandler);},onMouseOverRegion:function(C){var D=Event.element(C);if(this.outTimer!=null){clearTimeout(this.outTimer);this.outTimer=null;}},onMouseOutRegion:function(C){var D=Event.element(C);this.outTimer=FunctionExt.defer(function(){this.dispose();},10,this);},render:function(){var C=this.eventElement.offset().top+this.eventElement.height()-17;var D=this.eventElement.offset().left+this.eventElement.width()+5;this.windowElement[0].style.top=C+"px";this.windowElement[0].style.left=D+"px";this.ie6FilterIFrame=Globals.addIE6Filter(this.windowElement.width(),this.windowElement.height(),D,C);this.windowElement.show();this.scrollToCenter(this.eventElement);this.eventElement.addClass("com_ErrorBox");if(this.eventElement.is("input")){this.eventElement.select();}},scrollToCenter:function(F){var D=Globals.getScrollPosition();var E=Globals.browserDimensions();if(F.offset().top<D.y){window.scrollTo(D.x,F.offset().top-E.height/2);}},dispose:function(){if(this.windowElement){this.windowElement.hide();this.eventElement.removeClass("com_ErrorBox");FunctionExt.defer(function(){if(this.windowElement){Globals.closeIE6Fliter(this.ie6FilterIFrame);this.windowElement.remove();this.destroyEvent();this.destroyDOM();}}.bind(this),500);}}});function $error(D,C){if(Object.isNull(this.tempErrorWindow)||Object.isNull(this.tempErrorWindow.windowElement)){this.tempErrorWindow=new ErrorTipWindow({errorMsg:C,eventElement:D});}else{D.addClass("com_ErrorBox");D.one("click",function(A){FunctionExt.defer(function(){if(Object.isNull(C)){return;}if(Object.isNull(this.tempErrorWindow)||Object.isNull(this.tempErrorWindow.windowElement)){this.tempErrorWindow=new ErrorTipWindow({errorMsg:C,eventElement:D});}}.bind(this),600);}.bind(this));}}(function(B){B.fn.extend({autocomplete:function(A,G,I){var H=typeof A=="string";var J=typeof G=="string";I=B.extend({},B.Autocompleter.defaults,{url:H?A:null,urlHot:J?G:null,data:H?null:A,dataHot:J?null:G,delay:H?B.Autocompleter.defaults.delay:10,max:I&&!I.scroll?10:150},I);I.dataHot=B.Autocompleter.parseData(I.dataHot,I);if(B.browser.msie){I.hotWidth=I.hotWidth+25;}I.highlight=I.highlight||function(C){return C;};I.formatMatch=I.formatMatch||I.formatItem;return this.each(function(){new B.Autocompleter(this,I);});},result:function(A){return this.bind("result",A);},search:function(A){return this.trigger("search",[A]);},flushCache:function(){return this.trigger("flushCache");},setOptions:function(A){return this.trigger("setOptions",[A]);},unautocomplete:function(){return this.trigger("unautocomplete");}});B.Autocompleter=function(h,r){var b={LEFT:37,UP:38,RIGHT:39,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8};var o=B(h).attr("autocomplete","off").addClass(r.inputClass);var f;var t="";var i=B.Autocompleter.Cache(r);var p=0;var c;var w={mouseDownOnSelect:false};var g=B.Autocompleter.Select(r,h,n,w);var m=B("#m_contentend");m=m.length==0?document.body:m;var e=jQuery("<div/>").addClass(r.errorClass).css("width",typeof r.errorWidth=="string"||r.errorWidth>0?r.errorWidth:B(h).width()).css("display","none").html("<ul><li>"+r.errorMsg+'</li></ul><div class="clear"></div><div class="com_cbox_b com_cbox_lt"></div><div class="com_cbox_b com_cbox_rt"></div><div class="com_cbox_b com_cbox_lb"></div><div class="com_cbox_b com_cbox_rb"></div><div class="clear"></div>').appendTo(m);if(B.fn.bgiframe){e.bgiframe();}jQuery(document).click(function(C){e.hide();g.hide();});var u;B.browser.opera&&B(h.form).bind("submit.autocomplete",function(){if(u){u=false;return false;}});o.attr("userchanged","false");o.bind("keydown.autocomplete",function(D){D.stopPropagation();var C=false;if(o.val().replace(/\s+/g,"")==null||B.trim(o.val().replace(/\s+/g,""))==""||o.attr("userchanged")=="false"){C=true;}else{C=false;}c=D.keyCode;switch(D.keyCode){case b.UP:if(g.visible()){C?g.pageUp(4,false):g.prev();}else{a(0,true);}D.preventDefault();break;case b.DOWN:if(g.visible()){C?g.pageDown(4,false):g.next();}else{a(0,true);}D.preventDefault();break;case b.LEFT:if(C){if(g.visible()){g.prev();}else{a(0,true);}}break;case b.RIGHT:if(C){if(g.visible()){g.next();}else{a(0,true);}}break;case b.PAGEUP:if(g.visible()){g.pageUp(8,true);}else{a(0,true);}break;case b.PAGEDOWN:if(g.visible()){g.pageDown(8,true);}else{a(0,true);}break;case b.RETURN:if(g.visible()){D.stopPropagation();D.preventDefault();u=true;return false;}break;}}).bind("keyup.autocomplete",function(C){e.hide();c=C.keyCode;switch(C.keyCode){case b.UP:C.stopPropagation();C.preventDefault();break;case b.LEFT:C.stopPropagation();C.preventDefault();break;case b.DOWN:C.stopPropagation();C.preventDefault();break;case b.RIGHT:C.stopPropagation();C.preventDefault();break;case b.PAGEUP:C.stopPropagation();C.preventDefault();break;case b.PAGEDOWN:C.stopPropagation();C.preventDefault();break;case b.RETURN:if(n(r)){C.stopPropagation();C.preventDefault();}break;case b.ESC:C.stopPropagation();C.preventDefault();g.hide();break;case b.TAB:C.stopPropagation();C.preventDefault();jQuery(C.target).trigger("click");break;default:C.stopPropagation();C.preventDefault();o.attr("userchanged","true");clearTimeout(f);f=setTimeout(a,r.delay);break;}}).keypress(function(C){C.stopPropagation();}).focus(function(C){C.stopPropagation();p++;jQuery(C.target).select();o.attr("userchanged","false");if(p++>0&&!g.visible()){a(0,true);}e.hide();}).blur(function(C){p=0;if(!w.mouseDownOnSelect){x();}e.hide();}).dblclick(function(C){jQuery(this).select();}).click(function(C){C.stopPropagation();e.hide();o.attr("userchanged","false");if((p++>1&&!g.visible())||r.tagName=="IMG"||r.tagName=="A"){a(0,true);}}).bind("search",function(D){var C=(arguments.length>1)?arguments[1]:null;function E(I,G){var F;if(G&&G.length){for(var H=0;H<G.length;H++){if(G[H].result.toLowerCase()==I.toLowerCase()){F=G[H];break;}}}if(typeof C=="function"){C(F);}else{o.trigger("result",F&&[F.data,F.value]);}}B.each(k(o.val().replace(/\s+/g,"")),function(G,F){A(F,E,E);});}).bind("flushCache",function(C){i.flush();}).bind("setOptions",function(C){B.extend(r,arguments[1]);if("data" in arguments[1]){i.populate();}}).bind("unautocomplete",function(C){g.unbind();o.unbind();B(h.form).unbind(".autocomplete");});function n(E){var F=g.selected();if(!F){return false;}var C=F.result;t=C;if(E.multiple){var D=k(o.val().replace(/\s+/g,""));if(D.length>1){C=D.slice(0,D.length-1).join(E.multipleSeparator)+E.multipleSeparator+C;}C+=E.multipleSeparator;}o.val(C);d();o.trigger("result",[F.data,F.value]);if(E.resultNextId){jQuery("#"+E.resultNextId).focus();}else{}return true;}function a(C,D){B(e).hide();if(c==b.DEL){g.hide();return;}var E=o.val().replace(/\s+/g,"");if(!D&&E==t){return;}t=E;E=q(E);if(E.length>=r.minChars){o.addClass(r.loadingClass);if(!r.matchCase){E=E.toLowerCase();}if(o.attr("userchanged")=="false"){E="";}A(E,s,d);}else{j();g.hide();}}function k(C){if(!C){return[""];}var E=C.split(r.multipleSeparator);var D=[];B.each(E,function(G,F){if(B.trim(F)){D[G]=B.trim(F);}});return D;}function q(C){if(!r.multiple){return C;}var D=k(C);return D[D.length-1];}function v(D,C){if(r.autoFill&&(q(o.val().replace(/\s+/g,"")).toLowerCase()==D.toLowerCase())&&c!=b.BACKSPACE){o.val(o.val().replace(/\s+/g,"")+C.substring(q(t).length));}}function x(){d();}function d(){var C=g.visible();g.hide();clearTimeout(f);j();if(r.mustMatch){o.search(function(D){if(!D){if(r.multiple){var E=k(o.val().replace(/\s+/g,"")).slice(0,-1);o.val(E.join(r.multipleSeparator)+(E.length?r.multipleSeparator:""));}else{}}});}}function s(E,D,C){if(D&&D.length){j();g.display(D,E,C);v(E,D[0].value);g.show(C);}else{d();}}function A(C,E,F){if(!r.matchCase){C=C.toLowerCase();}var H;var D=false;if(jQuery.trim(C)==""&&r.needDataHot){H=r.dataHot;D=true;}else{H=i.load(C);}var K=new Array();var I=new Array();for(var L=0;L<H.length;L++){if(H[L].value.toLowerCase().indexOf(C)==0){I[I.length]=H[L];}else{K[K.length]=H[L];}}H=new Array();if(I.length>0){for(var L=0;L<I.length;L++){H.push(I[L]);}}if(K.length>0){for(var L=0;L<K.length;L++){H.push(K[L]);}}I=null;K=null;if((H&&H.length)){E(C,H,D);}else{if(!D&&(typeof r.url=="string")&&(r.url.length>0)){var G={timestamp:+new Date()};B.each(r.extraParams,function(M,N){G[M]=typeof N=="function"?N():N;});B.ajax({mode:"abort",port:"autocomplete"+h.name,dataType:r.dataType,url:r.urlHot,data:B.extend({q:q(C),limit:r.max},G),success:function(M){r.dataHot=B.Autocompleter.parseData(r.dataHot,r);E(C,parsed);}});}else{if(D&&(typeof r.urlHot=="string")&&(r.urlHot.length>0)){}else{g.emptyList();var J=jQuery(h).offset();jQuery(e).css({top:J.top+h.offsetHeight+1,left:J.left}).show().find("li").html(r.errorMsg+C);F(C);}}}}function l(G){var E=[];var F=G.split("\n");for(var D=0;D<F.length;D++){var C=B.trim(F[D]);if(C){C=C.split("|");E[E.length]={data:C,value:C[0],result:r.formatResult&&r.formatResult(C,C[0])||C[0]};}}return E;}function j(){o.removeClass(r.loadingClass);}};B.Autocompleter.parseData=function(H,F){var G=[];for(var A=0;A<H.length;A++){G[G.length]={data:H[A],value:F.formatMatch&&F.formatMatch(H[A],A+1,H.length),result:F.formatResult&&F.formatResult(H[A],A+1,H.length)};}return G;};B.Autocompleter.defaults={inputClass:"com_input",resultsClass:"com_results",hotResultsClass:"com_hotresults",loadingClass:"com_loading",minChars:1,delay:400,matchCase:false,matchSubset:true,matchContains:false,cacheLength:10,max:100,mustMatch:false,extraParams:{},selectFirst:true,formatItem:function(A){return A[0];},formatMatch:null,autoFill:false,width:0,multiple:false,multipleSeparator:", ",highlight:function(A,D){return A.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+D.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>");},scroll:true,scrollHeight:180};B.Autocompleter.Cache=function(N){var K={};var A=0;function J(D,C){if(!N.matchCase){D=D.toLowerCase();}var E=D.indexOf(C);if(E==-1){return false;}return E==0||N.matchContains;}function L(D,C){if(A>N.cacheLength){I();}if(!K[D]){A++;}K[D]=C;}function M(){if(!N.data){return false;}var G={},Q=0;if(!N.url){N.cacheLength=1;}G[""]=[];for(var D=0,E=N.data.length;D<E;D++){var C=N.data[D];C=(typeof C=="string")?[C]:C;var F=N.formatMatch(C,D+1,N.data.length);if(F===false){continue;}var R=F.charAt(0).toLowerCase();if(!G[R]){G[R]=[];}var H={value:F,data:C,result:N.formatResult&&N.formatResult(C)||F};G[R].push(H);if(Q++<N.max){G[""].push(H);}}B.each(G,function(P,O){N.cacheLength++;L(P,O);});}setTimeout(M,25);function I(){K={};A=0;}return{flush:I,add:L,populate:M,load:function(D){if(!N.cacheLength||!A){return null;}if(!N.url&&N.matchContains){var E=[];for(var C in K){if(C.length>0){var F=K[C];B.each(F,function(P,H){if(J(H.value,D)){E.push(H);}});}}return E;}else{if(K[D]){return K[D];}else{if(N.matchSubset){for(var G=D.length-1;G>=N.minChars;G--){var F=K[D.substr(0,G)];if(F){var E=[];B.each(F,function(P,H){if(J(H.value,D)){E[E.length]=H;}});return E;}}}}}return null;}};};B.Autocompleter.Select=function(f,T,A,e){var a={ACTIVE:"ac_over"};var Z,i=-1,h,V="",g=true,Y,d;function c(D){if(!g){if(D){Y.removeClass(f.resultsClass);Y.addClass(f.hotResultsClass);elementTitleLeft.html(f.hotTitleMsg);}else{Y.removeClass(f.hotResultsClass);Y.addClass(f.resultsClass);elementTitleLeft.html(f.titleMsg);}return;}var C=B("#m_contentend");C=C.length==0?document.body:C;Y=B("<div/>").hide().css("position","absolute").appendTo(C);if(D){Y.addClass(f.hotResultsClass);}else{Y.addClass(f.resultsClass);}elementStyle=jQuery('<div class="clear"></div><div class="com_cbox_b com_cbox_lt"></div><div class="com_cbox_b com_cbox_rt"></div><div class="com_cbox_b com_cbox_lb"></div><div class="com_cbox_b com_cbox_rb"></div><div class="clear"></div>').appendTo(Y);elementDiv=jQuery("<div/>").css("width","100%").appendTo(Y);elementTitle=jQuery("<div/>").addClass(f.titleClass).appendTo(elementDiv);elementTitleLeft=jQuery("<span/>").appendTo(elementTitle);elementTitleRight=jQuery("<a/>").addClass(f.closeClass).attr({"href":"#","title":f.closeMsg}).appendTo(elementTitle);if(D){elementTitleLeft.html(f.hotTitleMsg);}else{elementTitleLeft.html(f.titleMsg);}d=B("<ul/>").appendTo(elementDiv).mouseover(function(E){if(U(E).nodeName&&U(E).nodeName.toUpperCase()=="LI"){i=B("li",d).removeClass(a.ACTIVE).index(U(E));B(U(E)).addClass(a.ACTIVE);}}).click(function(E){B(U(E)).addClass(a.ACTIVE);A(f);E.stopPropagation();return false;}).mousedown(function(){e.mouseDownOnSelect=true;}).mouseup(function(){e.mouseDownOnSelect=false;});if(D){if(f.hotWidth>0){Y.css("width",f.hotWidth);}}else{if(f.width>0){Y.css("width",f.width);}}if(jQuery.fn.bgiframe){Y.bgiframe();}g=false;}function U(C){var D=C.target;while(D&&D.tagName!="LI"){D=D.parentNode;}if(!D){return[];}return D;}function W(C){Z.slice(i,i+1).removeClass(a.ACTIVE);j(C);var D=Z.slice(i,i+1).addClass(a.ACTIVE);if(f.scroll){var E=0;Z.slice(0,i).each(function(){E+=this.offsetHeight;});if((E+D[0].offsetHeight-d.scrollTop())>d[0].clientHeight){d.scrollTop(E+D[0].offsetHeight-d.innerHeight());}else{if(E<d.scrollTop()){d.scrollTop(E);}}}}function j(C){i+=C;if(i<0){i=Z.size()+i;}else{if(i>=Z.size()){i=i-Z.size();}}}function X(C){return f.max&&f.max<C?f.max:C;}function b(F,D){d.empty();var C=X(h.length);for(var G=0;G<C;G++){if(!h[G]){continue;}if(F){var H=f.formatHotItem(h[G].data,G+1,C,h[G].value,V);}else{var H=f.formatItem(h[G].data,G+1,C,h[G].value,V);}if(H===false){continue;}var E=B("<li/>").html(f.highlight(H,V)).addClass(G%2==0?"ac_even":"ac_odd").appendTo(d)[0];B.data(E,"ac_data",h[G]);}Z=d.find("li");if(f.selectFirst){Z.slice(0,1).addClass(a.ACTIVE);i=0;}if(!F){d.prev().find("span").html(D+f.titleMsg);}else{d.prev().find("span").html(f.hotTitleMsg);}}return{display:function(D,E,C){if(C){}else{C=false;}c(C);h=D;V=E;b(C,E);},next:function(){W(1);},prev:function(){W(-1);},pageUp:function(C,D){if(i!=0&&i-C<0){D?W(-i):W(-C);}else{if(i==0&&D){W(Z.size()-1);}else{W(-C);}}},pageDown:function(C,D){if(i!=Z.size()-1&&i+C>Z.size()-1){D?W(Z.size()-1-i):W(C);}else{if(i==Z.size()-1&&D){W(1-Z.size());}else{W(C);}}},hide:function(){Y&&Y.hide();Z&&Z.removeClass(a.ACTIVE);i=-1;},visible:function(){return Y&&Y.is(":visible");},current:function(){return this.visible()&&(Z.filter("."+a.ACTIVE)[0]||f.selectFirst&&Z[0]);},show:function(D){var F=B(T).offset();Y.css({top:F.top+T.offsetHeight+1,left:F.left});if(D){}else{Y.css("width",typeof f.width=="string"||f.width>0?f.width:B(T).width());}if(D){if((F.left+f.hotWidth)>B(window).width()){var G=F.left-((F.left+f.hotWidth)-B(window).width());Y.css("left",G);}}else{if((F.left+f.width+10)>B(window).width()){var G=F.left-((F.left+f.width+10)-B(window).width());Y.css("left",G);}}Y.show();if(f.scroll){d.scrollTop(0);d.css({maxHeight:f.scrollHeight,overflow:"auto"});if(B.browser.msie){var E=0;Z.each(function(){E+=this.offsetHeight;});var C=E>f.scrollHeight;d.height(C?f.scrollHeight:E);if(!C&&!D){Z.width(d.width()-parseInt(Z.css("padding-left"))-parseInt(Z.css("padding-right")));}}if(D){Y.css("width",f.hotWidth-5);if(B.browser.msie){d.height(f.hotHeight-3);}}}},selected:function(){jQuery(T).attr("userchanged","true");var C=Z&&Z.filter("."+a.ACTIVE).removeClass(a.ACTIVE);return C&&C.length&&B.data(C[0],"ac_data");},emptyList:function(){d&&d.empty();},unbind:function(){Y&&Y.remove();}};};})(jQuery);jQuery.CitySuggest=function(){};jQuery.CitySuggest.getScriptPath=function(){var F="";var E=document.getElementsByTagName("script");var G=E[E.length-1].src;var H=G.lastIndexOf("/");F=G.substring(0,H+1);return F;};jQuery.fn.CitySuggest=function(sOptions,sOptions2){var options;if(sOptions2){options=$.extend({},jQuery.CitySuggest.DefaultOptions,sOptions,sOptions2);}else{options=$.extend({},jQuery.CitySuggest.DefaultOptions,sOptions);}options.tagName=$(this).attr("tagName");var csInputList=this;function initCitySuggest(){var ___tempData=new Array();var ___tempDataHot=new Array();eval("var __tempHasDataId =!((typeof "+options.dataId+') == "undefined") ;');if(__tempHasDataId){eval(options.dataId+"==null?__tempHasDataId=false:__tempHasDataId=true;");}eval("var __tempHasDataHotId =!(typeof "+options.dataHotId+' == "undefined")  ;');if(__tempHasDataHotId){eval(options.dataHotId+"==null?__tempHasDataHotId=false:__tempHasDataHotId=true;");}if(options.needData&&!__tempHasDataId){return;}if(options.needDataHot&&!__tempHasDataHotId){return;}eval(" ___tempData = "+options.dataId+";");eval(" ___tempDataHot = "+options.dataHotId+";");for(var i=0;i<___tempData.length;i++){___tempData[i].CityNameCn=decodeURIComponent(___tempData[i].CityNameCn);}for(var i=0;i<___tempDataHot.length;i++){___tempDataHot[i].CityNameCn=decodeURIComponent(___tempDataHot[i].CityNameCn);}csInputList.each(function(){$(this).autocomplete(___tempData,___tempDataHot,options);if(options.resultMethod){$(this).result(options.resultMethod);}else{if(options.resultId){$(this).result(function(event,data,formatted){eval('$("#'+options.resultId+'").val(data.'+options.resultField+")");if(options.resultId2){eval('$("#'+options.resultId2+'").val(data.'+options.resultField2+")");}if(options.resultExtendMethod){options.resultExtendMethod(event,data,formatted);}});}else{$(this).result(function(event,data,formatted){var __tempResultId=$(this).attr("resultid");var __tempResultField=$(this).attr("resultfield");if(__tempResultId&&__tempResultField){eval('$("#'+__tempResultId+'").val(data.'+__tempResultField+")");}var __tempResultId2=$(this).attr("resultid2");var __tempResultField2=$(this).attr("resultfield2");if(__tempResultId2&&__tempResultField2){eval('$("#'+__tempResultId2+'").val(data.'+__tempResultField2+")");}});}}});}if(options.needGetData||options.needGetDataHot){jQuery.getScript(options.dataProviderUrl+"?dataId="+options.dataId+"&dataHotId="+options.dataHotId+"&dataType="+options.dataType+"&needGetData="+options.needGetData.toString()+"&needGetDataHot="+options.needGetDataHot.toString()+"&timeStamp="+(new Date).getTime(),initCitySuggest);}else{initCitySuggest();}};if(!jQuery.fn.bgIframe&&!jQuery.fn.bgiframe){jQuery.fn.bgIframe=jQuery.fn.bgiframe=function(D){if($.browser.msie&&/6.0/.test(navigator.userAgent)){D=$.extend({top:"auto",left:"auto",width:"auto",height:"auto",opacity:true,src:"javascript:false;"},D||{});var F=function(A){return A&&A.constructor==Number?A+"px":A;},E='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+D.src+'"style="display:block;position:absolute;z-index:-1;'+(D.opacity!==false?"filter:Alpha(Opacity='0');":"")+"top:"+(D.top=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+'px')":F(D.top))+";left:"+(D.left=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+'px')":F(D.left))+";width:"+(D.width=="auto"?"expression(this.parentNode.offsetWidth+'px')":F(D.width))+";height:"+(D.height=="auto"?"expression(this.parentNode.offsetHeight+'px')":F(D.height))+';"/>';return this.each(function(){if($("> iframe.bgiframe",this).length==0){this.insertBefore(document.createElement(E),this.firstChild);}});}return this;};}jQuery.CitySuggest.OptionsCn=jQuery.CitySuggest.DefaultOptions={canFocus:true,dataId:"data"+new Date().getTime(),dataHotId:"dataHot"+new Date().getTime(),dataType:"Hotel-All",dataProviderUrl:"http://www.elong.com/CitySuggestData.aspx",needGetData:true,needGetDataHot:true,needData:true,needDataHot:true,resultId:null,resultField:"CityId",resultId2:null,resultField2:"CityName",resultMethod:null,resultExtendMethod:null,resultNextId:null,citySuggestCssUrl:jQuery.CitySuggest.getScriptPath()+"jquery.citysuggest.css",errorMsg:"对不起，找不到：",titleMsg:"，按照拼音排序",hotTitleMsg:'拼音支持首字母输入, 或<span style="font-family: simsun;">&nbsp;←↑↓→&nbsp;</span>选择',closeMsg:"关闭",inputClass:"com_input",resultsClass:"com_results",hotResultsClass:"com_hotresults",loadingClass:"com_loading",errorClass:"com_error",titleClass:"ac_title",closeClass:"ac_close",width:230,hotWidth:270,hotHeight:138,errorWidth:230,scroll:true,scrollHeight:260,minChars:0,delay:10,matchCase:false,matchSubset:true,matchContains:true,cacheLength:1500,max:30,mustMatch:false,extraParams:{},selectFirst:true,formatItem:function(H,G,F,E){return"<span>"+H.CityNameEn+"</span>"+H.CityNameCn;},formatHotItem:function(H,G,F,E){return H.CityNameCn;},formatMatch:function(F,E,D){return(F.CityNamePinyin+F.CityNameCn+F.CityNameEn+F.CityId+F.CityThreeSign+F.CityNameJP+F.AirportCode+F.OldEnglishName).replace(/\s+/g,"");},formatResult:function(F,E,D){return F.CityNameCn;},autoFill:false,multiple:false,multipleSeparator:", ",highlight:function(C,D){return C.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+D.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<b>$1</b>");}};jQuery.CitySuggest.OptionsEn={canFocus:true,dataId:"data"+new Date().getTime(),dataHotId:"dataHot"+new Date().getTime(),dataType:"Hotel-All",dataProviderUrl:"http://www.elong.com/CitySuggestData.aspx",needGetData:true,needGetDataHot:true,needData:true,needDataHot:true,resultId:null,resultField:"CityId",resultId2:null,resultField2:"CityName",resultMethod:null,resultExtendMethod:null,resultNextId:null,citySuggestCssUrl:jQuery.CitySuggest.getScriptPath()+"jquery.citysuggest.css",errorMsg:"Sorry, no city is matched: ",titleMsg:", sort by spelling",hotTitleMsg:"Please enter or select from below",closeMsg:"close",inputClass:"com_input",resultsClass:"com_results",hotResultsClass:"com_hotresults_en",loadingClass:"com_loading",errorClass:"com_error",titleClass:"ac_title",closeClass:"ac_close",width:230,hotWidth:310,hotHeight:145,errorWidth:230,scroll:true,scrollHeight:260,minChars:0,delay:10,matchCase:false,matchSubset:true,matchContains:true,cacheLength:1500,max:30,mustMatch:false,extraParams:{},selectFirst:true,formatItem:function(H,G,F,E){return"<span>"+H.CityNameEn+"</span>&nbsp;";},formatHotItem:function(H,G,F,E){return H.CityNameEn;},formatMatch:function(F,E,D){return(F.CityNamePinyin+F.CityNameCn+F.CityNameEn+F.CityId+F.CityThreeSign+F.CityNameJP+F.AirportCode+F.OldEnglishName).replace(/\s+/g,"");},formatResult:function(F,E,D){return F.CityNameEn;},autoFill:false,multiple:false,multipleSeparator:", ",highlight:function(C,D){return C.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+D.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<b>$1</b>");}};var CalendarWindow=Elong.Control.CalendarWindow;CalendarWindow=Class.create();Object.extend(CalendarWindow.prototype,{name:"CalendarWindow",popRegion:new Template('<div class="com_cbox" >  <div class="calendar_year"><div class="year"><a method="btnPre" href="#?" title="上一月" class="mf_lr_a">&nbsp;</a></div>#{MonthSPAN}	<div class="month_1"><a  method="btnNext" title="下一月" href="#?" class="mf_rr_a">&nbsp;</a></div><div class="month"><a method="close" class="ac_close_t cur" title="关闭" href="#?">x</a></div>  </div>  <div class="date_box">	#{MonthHTML}	<div class="hr"></div>	#{nextMonthHTML}  </div>  <div class="clear"></div>  <div class="com_cbox_b com_cbox_lt"></div>  <div class="com_cbox_b com_cbox_rt"></div>  <div class="com_cbox_b com_cbox_lb"></div>  <div class="com_cbox_b com_cbox_rb"></div><div class="clear"></div></div>'),weakHTML_cn:'<tr class="family"><th>日</th><th>一</th><th>二</th><th>三</th><th>四</th><th>五</th><th>六</th></tr>',weakHTML_en:'<tr class="family"><th>S</th><th>M</th><th>T</th><th>W</th><th>T</th><th>F</th><th>S</th></tr>',monthSPAN_cn:'<span class="h">{0}年{1}月</span><span class="m">{2}年{3}月</span>',monthSPAN_en:'<span class="h">{0}.{1}</span><span class="m">{2}.{3}</span>',options:{eventElement:null,selectedDate:null,language:"cn",enabledFrom:null,enabledTo:null,onSelected:null},initialize:function(B){Object.extend(Object.extend(this,this.options),B);this.initializeDOM();this.initializeEvent();if(Object.isNull(this.selectedDate)||String.isNullOrEmpty(this.selectedDate)||!this.validateDate(this.selectedDate)){this.selectedDate=this.getTodayString();}else{this.selectedDate=this.reFormatDateString(this.selectedDate);}this.startYear=parseInt(this.selectedDate.split("-")[0],10);this.startMonth=parseInt(this.selectedDate.split("-")[1],10);this.weakHTML=this.language.toLowerCase()=="cn"?this.weakHTML_cn:this.weakHTML_en;this.refreshMonth(this.startYear,this.startMonth);this.render();},initializeDOM:function(){this.contentEndRegion=$("#m_contentend");this.windowElement=$('<div style="display:none; position: absolute; z-index: 2000;"></div>').appendTo(this.contentEndRegion);},destroyDOM:function(){this.windowElement=null;this.contentEndRegion=null;this.options=null;},initializeEvent:function(){this.windowElement.bind("click",this.onClickRegion.bindAsEventListener(this));this.windowElement.bind("mouseout",this.onMouseOutRegion.bindAsEventListener(this));this.windowElement.bind("mouseover",this.onMouseOverRegion.bindAsEventListener(this));FunctionExt.defer(this.onOutClick.bindAsEventListener(this),100);},destroyEvent:function(){this.windowElement.unbind("click");this.windowElement.unbind("mouseout");this.windowElement.unbind("mouseover");},onOutClick:function(){$(document).one("click",function(C){var D=Event.element(C);if(this.windowElement.find("*").index(D)==-1&&(D.attr("method")!="btnPre"&&D.attr("method")!="btnNext")){this.dispose();}}.bindAsEventListener(this));},onClickRegion:function(H){var F=Event.element(H);var E=F.attr("method");switch(E){case"btnPre":if(this.startMonth<3){this.startYear--;}if(this.startMonth<3){this.startMonth+=12;}this.startMonth-=2;this.refreshMonth(this.startYear,this.startMonth);return;case"btnNext":if(this.startMonth>10){this.startYear++;}if(this.startMonth>10){this.startMonth-=12;}this.startMonth+=2;this.refreshMonth(this.startYear,this.startMonth);return;case"close":this.dispose();return;}if(F.is("td")&&!F.hasClass("Close")&&parseInt(F.text(),10)>0){if(!Object.isNull(this.onSelected)){var G=F.parents("table").attr("date")+F.text();this.onSelected(this.reFormatDateString(G,this.language.toLowerCase()=="cn"));}this.dispose();}},onMouseOverRegion:function(C){var D=Event.element(C);if(this.outTimer!=null){clearTimeout(this.outTimer);this.outTimer=null;}if(D.is("li")){D.addClass("li_cur");}},onMouseOutRegion:function(C){var D=Event.element(C);this.outTimer=FunctionExt.defer(function(){this.dispose();},1000,this);if(D.is("li")){D.removeClass("li_cur");}},render:function(){var F=this.eventElement.offset().top+this.eventElement.height()+6;var G=this.eventElement.offset().left;var H=Globals.getScrollPosition();var E=Globals.browserDimensions();if(E.width-(this.eventElement.offset().left-H.x)>this.windowElement.width()){this.windowElement[0].style.top=F+"px";this.windowElement[0].style.left=G+"px";}else{this.windowElement[0].style.top=F+"px";G=G-this.windowElement.width()+this.eventElement.width();this.windowElement[0].style.left=G+"px";}this.ie6FilterIFrame=Globals.addIE6Filter(this.windowElement.width(),this.windowElement.height(),G,F);this.windowElement.show();},refreshMonth:function(year,month){var nextYear=month==12?year+1:year;var nextMonth=month==12?1:month+1;var spanHTML=this.language.toLowerCase()=="cn"?this.monthSPAN_cn:this.monthSPAN_en;spanHTML=String.format(spanHTML,year,month,nextYear,nextMonth);var contentHTML=this.popRegion.eval({MonthSPAN:spanHTML,MonthHTML:this.getDateHTML(year,month),nextMonthHTML:this.getDateHTML(nextYear,nextMonth)});this.windowElement.html(contentHTML);},isDisabledDay:function(G,F,H){if(Object.isNull(this.enabledFrom)){this.enabledFrom=this.getTodayString();}var E=G+"-"+F+"-"+H;return !this.validateDateRange(E,this.enabledFrom,this.enabledTo);},validateDate:function(K){var I=[31,28,31,30,31,30,31,31,30,31,30,31];var L=new Array(3);var N,J,P;var O=true;var M=K;if(M.length!=0){L=M.split("-");if(L.length!=3||L[1].length>2||L[2].length>2||L[1].length<1||L[2].length<1){O=false;}N=parseInt(L[0],10);J=parseInt(L[1],10);P=parseInt(L[2],10);if(isNaN(N)||isNaN(J)||isNaN(P)){O=false;}if(N<1900||N>2100){O=false;}if(((N%4==0)&&(N%100!=0))||(N%400==0)){I[1]=29;}if(J<1||J>12||P<1||P>I[J-1]){O=false;}}return O;},validateDateRange:function(D,E,F){if(Object.isNull(E)){E="0001-01-01";}if(Object.isNull(F)){F="9999-12-31";}return this.reFormatDateString(D)>=this.reFormatDateString(E)&&this.reFormatDateString(D)<=this.reFormatDateString(F);},reFormatDateString:function(J,L){var I=new Array(3);var K,H,G;if(J.length==0){return"";}if(J.indexOf("-")>-1){I=J.split("-");if(I.length!=3){return"";}K=I[0];H=I[1];G=I[2];}else{I=J.split("/");if(I.length!=3){return"";}K=I[2];H=I[0];G=I[1];}if(K.length<=2){K="19"+K;}if(H.length==1){H="0"+H;}if(G.length==1){G="0"+G;}return Object.isNull(L)||L?K+"-"+H+"-"+G:H+"/"+G+"/"+K;},getDayCount:function(F,E){var H=0;var G=new Array(31,28,31,30,31,30,31,31,30,31,30,31);if(E==0){H=31;}else{if(E==2){if((F%400==0)||(F%4==0&&F%100>0)){H=29;}else{H=28;}}else{H=G[E-1];}}return H;},getDateHTML:function(Y,c){var b='<td onmouseover="$(this).toggleClass(\'hover\')" onmouseout="$(this).toggleClass(\'hover\')" class="{1}">{0}</td>';var g='<td class="Close">{0}</td>';var e='<td onmouseover="$(this).toggleClass(\'hover\')" onmouseout="$(this).toggleClass(\'hover\')" class="{1}">{0}</td>';var Z=new StringBuilder();Z.append(String.format('<table date="{0}-{1}-" width="140" height="115" cellspacing="0" cellpadding="0">',Y,c));Z.append(this.weakHTML);var h=this.getDayCount(Y,c);var d=new Date(Y,c-1,1);var j=d.getDay();var W="";var a=1;var l=h+j;var V=1;for(var X=0;X<l;X++){if(X%7==0){Z.append("<tr>");}if(this.isDisabledDay(Y,c,V)){W=g;}else{if(X%7==0||(X+1)%7==0){W=e;}else{W=b;}}var k="";var U=this.reFormatDateString(Y+"-"+c+"-"+V);if(U==this.selectedDate){k="selected";}if(U==this.getTodayString()){k="newdate";}if(X<j){Z.append(String.format(W,"",""));}else{Z.append(String.format(W,V,k));V++;}if(X%7==6){Z.append("</tr>");}}var f=new Date(Y,c-1,h);var i=f.getDay();var T=6-i;for(var X=0;X<T;X++){if((X+1)%7!=0){Z.append(String.format(b,""));}else{Z.append(String.format(e,""));}}Z.append("</tr></table>");return Z.toString();},getTodayString:function(){var B=new Date();return this.getDateString(B);},getDateString:function(L){var I=L.getMonth()+1;var K=L.getDate();var J=I>9?I.toString():"0"+I.toString();var G=K>9?K.toString():"0"+K.toString();var H=L.getFullYear().toString()+"-"+J+"-"+G;return H;},dispose:function(){if(this.windowElement){this.windowElement.fadeOut("normal");FunctionExt.defer(function(){if(this.windowElement){Globals.closeIE6Fliter(this.ie6FilterIFrame);this.windowElement.remove();this.destroyEvent();this.destroyDOM();}}.bind(this),500);}}});var Dialog=Elong.Control.Dialog;Dialog=Class.create();Object.extend(Dialog.prototype,{name:"Dialog",windowTemplate:new Template('<div class="com_dialog com_widget com_widget-content com_corner-all com_draggable" style="#{width};#{height};">#{titleRegion}<div class="com_dialog-content com_widget-content">#{content}</div></div>'),titleTemplate:'<div class="com_dialog-titlebar com_widget-header com_corner-all com_helper-clearfix"><span class="com_dialog-title">{0}</span><a class="com_dialog-titlebar-close com_corner-all" href="#?" method="close">	<span class="com_icon com_icon-closethick">close</span></a></div>',options:{title:"对话框",htmlContent:"",initEvent:null,width:380,height:0},initialize:function(B){Object.extend(Object.extend(this,this.options),B);this.initializeDOM();this.window=new LightBox(this.windowElement,this.overlayer);if($.browser.msie&&$.browser.version<=6){this.window.Fixed=false;}if(this.windowElement.find("div.com_dialog-titlebar:eq(0)").length>0){this.drag=new Drag(this.windowElement,this.windowElement.find("div.com_dialog-titlebar:eq(0)"));}this.overLay=this.window.OverLay;this.overLay.Color="#cccccc";this.windowElement.find("[method='close']").bind("click",function(A){this.close();}.bindAsEventListener(this));this.initEvent(this.windowElement);},initializeDOM:function(){this.contentEndRegion=$("#m_contentend");var content=this.windowTemplate.eval({titleRegion:String.isNullOrEmpty(this.title)?"<div></div>":String.format(this.titleTemplate,this.title),content:this.htmlContent,width:"width:"+this.width+"px",height:this.height>0?"height:"+this.height+"px":""});this.windowElement=$(content).appendTo(this.contentEndRegion);this.overlayer=$("<div></div>").appendTo(this.contentEndRegion);},destroyDOM:function(){this.htmlContent="";this.windowElement.remove();this.overlayer.remove();this.windowElement=null;this.contentEndRegion=null;},show:function(){this.window.Show();},close:function(){this.window.Close();this.destroyDOM();}});var OverLay=Class.create();OverLay.prototype={initialize:function(D,C){this.Lay=D.get(0);this._size=function(){};this.SetOptions(C);this.Color=this.options.Color;this.Opacity=parseInt(this.options.Opacity);this.zIndex=parseInt(this.options.zIndex);this.Set();},SetOptions:function(B){this.options={Color:"#fff",Opacity:50,zIndex:1000};Object.extend(this.options,B||{});},Set:function(){this.Lay.style.display="none";this.Lay.style.zIndex=this.zIndex;this.Lay.style.left=this.Lay.style.top=0;if(this.isIE6()){this.Lay.style.position="absolute";this._size=function(){this.Lay.style.width=Math.max(document.documentElement.scrollWidth,document.documentElement.clientWidth)+"px";this.Lay.style.height=Math.max(document.documentElement.scrollHeight,document.documentElement.clientHeight)+"px";}.bind(this);this.Lay.innerHTML='<iframe style="position:absolute;top:0;left:0;width:100%;height:100%;filter:alpha(opacity=0);"></iframe>';}else{this.Lay.style.position="fixed";this.Lay.style.width=this.Lay.style.height="100%";}},Show:function(){this.Lay.style.backgroundColor=this.Color;if($.browser.msie){this.Lay.style.filter="alpha(opacity:"+this.Opacity+")";}else{this.Lay.style.opacity=this.Opacity/100;}if(this.isIE6()){this._size();window.attachEvent("onresize",this._size);}this.Lay.style.display="block";},isIE6:function(){return $.browser.msie&&$.browser.version==6;},Close:function(){this.Lay.style.display="none";if(this.isIE6()){window.detachEvent("onresize",this._size);}}};var LightBox=Class.create();LightBox.prototype={initialize:function(D,F,E){this.Box=D.get(0);this.OverLay=new OverLay(F,E);this.SetOptions(E);this.Fixed=!!this.options.Fixed;this.Over=!!this.options.Over;this.Center=!!this.options.Center;this.onShow=this.options.onShow;this.Box.style.zIndex=this.OverLay.zIndex+1;this.Box.style.display="none";if(this.isIE6()){this._top=this._left=0;this._select=[];}},SetOptions:function(B){this.options={Fixed:true,Over:true,Center:true,onShow:function(){}};Object.extend(this.options,B||{});},_fixed:function(){var C=document.documentElement.scrollTop-this._top+this.Box.offsetTop,D=document.documentElement.scrollLeft-this._left+this.Box.offsetLeft;if(this.Center){C+=this.Box.offsetHeight/2;D+=this.Box.offsetWidth/2;}this.Box.style.top=C+"px";this.Box.style.left=D+"px";this._top=document.documentElement.scrollTop;this._left=document.documentElement.scrollLeft;},Show:function(G){if(this.Fixed){if(this.isIE6()){this.Box.style.position="absolute";this._top=document.documentElement.scrollTop;this._left=document.documentElement.scrollLeft;window.attachEvent("onscroll",this._fixed.bind(this));}else{this.Box.style.position="fixed";}}else{this.Box.style.position="absolute";}if(this.Over){this.OverLay.Show();}else{if(this.isIE6()){this._select=[];var E=this;Each(document.getElementsByTagName("select"),function(A){if(E.Box.contains?!E.Box.contains(A):!(E.Box.compareDocumentPosition(A)&16)){A.style.visibility="hidden";E._select.push(A);}});}}this.Box.style.display="block";if(this.Center){this.Box.style.top=this.Box.style.left="50%";var H=-this.Box.offsetHeight/2,F=-this.Box.offsetWidth/2;if(!this.Fixed||this.isIE6()){H+=document.documentElement.scrollTop;F+=document.documentElement.scrollLeft;}this.Box.style.marginTop=H+"px";this.Box.style.marginLeft=F+"px";}this.onShow();},isIE6:function(){return $.browser.msie&&$.browser.version==6;},Close:function(){this.Box.style.display="none";this.OverLay.Close();}};function addEventHandler(F,D,E){if(F.addEventListener){F.addEventListener(D,E,false);}else{if(F.attachEvent){F.attachEvent("on"+D,E);}else{F["on"+D]=E;}}}function removeEventHandler(F,D,E){if(F.removeEventListener){F.removeEventListener(D,E,false);}else{if(F.detachEvent){F.detachEvent("on"+D,E);}else{F["on"+D]=null;}}}if(!$.browser.msie){HTMLElement.prototype.__defineGetter__("currentStyle",function(){return this.ownerDocument.defaultView.getComputedStyle(this,null);});}var Drag=Class.create();Drag.prototype={initialize:function(H,F,G){var E=this;this._obj=H.get(0);this.Drag=F.get(0);this._x=this._y=0;this._fM=function(A){E.Move(window.event||A);};this._fS=function(){E.Stop();};this.SetOptions(G);this.Limit=!!this.options.Limit;this.mxLeft=parseInt(this.options.mxLeft);this.mxRight=parseInt(this.options.mxRight);this.mxTop=parseInt(this.options.mxTop);this.mxBottom=parseInt(this.options.mxBottom);this.mxContainer=this.options.mxContainer;this.onMove=this.options.onMove;this.Lock=!!this.options.Lock;this._obj.style.position="absolute";addEventHandler(this.Drag,"mousedown",function(A){E.Start(window.event||A);});},SetOptions:function(B){this.options={Limit:true,mxLeft:0,mxRight:0,mxTop:0,mxBottom:0,mxContainer:document.documentElement,onMove:function(){},Lock:false};Object.extend(this.options,B||{});},Start:function(B){if(this.Lock){return;}this._x=B.clientX-this._obj.offsetLeft;this._y=B.clientY-this._obj.offsetTop;addEventHandler(document,"mousemove",this._fM);addEventHandler(document,"mouseup",this._fS);if($.browser.msie){addEventHandler(this.Drag,"losecapture",this._fS);this.Drag.setCapture();}else{addEventHandler(window,"blur",this._fS);}},Move:function(H){if(this.Lock){this.Stop();return;}window.getSelection&&window.getSelection().removeAllRanges();var J=H.clientX-this._x,G=H.clientY-this._y;if(this.Limit){if(!!this.mxContainer){this.mxLeft=this.mxTop=0;this.mxRight=this.mxContainer.clientWidth;this.mxBottom=this.mxContainer.clientHeight;}var F=J+this._obj.offsetWidth-this.mxRight,I=G+this._obj.offsetHeight-this.mxBottom;if(F>0){J-=F;}if(I>0){G-=I;}if(this.mxLeft>J){J=this.mxLeft;}if(this.mxTop>G){G=this.mxTop;}}this._obj.style.left=J-(parseInt(this._obj.currentStyle.marginLeft)||0)+"px";this._obj.style.top=G-(parseInt(this._obj.currentStyle.marginTop)||0)+"px";this.onMove();},Stop:function(){removeEventHandler(document,"mousemove",this._fM);removeEventHandler(document,"mouseup",this._fS);if($.browser.msie){removeEventHandler(this.Drag,"losecapture",this._fS);this.Drag.releaseCapture();}else{removeEventHandler(window,"blur",this._fS);}}};var SelectDropListWindow=Elong.Control.SelectDropListWindow;SelectDropListWindow=Class.create();Object.extend(SelectDropListWindow.prototype,{name:"SelectDropListWindow",popRegion:'<div class="com_cbox_p" style="display:none; position: absolute; z-index: 10;"><ul></ul><div class="com_cbox_b com_cbox_lt"></div><div class="com_cbox_b com_cbox_rt"></div><div class="com_cbox_b com_cbox_lb"></div><div class="com_cbox_b com_cbox_rb"></div><div class="clear"></div></div>',listTemplate:new Template('<li class="li_q" method="select" value="#{Value}">#{Name}</li>'),options:{eventElement:null,data:null,onSelected:null,fieldName:"Name",singleColumn:false},initialize:function(B){Object.extend(Object.extend(this,this.options),B);if(Object.isNull(this.data)||this.data.length==0){return;}this.initializeDOM();this.initializeEvent();this.render();},initializeDOM:function(){this.contentEndRegion=$("#m_contentend");this.windowElement=$(this.popRegion).appendTo(this.contentEndRegion);if(this.singleColumn){this.windowElement.addClass("com_cbox_p1");}},destroyDOM:function(){this.data=null;this.windowElement=null;this.contentEndRegion=null;},initializeEvent:function(){this.windowElement.bind("click",this.onClickRegion.bindAsEventListener(this));this.windowElement.bind("mouseout",this.onMouseOutRegion.bindAsEventListener(this));this.windowElement.bind("mouseover",this.onMouseOverRegion.bindAsEventListener(this));FunctionExt.defer(this.onOutClick.bindAsEventListener(this),100);},destroyEvent:function(){this.windowElement.unbind("click");$(document).unbind("click",this.onOutClickHandler);this.windowElement.unbind("mouseout");this.windowElement.unbind("mouseover");},onOutClick:function(){this.onOutClickHandler=function(C){var D=Event.element(C);if(this.windowElement.find(":descendant").index(D)==-1){this.dispose();}}.bindAsEventListener(this);$(document).one("click",this.onOutClickHandler);},onClickRegion:function(F){var E=Event.element(F);var D=E.attr("method");switch(D){case"select":if(!Object.isNull(this.onSelected)){this.onSelected(E.attr("value"));}this.dispose();break;case"close":this.dispose();break;}},onMouseOverRegion:function(C){var D=Event.element(C);if(this.outTimer!=null){clearTimeout(this.outTimer);this.outTimer=null;}if(D.is("li")&&!D.hasClass("hr_w")){D.addClass("li_cur");}},onMouseOutRegion:function(C){var D=Event.element(C);this.outTimer=FunctionExt.defer(function(){this.dispose();},0.01,this);if(D.is("li")){D.removeClass("li_cur");}},render:function(){var region=this.windowElement.find("ul");var sb=new StringBuilder();for(var i=0;i<this.data.length;i++){if(Object.isNull(this.data[i])){continue;}sb.append(this.listTemplate.eval({Name:this.data[i][this.fieldName],Value:i}));if(!this.singleColumn&&i%3==2&&i!=this.data.length-1){sb.append('<li class="clear hr_w"></li>');}}region.html(sb.toString());var top=this.eventElement.offset().top+this.eventElement.height()+6;var left=this.eventElement.offset().left;this.windowElement[0].style.top=top+"px";this.windowElement[0].style.left=left+"px";this.ie6FilterIFrame=Globals.addIE6Filter(this.windowElement.width(),this.windowElement.height(),left,top);this.windowElement.show();},dispose:function(){if(this.windowElement){this.windowElement.fadeOut("normal");FunctionExt.defer(function(){if(this.windowElement){Globals.closeIE6Fliter(this.ie6FilterIFrame);this.windowElement.remove();this.destroyEvent();this.destroyDOM();}}.bind(this),500);}}});