var Prototype={Version:"1.7",Browser:(function(){var B=navigator.userAgent;
var A=Object.prototype.toString.call(window.opera)=="[object Opera]";
return{IE:!!window.attachEvent&&!A,Opera:A,WebKit:B.indexOf("AppleWebKit/")>-1,Gecko:B.indexOf("Gecko")>-1&&B.indexOf("KHTML")===-1,MobileSafari:/Apple.*Mobile/.test(B)}
})(),BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:(function(){var A=window.Element||window.HTMLElement;
return !!(A&&A.prototype)
})(),SpecificElementExtensions:(function(){if(typeof window.HTMLDivElement!=="undefined"){return true
}var C=document.createElement("div"),B=document.createElement("form"),A=false;
if(C["__proto__"]&&(C["__proto__"]!==B["__proto__"])){A=true
}C=B=null;
return A
})()},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(A){return A
}};
if(Prototype.Browser.MobileSafari){Prototype.BrowserFeatures.SpecificElementExtensions=false
}var Abstract={};
var Try={these:function(){var C;
for(var B=0,D=arguments.length;
B<D;
B++){var A=arguments[B];
try{C=A();
break
}catch(E){}}return C
}};
var Class=(function(){var D=(function(){for(var E in {toString:1}){if(E==="toString"){return false
}}return true
})();
function A(){}function B(){var H=null,G=$A(arguments);
if(Object.isFunction(G[0])){H=G.shift()
}function E(){this.initialize.apply(this,arguments)
}Object.extend(E,Class.Methods);
E.superclass=H;
E.subclasses=[];
if(H){A.prototype=H.prototype;
E.prototype=new A;
H.subclasses.push(E)
}for(var F=0,I=G.length;
F<I;
F++){E.addMethods(G[F])
}if(!E.prototype.initialize){E.prototype.initialize=Prototype.emptyFunction
}E.prototype.constructor=E;
return E
}function C(K){var G=this.superclass&&this.superclass.prototype,F=Object.keys(K);
if(D){if(K.toString!=Object.prototype.toString){F.push("toString")
}if(K.valueOf!=Object.prototype.valueOf){F.push("valueOf")
}}for(var E=0,H=F.length;
E<H;
E++){var J=F[E],I=K[J];
if(G&&Object.isFunction(I)&&I.argumentNames()[0]=="$super"){var L=I;
I=(function(M){return function(){return G[M].apply(this,arguments)
}
})(J).wrap(L);
I.valueOf=L.valueOf.bind(L);
I.toString=L.toString.bind(L)
}this.prototype[J]=I
}return this
}return{create:B,Methods:{addMethods:C}}
})();
(function(){var c=Object.prototype.toString,b="Null",O="Undefined",V="Boolean",F="Number",S="String",h="Object",T="[object Function]",Y="[object Boolean]",G="[object Number]",L="[object String]",H="[object Array]",X="[object Date]",I=window.JSON&&typeof JSON.stringify==="function"&&JSON.stringify(0)==="0"&&typeof JSON.stringify(Prototype.K)==="undefined";
function K(j){switch(j){case null:return b;
case (void 0):return O
}var i=typeof j;
switch(i){case"boolean":return V;
case"number":return F;
case"string":return S
}return h
}function Z(i,k){for(var j in k){i[j]=k[j]
}return i
}function g(i){try{if(C(i)){return"undefined"
}if(i===null){return"null"
}return i.inspect?i.inspect():String(i)
}catch(j){if(j instanceof RangeError){return"..."
}throw j
}}function d(i){return f("",{"":i},[])
}function f(s,p,q){var r=p[s],o=typeof r;
if(K(r)===h&&typeof r.toJSON==="function"){r=r.toJSON(s)
}var l=c.call(r);
switch(l){case G:case Y:case L:r=r.valueOf()
}switch(r){case null:return"null";
case true:return"true";
case false:return"false"
}o=typeof r;
switch(o){case"string":return r.inspect(true);
case"number":return isFinite(r)?String(r):"null";
case"object":for(var k=0,j=q.length;
k<j;
k++){if(q[k]===r){throw new TypeError()
}}q.push(r);
var n=[];
if(l===H){for(var k=0,j=r.length;
k<j;
k++){var m=f(k,r,q);
n.push(typeof m==="undefined"?"null":m)
}n="["+n.join(",")+"]"
}else{var t=Object.keys(r);
for(var k=0,j=t.length;
k<j;
k++){var s=t[k],m=f(s,r,q);
if(typeof m!=="undefined"){n.push(s.inspect(true)+":"+m)
}}n="{"+n.join(",")+"}"
}q.pop();
return n
}}function W(i){return JSON.stringify(i)
}function J(i){return $H(i).toQueryString()
}function P(i){return i&&i.toHTML?i.toHTML():String.interpret(i)
}function R(i){if(K(i)!==h){throw new TypeError()
}var j=[];
for(var k in i){if(i.hasOwnProperty(k)){j.push(k)
}}return j
}function D(i){var j=[];
for(var k in i){j.push(i[k])
}return j
}function a(i){return Z({},i)
}function U(i){return !!(i&&i.nodeType==1)
}function M(i){return c.call(i)===H
}var B=(typeof Array.isArray=="function")&&Array.isArray([])&&!Array.isArray({});
if(B){M=Array.isArray
}function E(i){return i instanceof Hash
}function A(i){return c.call(i)===T
}function N(i){return c.call(i)===L
}function Q(i){return c.call(i)===G
}function e(i){return c.call(i)===X
}function C(i){return typeof i==="undefined"
}Z(Object,{extend:Z,inspect:g,toJSON:I?W:d,toQueryString:J,toHTML:P,keys:Object.keys||R,values:D,clone:a,isElement:U,isArray:M,isHash:E,isFunction:A,isString:N,isNumber:Q,isDate:e,isUndefined:C})
})();
Object.extend(Function.prototype,(function(){var K=Array.prototype.slice;
function D(O,L){var N=O.length,M=L.length;
while(M--){O[N+M]=L[M]
}return O
}function I(M,L){M=K.call(M,0);
return D(M,L)
}function G(){var L=this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\//g,"").replace(/\s+/g,"").split(",");
return L.length==1&&!L[0]?[]:L
}function H(N){if(arguments.length<2&&Object.isUndefined(arguments[0])){return this
}var L=this,M=K.call(arguments,1);
return function(){var O=I(M,arguments);
return L.apply(N,O)
}
}function F(N){var L=this,M=K.call(arguments,1);
return function(P){var O=D([P||window.event],M);
return L.apply(N,O)
}
}function J(){if(!arguments.length){return this
}var L=this,M=K.call(arguments,0);
return function(){var N=I(M,arguments);
return L.apply(this,N)
}
}function E(N){var L=this,M=K.call(arguments,1);
N=N*1000;
return window.setTimeout(function(){return L.apply(L,M)
},N)
}function A(){var L=D([0.01],arguments);
return this.delay.apply(this,L)
}function C(M){var L=this;
return function(){var N=D([L.bind(this)],arguments);
return M.apply(this,N)
}
}function B(){if(this._methodized){return this._methodized
}var L=this;
return this._methodized=function(){var M=D([this],arguments);
return L.apply(null,M)
}
}return{argumentNames:G,bind:H,bindAsEventListener:F,curry:J,delay:E,defer:A,wrap:C,methodize:B}
})());
(function(C){function B(){return this.getUTCFullYear()+"-"+(this.getUTCMonth()+1).toPaddedString(2)+"-"+this.getUTCDate().toPaddedString(2)+"T"+this.getUTCHours().toPaddedString(2)+":"+this.getUTCMinutes().toPaddedString(2)+":"+this.getUTCSeconds().toPaddedString(2)+"Z"
}function A(){return this.toISOString()
}if(!C.toISOString){C.toISOString=B
}if(!C.toJSON){C.toJSON=A
}})(Date.prototype);
RegExp.prototype.match=RegExp.prototype.test;
RegExp.escape=function(A){return String(A).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")
};
var PeriodicalExecuter=Class.create({initialize:function(B,A){this.callback=B;
this.frequency=A;
this.currentlyExecuting=false;
this.registerCallback()
},registerCallback:function(){this.timer=setInterval(this.onTimerEvent.bind(this),this.frequency*1000)
},execute:function(){this.callback(this)
},stop:function(){if(!this.timer){return 
}clearInterval(this.timer);
this.timer=null
},onTimerEvent:function(){if(!this.currentlyExecuting){try{this.currentlyExecuting=true;
this.execute();
this.currentlyExecuting=false
}catch(A){this.currentlyExecuting=false;
throw A
}}}});
Object.extend(String,{interpret:function(A){return A==null?"":String(A)
},specialChar:{"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\\":"\\\\"}});
Object.extend(String.prototype,(function(){var NATIVE_JSON_PARSE_SUPPORT=window.JSON&&typeof JSON.parse==="function"&&JSON.parse('{"test": true}').test;
function prepareReplacement(replacement){if(Object.isFunction(replacement)){return replacement
}var template=new Template(replacement);
return function(match){return template.evaluate(match)
}
}function gsub(pattern,replacement){var result="",source=this,match;
replacement=prepareReplacement(replacement);
if(Object.isString(pattern)){pattern=RegExp.escape(pattern)
}if(!(pattern.length||pattern.source)){replacement=replacement("");
return replacement+source.split("").join(replacement)+replacement
}while(source.length>0){if(match=source.match(pattern)){result+=source.slice(0,match.index);
result+=String.interpret(replacement(match));
source=source.slice(match.index+match[0].length)
}else{result+=source,source=""
}}return result
}function sub(pattern,replacement,count){replacement=prepareReplacement(replacement);
count=Object.isUndefined(count)?1:count;
return this.gsub(pattern,function(match){if(--count<0){return match[0]
}return replacement(match)
})
}function scan(pattern,iterator){this.gsub(pattern,iterator);
return String(this)
}function truncate(length,truncation){length=length||30;
truncation=Object.isUndefined(truncation)?"...":truncation;
return this.length>length?this.slice(0,length-truncation.length)+truncation:String(this)
}function strip(){return this.replace(/^\s+/,"").replace(/\s+$/,"")
}function stripTags(){return this.replace(/<\w+(\s+("[^"]*"|'[^']*'|[^>])+)?>|<\/\w+>/gi,"")
}function stripScripts(){return this.replace(new RegExp(Prototype.ScriptFragment,"img"),"")
}function extractScripts(){var matchAll=new RegExp(Prototype.ScriptFragment,"img"),matchOne=new RegExp(Prototype.ScriptFragment,"im");
return(this.match(matchAll)||[]).map(function(scriptTag){var result=(scriptTag.match(matchOne)||["",""])[1];
result=result.replace(/</,"&lt;").replace(/\s*&lt;!--[^\r\n]*/,"");
return result
})
}function evalScripts(){return this.extractScripts().map(function(script){return eval(script)
})
}function escapeHTML(){return this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")
}function unescapeHTML(){return this.stripTags().replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")
}function toQueryParams(separator){var match=this.strip().match(/([^?#]*)(#.*)?$/);
if(!match){return{}
}return match[1].split(separator||"&").inject({},function(hash,pair){if((pair=pair.split("="))[0]){var key=decodeURIComponent(pair.shift()),value=pair.length>1?pair.join("="):pair[0];
if(value!=undefined){value=decodeURIComponent(value)
}if(key in hash){if(!Object.isArray(hash[key])){hash[key]=[hash[key]]
}hash[key].push(value)
}else{hash[key]=value
}}return hash
})
}function toArray(){return this.split("")
}function succ(){return this.slice(0,this.length-1)+String.fromCharCode(this.charCodeAt(this.length-1)+1)
}function times(count){return count<1?"":new Array(count+1).join(this)
}function camelize(){return this.replace(/-+(.)?/g,function(match,chr){return chr?chr.toUpperCase():""
})
}function capitalize(){return this.charAt(0).toUpperCase()+this.substring(1).toLowerCase()
}function underscore(){return this.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/-/g,"_").toLowerCase()
}function dasherize(){return this.replace(/_/g,"-")
}function inspect(useDoubleQuotes){var escapedString=this.replace(/[\x00-\x1f\\]/g,function(character){if(character in String.specialChar){return String.specialChar[character]
}return"\\u00"+character.charCodeAt().toPaddedString(2,16)
});
if(useDoubleQuotes){return'"'+escapedString.replace(/"/g,'\\"')+'"'
}return"'"+escapedString.replace(/'/g,"\\'")+"'"
}function unfilterJSON(filter){return this.replace(filter||Prototype.JSONFilter,"$1")
}function isJSON(){var str=this;
if(str.blank()){return false
}str=str.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@");
str=str.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]");
str=str.replace(/(?:^|:|,)(?:\s*\[)+/g,"");
return(/^[\],:{}\s]*$/).test(str)
}function evalJSON(sanitize){var json=this.unfilterJSON(),cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
if(cx.test(json)){json=json.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)
})
}try{if(!sanitize||json.isJSON()){return eval("("+json+")")
}}catch(e){}throw new SyntaxError("Badly formed JSON string: "+this.inspect())
}function parseJSON(){var json=this.unfilterJSON();
return JSON.parse(json)
}function include(pattern){return this.indexOf(pattern)>-1
}function startsWith(pattern){return this.lastIndexOf(pattern,0)===0
}function endsWith(pattern){var d=this.length-pattern.length;
return d>=0&&this.indexOf(pattern,d)===d
}function empty(){return this==""
}function blank(){return/^\s*$/.test(this)
}function interpolate(object,pattern){return new Template(this,pattern).evaluate(object)
}return{gsub:gsub,sub:sub,scan:scan,truncate:truncate,strip:String.prototype.trim||strip,stripTags:stripTags,stripScripts:stripScripts,extractScripts:extractScripts,evalScripts:evalScripts,escapeHTML:escapeHTML,unescapeHTML:unescapeHTML,toQueryParams:toQueryParams,parseQuery:toQueryParams,toArray:toArray,succ:succ,times:times,camelize:camelize,capitalize:capitalize,underscore:underscore,dasherize:dasherize,inspect:inspect,unfilterJSON:unfilterJSON,isJSON:isJSON,evalJSON:NATIVE_JSON_PARSE_SUPPORT?parseJSON:evalJSON,include:include,startsWith:startsWith,endsWith:endsWith,empty:empty,blank:blank,interpolate:interpolate}
})());
var Template=Class.create({initialize:function(A,B){this.template=A.toString();
this.pattern=B||Template.Pattern
},evaluate:function(A){if(A&&Object.isFunction(A.toTemplateReplacements)){A=A.toTemplateReplacements()
}return this.template.gsub(this.pattern,function(D){if(A==null){return(D[1]+"")
}var F=D[1]||"";
if(F=="\\"){return D[2]
}var B=A,G=D[3],E=/^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/;
D=E.exec(G);
if(D==null){return F
}while(D!=null){var C=D[1].startsWith("[")?D[2].replace(/\\\\]/g,"]"):D[1];
B=B[C];
if(null==B||""==D[3]){break
}G=G.substring("["==D[3]?D[1].length:D[0].length);
D=E.exec(G)
}return F+String.interpret(B)
})
}});
Template.Pattern=/(^|.|\r|\n)(#\{(.*?)\})/;
var $break={};
var Enumerable=(function(){function C(Y,X){var W=0;
try{this._each(function(a){Y.call(X,a,W++)
})
}catch(Z){if(Z!=$break){throw Z
}}return this
}function R(Z,Y,X){var W=-Z,a=[],b=this.toArray();
if(Z<1){return b
}while((W+=Z)<b.length){a.push(b.slice(W,W+Z))
}return a.collect(Y,X)
}function B(Y,X){Y=Y||Prototype.K;
var W=true;
this.each(function(a,Z){W=W&&!!Y.call(X,a,Z);
if(!W){throw $break
}});
return W
}function I(Y,X){Y=Y||Prototype.K;
var W=false;
this.each(function(a,Z){if(W=!!Y.call(X,a,Z)){throw $break
}});
return W
}function J(Y,X){Y=Y||Prototype.K;
var W=[];
this.each(function(a,Z){W.push(Y.call(X,a,Z))
});
return W
}function T(Y,X){var W;
this.each(function(a,Z){if(Y.call(X,a,Z)){W=a;
throw $break
}});
return W
}function H(Y,X){var W=[];
this.each(function(a,Z){if(Y.call(X,a,Z)){W.push(a)
}});
return W
}function G(Z,Y,X){Y=Y||Prototype.K;
var W=[];
if(Object.isString(Z)){Z=new RegExp(RegExp.escape(Z))
}this.each(function(b,a){if(Z.match(b)){W.push(Y.call(X,b,a))
}});
return W
}function A(W){if(Object.isFunction(this.indexOf)){if(this.indexOf(W)!=-1){return true
}}var X=false;
this.each(function(Y){if(Y==W){X=true;
throw $break
}});
return X
}function Q(X,W){W=Object.isUndefined(W)?null:W;
return this.eachSlice(X,function(Y){while(Y.length<X){Y.push(W)
}return Y
})
}function L(W,Y,X){this.each(function(a,Z){W=Y.call(X,W,a,Z)
});
return W
}function V(X){var W=$A(arguments).slice(1);
return this.map(function(Y){return Y[X].apply(Y,W)
})
}function P(Y,X){Y=Y||Prototype.K;
var W;
this.each(function(a,Z){a=Y.call(X,a,Z);
if(W==null||a>=W){W=a
}});
return W
}function N(Y,X){Y=Y||Prototype.K;
var W;
this.each(function(a,Z){a=Y.call(X,a,Z);
if(W==null||a<W){W=a
}});
return W
}function E(Z,X){Z=Z||Prototype.K;
var Y=[],W=[];
this.each(function(b,a){(Z.call(X,b,a)?Y:W).push(b)
});
return[Y,W]
}function F(X){var W=[];
this.each(function(Y){W.push(Y[X])
});
return W
}function D(Y,X){var W=[];
this.each(function(a,Z){if(!Y.call(X,a,Z)){W.push(a)
}});
return W
}function M(X,W){return this.map(function(Z,Y){return{value:Z,criteria:X.call(W,Z,Y)}
}).sort(function(d,c){var Z=d.criteria,Y=c.criteria;
return Z<Y?-1:Z>Y?1:0
}).pluck("value")
}function O(){return this.map()
}function S(){var X=Prototype.K,W=$A(arguments);
if(Object.isFunction(W.last())){X=W.pop()
}var Y=[this].concat(W).map($A);
return this.map(function(a,Z){return X(Y.pluck(Z))
})
}function K(){return this.toArray().length
}function U(){return"#<Enumerable:"+this.toArray().inspect()+">"
}return{each:C,eachSlice:R,all:B,every:B,any:I,some:I,collect:J,map:J,detect:T,findAll:H,select:H,filter:H,grep:G,include:A,member:A,inGroupsOf:Q,inject:L,invoke:V,max:P,min:N,partition:E,pluck:F,reject:D,sortBy:M,toArray:O,entries:O,zip:S,size:K,inspect:U,find:T}
})();
function $A(C){if(!C){return[]
}if("toArray" in Object(C)){return C.toArray()
}var B=C.length||0,A=new Array(B);
while(B--){A[B]=C[B]
}return A
}function $w(A){if(!Object.isString(A)){return[]
}A=A.strip();
return A?A.split(/\s+/):[]
}Array.from=$A;
(function(){var R=Array.prototype,M=R.slice,O=R.forEach;
function B(W,V){for(var U=0,X=this.length>>>0;
U<X;
U++){if(U in this){W.call(V,this[U],U,this)
}}}if(!O){O=B
}function L(){this.length=0;
return this
}function D(){return this[0]
}function G(){return this[this.length-1]
}function I(){return this.select(function(U){return U!=null
})
}function T(){return this.inject([],function(V,U){if(Object.isArray(U)){return V.concat(U.flatten())
}V.push(U);
return V
})
}function H(){var U=M.call(arguments,0);
return this.select(function(V){return !U.include(V)
})
}function F(U){return(U===false?this.toArray():this)._reverse()
}function K(U){return this.inject([],function(X,W,V){if(0==V||(U?X.last()!=W:!X.include(W))){X.push(W)
}return X
})
}function P(U){return this.uniq().findAll(function(V){return U.detect(function(W){return V===W
})
})
}function Q(){return M.call(this,0)
}function J(){return this.length
}function S(){return"["+this.map(Object.inspect).join(", ")+"]"
}function A(W,U){U||(U=0);
var V=this.length;
if(U<0){U=V+U
}for(;
U<V;
U++){if(this[U]===W){return U
}}return -1
}function N(V,U){U=isNaN(U)?this.length:(U<0?this.length+U:U)+1;
var W=this.slice(0,U).reverse().indexOf(V);
return(W<0)?W:U-W-1
}function C(){var Z=M.call(this,0),X;
for(var V=0,W=arguments.length;
V<W;
V++){X=arguments[V];
if(Object.isArray(X)&&!("callee" in X)){for(var U=0,Y=X.length;
U<Y;
U++){Z.push(X[U])
}}else{Z.push(X)
}}return Z
}Object.extend(R,Enumerable);
if(!R._reverse){R._reverse=R.reverse
}Object.extend(R,{_each:O,clear:L,first:D,last:G,compact:I,flatten:T,without:H,reverse:F,uniq:K,intersect:P,clone:Q,toArray:Q,size:J,inspect:S});
var E=(function(){return[].concat(arguments)[0][0]!==1
})(1,2);
if(E){R.concat=C
}if(!R.indexOf){R.indexOf=A
}if(!R.lastIndexOf){R.lastIndexOf=N
}})();
function $H(A){return new Hash(A)
}var Hash=Class.create(Enumerable,(function(){function E(P){this._object=Object.isHash(P)?P.toObject():Object.clone(P)
}function F(Q){for(var P in this._object){var R=this._object[P],S=[P,R];
S.key=P;
S.value=R;
Q(S)
}}function J(P,Q){return this._object[P]=Q
}function C(P){if(this._object[P]!==Object.prototype[P]){return this._object[P]
}}function M(P){var Q=this._object[P];
delete this._object[P];
return Q
}function O(){return Object.clone(this._object)
}function N(){return this.pluck("key")
}function L(){return this.pluck("value")
}function G(Q){var P=this.detect(function(R){return R.value===Q
});
return P&&P.key
}function I(P){return this.clone().update(P)
}function D(P){return new Hash(P).inject(this,function(Q,R){Q.set(R.key,R.value);
return Q
})
}function B(P,Q){if(Object.isUndefined(Q)){return P
}return P+"="+encodeURIComponent(String.interpret(Q))
}function A(){return this.inject([],function(T,W){var S=encodeURIComponent(W.key),Q=W.value;
if(Q&&typeof Q=="object"){if(Object.isArray(Q)){var V=[];
for(var R=0,P=Q.length,U;
R<P;
R++){U=Q[R];
V.push(B(S,U))
}return T.concat(V)
}}else{T.push(B(S,Q))
}return T
}).join("&")
}function K(){return"#<Hash:{"+this.map(function(P){return P.map(Object.inspect).join(": ")
}).join(", ")+"}>"
}function H(){return new Hash(this)
}return{initialize:E,_each:F,set:J,get:C,unset:M,toObject:O,toTemplateReplacements:O,keys:N,values:L,index:G,merge:I,update:D,toQueryString:A,inspect:K,toJSON:O,clone:H}
})());
Hash.from=$H;
Object.extend(Number.prototype,(function(){function D(){return this.toPaddedString(2,16)
}function B(){return this+1
}function H(J,I){$R(0,this,true).each(J,I);
return this
}function G(K,J){var I=this.toString(J||10);
return"0".times(K-I.length)+I
}function A(){return Math.abs(this)
}function C(){return Math.round(this)
}function E(){return Math.ceil(this)
}function F(){return Math.floor(this)
}return{toColorPart:D,succ:B,times:H,toPaddedString:G,abs:A,round:C,ceil:E,floor:F}
})());
function $R(C,A,B){return new ObjectRange(C,A,B)
}var ObjectRange=Class.create(Enumerable,(function(){function B(F,D,E){this.start=F;
this.end=D;
this.exclusive=E
}function C(D){var E=this.start;
while(this.include(E)){D(E);
E=E.succ()
}}function A(D){if(D<this.start){return false
}if(this.exclusive){return D<this.end
}return D<=this.end
}return{initialize:B,_each:C,include:A}
})());
var Ajax={getTransport:function(){return Try.these(function(){return new XMLHttpRequest()
},function(){return new ActiveXObject("Msxml2.XMLHTTP")
},function(){return new ActiveXObject("Microsoft.XMLHTTP")
})||false
},activeRequestCount:0};
Ajax.Responders={responders:[],_each:function(A){this.responders._each(A)
},register:function(A){if(!this.include(A)){this.responders.push(A)
}},unregister:function(A){this.responders=this.responders.without(A)
},dispatch:function(D,B,C,A){this.each(function(E){if(Object.isFunction(E[D])){try{E[D].apply(E,[B,C,A])
}catch(F){}}})
}};
Object.extend(Ajax.Responders,Enumerable);
Ajax.Responders.register({onCreate:function(){Ajax.activeRequestCount++
},onComplete:function(){Ajax.activeRequestCount--
}});
Ajax.Base=Class.create({initialize:function(A){this.options={method:"post",asynchronous:true,contentType:"application/x-www-form-urlencoded",encoding:"UTF-8",parameters:"",evalJSON:true,evalJS:true};
Object.extend(this.options,A||{});
this.options.method=this.options.method.toLowerCase();
if(Object.isHash(this.options.parameters)){this.options.parameters=this.options.parameters.toObject()
}}});
Ajax.Request=Class.create(Ajax.Base,{_complete:false,initialize:function($super,B,A){$super(A);
this.transport=Ajax.getTransport();
this.request(B)
},request:function(B){this.url=B;
this.method=this.options.method;
var D=Object.isString(this.options.parameters)?this.options.parameters:Object.toQueryString(this.options.parameters);
if(!["get","post"].include(this.method)){D+=(D?"&":"")+"_method="+this.method;
this.method="post"
}if(D&&this.method==="get"){this.url+=(this.url.include("?")?"&":"?")+D
}this.parameters=D.toQueryParams();
try{var A=new Ajax.Response(this);
if(this.options.onCreate){this.options.onCreate(A)
}Ajax.Responders.dispatch("onCreate",this,A);
this.transport.open(this.method.toUpperCase(),this.url,this.options.asynchronous);
if(this.options.asynchronous){this.respondToReadyState.bind(this).defer(1)
}this.transport.onreadystatechange=this.onStateChange.bind(this);
this.setRequestHeaders();
this.body=this.method=="post"?(this.options.postBody||D):null;
this.transport.send(this.body);
if(!this.options.asynchronous&&this.transport.overrideMimeType){this.onStateChange()
}}catch(C){this.dispatchException(C)
}},onStateChange:function(){var A=this.transport.readyState;
if(A>1&&!((A==4)&&this._complete)){this.respondToReadyState(this.transport.readyState)
}},setRequestHeaders:function(){var E={"X-Requested-With":"XMLHttpRequest","X-Prototype-Version":Prototype.Version,"Accept":"text/javascript, text/html, application/xml, text/xml, */*"};
if(this.method=="post"){E["Content-type"]=this.options.contentType+(this.options.encoding?"; charset="+this.options.encoding:"");
if(this.transport.overrideMimeType&&(navigator.userAgent.match(/Gecko\/(\d{4})/)||[0,2005])[1]<2005){E["Connection"]="close"
}}if(typeof this.options.requestHeaders=="object"){var C=this.options.requestHeaders;
if(Object.isFunction(C.push)){for(var B=0,D=C.length;
B<D;
B+=2){E[C[B]]=C[B+1]
}}else{$H(C).each(function(F){E[F.key]=F.value
})
}}for(var A in E){this.transport.setRequestHeader(A,E[A])
}},success:function(){var A=this.getStatus();
return !A||(A>=200&&A<300)||A==304
},getStatus:function(){try{if(this.transport.status===1223){return 204
}return this.transport.status||0
}catch(A){return 0
}},respondToReadyState:function(A){var C=Ajax.Request.Events[A],B=new Ajax.Response(this);
if(C=="Complete"){try{this._complete=true;
(this.options["on"+B.status]||this.options["on"+(this.success()?"Success":"Failure")]||Prototype.emptyFunction)(B,B.headerJSON)
}catch(D){this.dispatchException(D)
}var E=B.getHeader("Content-type");
if(this.options.evalJS=="force"||(this.options.evalJS&&this.isSameOrigin()&&E&&E.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s*$/i))){this.evalResponse()
}}try{(this.options["on"+C]||Prototype.emptyFunction)(B,B.headerJSON);
Ajax.Responders.dispatch("on"+C,this,B,B.headerJSON)
}catch(D){this.dispatchException(D)
}if(C=="Complete"){this.transport.onreadystatechange=Prototype.emptyFunction
}},isSameOrigin:function(){var A=this.url.match(/^\s*https?:\/\/[^\/]*/);
return !A||(A[0]=="#{protocol}//#{domain}#{port}".interpolate({protocol:location.protocol,domain:document.domain,port:location.port?":"+location.port:""}))
},getHeader:function(A){try{return this.transport.getResponseHeader(A)||null
}catch(B){return null
}},evalResponse:function(){try{return eval((this.transport.responseText||"").unfilterJSON())
}catch(e){this.dispatchException(e)
}},dispatchException:function(A){(this.options.onException||Prototype.emptyFunction)(this,A);
Ajax.Responders.dispatch("onException",this,A)
}});
Ajax.Request.Events=["Uninitialized","Loading","Loaded","Interactive","Complete"];
Ajax.Response=Class.create({initialize:function(C){this.request=C;
var D=this.transport=C.transport,A=this.readyState=D.readyState;
if((A>2&&!Prototype.Browser.IE)||A==4){this.status=this.getStatus();
this.statusText=this.getStatusText();
this.responseText=String.interpret(D.responseText);
this.headerJSON=this._getHeaderJSON()
}if(A==4){var B=D.responseXML;
this.responseXML=Object.isUndefined(B)?null:B;
this.responseJSON=this._getResponseJSON()
}},status:0,statusText:"",getStatus:Ajax.Request.prototype.getStatus,getStatusText:function(){try{return this.transport.statusText||""
}catch(A){return""
}},getHeader:Ajax.Request.prototype.getHeader,getAllHeaders:function(){try{return this.getAllResponseHeaders()
}catch(A){return null
}},getResponseHeader:function(A){return this.transport.getResponseHeader(A)
},getAllResponseHeaders:function(){return this.transport.getAllResponseHeaders()
},_getHeaderJSON:function(){var A=this.getHeader("X-JSON");
if(!A){return null
}A=decodeURIComponent(escape(A));
try{return A.evalJSON(this.request.options.sanitizeJSON||!this.request.isSameOrigin())
}catch(B){this.request.dispatchException(B)
}},_getResponseJSON:function(){var A=this.request.options;
if(!A.evalJSON||(A.evalJSON!="force"&&!(this.getHeader("Content-type")||"").include("application/json"))||this.responseText.blank()){return null
}try{return this.responseText.evalJSON(A.sanitizeJSON||!this.request.isSameOrigin())
}catch(B){this.request.dispatchException(B)
}}});
Ajax.Updater=Class.create(Ajax.Request,{initialize:function($super,A,C,B){this.container={success:(A.success||A),failure:(A.failure||(A.success?null:A))};
B=Object.clone(B);
var D=B.onComplete;
B.onComplete=(function(E,F){this.updateContent(E.responseText);
if(Object.isFunction(D)){D(E,F)
}}).bind(this);
$super(C,B)
},updateContent:function(D){var C=this.container[this.success()?"success":"failure"],A=this.options;
if(!A.evalScripts){D=D.stripScripts()
}if(C=$(C)){if(A.insertion){if(Object.isString(A.insertion)){var B={};
B[A.insertion]=D;
C.insert(B)
}else{A.insertion(C,D)
}}else{C.update(D)
}}}});
Ajax.PeriodicalUpdater=Class.create(Ajax.Base,{initialize:function($super,A,C,B){$super(B);
this.onComplete=this.options.onComplete;
this.frequency=(this.options.frequency||2);
this.decay=(this.options.decay||1);
this.updater={};
this.container=A;
this.url=C;
this.start()
},start:function(){this.options.onComplete=this.updateComplete.bind(this);
this.onTimerEvent()
},stop:function(){this.updater.options.onComplete=undefined;
clearTimeout(this.timer);
(this.onComplete||Prototype.emptyFunction).apply(this,arguments)
},updateComplete:function(A){if(this.options.decay){this.decay=(A.responseText==this.lastText?this.decay*this.options.decay:1);
this.lastText=A.responseText
}this.timer=this.onTimerEvent.bind(this).delay(this.decay*this.frequency)
},onTimerEvent:function(){this.updater=new Ajax.Updater(this.container,this.url,this.options)
}});
function $(B){if(arguments.length>1){for(var A=0,D=[],C=arguments.length;
A<C;
A++){D.push($(arguments[A]))
}return D
}if(Object.isString(B)){B=document.getElementById(B)
}return Element.extend(B)
}if(Prototype.BrowserFeatures.XPath){document._getElementsByXPath=function(F,A){var C=[];
var E=document.evaluate(F,$(A)||document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);
for(var B=0,D=E.snapshotLength;
B<D;
B++){C.push(Element.extend(E.snapshotItem(B)))
}return C
}
}if(!Node){var Node={}
}if(!Node.ELEMENT_NODE){Object.extend(Node,{ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12})
}(function(C){function D(F,E){if(F==="select"){return false
}if("type" in E){return false
}return true
}var B=(function(){try{var E=document.createElement('<input name="x">');
return E.tagName.toLowerCase()==="input"&&E.name==="x"
}catch(F){return false
}})();
var A=C.Element;
C.Element=function(G,F){F=F||{};
G=G.toLowerCase();
var E=Element.cache;
if(B&&F.name){G="<"+G+' name="'+F.name+'">';
delete F.name;
return Element.writeAttribute(document.createElement(G),F)
}if(!E[G]){E[G]=Element.extend(document.createElement(G))
}var H=D(G,F)?E[G].cloneNode(false):document.createElement(G);
return Element.writeAttribute(H,F)
};
Object.extend(C.Element,A||{});
if(A){C.Element.prototype=A.prototype
}})(this);
Element.idCounter=1;
Element.cache={};
Element._purgeElement=function(B){var A=B._prototypeUID;
if(A){Element.stopObserving(B);
B._prototypeUID=void 0;
delete Element.Storage[A]
}};
Element.Methods={visible:function(A){return $(A).style.display!="none"
},toggle:function(A){A=$(A);
Element[Element.visible(A)?"hide":"show"](A);
return A
},hide:function(A){A=$(A);
A.style.display="none";
return A
},show:function(A){A=$(A);
A.style.display="";
return A
},remove:function(A){A=$(A);
A.parentNode.removeChild(A);
return A
},update:(function(){var D=(function(){var G=document.createElement("select"),H=true;
G.innerHTML='<option value="test">test</option>';
if(G.options&&G.options[0]){H=G.options[0].nodeName.toUpperCase()!=="OPTION"
}G=null;
return H
})();
var B=(function(){try{var G=document.createElement("table");
if(G&&G.tBodies){G.innerHTML="<tbody><tr><td>test</td></tr></tbody>";
var I=typeof G.tBodies[0]=="undefined";
G=null;
return I
}}catch(H){return true
}})();
var A=(function(){try{var G=document.createElement("div");
G.innerHTML="<link>";
var I=(G.childNodes.length===0);
G=null;
return I
}catch(H){return true
}})();
var C=D||B||A;
var F=(function(){var G=document.createElement("script"),I=false;
try{G.appendChild(document.createTextNode(""));
I=!G.firstChild||G.firstChild&&G.firstChild.nodeType!==3
}catch(H){I=true
}G=null;
return I
})();
function E(K,L){K=$(K);
var G=Element._purgeElement;
var M=K.getElementsByTagName("*"),J=M.length;
while(J--){G(M[J])
}if(L&&L.toElement){L=L.toElement()
}if(Object.isElement(L)){return K.update().insert(L)
}L=Object.toHTML(L);
var I=K.tagName.toUpperCase();
if(I==="SCRIPT"&&F){K.text=L;
return K
}if(C){if(I in Element._insertionTranslations.tags){while(K.firstChild){K.removeChild(K.firstChild)
}Element._getContentFromAnonymousElement(I,L.stripScripts()).each(function(N){K.appendChild(N)
})
}else{if(A&&Object.isString(L)&&L.indexOf("<link")>-1){while(K.firstChild){K.removeChild(K.firstChild)
}var H=Element._getContentFromAnonymousElement(I,L.stripScripts(),true);
H.each(function(N){K.appendChild(N)
})
}else{K.innerHTML=L.stripScripts()
}}}else{K.innerHTML=L.stripScripts()
}L.evalScripts.bind(L).defer();
return K
}return E
})(),replace:function(B,C){B=$(B);
if(C&&C.toElement){C=C.toElement()
}else{if(!Object.isElement(C)){C=Object.toHTML(C);
var A=B.ownerDocument.createRange();
A.selectNode(B);
C.evalScripts.bind(C).defer();
C=A.createContextualFragment(C.stripScripts())
}}B.parentNode.replaceChild(C,B);
return B
},insert:function(C,E){C=$(C);
if(Object.isString(E)||Object.isNumber(E)||Object.isElement(E)||(E&&(E.toElement||E.toHTML))){E={bottom:E}
}var D,F,B,G;
for(var A in E){D=E[A];
A=A.toLowerCase();
F=Element._insertionTranslations[A];
if(D&&D.toElement){D=D.toElement()
}if(Object.isElement(D)){F(C,D);
continue
}D=Object.toHTML(D);
B=((A=="before"||A=="after")?C.parentNode:C).tagName.toUpperCase();
G=Element._getContentFromAnonymousElement(B,D.stripScripts());
if(A=="top"||A=="after"){G.reverse()
}G.each(F.curry(C));
D.evalScripts.bind(D).defer()
}return C
},wrap:function(B,C,A){B=$(B);
if(Object.isElement(C)){$(C).writeAttribute(A||{})
}else{if(Object.isString(C)){C=new Element(C,A)
}else{C=new Element("div",C)
}}if(B.parentNode){B.parentNode.replaceChild(C,B)
}C.appendChild(B);
return C
},inspect:function(B){B=$(B);
var A="<"+B.tagName.toLowerCase();
$H({"id":"id","className":"class"}).each(function(F){var E=F.first(),C=F.last(),D=(B[E]||"").toString();
if(D){A+=" "+C+"="+D.inspect(true)
}});
return A+">"
},recursivelyCollect:function(A,C,D){A=$(A);
D=D||-1;
var B=[];
while(A=A[C]){if(A.nodeType==1){B.push(Element.extend(A))
}if(B.length==D){break
}}return B
},ancestors:function(A){return Element.recursivelyCollect(A,"parentNode")
},descendants:function(A){return Element.select(A,"*")
},firstDescendant:function(A){A=$(A).firstChild;
while(A&&A.nodeType!=1){A=A.nextSibling
}return $(A)
},immediateDescendants:function(B){var A=[],C=$(B).firstChild;
while(C){if(C.nodeType===1){A.push(Element.extend(C))
}C=C.nextSibling
}return A
},previousSiblings:function(A,B){return Element.recursivelyCollect(A,"previousSibling")
},nextSiblings:function(A){return Element.recursivelyCollect(A,"nextSibling")
},siblings:function(A){A=$(A);
return Element.previousSiblings(A).reverse().concat(Element.nextSiblings(A))
},match:function(B,A){B=$(B);
if(Object.isString(A)){return Prototype.Selector.match(B,A)
}return A.match(B)
},up:function(B,D,A){B=$(B);
if(arguments.length==1){return $(B.parentNode)
}var C=Element.ancestors(B);
return Object.isNumber(D)?C[D]:Prototype.Selector.find(C,D,A)
},down:function(B,C,A){B=$(B);
if(arguments.length==1){return Element.firstDescendant(B)
}return Object.isNumber(C)?Element.descendants(B)[C]:Element.select(B,C)[A||0]
},previous:function(B,C,A){B=$(B);
if(Object.isNumber(C)){A=C,C=false
}if(!Object.isNumber(A)){A=0
}if(C){return Prototype.Selector.find(B.previousSiblings(),C,A)
}else{return B.recursivelyCollect("previousSibling",A+1)[A]
}},next:function(B,D,A){B=$(B);
if(Object.isNumber(D)){A=D,D=false
}if(!Object.isNumber(A)){A=0
}if(D){return Prototype.Selector.find(B.nextSiblings(),D,A)
}else{var C=Object.isNumber(A)?A+1:1;
return B.recursivelyCollect("nextSibling",A+1)[A]
}},select:function(A){A=$(A);
var B=Array.prototype.slice.call(arguments,1).join(", ");
return Prototype.Selector.select(B,A)
},adjacent:function(A){A=$(A);
var B=Array.prototype.slice.call(arguments,1).join(", ");
return Prototype.Selector.select(B,A.parentNode).without(A)
},identify:function(A){A=$(A);
var B=Element.readAttribute(A,"id");
if(B){return B
}do{B="anonymous_element_"+Element.idCounter++
}while($(B));
Element.writeAttribute(A,"id",B);
return B
},readAttribute:function(C,A){C=$(C);
if(Prototype.Browser.IE){var B=Element._attributeTranslations.read;
if(B.values[A]){return B.values[A](C,A)
}if(B.names[A]){A=B.names[A]
}if(A.include(":")){return(!C.attributes||!C.attributes[A])?null:C.attributes[A].value
}}return C.getAttribute(A)
},writeAttribute:function(E,C,F){E=$(E);
var B={},D=Element._attributeTranslations.write;
if(typeof C=="object"){B=C
}else{B[C]=Object.isUndefined(F)?true:F
}for(var A in B){C=D.names[A]||A;
F=B[A];
if(D.values[A]){C=D.values[A](E,F)
}if(F===false||F===null){E.removeAttribute(C)
}else{if(F===true){E.setAttribute(C,C)
}else{E.setAttribute(C,F)
}}}return E
},getHeight:function(A){return Element.getDimensions(A).height
},getWidth:function(A){return Element.getDimensions(A).width
},classNames:function(A){return new Element.ClassNames(A)
},hasClassName:function(A,B){if(!(A=$(A))){return 
}var C=A.className;
return(C.length>0&&(C==B||new RegExp("(^|\\s)"+B+"(\\s|$)").test(C)))
},addClassName:function(A,B){if(!(A=$(A))){return 
}if(!Element.hasClassName(A,B)){A.className+=(A.className?" ":"")+B
}return A
},removeClassName:function(A,B){if(!(A=$(A))){return 
}A.className=A.className.replace(new RegExp("(^|\\s+)"+B+"(\\s+|$)")," ").strip();
return A
},toggleClassName:function(A,B){if(!(A=$(A))){return 
}return Element[Element.hasClassName(A,B)?"removeClassName":"addClassName"](A,B)
},cleanWhitespace:function(B){B=$(B);
var C=B.firstChild;
while(C){var A=C.nextSibling;
if(C.nodeType==3&&!/\S/.test(C.nodeValue)){B.removeChild(C)
}C=A
}return B
},empty:function(A){return $(A).innerHTML.blank()
},descendantOf:function(B,A){B=$(B),A=$(A);
if(B.compareDocumentPosition){return(B.compareDocumentPosition(A)&8)===8
}if(A.contains){return A.contains(B)&&A!==B
}while(B=B.parentNode){if(B==A){return true
}}return false
},scrollTo:function(A){A=$(A);
var B=Element.cumulativeOffset(A);
window.scrollTo(B[0],B[1]);
return A
},getStyle:function(B,C){B=$(B);
C=C=="float"?"cssFloat":C.camelize();
var D=B.style[C];
if(!D||D=="auto"){var A=document.defaultView.getComputedStyle(B,null);
D=A?A[C]:null
}if(C=="opacity"){return D?parseFloat(D):1
}return D=="auto"?null:D
},getOpacity:function(A){return $(A).getStyle("opacity")
},setStyle:function(B,C){B=$(B);
var E=B.style,A;
if(Object.isString(C)){B.style.cssText+=";"+C;
return C.include("opacity")?B.setOpacity(C.match(/opacity:\s*(\d?\.?\d*)/)[1]):B
}for(var D in C){if(D=="opacity"){B.setOpacity(C[D])
}else{E[(D=="float"||D=="cssFloat")?(Object.isUndefined(E.styleFloat)?"cssFloat":"styleFloat"):D]=C[D]
}}return B
},setOpacity:function(A,B){A=$(A);
A.style.opacity=(B==1||B==="")?"":(B<0.00001)?0:B;
return A
},makePositioned:function(A){A=$(A);
var B=Element.getStyle(A,"position");
if(B=="static"||!B){A._madePositioned=true;
A.style.position="relative";
if(Prototype.Browser.Opera){A.style.top=0;
A.style.left=0
}}return A
},undoPositioned:function(A){A=$(A);
if(A._madePositioned){A._madePositioned=undefined;
A.style.position=A.style.top=A.style.left=A.style.bottom=A.style.right=""
}return A
},makeClipping:function(A){A=$(A);
if(A._overflow){return A
}A._overflow=Element.getStyle(A,"overflow")||"auto";
if(A._overflow!=="hidden"){A.style.overflow="hidden"
}return A
},undoClipping:function(A){A=$(A);
if(!A._overflow){return A
}A.style.overflow=A._overflow=="auto"?"":A._overflow;
A._overflow=null;
return A
},clonePosition:function(B,D){var A=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},arguments[2]||{});
D=$(D);
var E=Element.viewportOffset(D),F=[0,0],C=null;
B=$(B);
if(Element.getStyle(B,"position")=="absolute"){C=Element.getOffsetParent(B);
F=Element.viewportOffset(C)
}if(C==document.body){F[0]-=document.body.offsetLeft;
F[1]-=document.body.offsetTop
}if(A.setLeft){B.style.left=(E[0]-F[0]+A.offsetLeft)+"px"
}if(A.setTop){B.style.top=(E[1]-F[1]+A.offsetTop)+"px"
}if(A.setWidth){B.style.width=D.offsetWidth+"px"
}if(A.setHeight){B.style.height=D.offsetHeight+"px"
}return B
}};
Object.extend(Element.Methods,{getElementsBySelector:Element.Methods.select,childElements:Element.Methods.immediateDescendants});
Element._attributeTranslations={write:{names:{className:"class",htmlFor:"for"},values:{}}};
if(Prototype.Browser.Opera){Element.Methods.getStyle=Element.Methods.getStyle.wrap(function(D,B,C){switch(C){case"height":case"width":if(!Element.visible(B)){return null
}var E=parseInt(D(B,C),10);
if(E!==B["offset"+C.capitalize()]){return E+"px"
}var A;
if(C==="height"){A=["border-top-width","padding-top","padding-bottom","border-bottom-width"]
}else{A=["border-left-width","padding-left","padding-right","border-right-width"]
}return A.inject(E,function(F,G){var H=D(B,G);
return H===null?F:F-parseInt(H,10)
})+"px";
default:return D(B,C)
}});
Element.Methods.readAttribute=Element.Methods.readAttribute.wrap(function(C,A,B){if(B==="title"){return A.title
}return C(A,B)
})
}else{if(Prototype.Browser.IE){Element.Methods.getStyle=function(A,B){A=$(A);
B=(B=="float"||B=="cssFloat")?"styleFloat":B.camelize();
var C=A.style[B];
if(!C&&A.currentStyle){C=A.currentStyle[B]
}if(B=="opacity"){if(C=(A.getStyle("filter")||"").match(/alpha\(opacity=(.*)\)/)){if(C[1]){return parseFloat(C[1])/100
}}return 1
}if(C=="auto"){if((B=="width"||B=="height")&&(A.getStyle("display")!="none")){return A["offset"+B.capitalize()]+"px"
}return null
}return C
};
if(/MSIE\s+[1-8]\./.test(navigator.userAgent)){Element.Methods.setOpacity=function(B,E){function F(G){return G.replace(/alpha\([^\)]*\)/gi,"")
}B=$(B);
var A=B.currentStyle;
if((A&&!A.hasLayout)||(!A&&B.style.zoom=="normal")){B.style.zoom=1
}var D=B.getStyle("filter"),C=B.style;
if(E==1||E===""){(D=F(D))?C.filter=D:C.removeAttribute("filter");
return B
}else{if(E<0.00001){E=0
}}C.filter=F(D)+"alpha(opacity="+(E*100)+")";
return B
}
}Element._attributeTranslations=(function(){var B="className",A="for",C=document.createElement("div");
C.setAttribute(B,"x");
if(C.className!=="x"){C.setAttribute("class","x");
if(C.className==="x"){B="class"
}}C=null;
C=document.createElement("label");
C.setAttribute(A,"x");
if(C.htmlFor!=="x"){C.setAttribute("htmlFor","x");
if(C.htmlFor==="x"){A="htmlFor"
}}C=null;
return{read:{names:{"class":B,"className":B,"for":A,"htmlFor":A},values:{_getAttr:function(D,E){return D.getAttribute(E)
},_getAttr2:function(D,E){return D.getAttribute(E,2)
},_getAttrNode:function(D,F){var E=D.getAttributeNode(F);
return E?E.value:""
},_getEv:(function(){var D=document.createElement("div"),F;
D.onclick=Prototype.emptyFunction;
var E=D.getAttribute("onclick");
if(String(E).indexOf("{")>-1){F=function(G,H){H=G.getAttribute(H);
if(!H){return null
}H=H.toString();
H=H.split("{")[1];
H=H.split("}")[0];
return H.strip()
}
}else{if(E===""){F=function(G,H){H=G.getAttribute(H);
if(!H){return null
}return H.strip()
}
}}D=null;
return F
})(),_flag:function(D,E){return $(D).hasAttribute(E)?E:null
},style:function(D){return D.style.cssText.toLowerCase()
},title:function(D){return D.title
}}}}
})();
Element._attributeTranslations.write={names:Object.extend({cellpadding:"cellPadding",cellspacing:"cellSpacing"},Element._attributeTranslations.read.names),values:{checked:function(A,B){A.checked=!!B
},style:function(A,B){A.style.cssText=B?B:""
}}};
Element._attributeTranslations.has={};
$w("colSpan rowSpan vAlign dateTime accessKey tabIndex encType maxLength readOnly longDesc frameBorder").each(function(A){Element._attributeTranslations.write.names[A.toLowerCase()]=A;
Element._attributeTranslations.has[A.toLowerCase()]=A
});
(function(A){Object.extend(A,{href:A._getAttr2,src:A._getAttr2,type:A._getAttr,action:A._getAttrNode,disabled:A._flag,checked:A._flag,readonly:A._flag,multiple:A._flag,onload:A._getEv,onunload:A._getEv,onclick:A._getEv,ondblclick:A._getEv,onmousedown:A._getEv,onmouseup:A._getEv,onmouseover:A._getEv,onmousemove:A._getEv,onmouseout:A._getEv,onfocus:A._getEv,onblur:A._getEv,onkeypress:A._getEv,onkeydown:A._getEv,onkeyup:A._getEv,onsubmit:A._getEv,onreset:A._getEv,onselect:A._getEv,onchange:A._getEv})
})(Element._attributeTranslations.read.values);
if(Prototype.BrowserFeatures.ElementExtensions){(function(){function A(E){var B=E.getElementsByTagName("*"),D=[];
for(var C=0,F;
F=B[C];
C++){if(F.tagName!=="!"){D.push(F)
}}return D
}Element.Methods.down=function(C,D,B){C=$(C);
if(arguments.length==1){return C.firstDescendant()
}return Object.isNumber(D)?A(C)[D]:Element.select(C,D)[B||0]
}
})()
}}else{if(Prototype.Browser.Gecko&&/rv:1\.8\.0/.test(navigator.userAgent)){Element.Methods.setOpacity=function(A,B){A=$(A);
A.style.opacity=(B==1)?0.999999:(B==="")?"":(B<0.00001)?0:B;
return A
}
}else{if(Prototype.Browser.WebKit){Element.Methods.setOpacity=function(A,B){A=$(A);
A.style.opacity=(B==1||B==="")?"":(B<0.00001)?0:B;
if(B==1){if(A.tagName.toUpperCase()=="IMG"&&A.width){A.width++;
A.width--
}else{try{var D=document.createTextNode(" ");
A.appendChild(D);
A.removeChild(D)
}catch(C){}}}return A
}
}}}}if("outerHTML" in document.documentElement){Element.Methods.replace=function(C,E){C=$(C);
if(E&&E.toElement){E=E.toElement()
}if(Object.isElement(E)){C.parentNode.replaceChild(E,C);
return C
}E=Object.toHTML(E);
var D=C.parentNode,B=D.tagName.toUpperCase();
if(Element._insertionTranslations.tags[B]){var F=C.next(),A=Element._getContentFromAnonymousElement(B,E.stripScripts());
D.removeChild(C);
if(F){A.each(function(G){D.insertBefore(G,F)
})
}else{A.each(function(G){D.appendChild(G)
})
}}else{C.outerHTML=E.stripScripts()
}E.evalScripts.bind(E).defer();
return C
}
}Element._returnOffset=function(B,C){var A=[B,C];
A.left=B;
A.top=C;
return A
};
Element._getContentFromAnonymousElement=function(E,D,F){var G=new Element("div"),C=Element._insertionTranslations.tags[E];
var A=false;
if(C){A=true
}else{if(F){A=true;
C=["","",0]
}}if(A){G.innerHTML="&nbsp;"+C[0]+D+C[1];
G.removeChild(G.firstChild);
for(var B=C[2];
B--;
){G=G.firstChild
}}else{G.innerHTML=D
}return $A(G.childNodes)
};
Element._insertionTranslations={before:function(A,B){A.parentNode.insertBefore(B,A)
},top:function(A,B){A.insertBefore(B,A.firstChild)
},bottom:function(A,B){A.appendChild(B)
},after:function(A,B){A.parentNode.insertBefore(B,A.nextSibling)
},tags:{TABLE:["<table>","</table>",1],TBODY:["<table><tbody>","</tbody></table>",2],TR:["<table><tbody><tr>","</tr></tbody></table>",3],TD:["<table><tbody><tr><td>","</td></tr></tbody></table>",4],SELECT:["<select>","</select>",1]}};
(function(){var A=Element._insertionTranslations.tags;
Object.extend(A,{THEAD:A.TBODY,TFOOT:A.TBODY,TH:A.TD})
})();
Element.Methods.Simulated={hasAttribute:function(A,C){C=Element._attributeTranslations.has[C]||C;
var B=$(A).getAttributeNode(C);
return !!(B&&B.specified)
}};
Element.Methods.ByTag={};
Object.extend(Element,Element.Methods);
(function(A){if(!Prototype.BrowserFeatures.ElementExtensions&&A["__proto__"]){window.HTMLElement={};
window.HTMLElement.prototype=A["__proto__"];
Prototype.BrowserFeatures.ElementExtensions=true
}A=null
})(document.createElement("div"));
Element.extend=(function(){function C(G){if(typeof window.Element!="undefined"){var I=window.Element.prototype;
if(I){var K="_"+(Math.random()+"").slice(2),H=document.createElement(G);
I[K]="x";
var J=(H[K]!=="x");
delete I[K];
H=null;
return J
}}return false
}function B(H,G){for(var J in G){var I=G[J];
if(Object.isFunction(I)&&!(J in H)){H[J]=I.methodize()
}}}var D=C("object");
if(Prototype.BrowserFeatures.SpecificElementExtensions){if(D){return function(H){if(H&&typeof H._extendedByPrototype=="undefined"){var G=H.tagName;
if(G&&(/^(?:object|applet|embed)$/i.test(G))){B(H,Element.Methods);
B(H,Element.Methods.Simulated);
B(H,Element.Methods.ByTag[G.toUpperCase()])
}}return H
}
}return Prototype.K
}var A={},E=Element.Methods.ByTag;
var F=Object.extend(function(I){if(!I||typeof I._extendedByPrototype!="undefined"||I.nodeType!=1||I==window){return I
}var G=Object.clone(A),H=I.tagName.toUpperCase();
if(E[H]){Object.extend(G,E[H])
}B(I,G);
I._extendedByPrototype=Prototype.emptyFunction;
return I
},{refresh:function(){if(!Prototype.BrowserFeatures.ElementExtensions){Object.extend(A,Element.Methods);
Object.extend(A,Element.Methods.Simulated)
}}});
F.refresh();
return F
})();
if(document.documentElement.hasAttribute){Element.hasAttribute=function(A,B){return A.hasAttribute(B)
}
}else{Element.hasAttribute=Element.Methods.Simulated.hasAttribute
}Element.addMethods=function(C){var J=Prototype.BrowserFeatures,D=Element.Methods.ByTag;
if(!C){Object.extend(Form,Form.Methods);
Object.extend(Form.Element,Form.Element.Methods);
Object.extend(Element.Methods.ByTag,{"FORM":Object.clone(Form.Methods),"INPUT":Object.clone(Form.Element.Methods),"SELECT":Object.clone(Form.Element.Methods),"TEXTAREA":Object.clone(Form.Element.Methods),"BUTTON":Object.clone(Form.Element.Methods)})
}if(arguments.length==2){var B=C;
C=arguments[1]
}if(!B){Object.extend(Element.Methods,C||{})
}else{if(Object.isArray(B)){B.each(H)
}else{H(B)
}}function H(F){F=F.toUpperCase();
if(!Element.Methods.ByTag[F]){Element.Methods.ByTag[F]={}
}Object.extend(Element.Methods.ByTag[F],C)
}function A(M,L,F){F=F||false;
for(var O in M){var N=M[O];
if(!Object.isFunction(N)){continue
}if(!F||!(O in L)){L[O]=N.methodize()
}}}function E(N){var F;
var M={"OPTGROUP":"OptGroup","TEXTAREA":"TextArea","P":"Paragraph","FIELDSET":"FieldSet","UL":"UList","OL":"OList","DL":"DList","DIR":"Directory","H1":"Heading","H2":"Heading","H3":"Heading","H4":"Heading","H5":"Heading","H6":"Heading","Q":"Quote","INS":"Mod","DEL":"Mod","A":"Anchor","IMG":"Image","CAPTION":"TableCaption","COL":"TableCol","COLGROUP":"TableCol","THEAD":"TableSection","TFOOT":"TableSection","TBODY":"TableSection","TR":"TableRow","TH":"TableCell","TD":"TableCell","FRAMESET":"FrameSet","IFRAME":"IFrame"};
if(M[N]){F="HTML"+M[N]+"Element"
}if(window[F]){return window[F]
}F="HTML"+N+"Element";
if(window[F]){return window[F]
}F="HTML"+N.capitalize()+"Element";
if(window[F]){return window[F]
}var L=document.createElement(N),O=L["__proto__"]||L.constructor.prototype;
L=null;
return O
}var I=window.HTMLElement?HTMLElement.prototype:Element.prototype;
if(J.ElementExtensions){A(Element.Methods,I);
A(Element.Methods.Simulated,I,true)
}if(J.SpecificElementExtensions){for(var K in Element.Methods.ByTag){var G=E(K);
if(Object.isUndefined(G)){continue
}A(D[K],G.prototype)
}}Object.extend(Element,Element.Methods);
delete Element.ByTag;
if(Element.extend.refresh){Element.extend.refresh()
}Element.cache={}
};
document.viewport={getDimensions:function(){return{width:this.getWidth(),height:this.getHeight()}
},getScrollOffsets:function(){return Element._returnOffset(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft,window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop)
}};
(function(C){var H=Prototype.Browser,F=document,D,E={};
function A(){if(H.WebKit&&!F.evaluate){return document
}if(H.Opera&&window.parseFloat(window.opera.version())<9.5){return document.body
}return document.documentElement
}function G(B){if(!D){D=A()
}E[B]="client"+B;
C["get"+B]=function(){return D[E[B]]
};
return C["get"+B]()
}C.getWidth=G.curry("Width");
C.getHeight=G.curry("Height")
})(document.viewport);
Element.Storage={UID:1};
Element.addMethods({getStorage:function(B){if(!(B=$(B))){return 
}var A;
if(B===window){A=0
}else{if(typeof B._prototypeUID==="undefined"){B._prototypeUID=Element.Storage.UID++
}A=B._prototypeUID
}if(!Element.Storage[A]){Element.Storage[A]=$H()
}return Element.Storage[A]
},store:function(B,A,C){if(!(B=$(B))){return 
}if(arguments.length===2){Element.getStorage(B).update(A)
}else{Element.getStorage(B).set(A,C)
}return B
},retrieve:function(C,B,A){if(!(C=$(C))){return 
}var E=Element.getStorage(C),D=E.get(B);
if(Object.isUndefined(D)){E.set(B,A);
D=A
}return D
},clone:function(C,A){if(!(C=$(C))){return 
}var E=C.cloneNode(A);
E._prototypeUID=void 0;
if(A){var D=Element.select(E,"*"),B=D.length;
while(B--){D[B]._prototypeUID=void 0
}}return Element.extend(E)
},purge:function(C){if(!(C=$(C))){return 
}var A=Element._purgeElement;
A(C);
var D=C.getElementsByTagName("*"),B=D.length;
while(B--){A(D[B])
}return null
}});
(function(){function H(V){var U=V.match(/^(\d+)%?$/i);
if(!U){return null
}return(Number(U[1])/100)
}function O(f,g,V){var Y=null;
if(Object.isElement(f)){Y=f;
f=Y.getStyle(g)
}if(f===null){return null
}if((/^(?:-)?\d+(\.\d+)?(px)?$/i).test(f)){return window.parseFloat(f)
}var a=f.include("%"),W=(V===document.viewport);
if(/\d/.test(f)&&Y&&Y.runtimeStyle&&!(a&&W)){var U=Y.style.left,e=Y.runtimeStyle.left;
Y.runtimeStyle.left=Y.currentStyle.left;
Y.style.left=f||0;
f=Y.style.pixelLeft;
Y.style.left=U;
Y.runtimeStyle.left=e;
return f
}if(Y&&a){V=V||Y.parentNode;
var X=H(f);
var b=null;
var Z=Y.getStyle("position");
var d=g.include("left")||g.include("right")||g.include("width");
var c=g.include("top")||g.include("bottom")||g.include("height");
if(V===document.viewport){if(d){b=document.viewport.getWidth()
}else{if(c){b=document.viewport.getHeight()
}}}else{if(d){b=$(V).measure("width")
}else{if(c){b=$(V).measure("height")
}}}return(b===null)?0:b*X
}return 0
}function G(U){if(Object.isString(U)&&U.endsWith("px")){return U
}return U+"px"
}function J(V){var U=V;
while(V&&V.parentNode){var W=V.getStyle("display");
if(W==="none"){return false
}V=$(V.parentNode)
}return true
}var D=Prototype.K;
if("currentStyle" in document.documentElement){D=function(U){if(!U.currentStyle.hasLayout){U.style.zoom=1
}return U
}
}function F(U){if(U.include("border")){U=U+"-width"
}return U.camelize()
}Element.Layout=Class.create(Hash,{initialize:function($super,V,U){$super();
this.element=$(V);
Element.Layout.PROPERTIES.each(function(W){this._set(W,null)
},this);
if(U){this._preComputing=true;
this._begin();
Element.Layout.PROPERTIES.each(this._compute,this);
this._end();
this._preComputing=false
}},_set:function(V,U){return Hash.prototype.set.call(this,V,U)
},set:function(V,U){throw"Properties of Element.Layout are read-only."
},get:function($super,V){var U=$super(V);
return U===null?this._compute(V):U
},_begin:function(){if(this._prepared){return 
}var Y=this.element;
if(J(Y)){this._prepared=true;
return 
}var a={position:Y.style.position||"",width:Y.style.width||"",visibility:Y.style.visibility||"",display:Y.style.display||""};
Y.store("prototype_original_styles",a);
var b=Y.getStyle("position"),U=Y.getStyle("width");
if(U==="0px"||U===null){Y.style.display="block";
U=Y.getStyle("width")
}var V=(b==="fixed")?document.viewport:Y.parentNode;
Y.setStyle({position:"absolute",visibility:"hidden",display:"block"});
var W=Y.getStyle("width");
var X;
if(U&&(W===U)){X=O(Y,"width",V)
}else{if(b==="absolute"||b==="fixed"){X=O(Y,"width",V)
}else{var c=Y.parentNode,Z=$(c).getLayout();
X=Z.get("width")-this.get("margin-left")-this.get("border-left")-this.get("padding-left")-this.get("padding-right")-this.get("border-right")-this.get("margin-right")
}}Y.setStyle({width:X+"px"});
this._prepared=true
},_end:function(){var V=this.element;
var U=V.retrieve("prototype_original_styles");
V.store("prototype_original_styles",null);
V.setStyle(U);
this._prepared=false
},_compute:function(V){var U=Element.Layout.COMPUTATIONS;
if(!(V in U)){throw"Property not found."
}return this._set(V,U[V].call(this,this.element))
},toObject:function(){var U=$A(arguments);
var V=(U.length===0)?Element.Layout.PROPERTIES:U.join(" ").split(" ");
var W={};
V.each(function(X){if(!Element.Layout.PROPERTIES.include(X)){return 
}var Y=this.get(X);
if(Y!=null){W[X]=Y
}},this);
return W
},toHash:function(){var U=this.toObject.apply(this,arguments);
return new Hash(U)
},toCSS:function(){var U=$A(arguments);
var W=(U.length===0)?Element.Layout.PROPERTIES:U.join(" ").split(" ");
var V={};
W.each(function(X){if(!Element.Layout.PROPERTIES.include(X)){return 
}if(Element.Layout.COMPOSITE_PROPERTIES.include(X)){return 
}var Y=this.get(X);
if(Y!=null){V[F(X)]=Y+"px"
}},this);
return V
},inspect:function(){return"#<Element.Layout>"
}});
Object.extend(Element.Layout,{PROPERTIES:$w("height width top left right bottom border-left border-right border-top border-bottom padding-left padding-right padding-top padding-bottom margin-top margin-bottom margin-left margin-right padding-box-width padding-box-height border-box-width border-box-height margin-box-width margin-box-height"),COMPOSITE_PROPERTIES:$w("padding-box-width padding-box-height margin-box-width margin-box-height border-box-width border-box-height"),COMPUTATIONS:{"height":function(W){if(!this._preComputing){this._begin()
}var U=this.get("border-box-height");
if(U<=0){if(!this._preComputing){this._end()
}return 0
}var X=this.get("border-top"),V=this.get("border-bottom");
var Z=this.get("padding-top"),Y=this.get("padding-bottom");
if(!this._preComputing){this._end()
}return U-X-V-Z-Y
},"width":function(W){if(!this._preComputing){this._begin()
}var V=this.get("border-box-width");
if(V<=0){if(!this._preComputing){this._end()
}return 0
}var Z=this.get("border-left"),U=this.get("border-right");
var X=this.get("padding-left"),Y=this.get("padding-right");
if(!this._preComputing){this._end()
}return V-Z-U-X-Y
},"padding-box-height":function(V){var U=this.get("height"),X=this.get("padding-top"),W=this.get("padding-bottom");
return U+X+W
},"padding-box-width":function(U){var V=this.get("width"),W=this.get("padding-left"),X=this.get("padding-right");
return V+W+X
},"border-box-height":function(V){if(!this._preComputing){this._begin()
}var U=V.offsetHeight;
if(!this._preComputing){this._end()
}return U
},"border-box-width":function(U){if(!this._preComputing){this._begin()
}var V=U.offsetWidth;
if(!this._preComputing){this._end()
}return V
},"margin-box-height":function(V){var U=this.get("border-box-height"),W=this.get("margin-top"),X=this.get("margin-bottom");
if(U<=0){return 0
}return U+W+X
},"margin-box-width":function(W){var V=this.get("border-box-width"),X=this.get("margin-left"),U=this.get("margin-right");
if(V<=0){return 0
}return V+X+U
},"top":function(U){var V=U.positionedOffset();
return V.top
},"bottom":function(U){var X=U.positionedOffset(),V=U.getOffsetParent(),W=V.measure("height");
var Y=this.get("border-box-height");
return W-Y-X.top
},"left":function(U){var V=U.positionedOffset();
return V.left
},"right":function(W){var Y=W.positionedOffset(),X=W.getOffsetParent(),U=X.measure("width");
var V=this.get("border-box-width");
return U-V-Y.left
},"padding-top":function(U){return O(U,"paddingTop")
},"padding-bottom":function(U){return O(U,"paddingBottom")
},"padding-left":function(U){return O(U,"paddingLeft")
},"padding-right":function(U){return O(U,"paddingRight")
},"border-top":function(U){return O(U,"borderTopWidth")
},"border-bottom":function(U){return O(U,"borderBottomWidth")
},"border-left":function(U){return O(U,"borderLeftWidth")
},"border-right":function(U){return O(U,"borderRightWidth")
},"margin-top":function(U){return O(U,"marginTop")
},"margin-bottom":function(U){return O(U,"marginBottom")
},"margin-left":function(U){return O(U,"marginLeft")
},"margin-right":function(U){return O(U,"marginRight")
}}});
if("getBoundingClientRect" in document.documentElement){Object.extend(Element.Layout.COMPUTATIONS,{"right":function(V){var W=D(V.getOffsetParent());
var X=V.getBoundingClientRect(),U=W.getBoundingClientRect();
return(U.right-X.right).round()
},"bottom":function(V){var W=D(V.getOffsetParent());
var X=V.getBoundingClientRect(),U=W.getBoundingClientRect();
return(U.bottom-X.bottom).round()
}})
}Element.Offset=Class.create({initialize:function(V,U){this.left=V.round();
this.top=U.round();
this[0]=this.left;
this[1]=this.top
},relativeTo:function(U){return new Element.Offset(this.left-U.left,this.top-U.top)
},inspect:function(){return"#<Element.Offset left: #{left} top: #{top}>".interpolate(this)
},toString:function(){return"[#{left}, #{top}]".interpolate(this)
},toArray:function(){return[this.left,this.top]
}});
function R(V,U){return new Element.Layout(V,U)
}function B(U,V){return $(U).getLayout().get(V)
}function N(V){V=$(V);
var Z=Element.getStyle(V,"display");
if(Z&&Z!=="none"){return{width:V.offsetWidth,height:V.offsetHeight}
}var W=V.style;
var U={visibility:W.visibility,position:W.position,display:W.display};
var Y={visibility:"hidden",display:"block"};
if(U.position!=="fixed"){Y.position="absolute"
}Element.setStyle(V,Y);
var X={width:V.offsetWidth,height:V.offsetHeight};
Element.setStyle(V,U);
return X
}function L(U){U=$(U);
if(E(U)||C(U)||M(U)||K(U)){return $(document.body)
}var V=(Element.getStyle(U,"display")==="inline");
if(!V&&U.offsetParent){return $(U.offsetParent)
}while((U=U.parentNode)&&U!==document.body&&Object.isElement(U)){if(Element.getStyle(U,"position")!=="static"){return K(U)?$(document.body):$(U)
}}return $(document.body)
}function T(V){var U=0,X=0;
if(V.parentNode){do{V=$(V);
if(V.getStyle("position")=="fixed"){var W=document.viewport.getScrollOffsets();
U+=W[1]+V.offsetTop;
X+=W[0]+V.offsetLeft;
break
}else{U+=V.offsetTop||0;
X+=V.offsetLeft||0;
V=V.offsetParent
}}while(V)
}return new Element.Offset(X,U)
}function P(V){V=$(V);
var W=V.getLayout();
var U=0,Y=0;
do{U+=V.offsetTop||0;
Y+=V.offsetLeft||0;
V=V.offsetParent;
if(V){if(M(V)){break
}var X=Element.getStyle(V,"position");
if(X!=="static"){break
}}}while(V);
Y-=W.get("margin-top");
U-=W.get("margin-left");
return new Element.Offset(Y,U)
}function A(V){var U=0,W=0;
do{U+=V.scrollTop||0;
W+=V.scrollLeft||0;
V=V.parentNode
}while(V);
return new Element.Offset(W,U)
}function S(Y){V=$(V);
var U=0,X=0,W=document.body;
var V=Y;
do{U+=V.offsetTop||0;
X+=V.offsetLeft||0;
if(V.offsetParent==W&&Element.getStyle(V,"position")=="absolute"){break
}}while(V=V.offsetParent);
V=Y;
do{if(V!=W){U-=V.scrollTop||0;
X-=V.scrollLeft||0;
if(!Prototype.Browser.WebKit&&Element.getStyle(V,"position")=="fixed"){break
}}}while(V=V.parentNode);
return new Element.Offset(X,U)
}function Q(U){U=$(U);
if(Element.getStyle(U,"position")==="absolute"){return U
}var Y=L(U);
var X=U.viewportOffset(),V=Y.viewportOffset();
var Z=X.relativeTo(V);
var W=U.getLayout();
U.store("prototype_absolutize_original_styles",{left:U.getStyle("left"),top:U.getStyle("top"),width:U.getStyle("width"),height:U.getStyle("height")});
U.setStyle({position:"absolute",top:Z.top+"px",left:Z.left+"px",width:W.get("width")+"px",height:W.get("height")+"px"});
return U
}function I(V){V=$(V);
if(Element.getStyle(V,"position")==="relative"){return V
}var U=V.retrieve("prototype_absolutize_original_styles");
if(U){V.setStyle(U)
}return V
}if(Prototype.Browser.IE){L=L.wrap(function(W,V){V=$(V);
if(E(V)||C(V)||M(V)||K(V)){return $(document.body)
}var U=V.getStyle("position");
if(U!=="static"){return W(V)
}V.setStyle({position:"relative"});
var X=W(V);
V.setStyle({position:U});
return X
});
P=P.wrap(function(X,V){V=$(V);
if(!V.parentNode){return new Element.Offset(0,0)
}var U=V.getStyle("position");
if(U!=="static"){return X(V)
}var W=V.getOffsetParent();
if(W&&W.getStyle("position")==="fixed"){D(W)
}V.setStyle({position:"relative"});
var Y=X(V);
V.setStyle({position:U});
return Y
})
}else{if(Prototype.Browser.Webkit){T=function(V){V=$(V);
var U=0,W=0;
do{U+=V.offsetTop||0;
W+=V.offsetLeft||0;
if(V.offsetParent==document.body){if(Element.getStyle(V,"position")=="absolute"){break
}}V=V.offsetParent
}while(V);
return new Element.Offset(W,U)
}
}}Element.addMethods({getLayout:R,measure:B,getDimensions:N,getOffsetParent:L,cumulativeOffset:T,positionedOffset:P,cumulativeScrollOffset:A,viewportOffset:S,absolutize:Q,relativize:I});
function M(U){return U.nodeName.toUpperCase()==="BODY"
}function K(U){return U.nodeName.toUpperCase()==="HTML"
}function E(U){return U.nodeType===Node.DOCUMENT_NODE
}function C(U){return U!==document.body&&!Element.descendantOf(U,document.body)
}if("getBoundingClientRect" in document.documentElement){Element.addMethods({viewportOffset:function(U){U=$(U);
if(C(U)){return new Element.Offset(0,0)
}var V=U.getBoundingClientRect(),W=document.documentElement;
return new Element.Offset(V.left-W.clientLeft,V.top-W.clientTop)
}})
}})();
window.$$=function(){var A=$A(arguments).join(", ");
return Prototype.Selector.select(A,document)
};
Prototype.Selector=(function(){function A(){throw new Error('Method "Prototype.Selector.select" must be defined.')
}function C(){throw new Error('Method "Prototype.Selector.match" must be defined.')
}function D(K,L,H){H=H||0;
var G=Prototype.Selector.match,J=K.length,F=0,I;
for(I=0;
I<J;
I++){if(G(K[I],L)&&H==F++){return Element.extend(K[I])
}}}function E(H){for(var F=0,G=H.length;
F<G;
F++){Element.extend(H[F])
}return H
}var B=Prototype.K;
return{select:A,match:C,find:D,extendElements:(Element.extend===B)?B:E,extendElement:Element.extend}
})();
Prototype._original_property=window.Sizzle;
(function(){var P=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,I=0,D=Object.prototype.toString,N=false,H=true;
[0,0].sort(function(){H=false;
return 0
});
var B=function(e,U,b,W){b=b||[];
var R=U=U||document;
if(U.nodeType!==1&&U.nodeType!==9){return[]
}if(!e||typeof e!=="string"){return b
}var c=[],d,Z,j,h,a,T,S=true,X=O(U),g=e;
while((P.exec(""),d=P.exec(g))!==null){g=d[3];
c.push(d[1]);
if(d[2]){T=d[3];
break
}}if(c.length>1&&J.exec(e)){if(c.length===2&&E.relative[c[0]]){Z=F(c[0]+c[1],U)
}else{Z=E.relative[c[0]]?[U]:B(c.shift(),U);
while(c.length){e=c.shift();
if(E.relative[e]){e+=c.shift()
}Z=F(e,Z)
}}}else{if(!W&&c.length>1&&U.nodeType===9&&!X&&E.match.ID.test(c[0])&&!E.match.ID.test(c[c.length-1])){var k=B.find(c.shift(),U,X);
U=k.expr?B.filter(k.expr,k.set)[0]:k.set[0]
}if(U){var k=W?{expr:c.pop(),set:A(W)}:B.find(c.pop(),c.length===1&&(c[0]==="~"||c[0]==="+")&&U.parentNode?U.parentNode:U,X);
Z=k.expr?B.filter(k.expr,k.set):k.set;
if(c.length>0){j=A(Z)
}else{S=false
}while(c.length){var V=c.pop(),Y=V;
if(!E.relative[V]){V=""
}else{Y=c.pop()
}if(Y==null){Y=U
}E.relative[V](j,Y,X)
}}else{j=c=[]
}}if(!j){j=Z
}if(!j){throw"Syntax error, unrecognized expression: "+(V||e)
}if(D.call(j)==="[object Array]"){if(!S){b.push.apply(b,j)
}else{if(U&&U.nodeType===1){for(var f=0;
j[f]!=null;
f++){if(j[f]&&(j[f]===true||j[f].nodeType===1&&G(U,j[f]))){b.push(Z[f])
}}}else{for(var f=0;
j[f]!=null;
f++){if(j[f]&&j[f].nodeType===1){b.push(Z[f])
}}}}}else{A(j,b)
}if(T){B(T,R,b,W);
B.uniqueSort(b)
}return b
};
B.uniqueSort=function(S){if(C){N=H;
S.sort(C);
if(N){for(var R=1;
R<S.length;
R++){if(S[R]===S[R-1]){S.splice(R--,1)
}}}}return S
};
B.matches=function(R,S){return B(R,null,null,S)
};
B.find=function(Y,R,Z){var X,V;
if(!Y){return[]
}for(var U=0,T=E.order.length;
U<T;
U++){var W=E.order[U],V;
if((V=E.leftMatch[W].exec(Y))){var S=V[1];
V.splice(1,1);
if(S.substr(S.length-1)!=="\\"){V[1]=(V[1]||"").replace(/\\/g,"");
X=E.find[W](V,R,Z);
if(X!=null){Y=Y.replace(E.match[W],"");
break
}}}}if(!X){X=R.getElementsByTagName("*")
}return{set:X,expr:Y}
};
B.filter=function(b,a,e,U){var T=b,g=[],Y=a,W,R,X=a&&a[0]&&O(a[0]);
while(b&&a.length){for(var Z in E.filter){if((W=E.match[Z].exec(b))!=null){var S=E.filter[Z],f,d;
R=false;
if(Y==g){g=[]
}if(E.preFilter[Z]){W=E.preFilter[Z](W,Y,e,g,U,X);
if(!W){R=f=true
}else{if(W===true){continue
}}}if(W){for(var V=0;
(d=Y[V])!=null;
V++){if(d){f=S(d,W,V,Y);
var c=U^!!f;
if(e&&f!=null){if(c){R=true
}else{Y[V]=false
}}else{if(c){g.push(d);
R=true
}}}}}if(f!==undefined){if(!e){Y=g
}b=b.replace(E.match[Z],"");
if(!R){return[]
}break
}}}if(b==T){if(R==null){throw"Syntax error, unrecognized expression: "+b
}else{break
}}T=b
}return Y
};
var E=B.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\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(R){return R.getAttribute("href")
}},relative:{"+":function(Y,R,X){var V=typeof R==="string",Z=V&&!/\W/.test(R),W=V&&!Z;
if(Z&&!X){R=R.toUpperCase()
}for(var U=0,T=Y.length,S;
U<T;
U++){if((S=Y[U])){while((S=S.previousSibling)&&S.nodeType!==1){}Y[U]=W||S&&S.nodeName===R?S||false:S===R
}}if(W){B.filter(R,Y,true)
}},">":function(X,S,Y){var V=typeof S==="string";
if(V&&!/\W/.test(S)){S=Y?S:S.toUpperCase();
for(var T=0,R=X.length;
T<R;
T++){var W=X[T];
if(W){var U=W.parentNode;
X[T]=U.nodeName===S?U:false
}}}else{for(var T=0,R=X.length;
T<R;
T++){var W=X[T];
if(W){X[T]=V?W.parentNode:W.parentNode===S
}}if(V){B.filter(S,X,true)
}}},"":function(U,S,W){var T=I++,R=Q;
if(!/\W/.test(S)){var V=S=W?S:S.toUpperCase();
R=M
}R("parentNode",S,T,U,V,W)
},"~":function(U,S,W){var T=I++,R=Q;
if(typeof S==="string"&&!/\W/.test(S)){var V=S=W?S:S.toUpperCase();
R=M
}R("previousSibling",S,T,U,V,W)
}},find:{ID:function(S,T,U){if(typeof T.getElementById!=="undefined"&&!U){var R=T.getElementById(S[1]);
return R?[R]:[]
}},NAME:function(T,W,X){if(typeof W.getElementsByName!=="undefined"){var S=[],V=W.getElementsByName(T[1]);
for(var U=0,R=V.length;
U<R;
U++){if(V[U].getAttribute("name")===T[1]){S.push(V[U])
}}return S.length===0?null:S
}},TAG:function(R,S){return S.getElementsByTagName(R[1])
}},preFilter:{CLASS:function(U,S,T,R,X,Y){U=" "+U[1].replace(/\\/g,"")+" ";
if(Y){return U
}for(var V=0,W;
(W=S[V])!=null;
V++){if(W){if(X^(W.className&&(" "+W.className+" ").indexOf(U)>=0)){if(!T){R.push(W)
}}else{if(T){S[V]=false
}}}}return false
},ID:function(R){return R[1].replace(/\\/g,"")
},TAG:function(S,R){for(var T=0;
R[T]===false;
T++){}return R[T]&&O(R[T])?S[1]:S[1].toUpperCase()
},CHILD:function(R){if(R[1]=="nth"){var S=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(R[2]=="even"&&"2n"||R[2]=="odd"&&"2n+1"||!/\D/.test(R[2])&&"0n+"+R[2]||R[2]);
R[2]=(S[1]+(S[2]||1))-0;
R[3]=S[3]-0
}R[0]=I++;
return R
},ATTR:function(V,S,T,R,W,X){var U=V[1].replace(/\\/g,"");
if(!X&&E.attrMap[U]){V[1]=E.attrMap[U]
}if(V[2]==="~="){V[4]=" "+V[4]+" "
}return V
},PSEUDO:function(V,S,T,R,W){if(V[1]==="not"){if((P.exec(V[3])||"").length>1||/^\w/.test(V[3])){V[3]=B(V[3],null,null,S)
}else{var U=B.filter(V[3],S,T,true^W);
if(!T){R.push.apply(R,U)
}return false
}}else{if(E.match.POS.test(V[0])||E.match.CHILD.test(V[0])){return true
}}return V
},POS:function(R){R.unshift(true);
return R
}},filters:{enabled:function(R){return R.disabled===false&&R.type!=="hidden"
},disabled:function(R){return R.disabled===true
},checked:function(R){return R.checked===true
},selected:function(R){R.parentNode.selectedIndex;
return R.selected===true
},parent:function(R){return !!R.firstChild
},empty:function(R){return !R.firstChild
},has:function(T,S,R){return !!B(R[3],T).length
},header:function(R){return/h\d/i.test(R.nodeName)
},text:function(R){return"text"===R.type
},radio:function(R){return"radio"===R.type
},checkbox:function(R){return"checkbox"===R.type
},file:function(R){return"file"===R.type
},password:function(R){return"password"===R.type
},submit:function(R){return"submit"===R.type
},image:function(R){return"image"===R.type
},reset:function(R){return"reset"===R.type
},button:function(R){return"button"===R.type||R.nodeName.toUpperCase()==="BUTTON"
},input:function(R){return/input|select|textarea|button/i.test(R.nodeName)
}},setFilters:{first:function(S,R){return R===0
},last:function(T,S,R,U){return S===U.length-1
},even:function(S,R){return R%2===0
},odd:function(S,R){return R%2===1
},lt:function(T,S,R){return S<R[3]-0
},gt:function(T,S,R){return S>R[3]-0
},nth:function(T,S,R){return R[3]-0==S
},eq:function(T,S,R){return R[3]-0==S
}},filter:{PSEUDO:function(X,T,U,Y){var S=T[1],V=E.filters[S];
if(V){return V(X,U,T,Y)
}else{if(S==="contains"){return(X.textContent||X.innerText||"").indexOf(T[3])>=0
}else{if(S==="not"){var W=T[3];
for(var U=0,R=W.length;
U<R;
U++){if(W[U]===X){return false
}}return true
}}}},CHILD:function(R,U){var X=U[1],S=R;
switch(X){case"only":case"first":while((S=S.previousSibling)){if(S.nodeType===1){return false
}}if(X=="first"){return true
}S=R;
case"last":while((S=S.nextSibling)){if(S.nodeType===1){return false
}}return true;
case"nth":var T=U[2],a=U[3];
if(T==1&&a==0){return true
}var W=U[0],Z=R.parentNode;
if(Z&&(Z.sizcache!==W||!R.nodeIndex)){var V=0;
for(S=Z.firstChild;
S;
S=S.nextSibling){if(S.nodeType===1){S.nodeIndex=++V
}}Z.sizcache=W
}var Y=R.nodeIndex-a;
if(T==0){return Y==0
}else{return(Y%T==0&&Y/T>=0)
}}},ID:function(S,R){return S.nodeType===1&&S.getAttribute("id")===R
},TAG:function(S,R){return(R==="*"&&S.nodeType===1)||S.nodeName===R
},CLASS:function(S,R){return(" "+(S.className||S.getAttribute("class"))+" ").indexOf(R)>-1
},ATTR:function(W,U){var T=U[1],R=E.attrHandle[T]?E.attrHandle[T](W):W[T]!=null?W[T]:W.getAttribute(T),X=R+"",V=U[2],S=U[4];
return R==null?V==="!=":V==="="?X===S:V==="*="?X.indexOf(S)>=0:V==="~="?(" "+X+" ").indexOf(S)>=0:!S?X&&R!==false:V==="!="?X!=S:V==="^="?X.indexOf(S)===0:V==="$="?X.substr(X.length-S.length)===S:V==="|="?X===S||X.substr(0,S.length+1)===S+"-":false
},POS:function(V,S,T,W){var R=S[2],U=E.setFilters[R];
if(U){return U(V,T,S,W)
}}}};
var J=E.match.POS;
for(var L in E.match){E.match[L]=new RegExp(E.match[L].source+/(?![^\[]*\])(?![^\(]*\))/.source);
E.leftMatch[L]=new RegExp(/(^(?:.|\r|\n)*?)/.source+E.match[L].source)
}var A=function(S,R){S=Array.prototype.slice.call(S,0);
if(R){R.push.apply(R,S);
return R
}return S
};
try{Array.prototype.slice.call(document.documentElement.childNodes,0)
}catch(K){A=function(V,U){var S=U||[];
if(D.call(V)==="[object Array]"){Array.prototype.push.apply(S,V)
}else{if(typeof V.length==="number"){for(var T=0,R=V.length;
T<R;
T++){S.push(V[T])
}}else{for(var T=0;
V[T];
T++){S.push(V[T])
}}}return S
}
}var C;
if(document.documentElement.compareDocumentPosition){C=function(S,R){if(!S.compareDocumentPosition||!R.compareDocumentPosition){if(S==R){N=true
}return 0
}var T=S.compareDocumentPosition(R)&4?-1:S===R?0:1;
if(T===0){N=true
}return T
}
}else{if("sourceIndex" in document.documentElement){C=function(S,R){if(!S.sourceIndex||!R.sourceIndex){if(S==R){N=true
}return 0
}var T=S.sourceIndex-R.sourceIndex;
if(T===0){N=true
}return T
}
}else{if(document.createRange){C=function(U,S){if(!U.ownerDocument||!S.ownerDocument){if(U==S){N=true
}return 0
}var T=U.ownerDocument.createRange(),R=S.ownerDocument.createRange();
T.setStart(U,0);
T.setEnd(U,0);
R.setStart(S,0);
R.setEnd(S,0);
var V=T.compareBoundaryPoints(Range.START_TO_END,R);
if(V===0){N=true
}return V
}
}}}(function(){var S=document.createElement("div"),T="script"+(new Date).getTime();
S.innerHTML="<a name='"+T+"'/>";
var R=document.documentElement;
R.insertBefore(S,R.firstChild);
if(!!document.getElementById(T)){E.find.ID=function(V,W,X){if(typeof W.getElementById!=="undefined"&&!X){var U=W.getElementById(V[1]);
return U?U.id===V[1]||typeof U.getAttributeNode!=="undefined"&&U.getAttributeNode("id").nodeValue===V[1]?[U]:undefined:[]
}};
E.filter.ID=function(W,U){var V=typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id");
return W.nodeType===1&&V&&V.nodeValue===U
}
}R.removeChild(S);
R=S=null
})();
(function(){var R=document.createElement("div");
R.appendChild(document.createComment(""));
if(R.getElementsByTagName("*").length>0){E.find.TAG=function(S,W){var V=W.getElementsByTagName(S[1]);
if(S[1]==="*"){var U=[];
for(var T=0;
V[T];
T++){if(V[T].nodeType===1){U.push(V[T])
}}V=U
}return V
}
}R.innerHTML="<a href='#'></a>";
if(R.firstChild&&typeof R.firstChild.getAttribute!=="undefined"&&R.firstChild.getAttribute("href")!=="#"){E.attrHandle.href=function(S){return S.getAttribute("href",2)
}
}R=null
})();
if(document.querySelectorAll){(function(){var R=B,T=document.createElement("div");
T.innerHTML="<p class='TEST'></p>";
if(T.querySelectorAll&&T.querySelectorAll(".TEST").length===0){return 
}B=function(X,W,U,V){W=W||document;
if(!V&&W.nodeType===9&&!O(W)){try{return A(W.querySelectorAll(X),U)
}catch(Y){}}return R(X,W,U,V)
};
for(var S in R){B[S]=R[S]
}T=null
})()
}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var R=document.createElement("div");
R.innerHTML="<div class='test e'></div><div class='test'></div>";
if(R.getElementsByClassName("e").length===0){return 
}R.lastChild.className="e";
if(R.getElementsByClassName("e").length===1){return 
}E.order.splice(1,0,"CLASS");
E.find.CLASS=function(S,T,U){if(typeof T.getElementsByClassName!=="undefined"&&!U){return T.getElementsByClassName(S[1])
}};
R=null
})()
}function M(S,X,W,b,Y,a){var Z=S=="previousSibling"&&!a;
for(var U=0,T=b.length;
U<T;
U++){var R=b[U];
if(R){if(Z&&R.nodeType===1){R.sizcache=W;
R.sizset=U
}R=R[S];
var V=false;
while(R){if(R.sizcache===W){V=b[R.sizset];
break
}if(R.nodeType===1&&!a){R.sizcache=W;
R.sizset=U
}if(R.nodeName===X){V=R;
break
}R=R[S]
}b[U]=V
}}}function Q(S,X,W,b,Y,a){var Z=S=="previousSibling"&&!a;
for(var U=0,T=b.length;
U<T;
U++){var R=b[U];
if(R){if(Z&&R.nodeType===1){R.sizcache=W;
R.sizset=U
}R=R[S];
var V=false;
while(R){if(R.sizcache===W){V=b[R.sizset];
break
}if(R.nodeType===1){if(!a){R.sizcache=W;
R.sizset=U
}if(typeof X!=="string"){if(R===X){V=true;
break
}}else{if(B.filter(X,[R]).length>0){V=R;
break
}}}R=R[S]
}b[U]=V
}}}var G=document.compareDocumentPosition?function(S,R){return S.compareDocumentPosition(R)&16
}:function(S,R){return S!==R&&(S.contains?S.contains(R):true)
};
var O=function(R){return R.nodeType===9&&R.documentElement.nodeName!=="HTML"||!!R.ownerDocument&&R.ownerDocument.documentElement.nodeName!=="HTML"
};
var F=function(R,Y){var U=[],V="",W,T=Y.nodeType?[Y]:Y;
while((W=E.match.PSEUDO.exec(R))){V+=W[0];
R=R.replace(E.match.PSEUDO,"")
}R=E.relative[R]?R+"*":R;
for(var X=0,S=T.length;
X<S;
X++){B(R,T[X],U)
}return B.filter(V,U)
};
window.Sizzle=B
})();
(function(C){var D=Prototype.Selector.extendElements;
function A(E,F){return D(C(E,F||document))
}function B(F,E){return C.matches(E,[F]).length==1
}Prototype.Selector.engine=C;
Prototype.Selector.select=A;
Prototype.Selector.match=B
})(Sizzle);
window.Sizzle=Prototype._original_property;
delete Prototype._original_property;
var Form={reset:function(A){A=$(A);
A.reset();
return A
},serializeElements:function(H,D){if(typeof D!="object"){D={hash:!!D}
}else{if(Object.isUndefined(D.hash)){D.hash=true
}}var E,G,A=false,F=D.submit,B,C;
if(D.hash){C={};
B=function(I,J,K){if(J in I){if(!Object.isArray(I[J])){I[J]=[I[J]]
}I[J].push(K)
}else{I[J]=K
}return I
}
}else{C="";
B=function(I,J,K){return I+(I?"&":"")+encodeURIComponent(J)+"="+encodeURIComponent(K)
}
}return H.inject(C,function(I,J){if(!J.disabled&&J.name){E=J.name;
G=$(J).getValue();
if(G!=null&&J.type!="file"&&(J.type!="submit"||(!A&&F!==false&&(!F||E==F)&&(A=true)))){I=B(I,E,G)
}}return I
})
}};
Form.Methods={serialize:function(B,A){return Form.serializeElements(Form.getElements(B),A)
},getElements:function(E){var F=$(E).getElementsByTagName("*"),D,A=[],C=Form.Element.Serializers;
for(var B=0;
D=F[B];
B++){A.push(D)
}return A.inject([],function(G,H){if(C[H.tagName.toLowerCase()]){G.push(Element.extend(H))
}return G
})
},getInputs:function(G,C,D){G=$(G);
var A=G.getElementsByTagName("input");
if(!C&&!D){return $A(A).map(Element.extend)
}for(var E=0,H=[],F=A.length;
E<F;
E++){var B=A[E];
if((C&&B.type!=C)||(D&&B.name!=D)){continue
}H.push(Element.extend(B))
}return H
},disable:function(A){A=$(A);
Form.getElements(A).invoke("disable");
return A
},enable:function(A){A=$(A);
Form.getElements(A).invoke("enable");
return A
},findFirstElement:function(B){var C=$(B).getElements().findAll(function(D){return"hidden"!=D.type&&!D.disabled
});
var A=C.findAll(function(D){return D.hasAttribute("tabIndex")&&D.tabIndex>=0
}).sortBy(function(D){return D.tabIndex
}).first();
return A?A:C.find(function(D){return/^(?:input|select|textarea)$/i.test(D.tagName)
})
},focusFirstElement:function(B){B=$(B);
var A=B.findFirstElement();
if(A){A.activate()
}return B
},request:function(B,A){B=$(B),A=Object.clone(A||{});
var D=A.parameters,C=B.readAttribute("action")||"";
if(C.blank()){C=window.location.href
}A.parameters=B.serialize(true);
if(D){if(Object.isString(D)){D=D.toQueryParams()
}Object.extend(A.parameters,D)
}if(B.hasAttribute("method")&&!A.method){A.method=B.method
}return new Ajax.Request(C,A)
}};
Form.Element={focus:function(A){$(A).focus();
return A
},select:function(A){$(A).select();
return A
}};
Form.Element.Methods={serialize:function(A){A=$(A);
if(!A.disabled&&A.name){var B=A.getValue();
if(B!=undefined){var C={};
C[A.name]=B;
return Object.toQueryString(C)
}}return""
},getValue:function(A){A=$(A);
var B=A.tagName.toLowerCase();
return Form.Element.Serializers[B](A)
},setValue:function(A,B){A=$(A);
var C=A.tagName.toLowerCase();
Form.Element.Serializers[C](A,B);
return A
},clear:function(A){$(A).value="";
return A
},present:function(A){return $(A).value!=""
},activate:function(A){A=$(A);
try{A.focus();
if(A.select&&(A.tagName.toLowerCase()!="input"||!(/^(?:button|reset|submit)$/i.test(A.type)))){A.select()
}}catch(B){}return A
},disable:function(A){A=$(A);
A.disabled=true;
return A
},enable:function(A){A=$(A);
A.disabled=false;
return A
}};
var Field=Form.Element;
var $F=Form.Element.Methods.getValue;
Form.Element.Serializers=(function(){function B(H,I){switch(H.type.toLowerCase()){case"checkbox":case"radio":return F(H,I);
default:return E(H,I)
}}function F(H,I){if(Object.isUndefined(I)){return H.checked?H.value:null
}else{H.checked=!!I
}}function E(H,I){if(Object.isUndefined(I)){return H.value
}else{H.value=I
}}function A(J,M){if(Object.isUndefined(M)){return(J.type==="select-one"?C:D)(J)
}var I,K,N=!Object.isArray(M);
for(var H=0,L=J.length;
H<L;
H++){I=J.options[H];
K=this.optionValue(I);
if(N){if(K==M){I.selected=true;
return 
}}else{I.selected=M.include(K)
}}}function C(I){var H=I.selectedIndex;
return H>=0?G(I.options[H]):null
}function D(K){var H,L=K.length;
if(!L){return null
}for(var J=0,H=[];
J<L;
J++){var I=K.options[J];
if(I.selected){H.push(G(I))
}}return H
}function G(H){return Element.hasAttribute(H,"value")?H.value:H.text
}return{input:B,inputSelector:F,textarea:E,select:A,selectOne:C,selectMany:D,optionValue:G,button:E}
})();
Abstract.TimedObserver=Class.create(PeriodicalExecuter,{initialize:function($super,A,B,C){$super(C,B);
this.element=$(A);
this.lastValue=this.getValue()
},execute:function(){var A=this.getValue();
if(Object.isString(this.lastValue)&&Object.isString(A)?this.lastValue!=A:String(this.lastValue)!=String(A)){this.callback(this.element,A);
this.lastValue=A
}}});
Form.Element.Observer=Class.create(Abstract.TimedObserver,{getValue:function(){return Form.Element.getValue(this.element)
}});
Form.Observer=Class.create(Abstract.TimedObserver,{getValue:function(){return Form.serialize(this.element)
}});
Abstract.EventObserver=Class.create({initialize:function(A,B){this.element=$(A);
this.callback=B;
this.lastValue=this.getValue();
if(this.element.tagName.toLowerCase()=="form"){this.registerFormCallbacks()
}else{this.registerCallback(this.element)
}},onElementEvent:function(){var A=this.getValue();
if(this.lastValue!=A){this.callback(this.element,A);
this.lastValue=A
}},registerFormCallbacks:function(){Form.getElements(this.element).each(this.registerCallback,this)
},registerCallback:function(A){if(A.type){switch(A.type.toLowerCase()){case"checkbox":case"radio":Event.observe(A,"click",this.onElementEvent.bind(this));
break;
default:Event.observe(A,"change",this.onElementEvent.bind(this));
break
}}}});
Form.Element.EventObserver=Class.create(Abstract.EventObserver,{getValue:function(){return Form.Element.getValue(this.element)
}});
Form.EventObserver=Class.create(Abstract.EventObserver,{getValue:function(){return Form.serialize(this.element)
}});
(function(){var c={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,KEY_INSERT:45,cache:{}};
var F=document.documentElement;
var d="onmouseenter" in F&&"onmouseleave" in F;
var A=function(e){return false
};
if(window.attachEvent){if(window.addEventListener){A=function(e){return !(e instanceof window.Event)
}
}else{A=function(e){return true
}
}}var R;
function a(f,e){return f.which?(f.which===e+1):(f.button===e)
}var O={0:1,1:4,2:2};
function Y(f,e){return f.button===O[e]
}function b(f,e){switch(e){case 0:return f.which==1&&!f.metaKey;
case 1:return f.which==2||(f.which==1&&f.metaKey);
case 2:return f.which==3;
default:return false
}}if(window.attachEvent){if(!window.addEventListener){R=Y
}else{R=function(f,e){return A(f)?Y(f,e):a(f,e)
}
}}else{if(Prototype.Browser.WebKit){R=b
}else{R=a
}}function V(e){return R(e,0)
}function T(e){return R(e,1)
}function N(e){return R(e,2)
}function D(g){g=c.extend(g);
var f=g.target,e=g.type,h=g.currentTarget;
if(h&&h.tagName){if(e==="load"||e==="error"||(e==="click"&&h.tagName.toLowerCase()==="input"&&h.type==="radio")){f=h
}}if(f.nodeType==Node.TEXT_NODE){f=f.parentNode
}return Element.extend(f)
}function P(f,g){var e=c.element(f);
if(!g){return e
}while(e){if(Object.isElement(e)&&Prototype.Selector.match(e,g)){return Element.extend(e)
}e=e.parentNode
}}function S(e){return{x:C(e),y:B(e)}
}function C(g){var f=document.documentElement,e=document.body||{scrollLeft:0};
return g.pageX||(g.clientX+(f.scrollLeft||e.scrollLeft)-(f.clientLeft||0))
}function B(g){var f=document.documentElement,e=document.body||{scrollTop:0};
return g.pageY||(g.clientY+(f.scrollTop||e.scrollTop)-(f.clientTop||0))
}function Q(e){c.extend(e);
e.preventDefault();
e.stopPropagation();
e.stopped=true
}c.Methods={isLeftClick:V,isMiddleClick:T,isRightClick:N,element:D,findElement:P,pointer:S,pointerX:C,pointerY:B,stop:Q};
var X=Object.keys(c.Methods).inject({},function(e,f){e[f]=c.Methods[f].methodize();
return e
});
if(window.attachEvent){function I(f){var e;
switch(f.type){case"mouseover":case"mouseenter":e=f.fromElement;
break;
case"mouseout":case"mouseleave":e=f.toElement;
break;
default:return null
}return Element.extend(e)
}var U={stopPropagation:function(){this.cancelBubble=true;
if(this._stopPropagation){this._stopPropagation()
}},preventDefault:function(){this.returnValue=false;
if(this._preventDefault){this._preventDefault()
}},inspect:function(){return"[object Event]"
}};
c.extend=function(f,e){if(!f){return false
}if(!A(f)){return f
}if(f._extendedByPrototype){return f
}f._extendedByPrototype=Prototype.emptyFunction;
var g=c.pointer(f);
Object.extend(f,{target:f.srcElement||e,relatedTarget:I(f),pageX:g.x,pageY:g.y});
f._stopPropagation=f.stopPropagation;
f._preventDefault=f.preventDefault;
Object.extend(f,X);
Object.extend(f,U);
return f
}
}else{c.extend=Prototype.K
}if(window.addEventListener){c.prototype=window.Event.prototype||document.createEvent("HTMLEvents").__proto__;
Object.extend(c.prototype,X)
}function M(i,h,j){var g=Element.retrieve(i,"prototype_event_registry");
if(Object.isUndefined(g)){E.push(i);
g=Element.retrieve(i,"prototype_event_registry",$H())
}var e=g.get(h);
if(Object.isUndefined(e)){e=[];
g.set(h,e)
}if(e.pluck("handler").include(j)){return false
}var f;
if(h.include(":")){f=function(k){if(Object.isUndefined(k.eventName)){return false
}if(k.eventName!==h){return false
}c.extend(k,i);
j.call(i,k)
}
}else{if(!d&&(h==="mouseenter"||h==="mouseleave")){if(h==="mouseenter"||h==="mouseleave"){f=function(l){c.extend(l,i);
var k=l.relatedTarget;
while(k&&k!==i){try{k=k.parentNode
}catch(m){k=i
}}if(k===i){return 
}j.call(i,l)
}
}}else{f=function(k){c.extend(k,i);
j.call(i,k)
}
}}f.handler=j;
e.push(f);
return f
}function H(){for(var e=0,f=E.length;
e<f;
e++){c.stopObserving(E[e]);
E[e]=null
}}var E=[];
if(Prototype.Browser.IE){window.attachEvent("onunload",H)
}if(Prototype.Browser.WebKit){window.addEventListener("unload",Prototype.emptyFunction,false)
}var L=Prototype.K,G={mouseenter:"mouseover",mouseleave:"mouseout"};
if(!d){L=function(e){return(G[e]||e)
}
}function W(h,g,i){h=$(h);
var f=M(h,g,i);
if(!f){return h
}if(g.include(":")){if(h.addEventListener){h.addEventListener("dataavailable",f,false)
}else{h.attachEvent("ondataavailable",f);
h.attachEvent("onlosecapture",f)
}}else{var e=L(g);
if(h.addEventListener){h.addEventListener(e,f,false)
}else{h.attachEvent("on"+e,f)
}}return h
}function K(l,h,m){l=$(l);
var g=Element.retrieve(l,"prototype_event_registry");
if(!g){return l
}if(!h){g.each(function(n){var i=n.key;
K(l,i)
});
return l
}var j=g.get(h);
if(!j){return l
}if(!m){j.each(function(i){K(l,h,i.handler)
});
return l
}var k=j.length,f;
while(k--){if(j[k].handler===m){f=j[k];
break
}}if(!f){return l
}if(h.include(":")){if(l.removeEventListener){l.removeEventListener("dataavailable",f,false)
}else{l.detachEvent("ondataavailable",f);
l.detachEvent("onlosecapture",f)
}}else{var e=L(h);
if(l.removeEventListener){l.removeEventListener(e,f,false)
}else{l.detachEvent("on"+e,f)
}}g.set(h,j.without(f));
return l
}function Z(h,g,f,e){h=$(h);
if(Object.isUndefined(e)){e=true
}if(h==document&&document.createEvent&&!h.dispatchEvent){h=document.documentElement
}var i;
if(document.createEvent){i=document.createEvent("HTMLEvents");
i.initEvent("dataavailable",e,true)
}else{i=document.createEventObject();
i.eventType=e?"ondataavailable":"onlosecapture"
}i.eventName=g;
i.memo=f||{};
if(document.createEvent){h.dispatchEvent(i)
}else{h.fireEvent(i.eventType,i)
}return c.extend(i)
}c.Handler=Class.create({initialize:function(g,f,e,h){this.element=$(g);
this.eventName=f;
this.selector=e;
this.callback=h;
this.handler=this.handleEvent.bind(this)
},start:function(){c.observe(this.element,this.eventName,this.handler);
return this
},stop:function(){c.stopObserving(this.element,this.eventName,this.handler);
return this
},handleEvent:function(f){var e=c.findElement(f,this.selector);
if(e){this.callback.call(this.element,f,e)
}}});
function J(g,f,e,h){g=$(g);
if(Object.isFunction(e)&&Object.isUndefined(h)){h=e,e=null
}return new c.Handler(g,f,e,h).start()
}Object.extend(c,c.Methods);
Object.extend(c,{fire:Z,observe:W,stopObserving:K,on:J});
Element.addMethods({fire:Z,observe:W,stopObserving:K,on:J});
Object.extend(document,{fire:Z.methodize(),observe:W.methodize(),stopObserving:K.methodize(),on:J.methodize(),loaded:false});
if(window.Event){Object.extend(window.Event,c)
}else{window.Event=c
}})();
(function(){var D;
function A(){if(document.loaded){return 
}if(D){window.clearTimeout(D)
}document.loaded=true;
document.fire("dom:loaded")
}function C(){if(document.readyState==="complete"){document.stopObserving("readystatechange",C);
A()
}}function B(){try{document.documentElement.doScroll("left")
}catch(E){D=B.defer();
return 
}A()
}if(document.addEventListener){document.addEventListener("DOMContentLoaded",A,false)
}else{document.observe("readystatechange",C);
if(window==top){D=B.defer()
}}Event.observe(window,"load",A)
})();
Element.addMethods();
Hash.toQueryString=Object.toQueryString;
var Toggle={display:Element.toggle};
Element.Methods.childOf=Element.Methods.descendantOf;
var Insertion={Before:function(A,B){return Element.insert(A,{before:B})
},Top:function(A,B){return Element.insert(A,{top:B})
},Bottom:function(A,B){return Element.insert(A,{bottom:B})
},After:function(A,B){return Element.insert(A,{after:B})
}};
var $continue=new Error('"throw $continue" is deprecated, use "return" instead');
var Position={includeScrollOffsets:false,prepare:function(){this.deltaX=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;
this.deltaY=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0
},within:function(B,A,C){if(this.includeScrollOffsets){return this.withinIncludingScrolloffsets(B,A,C)
}this.xcomp=A;
this.ycomp=C;
this.offset=Element.cumulativeOffset(B);
return(C>=this.offset[1]&&C<this.offset[1]+B.offsetHeight&&A>=this.offset[0]&&A<this.offset[0]+B.offsetWidth)
},withinIncludingScrolloffsets:function(B,A,D){var C=Element.cumulativeScrollOffset(B);
this.xcomp=A+C[0]-this.deltaX;
this.ycomp=D+C[1]-this.deltaY;
this.offset=Element.cumulativeOffset(B);
return(this.ycomp>=this.offset[1]&&this.ycomp<this.offset[1]+B.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+B.offsetWidth)
},overlap:function(B,A){if(!B){return 0
}if(B=="vertical"){return((this.offset[1]+A.offsetHeight)-this.ycomp)/A.offsetHeight
}if(B=="horizontal"){return((this.offset[0]+A.offsetWidth)-this.xcomp)/A.offsetWidth
}},cumulativeOffset:Element.Methods.cumulativeOffset,positionedOffset:Element.Methods.positionedOffset,absolutize:function(A){Position.prepare();
return Element.absolutize(A)
},relativize:function(A){Position.prepare();
return Element.relativize(A)
},realOffset:Element.Methods.cumulativeScrollOffset,offsetParent:Element.Methods.getOffsetParent,page:Element.Methods.viewportOffset,clone:function(B,C,A){A=A||{};
return Element.clonePosition(C,B,A)
}};
if(!document.getElementsByClassName){document.getElementsByClassName=function(B){function A(C){return C.blank()?null:"[contains(concat(' ', @class, ' '), ' "+C+" ')]"
}B.getElementsByClassName=Prototype.BrowserFeatures.XPath?function(C,E){E=E.toString().strip();
var D=/\s/.test(E)?$w(E).map(A).join(""):A(E);
return D?document._getElementsByXPath(".//*"+D,C):[]
}:function(E,F){F=F.toString().strip();
var G=[],H=(/\s/.test(F)?$w(F):null);
if(!H&&!F){return G
}var C=$(E).getElementsByTagName("*");
F=" "+F+" ";
for(var D=0,J,I;
J=C[D];
D++){if(J.className&&(I=" "+J.className+" ")&&(I.include(F)||(H&&H.all(function(K){return !K.toString().blank()&&I.include(" "+K+" ")
})))){G.push(Element.extend(J))
}}return G
};
return function(D,C){return $(C||document.body).getElementsByClassName(D)
}
}(Element.Methods)
}Element.ClassNames=Class.create();
Element.ClassNames.prototype={initialize:function(A){this.element=$(A)
},_each:function(A){this.element.className.split(/\s+/).select(function(B){return B.length>0
})._each(A)
},set:function(A){this.element.className=A
},add:function(A){if(this.include(A)){return 
}this.set($A(this).concat(A).join(" "))
},remove:function(A){if(!this.include(A)){return 
}this.set($A(this).without(A).join(" "))
},toString:function(){return $A(this).join(" ")
}};
Object.extend(Element.ClassNames.prototype,Enumerable);
(function(){window.Selector=Class.create({initialize:function(A){this.expression=A.strip()
},findElements:function(A){return Prototype.Selector.select(this.expression,A)
},match:function(A){return Prototype.Selector.match(A,this.expression)
},toString:function(){return this.expression
},inspect:function(){return"#<Selector: "+this.expression+">"
}});
Object.extend(Selector,{matchElements:function(F,G){var A=Prototype.Selector.match,D=[];
for(var C=0,E=F.length;
C<E;
C++){var B=F[C];
if(A(B,G)){D.push(Element.extend(B))
}}return D
},findElement:function(F,G,B){B=B||0;
var A=0,D;
for(var C=0,E=F.length;
C<E;
C++){D=F[C];
if(Prototype.Selector.match(D,G)&&B===A++){return Element.extend(D)
}}},findChildElements:function(B,C){var A=C.toArray().join(", ");
return Prototype.Selector.select(A,B||document)
}})
})();
if(!window.RichFaces){window.RichFaces={}
}if(!window.RichFaces.Memory){window.RichFaces.Memory={nodeCleaners:{},componentCleaners:{},addCleaner:function(A,B){this.nodeCleaners[A]=B
},addComponentCleaner:function(B,C,A){this.componentCleaners[B]={cleaner:C,checker:A}
},applyCleaners:function(B,C,D){for(var A in this.nodeCleaners){this.nodeCleaners[A](B,C)
}for(var A in this.componentCleaners){if(this.componentCleaners[A].checker(B,C)){D.push(B)
}}},_clean:function(F,E,G){if(F){this.applyCleaners(F,E,G);
var B=F.all;
if(B){var A=0;
var D=B.length;
for(var A=0;
A<D;
A++){this.applyCleaners(B[A],E,G)
}}else{var C=F.firstChild;
while(C){this._clean(C,E,G);
C=C.nextSibling
}}}},_cleanComponentNodes:function(E,D){for(var B=0;
B<E.length;
B++){var C=E[B];
for(var A in this.componentCleaners){this.componentCleaners[A].cleaner(C,D)
}}},clean:function(B,A){var C=[];
this._clean(B,A,C);
this._cleanComponentNodes(C,A);
C=null
}};
window.RichFaces.Memory.addComponentCleaner("richfaces",function(D,E){var B=D.component;
if(B){var C=B["rich:destructor"];
if(C){var A=B[C];
if(A){A.call(B,E)
}}}},function(A,B){return(A.component&&A.component["rich:destructor"])
});
if(window.attachEvent){window.attachEvent("onunload",function(){var A=window.RichFaces.Memory;
A.clean(document);
A.clean(window)
})
}}Function.prototype.indexOf=function(){return -1
};
Element.clearChildren=function(A){A=$(A);
while(A.firstChild){A.removeChild(A.firstChild)
}return A
};
Element.isChildOf=function(B,A){while(B&&A!=B){B=B.parentNode
}return A==B
};
if(typeof Node=="undefined"){Node={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12}
}Element.isUninitialized=function(A){if(A){if(A.nodeType==Node.ELEMENT_NODE){if(!A.parentNode||A.document&&A.document.readyState=="uninitialized"){return true
}else{return !Element.descendantOf(A,document.documentElement)
}return false
}}};
if(window.RichFaces&&window.RichFaces.Memory){window.RichFaces.Memory.addCleaner("prototype",function(E,G){var D=E._prototypeEventID?E._prototypeEventID[0]:undefined;
if(D){var B=Event.cache[D];
for(var A in B){var F=B[A];
var C=Event.getDOMEventName(A);
F.each(function(H){if(E.removeEventListener){E.removeEventListener(C,H,false)
}else{E.detachEvent("on"+C,H)
}});
B[A]=null
}delete Event.cache[D]
}})
}
if(!window.A4J){window.A4J={}
}function Sarissa(){}Sarissa.VERSION="0.9.9.3";
Sarissa.PARSED_OK="Document contains no parsing errors";
Sarissa.PARSED_EMPTY="Document is empty";
Sarissa.PARSED_UNKNOWN_ERROR="Not well-formed or other error";
Sarissa.IS_ENABLED_TRANSFORM_NODE=false;
Sarissa.REMOTE_CALL_FLAG="gr.abiss.sarissa.REMOTE_CALL_FLAG";
Sarissa._sarissa_iNsCounter=0;
Sarissa._SARISSA_IEPREFIX4XSLPARAM="";
Sarissa._SARISSA_HAS_DOM_IMPLEMENTATION=document.implementation&&true;
Sarissa._SARISSA_HAS_DOM_CREATE_DOCUMENT=Sarissa._SARISSA_HAS_DOM_IMPLEMENTATION&&document.implementation.createDocument;
Sarissa._SARISSA_HAS_DOM_FEATURE=Sarissa._SARISSA_HAS_DOM_IMPLEMENTATION&&document.implementation.hasFeature;
Sarissa._SARISSA_IS_MOZ=Sarissa._SARISSA_HAS_DOM_CREATE_DOCUMENT&&Sarissa._SARISSA_HAS_DOM_FEATURE;
Sarissa._SARISSA_IS_SAFARI=navigator.userAgent.toLowerCase().indexOf("safari")!=-1||navigator.userAgent.toLowerCase().indexOf("konqueror")!=-1;
Sarissa._SARISSA_IS_SAFARI_OLD=Sarissa._SARISSA_IS_SAFARI&&(parseInt((navigator.userAgent.match(/AppleWebKit\/(\d+)/)||{})[1],10)<420);
Sarissa._SARISSA_IS_IE=document.all&&window.ActiveXObject&&navigator.userAgent.toLowerCase().indexOf("msie")>-1&&navigator.userAgent.toLowerCase().indexOf("opera")==-1;
Sarissa._SARISSA_IS_IE9=Sarissa._SARISSA_IS_IE&&(parseFloat(navigator.appVersion.substring(navigator.appVersion.indexOf("MSIE")+5)))>=9;
Sarissa._SARISSA_IS_OPERA=navigator.userAgent.toLowerCase().indexOf("opera")!=-1;
if(!window.Node||!Node.ELEMENT_NODE){Node={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12}
}if(Sarissa._SARISSA_IS_SAFARI_OLD){HTMLHtmlElement=document.createElement("html").constructor;
Node=HTMLElement={};
HTMLElement.prototype=HTMLHtmlElement.__proto__.__proto__;
HTMLDocument=Document=document.constructor;
var x=new DOMParser();
XMLDocument=x.constructor;
Element=x.parseFromString("<Single />","text/xml").documentElement.constructor;
x=null
}if(typeof XMLDocument=="undefined"&&typeof Document!="undefined"){XMLDocument=Document
}if(Sarissa._SARISSA_IS_IE){Sarissa._SARISSA_IEPREFIX4XSLPARAM="xsl:";
var _SARISSA_DOM_PROGID="";
var _SARISSA_XMLHTTP_PROGID="";
var _SARISSA_DOM_XMLWRITER="";
Sarissa.pickRecentProgID=function(E){var D=false,G;
var F;
for(var B=0;
B<E.length&&!D;
B++){try{var A=new ActiveXObject(E[B]);
F=E[B];
D=true
}catch(C){G=C
}}if(!D){throw"Could not retrieve a valid progID of Class: "+E[E.length-1]+". (original exception: "+G+")"
}E=null;
return F
};
_SARISSA_DOM_PROGID=null;
_SARISSA_THREADEDDOM_PROGID=null;
_SARISSA_XSLTEMPLATE_PROGID=null;
_SARISSA_XMLHTTP_PROGID=null;
Sarissa.originalXMLHttpRequest=window.XMLHttpRequest;
XMLHttpRequest=function(){if(!_SARISSA_XMLHTTP_PROGID){_SARISSA_XMLHTTP_PROGID=Sarissa.pickRecentProgID(["Msxml2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"])
}return new ActiveXObject(_SARISSA_XMLHTTP_PROGID)
};
Sarissa.getDomDocument=function(D,C){if(!_SARISSA_DOM_PROGID){_SARISSA_DOM_PROGID=Sarissa.pickRecentProgID(["Msxml2.DOMDocument.6.0","Msxml2.DOMDocument.3.0","MSXML2.DOMDocument","MSXML.DOMDocument","Microsoft.XMLDOM"])
}var A=new ActiveXObject(_SARISSA_DOM_PROGID);
if(C){var B="";
if(D){if(C.indexOf(":")>1){B=C.substring(0,C.indexOf(":"));
C=C.substring(C.indexOf(":")+1)
}else{B="a"+(Sarissa._sarissa_iNsCounter++)
}}if(D){A.loadXML("<"+B+":"+C+" xmlns:"+B+'="'+D+'" />')
}else{A.loadXML("<"+C+" />")
}}return A
};
Sarissa.getParseErrorText=function(A){var C=Sarissa.PARSED_OK;
if(A&&A.parseError&&A.parseError.errorCode&&A.parseError.errorCode!=0){C="XML Parsing Error: "+A.parseError.reason+"\nLocation: "+A.parseError.url+"\nLine Number "+A.parseError.line+", Column "+A.parseError.linepos+":\n"+A.parseError.srcText+"\n";
for(var B=0;
B<A.parseError.linepos;
B++){C+="-"
}C+="^\n"
}else{if(A.documentElement===null){C=Sarissa.PARSED_EMPTY
}}return C
};
Sarissa.setXpathNamespaces=function(A,B){A.setProperty("SelectionLanguage","XPath");
A.setProperty("SelectionNamespaces",B)
};
XSLTProcessor=function(){if(!_SARISSA_XSLTEMPLATE_PROGID){_SARISSA_XSLTEMPLATE_PROGID=Sarissa.pickRecentProgID(["Msxml2.XSLTemplate.6.0","MSXML2.XSLTemplate.3.0"])
}this.template=new ActiveXObject(_SARISSA_XSLTEMPLATE_PROGID);
this.processor=null
};
XSLTProcessor.prototype.importStylesheet=function(D){if(!_SARISSA_THREADEDDOM_PROGID){_SARISSA_THREADEDDOM_PROGID=Sarissa.pickRecentProgID(["MSXML2.FreeThreadedDOMDocument.6.0","MSXML2.FreeThreadedDOMDocument.3.0"])
}D.setProperty("SelectionLanguage","XPath");
D.setProperty("SelectionNamespaces","xmlns:xsl='http://www.w3.org/1999/XSL/Transform'");
var C=new ActiveXObject(_SARISSA_THREADEDDOM_PROGID);
try{C.resolveExternals=true;
C.setProperty("AllowDocumentFunction",true)
}catch(B){}if(D.url&&D.selectSingleNode("//xsl:*[local-name() = 'import' or local-name() = 'include']")!=null){C.async=false;
C.load(D.url)
}else{C.loadXML(D.xml)
}C.setProperty("SelectionNamespaces","xmlns:xsl='http://www.w3.org/1999/XSL/Transform'");
var A=C.selectSingleNode("//xsl:output");
if(A){this.outputMethod=A.getAttribute("method")
}else{delete this.outputMethod
}this.template.stylesheet=C;
this.processor=this.template.createProcessor();
this.paramsSet=[]
};
XSLTProcessor.prototype.transformToDocument=function(C){var B;
if(_SARISSA_THREADEDDOM_PROGID){this.processor.input=C;
B=new ActiveXObject(_SARISSA_DOM_PROGID);
this.processor.output=B;
this.processor.transform();
return B
}else{if(!_SARISSA_DOM_XMLWRITER){_SARISSA_DOM_XMLWRITER=Sarissa.pickRecentProgID(["Msxml2.MXXMLWriter.6.0","Msxml2.MXXMLWriter.3.0","MSXML2.MXXMLWriter","MSXML.MXXMLWriter","Microsoft.XMLDOM"])
}this.processor.input=C;
B=new ActiveXObject(_SARISSA_DOM_XMLWRITER);
this.processor.output=B;
this.processor.transform();
var A=new ActiveXObject(_SARISSA_DOM_PROGID);
A.loadXML(B.output+"");
return A
}};
XSLTProcessor.prototype.transformToFragment=function(G,D){this.processor.input=G;
this.processor.transform();
var E=this.processor.output;
var F=D.createDocumentFragment();
var B;
if(this.outputMethod=="text"){F.appendChild(D.createTextNode(E))
}else{if(D.body&&D.body.innerHTML){B=D.createElement("div");
B.innerHTML=E;
while(B.hasChildNodes()){F.appendChild(B.firstChild)
}}else{var A=new ActiveXObject(_SARISSA_DOM_PROGID);
if(E.substring(0,5)=="<?xml"){E=E.substring(E.indexOf("?>")+2)
}var C="".concat("<my>",E,"</my>");
A.loadXML(C);
B=A.documentElement;
while(B.hasChildNodes()){F.appendChild(B.firstChild)
}}}return F
};
XSLTProcessor.prototype.setParameter=function(C,A,B){B=B?B:"";
if(C){this.processor.addParameter(A,B,C)
}else{this.processor.addParameter(A,B)
}C=""+(C||"");
if(!this.paramsSet[C]){this.paramsSet[C]=[]
}this.paramsSet[C][A]=B
};
XSLTProcessor.prototype.getParameter=function(B,A){B=""+(B||"");
if(this.paramsSet[B]&&this.paramsSet[B][A]){return this.paramsSet[B][A]
}else{return null
}};
XSLTProcessor.prototype.clearParameters=function(){for(var B in this.paramsSet){for(var A in this.paramsSet[B]){if(B!=""){this.processor.addParameter(A,"",B)
}else{this.processor.addParameter(A,"")
}}}this.paramsSet=[]
}
}else{if(Sarissa._SARISSA_HAS_DOM_CREATE_DOCUMENT){Sarissa.__handleLoad__=function(A){Sarissa.__setReadyState__(A,4)
};
_sarissa_XMLDocument_onload=function(){Sarissa.__handleLoad__(this)
};
Sarissa.__setReadyState__=function(A,B){A.readyState=B;
A.readystate=B;
if(A.onreadystatechange!=null&&typeof A.onreadystatechange=="function"){A.onreadystatechange()
}};
Sarissa.getDomDocument=function(C,B){var A=document.implementation.createDocument(C?C:null,B?B:null,null);
if(!A.onreadystatechange){A.onreadystatechange=null
}if(!A.readyState){A.readyState=0
}A.addEventListener("load",_sarissa_XMLDocument_onload,false);
return A
};
if(window.XMLDocument){}else{if(Sarissa._SARISSA_HAS_DOM_FEATURE&&window.Document&&!Document.prototype.load&&document.implementation.hasFeature("LS","3.0")){Sarissa.getDomDocument=function(C,B){var A=document.implementation.createDocument(C?C:null,B?B:null,null);
return A
}
}else{Sarissa.getDomDocument=function(C,B){var A=document.implementation.createDocument(C?C:null,B?B:null,null);
if(A&&(C||B)&&!A.documentElement){A.appendChild(A.createElementNS(C,B))
}return A
}
}}}}if(!window.DOMParser||Sarissa._SARISSA_IS_IE9){if(Sarissa._SARISSA_IS_SAFARI){DOMParser=function(){};
DOMParser.prototype.parseFromString=function(B,C){var A=new XMLHttpRequest();
A.open("GET","data:text/xml;charset=utf-8,"+encodeURIComponent(B),false);
A.send(null);
return A.responseXML
}
}else{if(Sarissa.getDomDocument&&Sarissa.getDomDocument()&&Sarissa.getDomDocument(null,"bar").xml){DOMParser=function(){};
DOMParser.prototype.parseFromString=function(A,C){var B=Sarissa.getDomDocument();
B.loadXML(A);
return B
}
}}}if((typeof (document.importNode)=="undefined")&&Sarissa._SARISSA_IS_IE){try{var importTable={TBODY:["<table>","</table>"],THEAD:["<table>","</table>"],TFOOT:["<table>","</table>"],TR:["<table><tbody>","</tbody></table>"],TH:["<table><thead><tr>","</tr></thead></table>"],TD:["<table><tbody><tr>","</tr></tbody></table>"],OPTION:["<select>","</select>"]};
document.importNode=function(K,G){var H;
if(K.nodeName=="#text"){return document.createTextNode(K.data)
}else{var D=K.nodeName.toUpperCase();
var B=importTable[D];
var C;
if(G){C=K.xml?K.xml:K.outerHTML
}else{C=K.xml?K.cloneNode(false).xml:K.cloneNode(false).outerHTML
}var I=document.createElement("div");
if(B){C=B[0]+C+B[1]
}I.innerHTML=C;
var J=new Array(I.firstChild);
var L;
while(!L){var A=new Array();
for(var F=0;
F<J.length&&!L;
F++){var E=J[F];
while(E){if(E.tagName&&E.tagName.toUpperCase()==D){L=E;
break
}else{if(E.firstChild){A.push(E.firstChild)
}E=E.nextSibling
}}}J=A
}return L
}}
}catch(e){}}if(!Sarissa.getParseErrorText){Sarissa.getParseErrorText=function(A){var C=Sarissa.PARSED_OK;
if(!A.documentElement){C=Sarissa.PARSED_EMPTY
}else{if(A.documentElement.tagName=="parsererror"){C=A.documentElement.firstChild.data;
C+="\n"+A.documentElement.firstChild.nextSibling.firstChild.data
}else{if(A.getElementsByTagName("parsererror").length>0){var B=A.getElementsByTagName("parsererror")[0];
C=Sarissa.getText(B,true)+"\n"
}else{if(A.parseError&&A.parseError.errorCode!=0){C=Sarissa.PARSED_UNKNOWN_ERROR
}}}}return C
}
}Sarissa.getText=function(G,B){var E="";
var C=G.childNodes;
for(var D=0;
D<C.length;
D++){var F=C[D];
var A=F.nodeType;
if(A==Node.TEXT_NODE||A==Node.CDATA_SECTION_NODE){E+=F.data
}else{if(B===true&&(A==Node.ELEMENT_NODE||A==Node.DOCUMENT_NODE||A==Node.DOCUMENT_FRAGMENT_NODE)){E+=Sarissa.getText(F,true)
}}}return E
};
if((!window.XMLSerializer||Sarissa._SARISSA_IS_IE9)&&Sarissa.getDomDocument&&Sarissa.getDomDocument("","foo",null).xml){XMLSerializer=function(){};
XMLSerializer.prototype.serializeToString=function(A){return A.xml
}
}Sarissa.stripTags=function(A){return A?A.replace(/<[^>]+>/g,""):A
};
Sarissa.clearChildNodes=function(A){while(A.firstChild){A.removeChild(A.firstChild)
}};
Sarissa.copyChildNodes=function(D,E,F){if(Sarissa._SARISSA_IS_SAFARI&&E.nodeType==Node.DOCUMENT_NODE){E=E.documentElement
}if((!D)||(!E)){throw"Both source and destination nodes must be provided"
}if(!F){Sarissa.clearChildNodes(E)
}var B=E.nodeType==Node.DOCUMENT_NODE?E:E.ownerDocument;
var A=D.childNodes;
var C;
if(typeof (B.importNode)!="undefined"){for(C=0;
C<A.length;
C++){E.appendChild(B.importNode(A[C],true))
}}else{for(C=0;
C<A.length;
C++){E.appendChild(A[C].cloneNode(true))
}}};
Sarissa.moveChildNodes=function(D,E,F){if((!D)||(!E)){throw"Both source and destination nodes must be provided"
}if(!F){Sarissa.clearChildNodes(E)
}var A=D.childNodes;
if(D.ownerDocument==E.ownerDocument){while(D.firstChild){E.appendChild(D.firstChild)
}}else{var B=E.nodeType==Node.DOCUMENT_NODE?E:E.ownerDocument;
var C;
if(typeof (B.importNode)!="undefined"){for(C=0;
C<A.length;
C++){E.appendChild(B.importNode(A[C],true))
}}else{for(C=0;
C<A.length;
C++){E.appendChild(A[C].cloneNode(true))
}}Sarissa.clearChildNodes(D)
}};
Sarissa.xmlize=function(E,G,D){D=D?D:"";
var F=D+"<"+G+">";
var B=false;
if(!(E instanceof Object)||E instanceof Number||E instanceof String||E instanceof Boolean||E instanceof Date){F+=Sarissa.escape(""+E);
B=true
}else{F+="\n";
var A=E instanceof Array;
for(var C in E){F+=Sarissa.xmlize(E[C],(A?'array-item key="'+C+'"':C),D+"   ")
}F+=D
}return(F+=(G.indexOf(" ")!=-1?"</array-item>\n":"</"+G+">\n"))
};
Sarissa.escape=function(A){return A.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")
};
Sarissa.unescape=function(A){return A.replace(/&apos;/g,"'").replace(/&quot;/g,'"').replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&amp;/g,"&")
};
Sarissa.updateCursor=function(B,A){if(B&&B.style&&B.style.cursor!=undefined){B.style.cursor=A
}};
Sarissa.updateContentFromURI=function(C,H,A,G,E){try{Sarissa.updateCursor(H,"wait");
var B=new XMLHttpRequest();
B.open("GET",C,true);
B.onreadystatechange=function(){if(B.readyState==4){try{var I=B.responseXML;
if(I&&Sarissa.getParseErrorText(I)==Sarissa.PARSED_OK){Sarissa.updateContentFromNode(B.responseXML,H,A);
G(C,H)
}else{throw Sarissa.getParseErrorText(I)
}}catch(J){if(G){G(C,H,J)
}else{throw J
}}}};
if(E){var F="Sat, 1 Jan 2000 00:00:00 GMT";
B.setRequestHeader("If-Modified-Since",F)
}B.send("")
}catch(D){Sarissa.updateCursor(H,"auto");
if(G){G(C,H,D)
}else{throw D
}}};
Sarissa.updateContentFromNode=function(E,F,A){try{Sarissa.updateCursor(F,"wait");
Sarissa.clearChildNodes(F);
var B=E.nodeType==Node.DOCUMENT_NODE?E:E.ownerDocument;
if(B.parseError&&B.parseError.errorCode!=0){var D=document.createElement("pre");
D.appendChild(document.createTextNode(Sarissa.getParseErrorText(B)));
F.appendChild(D)
}else{if(A){E=A.transformToDocument(E)
}if(F.tagName.toLowerCase()=="textarea"||F.tagName.toLowerCase()=="input"){F.value=new XMLSerializer().serializeToString(E)
}else{if(E.nodeType==Node.DOCUMENT_NODE||E.ownerDocument.documentElement==E){F.innerHTML=new XMLSerializer().serializeToString(E)
}else{F.appendChild(F.ownerDocument.importNode(E,true))
}}}}catch(C){throw C
}finally{Sarissa.updateCursor(F,"auto")
}};
Sarissa.formToQueryString=function(G){var A="";
for(var F=0;
F<G.elements.length;
F++){var E=G.elements[F];
var D=E.getAttribute("name")?E.getAttribute("name"):E.getAttribute("id");
if(D&&((!E.disabled)||E.type=="hidden")){switch(E.type){case"hidden":case"text":case"textarea":case"password":A+=D+"="+encodeURIComponent(E.value)+"&";
break;
case"select-one":A+=D+"="+encodeURIComponent(E.options[E.selectedIndex].value)+"&";
break;
case"select-multiple":for(var C=0;
C<E.length;
C++){var B=E.options[C];
if(B.selected===true){A+=D+"[]="+encodeURIComponent(B.value)+"&"
}}break;
case"checkbox":case"radio":if(E.checked){A+=D+"="+encodeURIComponent(E.value)+"&"
}break
}}}return A.substr(0,A.length-1)
};
Sarissa.updateContentFromForm=function(F,H,A,G){try{Sarissa.updateCursor(H,"wait");
var E=Sarissa.formToQueryString(F)+"&"+Sarissa.REMOTE_CALL_FLAG+"=true";
var B=new XMLHttpRequest();
var C=F.getAttribute("method")&&F.getAttribute("method").toLowerCase()=="get";
if(C){B.open("GET",F.getAttribute("action")+"?"+E,true)
}else{B.open("POST",F.getAttribute("action"),true);
B.setRequestHeader("Content-type","application/x-www-form-urlencoded");
B.setRequestHeader("Content-length",E.length);
B.setRequestHeader("Connection","close")
}B.onreadystatechange=function(){try{if(B.readyState==4){var I=B.responseXML;
if(I&&Sarissa.getParseErrorText(I)==Sarissa.PARSED_OK){Sarissa.updateContentFromNode(B.responseXML,H,A);
G(F,H)
}else{throw Sarissa.getParseErrorText(I)
}}}catch(J){if(G){G(F,H,J)
}else{throw J
}}};
B.send(C?"":E)
}catch(D){Sarissa.updateCursor(H,"auto");
if(G){G(F,H,D)
}else{throw D
}}return false
};
A4J.AJAX={};
A4J.AJAX.VIEW_ROOT_ID="_viewRoot";
A4J.AJAX.Stub=function(){};
A4J.AJAX.isWebKit=navigator.userAgent.search(/( AppleWebKit\/)([^ ]+)/)!=-1;
A4J.AJAX.XMLHttpRequest=function(A){this._query=A;
this._documentElement=window.document.documentElement
};
A4J.AJAX.XMLHttpRequest.prototype={_query:null,_timeout:0,_timeoutID:null,onready:null,_parsingStatus:Sarissa.PARSED_EMPTY,_errorMessage:"XML Response object not set",_contentType:null,_onerror:function(C,A,B){if(A!=599&&C.getResponseText()){A4J.AJAX.replacePage(C)
}},onfinish:null,options:{},domEvt:null,form:null,_request:null,_aborted:false,_documentElement:null,setRequestTimeout:function(A){this._timeout=A
},send:function(){this._request=new XMLHttpRequest();
var C=this;
this._request.onreadystatechange=function(){if(window.document.documentElement!=C._documentElement){LOG.warn("Page for current request have been unloaded - abort processing");
if(!C._status_stopped){A4J.AJAX.status(C.containerId,C.options.status,false);
C._status_stopped=true
}C.abort();
return 
}LOG.debug("Request state : "+C._request.readyState);
if(C._request.readyState==4){if(C._aborted){A4J.AJAX.status(C.containerId,C.options.status,false);
A4J.AJAX.popQueue(C);
return 
}LOG.debug("Request end with state 4");
if(C._timeoutID){window.clearTimeout(C._timeoutID)
}var F;
var D;
try{F=C._request.status;
D=C._request.statusText
}catch(E){LOG.error("request don't have status code - network problem, "+E.message);
F=599;
D="Network error"
}if(F==200){try{LOG.debug("Response  with content-type: "+C.getResponseHeader("Content-Type"));
LOG.debug("Full response content: ",C.getResponseText())
}catch(E){}if(C._request.responseXML){C._parsingStatus=Sarissa.getParseErrorText(C._request.responseXML);
if(C._parsingStatus==Sarissa.PARSED_OK&&Sarissa.setXpathNamespaces){Sarissa.setXpathNamespaces(C._request.responseXML,"xmlns='http://www.w3.org/1999/xhtml'")
}}if(C.onready){C.onready(C)
}}else{C._errorMessage="Request error, status : "+F+" "+D;
LOG.error(C._errorMessage);
if(typeof (C._onerror)=="function"){C._onerror(C,F,C._errorMessage)
}if(C.onfinish){C.onfinish(C)
}}C=undefined
}};
try{LOG.debug("Start XmlHttpRequest");
this._request.open("POST",this._query.getActionUrl(""),true);
var B="application/x-www-form-urlencoded; charset=UTF-8";
this._request.setRequestHeader("Content-Type",B)
}catch(A){LOG.debug("XmlHttpRequest not support setRequestHeader - use GET instead of POST");
this._request.open("GET",this._query.getActionUrl("")+"?"+this._query.getQueryString(),true)
}this._request.send(this._query.getQueryString());
if(this._timeout>0){this._timeoutID=window.setTimeout(function(){LOG.warn("request stopped due to timeout");
if(!C._aborted){if(typeof (A4J.AJAX.onAbort)=="function"){A4J.AJAX.onAbort(C)
}}C._aborted=true;
C._request.onreadystatechange=A4J.AJAX.Stub;
C._request.abort();
if(C._onerror){C._errorMessage="Request timeout";
C._onerror(C,500,C._errorMessage)
}if(C.onfinish){C.onfinish(C)
}C._request=undefined;
C=undefined
},this._timeout)
}},abort:function(){this._oncomplete_aborted=true;
if(!this._aborted){if(typeof (A4J.AJAX.onAbort)=="function"){A4J.AJAX.onAbort(this)
}}this._aborted=true
},getResponseText:function(){try{return this._request.responseText
}catch(A){return null
}},getError:function(){return this._errorMessage
},getParserStatus:function(){return this._parsingStatus
},getContentType:function(){if(!this._contentType){var B=this.getResponseHeader("Content-Type");
if(B){var A=B.indexOf(";");
if(A>=0){this._contentType=B.substring(0,A)
}else{this._contentType=B
}}else{this._contentType="text/html"
}}return this._contentType
},getResponseHeader:function(B){var A;
try{A=this._request.getResponseHeader(B);
if(A===""){A=undefined
}}catch(E){}if(!A){LOG.debug("Header "+B+" not found, search in <meta>");
if(this._parsingStatus==Sarissa.PARSED_OK){var F=this.getElementsByTagName("meta");
for(var C=0;
C<F.length;
C++){var D=F[C];
LOG.debug("Find <meta name='"+D.getAttribute("name")+"' content='"+D.getAttribute("content")+"'>");
if(D.getAttribute("name")==B){A=D.getAttribute("content");
break
}}}}return A
},getElementsByTagName:function(A,C){if(!C){C=this._request.responseXML
}LOG.debug("search for elements by name '"+A+"'  in element "+C.nodeName);
var E;
try{E=C.selectNodes('.//*[local-name()="'+A+'"]')
}catch(B){try{E=C.getElementsByTagName(A)
}catch(D){LOG.debug("getElementsByTagName found no elements, "+D.Message)
}}return E
},getElementById:function(B){var A=this._request.responseXML;
if(A){if(typeof (A.getElementById)!="undefined"){LOG.debug("call getElementById for id= "+B);
return A.getElementById(B)
}else{if(typeof (A.selectSingleNode)!="undefined"){LOG.debug("call selectSingleNode for id= "+B);
return A.selectSingleNode("//*[@id='"+B+"']")
}else{if(typeof (A.nodeFromID)!="undefined"){LOG.debug("call nodeFromID for id= "+B);
return A.nodeFromID(B)
}}}LOG.error("No functions for getElementById found ")
}else{LOG.debug("No parsed XML document in response")
}return null
},getJSON:function(id){var data;
var dataElement=this.getElementById(id);
if(dataElement){try{data=Sarissa.getText(dataElement,true);
data=window.eval("("+data+")")
}catch(e){LOG.error("Error on parsing JSON data "+e.message,data)
}}return data
},_evaluateScript:function(node){var includeComments=!A4J.AJAX.isXhtmlScriptMode();
var newscript=A4J.AJAX.getText(node,includeComments);
try{LOG.debug("Evaluate script replaced area in document: ",newscript);
if(window.execScript){window.execScript(newscript)
}else{window.eval(newscript)
}LOG.debug("Script evaluation succeeded")
}catch(e){LOG.error("ERROR Evaluate script:  Error name: "+e.name+e.message?". Error message: "+e.message:"")
}},evaluateQueueScript:function(){var A=this.getElementById("org.ajax4jsf.queue_script");
if(A){this._evaluateScript(A)
}},evalScripts:function(A,B){var D=this.getElementsByTagName("script",A);
LOG.debug("Scripts in updated part count : "+D.length);
if(D.length>0){var C=this;
window.setTimeout(function(){for(var E=0;
E<D.length;
E++){C._evaluateScript(D[E])
}D=null;
if(B){C.doFinish()
}C=undefined
},0)
}else{if(B){this.doFinish()
}}},updatePagePart:function(H,D){var C=this.getElementById(H);
if(!C){LOG.error("New node for ID "+H+" is not present in response");
if(D){this.doFinish()
}return 
}var A=window.document.getElementById(H);
if(A){if(window.RichFaces&&window.RichFaces.Memory){window.RichFaces.Memory.clean(A,true)
}var B=A.parentNode;
if(!window.opera&&!A4J.AJAX.isWebkitBreakingAmps()&&A.outerHTML&&!A.tagName.match(/(tbody|thead|tfoot|tr|th|td)/i)){LOG.debug("Replace content of node by outerHTML()");
if(!Sarissa._SARISSA_IS_IE||A.tagName.toLowerCase()!="table"){try{A.innerHTML=""
}catch(F){LOG.error("Error to clear node content by innerHTML "+F.message);
Sarissa.clearChildNodes(A)
}}A.outerHTML=new XMLSerializer().serializeToString(C)
}else{Sarissa.clearChildNodes(A);
if(A4J.AJAX.isWebKit){try{C.normalize()
}catch(F){LOG.error("Node normalization failed "+F.message)
}}var E=window.document.importNode(C,true);
LOG.debug("Replace content of node by replaceChild()");
var G=null;
A4J.AJAX.TestReplacedGetElementByIdVisibility();
if(!A4J.AJAX._testReplacedGetElementByIdVisibility){LOG.debug("Temporarily substituting document.getElementById() to work around WebKit issue");
G=document.getElementById;
document.getElementById=function(L){var J=G.apply(document,arguments);
if(!J){var L=arguments[0];
LOG.debug("Element [@id='"+L+"'] was not found in document, trying to locate XPath match");
try{var I=E.ownerDocument.evaluate("//*[@id='"+L+"']",E,null,XPathResult.ANY_UNORDERED_NODE_TYPE);
if(I){J=I.singleNodeValue
}LOG.debug("XPath located: "+J)
}catch(K){LOG.error("Error locating [@id='"+L+"'] element: "+K.message)
}}return J
}
}try{B.replaceChild(E,A)
}finally{if(G){LOG.debug("Restoring document.getElementById()");
document.getElementById=G
}}}if(!A4J.AJAX._scriptEvaluated){this.evalScripts(C,D)
}LOG.debug("Update part of page for Id: "+H+" successful")
}else{LOG.warn("Node for replace by response with id "+H+" not found in document");
if(!A4J.AJAX._scriptEvaluated&&D){this.doFinish()
}}if(A4J.AJAX._scriptEvaluated&&D){this.doFinish()
}},doFinish:function(){if(this.onfinish){this.onfinish(this)
}},appendNewHeadElements:function(F){var C=this._appendNewElements("script","src",null,null,["type","language","charset"]);
var E=this;
C.concat(this._appendNewElements("link","href","class",["component","user"],["type","rev","media"],{"class":"className"},function(H,G){E._copyAttribute(H,G,"rel")
}));
if(C.length==0){F();
return 
}A4J.AJAX.headElementsCounter=C.length;
var A=function(){if(this.readyState=="loaded"||this.readyState=="complete"){this.onreadystatechange=null;
this.onload=null;
F()
}};
var D=function(){this.onreadystatechange=null;
this.onload=null;
F()
};
for(var B=0;
B<C.length;
B++){C[B].onreadystatechange=A;
C[B].onload=D
}},_appendNewElements:function(W,Q,X,N,J,B,D){var E=document.getElementsByTagName("head")[0]||document.documentElement;
var C=this.getElementsByTagName(W);
var L=document.getElementsByTagName(W);
var F=(B&&B[X])||X;
var M=[];
var R={};
if(N){var P=0;
for(var O=0;
O<L.length;
O++){var G=L[O];
var S=G[F];
for(;
P<N.length&&N[P]!=S;
P++){R[N[P]]=G
}if(P==N.length){break
}}}for(var P=0;
P<C.length;
P++){var A=C[P];
var H=A.getAttribute(Q);
var K;
if(N){K=A.getAttribute(X)
}if(H){var U=false;
LOG.debug("<"+W+"> in response with src="+H);
for(var O=0;
O<L.length;
O++){if(this._noSessionHref(H)==this._noSessionHref(L[O].getAttribute(Q))){LOG.debug("Such element exist in document");
if(X){var V=L[O][F];
if((!K^!V)||(K&&V&&K!=V)){LOG.warn("Roles are different")
}}U=true;
break
}}if(!U){var T=document.createElement(W);
T.setAttribute(Q,H);
for(var O=0;
O<J.length;
O++){this._copyAttribute(A,T,J[O])
}if(K){T[F]=K
}LOG.debug("append element to document");
for(var O=0;
O<A4J.AJAX._headTransformers.length;
O++){A4J.AJAX._headTransformers[O](T)
}var I=R[K];
if(I&&I.parentNode){I.parentNode.insertBefore(T,I)
}else{E.appendChild(T)
}if(D){D(A,T)
}if(W!="link"||T.type.toLowerCase()=="text/javascript"){M.push(T)
}}}}return M
},_noSessionHref:function(A){var B=A;
if(A){var C=A.lastIndexOf(";jsessionid=");
if(C>0){B=A.substring(0,C);
var D=A.lastIndexOf("?");
if(D>C){B=B+A.substring(D)
}}}return B
},_copyAttribute:function(C,D,A){var B=C.getAttribute(A);
if(B){D.setAttribute(A,B)
}}};
A4J.AJAX.Listener=function(A){this.onafterajax=A
};
A4J.AJAX.AjaxListener=function(A,B){this[A]=B
};
A4J.AJAX._listeners=[];
A4J.AJAX.AddListener=function(A){A4J.AJAX._listeners.push(A)
};
A4J.AJAX.removeListeners=function(A){A4J.AJAX._listeners=[]
};
A4J.AJAX.removeListener=function(B){for(var A=A4J.AJAX._listeners.length-1;
A>=0;
A--){if(A4J.AJAX._listeners[A]==B){A4J.AJAX._listeners.splice(A,1)
}}};
A4J.AJAX.HeadElementTransformer=function(A){this.elt=A
};
A4J.AJAX._headTransformers=[];
A4J.AJAX.AddHeadElementTransformer=function(A){A4J.AJAX._headTransformers.push(A)
};
A4J.AJAX.SetZeroRequestDelay=function(A){if(typeof A.requestDelay=="undefined"){A.requestDelay=0
}};
A4J.AJAX._pollers={};
A4J.AJAX.Poll=function(B,A){A4J.AJAX.StopPoll(A.pollId);
if(!A.onerror){A.onerror=function(E,C,D){if(typeof (A4J.AJAX.onError)=="function"){A4J.AJAX.onError(E,C,D)
}A4J.AJAX.Poll(B,A)
}
}if(!A.onqueuerequestdrop){A.onqueuerequestdrop=function(){A4J.AJAX.Poll(B,A)
}
}A4J.AJAX.SetZeroRequestDelay(A);
A4J.AJAX._pollers[A.pollId]=window.setTimeout(function(){A4J.AJAX._pollers[A.pollId]=undefined;
if((typeof (A.onsubmit)=="function")&&(A.onsubmit()==false)){A4J.AJAX.Poll(B,A)
}else{A4J.AJAX.Submit(B,null,A)
}},A.pollinterval)
};
A4J.AJAX.StopPoll=function(A){if(A4J.AJAX._pollers[A]){window.clearTimeout(A4J.AJAX._pollers[A]);
A4J.AJAX._pollers[A]=undefined
}};
A4J.AJAX.Push=function(B,A){A4J.AJAX.StopPush(A.pushId);
A.onerror=function(){A4J.AJAX.Push(B,A)
};
A.onqueuerequestdrop=function(){LOG.debug("Push main request dropped from queue")
};
A4J.AJAX._pollers[A.pushId]=window.setTimeout(function(){var C=new XMLHttpRequest();
C.onreadystatechange=function(){if(C.readyState==4){try{if(C.status==200){if(C.getResponseHeader("Ajax-Push-Status")=="READY"){A4J.AJAX.SetZeroRequestDelay(A);
A4J.AJAX.Submit(B||A.dummyForm,null,A)
}}}catch(D){}C=null;
A4J.AJAX._pollers[A.pushId]=null;
A4J.AJAX.Push(B,A)
}};
A4J.AJAX.SendPush(C,A)
},A.pushinterval)
};
A4J.AJAX.SendPush=function(C,B){var A=B.pushUrl||B.actionUrl;
C.open("HEAD",A,true);
C.setRequestHeader("Ajax-Push-Key",B.pushId);
if(B.timeout){C.setRequestHeader("Timeout",B.timeout)
}C.send(null)
};
A4J.AJAX.StopPush=function(A){if(A4J.AJAX._pollers[A]){window.clearTimeout(A4J.AJAX._pollers[A]);
A4J.AJAX._pollers[A]=null
}};
A4J.AJAX.CloneObject=function(C,B){var A={};
for(var D in C){if(B&&typeof (evt[prop])=="function"){continue
}A[D]=C[D]
}return A
};
A4J.AJAX.SubmitForm=function(C,A){var B=A4J.AJAX.CloneObject(A);
if(A4J._formInput){LOG.debug("Form submitted by button "+A4J._formInput.id);
B.control=A4J._formInput;
A4J._formInput=null;
B.submitByForm=true
}A4J.AJAX.Submit(C,null,B)
};
A4J.AJAX.SubmiteventsQueue=function(A){A.submit()
};
A4J.AJAX.CloneEvent=function(A){var B;
A=A||window.event||null;
if(A){try{B=A4J.AJAX.CloneObject(A,false)
}catch(C){LOG.warn("Exception on clone event "+C.name+":"+C.message)
}LOG.debug("Have Event "+B+" with properties: target: "+B.target+", srcElement: "+B.srcElement+", type: "+B.type)
}return B
};
A4J.AJAX.PrepareQuery=function(G,F,C){for(var A=0;
A<A4J.AJAX._listeners.length;
A++){var E=A4J.AJAX._listeners[A];
if(E.onbeforeajax){E.onbeforeajax(G,F,C)
}}LOG.debug("Query preparation for form '"+G+"' requested");
var D=window.document.getElementById(G);
if((!D||D.nodeName.toUpperCase()!="FORM")&&F){var B=F.target||F.srcElement||null;
if(B){D=A4J.AJAX.locateForm(B)
}}if(!C.submitByForm&&D&&D.onsubmit){LOG.debug("Form have onsubmit function, call it");
if(D.onsubmit()==false){return false
}}var H=new A4J.Query(C.containerId,D);
H.appendFormControls(C.single,C.control);
if(C.parameters){H.appendParameters(C.parameters)
}if(C.actionUrl){H.setActionUrl(C.actionUrl)
}return H
};
A4J.AJAX.SubmitQuery=function(G,B,F){var E=new A4J.AJAX.XMLHttpRequest(G);
var D=G._form;
var A=G._containerId;
E.options=B;
E.containerId=A;
E.domEvt=F;
E.form=D;
if(B.timeout){E.setRequestTimeout(B.timeout)
}E.onready=A4J.AJAX.processResponse;
if(B.onerror){E._onerror=B.onerror
}else{if(typeof (A4J.AJAX.onError)=="function"){E._onerror=A4J.AJAX.onError
}}var C=B.queueonerror;
if(C){var H=E._onerror;
if(H){E._onerror=function(){C.apply(this,arguments);
H.apply(this,arguments)
}
}else{E._onerror=C
}}E.onfinish=A4J.AJAX.finishRequest;
LOG.debug("NEW AJAX REQUEST !!! with form: "+(D.id||D.name||D));
A4J.AJAX.status(A,B.status,true);
E.send();
return E
};
A4J.AJAX.Submit=function(F,C,B){var E=A4J.AJAX.CloneEvent(C);
var D=A4J.AJAX.PrepareQuery(F,E,B);
if(D){var A=A4J.AJAX.EventQueue.getOrCreateQueue(B,F);
if(A){A.push(D,B,E)
}else{A4J.AJAX.SubmitQuery(D,B,E)
}}return false
};
A4J.AJAX.SubmitRequest=function(E,B,A){var D=A4J.AJAX.CloneEvent(B);
var C=A4J.AJAX.PrepareQuery(E,D,A);
if(C){A4J.AJAX.SubmitQuery(C,A,D)
}return false
};
A4J.AJAX.processResponseAfterUpdateHeadElements=function(C,B){C.evaluateQueueScript();
for(var A=0;
A<B.length;
A++){var D=B[A];
LOG.debug("Update page part from call parameter for ID "+D);
C.updatePagePart(D,A==B.length-1)
}};
A4J.AJAX.headElementsCounter=0;
A4J.AJAX.processResponse=function(A){A4J.AJAX.TestScriptEvaluation();
var E=A.options;
var T=A.getResponseHeader("Ajax-Response");
var R=A.getResponseHeader("Ajax-Expired");
if(R&&typeof (A4J.AJAX.onExpired)=="function"){var I=A4J.AJAX.onExpired(window.location,R);
if(I){window.location=I;
return 
}}if(T!="true"){LOG.warn("No ajax response header ");
var I=A.getResponseHeader("Location");
try{if(T=="redirect"&&I){window.location=I
}else{if(T=="reload"){window.location.reload(true)
}else{A4J.AJAX.replacePage(A)
}}}catch(O){LOG.error("Error redirect to new location ")
}}else{if(A.getParserStatus()==Sarissa.PARSED_OK){if(E.onbeforedomupdate||E.queueonbeforedomupdate){var M=A.domEvt;
var S=A.getJSON("_ajax:data");
LOG.debug("Call local onbeforedomupdate function before replacing elemements");
if(E.onbeforedomupdate){E.onbeforedomupdate(A,M,S)
}if(E.queueonbeforedomupdate){E.queueonbeforedomupdate(A,M,S)
}}var B=A.getResponseHeader("Ajax-Update-Ids");
var L;
var G=function(){if(A4J.AJAX.headElementsCounter!=0){LOG.debug("Script "+A4J.AJAX.headElementsCounter+" was loaded");
--A4J.AJAX.headElementsCounter
}if(A4J.AJAX.headElementsCounter==0){A4J.AJAX.processResponseAfterUpdateHeadElements(A,L)
}};
if(E.affected){L=E.affected;
A.appendNewHeadElements(G)
}else{if(B&&B!=""){LOG.debug("Update page by list of rendered areas from response "+B);
L=B.split(",");
A.appendNewHeadElements(G)
}else{LOG.warn("No information in response about elements to replace");
A.doFinish()
}}var Q=A.getElementById("ajax-view-state");
if(Q!=null){if(typeof (Q.toString)=="function"){LOG.debug("Hidden JSF state fields: "+Q.toString())
}var J=E.parameters["org.ajax4jsf.portlet.NAMESPACE"];
LOG.debug("Namespace for hidden view-state input fields is "+J);
var H=J?window.document.getElementById(J):window.document;
var C=H.getElementsByTagName("input");
try{var N=A.getElementsByTagName("input",Q);
A4J.AJAX.replaceViewState(C,N)
}catch(O){LOG.warn("No elements 'input' in response")
}try{var N=A.getElementsByTagName("INPUT",Q);
A4J.AJAX.replaceViewState(C,N)
}catch(O){LOG.warn("No elements 'INPUT' in response")
}}for(var K=0;
K<A4J.AJAX._listeners.length;
K++){var F=A4J.AJAX._listeners[K];
if(F.onafterajax){var S=A.getJSON("_ajax:data");
F.onafterajax(A,A.domEvt,S)
}}var P=A.getJSON("_A4J.AJAX.focus");
if(P){LOG.debug("focus must be set to control "+P);
var D=false;
if(A.form){D=A.form.elements[P]
}if(!D){LOG.debug("No control element "+P+" in submitted form");
D=document.getElementById(P)
}if(D){LOG.debug("Set focus to control ");
D.focus();
if(D.select){D.select()
}}else{LOG.warn("Element for set focus not found")
}}else{LOG.debug("No focus information in response")
}}else{LOG.error("Error parsing XML");
LOG.error("Parse Error: "+A.getParserStatus())
}}};
A4J.AJAX.replacePage=function(B){if(!B.getResponseText()){LOG.warn("No content in response for replace current page");
return 
}LOG.debug("replace all page content with response");
var A=Sarissa._SARISSA_IS_IE;
var C=window.document.open;
if(A){LOG.debug("setup custom document.open method");
window.document.open=function(E,G,D,F){C(E,G,D,F)
}
}window.setTimeout(function(){var E=false;
try{var K=B.getContentType();
var I=A?B.getResponseText().replace(/(<script(?!\s+src=))/igm,"$1 defer "):B.getResponseText();
window.document.open(K,"replace");
if(window.LOG){LOG.debug("window.document has opened for writing")
}E=true;
window.document.write(I);
if(window.LOG){LOG.debug("window.document has been writed")
}window.document.close();
if(window.LOG){LOG.debug("window.document has been closed for writing")
}if(A){window.location.reload(false)
}}catch(J){if(window.LOG){LOG.debug("exception during write page content "+J.Message)
}if(E){window.document.close()
}var H=(new DOMParser()).parseFromString(B.getResponseText(),"text/xml");
if(Sarissa.getParseErrorText(H)==Sarissa.PARSED_OK){if(window.LOG){LOG.debug("response has parsed as DOM documnet.")
}Sarissa.clearChildNodes(window.document.documentElement);
var D=H.documentElement.childNodes;
for(var F=0;
F<D.length;
F++){if(D[F].nodeType==1){if(window.LOG){LOG.debug("append new node in document")
}var G=window.document.importNode(D[F],true);
window.document.documentElement.appendChild(G)
}}}else{if(window.LOG){LOG.error("Error parsing response",Sarissa.getParseErrorText(H))
}}}finally{window.document.open=C
}if(window.LOG){LOG.debug("page content has been replaced")
}},0)
};
A4J.AJAX.replaceViewState=function(A,E){LOG.debug("Replace value for inputs: "+A.length+" by new values: "+E.length);
if((E.length>0)&&(A.length>0)){for(var D=0;
D<E.length;
D++){var F=E[D];
LOG.debug("Input in response: "+F.getAttribute("name"));
for(var C=0;
C<A.length;
C++){var B=A[C];
if(B.name==F.getAttribute("name")){LOG.debug("Found same input on page with type: "+B.type);
B.setAttribute("autocomplete","off");
B.value=F.getAttribute("value")
}}}}};
A4J.AJAX.finishRequest=function(C){var B=C.options;
if(!C._oncomplete_aborted){var A;
try{A=C.getElementById("org.ajax4jsf.oncomplete")
}catch(D){LOG.warn("Error reading oncomplete from request "+D.message)
}if(A){LOG.debug("Call request oncomplete function after processing updates");
window.setTimeout(function(){var G=C.domEvt;
var H;
try{H=C.getJSON("_ajax:data")
}catch(J){LOG.warn("Error reading data from request "+J.message)
}try{var I=null;
if(G){I=G.target?G.target:G.srcElement
}var F=Sarissa.getText(A,true);
var E=new Function("request","event","data",F);
E.call(I,C,G,H);
if(B.queueoncomplete){B.queueoncomplete.call(I,C,G,H)
}}catch(J){LOG.error("Error evaluate oncomplete function "+J.Message)
}A4J.AJAX.status(C.containerId,B.status,false)
},0)
}else{if(B.oncomplete||B.queueoncomplete){LOG.debug("Call local oncomplete function after processing updates");
window.setTimeout(function(){var E=C.domEvt;
var F;
try{F=C.getJSON("_ajax:data")
}catch(G){LOG.warn("Error reading data from request "+G.message)
}if(B.oncomplete){B.oncomplete(C,E,F)
}if(B.queueoncomplete){B.queueoncomplete(C,E,F)
}A4J.AJAX.status(C.containerId,B.status,false)
},0)
}else{LOG.debug("Processing updates finished, no oncomplete function to call");
setTimeout(function(){A4J.AJAX.status(C.containerId,B.status,false)
},0)
}}}else{LOG.debug("Aborted request, won't call oncomplete at all");
setTimeout(function(){A4J.AJAX.status(C.containerId,B.status,false)
},0)
}A4J.AJAX.popQueue(C)
};
A4J.AJAX.popQueue=function(A){if(A.shouldNotifyQueue&&A.queue){A.queue.pop()
}};
A4J.AJAX.getCursorPos=function(D){if(D.selectionEnd!=null){return D.selectionEnd
}var C=document.selection.createRange();
var B=C.compareEndPoints("StartToEnd",C)==0;
if(!B){C.collapse(false)
}var A=C.getBookmark();
return A.charCodeAt(2)-2
};
A4J.AJAX.locateForm=function(B){var A=B;
while(A&&A.nodeName.toLowerCase()!="form"){A=A.parentNode
}return A
};
A4J.AJAX.getElementById=function(E,B){var D=B["org.ajax4jsf.portlet.NAMESPACE"];
var A=D?window.document.getElementById(D):window.document;
var C;
if(A){C=A.getElementById(E)
}else{LOG.error("No root element for portlet namespace "+D+" on page")
}return C
};
A4J.AJAX._requestsCounts={};
A4J.AJAX.status=function(E,A,F){try{A=A||E+":status";
A4J.AJAX._requestsCounts[A]=(A4J.AJAX._requestsCounts[A]||0)+(F?1:-1);
var C=document.getElementById(A+".start");
var B=document.getElementById(A+".stop");
if(A4J.AJAX._requestsCounts[A]>0){if(B){B.style.display="none"
}if(C){C.style.display=""
}}else{if(C){C.style.display="none"
}if(B){B.style.display=""
}}if(F){if(C&&(typeof (C.onstart)=="function")){C.onstart()
}}else{if(B&&(typeof (B.onstop)=="function")){B.onstop()
}}}catch(D){LOG.error("Exception on status change: ")
}};
A4J.Query=function(A,C){var B=A||A4J.AJAX.VIEW_ROOT_ID;
this._query={AJAXREQUEST:B};
this._oldSubmit=null;
this._form=C;
this._containerId=B;
this._actionUrl=(this._form.action)?this._form.action:this._form
};
A4J.Query.prototype={_form:null,_actionUrl:null,_ext:"",_query:{},_oldSubmit:null,_pageBase:window.location.protocol+"//"+window.location.host,hidden:function(A){this._value_query(A);
if((A.name.length>4)&&(A.name.lastIndexOf("_idcl")==(A.name.length-5))){A.value=""
}else{if((A.name.length>12)&&(A.name.lastIndexOf("_link_hidden_")==(A.name.length-13))){A.value=""
}}},text:function(A){this._value_query(A)
},textarea:function(A){this._value_query(A)
},"select-one":function(A){if(A.selectedIndex!=-1){this._value_query(A)
}},password:function(A){this._value_query(A)
},file:function(A){this._value_query(A)
},radio:function(A){this._radio_query(A)
},checkbox:function(A){this._check_query(A)
},"select-multiple":function(E){var B=E.name;
var A=E.options;
for(var C=0;
C<E.length;
C++){var D=A[C];
this._addOption(B,D)
}},_addOption:function(A,B){if(B.selected){if(!this._query[A]){this._query[A]=[]
}this._query[A][this._query[A].length]=B.value
}},image:function(B,A){if(A){this._value_query(B)
}},button:function(B,A){if(A){this._value_query(B)
}},submit:function(B,A){if(A){this._value_query(B)
}},link:function(B,A){if(A){this._value_query(B);
if(B.parameters){this.appendParameters(B.parameters)
}}},input:function(B,A){if(A){this.link(B,A);
if(B.control){this.appendControl(B.control,A)
}}},appendControl:function(B,A){if(this[B.type]){this[B.type](B,A)
}else{this._appendById(B.id||B)
}},appendFormControls:function(F,D){try{var C=this._form.elements;
if(C){var B=0;
for(B=0;
B<C.length;
B++){var E=C[B];
if(E==D){continue
}try{if(!F||E.type=="hidden"){this.appendControl(E,false)
}}catch(A){LOG.error("exception in building query ( append form control ) "+A)
}}}}catch(G){LOG.warn("Error with append form controls to query "+G)
}if(D){this.appendControl(D,true)
}},appendParameters:function(A){for(k in A){if(typeof Object.prototype[k]=="undefined"){LOG.debug("parameter "+k+" with value "+A[k]);
this.appendParameter(k,A[k])
}}},setActionUrl:function(A){this._actionUrl=A
},getActionUrl:function(A){var B=this._actionUrl;
var C=B.indexOf("?");
if(B.substring(0,1)=="/"){B=this._pageBase+B
}if(!A){A=this._ext
}if(C>=0){return B.substring(0,C)+A+B.substring(C)
}else{return B+A
}},getQueryString:function(){var A="";
var D;
var F=[];
var E;
for(var C in this._query){if(typeof Object.prototype[C]=="undefined"){D=this._query[C];
E=this._encode(C);
if(D instanceof Object){for(var B=0;
B<D.length;
B++){F.push(E);
F.push("=");
F.push(this._encode(D[B]));
F.push("&")
}}else{F.push(E);
F.push("=");
F.push(this._encode(D));
F.push("&")
}}}A=F.join("");
LOG.debug("QueryString: "+A);
return A
},_appendById:function(A){this.appendParameter(this._form.id+"_link_hidden_",A)
},_value_query:function(A){if(A.name){LOG.debug("Append "+A.type+" control "+A.name+" with value ["+A.value+"] and value attribute ["+A.getAttribute("value")+"]");
if(null!=A.value){this.appendParameter(A.name,A.value)
}}else{LOG.debug("Ignored "+A.type+" no-name control with value ["+A.value+"] and value attribute ["+A.getAttribute("value")+"]")
}},_check_query:function(A){if(A.checked){this.appendParameter(A.name,A.value?A.value:"on")
}},_radio_query:function(A){if(A.checked){this.appendParameter(A.name,A.value?A.value:"")
}},appendParameter:function(A,B){if(!this._query[A]){this._query[A]=B;
return 
}else{if(!(this._query[A] instanceof Object)){this._query[A]=[this._query[A]]
}}this._query[A][this._query[A].length]=B
},_encode:function(A){try{return encodeURIComponent(A)
}catch(B){var C=escape(A);
return C.split("+").join("%2B")
}}};
A4J.AJAX.getText=function(G,C){var E="";
var B=G.childNodes;
for(var D=0;
D<B.length;
D++){var F=B[D];
var A=F.nodeType;
if(A==Node.TEXT_NODE||A==Node.CDATA_SECTION_NODE||(C&&A==Node.COMMENT_NODE)){E+=F.data
}else{if(A==Node.ELEMENT_NODE||A==Node.DOCUMENT_NODE||A==Node.DOCUMENT_FRAGMENT_NODE){E+=arguments.callee(F,C)
}}}return E
};
A4J.AJAX.isWebkitBreakingAmps=function(){if(!this._webkitBreakingAmps){var A=document.createElement("div");
A.innerHTML="<a href='#a=a&#38;b=b'>link</a>";
var B=A.firstChild;
if(B&&B.getAttribute&&/&#38;b=b$/.test(B.getAttribute("href"))){this._webkitBreakingAmps=2
}else{this._webkitBreakingAmps=1
}}return this._webkitBreakingAmps>1
};
A4J.AJAX.isXhtmlScriptMode=function(){if(!this._xhtmlScriptMode){var A=document.createElement("div");
A.innerHTML="<script type='text/javascript'><!--\r\n/**/\r\n//--><\/script>";
var C=false;
var B=A.firstChild;
while(B){if(B.nodeType==Node.ELEMENT_NODE){var D=B.firstChild;
while(D){if(D.nodeType==Node.COMMENT_NODE){C=true;
break
}D=D.nextSibling
}break
}B=B.nextSibling
}if(C){this._xhtmlScriptMode=2
}else{this._xhtmlScriptMode=1
}}return this._xhtmlScriptMode>1
};
A4J.AJAX._scriptEvaluated=false;
A4J.AJAX.TestScriptEvaluation=function(){if((!document.all||window.opera)&&!A4J.AJAX._scriptTested){try{var C=Sarissa.getDomDocument();
var A=document.createElement("span");
document.body.appendChild(A);
var F="<html xmlns='http://www.w3.org/1999/xhtml'><script>A4J.AJAX._scriptEvaluated=true;<\/script></html>";
C=(new DOMParser()).parseFromString(F,"text/xml");
var B=C.getElementsByTagName("script")[0];
if(!window.opera&&!A4J.AJAX.isWebkitBreakingAmps()&&A.outerHTML){A.outerHTML=new XMLSerializer().serializeToString(B)
}else{var E;
E=window.document.importNode(B,true);
document.body.replaceChild(E,A)
}}catch(D){}}A4J.AJAX._scriptTested=true
};
A4J.AJAX.TestReplacedGetElementByIdVisibility=function(){if(!A4J.AJAX._replacedGetElementByIdVisibilityTested){A4J.AJAX._replacedGetElementByIdVisibilityTested=true;
A4J.AJAX._testReplacedGetElementByIdVisibility=true;
A4J.AJAX.TestScriptEvaluation();
if(A4J.AJAX._scriptEvaluated){try{var B=document.createElement("span");
document.body.appendChild(B);
var E="<html xmlns='http://www.w3.org/1999/xhtml'><span id='_A4J_AJAX_TestReplacedGetElementByIdVisibility'><script>A4J.AJAX._testReplacedGetElementByIdVisibility = !!(document.getElementById('_A4J_AJAX_TestReplacedGetElementByIdVisibility'));<\/script></span></html>";
oDomDoc=(new DOMParser()).parseFromString(E,"text/xml");
var A=oDomDoc.getElementsByTagName("span")[0];
var D;
D=window.document.importNode(A,true);
document.body.replaceChild(D,B);
document.body.removeChild(D)
}catch(C){LOG.error("Error testing replaced elements getElementById() visibility: "+C.message)
}}}};
A4J.AJAX._eventQueues={};
A4J.AJAX.EventQueue=function(){var E="dropNew";
var H="dropNext";
var B="fireNew";
var F="fireNext";
var G=function(K,J){for(var I in J){K[I]=J[I]
}};
var A=function(J){var K={};
for(var I in J){K[I]=J[I]
}for(var I in this.requestOptions){if(typeof K[I]=="undefined"){K[I]=this.requestOptions[I]
}}return K
};
var C=function(){var I=function(J,M,K,L){this.queue=J;
this.query=M;
this.options=K;
this.event=L;
this.similarityGroupingId=this.options.similarityGroupingId;
this.eventsCount=1
};
G(I.prototype,{isIgnoreDupResponses:function(){return this.options.ignoreDupResponses
},getSimilarityGroupingId:function(){return this.similarityGroupingId
},setSimilarityGroupingId:function(J){this.similarityGroupingId=J
},submit:function(){this.query.appendParameter("AJAX:EVENTS_COUNT",this.eventsCount);
this.request=A4J.AJAX.SubmitQuery(this.query,this.options,this.event);
var J=this.queue;
this.request.queue=J;
return this.request
},abort:function(){if(this.request&&!this.aborted){this.aborted=true;
this.request.abort()
}},ondrop:function(){var J=this.options.onqueuerequestdrop;
if(J){J.call(this.queue,this.query,this.options,this.event)
}},onRequestDelayPassed:function(){this.readyToSubmit=true;
this.queue.submitFirst()
},startTimer:function(){var J=this.options.requestDelay;
LOG.debug("Queue will wait "+(J||0)+"ms before submit");
if(J){var K=this;
this.timer=setTimeout(function(){try{K.onRequestDelayPassed()
}finally{K.timer=undefined;
K=undefined
}},J)
}else{this.onRequestDelayPassed()
}},stopTimer:function(){if(this.timer){clearTimeout(this.timer);
this.timer=undefined
}},clearEntry:function(){this.stopTimer();
if(this.request){this.request.shouldNotifyQueue=false;
this.request=undefined
}},getEventsCount:function(){return this.eventsCount
},setEventsCount:function(J){this.eventsCount=J
},getEventArguments:function(){return[this.query,this.options,this.event]
}});
return I
}();
var D=function(J,K,I){this.items=new Array();
this.name=J;
this.queueOptions=K||{};
this.requestOptions=I||{}
};
G(D.prototype,{submitFirst:function(){var J=this.items[0];
if(J){if(!J.request){if(J.readyToSubmit){LOG.debug("Queue '"+this.name+"' will submit request NOW");
var I=J.submit();
I.shouldNotifyQueue=true;
if(this.requestOptions.queueonsubmit){this.requestOptions.queueonsubmit.call(this,I)
}}else{LOG.debug("First item is not ready to be submitted yet")
}}}else{LOG.debug("Queue is empty now")
}},getSize:function(){return this.items.length
},getMaximumSize:function(){return this.queueOptions.size
},isFull:function(){return this.getSize()==this.getMaximumSize()
},getSizeExceededBehavior:function(){var I=this.queueOptions.sizeExceededBehavior;
if(!I){I=H
}return I
},queue:function(I){this.items.push(I);
if(this.queueOptions.onrequestqueue){LOG.debug("Call onrequestqueue handler");
this.queueOptions.onrequestqueue.apply(this,I.getEventArguments())
}},dequeue:function(){var I=this.items.shift();
if(this.queueOptions.onrequestdequeue){LOG.debug("Call onrequestdequeue handler");
this.queueOptions.onrequestdequeue.apply(this,I.getEventArguments())
}},push:function(M,I,J){var T=A.call(this,I);
var R=new C(this,M,T,J);
var L=R.getSimilarityGroupingId();
var Q=this.items.length-1;
var S=this.items[Q];
var K=false;
if(S){if(S.getSimilarityGroupingId()==L){LOG.debug("Similar request currently in queue '"+this.name+"'");
if(S.request){LOG.debug("Request has already beeen sent to server");
if(R.isIgnoreDupResponses()){LOG.debug("Duplicate responses ignore requested");
if(!this.isFull()){S.abort();
LOG.debug("Response for the current request will be ignored")
}else{LOG.debug("Queue is full, cannot set to ignore response for the current request")
}}}else{LOG.debug("Combine similar requests and reset timer");
K=true;
S.stopTimer();
R.setEventsCount(S.getEventsCount()+1);
this.items[Q]=R;
R.startTimer()
}}else{LOG.debug("Last queue entry is not the last anymore. Stopping requestDelay timer and marking entry as ready for submission");
S.stopTimer();
S.setSimilarityGroupingId(undefined);
S.readyToSubmit=true
}}if(!K){if(this.isFull()){LOG.debug("Queue '"+this.name+"' is currently full");
var P=this.getSizeExceededBehavior();
var O=0;
while(this.items[O]&&this.items[O].request){O++
}if(this.queueOptions.onsizeexceeded){this.queueOptions.onsizeexceeded.apply(this,R.getEventArguments())
}if(P==E){LOG.debug("Queue '"+this.name+"' is going to drop new item");
R.ondrop();
K=true
}else{if(P==H){LOG.debug("Queue '"+this.name+"' is going to drop ["+O+"] item that is the next one");
var N=this.items.splice(O,1)[0];
if(N){LOG.debug("Item dropped from queue");
N.stopTimer();
N.ondrop()
}else{LOG.debug("There's no such item, will handle new request instead");
R.ondrop();
K=true
}}else{if(P==B){LOG.debug("Queue '"+this.name+"' will submit new request");
R.submit();
K=true
}else{if(P==F){LOG.debug("Queue '"+this.name+"' is going to drop and fire immediately ["+O+"] item that is the next one");
var N=this.items.splice(O,1)[0];
if(N){LOG.debug("Item dropped from queue");
N.stopTimer();
N.submit()
}else{LOG.debug("There's no such item, will handle new request instead");
R.submit();
K=true
}}}}}}this.submitFirst()
}if(!K){this.queue(R);
LOG.debug("New request added to queue '"+this.name+"'. Queue similarityGroupingId changed to "+L);
R.startTimer()
}},pop:function(){LOG.debug("After request: queue '"+this.name+"'");
this.dequeue();
LOG.debug("There are "+this.items.length+" requests more in this queue");
this.submitFirst()
},clear:function(){var J=this.items.length;
for(var I=0;
I<this.items.length;
I++){this.items[I].clearEntry()
}this.items.splice(0,J)
}});
return D
}();
A4J.AJAX.EventQueue.DEFAULT_QUEUE_NAME="org.richfaces.queue.global";
A4J.AJAX.EventQueue.getQueue=function(A){return A4J.AJAX._eventQueues[A]
};
A4J.AJAX.EventQueue.getQueues=function(){return A4J.AJAX._eventQueues
};
A4J.AJAX.EventQueue.addQueue=function(A){var B=A.name;
if(A4J.AJAX._eventQueues[B]){throw"Queue already registered"
}else{LOG.debug("Adding queue '"+B+"' to queues registry");
A4J.AJAX._eventQueues[B]=A
}};
A4J.AJAX.EventQueue.removeQueue=function(B){var A=A4J.AJAX._eventQueues[B];
if(A){A.clear()
}delete A4J.AJAX._eventQueues[B]
};
A4J.AJAX.EventQueue.getOrCreateQueue=function(){var A=function(C,D){if(D){return D+":"+C
}else{return C
}};
var B=function(C,D){if(D){return D+C
}else{return C
}};
return function(E,J){var H=E.eventsQueue;
var G=E.namespace;
var D;
var F;
var I;
if(H){LOG.debug("Look up queue with name '"+H+"'");
D=A(H,J);
F=B(H,G);
I=F
}else{LOG.debug("Look up queue with default name");
D=J;
F=B(A4J.AJAX.EventQueue.DEFAULT_QUEUE_NAME,G);
I=E.implicitEventsQueue
}var C=A4J.AJAX._eventQueues[D];
if(!C){C=A4J.AJAX._eventQueues[F];
if(!C){if(I){C=A4J.AJAX._eventQueues[I];
if(!C){LOG.debug("Creating new transient queue '"+I+"' with default settings");
C=new A4J.AJAX.EventQueue(I);
C._transient=true;
A4J.AJAX.EventQueue.addQueue(C)
}else{LOG.debug("Found transient queue '"+I+"'")
}}}else{LOG.debug("Found view queue '"+F+"'")
}}else{LOG.debug("Found form queue '"+D+"'")
}return C
}
}();
(function(){var A=function(){var C=A4J.AJAX.EventQueue.getQueues();
for(var D in C){var B=C[D];
B.clear()
}};
if(window.addEventListener){window.addEventListener("unload",A,false)
}else{window.attachEvent("onunload",A)
}})();
if(!window.LOG){window.LOG={}
}LOG.Level=function(B,C,A){this.name=B;
this.priority=C;
if(A){this.color=A
}};
LOG.OFF=new LOG.Level("off",1000);
LOG.FATAL=new LOG.Level("fatal",900,"red");
LOG.ERROR=new LOG.Level("error",800,"red");
LOG.WARN=new LOG.Level("warn",500,"yellow");
LOG.INFO=new LOG.Level("info",400,"blue");
LOG.DEBUG=new LOG.Level("debug",300,"darkblue");
LOG.ALL=new LOG.Level("all",100);
LOG.A4J_DEBUG=new LOG.Level("a4j_debug",0,"green");
LOG.LEVEL=LOG.OFF;
LOG._window=null;
LOG.transmitToServer=true;
LOG.consoleDivId="logConsole";
LOG.styles={a4j_debug:"green",debug:"darkblue",info:"blue",warn:"yellow",error:"red",fatal:"red"};
LOG.a4j_debug=function(B,A){LOG._log(B,LOG.A4J_DEBUG,A)
};
LOG.debug=function(B,A){LOG._log(B,LOG.DEBUG,A)
};
LOG.info=function(B,A){LOG._log(B,LOG.INFO,A)
};
LOG.warn=function(B,A){LOG._log(B,LOG.WARN,A)
};
LOG.error=function(B,A){LOG._log(B,LOG.ERROR,A)
};
LOG.fatal=function(B,A){LOG._log(B,LOG.FATAL,A)
};
LOG.registerPopup=function(B,C,E,A,F){if(!LOG._onkeydown){LOG._onkeydown=document.onkeydown
}var D=B.toUpperCase();
document.onkeydown=function(G){if(window.event){G=window.event
}if(String.fromCharCode(G.keyCode)==D&G.shiftKey&G.ctrlKey){LOG.LEVEL=F;
LOG.openWindow(C,"width="+E+",height="+A+",toolbar=no,scrollbars=yes,location=no,statusbar=no,menubar=no,resizable=yes,left = "+((screen.width-E)/2)+",top ="+((screen.height-A)/2))
}else{if(LOG._onkeydown){LOG._onkeydown(G)
}}}
};
LOG.clear=function(){if(LOG._window&&LOG._window.document){consoleDiv=LOG._window.document.body
}else{consoleDiv=window.document.getElementById(LOG.consoleDivId)
}consoleDiv.innerHTML='<button onclick="LOG.clear()">Clear</button><br />'
};
LOG.openWindow=function(B,C){if(LOG._window){LOG._window.focus()
}else{LOG._window=window.open("",B,C);
LOG._window.LOG=LOG;
LOG.clear();
var A=LOG;
LOG._window.onunload=function(){A._window.LOG=null;
A._window=null;
A.LEVEL=A.OFF;
A=undefined
}
}};
LOG._log=function(C,A,B){if(A.priority>=LOG.LEVEL.priority){LOG._logToConsole(C,A,B);
if(LOG.transmitToServer){LOG._logToServer(C,A)
}}};
LOG._time=function(){var D=new Date();
var A=D.getHours();
var C=D.getMinutes();
if(C<10){C="0"+C
}var E=D.getSeconds();
if(E<10){E="0"+E
}var B=D.getTime()%1000;
if(B<100){B="0"+B
}if(B<10){B="0"+B
}return A+":"+C+":"+E+","+B
};
LOG._logToConsole=function(C,B,E){var F;
var G;
if(LOG._window&&LOG._window.document){G=LOG._window.document;
F=LOG._window.document.body
}else{G=window.document;
F=window.document.getElementById(LOG.consoleDivId)
}if(F){var H=G.createElement("span");
H.style.color=B.color;
H.appendChild(G.createTextNode(B.name+"["+LOG._time()+"]: "));
var A=G.createElement("div");
var I=G.createTextNode(C);
A.appendChild(H);
A.appendChild(I);
if(E){var D=G.createElement("span");
I=G.createTextNode(E);
D.appendChild(I);
A.appendChild(D)
}F.appendChild(A)
}else{}};
LOG._logToServer=function(C,A){var B=A.name.substring(0,1)+C
};
LOG._requestCallBack=function(){};
if(!window.RichFaces){window.RichFaces={}
}if(!window.RichFaces.Memory){window.RichFaces.Memory={nodeCleaners:{},componentCleaners:{},addCleaner:function(A,B){this.nodeCleaners[A]=B
},addComponentCleaner:function(B,C,A){this.componentCleaners[B]={cleaner:C,checker:A}
},applyCleaners:function(B,C,D){for(var A in this.nodeCleaners){this.nodeCleaners[A](B,C)
}for(var A in this.componentCleaners){if(this.componentCleaners[A].checker(B,C)){D.push(B)
}}},_clean:function(F,E,G){if(F){this.applyCleaners(F,E,G);
var B=F.all;
if(B){var A=0;
var D=B.length;
for(var A=0;
A<D;
A++){this.applyCleaners(B[A],E,G)
}}else{var C=F.firstChild;
while(C){this._clean(C,E,G);
C=C.nextSibling
}}}},_cleanComponentNodes:function(E,D){for(var B=0;
B<E.length;
B++){var C=E[B];
for(var A in this.componentCleaners){this.componentCleaners[A].cleaner(C,D)
}}},clean:function(B,A){var C=[];
this._clean(B,A,C);
this._cleanComponentNodes(C,A);
C=null
}};
window.RichFaces.Memory.addComponentCleaner("richfaces",function(D,E){var B=D.component;
if(B){var C=B["rich:destructor"];
if(C){var A=B[C];
if(A){A.call(B,E)
}}}},function(A,B){return(A.component&&A.component["rich:destructor"])
});
if(window.attachEvent){window.attachEvent("onunload",function(){var A=window.RichFaces.Memory;
A.clean(document);
A.clean(window)
})
}}
var Builder={NODEMAP:{AREA:"map",CAPTION:"table",COL:"table",COLGROUP:"table",LEGEND:"fieldset",OPTGROUP:"select",OPTION:"select",PARAM:"object",TBODY:"table",TD:"table",TFOOT:"table",TH:"table",THEAD:"table",TR:"table"},node:function(A){A=A.toUpperCase();
var F=this.NODEMAP[A]||"div";
var B=document.createElement(F);
try{B.innerHTML="<"+A+"></"+A+">"
}catch(E){}var D=B.firstChild||null;
if(D&&(D.tagName.toUpperCase()!=A)){D=D.getElementsByTagName(A)[0]
}if(!D){D=document.createElement(A)
}if(!D){return 
}if(arguments[1]){if(this._isStringOrNumber(arguments[1])||(arguments[1] instanceof Array)||arguments[1].tagName){this._children(D,arguments[1])
}else{var C=this._attributes(arguments[1]);
if(C.length){try{B.innerHTML="<"+A+" "+C+"></"+A+">"
}catch(E){}D=B.firstChild||null;
if(!D){D=document.createElement(A);
for(attr in arguments[1]){D[attr=="class"?"className":attr]=arguments[1][attr]
}}if(D.tagName.toUpperCase()!=A){D=B.getElementsByTagName(A)[0]
}}}}if(arguments[2]){this._children(D,arguments[2])
}return $(D)
},_text:function(A){return document.createTextNode(A)
},ATTR_MAP:{"className":"class","htmlFor":"for"},_attributes:function(A){var B=[];
for(attribute in A){B.push((attribute in this.ATTR_MAP?this.ATTR_MAP[attribute]:attribute)+'="'+A[attribute].toString().escapeHTML().gsub(/"/,"&quot;")+'"')
}return B.join(" ")
},_children:function(B,A){if(A.tagName){B.appendChild(A);
return 
}if(typeof A=="object"){A.flatten().each(function(C){if(typeof C=="object"){B.appendChild(C)
}else{if(Builder._isStringOrNumber(C)){B.appendChild(Builder._text(C))
}}})
}else{if(Builder._isStringOrNumber(A)){B.appendChild(Builder._text(A))
}}},_isStringOrNumber:function(A){return(typeof A=="string"||typeof A=="number")
},build:function(B){var A=this.node("div");
$(A).update(B.strip());
return A.down()
},dump:function(B){if(typeof B!="object"&&typeof B!="function"){B=window
}var A=("A ABBR ACRONYM ADDRESS APPLET AREA B BASE BASEFONT BDO BIG BLOCKQUOTE BODY BR BUTTON CAPTION CENTER CITE CODE COL COLGROUP DD DEL DFN DIR DIV DL DT EM FIELDSET FONT FORM FRAME FRAMESET H1 H2 H3 H4 H5 H6 HEAD HR HTML I IFRAME IMG INPUT INS ISINDEX KBD LABEL LEGEND LI LINK MAP MENU META NOFRAMES NOSCRIPT OBJECT OL OPTGROUP OPTION P PARAM PRE Q S SAMP SCRIPT SELECT SMALL SPAN STRIKE STRONG STYLE SUB SUP TABLE TBODY TD TEXTAREA TFOOT TH THEAD TITLE TR TT U UL VAR").split(/\s+/);
A.each(function(C){B[C]=function(){return Builder.node.apply(Builder,[C].concat($A(arguments)))
}
})
}};
String.prototype.parseColor=function(){var A="#";
if(this.slice(0,4)=="rgb("){var C=this.slice(4,this.length-1).split(",");
var B=0;
do{A+=parseInt(C[B]).toColorPart()
}while(++B<3)
}else{if(this.slice(0,1)=="#"){if(this.length==4){for(var B=1;
B<4;
B++){A+=(this.charAt(B)+this.charAt(B)).toLowerCase()
}}if(this.length==7){A=this.toLowerCase()
}}}return(A.length==7?A:(arguments[0]||this))
};
Element.collectTextNodes=function(A){return $A($(A).childNodes).collect(function(B){return(B.nodeType==3?B.nodeValue:(B.hasChildNodes()?Element.collectTextNodes(B):""))
}).flatten().join("")
};
Element.collectTextNodesIgnoreClass=function(A,B){return $A($(A).childNodes).collect(function(C){return(C.nodeType==3?C.nodeValue:((C.hasChildNodes()&&!Element.hasClassName(C,B))?Element.collectTextNodesIgnoreClass(C,B):""))
}).flatten().join("")
};
Element.setContentZoom=function(A,B){A=$(A);
A.setStyle({fontSize:(B/100)+"em"});
if(Prototype.Browser.WebKit){window.scrollBy(0,0)
}return A
};
Element.getInlineOpacity=function(A){return $(A).style.opacity||""
};
Element.forceRerendering=function(A){try{A=$(A);
var C=document.createTextNode(" ");
A.appendChild(C);
A.removeChild(C)
}catch(B){}};
var Effect={_elementDoesNotExistError:{name:"ElementDoesNotExistError",message:"The specified DOM element does not exist, but is required for this effect to operate"},Transitions:{linear:Prototype.K,sinoidal:function(A){return(-Math.cos(A*Math.PI)/2)+0.5
},reverse:function(A){return 1-A
},flicker:function(A){var A=((-Math.cos(A*Math.PI)/4)+0.75)+Math.random()/4;
return A>1?1:A
},wobble:function(A){return(-Math.cos(A*Math.PI*(9*A))/2)+0.5
},pulse:function(B,A){return(-Math.cos((B*((A||5)-0.5)*2)*Math.PI)/2)+0.5
},spring:function(A){return 1-(Math.cos(A*4.5*Math.PI)*Math.exp(-A*6))
},none:function(A){return 0
},full:function(A){return 1
}},DefaultOptions:{duration:1,fps:100,sync:false,from:0,to:1,delay:0,queue:"parallel"},tagifyText:function(A){var B="position:relative";
if(Prototype.Browser.IE){B+=";zoom:1"
}A=$(A);
$A(A.childNodes).each(function(C){if(C.nodeType==3){C.nodeValue.toArray().each(function(D){A.insertBefore(new Element("span",{style:B}).update(D==" "?String.fromCharCode(160):D),C)
});
Element.remove(C)
}})
},multiple:function(B,C){var E;
if(((typeof B=="object")||Object.isFunction(B))&&(B.length)){E=B
}else{E=$(B).childNodes
}var A=Object.extend({speed:0.1,delay:0},arguments[2]||{});
var D=A.delay;
$A(E).each(function(G,F){new C(G,Object.extend(A,{delay:F*A.speed+D}))
})
},PAIRS:{"slide":["SlideDown","SlideUp"],"blind":["BlindDown","BlindUp"],"appear":["Appear","Fade"]},toggle:function(B,C,A){B=$(B);
C=(C||"appear").toLowerCase();
return Effect[Effect.PAIRS[C][B.visible()?1:0]](B,Object.extend({queue:{position:"end",scope:(B.id||"global"),limit:1}},A||{}))
}};
Effect.DefaultOptions.transition=Effect.Transitions.sinoidal;
Effect.ScopedQueue=Class.create(Enumerable,{initialize:function(){this.effects=[];
this.interval=null
},_each:function(A){this.effects._each(A)
},add:function(B){var C=new Date().getTime();
var A=Object.isString(B.options.queue)?B.options.queue:B.options.queue.position;
switch(A){case"front":this.effects.findAll(function(D){return D.state=="idle"
}).each(function(D){D.startOn+=B.finishOn;
D.finishOn+=B.finishOn
});
break;
case"with-last":C=this.effects.pluck("startOn").max()||C;
break;
case"end":C=this.effects.pluck("finishOn").max()||C;
break
}B.startOn+=C;
B.finishOn+=C;
if(!B.options.queue.limit||(this.effects.length<B.options.queue.limit)){this.effects.push(B)
}if(!this.interval){this.interval=setInterval(this.loop.bind(this),15)
}},remove:function(A){this.effects=this.effects.reject(function(B){return B==A
});
if(this.effects.length==0){clearInterval(this.interval);
this.interval=null
}},loop:function(){var C=new Date().getTime();
for(var B=0,A=this.effects.length;
B<A;
B++){this.effects[B]&&this.effects[B].loop(C)
}}});
Effect.Queues={instances:$H(),get:function(A){if(!Object.isString(A)){return A
}return this.instances.get(A)||this.instances.set(A,new Effect.ScopedQueue())
}};
Effect.Queue=Effect.Queues.get("global");
Effect.Base=Class.create({position:null,start:function(A){if(A&&A.transition===false){A.transition=Effect.Transitions.linear
}this.options=Object.extend(Object.extend({},Effect.DefaultOptions),A||{});
this.currentFrame=0;
this.state="idle";
this.startOn=this.options.delay*1000;
this.finishOn=this.startOn+(this.options.duration*1000);
this.fromToDelta=this.options.to-this.options.from;
this.totalTime=this.finishOn-this.startOn;
this.totalFrames=this.options.fps*this.options.duration;
this.render=(function(){function B(D,C){if(D.options[C+"Internal"]){D.options[C+"Internal"](D)
}if(D.options[C]){D.options[C](D)
}}return function(C){if(this.state==="idle"){this.state="running";
B(this,"beforeSetup");
if(this.setup){this.setup()
}B(this,"afterSetup")
}if(this.state==="running"){C=(this.options.transition(C)*this.fromToDelta)+this.options.from;
this.position=C;
B(this,"beforeUpdate");
if(this.update){this.update(C)
}B(this,"afterUpdate")
}}
})();
this.event("beforeStart");
if(!this.options.sync){Effect.Queues.get(Object.isString(this.options.queue)?"global":this.options.queue.scope).add(this)
}},loop:function(C){if(C>=this.startOn){if(C>=this.finishOn){this.render(1);
this.cancel();
this.event("beforeFinish");
if(this.finish){this.finish()
}this.event("afterFinish");
return 
}var B=(C-this.startOn)/this.totalTime,A=(B*this.totalFrames).round();
if(A>this.currentFrame){this.render(B);
this.currentFrame=A
}}},cancel:function(){if(!this.options.sync){Effect.Queues.get(Object.isString(this.options.queue)?"global":this.options.queue.scope).remove(this)
}this.state="finished"
},event:function(A){if(this.options[A+"Internal"]){this.options[A+"Internal"](this)
}if(this.options[A]){this.options[A](this)
}},inspect:function(){var A=$H();
for(property in this){if(!Object.isFunction(this[property])){A.set(property,this[property])
}}return"#<Effect:"+A.inspect()+",options:"+$H(this.options).inspect()+">"
}});
Effect.Parallel=Class.create(Effect.Base,{initialize:function(A){this.effects=A||[];
this.start(arguments[1])
},update:function(A){this.effects.invoke("render",A)
},finish:function(A){this.effects.each(function(B){B.render(1);
B.cancel();
B.event("beforeFinish");
if(B.finish){B.finish(A)
}B.event("afterFinish")
})
}});
Effect.Tween=Class.create(Effect.Base,{initialize:function(C,F,E){C=Object.isString(C)?$(C):C;
var B=$A(arguments),D=B.last(),A=B.length==5?B[3]:null;
this.method=Object.isFunction(D)?D.bind(C):Object.isFunction(C[D])?C[D].bind(C):function(G){C[D]=G
};
this.start(Object.extend({from:F,to:E},A||{}))
},update:function(A){this.method(A)
}});
Effect.Event=Class.create(Effect.Base,{initialize:function(){this.start(Object.extend({duration:0},arguments[0]||{}))
},update:Prototype.emptyFunction});
Effect.Opacity=Class.create(Effect.Base,{initialize:function(B){this.element=$(B);
if(!this.element){throw (Effect._elementDoesNotExistError)
}if(Prototype.Browser.IE&&(!this.element.currentStyle.hasLayout)){this.element.setStyle({zoom:1})
}var A=Object.extend({from:this.element.getOpacity()||0,to:1},arguments[1]||{});
this.start(A)
},update:function(A){this.element.setOpacity(A)
}});
Effect.Move=Class.create(Effect.Base,{initialize:function(B){this.element=$(B);
if(!this.element){throw (Effect._elementDoesNotExistError)
}var A=Object.extend({x:0,y:0,mode:"relative"},arguments[1]||{});
this.start(A)
},setup:function(){this.element.makePositioned();
this.originalLeft=parseFloat(this.element.getStyle("left")||"0");
this.originalTop=parseFloat(this.element.getStyle("top")||"0");
if(this.options.mode=="absolute"){this.options.x=this.options.x-this.originalLeft;
this.options.y=this.options.y-this.originalTop
}},update:function(A){this.element.setStyle({left:(this.options.x*A+this.originalLeft).round()+"px",top:(this.options.y*A+this.originalTop).round()+"px"})
}});
Effect.MoveBy=function(B,A,C){return new Effect.Move(B,Object.extend({x:C,y:A},arguments[3]||{}))
};
Effect.Scale=Class.create(Effect.Base,{initialize:function(B,C){this.element=$(B);
if(!this.element){throw (Effect._elementDoesNotExistError)
}var A=Object.extend({scaleX:true,scaleY:true,scaleContent:true,scaleFromCenter:false,scaleMode:"box",scaleFrom:100,scaleTo:C},arguments[2]||{});
this.start(A)
},setup:function(){this.restoreAfterFinish=this.options.restoreAfterFinish||false;
this.elementPositioning=this.element.getStyle("position");
this.originalStyle={};
["top","left","width","height","fontSize"].each(function(B){this.originalStyle[B]=this.element.style[B]
}.bind(this));
this.originalTop=this.element.offsetTop;
this.originalLeft=this.element.offsetLeft;
var A=this.element.getStyle("font-size")||"100%";
["em","px","%","pt"].each(function(B){if(A.indexOf(B)>0){this.fontSize=parseFloat(A);
this.fontSizeType=B
}}.bind(this));
this.factor=(this.options.scaleTo-this.options.scaleFrom)/100;
this.dims=null;
if(this.options.scaleMode=="box"){this.dims=[this.element.offsetHeight,this.element.offsetWidth]
}if(/^content/.test(this.options.scaleMode)){this.dims=[this.element.scrollHeight,this.element.scrollWidth]
}if(!this.dims){this.dims=[this.options.scaleMode.originalHeight,this.options.scaleMode.originalWidth]
}},update:function(A){var B=(this.options.scaleFrom/100)+(this.factor*A);
if(this.options.scaleContent&&this.fontSize){this.element.setStyle({fontSize:this.fontSize*B+this.fontSizeType})
}this.setDimensions(this.dims[0]*B,this.dims[1]*B)
},finish:function(A){if(this.restoreAfterFinish){this.element.setStyle(this.originalStyle)
}},setDimensions:function(A,D){var E={};
if(this.options.scaleX){E.width=D.round()+"px"
}if(this.options.scaleY){E.height=A.round()+"px"
}if(this.options.scaleFromCenter){var C=(A-this.dims[0])/2;
var B=(D-this.dims[1])/2;
if(this.elementPositioning=="absolute"){if(this.options.scaleY){E.top=this.originalTop-C+"px"
}if(this.options.scaleX){E.left=this.originalLeft-B+"px"
}}else{if(this.options.scaleY){E.top=-C+"px"
}if(this.options.scaleX){E.left=-B+"px"
}}}this.element.setStyle(E)
}});
Effect.Highlight=Class.create(Effect.Base,{initialize:function(B){this.element=$(B);
if(!this.element){throw (Effect._elementDoesNotExistError)
}var A=Object.extend({startcolor:"#ffff99"},arguments[1]||{});
this.start(A)
},setup:function(){if(this.element.getStyle("display")=="none"){this.cancel();
return 
}this.oldStyle={};
if(!this.options.keepBackgroundImage){this.oldStyle.backgroundImage=this.element.getStyle("background-image");
this.element.setStyle({backgroundImage:"none"})
}if(!this.options.endcolor){this.options.endcolor=this.element.getStyle("background-color").parseColor("#ffffff")
}if(!this.options.restorecolor){this.options.restorecolor=this.element.getStyle("background-color")
}this._base=$R(0,2).map(function(A){return parseInt(this.options.startcolor.slice(A*2+1,A*2+3),16)
}.bind(this));
this._delta=$R(0,2).map(function(A){return parseInt(this.options.endcolor.slice(A*2+1,A*2+3),16)-this._base[A]
}.bind(this))
},update:function(A){this.element.setStyle({backgroundColor:$R(0,2).inject("#",function(B,C,D){return B+((this._base[D]+(this._delta[D]*A)).round().toColorPart())
}.bind(this))})
},finish:function(){this.element.setStyle(Object.extend(this.oldStyle,{backgroundColor:this.options.restorecolor}))
}});
Effect.ScrollTo=function(C){var B=arguments[1]||{},A=document.viewport.getScrollOffsets(),D=$(C).cumulativeOffset();
if(B.offset){D[1]+=B.offset
}return new Effect.Tween(null,A.top,D[1],B,function(E){scrollTo(A.left,E.round())
})
};
Effect.Fade=function(C){C=$(C);
var A=C.getInlineOpacity();
var B=Object.extend({from:C.getOpacity()||1,to:0,afterFinishInternal:function(D){if(D.options.to!=0){return 
}D.element.hide().setStyle({opacity:A})
}},arguments[1]||{});
return new Effect.Opacity(C,B)
};
Effect.Appear=function(B){B=$(B);
var A=Object.extend({from:(B.getStyle("display")=="none"?0:B.getOpacity()||0),to:1,afterFinishInternal:function(C){C.element.forceRerendering()
},beforeSetup:function(C){C.element.setOpacity(C.options.from).show()
}},arguments[1]||{});
return new Effect.Opacity(B,A)
};
Effect.Puff=function(B){B=$(B);
var A={opacity:B.getInlineOpacity(),position:B.getStyle("position"),top:B.style.top,left:B.style.left,width:B.style.width,height:B.style.height};
return new Effect.Parallel([new Effect.Scale(B,200,{sync:true,scaleFromCenter:true,scaleContent:true,restoreAfterFinish:true}),new Effect.Opacity(B,{sync:true,to:0})],Object.extend({duration:1,beforeSetupInternal:function(C){Position.absolutize(C.effects[0].element)
},afterFinishInternal:function(C){C.effects[0].element.hide().setStyle(A)
}},arguments[1]||{}))
};
Effect.BlindUp=function(A){A=$(A);
A.makeClipping();
return new Effect.Scale(A,0,Object.extend({scaleContent:false,scaleX:false,restoreAfterFinish:true,afterFinishInternal:function(B){B.element.hide().undoClipping()
}},arguments[1]||{}))
};
Effect.BlindDown=function(B){B=$(B);
var A=B.getDimensions();
return new Effect.Scale(B,100,Object.extend({scaleContent:false,scaleX:false,scaleFrom:0,scaleMode:{originalHeight:A.height,originalWidth:A.width},restoreAfterFinish:true,afterSetup:function(C){C.element.makeClipping().setStyle({height:"0px"}).show()
},afterFinishInternal:function(C){C.element.undoClipping()
}},arguments[1]||{}))
};
Effect.SwitchOff=function(B){B=$(B);
var A=B.getInlineOpacity();
return new Effect.Appear(B,Object.extend({duration:0.4,from:0,transition:Effect.Transitions.flicker,afterFinishInternal:function(C){new Effect.Scale(C.element,1,{duration:0.3,scaleFromCenter:true,scaleX:false,scaleContent:false,restoreAfterFinish:true,beforeSetup:function(D){D.element.makePositioned().makeClipping()
},afterFinishInternal:function(D){D.element.hide().undoClipping().undoPositioned().setStyle({opacity:A})
}})
}},arguments[1]||{}))
};
Effect.DropOut=function(B){B=$(B);
var A={top:B.getStyle("top"),left:B.getStyle("left"),opacity:B.getInlineOpacity()};
return new Effect.Parallel([new Effect.Move(B,{x:0,y:100,sync:true}),new Effect.Opacity(B,{sync:true,to:0})],Object.extend({duration:0.5,beforeSetup:function(C){C.effects[0].element.makePositioned()
},afterFinishInternal:function(C){C.effects[0].element.hide().undoPositioned().setStyle(A)
}},arguments[1]||{}))
};
Effect.Shake=function(D){D=$(D);
var B=Object.extend({distance:20,duration:0.5},arguments[1]||{});
var E=parseFloat(B.distance);
var C=parseFloat(B.duration)/10;
var A={top:D.getStyle("top"),left:D.getStyle("left")};
return new Effect.Move(D,{x:E,y:0,duration:C,afterFinishInternal:function(F){new Effect.Move(F.element,{x:-E*2,y:0,duration:C*2,afterFinishInternal:function(G){new Effect.Move(G.element,{x:E*2,y:0,duration:C*2,afterFinishInternal:function(H){new Effect.Move(H.element,{x:-E*2,y:0,duration:C*2,afterFinishInternal:function(I){new Effect.Move(I.element,{x:E*2,y:0,duration:C*2,afterFinishInternal:function(J){new Effect.Move(J.element,{x:-E,y:0,duration:C,afterFinishInternal:function(K){K.element.undoPositioned().setStyle(A)
}})
}})
}})
}})
}})
}})
};
Effect.SlideDown=function(C){C=$(C).cleanWhitespace();
var A=C.down().getStyle("bottom");
var B=C.getDimensions();
return new Effect.Scale(C,100,Object.extend({scaleContent:false,scaleX:false,scaleFrom:window.opera?0:1,scaleMode:{originalHeight:B.height,originalWidth:B.width},restoreAfterFinish:true,afterSetup:function(D){D.element.makePositioned();
D.element.down().makePositioned();
if(window.opera){D.element.setStyle({top:""})
}D.element.makeClipping().setStyle({height:"0px"}).show()
},afterUpdateInternal:function(D){D.element.down().setStyle({bottom:(D.dims[0]-D.element.clientHeight)+"px"})
},afterFinishInternal:function(D){D.element.undoClipping().undoPositioned();
D.element.down().undoPositioned().setStyle({bottom:A})
}},arguments[1]||{}))
};
Effect.SlideUp=function(C){C=$(C).cleanWhitespace();
var A=C.down().getStyle("bottom");
var B=C.getDimensions();
return new Effect.Scale(C,window.opera?0:1,Object.extend({scaleContent:false,scaleX:false,scaleMode:"box",scaleFrom:100,scaleMode:{originalHeight:B.height,originalWidth:B.width},restoreAfterFinish:true,afterSetup:function(D){D.element.makePositioned();
D.element.down().makePositioned();
if(window.opera){D.element.setStyle({top:""})
}D.element.makeClipping().show()
},afterUpdateInternal:function(D){D.element.down().setStyle({bottom:(D.dims[0]-D.element.clientHeight)+"px"})
},afterFinishInternal:function(D){D.element.hide().undoClipping().undoPositioned();
D.element.down().undoPositioned().setStyle({bottom:A})
}},arguments[1]||{}))
};
Effect.Squish=function(A){return new Effect.Scale(A,window.opera?1:0,{restoreAfterFinish:true,beforeSetup:function(B){B.element.makeClipping()
},afterFinishInternal:function(B){B.element.hide().undoClipping()
}})
};
Effect.Grow=function(C){C=$(C);
var B=Object.extend({direction:"center",moveTransition:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.full},arguments[1]||{});
var A={top:C.style.top,left:C.style.left,height:C.style.height,width:C.style.width,opacity:C.getInlineOpacity()};
var G=C.getDimensions();
var H,F;
var E,D;
switch(B.direction){case"top-left":H=F=E=D=0;
break;
case"top-right":H=G.width;
F=D=0;
E=-G.width;
break;
case"bottom-left":H=E=0;
F=G.height;
D=-G.height;
break;
case"bottom-right":H=G.width;
F=G.height;
E=-G.width;
D=-G.height;
break;
case"center":H=G.width/2;
F=G.height/2;
E=-G.width/2;
D=-G.height/2;
break
}return new Effect.Move(C,{x:H,y:F,duration:0.01,beforeSetup:function(I){I.element.hide().makeClipping().makePositioned()
},afterFinishInternal:function(I){new Effect.Parallel([new Effect.Opacity(I.element,{sync:true,to:1,from:0,transition:B.opacityTransition}),new Effect.Move(I.element,{x:E,y:D,sync:true,transition:B.moveTransition}),new Effect.Scale(I.element,100,{scaleMode:{originalHeight:G.height,originalWidth:G.width},sync:true,scaleFrom:window.opera?1:0,transition:B.scaleTransition,restoreAfterFinish:true})],Object.extend({beforeSetup:function(J){J.effects[0].element.setStyle({height:"0px"}).show()
},afterFinishInternal:function(J){J.effects[0].element.undoClipping().undoPositioned().setStyle(A)
}},B))
}})
};
Effect.Shrink=function(C){C=$(C);
var B=Object.extend({direction:"center",moveTransition:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.none},arguments[1]||{});
var A={top:C.style.top,left:C.style.left,height:C.style.height,width:C.style.width,opacity:C.getInlineOpacity()};
var F=C.getDimensions();
var E,D;
switch(B.direction){case"top-left":E=D=0;
break;
case"top-right":E=F.width;
D=0;
break;
case"bottom-left":E=0;
D=F.height;
break;
case"bottom-right":E=F.width;
D=F.height;
break;
case"center":E=F.width/2;
D=F.height/2;
break
}return new Effect.Parallel([new Effect.Opacity(C,{sync:true,to:0,from:1,transition:B.opacityTransition}),new Effect.Scale(C,window.opera?1:0,{sync:true,transition:B.scaleTransition,restoreAfterFinish:true}),new Effect.Move(C,{x:E,y:D,sync:true,transition:B.moveTransition})],Object.extend({beforeStartInternal:function(G){G.effects[0].element.makePositioned().makeClipping()
},afterFinishInternal:function(G){G.effects[0].element.hide().undoClipping().undoPositioned().setStyle(A)
}},B))
};
Effect.Pulsate=function(C){C=$(C);
var B=arguments[1]||{},A=C.getInlineOpacity(),E=B.transition||Effect.Transitions.linear,D=function(F){return 1-E((-Math.cos((F*(B.pulses||5)*2)*Math.PI)/2)+0.5)
};
return new Effect.Opacity(C,Object.extend(Object.extend({duration:2,from:0,afterFinishInternal:function(F){F.element.setStyle({opacity:A})
}},B),{transition:D}))
};
Effect.Fold=function(B){B=$(B);
var A={top:B.style.top,left:B.style.left,width:B.style.width,height:B.style.height};
B.makeClipping();
return new Effect.Scale(B,5,Object.extend({scaleContent:false,scaleX:false,afterFinishInternal:function(C){new Effect.Scale(B,1,{scaleContent:false,scaleY:false,afterFinishInternal:function(D){D.element.hide().undoClipping().setStyle(A)
}})
}},arguments[1]||{}))
};
Effect.Morph=Class.create(Effect.Base,{initialize:function(C){this.element=$(C);
if(!this.element){throw (Effect._elementDoesNotExistError)
}var A=Object.extend({style:{}},arguments[1]||{});
if(!Object.isString(A.style)){this.style=$H(A.style)
}else{if(A.style.include(":")){this.style=A.style.parseStyle()
}else{this.element.addClassName(A.style);
this.style=$H(this.element.getStyles());
this.element.removeClassName(A.style);
var B=this.element.getStyles();
this.style=this.style.reject(function(D){return D.value==B[D.key]
});
A.afterFinishInternal=function(D){D.element.addClassName(D.options.style);
D.transforms.each(function(E){D.element.style[E.style]=""
})
}
}}this.start(A)
},setup:function(){function A(B){if(!B||["rgba(0, 0, 0, 0)","transparent"].include(B)){B="#ffffff"
}B=B.parseColor();
return $R(0,2).map(function(C){return parseInt(B.slice(C*2+1,C*2+3),16)
})
}this.transforms=this.style.map(function(G){var F=G[0],E=G[1],D=null;
if(E.parseColor("#zzzzzz")!="#zzzzzz"){E=E.parseColor();
D="color"
}else{if(F=="opacity"){E=parseFloat(E);
if(Prototype.Browser.IE&&(!this.element.currentStyle.hasLayout)){this.element.setStyle({zoom:1})
}}else{if(Element.CSS_LENGTH.test(E)){var C=E.match(/^([\+\-]?[0-9\.]+)(.*)$/);
E=parseFloat(C[1]);
D=(C.length==3)?C[2]:null
}}}var B=this.element.getStyle(F);
return{style:F.camelize(),originalValue:D=="color"?A(B):parseFloat(B||0),targetValue:D=="color"?A(E):E,unit:D}
}.bind(this)).reject(function(B){return((B.originalValue==B.targetValue)||(B.unit!="color"&&(isNaN(B.originalValue)||isNaN(B.targetValue))))
})
},update:function(A){var D={},B,C=this.transforms.length;
while(C--){D[(B=this.transforms[C]).style]=B.unit=="color"?"#"+(Math.round(B.originalValue[0]+(B.targetValue[0]-B.originalValue[0])*A)).toColorPart()+(Math.round(B.originalValue[1]+(B.targetValue[1]-B.originalValue[1])*A)).toColorPart()+(Math.round(B.originalValue[2]+(B.targetValue[2]-B.originalValue[2])*A)).toColorPart():(B.originalValue+(B.targetValue-B.originalValue)*A).toFixed(3)+(B.unit===null?"":B.unit)
}this.element.setStyle(D,true)
}});
Effect.Transform=Class.create({initialize:function(A){this.tracks=[];
this.options=arguments[1]||{};
this.addTracks(A)
},addTracks:function(A){A.each(function(B){B=$H(B);
var C=B.values().first();
this.tracks.push($H({ids:B.keys().first(),effect:Effect.Morph,options:{style:C}}))
}.bind(this));
return this
},play:function(){return new Effect.Parallel(this.tracks.map(function(A){var D=A.get("ids"),C=A.get("effect"),B=A.get("options");
var E=[$(D)||$$(D)].flatten();
return E.map(function(F){return new C(F,Object.extend({sync:true},B))
})
}).flatten(),this.options)
}});
Element.CSS_PROPERTIES=$w("backgroundColor backgroundPosition borderBottomColor borderBottomStyle borderBottomWidth borderLeftColor borderLeftStyle borderLeftWidth borderRightColor borderRightStyle borderRightWidth borderSpacing borderTopColor borderTopStyle borderTopWidth bottom clip color fontSize fontWeight height left letterSpacing lineHeight marginBottom marginLeft marginRight marginTop markerOffset maxHeight maxWidth minHeight minWidth opacity outlineColor outlineOffset outlineWidth paddingBottom paddingLeft paddingRight paddingTop right textIndent top width wordSpacing zIndex");
Element.CSS_LENGTH=/^(([\+\-]?[0-9\.]+)(em|ex|px|in|cm|mm|pt|pc|\%))|0$/;
String.__parseStyleElement=document.createElement("div");
String.prototype.parseStyle=function(){var B,A=$H();
if(Prototype.Browser.WebKit){B=new Element("div",{style:this}).style
}else{String.__parseStyleElement.innerHTML='<div style="'+this+'"></div>';
B=String.__parseStyleElement.childNodes[0].style
}Element.CSS_PROPERTIES.each(function(C){if(B[C]){A.set(C,B[C])
}});
if(Prototype.Browser.IE&&this.include("opacity")){A.set("opacity",this.match(/opacity:\s*((?:0|1)?(?:\.\d*)?)/)[1])
}return A
};
if(document.defaultView&&document.defaultView.getComputedStyle){Element.getStyles=function(B){var A=document.defaultView.getComputedStyle($(B),null);
return Element.CSS_PROPERTIES.inject({},function(C,D){C[D]=A[D];
return C
})
}
}else{Element.getStyles=function(B){B=$(B);
var A=B.currentStyle,C;
C=Element.CSS_PROPERTIES.inject({},function(D,E){D[E]=A[E];
return D
});
if(!C.opacity){C.opacity=B.getOpacity()
}return C
}
}Effect.Methods={morph:function(A,B){A=$(A);
new Effect.Morph(A,Object.extend({style:B},arguments[2]||{}));
return A
},visualEffect:function(C,E,B){C=$(C);
var D=E.dasherize().camelize(),A=D.charAt(0).toUpperCase()+D.substring(1);
new Effect[A](C,B);
return C
},highlight:function(B,A){B=$(B);
new Effect.Highlight(B,A);
return B
}};
$w("fade appear grow shrink fold blindUp blindDown slideUp slideDown pulsate shake puff squish switchOff dropOut").each(function(A){Effect.Methods[A]=function(C,B){C=$(C);
Effect[A.charAt(0).toUpperCase()+A.substring(1)](C,B);
return C
}
});
$w("getInlineOpacity forceRerendering setContentZoom collectTextNodes collectTextNodesIgnoreClass getStyles").each(function(A){Effect.Methods[A]=Element[A]
});
Element.addMethods(Effect.Methods);
if(Object.isUndefined(Effect)){throw ("dragdrop.js requires including script.aculo.us' effects.js library")
}var Droppables={drops:[],remove:function(A){this.drops=this.drops.reject(function(B){return B.element==$(A)
})
},add:function(B){B=$(B);
var A=Object.extend({greedy:true,hoverclass:null,tree:false},arguments[1]||{});
if(A.containment){A._containers=[];
var C=A.containment;
if(Object.isArray(C)){C.each(function(D){A._containers.push($(D))
})
}else{A._containers.push($(C))
}}if(A.accept){A.accept=[A.accept].flatten()
}Element.makePositioned(B);
A.element=B;
this.drops.push(A)
},findDeepestChild:function(A){deepest=A[0];
for(i=1;
i<A.length;
++i){if(Element.isParent(A[i].element,deepest.element)){deepest=A[i]
}}return deepest
},isContained:function(B,A){var C;
if(A.tree){C=B.treeNode
}else{C=B.parentNode
}return A._containers.detect(function(D){return C==D
})
},isAffected:function(A,C,B){return((B.element!=C)&&((!B._containers)||this.isContained(C,B))&&((!B.accept)||(Element.classNames(C).detect(function(D){return B.accept.include(D)
})))&&Position.within(B.element,A[0],A[1]))
},deactivate:function(A){if(A.hoverclass){Element.removeClassName(A.element,A.hoverclass)
}this.last_active=null
},activate:function(A){if(A.hoverclass){Element.addClassName(A.element,A.hoverclass)
}this.last_active=A
},show:function(A,C){if(!this.drops.length){return 
}var B,D=[];
this.drops.each(function(E){if(Droppables.isAffected(A,C,E)){D.push(E)
}});
if(D.length>0){B=Droppables.findDeepestChild(D)
}if(this.last_active&&this.last_active!=B){this.deactivate(this.last_active)
}if(B){Position.within(B.element,A[0],A[1]);
if(B.onHover){B.onHover(C,B.element,Position.overlap(B.overlap,B.element))
}if(B!=this.last_active){Droppables.activate(B)
}}},fire:function(B,A){if(!this.last_active){return 
}Position.prepare();
if(this.isAffected([Event.pointerX(B),Event.pointerY(B)],A,this.last_active)){if(this.last_active.onDrop){this.last_active.onDrop(A,this.last_active.element,B);
return true
}}},reset:function(){if(this.last_active){this.deactivate(this.last_active)
}}};
var Draggables={drags:[],observers:[],register:function(A){if(this.drags.length==0){this.eventMouseUp=this.endDrag.bindAsEventListener(this);
this.eventMouseMove=this.updateDrag.bindAsEventListener(this);
this.eventKeypress=this.keyPress.bindAsEventListener(this);
Event.observe(document,"mouseup",this.eventMouseUp);
Event.observe(document,"mousemove",this.eventMouseMove);
Event.observe(document,"keypress",this.eventKeypress)
}this.drags.push(A)
},unregister:function(A){this.drags=this.drags.reject(function(B){return B==A
});
if(this.drags.length==0){Event.stopObserving(document,"mouseup",this.eventMouseUp);
Event.stopObserving(document,"mousemove",this.eventMouseMove);
Event.stopObserving(document,"keypress",this.eventKeypress)
}},activate:function(A){if(A.options.delay){this._timeout=setTimeout(function(){Draggables._timeout=null;
window.focus();
Draggables.activeDraggable=A
}.bind(this),A.options.delay)
}else{window.focus();
this.activeDraggable=A
}},deactivate:function(){this.activeDraggable=null
},updateDrag:function(A){if(!this.activeDraggable){return 
}var B=[Event.pointerX(A),Event.pointerY(A)];
if(this._lastPointer&&(this._lastPointer.inspect()==B.inspect())){return 
}this._lastPointer=B;
this.activeDraggable.updateDrag(A,B)
},endDrag:function(A){if(this._timeout){clearTimeout(this._timeout);
this._timeout=null
}if(!this.activeDraggable){return 
}this._lastPointer=null;
this.activeDraggable.endDrag(A);
this.activeDraggable=null
},keyPress:function(A){if(this.activeDraggable){this.activeDraggable.keyPress(A)
}},addObserver:function(A){this.observers.push(A);
this._cacheObserverCallbacks()
},removeObserver:function(A){this.observers=this.observers.reject(function(B){return B.element==A
});
this._cacheObserverCallbacks()
},notify:function(B,A,C){if(this[B+"Count"]>0){this.observers.each(function(D){if(D[B]){D[B](B,A,C)
}})
}if(A.options[B]){A.options[B](A,C)
}},_cacheObserverCallbacks:function(){["onStart","onEnd","onDrag"].each(function(A){Draggables[A+"Count"]=Draggables.observers.select(function(B){return B[A]
}).length
})
}};
var Draggable=Class.create({initialize:function(B){var C={handle:false,reverteffect:function(F,E,D){var G=Math.sqrt(Math.abs(E^2)+Math.abs(D^2))*0.02;
new Effect.Move(F,{x:-D,y:-E,duration:G,queue:{scope:"_draggable",position:"end"}})
},endeffect:function(E){var D=Object.isNumber(E._opacity)?E._opacity:1;
new Effect.Opacity(E,{duration:0.2,from:0.7,to:D,queue:{scope:"_draggable",position:"end"},afterFinish:function(){Draggable._dragging[E]=false
}})
},zindex:1000,revert:false,quiet:false,scroll:false,scrollSensitivity:20,scrollSpeed:15,snap:false,delay:0};
if(!arguments[1]||Object.isUndefined(arguments[1].endeffect)){Object.extend(C,{starteffect:function(D){D._opacity=Element.getOpacity(D);
Draggable._dragging[D]=true;
new Effect.Opacity(D,{duration:0.2,from:D._opacity,to:0.7})
}})
}var A=Object.extend(C,arguments[1]||{});
this.element=$(B);
if(A.handle&&Object.isString(A.handle)){this.handle=this.element.down("."+A.handle,0)
}if(!this.handle){this.handle=$(A.handle)
}if(!this.handle){this.handle=this.element
}if(A.scroll&&!A.scroll.scrollTo&&!A.scroll.outerHTML){A.scroll=$(A.scroll);
this._isScrollChild=Element.childOf(this.element,A.scroll)
}Element.makePositioned(this.element);
this.options=A;
this.dragging=false;
this.eventMouseDown=this.initDrag.bindAsEventListener(this);
Event.observe(this.handle,"mousedown",this.eventMouseDown);
Draggables.register(this)
},destroy:function(){Event.stopObserving(this.handle,"mousedown",this.eventMouseDown);
Draggables.unregister(this)
},currentDelta:function(){return([parseInt(Element.getStyle(this.element,"left")||"0"),parseInt(Element.getStyle(this.element,"top")||"0")])
},initDrag:function(A){if(!Object.isUndefined(Draggable._dragging[this.element])&&Draggable._dragging[this.element]){return 
}if(Event.isLeftClick(A)){var C=Event.element(A);
if((tag_name=C.tagName.toUpperCase())&&(tag_name=="INPUT"||tag_name=="SELECT"||tag_name=="OPTION"||tag_name=="BUTTON"||tag_name=="TEXTAREA")){return 
}var B=[Event.pointerX(A),Event.pointerY(A)];
var D=this.element.cumulativeOffset();
this.offset=[0,1].map(function(E){return(B[E]-D[E])
});
Draggables.activate(this);
Event.stop(A)
}},startDrag:function(B){this.dragging=true;
if(!this.delta){this.delta=this.currentDelta()
}if(this.options.zindex){this.originalZ=parseInt(Element.getStyle(this.element,"z-index")||0);
this.element.style.zIndex=this.options.zindex
}if(this.options.ghosting){this._clone=this.element.cloneNode(true);
this._originallyAbsolute=(this.element.getStyle("position")=="absolute");
if(!this._originallyAbsolute){Position.absolutize(this.element)
}this.element.parentNode.insertBefore(this._clone,this.element)
}if(this.options.scroll){if(this.options.scroll==window){var A=this._getWindowScroll(this.options.scroll);
this.originalScrollLeft=A.left;
this.originalScrollTop=A.top
}else{this.originalScrollLeft=this.options.scroll.scrollLeft;
this.originalScrollTop=this.options.scroll.scrollTop
}}Draggables.notify("onStart",this,B);
if(this.options.starteffect){this.options.starteffect(this.element)
}},updateDrag:function(event,pointer){if(!this.dragging){this.startDrag(event)
}if(!this.options.quiet){Position.prepare();
Droppables.show(pointer,this.element)
}Draggables.notify("onDrag",this,event);
this.draw(pointer);
if(this.options.change){this.options.change(this)
}if(this.options.scroll){this.stopScrolling();
var p;
if(this.options.scroll==window){with(this._getWindowScroll(this.options.scroll)){p=[left,top,left+width,top+height]
}}else{p=Position.page(this.options.scroll).toArray();
p[0]+=this.options.scroll.scrollLeft+Position.deltaX;
p[1]+=this.options.scroll.scrollTop+Position.deltaY;
p.push(p[0]+this.options.scroll.offsetWidth);
p.push(p[1]+this.options.scroll.offsetHeight)
}var speed=[0,0];
if(pointer[0]<(p[0]+this.options.scrollSensitivity)){speed[0]=pointer[0]-(p[0]+this.options.scrollSensitivity)
}if(pointer[1]<(p[1]+this.options.scrollSensitivity)){speed[1]=pointer[1]-(p[1]+this.options.scrollSensitivity)
}if(pointer[0]>(p[2]-this.options.scrollSensitivity)){speed[0]=pointer[0]-(p[2]-this.options.scrollSensitivity)
}if(pointer[1]>(p[3]-this.options.scrollSensitivity)){speed[1]=pointer[1]-(p[3]-this.options.scrollSensitivity)
}this.startScrolling(speed)
}if(Prototype.Browser.WebKit){window.scrollBy(0,0)
}Event.stop(event)
},finishDrag:function(B,E){this.dragging=false;
if(this.options.quiet){Position.prepare();
var D=[Event.pointerX(B),Event.pointerY(B)];
Droppables.show(D,this.element)
}if(this.options.ghosting){if(!this._originallyAbsolute){Position.relativize(this.element)
}delete this._originallyAbsolute;
Element.remove(this._clone);
this._clone=null
}var F=false;
if(E){F=Droppables.fire(B,this.element);
if(!F){F=false
}}if(F&&this.options.onDropped){this.options.onDropped(this.element)
}Draggables.notify("onEnd",this,B);
var A=this.options.revert;
if(A&&Object.isFunction(A)){A=A(this.element)
}var C=this.currentDelta();
if(A&&this.options.reverteffect){if(F==0||A!="failure"){this.options.reverteffect(this.element,C[1]-this.delta[1],C[0]-this.delta[0])
}}else{this.delta=C
}if(this.options.zindex){this.element.style.zIndex=this.originalZ
}if(this.options.endeffect){this.options.endeffect(this.element)
}Draggables.deactivate(this);
Droppables.reset()
},keyPress:function(A){if(A.keyCode!=Event.KEY_ESC){return 
}this.finishDrag(A,false);
Event.stop(A)
},endDrag:function(A){if(!this.dragging){return 
}this.stopScrolling();
this.finishDrag(A,true);
Event.stop(A)
},draw:function(A){var F=this.element.cumulativeOffset();
if(this.options.ghosting){var C=Position.realOffset(this.element);
F[0]+=C[0]-Position.deltaX;
F[1]+=C[1]-Position.deltaY
}var E=this.currentDelta();
F[0]-=E[0];
F[1]-=E[1];
if(this.options.scroll&&(this.options.scroll!=window&&this._isScrollChild)){F[0]-=this.options.scroll.scrollLeft-this.originalScrollLeft;
F[1]-=this.options.scroll.scrollTop-this.originalScrollTop
}var D=[0,1].map(function(G){return(A[G]-F[G]-this.offset[G])
}.bind(this));
if(this.options.snap){if(Object.isFunction(this.options.snap)){D=this.options.snap(D[0],D[1],this)
}else{if(Object.isArray(this.options.snap)){D=D.map(function(G,H){return(G/this.options.snap[H]).round()*this.options.snap[H]
}.bind(this))
}else{D=D.map(function(G){return(G/this.options.snap).round()*this.options.snap
}.bind(this))
}}}var B=this.element.style;
if((!this.options.constraint)||(this.options.constraint=="horizontal")){B.left=D[0]+"px"
}if((!this.options.constraint)||(this.options.constraint=="vertical")){B.top=D[1]+"px"
}if(B.visibility=="hidden"){B.visibility=""
}},stopScrolling:function(){if(this.scrollInterval){clearInterval(this.scrollInterval);
this.scrollInterval=null;
Draggables._lastScrollPointer=null
}},startScrolling:function(A){if(!(A[0]||A[1])){return 
}this.scrollSpeed=[A[0]*this.options.scrollSpeed,A[1]*this.options.scrollSpeed];
this.lastScrolled=new Date();
this.scrollInterval=setInterval(this.scroll.bind(this),10)
},scroll:function(){var current=new Date();
var delta=current-this.lastScrolled;
this.lastScrolled=current;
if(this.options.scroll==window){with(this._getWindowScroll(this.options.scroll)){if(this.scrollSpeed[0]||this.scrollSpeed[1]){var d=delta/1000;
this.options.scroll.scrollTo(left+d*this.scrollSpeed[0],top+d*this.scrollSpeed[1])
}}}else{this.options.scroll.scrollLeft+=this.scrollSpeed[0]*delta/1000;
this.options.scroll.scrollTop+=this.scrollSpeed[1]*delta/1000
}Position.prepare();
Droppables.show(Draggables._lastPointer,this.element);
Draggables.notify("onDrag",this);
if(this._isScrollChild){Draggables._lastScrollPointer=Draggables._lastScrollPointer||$A(Draggables._lastPointer);
Draggables._lastScrollPointer[0]+=this.scrollSpeed[0]*delta/1000;
Draggables._lastScrollPointer[1]+=this.scrollSpeed[1]*delta/1000;
if(Draggables._lastScrollPointer[0]<0){Draggables._lastScrollPointer[0]=0
}if(Draggables._lastScrollPointer[1]<0){Draggables._lastScrollPointer[1]=0
}this.draw(Draggables._lastScrollPointer)
}if(this.options.change){this.options.change(this)
}},_getWindowScroll:function(w){var T,L,W,H;
with(w.document){if(w.document.documentElement&&documentElement.scrollTop){T=documentElement.scrollTop;
L=documentElement.scrollLeft
}else{if(w.document.body){T=body.scrollTop;
L=body.scrollLeft
}}if(w.innerWidth){W=w.innerWidth;
H=w.innerHeight
}else{if(w.document.documentElement&&documentElement.clientWidth){W=documentElement.clientWidth;
H=documentElement.clientHeight
}else{W=body.offsetWidth;
H=body.offsetHeight
}}}return{top:T,left:L,width:W,height:H}
}});
Draggable._dragging={};
var SortableObserver=Class.create({initialize:function(B,A){this.element=$(B);
this.observer=A;
this.lastValue=Sortable.serialize(this.element)
},onStart:function(){this.lastValue=Sortable.serialize(this.element)
},onEnd:function(){Sortable.unmark();
if(this.lastValue!=Sortable.serialize(this.element)){this.observer(this.element)
}}});
var Sortable={SERIALIZE_RULE:/^[^_\-](?:[A-Za-z0-9\-\_]*)[_](.*)$/,sortables:{},_findRootElement:function(A){while(A.tagName.toUpperCase()!="BODY"){if(A.id&&Sortable.sortables[A.id]){return A
}A=A.parentNode
}},options:function(A){A=Sortable._findRootElement($(A));
if(!A){return 
}return Sortable.sortables[A.id]
},destroy:function(A){A=$(A);
var B=Sortable.sortables[A.id];
if(B){Draggables.removeObserver(B.element);
B.droppables.each(function(C){Droppables.remove(C)
});
B.draggables.invoke("destroy");
delete Sortable.sortables[B.element.id]
}},create:function(C){C=$(C);
var B=Object.extend({element:C,tag:"li",dropOnEmpty:false,tree:false,treeTag:"ul",overlap:"vertical",constraint:"vertical",containment:C,handle:false,only:false,delay:0,hoverclass:null,ghosting:false,quiet:false,scroll:false,scrollSensitivity:20,scrollSpeed:15,format:this.SERIALIZE_RULE,elements:false,handles:false,onChange:Prototype.emptyFunction,onUpdate:Prototype.emptyFunction},arguments[1]||{});
this.destroy(C);
var A={revert:true,quiet:B.quiet,scroll:B.scroll,scrollSpeed:B.scrollSpeed,scrollSensitivity:B.scrollSensitivity,delay:B.delay,ghosting:B.ghosting,constraint:B.constraint,handle:B.handle};
if(B.starteffect){A.starteffect=B.starteffect
}if(B.reverteffect){A.reverteffect=B.reverteffect
}else{if(B.ghosting){A.reverteffect=function(F){F.style.top=0;
F.style.left=0
}
}}if(B.endeffect){A.endeffect=B.endeffect
}if(B.zindex){A.zindex=B.zindex
}var D={overlap:B.overlap,containment:B.containment,tree:B.tree,hoverclass:B.hoverclass,onHover:Sortable.onHover};
var E={onHover:Sortable.onEmptyHover,overlap:B.overlap,containment:B.containment,hoverclass:B.hoverclass};
Element.cleanWhitespace(C);
B.draggables=[];
B.droppables=[];
if(B.dropOnEmpty||B.tree){Droppables.add(C,E);
B.droppables.push(C)
}(B.elements||this.findElements(C,B)||[]).each(function(H,F){var G=B.handles?$(B.handles[F]):(B.handle?$(H).select("."+B.handle)[0]:H);
B.draggables.push(new Draggable(H,Object.extend(A,{handle:G})));
Droppables.add(H,D);
if(B.tree){H.treeNode=C
}B.droppables.push(H)
});
if(B.tree){(Sortable.findTreeElements(C,B)||[]).each(function(F){Droppables.add(F,E);
F.treeNode=C;
B.droppables.push(F)
})
}this.sortables[C.identify()]=B;
Draggables.addObserver(new SortableObserver(C,B.onUpdate))
},findElements:function(B,A){return Element.findChildren(B,A.only,A.tree?true:false,A.tag)
},findTreeElements:function(B,A){return Element.findChildren(B,A.only,A.tree?true:false,A.treeTag)
},onHover:function(E,D,A){if(Element.isParent(D,E)){return 
}if(A>0.33&&A<0.66&&Sortable.options(D).tree){return 
}else{if(A>0.5){Sortable.mark(D,"before");
if(D.previousSibling!=E){var B=E.parentNode;
E.style.visibility="hidden";
D.parentNode.insertBefore(E,D);
if(D.parentNode!=B){Sortable.options(B).onChange(E)
}Sortable.options(D.parentNode).onChange(E)
}}else{Sortable.mark(D,"after");
var C=D.nextSibling||null;
if(C!=E){var B=E.parentNode;
E.style.visibility="hidden";
D.parentNode.insertBefore(E,C);
if(D.parentNode!=B){Sortable.options(B).onChange(E)
}Sortable.options(D.parentNode).onChange(E)
}}}},onEmptyHover:function(E,G,H){var I=E.parentNode;
var A=Sortable.options(G);
if(!Element.isParent(G,E)){var F;
var C=Sortable.findElements(G,{tag:A.tag,only:A.only});
var B=null;
if(C){var D=Element.offsetSize(G,A.overlap)*(1-H);
for(F=0;
F<C.length;
F+=1){if(D-Element.offsetSize(C[F],A.overlap)>=0){D-=Element.offsetSize(C[F],A.overlap)
}else{if(D-(Element.offsetSize(C[F],A.overlap)/2)>=0){B=F+1<C.length?C[F+1]:null;
break
}else{B=C[F];
break
}}}}G.insertBefore(E,B);
Sortable.options(I).onChange(E);
A.onChange(E)
}},unmark:function(){if(Sortable._marker){Sortable._marker.hide()
}},mark:function(B,A){var D=Sortable.options(B.parentNode);
if(D&&!D.ghosting){return 
}if(!Sortable._marker){Sortable._marker=($("dropmarker")||Element.extend(document.createElement("DIV"))).hide().addClassName("dropmarker").setStyle({position:"absolute"});
document.getElementsByTagName("body").item(0).appendChild(Sortable._marker)
}var C=B.cumulativeOffset();
Sortable._marker.setStyle({left:C[0]+"px",top:C[1]+"px"});
if(A=="after"){if(D.overlap=="horizontal"){Sortable._marker.setStyle({left:(C[0]+B.clientWidth)+"px"})
}else{Sortable._marker.setStyle({top:(C[1]+B.clientHeight)+"px"})
}}Sortable._marker.show()
},_tree:function(E,B,F){var D=Sortable.findElements(E,B)||[];
for(var C=0;
C<D.length;
++C){var A=D[C].id.match(B.format);
if(!A){continue
}var G={id:encodeURIComponent(A?A[1]:null),element:E,parent:F,children:[],position:F.children.length,container:$(D[C]).down(B.treeTag)};
if(G.container){this._tree(G.container,B,G)
}F.children.push(G)
}return F
},tree:function(D){D=$(D);
var C=this.options(D);
var B=Object.extend({tag:C.tag,treeTag:C.treeTag,only:C.only,name:D.id,format:C.format},arguments[1]||{});
var A={id:null,parent:null,children:[],container:D,position:0};
return Sortable._tree(D,B,A)
},_constructIndex:function(B){var A="";
do{if(B.id){A="["+B.position+"]"+A
}}while((B=B.parent)!=null);
return A
},sequence:function(B){B=$(B);
var A=Object.extend(this.options(B),arguments[1]||{});
return $(this.findElements(B,A)||[]).map(function(C){return C.id.match(A.format)?C.id.match(A.format)[1]:""
})
},setSequence:function(B,C){B=$(B);
var A=Object.extend(this.options(B),arguments[2]||{});
var D={};
this.findElements(B,A).each(function(E){if(E.id.match(A.format)){D[E.id.match(A.format)[1]]=[E,E.parentNode]
}E.parentNode.removeChild(E)
});
C.each(function(E){var F=D[E];
if(F){F[1].appendChild(F[0]);
delete D[E]
}})
},serialize:function(C){C=$(C);
var B=Object.extend(Sortable.options(C),arguments[1]||{});
var A=encodeURIComponent((arguments[1]&&arguments[1].name)?arguments[1].name:C.id);
if(B.tree){return Sortable.tree(C,arguments[1]).children.map(function(D){return[A+Sortable._constructIndex(D)+"[id]="+encodeURIComponent(D.id)].concat(D.children.map(arguments.callee))
}).flatten().join("&")
}else{return Sortable.sequence(C,arguments[1]).map(function(D){return A+"[]="+encodeURIComponent(D)
}).join("&")
}}};
Element.isParent=function(B,A){if(!B.parentNode||B==A){return false
}if(B.parentNode==A){return true
}return Element.isParent(B.parentNode,A)
};
Element.findChildren=function(D,B,A,C){if(!D.hasChildNodes()){return null
}C=C.toUpperCase();
if(B){B=[B].flatten()
}var E=[];
$A(D.childNodes).each(function(G){if(G.tagName&&G.tagName.toUpperCase()==C&&(!B||(Element.classNames(G).detect(function(H){return B.include(H)
})))){E.push(G)
}if(A){var F=Element.findChildren(G,B,A,C);
if(F){E.push(F)
}}});
return(E.length>0?E.flatten():[])
};
Element.offsetSize=function(A,B){return A["offset"+((B=="vertical"||B=="height")?"Height":"Width")]
};
if(typeof Effect=="undefined"){throw ("controls.js requires including script.aculo.us' effects.js library")
}var Autocompleter={};
Autocompleter.Base=Class.create({baseInitialize:function(B,C,A){B=$(B);
this.element=B;
this.update=$(C);
this.hasFocus=false;
this.changed=false;
this.active=false;
this.index=0;
this.entryCount=0;
this.oldElementValue=this.element.value;
if(this.setOptions){this.setOptions(A)
}else{this.options=A||{}
}this.options.paramName=this.options.paramName||this.element.name;
this.options.tokens=this.options.tokens||[];
this.options.frequency=this.options.frequency||0.4;
this.options.minChars=this.options.minChars||1;
this.options.onShow=this.options.onShow||function(D,E){if(!E.style.position||E.style.position=="absolute"){E.style.position="absolute";
Position.clone(D,E,{setHeight:false,offsetTop:D.offsetHeight})
}Effect.Appear(E,{duration:0.15})
};
this.options.onHide=this.options.onHide||function(D,E){new Effect.Fade(E,{duration:0.15})
};
if(typeof (this.options.tokens)=="string"){this.options.tokens=new Array(this.options.tokens)
}if(!this.options.tokens.include("\n")){this.options.tokens.push("\n")
}this.observer=null;
this.element.setAttribute("autocomplete","off");
Element.hide(this.update);
Event.observe(this.element,"blur",this.onBlur.bindAsEventListener(this));
Event.observe(this.element,"keydown",this.onKeyPress.bindAsEventListener(this))
},show:function(){if(Element.getStyle(this.update,"display")=="none"){this.options.onShow(this.element,this.update)
}if(!this.iefix&&(Prototype.Browser.IE)&&(Element.getStyle(this.update,"position")=="absolute")){new Insertion.After(this.update,'<iframe id="'+this.update.id+'_iefix" style="display:none;position:absolute;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);" src="javascript:false;" frameborder="0" scrolling="no"></iframe>');
this.iefix=$(this.update.id+"_iefix")
}if(this.iefix){setTimeout(this.fixIEOverlapping.bind(this),50)
}},fixIEOverlapping:function(){Position.clone(this.update,this.iefix,{setTop:(!this.update.style.height)});
this.iefix.style.zIndex=1;
this.update.style.zIndex=2;
Element.show(this.iefix)
},hide:function(){this.stopIndicator();
if(Element.getStyle(this.update,"display")!="none"){this.options.onHide(this.element,this.update)
}if(this.iefix){Element.hide(this.iefix)
}},startIndicator:function(){if(this.options.indicator){Element.show(this.options.indicator)
}},stopIndicator:function(){if(this.options.indicator){Element.hide(this.options.indicator)
}},onKeyPress:function(A){if(this.active){switch(A.keyCode){case Event.KEY_TAB:case Event.KEY_RETURN:this.selectEntry();
Event.stop(A);
case Event.KEY_ESC:this.hide();
this.active=false;
Event.stop(A);
return ;
case Event.KEY_LEFT:case Event.KEY_RIGHT:return ;
case Event.KEY_UP:this.markPrevious();
this.render();
Event.stop(A);
return ;
case Event.KEY_DOWN:this.markNext();
this.render();
Event.stop(A);
return 
}}else{if(A.keyCode==Event.KEY_TAB||A.keyCode==Event.KEY_RETURN||(Prototype.Browser.WebKit>0&&A.keyCode==0)){return 
}}this.changed=true;
this.hasFocus=true;
if(this.observer){clearTimeout(this.observer)
}this.observer=setTimeout(this.onObserverEvent.bind(this),this.options.frequency*1000)
},activate:function(){this.changed=false;
this.hasFocus=true;
this.getUpdatedChoices()
},onHover:function(B){var A=Event.findElement(B,"LI");
if(this.index!=A.autocompleteIndex){this.index=A.autocompleteIndex;
this.render()
}Event.stop(B)
},onClick:function(B){var A=Event.findElement(B,"LI");
this.index=A.autocompleteIndex;
this.selectEntry();
this.hide()
},onBlur:function(A){setTimeout(this.hide.bind(this),250);
this.hasFocus=false;
this.active=false
},render:function(){if(this.entryCount>0){for(var A=0;
A<this.entryCount;
A++){this.index==A?Element.addClassName(this.getEntry(A),"selected"):Element.removeClassName(this.getEntry(A),"selected")
}if(this.hasFocus){this.show();
this.active=true
}}else{this.active=false;
this.hide()
}},markPrevious:function(){if(this.index>0){this.index--
}else{this.index=this.entryCount-1
}this.getEntry(this.index).scrollIntoView(true)
},markNext:function(){if(this.index<this.entryCount-1){this.index++
}else{this.index=0
}this.getEntry(this.index).scrollIntoView(false)
},getEntry:function(A){return this.update.firstChild.childNodes[A]
},getCurrentEntry:function(){return this.getEntry(this.index)
},selectEntry:function(){this.active=false;
this.updateElement(this.getCurrentEntry())
},updateElement:function(F){if(this.options.updateElement){this.options.updateElement(F);
return 
}var D="";
if(this.options.select){var A=$(F).select("."+this.options.select)||[];
if(A.length>0){D=Element.collectTextNodes(A[0],this.options.select)
}}else{D=Element.collectTextNodesIgnoreClass(F,"informal")
}var C=this.getTokenBounds();
if(C[0]!=-1){var E=this.element.value.substr(0,C[0]);
var B=this.element.value.substr(C[0]).match(/^\s+/);
if(B){E+=B[0]
}this.element.value=E+D+this.element.value.substr(C[1])
}else{this.element.value=D
}this.oldElementValue=this.element.value;
this.element.focus();
if(this.options.afterUpdateElement){this.options.afterUpdateElement(this.element,F)
}},updateChoices:function(C){if(!this.changed&&this.hasFocus){this.update.innerHTML=C;
Element.cleanWhitespace(this.update);
Element.cleanWhitespace(this.update.down());
if(this.update.firstChild&&this.update.down().childNodes){this.entryCount=this.update.down().childNodes.length;
for(var A=0;
A<this.entryCount;
A++){var B=this.getEntry(A);
B.autocompleteIndex=A;
this.addObservers(B)
}}else{this.entryCount=0
}this.stopIndicator();
this.index=0;
if(this.entryCount==1&&this.options.autoSelect){this.selectEntry();
this.hide()
}else{this.render()
}}},addObservers:function(A){Event.observe(A,"mouseover",this.onHover.bindAsEventListener(this));
Event.observe(A,"click",this.onClick.bindAsEventListener(this))
},onObserverEvent:function(){this.changed=false;
this.tokenBounds=null;
if(this.getToken().length>=this.options.minChars){this.getUpdatedChoices()
}else{this.active=false;
this.hide()
}this.oldElementValue=this.element.value
},getToken:function(){var A=this.getTokenBounds();
return this.element.value.substring(A[0],A[1]).strip()
},getTokenBounds:function(){if(null!=this.tokenBounds){return this.tokenBounds
}var E=this.element.value;
if(E.strip().empty()){return[-1,0]
}var F=arguments.callee.getFirstDifferencePos(E,this.oldElementValue);
var H=(F==this.oldElementValue.length?1:0);
var D=-1,C=E.length;
var G;
for(var B=0,A=this.options.tokens.length;
B<A;
++B){G=E.lastIndexOf(this.options.tokens[B],F+H-1);
if(G>D){D=G
}G=E.indexOf(this.options.tokens[B],F+H);
if(-1!=G&&G<C){C=G
}}return(this.tokenBounds=[D+1,C])
}});
Autocompleter.Base.prototype.getTokenBounds.getFirstDifferencePos=function(C,A){var D=Math.min(C.length,A.length);
for(var B=0;
B<D;
++B){if(C[B]!=A[B]){return B
}}return D
};
Ajax.Autocompleter=Class.create(Autocompleter.Base,{initialize:function(C,D,B,A){this.baseInitialize(C,D,A);
this.options.asynchronous=true;
this.options.onComplete=this.onComplete.bind(this);
this.options.defaultParams=this.options.parameters||null;
this.url=B
},getUpdatedChoices:function(){this.startIndicator();
var A=encodeURIComponent(this.options.paramName)+"="+encodeURIComponent(this.getToken());
this.options.parameters=this.options.callback?this.options.callback(this.element,A):A;
if(this.options.defaultParams){this.options.parameters+="&"+this.options.defaultParams
}new Ajax.Request(this.url,this.options)
},onComplete:function(A){this.updateChoices(A.responseText)
}});
Autocompleter.Local=Class.create(Autocompleter.Base,{initialize:function(B,D,C,A){this.baseInitialize(B,D,A);
this.options.array=C
},getUpdatedChoices:function(){this.updateChoices(this.options.selector(this))
},setOptions:function(A){this.options=Object.extend({choices:10,partialSearch:true,partialChars:2,ignoreCase:true,fullSearch:false,selector:function(B){var D=[];
var C=[];
var H=B.getToken();
var G=0;
for(var E=0;
E<B.options.array.length&&D.length<B.options.choices;
E++){var F=B.options.array[E];
var I=B.options.ignoreCase?F.toLowerCase().indexOf(H.toLowerCase()):F.indexOf(H);
while(I!=-1){if(I==0&&F.length!=H.length){D.push("<li><strong>"+F.substr(0,H.length)+"</strong>"+F.substr(H.length)+"</li>");
break
}else{if(H.length>=B.options.partialChars&&B.options.partialSearch&&I!=-1){if(B.options.fullSearch||/\s/.test(F.substr(I-1,1))){C.push("<li>"+F.substr(0,I)+"<strong>"+F.substr(I,H.length)+"</strong>"+F.substr(I+H.length)+"</li>");
break
}}}I=B.options.ignoreCase?F.toLowerCase().indexOf(H.toLowerCase(),I+1):F.indexOf(H,I+1)
}}if(C.length){D=D.concat(C.slice(0,B.options.choices-D.length))
}return"<ul>"+D.join("")+"</ul>"
}},A||{})
}});
Field.scrollFreeActivate=function(A){setTimeout(function(){Field.activate(A)
},1)
};
Ajax.InPlaceEditor=Class.create({initialize:function(C,B,A){this.url=B;
this.element=C=$(C);
this.prepareOptions();
this._controls={};
arguments.callee.dealWithDeprecatedOptions(A);
Object.extend(this.options,A||{});
if(!this.options.formId&&this.element.id){this.options.formId=this.element.id+"-inplaceeditor";
if($(this.options.formId)){this.options.formId=""
}}if(this.options.externalControl){this.options.externalControl=$(this.options.externalControl)
}if(!this.options.externalControl){this.options.externalControlOnly=false
}this._originalBackground=this.element.getStyle("background-color")||"transparent";
this.element.title=this.options.clickToEditText;
this._boundCancelHandler=this.handleFormCancellation.bind(this);
this._boundComplete=(this.options.onComplete||Prototype.emptyFunction).bind(this);
this._boundFailureHandler=this.handleAJAXFailure.bind(this);
this._boundSubmitHandler=this.handleFormSubmission.bind(this);
this._boundWrapperHandler=this.wrapUp.bind(this);
this.registerListeners()
},checkForEscapeOrReturn:function(A){if(!this._editing||A.ctrlKey||A.altKey||A.shiftKey){return 
}if(Event.KEY_ESC==A.keyCode){this.handleFormCancellation(A)
}else{if(Event.KEY_RETURN==A.keyCode){this.handleFormSubmission(A)
}}},createControl:function(G,C,B){var E=this.options[G+"Control"];
var F=this.options[G+"Text"];
if("button"==E){var A=document.createElement("input");
A.type="submit";
A.value=F;
A.className="editor_"+G+"_button";
if("cancel"==G){A.onclick=this._boundCancelHandler
}this._form.appendChild(A);
this._controls[G]=A
}else{if("link"==E){var D=document.createElement("a");
D.href="#";
D.appendChild(document.createTextNode(F));
D.onclick="cancel"==G?this._boundCancelHandler:this._boundSubmitHandler;
D.className="editor_"+G+"_link";
if(B){D.className+=" "+B
}this._form.appendChild(D);
this._controls[G]=D
}}},createEditField:function(){var C=(this.options.loadTextURL?this.options.loadingText:this.getText());
var B;
if(1>=this.options.rows&&!/\r|\n/.test(this.getText())){B=document.createElement("input");
B.type="text";
var A=this.options.size||this.options.cols||0;
if(0<A){B.size=A
}}else{B=document.createElement("textarea");
B.rows=(1>=this.options.rows?this.options.autoRows:this.options.rows);
B.cols=this.options.cols||40
}B.name=this.options.paramName;
B.value=C;
B.className="editor_field";
if(this.options.submitOnBlur){B.onblur=this._boundSubmitHandler
}this._controls.editor=B;
if(this.options.loadTextURL){this.loadExternalText()
}this._form.appendChild(this._controls.editor)
},createForm:function(){var B=this;
function A(D,E){var C=B.options["text"+D+"Controls"];
if(!C||E===false){return 
}B._form.appendChild(document.createTextNode(C))
}this._form=$(document.createElement("form"));
this._form.id=this.options.formId;
this._form.addClassName(this.options.formClassName);
this._form.onsubmit=this._boundSubmitHandler;
this.createEditField();
if("textarea"==this._controls.editor.tagName.toLowerCase()){this._form.appendChild(document.createElement("br"))
}if(this.options.onFormCustomization){this.options.onFormCustomization(this,this._form)
}A("Before",this.options.okControl||this.options.cancelControl);
this.createControl("ok",this._boundSubmitHandler);
A("Between",this.options.okControl&&this.options.cancelControl);
this.createControl("cancel",this._boundCancelHandler,"editor_cancel");
A("After",this.options.okControl||this.options.cancelControl)
},destroy:function(){if(this._oldInnerHTML){this.element.innerHTML=this._oldInnerHTML
}this.leaveEditMode();
this.unregisterListeners()
},enterEditMode:function(A){if(this._saving||this._editing){return 
}this._editing=true;
this.triggerCallback("onEnterEditMode");
if(this.options.externalControl){this.options.externalControl.hide()
}this.element.hide();
this.createForm();
this.element.parentNode.insertBefore(this._form,this.element);
if(!this.options.loadTextURL){this.postProcessEditField()
}if(A){Event.stop(A)
}},enterHover:function(A){if(this.options.hoverClassName){this.element.addClassName(this.options.hoverClassName)
}if(this._saving){return 
}this.triggerCallback("onEnterHover")
},getText:function(){return this.element.innerHTML.unescapeHTML()
},handleAJAXFailure:function(A){this.triggerCallback("onFailure",A);
if(this._oldInnerHTML){this.element.innerHTML=this._oldInnerHTML;
this._oldInnerHTML=null
}},handleFormCancellation:function(A){this.wrapUp();
if(A){Event.stop(A)
}},handleFormSubmission:function(D){var B=this._form;
var C=$F(this._controls.editor);
this.prepareSubmission();
var E=this.options.callback(B,C)||"";
if(Object.isString(E)){E=E.toQueryParams()
}E.editorId=this.element.id;
if(this.options.htmlResponse){var A=Object.extend({evalScripts:true},this.options.ajaxOptions);
Object.extend(A,{parameters:E,onComplete:this._boundWrapperHandler,onFailure:this._boundFailureHandler});
new Ajax.Updater({success:this.element},this.url,A)
}else{var A=Object.extend({method:"get"},this.options.ajaxOptions);
Object.extend(A,{parameters:E,onComplete:this._boundWrapperHandler,onFailure:this._boundFailureHandler});
new Ajax.Request(this.url,A)
}if(D){Event.stop(D)
}},leaveEditMode:function(){this.element.removeClassName(this.options.savingClassName);
this.removeForm();
this.leaveHover();
this.element.style.backgroundColor=this._originalBackground;
this.element.show();
if(this.options.externalControl){this.options.externalControl.show()
}this._saving=false;
this._editing=false;
this._oldInnerHTML=null;
this.triggerCallback("onLeaveEditMode")
},leaveHover:function(A){if(this.options.hoverClassName){this.element.removeClassName(this.options.hoverClassName)
}if(this._saving){return 
}this.triggerCallback("onLeaveHover")
},loadExternalText:function(){this._form.addClassName(this.options.loadingClassName);
this._controls.editor.disabled=true;
var A=Object.extend({method:"get"},this.options.ajaxOptions);
Object.extend(A,{parameters:"editorId="+encodeURIComponent(this.element.id),onComplete:Prototype.emptyFunction,onSuccess:function(C){this._form.removeClassName(this.options.loadingClassName);
var B=C.responseText;
if(this.options.stripLoadedTextTags){B=B.stripTags()
}this._controls.editor.value=B;
this._controls.editor.disabled=false;
this.postProcessEditField()
}.bind(this),onFailure:this._boundFailureHandler});
new Ajax.Request(this.options.loadTextURL,A)
},postProcessEditField:function(){var A=this.options.fieldPostCreation;
if(A){$(this._controls.editor)["focus"==A?"focus":"activate"]()
}},prepareOptions:function(){this.options=Object.clone(Ajax.InPlaceEditor.DefaultOptions);
Object.extend(this.options,Ajax.InPlaceEditor.DefaultCallbacks);
[this._extraDefaultOptions].flatten().compact().each(function(A){Object.extend(this.options,A)
}.bind(this))
},prepareSubmission:function(){this._saving=true;
this.removeForm();
this.leaveHover();
this.showSaving()
},registerListeners:function(){this._listeners={};
var A;
$H(Ajax.InPlaceEditor.Listeners).each(function(B){A=this[B.value].bind(this);
this._listeners[B.key]=A;
if(!this.options.externalControlOnly){this.element.observe(B.key,A)
}if(this.options.externalControl){this.options.externalControl.observe(B.key,A)
}}.bind(this))
},removeForm:function(){if(!this._form){return 
}this._form.remove();
this._form=null;
this._controls={}
},showSaving:function(){this._oldInnerHTML=this.element.innerHTML;
this.element.innerHTML=this.options.savingText;
this.element.addClassName(this.options.savingClassName);
this.element.style.backgroundColor=this._originalBackground;
this.element.show()
},triggerCallback:function(B,A){if("function"==typeof this.options[B]){this.options[B](this,A)
}},unregisterListeners:function(){$H(this._listeners).each(function(A){if(!this.options.externalControlOnly){this.element.stopObserving(A.key,A.value)
}if(this.options.externalControl){this.options.externalControl.stopObserving(A.key,A.value)
}}.bind(this))
},wrapUp:function(A){this.leaveEditMode();
this._boundComplete(A,this.element)
}});
Object.extend(Ajax.InPlaceEditor.prototype,{dispose:Ajax.InPlaceEditor.prototype.destroy});
Ajax.InPlaceCollectionEditor=Class.create(Ajax.InPlaceEditor,{initialize:function($super,C,B,A){this._extraDefaultOptions=Ajax.InPlaceCollectionEditor.DefaultOptions;
$super(C,B,A)
},createEditField:function(){var A=document.createElement("select");
A.name=this.options.paramName;
A.size=1;
this._controls.editor=A;
this._collection=this.options.collection||[];
if(this.options.loadCollectionURL){this.loadCollection()
}else{this.checkForExternalText()
}this._form.appendChild(this._controls.editor)
},loadCollection:function(){this._form.addClassName(this.options.loadingClassName);
this.showLoadingText(this.options.loadingCollectionText);
var options=Object.extend({method:"get"},this.options.ajaxOptions);
Object.extend(options,{parameters:"editorId="+encodeURIComponent(this.element.id),onComplete:Prototype.emptyFunction,onSuccess:function(transport){var js=transport.responseText.strip();
if(!/^\[.*\]$/.test(js)){throw ("Server returned an invalid collection representation.")
}this._collection=eval(js);
this.checkForExternalText()
}.bind(this),onFailure:this.onFailure});
new Ajax.Request(this.options.loadCollectionURL,options)
},showLoadingText:function(B){this._controls.editor.disabled=true;
var A=this._controls.editor.firstChild;
if(!A){A=document.createElement("option");
A.value="";
this._controls.editor.appendChild(A);
A.selected=true
}A.update((B||"").stripScripts().stripTags())
},checkForExternalText:function(){this._text=this.getText();
if(this.options.loadTextURL){this.loadExternalText()
}else{this.buildOptionList()
}},loadExternalText:function(){this.showLoadingText(this.options.loadingText);
var A=Object.extend({method:"get"},this.options.ajaxOptions);
Object.extend(A,{parameters:"editorId="+encodeURIComponent(this.element.id),onComplete:Prototype.emptyFunction,onSuccess:function(B){this._text=B.responseText.strip();
this.buildOptionList()
}.bind(this),onFailure:this.onFailure});
new Ajax.Request(this.options.loadTextURL,A)
},buildOptionList:function(){this._form.removeClassName(this.options.loadingClassName);
this._collection=this._collection.map(function(D){return 2===D.length?D:[D,D].flatten()
});
var B=("value" in this.options)?this.options.value:this._text;
var A=this._collection.any(function(D){return D[0]==B
}.bind(this));
this._controls.editor.update("");
var C;
this._collection.each(function(E,D){C=document.createElement("option");
C.value=E[0];
C.selected=A?E[0]==B:0==D;
C.appendChild(document.createTextNode(E[1]));
this._controls.editor.appendChild(C)
}.bind(this));
this._controls.editor.disabled=false;
Field.scrollFreeActivate(this._controls.editor)
}});
Ajax.InPlaceEditor.prototype.initialize.dealWithDeprecatedOptions=function(A){if(!A){return 
}function B(C,D){if(C in A||D===undefined){return 
}A[C]=D
}B("cancelControl",(A.cancelLink?"link":(A.cancelButton?"button":A.cancelLink==A.cancelButton==false?false:undefined)));
B("okControl",(A.okLink?"link":(A.okButton?"button":A.okLink==A.okButton==false?false:undefined)));
B("highlightColor",A.highlightcolor);
B("highlightEndColor",A.highlightendcolor)
};
Object.extend(Ajax.InPlaceEditor,{DefaultOptions:{ajaxOptions:{},autoRows:3,cancelControl:"link",cancelText:"cancel",clickToEditText:"Click to edit",externalControl:null,externalControlOnly:false,fieldPostCreation:"activate",formClassName:"inplaceeditor-form",formId:null,highlightColor:"#ffff99",highlightEndColor:"#ffffff",hoverClassName:"",htmlResponse:true,loadingClassName:"inplaceeditor-loading",loadingText:"Loading...",okControl:"button",okText:"ok",paramName:"value",rows:1,savingClassName:"inplaceeditor-saving",savingText:"Saving...",size:0,stripLoadedTextTags:false,submitOnBlur:false,textAfterControls:"",textBeforeControls:"",textBetweenControls:""},DefaultCallbacks:{callback:function(A){return Form.serialize(A)
},onComplete:function(B,A){new Effect.Highlight(A,{startcolor:this.options.highlightColor,keepBackgroundImage:true})
},onEnterEditMode:null,onEnterHover:function(A){A.element.style.backgroundColor=A.options.highlightColor;
if(A._effect){A._effect.cancel()
}},onFailure:function(B,A){alert("Error communication with the server: "+B.responseText.stripTags())
},onFormCustomization:null,onLeaveEditMode:null,onLeaveHover:function(A){A._effect=new Effect.Highlight(A.element,{startcolor:A.options.highlightColor,endcolor:A.options.highlightEndColor,restorecolor:A._originalBackground,keepBackgroundImage:true})
}},Listeners:{click:"enterEditMode",keydown:"checkForEscapeOrReturn",mouseover:"enterHover",mouseout:"leaveHover"}});
Ajax.InPlaceCollectionEditor.DefaultOptions={loadingCollectionText:"Loading options..."};
Form.Element.DelayedObserver=Class.create({initialize:function(B,A,C){this.delay=A||0.5;
this.element=$(B);
this.callback=C;
this.timer=null;
this.lastValue=$F(this.element);
Event.observe(this.element,"keyup",this.delayedListener.bindAsEventListener(this))
},delayedListener:function(A){if(this.lastValue==$F(this.element)){return 
}if(this.timer){clearTimeout(this.timer)
}this.timer=setTimeout(this.onTimerEvent.bind(this),this.delay*1000);
this.lastValue=$F(this.element)
},onTimerEvent:function(){this.timer=null;
this.callback(this.element,$F(this.element))
}});
if(!Control){var Control={}
}Control.Slider=Class.create({initialize:function(D,A,B){var C=this;
if(Object.isArray(D)){this.handles=D.collect(function(E){return $(E)
})
}else{this.handles=[$(D)]
}this.track=$(A);
this.options=B||{};
this.axis=this.options.axis||"horizontal";
this.increment=this.options.increment||1;
this.step=parseInt(this.options.step||"1");
this.range=this.options.range||$R(0,1);
this.value=0;
this.values=this.handles.map(function(){return 0
});
this.spans=this.options.spans?this.options.spans.map(function(E){return $(E)
}):false;
this.options.startSpan=$(this.options.startSpan||null);
this.options.endSpan=$(this.options.endSpan||null);
this.restricted=this.options.restricted||false;
this.maximum=this.options.maximum||this.range.end;
this.minimum=this.options.minimum||this.range.start;
this.alignX=parseInt(this.options.alignX||"0");
this.alignY=parseInt(this.options.alignY||"0");
this.trackLength=this.maximumOffset()-this.minimumOffset();
this.handleLength=this.isVertical()?(this.handles[0].offsetHeight!=0?this.handles[0].offsetHeight:this.handles[0].style.height.replace(/px$/,"")):(this.handles[0].offsetWidth!=0?this.handles[0].offsetWidth:this.handles[0].style.width.replace(/px$/,""));
this.active=false;
this.dragging=false;
this.disabled=false;
if(this.options.disabled){this.setDisabled()
}this.allowedValues=this.options.values?this.options.values.sortBy(Prototype.K):false;
if(this.allowedValues){this.minimum=this.allowedValues.min();
this.maximum=this.allowedValues.max()
}this.eventMouseDown=this.startDrag.bindAsEventListener(this);
this.eventMouseUp=this.endDrag.bindAsEventListener(this);
this.eventMouseMove=this.update.bindAsEventListener(this);
this.handles.each(function(F,E){E=C.handles.length-1-E;
C.setValue(parseFloat((Object.isArray(C.options.sliderValue)?C.options.sliderValue[E]:C.options.sliderValue)||C.range.start),E);
F.makePositioned().observe("mousedown",C.eventMouseDown)
});
this.track.observe("mousedown",this.eventMouseDown);
document.observe("mouseup",this.eventMouseUp);
document.observe("mousemove",this.eventMouseMove);
this.initialized=true
},dispose:function(){var A=this;
Event.stopObserving(this.track,"mousedown",this.eventMouseDown);
Event.stopObserving(document,"mouseup",this.eventMouseUp);
Event.stopObserving(document,"mousemove",this.eventMouseMove);
this.handles.each(function(B){Event.stopObserving(B,"mousedown",A.eventMouseDown)
})
},setDisabled:function(){this.disabled=true
},setEnabled:function(){this.disabled=false
},getNearestValue:function(A){if(this.allowedValues){if(A>=this.allowedValues.max()){return(this.allowedValues.max())
}if(A<=this.allowedValues.min()){return(this.allowedValues.min())
}var C=Math.abs(this.allowedValues[0]-A);
var B=this.allowedValues[0];
this.allowedValues.each(function(D){var E=Math.abs(D-A);
if(E<=C){B=D;
C=E
}});
return B
}if(A>this.range.end){return this.range.end
}if(A<this.range.start){return this.range.start
}return A
},setValue:function(B,A){if(!this.active){this.activeHandleIdx=A||0;
this.activeHandle=this.handles[this.activeHandleIdx];
this.updateStyles()
}A=A||this.activeHandleIdx||0;
if(this.initialized&&this.restricted){if((A>0)&&(B<this.values[A-1])){B=this.values[A-1]
}if((A<(this.handles.length-1))&&(B>this.values[A+1])){B=this.values[A+1]
}}B=this.getNearestValue(B);
this.values[A]=B;
this.value=this.values[0];
this.handles[A].style[this.isVertical()?"top":"left"]=this.translateToPx(B);
this.drawSpans();
if(!this.dragging||!this.event){this.updateFinished()
}},setValueBy:function(B,A){this.setValue(this.values[A||this.activeHandleIdx||0]+B,A||this.activeHandleIdx||0)
},translateToPx:function(A){return Math.round(((this.trackLength-this.handleLength)/(this.range.end-this.range.start))*(A-this.range.start))+"px"
},translateToValue:function(A){return((A/(this.trackLength-this.handleLength)*(this.range.end-this.range.start))+this.range.start)
},getRange:function(B){var A=this.values.sortBy(Prototype.K);
B=B||0;
return $R(A[B],A[B+1])
},minimumOffset:function(){return(this.isVertical()?this.alignY:this.alignX)
},maximumOffset:function(){return(this.isVertical()?(this.track.offsetHeight!=0?this.track.offsetHeight:this.track.style.height.replace(/px$/,""))-this.alignY:(this.track.offsetWidth!=0?this.track.offsetWidth:this.track.style.width.replace(/px$/,""))-this.alignX)
},isVertical:function(){return(this.axis=="vertical")
},drawSpans:function(){var A=this;
if(this.spans){$R(0,this.spans.length-1).each(function(B){A.setSpan(A.spans[B],A.getRange(B))
})
}if(this.options.startSpan){this.setSpan(this.options.startSpan,$R(0,this.values.length>1?this.getRange(0).min():this.value))
}if(this.options.endSpan){this.setSpan(this.options.endSpan,$R(this.values.length>1?this.getRange(this.spans.length-1).max():this.value,this.maximum))
}},setSpan:function(B,A){if(this.isVertical()){B.style.top=this.translateToPx(A.start);
B.style.height=this.translateToPx(A.end-A.start+this.range.start)
}else{B.style.left=this.translateToPx(A.start);
B.style.width=this.translateToPx(A.end-A.start+this.range.start)
}},updateStyles:function(){this.handles.each(function(A){Element.removeClassName(A,"selected")
});
Element.addClassName(this.activeHandle,"selected")
},startDrag:function(C){if(Event.isLeftClick(C)){if(!this.disabled){this.active=true;
var D=Event.element(C);
var E=[Event.pointerX(C),Event.pointerY(C)];
var A=D;
if(A==this.track){var B=this.track.cumulativeOffset();
this.event=C;
this.setValue(this.translateToValue((this.isVertical()?E[1]-B[1]:E[0]-B[0])-(this.handleLength/2)));
var B=this.activeHandle.cumulativeOffset();
this.offsetX=(E[0]-B[0]);
this.offsetY=(E[1]-B[1])
}else{while((this.handles.indexOf(D)==-1)&&D.parentNode){D=D.parentNode
}if(this.handles.indexOf(D)!=-1){this.activeHandle=D;
this.activeHandleIdx=this.handles.indexOf(this.activeHandle);
this.updateStyles();
var B=this.activeHandle.cumulativeOffset();
this.offsetX=(E[0]-B[0]);
this.offsetY=(E[1]-B[1])
}}}Event.stop(C)
}},update:function(A){if(this.active){if(!this.dragging){this.dragging=true
}this.draw(A);
if(Prototype.Browser.WebKit){window.scrollBy(0,0)
}Event.stop(A)
}},draw:function(B){var C=[Event.pointerX(B),Event.pointerY(B)];
var A=this.track.cumulativeOffset();
C[0]-=this.offsetX+A[0];
C[1]-=this.offsetY+A[1];
this.event=B;
this.setValue(this.translateToValue(this.isVertical()?C[1]:C[0]));
if(this.initialized&&this.options.onSlide){this.options.onSlide(this.values.length>1?this.values:this.value,this)
}},endDrag:function(A){if(this.active&&this.dragging){this.finishDrag(A,true);
Event.stop(A)
}this.active=false;
this.dragging=false
},finishDrag:function(A,B){this.active=false;
this.dragging=false;
this.updateFinished()
},updateFinished:function(){if(this.initialized&&this.options.onChange){this.options.onChange(this.values.length>1?this.values:this.value,this)
}this.event=null
}});
Sound={tracks:{},_enabled:true,template:new Template('<embed style="height:0" id="sound_#{track}_#{id}" src="#{url}" loop="false" autostart="true" hidden="true"/>'),enable:function(){Sound._enabled=true
},disable:function(){Sound._enabled=false
},play:function(B){if(!Sound._enabled){return 
}var A=Object.extend({track:"global",url:B,replace:false},arguments[1]||{});
if(A.replace&&this.tracks[A.track]){$R(0,this.tracks[A.track].id).each(function(D){var C=$("sound_"+A.track+"_"+D);
C.Stop&&C.Stop();
C.remove()
});
this.tracks[A.track]=null
}if(!this.tracks[A.track]){this.tracks[A.track]={id:0}
}else{this.tracks[A.track].id++
}A.id=this.tracks[A.track].id;
$$("body")[0].insert(Prototype.Browser.IE?new Element("bgsound",{id:"sound_"+A.track+"_"+A.id,src:A.url,loop:1,autostart:true}):Sound.template.evaluate(A))
}};
if(Prototype.Browser.Gecko&&navigator.userAgent.indexOf("Win")>0){if(navigator.plugins&&$A(navigator.plugins).detect(function(A){return A.name.indexOf("QuickTime")!=-1
})){Sound.template=new Template('<object id="sound_#{track}_#{id}" width="0" height="0" type="audio/mpeg" data="#{url}"/>')
}else{if(navigator.plugins&&$A(navigator.plugins).detect(function(A){return A.name.indexOf("Windows Media")!=-1
})){Sound.template=new Template('<object id="sound_#{track}_#{id}" type="application/x-mplayer2" data="#{url}"></object>')
}else{if(navigator.plugins&&$A(navigator.plugins).detect(function(A){return A.name.indexOf("RealPlayer")!=-1
})){Sound.template=new Template('<embed type="audio/x-pn-realaudio-plugin" style="height:0" id="sound_#{track}_#{id}" src="#{url}" loop="false" autostart="true" hidden="true"/>')
}else{Sound.play=function(){}
}}}}
(function(BB,l){var AR=BB.document,BT=BB.navigator,BK=BB.location;
var B=(function(){var Bd=function(Bx,By){if(arguments[0]==arguments.callee){return arguments.callee
}return new Bd.fn.init(Bx,By,Bb)
},Bs=BB.jQuery,Bf=BB.$,Bb,Bw=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,Bl=/\S/,Bh=/^\s+/,Bc=/\s+$/,Bg=/\d/,BZ=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,Bm=/^[\],:{}\s]*$/,Bu=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,Bo=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Bi=/(?:^|:|,)(?:\s*\[)+/g,BX=/(webkit)[ \/]([\w.]+)/,Bq=/(opera)(?:.*version)?[ \/]([\w.]+)/,Bp=/(msie) ([\w.]+)/,Br=/(mozilla)(?:.*? rv:([\w.]+))?/,Bv=BT.userAgent,Bt,Ba,e,Bk=Object.prototype.toString,Be=Object.prototype.hasOwnProperty,BY=Array.prototype.push,Bj=Array.prototype.slice,Bn=String.prototype.trim,BU=Array.prototype.indexOf,BW={};
Bd.fn=Bd.prototype={constructor:Bd,init:function(Bx,B1,B0){var Bz,B2,By,B3;
if(!Bx){return this
}if(Bx.nodeType){this.context=this[0]=Bx;
this.length=1;
return this
}if(Bx==="body"&&!B1&&AR.body){this.context=AR;
this[0]=AR.body;
this.selector=Bx;
this.length=1;
return this
}if(typeof Bx==="string"){if(Bx.charAt(0)==="<"&&Bx.charAt(Bx.length-1)===">"&&Bx.length>=3){Bz=[null,Bx,null]
}else{Bz=Bw.exec(Bx)
}if(Bz&&(Bz[1]||!B1)){if(Bz[1]){B1=B1 instanceof Bd?B1[0]:B1;
B3=(B1?B1.ownerDocument||B1:AR);
By=BZ.exec(Bx);
if(By){if(Bd.isPlainObject(B1)){Bx=[AR.createElement(By[1])];
Bd.fn.attr.call(Bx,B1,true)
}else{Bx=[B3.createElement(By[1])]
}}else{By=Bd.buildFragment([Bz[1]],[B3]);
Bx=(By.cacheable?Bd.clone(By.fragment):By.fragment).childNodes
}return Bd.merge(this,Bx)
}else{B2=AR.getElementById(Bz[2]);
if(B2&&B2.parentNode){if(B2.id!==Bz[2]){return B0.find(Bx)
}this.length=1;
this[0]=B2
}this.context=AR;
this.selector=Bx;
return this
}}else{if(!B1||B1.jquery){return(B1||B0).find(Bx)
}else{return this.constructor(B1).find(Bx)
}}}else{if(Bd.isFunction(Bx)){return B0.ready(Bx)
}}if(Bx.selector!==l){this.selector=Bx.selector;
this.context=Bx.context
}return Bd.makeArray(Bx,this)
},selector:"",jquery:"1.6.1",length:0,size:function(){return this.length
},toArray:function(){return Bj.call(this,0)
},get:function(Bx){return Bx==null?this.toArray():(Bx<0?this[this.length+Bx]:this[Bx])
},pushStack:function(By,B0,Bx){var Bz=this.constructor();
if(Bd.isArray(By)){BY.apply(Bz,By)
}else{Bd.merge(Bz,By)
}Bz.prevObject=this;
Bz.context=this.context;
if(B0==="find"){Bz.selector=this.selector+(this.selector?" ":"")+Bx
}else{if(B0){Bz.selector=this.selector+"."+B0+"("+Bx+")"
}}return Bz
},each:function(By,Bx){return Bd.each(this,By,Bx)
},ready:function(Bx){Bd.bindReady();
Ba.done(Bx);
return this
},eq:function(Bx){return Bx===-1?this.slice(Bx):this.slice(Bx,+Bx+1)
},first:function(){return this.eq(0)
},last:function(){return this.eq(-1)
},slice:function(){return this.pushStack(Bj.apply(this,arguments),"slice",Bj.call(arguments).join(","))
},map:function(Bx){return this.pushStack(Bd.map(this,function(Bz,By){return Bx.call(Bz,By,Bz)
}))
},end:function(){return this.prevObject||this.constructor(null)
},push:BY,sort:[].sort,splice:[].splice};
Bd.fn.init.prototype=Bd.fn;
Bd.extend=Bd.fn.extend=function(){var B6,Bz,Bx,By,B3,B4,B2=arguments[0]||{},B1=1,B0=arguments.length,B5=false;
if(typeof B2==="boolean"){B5=B2;
B2=arguments[1]||{};
B1=2
}if(typeof B2!=="object"&&!Bd.isFunction(B2)){B2={}
}if(B0===B1){B2=this;
--B1
}for(;
B1<B0;
B1++){if((B6=arguments[B1])!=null){for(Bz in B6){Bx=B2[Bz];
By=B6[Bz];
if(B2===By){continue
}if(B5&&By&&(Bd.isPlainObject(By)||(B3=Bd.isArray(By)))){if(B3){B3=false;
B4=Bx&&Bd.isArray(Bx)?Bx:[]
}else{B4=Bx&&Bd.isPlainObject(Bx)?Bx:{}
}B2[Bz]=Bd.extend(B5,B4,By)
}else{if(By!==l){B2[Bz]=By
}}}}}return B2
};
Bd.extend({noConflict:function(Bx){if(BB.$===Bd){BB.$=Bf
}if(Bx&&BB.jQuery===Bd){BB.jQuery=Bs
}return Bd
},isReady:false,readyWait:1,holdReady:function(Bx){if(Bx){Bd.readyWait++
}else{Bd.ready(true)
}},ready:function(Bx){if((Bx===true&&!--Bd.readyWait)||(Bx!==true&&!Bd.isReady)){if(!AR.body){return setTimeout(Bd.ready,1)
}Bd.isReady=true;
if(Bx!==true&&--Bd.readyWait>0){return 
}Ba.resolveWith(AR,[Bd]);
if(Bd.fn.trigger){Bd(AR).trigger("ready").unbind("ready")
}}},bindReady:function(){if(Ba){return 
}Ba=Bd._Deferred();
if(AR.readyState==="complete"){return setTimeout(Bd.ready,1)
}if(AR.addEventListener){AR.addEventListener("DOMContentLoaded",e,false);
BB.addEventListener("load",Bd.ready,false)
}else{if(AR.attachEvent){AR.attachEvent("onreadystatechange",e);
BB.attachEvent("onload",Bd.ready);
var Bx=false;
try{Bx=BB.frameElement==null
}catch(By){}if(AR.documentElement.doScroll&&Bx){BV()
}}}},isFunction:function(Bx){return Bd.type(Bx)==="function"
},isArray:Array.isArray||function(Bx){return Bd.type(Bx)==="array"
},isWindow:function(Bx){return Bx&&typeof Bx==="object"&&"setInterval" in Bx
},isNaN:function(Bx){return Bx==null||!Bg.test(Bx)||isNaN(Bx)
},type:function(Bx){return Bx==null?String(Bx):BW[Bk.call(Bx)]||"object"
},isPlainObject:function(By){if(!By||Bd.type(By)!=="object"||By.nodeType||Bd.isWindow(By)){return false
}if(By.constructor&&!Be.call(By,"constructor")&&!Be.call(By.constructor.prototype,"isPrototypeOf")){return false
}var Bx;
for(Bx in By){}return Bx===l||Be.call(By,Bx)
},isEmptyObject:function(By){for(var Bx in By){return false
}return true
},error:function(Bx){throw Bx
},parseJSON:function(Bx){if(typeof Bx!=="string"||!Bx){return null
}Bx=Bd.trim(Bx);
if(BB.JSON&&BB.JSON.parse){return BB.JSON.parse(Bx)
}if(Bm.test(Bx.replace(Bu,"@").replace(Bo,"]").replace(Bi,""))){return(new Function("return "+Bx))()
}Bd.error("Invalid JSON: "+Bx)
},parseXML:function(Bz,Bx,By){if(BB.DOMParser){By=new DOMParser();
Bx=By.parseFromString(Bz,"text/xml")
}else{Bx=new ActiveXObject("Microsoft.XMLDOM");
Bx.async="false";
Bx.loadXML(Bz)
}By=Bx.documentElement;
if(!By||!By.nodeName||By.nodeName==="parsererror"){Bd.error("Invalid XML: "+Bz)
}return Bx
},noop:function(){},globalEval:function(Bx){if(Bx&&Bl.test(Bx)){(BB.execScript||function(By){BB["eval"].call(BB,By)
})(Bx)
}},nodeName:function(By,Bx){return By.nodeName&&By.nodeName.toUpperCase()===Bx.toUpperCase()
},each:function(B0,B3,Bz){var By,B1=0,B2=B0.length,Bx=B2===l||Bd.isFunction(B0);
if(Bz){if(Bx){for(By in B0){if(B3.apply(B0[By],Bz)===false){break
}}}else{for(;
B1<B2;
){if(B3.apply(B0[B1++],Bz)===false){break
}}}}else{if(Bx){for(By in B0){if(B3.call(B0[By],By,B0[By])===false){break
}}}else{for(;
B1<B2;
){if(B3.call(B0[B1],B1,B0[B1++])===false){break
}}}}return B0
},trim:Bn?function(Bx){return Bx==null?"":Bn.call(Bx)
}:function(Bx){return Bx==null?"":Bx.toString().replace(Bh,"").replace(Bc,"")
},makeArray:function(B0,By){var Bx=By||[];
if(B0!=null){var Bz=Bd.type(B0);
if(B0.length==null||Bz==="string"||Bz==="function"||Bz==="regexp"||Bd.isWindow(B0)){BY.call(Bx,B0)
}else{Bd.merge(Bx,B0)
}}return Bx
},inArray:function(Bz,B0){if(BU){return BU.call(B0,Bz)
}for(var Bx=0,By=B0.length;
Bx<By;
Bx++){if(B0[Bx]===Bz){return Bx
}}return -1
},merge:function(B1,Bz){var B0=B1.length,By=0;
if(typeof Bz.length==="number"){for(var Bx=Bz.length;
By<Bx;
By++){B1[B0++]=Bz[By]
}}else{while(Bz[By]!==l){B1[B0++]=Bz[By++]
}}B1.length=B0;
return B1
},grep:function(By,B3,Bx){var Bz=[],B2;
Bx=!!Bx;
for(var B0=0,B1=By.length;
B0<B1;
B0++){B2=!!B3(By[B0],B0);
if(Bx!==B2){Bz.push(By[B0])
}}return Bz
},map:function(Bx,B4,B5){var B2,B3,B1=[],Bz=0,By=Bx.length,B0=Bx instanceof Bd||By!==l&&typeof By==="number"&&((By>0&&Bx[0]&&Bx[By-1])||By===0||Bd.isArray(Bx));
if(B0){for(;
Bz<By;
Bz++){B2=B4(Bx[Bz],Bz,B5);
if(B2!=null){B1[B1.length]=B2
}}}else{for(B3 in Bx){B2=B4(Bx[B3],B3,B5);
if(B2!=null){B1[B1.length]=B2
}}}return B1.concat.apply([],B1)
},guid:1,proxy:function(B1,B0){if(typeof B0==="string"){var Bz=B1[B0];
B0=B1;
B1=Bz
}if(!Bd.isFunction(B1)){return l
}var Bx=Bj.call(arguments,2),By=function(){return B1.apply(B0,Bx.concat(Bj.call(arguments)))
};
By.guid=B1.guid=B1.guid||By.guid||Bd.guid++;
return By
},access:function(Bx,B5,B3,Bz,B2,B4){var By=Bx.length;
if(typeof B5==="object"){for(var B0 in B5){Bd.access(Bx,B0,B5[B0],Bz,B2,B3)
}return Bx
}if(B3!==l){Bz=!B4&&Bz&&Bd.isFunction(B3);
for(var B1=0;
B1<By;
B1++){B2(Bx[B1],B5,Bz?B3.call(Bx[B1],B1,B2(Bx[B1],B5)):B3,B4)
}return Bx
}return By?B2(Bx[0],B5):l
},now:function(){return(new Date()).getTime()
},uaMatch:function(By){By=By.toLowerCase();
var Bx=BX.exec(By)||Bq.exec(By)||Bp.exec(By)||By.indexOf("compatible")<0&&Br.exec(By)||[];
return{browser:Bx[1]||"",version:Bx[2]||"0"}
},sub:function(){function Bx(B0,B1){return new Bx.fn.init(B0,B1)
}Bd.extend(true,Bx,this);
Bx.superclass=this;
Bx.fn=Bx.prototype=this();
Bx.fn.constructor=Bx;
Bx.sub=this.sub;
Bx.fn.init=function Bz(B0,B1){if(B1&&B1 instanceof Bd&&!(B1 instanceof Bx)){B1=Bx(B1)
}return Bd.fn.init.call(this,B0,B1,By)
};
Bx.fn.init.prototype=Bx.fn;
var By=Bx(AR);
return Bx
},browser:{}});
Bd.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(By,Bx){BW["[object "+Bx+"]"]=Bx.toLowerCase()
});
Bt=Bd.uaMatch(Bv);
if(Bt.browser){Bd.browser[Bt.browser]=true;
Bd.browser.version=Bt.version
}if(Bd.browser.webkit){Bd.browser.safari=true
}if(Bl.test("\xA0")){Bh=/^[\s\xA0]+/;
Bc=/[\s\xA0]+$/
}Bb=Bd(AR);
if(AR.addEventListener){e=function(){AR.removeEventListener("DOMContentLoaded",e,false);
Bd.ready()
}
}else{if(AR.attachEvent){e=function(){if(AR.readyState==="complete"){AR.detachEvent("onreadystatechange",e);
Bd.ready()
}}
}}function BV(){if(Bd.isReady){return 
}try{AR.documentElement.doScroll("left")
}catch(Bx){setTimeout(BV,1);
return 
}Bd.ready()
}return Bd
})();
var A="done fail isResolved isRejected promise then always pipe".split(" "),Ag=[].slice;
B.extend({_Deferred:function(){var BW=[],BX,BU,BV,e={done:function(){if(!BV){var BZ=arguments,Ba,Bd,Bc,Bb,BY;
if(BX){BY=BX;
BX=0
}for(Ba=0,Bd=BZ.length;
Ba<Bd;
Ba++){Bc=BZ[Ba];
Bb=B.type(Bc);
if(Bb==="array"){e.done.apply(e,Bc)
}else{if(Bb==="function"){BW.push(Bc)
}}}if(BY){e.resolveWith(BY[0],BY[1])
}}return this
},resolveWith:function(BZ,BY){if(!BV&&!BX&&!BU){BY=BY||[];
BU=1;
try{while(BW[0]){BW.shift().apply(BZ,BY)
}}finally{BX=[BZ,BY];
BU=0
}}return this
},resolve:function(){e.resolveWith(this,arguments);
return this
},isResolved:function(){return !!(BU||BX)
},cancel:function(){BV=1;
BW=[];
return this
}};
return e
},Deferred:function(BU){var e=B._Deferred(),BW=B._Deferred(),BV;
B.extend(e,{then:function(BY,BX){e.done(BY).fail(BX);
return this
},always:function(){return e.done.apply(e,arguments).fail.apply(this,arguments)
},fail:BW.done,rejectWith:BW.resolveWith,reject:BW.resolve,isRejected:BW.isResolved,pipe:function(BY,BX){return B.Deferred(function(BZ){B.each({done:[BY,"resolve"],fail:[BX,"reject"]},function(Bb,Be){var Ba=Be[0],Bd=Be[1],Bc;
if(B.isFunction(Ba)){e[Bb](function(){Bc=Ba.apply(this,arguments);
if(Bc&&B.isFunction(Bc.promise)){Bc.promise().then(BZ.resolve,BZ.reject)
}else{BZ[Bd](Bc)
}})
}else{e[Bb](BZ[Bd])
}})
}).promise()
},promise:function(BY){if(BY==null){if(BV){return BV
}BV=BY={}
}var BX=A.length;
while(BX--){BY[A[BX]]=e[A[BX]]
}return BY
}});
e.done(BW.cancel).fail(e.cancel);
delete e.cancel;
if(BU){BU.call(e,e)
}return e
},when:function(BZ){var BU=arguments,BV=0,BY=BU.length,BX=BY,e=BY<=1&&BZ&&B.isFunction(BZ.promise)?BZ:B.Deferred();
function BW(Ba){return function(Bb){BU[Ba]=arguments.length>1?Ag.call(arguments,0):Bb;
if(!(--BX)){e.resolveWith(e,Ag.call(BU,0))
}}
}if(BY>1){for(;
BV<BY;
BV++){if(BU[BV]&&B.isFunction(BU[BV].promise)){BU[BV].promise().then(BW(BV),e.reject)
}else{--BX
}}if(!BX){e.resolveWith(e,BU)
}}else{if(e!==BZ){e.resolveWith(e,BY?[BZ]:[])
}}return e.promise()
}});
B.support=(function(){var Be=AR.createElement("div"),Bk=AR.documentElement,BY,Bl,Bf,BW,Bd,BZ,Bb,BV,Bc,BU,Bh,BX,Ba,Bi,Bm;
Be.setAttribute("className","t");
Be.innerHTML="   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
BY=Be.getElementsByTagName("*");
Bl=Be.getElementsByTagName("a")[0];
if(!BY||!BY.length||!Bl){return{}
}Bf=AR.createElement("select");
BW=Bf.appendChild(AR.createElement("option"));
Bd=Be.getElementsByTagName("input")[0];
Bb={leadingWhitespace:(Be.firstChild.nodeType===3),tbody:!Be.getElementsByTagName("tbody").length,htmlSerialize:!!Be.getElementsByTagName("link").length,style:/top/.test(Bl.getAttribute("style")),hrefNormalized:(Bl.getAttribute("href")==="/a"),opacity:/^0.55$/.test(Bl.style.opacity),cssFloat:!!Bl.style.cssFloat,checkOn:(Bd.value==="on"),optSelected:BW.selected,getSetAttribute:Be.className!=="t",submitBubbles:true,changeBubbles:true,focusinBubbles:false,deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true};
Bd.checked=true;
Bb.noCloneChecked=Bd.cloneNode(true).checked;
Bf.disabled=true;
Bb.optDisabled=!BW.disabled;
try{delete Be.test
}catch(Bj){Bb.deleteExpando=false
}if(!Be.addEventListener&&Be.attachEvent&&Be.fireEvent){Be.attachEvent("onclick",function Bg(){Bb.noCloneEvent=false;
Be.detachEvent("onclick",Bg)
});
Be.cloneNode(true).fireEvent("onclick")
}Bd=AR.createElement("input");
Bd.value="t";
Bd.setAttribute("type","radio");
Bb.radioValue=Bd.value==="t";
Bd.setAttribute("checked","checked");
Be.appendChild(Bd);
BV=AR.createDocumentFragment();
BV.appendChild(Be.firstChild);
Bb.checkClone=BV.cloneNode(true).cloneNode(true).lastChild.checked;
Be.innerHTML="";
Be.style.width=Be.style.paddingLeft="1px";
Bc=AR.createElement("body");
BU={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"};
for(Bi in BU){Bc.style[Bi]=BU[Bi]
}Bc.appendChild(Be);
Bk.insertBefore(Bc,Bk.firstChild);
Bb.appendChecked=Bd.checked;
Bb.boxModel=Be.offsetWidth===2;
if("zoom" in Be.style){Be.style.display="inline";
Be.style.zoom=1;
Bb.inlineBlockNeedsLayout=(Be.offsetWidth===2);
Be.style.display="";
Be.innerHTML="<div style='width:4px;'></div>";
Bb.shrinkWrapBlocks=(Be.offsetWidth!==2)
}Be.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";
Bh=Be.getElementsByTagName("td");
Bm=(Bh[0].offsetHeight===0);
Bh[0].style.display="";
Bh[1].style.display="none";
Bb.reliableHiddenOffsets=Bm&&(Bh[0].offsetHeight===0);
Be.innerHTML="";
if(AR.defaultView&&AR.defaultView.getComputedStyle){BZ=AR.createElement("div");
BZ.style.width="0";
BZ.style.marginRight="0";
Be.appendChild(BZ);
Bb.reliableMarginRight=(parseInt((AR.defaultView.getComputedStyle(BZ,null)||{marginRight:0}).marginRight,10)||0)===0
}Bc.innerHTML="";
Bk.removeChild(Bc);
if(Be.attachEvent){for(Bi in {submit:1,change:1,focusin:1}){Ba="on"+Bi;
Bm=(Ba in Be);
if(!Bm){Be.setAttribute(Ba,"return;");
Bm=(typeof Be[Ba]==="function")
}Bb[Bi+"Bubbles"]=Bm
}}return Bb
})();
B.boxModel=B.support.boxModel;
var An=/^(?:\{.*\}|\[.*\])$/,AW=/([a-z])([A-Z])/g;
B.extend({cache:{},uuid:0,expando:"jQuery"+(B.fn.jquery+Math.random()).replace(/\D/g,""),noData:{"embed":true,"object":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000","applet":true},hasData:function(e){e=e.nodeType?B.cache[e[B.expando]]:e[B.expando];
return !!e&&!u(e)
},data:function(BW,BU,BY,BX){if(!B.acceptData(BW)){return 
}var Bb=B.expando,Ba=typeof BU==="string",BZ,Bc=BW.nodeType,e=Bc?B.cache:BW,BV=Bc?BW[B.expando]:BW[B.expando]&&B.expando;
if((!BV||(BX&&BV&&!e[BV][Bb]))&&Ba&&BY===l){return 
}if(!BV){if(Bc){BW[B.expando]=BV=++B.uuid
}else{BV=B.expando
}}if(!e[BV]){e[BV]={};
if(!Bc){e[BV].toJSON=B.noop
}}if(typeof BU==="object"||typeof BU==="function"){if(BX){e[BV][Bb]=B.extend(e[BV][Bb],BU)
}else{e[BV]=B.extend(e[BV],BU)
}}BZ=e[BV];
if(BX){if(!BZ[Bb]){BZ[Bb]={}
}BZ=BZ[Bb]
}if(BY!==l){BZ[B.camelCase(BU)]=BY
}if(BU==="events"&&!BZ[BU]){return BZ[Bb]&&BZ[Bb].events
}return Ba?BZ[B.camelCase(BU)]:BZ
},removeData:function(BX,BV,BY){if(!B.acceptData(BX)){return 
}var Ba=B.expando,Bb=BX.nodeType,BU=Bb?B.cache:BX,BW=Bb?BX[B.expando]:B.expando;
if(!BU[BW]){return 
}if(BV){var BZ=BY?BU[BW][Ba]:BU[BW];
if(BZ){delete BZ[BV];
if(!u(BZ)){return 
}}}if(BY){delete BU[BW][Ba];
if(!u(BU[BW])){return 
}}var e=BU[BW][Ba];
if(B.support.deleteExpando||BU!=BB){delete BU[BW]
}else{BU[BW]=null
}if(e){BU[BW]={};
if(!Bb){BU[BW].toJSON=B.noop
}BU[BW][Ba]=e
}else{if(Bb){if(B.support.deleteExpando){delete BX[B.expando]
}else{if(BX.removeAttribute){BX.removeAttribute(B.expando)
}else{BX[B.expando]=null
}}}}},_data:function(BU,e,BV){return B.data(BU,e,BV,true)
},acceptData:function(BU){if(BU.nodeName){var e=B.noData[BU.nodeName.toLowerCase()];
if(e){return !(e===true||BU.getAttribute("classid")!==e)
}}return true
}});
B.fn.extend({data:function(BX,BZ){var BY=null;
if(typeof BX==="undefined"){if(this.length){BY=B.data(this[0]);
if(this[0].nodeType===1){var e=this[0].attributes,BV;
for(var BW=0,BU=e.length;
BW<BU;
BW++){BV=e[BW].name;
if(BV.indexOf("data-")===0){BV=B.camelCase(BV.substring(5));
A4(this[0],BV,BY[BV])
}}}}return BY
}else{if(typeof BX==="object"){return this.each(function(){B.data(this,BX)
})
}}var Ba=BX.split(".");
Ba[1]=Ba[1]?"."+Ba[1]:"";
if(BZ===l){BY=this.triggerHandler("getData"+Ba[1]+"!",[Ba[0]]);
if(BY===l&&this.length){BY=B.data(this[0],BX);
BY=A4(this[0],BX,BY)
}return BY===l&&Ba[1]?this.data(Ba[0]):BY
}else{return this.each(function(){var Bc=B(this),Bb=[Ba[0],BZ];
Bc.triggerHandler("setData"+Ba[1]+"!",Bb);
B.data(this,BX,BZ);
Bc.triggerHandler("changeData"+Ba[1]+"!",Bb)
})
}},removeData:function(e){return this.each(function(){B.removeData(this,e)
})
}});
function A4(BW,BV,BX){if(BX===l&&BW.nodeType===1){var BU="data-"+BV.replace(AW,"$1-$2").toLowerCase();
BX=BW.getAttribute(BU);
if(typeof BX==="string"){try{BX=BX==="true"?true:BX==="false"?false:BX==="null"?null:!B.isNaN(BX)?parseFloat(BX):An.test(BX)?B.parseJSON(BX):BX
}catch(BY){}B.data(BW,BV,BX)
}else{BX=l
}}return BX
}function u(BU){for(var e in BU){if(e!=="toJSON"){return false
}}return true
}function BG(BX,BW,BZ){var BV=BW+"defer",BU=BW+"queue",e=BW+"mark",BY=B.data(BX,BV,l,true);
if(BY&&(BZ==="queue"||!B.data(BX,BU,l,true))&&(BZ==="mark"||!B.data(BX,e,l,true))){setTimeout(function(){if(!B.data(BX,BU,l,true)&&!B.data(BX,e,l,true)){B.removeData(BX,BV,true);
BY.resolve()
}},0)
}}B.extend({_mark:function(BU,e){if(BU){e=(e||"fx")+"mark";
B.data(BU,e,(B.data(BU,e,l,true)||0)+1,true)
}},_unmark:function(BX,BW,BU){if(BX!==true){BU=BW;
BW=BX;
BX=false
}if(BW){BU=BU||"fx";
var e=BU+"mark",BV=BX?0:((B.data(BW,e,l,true)||1)-1);
if(BV){B.data(BW,e,BV,true)
}else{B.removeData(BW,e,true);
BG(BW,BU,"mark")
}}},queue:function(BU,e,BW){if(BU){e=(e||"fx")+"queue";
var BV=B.data(BU,e,l,true);
if(BW){if(!BV||B.isArray(BW)){BV=B.data(BU,e,B.makeArray(BW),true)
}else{BV.push(BW)
}}return BV||[]
}},dequeue:function(BW,BV){BV=BV||"fx";
var e=B.queue(BW,BV),BU=e.shift(),BX;
if(BU==="inprogress"){BU=e.shift()
}if(BU){if(BV==="fx"){e.unshift("inprogress")
}BU.call(BW,function(){B.dequeue(BW,BV)
})
}if(!e.length){B.removeData(BW,BV+"queue",true);
BG(BW,BV,"queue")
}}});
B.fn.extend({queue:function(e,BU){if(typeof e!=="string"){BU=e;
e="fx"
}if(BU===l){return B.queue(this[0],e)
}return this.each(function(){var BV=B.queue(this,e,BU);
if(e==="fx"&&BV[0]!=="inprogress"){B.dequeue(this,e)
}})
},dequeue:function(e){return this.each(function(){B.dequeue(this,e)
})
},delay:function(BU,e){BU=B.fx?B.fx.speeds[BU]||BU:BU;
e=e||"fx";
return this.queue(e,function(){var BV=this;
setTimeout(function(){B.dequeue(BV,e)
},BU)
})
},clearQueue:function(e){return this.queue(e||"fx",[])
},promise:function(Bc,BV){if(typeof Bc!=="string"){BV=Bc;
Bc=l
}Bc=Bc||"fx";
var e=B.Deferred(),BU=this,BX=BU.length,Ba=1,BY=Bc+"defer",BZ=Bc+"queue",Bb=Bc+"mark",BW;
function Bd(){if(!(--Ba)){e.resolveWith(BU,[BU])
}}while(BX--){if((BW=B.data(BU[BX],BY,l,true)||(B.data(BU[BX],BZ,l,true)||B.data(BU[BX],Bb,l,true))&&B.data(BU[BX],BY,B._Deferred(),true))){Ba++;
BW.done(Bd)
}}Bd();
return e.promise()
}});
var Al=/[\n\t\r]/g,AD=/\s+/,Ap=/\r/g,F=/^(?:button|input)$/i,d=/^(?:button|input|object|select|textarea)$/i,K=/^a(?:rea)?$/i,AL=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,A7=/\:/,A2,Aw;
B.fn.extend({attr:function(e,BU){return B.access(this,e,BU,true,B.attr)
},removeAttr:function(e){return this.each(function(){B.removeAttr(this,e)
})
},prop:function(e,BU){return B.access(this,e,BU,true,B.prop)
},removeProp:function(e){e=B.propFix[e]||e;
return this.each(function(){try{this[e]=l;
delete this[e]
}catch(BU){}})
},addClass:function(Ba){if(B.isFunction(Ba)){return this.each(function(Bd){var Bc=B(this);
Bc.addClass(Ba.call(this,Bd,Bc.attr("class")||""))
})
}if(Ba&&typeof Ba==="string"){var e=(Ba||"").split(AD);
for(var BW=0,BV=this.length;
BW<BV;
BW++){var BU=this[BW];
if(BU.nodeType===1){if(!BU.className){BU.className=Ba
}else{var BX=" "+BU.className+" ",BZ=BU.className;
for(var BY=0,Bb=e.length;
BY<Bb;
BY++){if(BX.indexOf(" "+e[BY]+" ")<0){BZ+=" "+e[BY]
}}BU.className=B.trim(BZ)
}}}}return this
},removeClass:function(BY){if(B.isFunction(BY)){return this.each(function(Bc){var Bb=B(this);
Bb.removeClass(BY.call(this,Bc,Bb.attr("class")))
})
}if((BY&&typeof BY==="string")||BY===l){var BZ=(BY||"").split(AD);
for(var BV=0,BU=this.length;
BV<BU;
BV++){var BX=this[BV];
if(BX.nodeType===1&&BX.className){if(BY){var BW=(" "+BX.className+" ").replace(Al," ");
for(var Ba=0,e=BZ.length;
Ba<e;
Ba++){BW=BW.replace(" "+BZ[Ba]+" "," ")
}BX.className=B.trim(BW)
}else{BX.className=""
}}}}return this
},toggleClass:function(BW,BU){var BV=typeof BW,e=typeof BU==="boolean";
if(B.isFunction(BW)){return this.each(function(BY){var BX=B(this);
BX.toggleClass(BW.call(this,BY,BX.attr("class"),BU),BU)
})
}return this.each(function(){if(BV==="string"){var BZ,BY=0,BX=B(this),Ba=BU,Bb=BW.split(AD);
while((BZ=Bb[BY++])){Ba=e?Ba:!BX.hasClass(BZ);
BX[Ba?"addClass":"removeClass"](BZ)
}}else{if(BV==="undefined"||BV==="boolean"){if(this.className){B._data(this,"__className__",this.className)
}this.className=this.className||BW===false?"":B._data(this,"__className__")||""
}}})
},hasClass:function(e){var BW=" "+e+" ";
for(var BV=0,BU=this.length;
BV<BU;
BV++){if((" "+this[BV].className+" ").replace(Al," ").indexOf(BW)>-1){return true
}}return false
},val:function(BW){var e,BU,BV=this[0];
if(!arguments.length){if(BV){e=B.valHooks[BV.nodeName.toLowerCase()]||B.valHooks[BV.type];
if(e&&"get" in e&&(BU=e.get(BV,"value"))!==l){return BU
}return(BV.value||"").replace(Ap,"")
}return l
}var BX=B.isFunction(BW);
return this.each(function(BZ){var BY=B(this),Ba;
if(this.nodeType!==1){return 
}if(BX){Ba=BW.call(this,BZ,BY.val())
}else{Ba=BW
}if(Ba==null){Ba=""
}else{if(typeof Ba==="number"){Ba+=""
}else{if(B.isArray(Ba)){Ba=B.map(Ba,function(Bb){return Bb==null?"":Bb+""
})
}}}e=B.valHooks[this.nodeName.toLowerCase()]||B.valHooks[this.type];
if(!e||!("set" in e)||e.set(this,Ba,"value")===l){this.value=Ba
}})
}});
B.extend({valHooks:{option:{get:function(e){var BU=e.attributes.value;
return !BU||BU.specified?e.value:e.text
}},select:{get:function(e){var BZ,BX=e.selectedIndex,Ba=[],Bb=e.options,BW=e.type==="select-one";
if(BX<0){return null
}for(var BU=BW?BX:0,BY=BW?BX+1:Bb.length;
BU<BY;
BU++){var BV=Bb[BU];
if(BV.selected&&(B.support.optDisabled?!BV.disabled:BV.getAttribute("disabled")===null)&&(!BV.parentNode.disabled||!B.nodeName(BV.parentNode,"optgroup"))){BZ=B(BV).val();
if(BW){return BZ
}Ba.push(BZ)
}}if(BW&&!Ba.length&&Bb.length){return B(Bb[BX]).val()
}return Ba
},set:function(BU,BV){var e=B.makeArray(BV);
B(BU).find("option").each(function(){this.selected=B.inArray(B(this).val(),e)>=0
});
if(!e.length){BU.selectedIndex=-1
}return e
}}},attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attrFix:{tabindex:"tabIndex"},attr:function(BZ,BW,Ba,BY){var BU=BZ.nodeType;
if(!BZ||BU===3||BU===8||BU===2){return l
}if(BY&&BW in B.attrFn){return B(BZ)[BW](Ba)
}if(!("getAttribute" in BZ)){return B.prop(BZ,BW,Ba)
}var BV,e,BX=BU!==1||!B.isXMLDoc(BZ);
BW=BX&&B.attrFix[BW]||BW;
e=B.attrHooks[BW];
if(!e){if(AL.test(BW)&&(typeof Ba==="boolean"||Ba===l||Ba.toLowerCase()===BW.toLowerCase())){e=Aw
}else{if(A2&&(B.nodeName(BZ,"form")||A7.test(BW))){e=A2
}}}if(Ba!==l){if(Ba===null){B.removeAttr(BZ,BW);
return l
}else{if(e&&"set" in e&&BX&&(BV=e.set(BZ,Ba,BW))!==l){return BV
}else{BZ.setAttribute(BW,""+Ba);
return Ba
}}}else{if(e&&"get" in e&&BX){return e.get(BZ,BW)
}else{BV=BZ.getAttribute(BW);
return BV===null?l:BV
}}},removeAttr:function(BU,e){var BV;
if(BU.nodeType===1){e=B.attrFix[e]||e;
if(B.support.getSetAttribute){BU.removeAttribute(e)
}else{B.attr(BU,e,"");
BU.removeAttributeNode(BU.getAttributeNode(e))
}if(AL.test(e)&&(BV=B.propFix[e]||e) in BU){BU[BV]=false
}}},attrHooks:{type:{set:function(e,BU){if(F.test(e.nodeName)&&e.parentNode){B.error("type property can't be changed")
}else{if(!B.support.radioValue&&BU==="radio"&&B.nodeName(e,"input")){var BV=e.value;
e.setAttribute("type",BU);
if(BV){e.value=BV
}return BU
}}}},tabIndex:{get:function(BU){var e=BU.getAttributeNode("tabIndex");
return e&&e.specified?parseInt(e.value,10):d.test(BU.nodeName)||K.test(BU.nodeName)&&BU.href?0:l
}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(BY,BW,BZ){var BU=BY.nodeType;
if(!BY||BU===3||BU===8||BU===2){return l
}var BV,e,BX=BU!==1||!B.isXMLDoc(BY);
BW=BX&&B.propFix[BW]||BW;
e=B.propHooks[BW];
if(BZ!==l){if(e&&"set" in e&&(BV=e.set(BY,BZ,BW))!==l){return BV
}else{return(BY[BW]=BZ)
}}else{if(e&&"get" in e&&(BV=e.get(BY,BW))!==l){return BV
}else{return BY[BW]
}}},propHooks:{}});
Aw={get:function(BU,e){return BU[B.propFix[e]||e]?e.toLowerCase():l
},set:function(BU,BW,e){var BV;
if(BW===false){B.removeAttr(BU,e)
}else{BV=B.propFix[e]||e;
if(BV in BU){BU[BV]=BW
}BU.setAttribute(e,e.toLowerCase())
}return e
}};
B.attrHooks.value={get:function(BU,e){if(A2&&B.nodeName(BU,"button")){return A2.get(BU,e)
}return BU.value
},set:function(BU,BV,e){if(A2&&B.nodeName(BU,"button")){return A2.set(BU,BV,e)
}BU.value=BV
}};
if(!B.support.getSetAttribute){B.attrFix=B.propFix;
A2=B.attrHooks.name=B.valHooks.button={get:function(BV,BU){var e;
e=BV.getAttributeNode(BU);
return e&&e.nodeValue!==""?e.nodeValue:l
},set:function(BV,BW,BU){var e=BV.getAttributeNode(BU);
if(e){e.nodeValue=BW;
return BW
}}};
B.each(["width","height"],function(BU,e){B.attrHooks[e]=B.extend(B.attrHooks[e],{set:function(BV,BW){if(BW===""){BV.setAttribute(e,"auto");
return BW
}}})
})
}if(!B.support.hrefNormalized){B.each(["href","src","width","height"],function(BU,e){B.attrHooks[e]=B.extend(B.attrHooks[e],{get:function(BW){var BV=BW.getAttribute(e,2);
return BV===null?l:BV
}})
})
}if(!B.support.style){B.attrHooks.style={get:function(e){return e.style.cssText.toLowerCase()||l
},set:function(e,BU){return(e.style.cssText=""+BU)
}}
}if(!B.support.optSelected){B.propHooks.selected=B.extend(B.propHooks.selected,{get:function(BU){var e=BU.parentNode;
if(e){e.selectedIndex;
if(e.parentNode){e.parentNode.selectedIndex
}}}})
}if(!B.support.checkOn){B.each(["radio","checkbox"],function(){B.valHooks[this]={get:function(e){return e.getAttribute("value")===null?"on":e.value
}}
})
}B.each(["radio","checkbox"],function(){B.valHooks[this]=B.extend(B.valHooks[this],{set:function(e,BU){if(B.isArray(BU)){return(e.checked=B.inArray(B(e).val(),BU)>=0)
}}})
});
var Ad=Object.prototype.hasOwnProperty,Ay=/\.(.*)$/,BD=/^(?:textarea|input|select)$/i,o=/\./g,BH=/ /g,Ac=/[^\w\s.|`]/g,h=function(e){return e.replace(Ac,"\\$&")
};
B.event={add:function(BW,Ba,Bf,BY){if(BW.nodeType===3||BW.nodeType===8){return 
}if(Bf===false){Bf=BJ
}else{if(!Bf){return 
}}var BU,Be;
if(Bf.handler){BU=Bf;
Bf=BU.handler
}if(!Bf.guid){Bf.guid=B.guid++
}var Bb=B._data(BW);
if(!Bb){return 
}var Bg=Bb.events,BZ=Bb.handle;
if(!Bg){Bb.events=Bg={}
}if(!BZ){Bb.handle=BZ=function(Bh){return typeof B!=="undefined"&&(!Bh||B.event.triggered!==Bh.type)?B.event.handle.apply(BZ.elem,arguments):l
}
}BZ.elem=BW;
Ba=Ba.split(" ");
var Bd,BX=0,e;
while((Bd=Ba[BX++])){Be=BU?B.extend({},BU):{handler:Bf,data:BY};
if(Bd.indexOf(".")>-1){e=Bd.split(".");
Bd=e.shift();
Be.namespace=e.slice(0).sort().join(".")
}else{e=[];
Be.namespace=""
}Be.type=Bd;
if(!Be.guid){Be.guid=Bf.guid
}var BV=Bg[Bd],Bc=B.event.special[Bd]||{};
if(!BV){BV=Bg[Bd]=[];
if(!Bc.setup||Bc.setup.call(BW,BY,e,BZ)===false){if(BW.addEventListener){BW.addEventListener(Bd,BZ,false)
}else{if(BW.attachEvent){BW.attachEvent("on"+Bd,BZ)
}}}}if(Bc.add){Bc.add.call(BW,Be);
if(!Be.handler.guid){Be.handler.guid=Bf.guid
}}BV.push(Be);
B.event.global[Bd]=true
}BW=null
},global:{},remove:function(Bi,Bd,BV,BZ){if(Bi.nodeType===3||Bi.nodeType===8){return 
}if(BV===false){BV=BJ
}var Bl,BY,Ba,Bf,Bg=0,BW,Bb,Be,BX,Bc,e,Bk,Bh=B.hasData(Bi)&&B._data(Bi),BU=Bh&&Bh.events;
if(!Bh||!BU){return 
}if(Bd&&Bd.type){BV=Bd.handler;
Bd=Bd.type
}if(!Bd||typeof Bd==="string"&&Bd.charAt(0)==="."){Bd=Bd||"";
for(BY in BU){B.event.remove(Bi,BY+Bd)
}return 
}Bd=Bd.split(" ");
while((BY=Bd[Bg++])){Bk=BY;
e=null;
BW=BY.indexOf(".")<0;
Bb=[];
if(!BW){Bb=BY.split(".");
BY=Bb.shift();
Be=new RegExp("(^|\\.)"+B.map(Bb.slice(0).sort(),h).join("\\.(?:.*\\.)?")+"(\\.|$)")
}Bc=BU[BY];
if(!Bc){continue
}if(!BV){for(Bf=0;
Bf<Bc.length;
Bf++){e=Bc[Bf];
if(BW||Be.test(e.namespace)){B.event.remove(Bi,Bk,e.handler,Bf);
Bc.splice(Bf--,1)
}}continue
}BX=B.event.special[BY]||{};
for(Bf=BZ||0;
Bf<Bc.length;
Bf++){e=Bc[Bf];
if(BV.guid===e.guid){if(BW||Be.test(e.namespace)){if(BZ==null){Bc.splice(Bf--,1)
}if(BX.remove){BX.remove.call(Bi,e)
}}if(BZ!=null){break
}}}if(Bc.length===0||BZ!=null&&Bc.length===1){if(!BX.teardown||BX.teardown.call(Bi,Bb)===false){B.removeEvent(Bi,BY,Bh.handle)
}Bl=null;
delete BU[BY]
}}if(B.isEmptyObject(BU)){var Bj=Bh.handle;
if(Bj){Bj.elem=null
}delete Bh.events;
delete Bh.handle;
if(B.isEmptyObject(Bh)){B.removeData(Bi,l,true)
}}},customEvent:{"getData":true,"setData":true,"changeData":true},trigger:function(e,Ba,BY,Bf){var Bd=e.type||e,BV=[],BU;
if(Bd.indexOf("!")>=0){Bd=Bd.slice(0,-1);
BU=true
}if(Bd.indexOf(".")>=0){BV=Bd.split(".");
Bd=BV.shift();
BV.sort()
}if((!BY||B.event.customEvent[Bd])&&!B.event.global[Bd]){return 
}e=typeof e==="object"?e[B.expando]?e:new B.Event(Bd,e):new B.Event(Bd);
e.type=Bd;
e.exclusive=BU;
e.namespace=BV.join(".");
e.namespace_re=new RegExp("(^|\\.)"+BV.join("\\.(?:.*\\.)?")+"(\\.|$)");
if(Bf||!BY){e.preventDefault();
e.stopPropagation()
}if(!BY){B.each(B.cache,function(){var Bh=B.expando,Bg=this[Bh];
if(Bg&&Bg.events&&Bg.events[Bd]){B.event.trigger(e,Ba,Bg.handle.elem)
}});
return 
}if(BY.nodeType===3||BY.nodeType===8){return 
}e.result=l;
e.target=BY;
Ba=Ba?B.makeArray(Ba):[];
Ba.unshift(e);
var Be=BY,BW=Bd.indexOf(":")<0?"on"+Bd:"";
do{var Bb=B._data(Be,"handle");
e.currentTarget=Be;
if(Bb){Bb.apply(Be,Ba)
}if(BW&&B.acceptData(Be)&&Be[BW]&&Be[BW].apply(Be,Ba)===false){e.result=false;
e.preventDefault()
}Be=Be.parentNode||Be.ownerDocument||Be===e.target.ownerDocument&&BB
}while(Be&&!e.isPropagationStopped());
if(!e.isDefaultPrevented()){var BX,Bc=B.event.special[Bd]||{};
if((!Bc._default||Bc._default.call(BY.ownerDocument,e)===false)&&!(Bd==="click"&&B.nodeName(BY,"a"))&&B.acceptData(BY)){try{if(BW&&BY[Bd]){BX=BY[BW];
if(BX){BY[BW]=null
}B.event.triggered=Bd;
BY[Bd]()
}}catch(BZ){}if(BX){BY[BW]=BX
}B.event.triggered=l
}}return e.result
},handle:function(Ba){Ba=B.event.fix(Ba||BB.event);
var BU=((B._data(this,"events")||{})[Ba.type]||[]).slice(0),BZ=!Ba.exclusive&&!Ba.namespace,BX=Array.prototype.slice.call(arguments,0);
BX[0]=Ba;
Ba.currentTarget=this;
for(var BW=0,e=BU.length;
BW<e;
BW++){var BY=BU[BW];
if(BZ||Ba.namespace_re.test(BY.namespace)){Ba.handler=BY.handler;
Ba.data=BY.data;
Ba.handleObj=BY;
var BV=BY.handler.apply(this,BX);
if(BV!==l){Ba.result=BV;
if(BV===false){Ba.preventDefault();
Ba.stopPropagation()
}}if(Ba.isImmediatePropagationStopped()){break
}}}return Ba.result
},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(BX){if(BX[B.expando]){return BX
}var BU=BX;
BX=B.Event(BU);
for(var BV=this.props.length,BZ;
BV;
){BZ=this.props[--BV];
BX[BZ]=BU[BZ]
}if(!BX.target){BX.target=BX.srcElement||AR
}if(BX.target.nodeType===3){BX.target=BX.target.parentNode
}if(!BX.relatedTarget&&BX.fromElement){BX.relatedTarget=BX.fromElement===BX.target?BX.toElement:BX.fromElement
}if(BX.pageX==null&&BX.clientX!=null){var BW=BX.target.ownerDocument||AR,BY=BW.documentElement,e=BW.body;
BX.pageX=BX.clientX+(BY&&BY.scrollLeft||e&&e.scrollLeft||0)-(BY&&BY.clientLeft||e&&e.clientLeft||0);
BX.pageY=BX.clientY+(BY&&BY.scrollTop||e&&e.scrollTop||0)-(BY&&BY.clientTop||e&&e.clientTop||0)
}if(BX.which==null&&(BX.charCode!=null||BX.keyCode!=null)){BX.which=BX.charCode!=null?BX.charCode:BX.keyCode
}if(!BX.metaKey&&BX.ctrlKey){BX.metaKey=BX.ctrlKey
}if(!BX.which&&BX.button!==l){BX.which=(BX.button&1?1:(BX.button&2?3:(BX.button&4?2:0)))
}return BX
},guid:100000000,proxy:B.proxy,special:{ready:{setup:B.bindReady,teardown:B.noop},live:{add:function(e){B.event.add(this,P(e.origType,e.selector),B.extend({},e,{handler:AJ,guid:e.handler.guid}))
},remove:function(e){B.event.remove(this,P(e.origType,e.selector),e)
}},beforeunload:{setup:function(BV,BU,e){if(B.isWindow(this)){this.onbeforeunload=e
}},teardown:function(BU,e){if(this.onbeforeunload===e){this.onbeforeunload=null
}}}}};
B.removeEvent=AR.removeEventListener?function(BU,e,BV){if(BU.removeEventListener){BU.removeEventListener(e,BV,false)
}}:function(BU,e,BV){if(BU.detachEvent){BU.detachEvent("on"+e,BV)
}};
B.Event=function(BU,e){if(!this.preventDefault){return new B.Event(BU,e)
}if(BU&&BU.type){this.originalEvent=BU;
this.type=BU.type;
this.isDefaultPrevented=(BU.defaultPrevented||BU.returnValue===false||BU.getPreventDefault&&BU.getPreventDefault())?H:BJ
}else{this.type=BU
}if(e){B.extend(this,e)
}this.timeStamp=B.now();
this[B.expando]=true
};
function BJ(){return false
}function H(){return true
}B.Event.prototype={preventDefault:function(){this.isDefaultPrevented=H;
var BU=this.originalEvent;
if(!BU){return 
}if(BU.preventDefault){BU.preventDefault()
}else{BU.returnValue=false
}},stopPropagation:function(){this.isPropagationStopped=H;
var BU=this.originalEvent;
if(!BU){return 
}if(BU.stopPropagation){BU.stopPropagation()
}BU.cancelBubble=true
},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=H;
this.stopPropagation()
},isDefaultPrevented:BJ,isPropagationStopped:BJ,isImmediatePropagationStopped:BJ};
var AC=function(BV){var BU=BV.relatedTarget;
BV.type=BV.data;
try{if(BU&&BU!==AR&&!BU.parentNode){return 
}while(BU&&BU!==this){BU=BU.parentNode
}if(BU!==this){B.event.handle.apply(this,arguments)
}}catch(BW){}},As=function(e){e.type=e.data;
B.event.handle.apply(this,arguments)
};
B.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(BU,e){B.event.special[BU]={setup:function(BV){B.event.add(this,e,BV&&BV.selector?As:AC,BU)
},teardown:function(BV){B.event.remove(this,e,BV&&BV.selector?As:AC)
}}
});
if(!B.support.submitBubbles){B.event.special.submit={setup:function(BU,e){if(!B.nodeName(this,"form")){B.event.add(this,"click.specialSubmit",function(BX){var BW=BX.target,BV=BW.type;
if((BV==="submit"||BV==="image")&&B(BW).closest("form").length){Av("submit",this,arguments)
}});
B.event.add(this,"keypress.specialSubmit",function(BX){var BW=BX.target,BV=BW.type;
if((BV==="text"||BV==="password")&&B(BW).closest("form").length&&BX.keyCode===13){Av("submit",this,arguments)
}})
}else{return false
}},teardown:function(e){B.event.remove(this,".specialSubmit")
}}
}if(!B.support.changeBubbles){var BM,J=function(BU){var e=BU.type,BV=BU.value;
if(e==="radio"||e==="checkbox"){BV=BU.checked
}else{if(e==="select-multiple"){BV=BU.selectedIndex>-1?B.map(BU.options,function(BW){return BW.selected
}).join("-"):""
}else{if(B.nodeName(BU,"select")){BV=BU.selectedIndex
}}}return BV
},AA=function AA(BW){var BU=BW.target,BV,BX;
if(!BD.test(BU.nodeName)||BU.readOnly){return 
}BV=B._data(BU,"_change_data");
BX=J(BU);
if(BW.type!=="focusout"||BU.type!=="radio"){B._data(BU,"_change_data",BX)
}if(BV===l||BX===BV){return 
}if(BV!=null||BX){BW.type="change";
BW.liveFired=l;
B.event.trigger(BW,arguments[1],BU)
}};
B.event.special.change={filters:{focusout:AA,beforedeactivate:AA,click:function(BW){var BV=BW.target,BU=B.nodeName(BV,"input")?BV.type:"";
if(BU==="radio"||BU==="checkbox"||B.nodeName(BV,"select")){AA.call(this,BW)
}},keydown:function(BW){var BV=BW.target,BU=B.nodeName(BV,"input")?BV.type:"";
if((BW.keyCode===13&&!B.nodeName(BV,"textarea"))||(BW.keyCode===32&&(BU==="checkbox"||BU==="radio"))||BU==="select-multiple"){AA.call(this,BW)
}},beforeactivate:function(BV){var BU=BV.target;
B._data(BU,"_change_data",J(BU))
}},setup:function(BV,BU){if(this.type==="file"){return false
}for(var e in BM){B.event.add(this,e+".specialChange",BM[e])
}return BD.test(this.nodeName)
},teardown:function(e){B.event.remove(this,".specialChange");
return BD.test(this.nodeName)
}};
BM=B.event.special.change.filters;
BM.focus=BM.beforeactivate
}function Av(BU,BW,e){var BV=B.extend({},e[0]);
BV.type=BU;
BV.originalEvent={};
BV.liveFired=l;
B.event.handle.call(BW,BV);
if(BV.isDefaultPrevented()){e[0].preventDefault()
}}if(!B.support.focusinBubbles){B.each({focus:"focusin",blur:"focusout"},function(BW,e){var BU=0;
B.event.special[e]={setup:function(){if(BU++===0){AR.addEventListener(BW,BV,true)
}},teardown:function(){if(--BU===0){AR.removeEventListener(BW,BV,true)
}}};
function BV(BX){var BY=B.event.fix(BX);
BY.type=e;
BY.originalEvent={};
B.event.trigger(BY,null,BY.target);
if(BY.isDefaultPrevented()){BX.preventDefault()
}}})
}B.each(["bind","one"],function(BU,e){B.fn[e]=function(Ba,Bb,BZ){var BY;
if(typeof Ba==="object"){for(var BX in Ba){this[e](BX,Bb,Ba[BX],BZ)
}return this
}if(arguments.length===2||Bb===false){BZ=Bb;
Bb=l
}if(e==="one"){BY=function(Bc){B(this).unbind(Bc,BY);
return BZ.apply(this,arguments)
};
BY.guid=BZ.guid||B.guid++
}else{BY=BZ
}if(Ba==="unload"&&e!=="one"){this.one(Ba,Bb,BZ)
}else{for(var BW=0,BV=this.length;
BW<BV;
BW++){B.event.add(this[BW],Ba,BY,Bb)
}}return this
}
});
B.fn.extend({unbind:function(BX,BW){if(typeof BX==="object"&&!BX.preventDefault){for(var BV in BX){this.unbind(BV,BX[BV])
}}else{for(var BU=0,e=this.length;
BU<e;
BU++){B.event.remove(this[BU],BX,BW)
}}return this
},delegate:function(e,BU,BW,BV){return this.live(BU,BW,BV,e)
},undelegate:function(e,BU,BV){if(arguments.length===0){return this.unbind("live")
}else{return this.die(BU,null,BV,e)
}},trigger:function(e,BU){return this.each(function(){B.event.trigger(e,BU,this)
})
},triggerHandler:function(e,BU){if(this[0]){return B.event.trigger(e,BU,this[0],true)
}},toggle:function(BW){var BU=arguments,e=BW.guid||B.guid++,BV=0,BX=function(BY){var BZ=(B.data(this,"lastToggle"+BW.guid)||0)%BV;
B.data(this,"lastToggle"+BW.guid,BZ+1);
BY.preventDefault();
return BU[BZ].apply(this,arguments)||false
};
BX.guid=e;
while(BV<BU.length){BU[BV++].guid=e
}return this.click(BX)
},hover:function(e,BU){return this.mouseenter(e).mouseleave(BU||e)
}});
var Aq={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};
B.each(["live","die"],function(BU,e){B.fn[e]=function(Be,Bb,Bg,BX){var Bf,Bc=0,Bd,BW,Bi,BZ=BX||this.selector,BV=BX?this:B(this.context);
if(typeof Be==="object"&&!Be.preventDefault){for(var Bh in Be){BV[e](Bh,Bb,Be[Bh],BZ)
}return this
}if(e==="die"&&!Be&&BX&&BX.charAt(0)==="."){BV.unbind(BX);
return this
}if(Bb===false||B.isFunction(Bb)){Bg=Bb||BJ;
Bb=l
}Be=(Be||"").split(" ");
while((Bf=Be[Bc++])!=null){Bd=Ay.exec(Bf);
BW="";
if(Bd){BW=Bd[0];
Bf=Bf.replace(Ay,"")
}if(Bf==="hover"){Be.push("mouseenter"+BW,"mouseleave"+BW);
continue
}Bi=Bf;
if(Aq[Bf]){Be.push(Aq[Bf]+BW);
Bf=Bf+BW
}else{Bf=(Aq[Bf]||Bf)+BW
}if(e==="live"){for(var Ba=0,BY=BV.length;
Ba<BY;
Ba++){B.event.add(BV[Ba],"live."+P(Bf,BZ),{data:Bb,selector:BZ,handler:Bg,origType:Bf,origHandler:Bg,preType:Bi})
}}else{BV.unbind("live."+P(Bf,BZ),Bg)
}}return this
}
});
function AJ(Be){var Bb,BW,Bk,BY,e,Bg,Bd,Bf,Bc,Bj,Ba,BZ,Bi,Bh=[],BX=[],BU=B._data(this,"events");
if(Be.liveFired===this||!BU||!BU.live||Be.target.disabled||Be.button&&Be.type==="click"){return 
}if(Be.namespace){BZ=new RegExp("(^|\\.)"+Be.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")
}Be.liveFired=this;
var BV=BU.live.slice(0);
for(Bd=0;
Bd<BV.length;
Bd++){e=BV[Bd];
if(e.origType.replace(Ay,"")===Be.type){BX.push(e.selector)
}else{BV.splice(Bd--,1)
}}BY=B(Be.target).closest(BX,Be.currentTarget);
for(Bf=0,Bc=BY.length;
Bf<Bc;
Bf++){Ba=BY[Bf];
for(Bd=0;
Bd<BV.length;
Bd++){e=BV[Bd];
if(Ba.selector===e.selector&&(!BZ||BZ.test(e.namespace))&&!Ba.elem.disabled){Bg=Ba.elem;
Bk=null;
if(e.preType==="mouseenter"||e.preType==="mouseleave"){Be.type=e.preType;
Bk=B(Be.relatedTarget).closest(e.selector)[0];
if(Bk&&B.contains(Bg,Bk)){Bk=Bg
}}if(!Bk||Bk!==Bg){Bh.push({elem:Bg,handleObj:e,level:Ba.level})
}}}}for(Bf=0,Bc=Bh.length;
Bf<Bc;
Bf++){BY=Bh[Bf];
if(BW&&BY.level>BW){break
}Be.currentTarget=BY.elem;
Be.data=BY.handleObj.data;
Be.handleObj=BY.handleObj;
Bi=BY.handleObj.origHandler.apply(BY.elem,arguments);
if(Bi===false||Be.isPropagationStopped()){BW=BY.level;
if(Bi===false){Bb=false
}if(Be.isImmediatePropagationStopped()){break
}}}return Bb
}function P(BU,e){return(BU&&BU!=="*"?BU+".":"")+e.replace(o,"`").replace(BH,"&")
}B.each(("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error").split(" "),function(BU,e){B.fn[e]=function(BW,BV){if(BV==null){BV=BW;
BW=null
}return arguments.length>0?this.bind(e,BW,BV):this.trigger(e)
};
if(B.attrFn){B.attrFn[e]=true
}});
(function(){var Be=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,Bf=0,Bi=Object.prototype.toString,BZ=false,BY=true,Bg=/\\/g,Bm=/\W/;
[0,0].sort(function(){BY=false;
return 0
});
var BW=function(Br,e,Bu,Bv){Bu=Bu||[];
e=e||AR;
var Bx=e;
if(e.nodeType!==1&&e.nodeType!==9){return[]
}if(!Br||typeof Br!=="string"){return Bu
}var Bo,Bz,B2,Bn,By,B1,B0,Bt,Bq=true,Bp=BW.isXML(e),Bs=[],Bw=Br;
do{Be.exec("");
Bo=Be.exec(Bw);
if(Bo){Bw=Bo[3];
Bs.push(Bo[1]);
if(Bo[2]){Bn=Bo[3];
break
}}}while(Bo);
if(Bs.length>1&&Ba.exec(Br)){if(Bs.length===2&&Bb.relative[Bs[0]]){Bz=Bj(Bs[0]+Bs[1],e)
}else{Bz=Bb.relative[Bs[0]]?[e]:BW(Bs.shift(),e);
while(Bs.length){Br=Bs.shift();
if(Bb.relative[Br]){Br+=Bs.shift()
}Bz=Bj(Br,Bz)
}}}else{if(!Bv&&Bs.length>1&&e.nodeType===9&&!Bp&&Bb.match.ID.test(Bs[0])&&!Bb.match.ID.test(Bs[Bs.length-1])){By=BW.find(Bs.shift(),e,Bp);
e=By.expr?BW.filter(By.expr,By.set)[0]:By.set[0]
}if(e){By=Bv?{expr:Bs.pop(),set:Bc(Bv)}:BW.find(Bs.pop(),Bs.length===1&&(Bs[0]==="~"||Bs[0]==="+")&&e.parentNode?e.parentNode:e,Bp);
Bz=By.expr?BW.filter(By.expr,By.set):By.set;
if(Bs.length>0){B2=Bc(Bz)
}else{Bq=false
}while(Bs.length){B1=Bs.pop();
B0=B1;
if(!Bb.relative[B1]){B1=""
}else{B0=Bs.pop()
}if(B0==null){B0=e
}Bb.relative[B1](B2,B0,Bp)
}}else{B2=Bs=[]
}}if(!B2){B2=Bz
}if(!B2){BW.error(B1||Br)
}if(Bi.call(B2)==="[object Array]"){if(!Bq){Bu.push.apply(Bu,B2)
}else{if(e&&e.nodeType===1){for(Bt=0;
B2[Bt]!=null;
Bt++){if(B2[Bt]&&(B2[Bt]===true||B2[Bt].nodeType===1&&BW.contains(e,B2[Bt]))){Bu.push(Bz[Bt])
}}}else{for(Bt=0;
B2[Bt]!=null;
Bt++){if(B2[Bt]&&B2[Bt].nodeType===1){Bu.push(Bz[Bt])
}}}}}else{Bc(B2,Bu)
}if(Bn){BW(Bn,Bx,Bu,Bv);
BW.uniqueSort(Bu)
}return Bu
};
BW.uniqueSort=function(Bn){if(Bh){BZ=BY;
Bn.sort(Bh);
if(BZ){for(var e=1;
e<Bn.length;
e++){if(Bn[e]===Bn[e-1]){Bn.splice(e--,1)
}}}}return Bn
};
BW.matches=function(e,Bn){return BW(e,null,null,Bn)
};
BW.matchesSelector=function(e,Bn){return BW(Bn,null,null,[e]).length>0
};
BW.find=function(Bt,e,Bu){var Bs;
if(!Bt){return[]
}for(var Bp=0,Bo=Bb.order.length;
Bp<Bo;
Bp++){var Bq,Br=Bb.order[Bp];
if((Bq=Bb.leftMatch[Br].exec(Bt))){var Bn=Bq[1];
Bq.splice(1,1);
if(Bn.substr(Bn.length-1)!=="\\"){Bq[1]=(Bq[1]||"").replace(Bg,"");
Bs=Bb.find[Br](Bq,e,Bu);
if(Bs!=null){Bt=Bt.replace(Bb.match[Br],"");
break
}}}}if(!Bs){Bs=typeof e.getElementsByTagName!=="undefined"?e.getElementsByTagName("*"):[]
}return{set:Bs,expr:Bt}
};
BW.filter=function(Bx,Bw,B0,Bq){var Bs,e,Bo=Bx,B2=[],Bu=Bw,Bt=Bw&&Bw[0]&&BW.isXML(Bw[0]);
while(Bx&&Bw.length){for(var Bv in Bb.filter){if((Bs=Bb.leftMatch[Bv].exec(Bx))!=null&&Bs[2]){var B1,Bz,Bn=Bb.filter[Bv],Bp=Bs[1];
e=false;
Bs.splice(1,1);
if(Bp.substr(Bp.length-1)==="\\"){continue
}if(Bu===B2){B2=[]
}if(Bb.preFilter[Bv]){Bs=Bb.preFilter[Bv](Bs,Bu,B0,B2,Bq,Bt);
if(!Bs){e=B1=true
}else{if(Bs===true){continue
}}}if(Bs){for(var Br=0;
(Bz=Bu[Br])!=null;
Br++){if(Bz){B1=Bn(Bz,Bs,Br,Bu);
var By=Bq^!!B1;
if(B0&&B1!=null){if(By){e=true
}else{Bu[Br]=false
}}else{if(By){B2.push(Bz);
e=true
}}}}}if(B1!==l){if(!B0){Bu=B2
}Bx=Bx.replace(Bb.match[Bv],"");
if(!e){return[]
}break
}}}if(Bx===Bo){if(e==null){BW.error(Bx)
}else{break
}}Bo=Bx
}return Bu
};
BW.error=function(e){throw"Syntax error, unrecognized expression: "+e
};
var Bb=BW.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|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(e){return e.getAttribute("href")
},type:function(e){return e.getAttribute("type")
}},relative:{"+":function(Bs,Bn){var Bp=typeof Bn==="string",Br=Bp&&!Bm.test(Bn),Bt=Bp&&!Br;
if(Br){Bn=Bn.toLowerCase()
}for(var Bo=0,e=Bs.length,Bq;
Bo<e;
Bo++){if((Bq=Bs[Bo])){while((Bq=Bq.previousSibling)&&Bq.nodeType!==1){}Bs[Bo]=Bt||Bq&&Bq.nodeName.toLowerCase()===Bn?Bq||false:Bq===Bn
}}if(Bt){BW.filter(Bn,Bs,true)
}},">":function(Bs,Bn){var Br,Bq=typeof Bn==="string",Bo=0,e=Bs.length;
if(Bq&&!Bm.test(Bn)){Bn=Bn.toLowerCase();
for(;
Bo<e;
Bo++){Br=Bs[Bo];
if(Br){var Bp=Br.parentNode;
Bs[Bo]=Bp.nodeName.toLowerCase()===Bn?Bp:false
}}}else{for(;
Bo<e;
Bo++){Br=Bs[Bo];
if(Br){Bs[Bo]=Bq?Br.parentNode:Br.parentNode===Bn
}}if(Bq){BW.filter(Bn,Bs,true)
}}},"":function(Bp,Bn,Br){var Bq,Bo=Bf++,e=Bk;
if(typeof Bn==="string"&&!Bm.test(Bn)){Bn=Bn.toLowerCase();
Bq=Bn;
e=BU
}e("parentNode",Bn,Bo,Bp,Bq,Br)
},"~":function(Bp,Bn,Br){var Bq,Bo=Bf++,e=Bk;
if(typeof Bn==="string"&&!Bm.test(Bn)){Bn=Bn.toLowerCase();
Bq=Bn;
e=BU
}e("previousSibling",Bn,Bo,Bp,Bq,Br)
}},find:{ID:function(Bn,Bo,Bp){if(typeof Bo.getElementById!=="undefined"&&!Bp){var e=Bo.getElementById(Bn[1]);
return e&&e.parentNode?[e]:[]
}},NAME:function(Bo,Br){if(typeof Br.getElementsByName!=="undefined"){var Bn=[],Bq=Br.getElementsByName(Bo[1]);
for(var Bp=0,e=Bq.length;
Bp<e;
Bp++){if(Bq[Bp].getAttribute("name")===Bo[1]){Bn.push(Bq[Bp])
}}return Bn.length===0?null:Bn
}},TAG:function(e,Bn){if(typeof Bn.getElementsByTagName!=="undefined"){return Bn.getElementsByTagName(e[1])
}}},preFilter:{CLASS:function(Bp,Bn,Bo,e,Bs,Bt){Bp=" "+Bp[1].replace(Bg,"")+" ";
if(Bt){return Bp
}for(var Bq=0,Br;
(Br=Bn[Bq])!=null;
Bq++){if(Br){if(Bs^(Br.className&&(" "+Br.className+" ").replace(/[\t\n\r]/g," ").indexOf(Bp)>=0)){if(!Bo){e.push(Br)
}}else{if(Bo){Bn[Bq]=false
}}}}return false
},ID:function(e){return e[1].replace(Bg,"")
},TAG:function(Bn,e){return Bn[1].replace(Bg,"").toLowerCase()
},CHILD:function(e){if(e[1]==="nth"){if(!e[2]){BW.error(e[0])
}e[2]=e[2].replace(/^\+|\s*/g,"");
var Bn=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);
e[2]=(Bn[1]+(Bn[2]||1))-0;
e[3]=Bn[3]-0
}else{if(e[2]){BW.error(e[0])
}}e[0]=Bf++;
return e
},ATTR:function(Bq,Bn,Bo,e,Br,Bs){var Bp=Bq[1]=Bq[1].replace(Bg,"");
if(!Bs&&Bb.attrMap[Bp]){Bq[1]=Bb.attrMap[Bp]
}Bq[4]=(Bq[4]||Bq[5]||"").replace(Bg,"");
if(Bq[2]==="~="){Bq[4]=" "+Bq[4]+" "
}return Bq
},PSEUDO:function(Bq,Bn,Bo,e,Br){if(Bq[1]==="not"){if((Be.exec(Bq[3])||"").length>1||/^\w/.test(Bq[3])){Bq[3]=BW(Bq[3],null,null,Bn)
}else{var Bp=BW.filter(Bq[3],Bn,Bo,true^Br);
if(!Bo){e.push.apply(e,Bp)
}return false
}}else{if(Bb.match.POS.test(Bq[0])||Bb.match.CHILD.test(Bq[0])){return true
}}return Bq
},POS:function(e){e.unshift(true);
return e
}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"
},disabled:function(e){return e.disabled===true
},checked:function(e){return e.checked===true
},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex
}return e.selected===true
},parent:function(e){return !!e.firstChild
},empty:function(e){return !e.firstChild
},has:function(Bo,Bn,e){return !!BW(e[3],Bo).length
},header:function(e){return(/h\d/i).test(e.nodeName)
},text:function(Bo){var e=Bo.getAttribute("type"),Bn=Bo.type;
return Bo.nodeName.toLowerCase()==="input"&&"text"===Bn&&(e===Bn||e===null)
},radio:function(e){return e.nodeName.toLowerCase()==="input"&&"radio"===e.type
},checkbox:function(e){return e.nodeName.toLowerCase()==="input"&&"checkbox"===e.type
},file:function(e){return e.nodeName.toLowerCase()==="input"&&"file"===e.type
},password:function(e){return e.nodeName.toLowerCase()==="input"&&"password"===e.type
},submit:function(Bn){var e=Bn.nodeName.toLowerCase();
return(e==="input"||e==="button")&&"submit"===Bn.type
},image:function(e){return e.nodeName.toLowerCase()==="input"&&"image"===e.type
},reset:function(Bn){var e=Bn.nodeName.toLowerCase();
return(e==="input"||e==="button")&&"reset"===Bn.type
},button:function(Bn){var e=Bn.nodeName.toLowerCase();
return e==="input"&&"button"===Bn.type||e==="button"
},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName)
},focus:function(e){return e===e.ownerDocument.activeElement
}},setFilters:{first:function(Bn,e){return e===0
},last:function(Bo,Bn,e,Bp){return Bn===Bp.length-1
},even:function(Bn,e){return e%2===0
},odd:function(Bn,e){return e%2===1
},lt:function(Bo,Bn,e){return Bn<e[3]-0
},gt:function(Bo,Bn,e){return Bn>e[3]-0
},nth:function(Bo,Bn,e){return e[3]-0===Bn
},eq:function(Bo,Bn,e){return e[3]-0===Bn
}},filter:{PSEUDO:function(Bo,Bt,Bs,Bu){var e=Bt[1],Bn=Bb.filters[e];
if(Bn){return Bn(Bo,Bs,Bt,Bu)
}else{if(e==="contains"){return(Bo.textContent||Bo.innerText||BW.getText([Bo])||"").indexOf(Bt[3])>=0
}else{if(e==="not"){var Bp=Bt[3];
for(var Br=0,Bq=Bp.length;
Br<Bq;
Br++){if(Bp[Br]===Bo){return false
}}return true
}else{BW.error(e)
}}}},CHILD:function(e,Bp){var Bs=Bp[1],Bn=e;
switch(Bs){case"only":case"first":while((Bn=Bn.previousSibling)){if(Bn.nodeType===1){return false
}}if(Bs==="first"){return true
}Bn=e;
case"last":while((Bn=Bn.nextSibling)){if(Bn.nodeType===1){return false
}}return true;
case"nth":var Bo=Bp[2],Bv=Bp[3];
if(Bo===1&&Bv===0){return true
}var Br=Bp[0],Bu=e.parentNode;
if(Bu&&(Bu.sizcache!==Br||!e.nodeIndex)){var Bq=0;
for(Bn=Bu.firstChild;
Bn;
Bn=Bn.nextSibling){if(Bn.nodeType===1){Bn.nodeIndex=++Bq
}}Bu.sizcache=Br
}var Bt=e.nodeIndex-Bv;
if(Bo===0){return Bt===0
}else{return(Bt%Bo===0&&Bt/Bo>=0)
}}},ID:function(Bn,e){return Bn.nodeType===1&&Bn.getAttribute("id")===e
},TAG:function(Bn,e){return(e==="*"&&Bn.nodeType===1)||Bn.nodeName.toLowerCase()===e
},CLASS:function(Bn,e){return(" "+(Bn.className||Bn.getAttribute("class"))+" ").indexOf(e)>-1
},ATTR:function(Br,Bp){var Bo=Bp[1],e=Bb.attrHandle[Bo]?Bb.attrHandle[Bo](Br):Br[Bo]!=null?Br[Bo]:Br.getAttribute(Bo),Bs=e+"",Bq=Bp[2],Bn=Bp[4];
return e==null?Bq==="!=":Bq==="="?Bs===Bn:Bq==="*="?Bs.indexOf(Bn)>=0:Bq==="~="?(" "+Bs+" ").indexOf(Bn)>=0:!Bn?Bs&&e!==false:Bq==="!="?Bs!==Bn:Bq==="^="?Bs.indexOf(Bn)===0:Bq==="$="?Bs.substr(Bs.length-Bn.length)===Bn:Bq==="|="?Bs===Bn||Bs.substr(0,Bn.length+1)===Bn+"-":false
},POS:function(Bq,Bn,Bo,Br){var e=Bn[2],Bp=Bb.setFilters[e];
if(Bp){return Bp(Bq,Bo,Bn,Br)
}}}};
var Ba=Bb.match.POS,BV=function(Bn,e){return"\\"+(e-0+1)
};
for(var BX in Bb.match){Bb.match[BX]=new RegExp(Bb.match[BX].source+(/(?![^\[]*\])(?![^\(]*\))/.source));
Bb.leftMatch[BX]=new RegExp(/(^(?:.|\r|\n)*?)/.source+Bb.match[BX].source.replace(/\\(\d+)/g,BV))
}var Bc=function(Bn,e){Bn=Array.prototype.slice.call(Bn,0);
if(e){e.push.apply(e,Bn);
return e
}return Bn
};
try{Array.prototype.slice.call(AR.documentElement.childNodes,0)[0].nodeType
}catch(Bl){Bc=function(Bq,Bp){var Bo=0,Bn=Bp||[];
if(Bi.call(Bq)==="[object Array]"){Array.prototype.push.apply(Bn,Bq)
}else{if(typeof Bq.length==="number"){for(var e=Bq.length;
Bo<e;
Bo++){Bn.push(Bq[Bo])
}}else{for(;
Bq[Bo];
Bo++){Bn.push(Bq[Bo])
}}}return Bn
}
}var Bh,Bd;
if(AR.documentElement.compareDocumentPosition){Bh=function(Bn,e){if(Bn===e){BZ=true;
return 0
}if(!Bn.compareDocumentPosition||!e.compareDocumentPosition){return Bn.compareDocumentPosition?-1:1
}return Bn.compareDocumentPosition(e)&4?-1:1
}
}else{Bh=function(Bu,Bt){if(Bu===Bt){BZ=true;
return 0
}else{if(Bu.sourceIndex&&Bt.sourceIndex){return Bu.sourceIndex-Bt.sourceIndex
}}var Br,Bn,Bo=[],e=[],Bq=Bu.parentNode,Bs=Bt.parentNode,Bv=Bq;
if(Bq===Bs){return Bd(Bu,Bt)
}else{if(!Bq){return -1
}else{if(!Bs){return 1
}}}while(Bv){Bo.unshift(Bv);
Bv=Bv.parentNode
}Bv=Bs;
while(Bv){e.unshift(Bv);
Bv=Bv.parentNode
}Br=Bo.length;
Bn=e.length;
for(var Bp=0;
Bp<Br&&Bp<Bn;
Bp++){if(Bo[Bp]!==e[Bp]){return Bd(Bo[Bp],e[Bp])
}}return Bp===Br?Bd(Bu,e[Bp],-1):Bd(Bo[Bp],Bt,1)
};
Bd=function(Bn,e,Bo){if(Bn===e){return Bo
}var Bp=Bn.nextSibling;
while(Bp){if(Bp===e){return -1
}Bp=Bp.nextSibling
}return 1
}
}BW.getText=function(e){var Bn="",Bp;
for(var Bo=0;
e[Bo];
Bo++){Bp=e[Bo];
if(Bp.nodeType===3||Bp.nodeType===4){Bn+=Bp.nodeValue
}else{if(Bp.nodeType!==8){Bn+=BW.getText(Bp.childNodes)
}}}return Bn
};
(function(){var Bn=AR.createElement("div"),Bo="script"+(new Date()).getTime(),e=AR.documentElement;
Bn.innerHTML="<a name='"+Bo+"'/>";
e.insertBefore(Bn,e.firstChild);
if(AR.getElementById(Bo)){Bb.find.ID=function(Bq,Br,Bs){if(typeof Br.getElementById!=="undefined"&&!Bs){var Bp=Br.getElementById(Bq[1]);
return Bp?Bp.id===Bq[1]||typeof Bp.getAttributeNode!=="undefined"&&Bp.getAttributeNode("id").nodeValue===Bq[1]?[Bp]:l:[]
}};
Bb.filter.ID=function(Br,Bp){var Bq=typeof Br.getAttributeNode!=="undefined"&&Br.getAttributeNode("id");
return Br.nodeType===1&&Bq&&Bq.nodeValue===Bp
}
}e.removeChild(Bn);
e=Bn=null
})();
(function(){var e=AR.createElement("div");
e.appendChild(AR.createComment(""));
if(e.getElementsByTagName("*").length>0){Bb.find.TAG=function(Bn,Br){var Bq=Br.getElementsByTagName(Bn[1]);
if(Bn[1]==="*"){var Bp=[];
for(var Bo=0;
Bq[Bo];
Bo++){if(Bq[Bo].nodeType===1){Bp.push(Bq[Bo])
}}Bq=Bp
}return Bq
}
}e.innerHTML="<a href='#'></a>";
if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){Bb.attrHandle.href=function(Bn){return Bn.getAttribute("href",2)
}
}e=null
})();
if(AR.querySelectorAll){(function(){var e=BW,Bp=AR.createElement("div"),Bo="__sizzle__";
Bp.innerHTML="<p class='TEST'></p>";
if(Bp.querySelectorAll&&Bp.querySelectorAll(".TEST").length===0){return 
}BW=function(B0,Br,Bv,Bz){Br=Br||AR;
if(!Bz&&!BW.isXML(Br)){var By=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(B0);
if(By&&(Br.nodeType===1||Br.nodeType===9)){if(By[1]){return Bc(Br.getElementsByTagName(B0),Bv)
}else{if(By[2]&&Bb.find.CLASS&&Br.getElementsByClassName){return Bc(Br.getElementsByClassName(By[2]),Bv)
}}}if(Br.nodeType===9){if(B0==="body"&&Br.body){return Bc([Br.body],Bv)
}else{if(By&&By[3]){var Bu=Br.getElementById(By[3]);
if(Bu&&Bu.parentNode){if(Bu.id===By[3]){return Bc([Bu],Bv)
}}else{return Bc([],Bv)
}}}try{return Bc(Br.querySelectorAll(B0),Bv)
}catch(Bw){}}else{if(Br.nodeType===1&&Br.nodeName.toLowerCase()!=="object"){var Bs=Br,Bt=Br.getAttribute("id"),Bq=Bt||Bo,B2=Br.parentNode,B1=/^\s*[+~]/.test(B0);
if(!Bt){Br.setAttribute("id",Bq)
}else{Bq=Bq.replace(/'/g,"\\$&")
}if(B1&&B2){Br=Br.parentNode
}try{if(!B1||B2){return Bc(Br.querySelectorAll("[id='"+Bq+"'] "+B0),Bv)
}}catch(Bx){}finally{if(!Bt){Bs.removeAttribute("id")
}}}}}return e(B0,Br,Bv,Bz)
};
for(var Bn in e){BW[Bn]=e[Bn]
}Bp=null
})()
}(function(){var e=AR.documentElement,Bo=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;
if(Bo){var Bq=!Bo.call(AR.createElement("div"),"div"),Bn=false;
try{Bo.call(AR.documentElement,"[test!='']:sizzle")
}catch(Bp){Bn=true
}BW.matchesSelector=function(Bs,Bu){Bu=Bu.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");
if(!BW.isXML(Bs)){try{if(Bn||!Bb.match.PSEUDO.test(Bu)&&!/!=/.test(Bu)){var Br=Bo.call(Bs,Bu);
if(Br||!Bq||Bs.document&&Bs.document.nodeType!==11){return Br
}}}catch(Bt){}}return BW(Bu,null,null,[Bs]).length>0
}
}})();
(function(){var e=AR.createElement("div");
e.innerHTML="<div class='test e'></div><div class='test'></div>";
if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return 
}e.lastChild.className="e";
if(e.getElementsByClassName("e").length===1){return 
}Bb.order.splice(1,0,"CLASS");
Bb.find.CLASS=function(Bn,Bo,Bp){if(typeof Bo.getElementsByClassName!=="undefined"&&!Bp){return Bo.getElementsByClassName(Bn[1])
}};
e=null
})();
function BU(Bn,Bs,Br,Bv,Bt,Bu){for(var Bp=0,Bo=Bv.length;
Bp<Bo;
Bp++){var e=Bv[Bp];
if(e){var Bq=false;
e=e[Bn];
while(e){if(e.sizcache===Br){Bq=Bv[e.sizset];
break
}if(e.nodeType===1&&!Bu){e.sizcache=Br;
e.sizset=Bp
}if(e.nodeName.toLowerCase()===Bs){Bq=e;
break
}e=e[Bn]
}Bv[Bp]=Bq
}}}function Bk(Bn,Bs,Br,Bv,Bt,Bu){for(var Bp=0,Bo=Bv.length;
Bp<Bo;
Bp++){var e=Bv[Bp];
if(e){var Bq=false;
e=e[Bn];
while(e){if(e.sizcache===Br){Bq=Bv[e.sizset];
break
}if(e.nodeType===1){if(!Bu){e.sizcache=Br;
e.sizset=Bp
}if(typeof Bs!=="string"){if(e===Bs){Bq=true;
break
}}else{if(BW.filter(Bs,[e]).length>0){Bq=e;
break
}}}e=e[Bn]
}Bv[Bp]=Bq
}}}if(AR.documentElement.contains){BW.contains=function(Bn,e){return Bn!==e&&(Bn.contains?Bn.contains(e):true)
}
}else{if(AR.documentElement.compareDocumentPosition){BW.contains=function(Bn,e){return !!(Bn.compareDocumentPosition(e)&16)
}
}else{BW.contains=function(){return false
}
}}BW.isXML=function(e){var Bn=(e?e.ownerDocument||e:0).documentElement;
return Bn?Bn.nodeName!=="HTML":false
};
var Bj=function(e,Bt){var Br,Bp=[],Bq="",Bo=Bt.nodeType?[Bt]:Bt;
while((Br=Bb.match.PSEUDO.exec(e))){Bq+=Br[0];
e=e.replace(Bb.match.PSEUDO,"")
}e=Bb.relative[e]?e+"*":e;
for(var Bs=0,Bn=Bo.length;
Bs<Bn;
Bs++){BW(e,Bo[Bs],Bp)
}return BW.filter(Bq,Bp)
};
B.find=BW;
B.expr=BW.selectors;
B.expr[":"]=B.expr.filters;
B.unique=BW.uniqueSort;
B.text=BW.getText;
B.isXMLDoc=BW.isXML;
B.contains=BW.contains
})();
var z=/Until$/,AN=/^(?:parents|prevUntil|prevAll)/,A9=/,/,BP=/^.[^:#\[\.,]*$/,q=Array.prototype.slice,i=B.expr.match.POS,AU={children:true,contents:true,next:true,prev:true};
B.fn.extend({find:function(e){var BV=this,BX,BU;
if(typeof e!=="string"){return B(e).filter(function(){for(BX=0,BU=BV.length;
BX<BU;
BX++){if(B.contains(BV[BX],this)){return true
}}})
}var BW=this.pushStack("","find",e),BZ,Ba,BY;
for(BX=0,BU=this.length;
BX<BU;
BX++){BZ=BW.length;
B.find(e,this[BX],BW);
if(BX>0){for(Ba=BZ;
Ba<BW.length;
Ba++){for(BY=0;
BY<BZ;
BY++){if(BW[BY]===BW[Ba]){BW.splice(Ba--,1);
break
}}}}}return BW
},has:function(BU){var e=B(BU);
return this.filter(function(){for(var BW=0,BV=e.length;
BW<BV;
BW++){if(B.contains(this,e[BW])){return true
}}})
},not:function(e){return this.pushStack(Ab(this,e,false),"not",e)
},filter:function(e){return this.pushStack(Ab(this,e,true),"filter",e)
},is:function(e){return !!e&&(typeof e==="string"?B.filter(e,this).length>0:this.filter(e).length>0)
},closest:function(Bd,BU){var Ba=[],BX,BV,Bc=this[0];
if(B.isArray(Bd)){var BZ,BW,BY={},e=1;
if(Bc&&Bd.length){for(BX=0,BV=Bd.length;
BX<BV;
BX++){BW=Bd[BX];
if(!BY[BW]){BY[BW]=i.test(BW)?B(BW,BU||this.context):BW
}}while(Bc&&Bc.ownerDocument&&Bc!==BU){for(BW in BY){BZ=BY[BW];
if(BZ.jquery?BZ.index(Bc)>-1:B(Bc).is(BZ)){Ba.push({selector:BW,elem:Bc,level:e})
}}Bc=Bc.parentNode;
e++
}}return Ba
}var Bb=i.test(Bd)||typeof Bd!=="string"?B(Bd,BU||this.context):0;
for(BX=0,BV=this.length;
BX<BV;
BX++){Bc=this[BX];
while(Bc){if(Bb?Bb.index(Bc)>-1:B.find.matchesSelector(Bc,Bd)){Ba.push(Bc);
break
}else{Bc=Bc.parentNode;
if(!Bc||!Bc.ownerDocument||Bc===BU||Bc.nodeType===11){break
}}}}Ba=Ba.length>1?B.unique(Ba):Ba;
return this.pushStack(Ba,"closest",Bd)
},index:function(e){if(!e||typeof e==="string"){return B.inArray(this[0],e?B(e):this.parent().children())
}return B.inArray(e.jquery?e[0]:e,this)
},add:function(e,BU){var BW=typeof e==="string"?B(e,BU):B.makeArray(e&&e.nodeType?[e]:e),BV=B.merge(this.get(),BW);
return this.pushStack(c(BW[0])||c(BV[0])?BV:B.unique(BV))
},andSelf:function(){return this.add(this.prevObject)
}});
function c(e){return !e||!e.parentNode||e.parentNode.nodeType===11
}B.each({parent:function(BU){var e=BU.parentNode;
return e&&e.nodeType!==11?e:null
},parents:function(e){return B.dir(e,"parentNode")
},parentsUntil:function(BU,e,BV){return B.dir(BU,"parentNode",BV)
},next:function(e){return B.nth(e,2,"nextSibling")
},prev:function(e){return B.nth(e,2,"previousSibling")
},nextAll:function(e){return B.dir(e,"nextSibling")
},prevAll:function(e){return B.dir(e,"previousSibling")
},nextUntil:function(BU,e,BV){return B.dir(BU,"nextSibling",BV)
},prevUntil:function(BU,e,BV){return B.dir(BU,"previousSibling",BV)
},siblings:function(e){return B.sibling(e.parentNode.firstChild,e)
},children:function(e){return B.sibling(e.firstChild)
},contents:function(e){return B.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:B.makeArray(e.childNodes)
}},function(e,BU){B.fn[e]=function(BY,BV){var BX=B.map(this,BU,BY),BW=q.call(arguments);
if(!z.test(e)){BV=BY
}if(BV&&typeof BV==="string"){BX=B.filter(BV,BX)
}BX=this.length>1&&!AU[e]?B.unique(BX):BX;
if((this.length>1||A9.test(BV))&&AN.test(e)){BX=BX.reverse()
}return this.pushStack(BX,e,BW.join(","))
}
});
B.extend({filter:function(BV,e,BU){if(BU){BV=":not("+BV+")"
}return e.length===1?B.find.matchesSelector(e[0],BV)?[e[0]]:[]:B.find.matches(BV,e)
},dir:function(BV,BU,BX){var e=[],BW=BV[BU];
while(BW&&BW.nodeType!==9&&(BX===l||BW.nodeType!==1||!B(BW).is(BX))){if(BW.nodeType===1){e.push(BW)
}BW=BW[BU]
}return e
},nth:function(BX,e,BV,BW){e=e||1;
var BU=0;
for(;
BX;
BX=BX[BV]){if(BX.nodeType===1&&++BU===e){break
}}return BX
},sibling:function(BV,BU){var e=[];
for(;
BV;
BV=BV.nextSibling){if(BV.nodeType===1&&BV!==BU){e.push(BV)
}}return e
}});
function Ab(BW,BV,e){BV=BV||0;
if(B.isFunction(BV)){return B.grep(BW,function(BY,BX){var BZ=!!BV.call(BY,BX,BY);
return BZ===e
})
}else{if(BV.nodeType){return B.grep(BW,function(BY,BX){return(BY===BV)===e
})
}else{if(typeof BV==="string"){var BU=B.grep(BW,function(BX){return BX.nodeType===1
});
if(BP.test(BV)){return B.filter(BV,BU,!e)
}else{BV=B.filter(BV,BU)
}}}}return B.grep(BW,function(BY,BX){return(B.inArray(BY,BV)>=0)===e
})
}var AE=/ jQuery\d+="(?:\d+|null)"/g,AO=/^\s+/,t=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,D=/<([\w:]+)/,W=/<tbody/i,w=/<|&#?\w+;/,p=/<(?:script|object|embed|option|style)/i,N=/checked\s*(?:[^=]|=\s*.checked.)/i,BL=/\/(java|ecma)script/i,Ak=/^\s*<!(?:\[CDATA\[|\-\-)/,AT={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};
AT.optgroup=AT.option;
AT.tbody=AT.tfoot=AT.colgroup=AT.caption=AT.thead;
AT.th=AT.td;
if(!B.support.htmlSerialize){AT._default=[1,"div<div>","</div>"]
}B.fn.extend({text:function(e){if(B.isFunction(e)){return this.each(function(BV){var BU=B(this);
BU.text(e.call(this,BV,BU.text()))
})
}if(typeof e!=="object"&&e!==l){return this.empty().append((this[0]&&this[0].ownerDocument||AR).createTextNode(e))
}return B.text(this)
},wrapAll:function(e){if(B.isFunction(e)){return this.each(function(BV){B(this).wrapAll(e.call(this,BV))
})
}if(this[0]){var BU=B(e,this[0].ownerDocument).eq(0).clone(true);
if(this[0].parentNode){BU.insertBefore(this[0])
}BU.map(function(){var BV=this;
while(BV.firstChild&&BV.firstChild.nodeType===1){BV=BV.firstChild
}return BV
}).append(this)
}return this
},wrapInner:function(e){if(B.isFunction(e)){return this.each(function(BU){B(this).wrapInner(e.call(this,BU))
})
}return this.each(function(){var BU=B(this),BV=BU.contents();
if(BV.length){BV.wrapAll(e)
}else{BU.append(e)
}})
},wrap:function(e){return this.each(function(){B(this).wrapAll(e)
})
},unwrap:function(){return this.parent().each(function(){if(!B.nodeName(this,"body")){B(this).replaceWith(this.childNodes)
}}).end()
},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(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(BU){this.parentNode.insertBefore(BU,this)
})
}else{if(arguments.length){var e=B(arguments[0]);
e.push.apply(e,this.toArray());
return this.pushStack(e,"before",arguments)
}}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(BU){this.parentNode.insertBefore(BU,this.nextSibling)
})
}else{if(arguments.length){var e=this.pushStack(this,"after",arguments);
e.push.apply(e,B(arguments[0]).toArray());
return e
}}},remove:function(e,BW){for(var BU=0,BV;
(BV=this[BU])!=null;
BU++){if(!e||B.filter(e,[BV]).length){if(!BW&&BV.nodeType===1){B.cleanData(BV.getElementsByTagName("*"));
B.cleanData([BV])
}if(BV.parentNode){BV.parentNode.removeChild(BV)
}}}return this
},empty:function(){for(var e=0,BU;
(BU=this[e])!=null;
e++){if(BU.nodeType===1){B.cleanData(BU.getElementsByTagName("*"))
}while(BU.firstChild){BU.removeChild(BU.firstChild)
}}return this
},clone:function(BU,e){BU=BU==null?false:BU;
e=e==null?BU:e;
return this.map(function(){return B.clone(this,BU,e)
})
},html:function(BW){if(BW===l){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(AE,""):null
}else{if(typeof BW==="string"&&!p.test(BW)&&(B.support.leadingWhitespace||!AO.test(BW))&&!AT[(D.exec(BW)||["",""])[1].toLowerCase()]){BW=BW.replace(t,"<$1></$2>");
try{for(var BV=0,BU=this.length;
BV<BU;
BV++){if(this[BV].nodeType===1){B.cleanData(this[BV].getElementsByTagName("*"));
this[BV].innerHTML=BW
}}}catch(BX){this.empty().append(BW)
}}else{if(B.isFunction(BW)){this.each(function(BY){var e=B(this);
e.html(BW.call(this,BY,e.html()))
})
}else{this.empty().append(BW)
}}}return this
},replaceWith:function(e){if(this[0]&&this[0].parentNode){if(B.isFunction(e)){return this.each(function(BW){var BV=B(this),BU=BV.html();
BV.replaceWith(e.call(this,BW,BU))
})
}if(typeof e!=="string"){e=B(e).detach()
}return this.each(function(){var BV=this.nextSibling,BU=this.parentNode;
B(this).remove();
if(BV){B(BV).before(e)
}else{B(BU).append(e)
}})
}else{return this.length?this.pushStack(B(B.isFunction(e)?e():e),"replaceWith",e):this
}},detach:function(e){return this.remove(e,true)
},domManip:function(Ba,Be,Bd){var BW,BX,BZ,Bc,Bb=Ba[0],BU=[];
if(!B.support.checkClone&&arguments.length===3&&typeof Bb==="string"&&N.test(Bb)){return this.each(function(){B(this).domManip(Ba,Be,Bd,true)
})
}if(B.isFunction(Bb)){return this.each(function(Bg){var Bf=B(this);
Ba[0]=Bb.call(this,Bg,Be?Bf.html():l);
Bf.domManip(Ba,Be,Bd)
})
}if(this[0]){Bc=Bb&&Bb.parentNode;
if(B.support.parentNode&&Bc&&Bc.nodeType===11&&Bc.childNodes.length===this.length){BW={fragment:Bc}
}else{BW=B.buildFragment(Ba,this,BU)
}BZ=BW.fragment;
if(BZ.childNodes.length===1){BX=BZ=BZ.firstChild
}else{BX=BZ.firstChild
}if(BX){Be=Be&&B.nodeName(BX,"tr");
for(var BV=0,e=this.length,BY=e-1;
BV<e;
BV++){Bd.call(Be?BA(this[BV],BX):this[BV],BW.cacheable||(e>1&&BV<BY)?B.clone(BZ,true,true):BZ)
}}if(BU.length){B.each(BU,BO)
}}return this
}});
function BA(e,BU){return B.nodeName(e,"table")?(e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody"))):e
}function T(e,Ba){if(Ba.nodeType!==1||!B.hasData(e)){return 
}var BZ=B.expando,BW=B.data(e),BX=B.data(Ba,BW);
if((BW=BW[BZ])){var Bb=BW.events;
BX=BX[BZ]=B.extend({},BW);
if(Bb){delete BX.handle;
BX.events={};
for(var BY in Bb){for(var BV=0,BU=Bb[BY].length;
BV<BU;
BV++){B.event.add(Ba,BY+(Bb[BY][BV].namespace?".":"")+Bb[BY][BV].namespace,Bb[BY][BV],Bb[BY][BV].data)
}}}}}function AF(BU,e){var BV;
if(e.nodeType!==1){return 
}if(e.clearAttributes){e.clearAttributes()
}if(e.mergeAttributes){e.mergeAttributes(BU)
}BV=e.nodeName.toLowerCase();
if(BV==="object"){e.outerHTML=BU.outerHTML
}else{if(BV==="input"&&(BU.type==="checkbox"||BU.type==="radio")){if(BU.checked){e.defaultChecked=e.checked=BU.checked
}if(e.value!==BU.value){e.value=BU.value
}}else{if(BV==="option"){e.selected=BU.defaultSelected
}else{if(BV==="input"||BV==="textarea"){e.defaultValue=BU.defaultValue
}}}}e.removeAttribute(B.expando)
}B.buildFragment=function(BY,BW,BU){var BX,e,BV,BZ=(BW&&BW[0]?BW[0].ownerDocument||BW[0]:AR);
if(BY.length===1&&typeof BY[0]==="string"&&BY[0].length<512&&BZ===AR&&BY[0].charAt(0)==="<"&&!p.test(BY[0])&&(B.support.checkClone||!N.test(BY[0]))){e=true;
BV=B.fragments[BY[0]];
if(BV&&BV!==1){BX=BV
}}if(!BX){BX=BZ.createDocumentFragment();
B.clean(BY,BZ,BX,BU)
}if(e){B.fragments[BY[0]]=BV?BX:1
}return{fragment:BX,cacheable:e}
};
B.fragments={};
B.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,BU){B.fn[e]=function(BV){var BY=[],Bb=B(BV),Ba=this.length===1&&this[0].parentNode;
if(Ba&&Ba.nodeType===11&&Ba.childNodes.length===1&&Bb.length===1){Bb[BU](this[0]);
return this
}else{for(var BZ=0,BW=Bb.length;
BZ<BW;
BZ++){var BX=(BZ>0?this.clone(true):this).get();
B(Bb[BZ])[BU](BX);
BY=BY.concat(BX)
}return this.pushStack(BY,e,Bb.selector)
}}
});
function BE(e){if("getElementsByTagName" in e){return e.getElementsByTagName("*")
}else{if("querySelectorAll" in e){return e.querySelectorAll("*")
}else{return[]
}}}function AV(e){if(e.type==="checkbox"||e.type==="radio"){e.defaultChecked=e.checked
}}function f(e){if(B.nodeName(e,"input")){AV(e)
}else{if(e.getElementsByTagName){B.grep(e.getElementsByTagName("input"),AV)
}}}B.extend({clone:function(BX,BZ,BV){var BY=BX.cloneNode(true),e,BU,BW;
if((!B.support.noCloneEvent||!B.support.noCloneChecked)&&(BX.nodeType===1||BX.nodeType===11)&&!B.isXMLDoc(BX)){AF(BX,BY);
e=BE(BX);
BU=BE(BY);
for(BW=0;
e[BW];
++BW){AF(e[BW],BU[BW])
}}if(BZ){T(BX,BY);
if(BV){e=BE(BX);
BU=BE(BY);
for(BW=0;
e[BW];
++BW){T(e[BW],BU[BW])
}}}return BY
},clean:function(BV,BX,Bg,BZ){var Be;
BX=BX||AR;
if(typeof BX.createElement==="undefined"){BX=BX.ownerDocument||BX[0]&&BX[0].ownerDocument||AR
}var Bh=[],Ba;
for(var Bd=0,BY;
(BY=BV[Bd])!=null;
Bd++){if(typeof BY==="number"){BY+=""
}if(!BY){continue
}if(typeof BY==="string"){if(!w.test(BY)){BY=BX.createTextNode(BY)
}else{BY=BY.replace(t,"<$1></$2>");
var Bj=(D.exec(BY)||["",""])[1].toLowerCase(),BW=AT[Bj]||AT._default,Bc=BW[0],BU=BX.createElement("div");
BU.innerHTML=BW[1]+BY+BW[2];
while(Bc--){BU=BU.lastChild
}if(!B.support.tbody){var e=W.test(BY),Bb=Bj==="table"&&!e?BU.firstChild&&BU.firstChild.childNodes:BW[1]==="<table>"&&!e?BU.childNodes:[];
for(Ba=Bb.length-1;
Ba>=0;
--Ba){if(B.nodeName(Bb[Ba],"tbody")&&!Bb[Ba].childNodes.length){Bb[Ba].parentNode.removeChild(Bb[Ba])
}}}if(!B.support.leadingWhitespace&&AO.test(BY)){BU.insertBefore(BX.createTextNode(AO.exec(BY)[0]),BU.firstChild)
}BY=BU.childNodes
}}var Bf;
if(!B.support.appendChecked){if(BY[0]&&typeof (Bf=BY.length)==="number"){for(Ba=0;
Ba<Bf;
Ba++){f(BY[Ba])
}}else{f(BY)
}}if(BY.nodeType){Bh.push(BY)
}else{Bh=B.merge(Bh,BY)
}}if(Bg){Be=function(Bk){return !Bk.type||BL.test(Bk.type)
};
for(Bd=0;
Bh[Bd];
Bd++){if(BZ&&B.nodeName(Bh[Bd],"script")&&(!Bh[Bd].type||Bh[Bd].type.toLowerCase()==="text/javascript")){BZ.push(Bh[Bd].parentNode?Bh[Bd].parentNode.removeChild(Bh[Bd]):Bh[Bd])
}else{if(Bh[Bd].nodeType===1){var Bi=B.grep(Bh[Bd].getElementsByTagName("script"),Be);
Bh.splice.apply(Bh,[Bd+1,0].concat(Bi))
}Bg.appendChild(Bh[Bd])
}}}return Bh
},cleanData:function(BU){var BX,BV,e=B.cache,Bc=B.expando,Ba=B.event.special,BZ=B.support.deleteExpando;
for(var BY=0,BW;
(BW=BU[BY])!=null;
BY++){if(BW.nodeName&&B.noData[BW.nodeName.toLowerCase()]){continue
}BV=BW[B.expando];
if(BV){BX=e[BV]&&e[BV][Bc];
if(BX&&BX.events){for(var Bb in BX.events){if(Ba[Bb]){B.event.remove(BW,Bb)
}else{B.removeEvent(BW,Bb,BX.handle)
}}if(BX.handle){BX.handle.elem=null
}}if(BZ){delete BW[B.expando]
}else{if(BW.removeAttribute){BW.removeAttribute(B.expando)
}}delete e[BV]
}}}});
function BO(e,BU){if(BU.src){B.ajax({url:BU.src,async:false,dataType:"script"})
}else{B.globalEval((BU.text||BU.textContent||BU.innerHTML||"").replace(Ak,"/*$0*/"))
}if(BU.parentNode){BU.parentNode.removeChild(BU)
}}var AI=/alpha\([^)]*\)/i,AQ=/opacity=([^)]*)/,Au=/-([a-z])/ig,Z=/([A-Z]|^ms)/g,BC=/^-?\d+(?:px)?$/i,BN=/^-?\d/,j=/^[+\-]=/,AH=/[^+\-\.\de]+/g,A6={position:"absolute",visibility:"hidden",display:"block"},AK=["Left","Right"],A0=["Top","Bottom"],x,Af,At,M=function(e,BU){return BU.toUpperCase()
};
B.fn.css=function(e,BU){if(arguments.length===2&&BU===l){return this
}return B.access(this,e,BU,true,function(BW,BV,BX){return BX!==l?B.style(BW,BV,BX):B.css(BW,BV)
})
};
B.extend({cssHooks:{opacity:{get:function(BV,BU){if(BU){var e=x(BV,"opacity","opacity");
return e===""?"1":e
}else{return BV.style.opacity
}}}},cssNumber:{"zIndex":true,"fontWeight":true,"opacity":true,"zoom":true,"lineHeight":true,"widows":true,"orphans":true},cssProps:{"float":B.support.cssFloat?"cssFloat":"styleFloat"},style:function(BW,BV,Bc,BX){if(!BW||BW.nodeType===3||BW.nodeType===8||!BW.style){return 
}var Ba,Bb,BY=B.camelCase(BV),BU=BW.style,Bd=B.cssHooks[BY];
BV=B.cssProps[BY]||BY;
if(Bc!==l){Bb=typeof Bc;
if(Bb==="number"&&isNaN(Bc)||Bc==null){return 
}if(Bb==="string"&&j.test(Bc)){Bc=+Bc.replace(AH,"")+parseFloat(B.css(BW,BV))
}if(Bb==="number"&&!B.cssNumber[BY]){Bc+="px"
}if(!Bd||!("set" in Bd)||(Bc=Bd.set(BW,Bc))!==l){try{BU[BV]=Bc
}catch(BZ){}}}else{if(Bd&&"get" in Bd&&(Ba=Bd.get(BW,false,BX))!==l){return Ba
}return BU[BV]
}},css:function(BX,BW,BU){var BV,e;
BW=B.camelCase(BW);
e=B.cssHooks[BW];
BW=B.cssProps[BW]||BW;
if(BW==="cssFloat"){BW="float"
}if(e&&"get" in e&&(BV=e.get(BX,true,BU))!==l){return BV
}else{if(x){return x(BX,BW)
}}},swap:function(BW,BV,BX){var e={};
for(var BU in BV){e[BU]=BW.style[BU];
BW.style[BU]=BV[BU]
}BX.call(BW);
for(BU in BV){BW.style[BU]=e[BU]
}},camelCase:function(e){return e.replace(Au,M)
}});
B.curCSS=B.css;
B.each(["height","width"],function(BU,e){B.cssHooks[e]={get:function(BX,BW,BV){var BY;
if(BW){if(BX.offsetWidth!==0){BY=O(BX,e,BV)
}else{B.swap(BX,A6,function(){BY=O(BX,e,BV)
})
}if(BY<=0){BY=x(BX,e,e);
if(BY==="0px"&&At){BY=At(BX,e,e)
}if(BY!=null){return BY===""||BY==="auto"?"0px":BY
}}if(BY<0||BY==null){BY=BX.style[e];
return BY===""||BY==="auto"?"0px":BY
}return typeof BY==="string"?BY:BY+"px"
}},set:function(BV,BW){if(BC.test(BW)){BW=parseFloat(BW);
if(BW>=0){return BW+"px"
}}else{return BW
}}}
});
if(!B.support.opacity){B.cssHooks.opacity={get:function(BU,e){return AQ.test((e&&BU.currentStyle?BU.currentStyle.filter:BU.style.filter)||"")?(parseFloat(RegExp.$1)/100)+"":e?"1":""
},set:function(BX,BY){var BW=BX.style,BU=BX.currentStyle;
BW.zoom=1;
var e=B.isNaN(BY)?"":"alpha(opacity="+BY*100+")",BV=BU&&BU.filter||BW.filter||"";
BW.filter=AI.test(BV)?BV.replace(AI,e):BV+" "+e
}}
}B(function(){if(!B.support.reliableMarginRight){B.cssHooks.marginRight={get:function(BV,BU){var e;
B.swap(BV,{"display":"inline-block"},function(){if(BU){e=x(BV,"margin-right","marginRight")
}else{e=BV.style.marginRight
}});
return e
}}
}});
if(AR.defaultView&&AR.defaultView.getComputedStyle){Af=function(BX,BV){var BU,BW,e;
BV=BV.replace(Z,"-$1").toLowerCase();
if(!(BW=BX.ownerDocument.defaultView)){return l
}if((e=BW.getComputedStyle(BX,null))){BU=e.getPropertyValue(BV);
if(BU===""&&!B.contains(BX.ownerDocument.documentElement,BX)){BU=B.style(BX,BV)
}}return BU
}
}if(AR.documentElement.currentStyle){At=function(BX,BV){var BY,BU=BX.currentStyle&&BX.currentStyle[BV],e=BX.runtimeStyle&&BX.runtimeStyle[BV],BW=BX.style;
if(!BC.test(BU)&&BN.test(BU)){BY=BW.left;
if(e){BX.runtimeStyle.left=BX.currentStyle.left
}BW.left=BV==="fontSize"?"1em":(BU||0);
BU=BW.pixelLeft+"px";
BW.left=BY;
if(e){BX.runtimeStyle.left=e
}}return BU===""?"auto":BU
}
}x=Af||At;
function O(BV,BU,e){var BX=BU==="width"?AK:A0,BW=BU==="width"?BV.offsetWidth:BV.offsetHeight;
if(e==="border"){return BW
}B.each(BX,function(){if(!e){BW-=parseFloat(B.css(BV,"padding"+this))||0
}if(e==="margin"){BW+=parseFloat(B.css(BV,"margin"+this))||0
}else{BW-=parseFloat(B.css(BV,"border"+this+"Width"))||0
}});
return BW
}if(B.expr&&B.expr.filters){B.expr.filters.hidden=function(BV){var BU=BV.offsetWidth,e=BV.offsetHeight;
return(BU===0&&e===0)||(!B.support.reliableHiddenOffsets&&(BV.style.display||B.css(BV,"display"))==="none")
};
B.expr.filters.visible=function(e){return !B.expr.filters.hidden(e)
}
}var I=/%20/g,AM=/\[\]$/,BS=/\r?\n/g,BQ=/#.*$/,AZ=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,Ax=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,Aj=/^(?:about|app|app\-storage|.+\-extension|file|widget):$/,Am=/^(?:GET|HEAD)$/,C=/^\/\//,m=/\?/,A5=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,Q=/^(?:select|textarea)/i,G=/\s+/,BR=/([?&])_=[^&]*/,k=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,a=B.fn.load,y={},R={},Aa,S;
try{Aa=BK.href
}catch(AS){Aa=AR.createElement("a");
Aa.href="";
Aa=Aa.href
}S=k.exec(Aa.toLowerCase())||[];
function E(e){return function(BX,BZ){if(typeof BX!=="string"){BZ=BX;
BX="*"
}if(B.isFunction(BZ)){var BW=BX.toLowerCase().split(G),BV=0,BY=BW.length,BU,Ba,Bb;
for(;
BV<BY;
BV++){BU=BW[BV];
Bb=/^\+/.test(BU);
if(Bb){BU=BU.substr(1)||"*"
}Ba=e[BU]=e[BU]||[];
Ba[Bb?"unshift":"push"](BZ)
}}}
}function Ar(BU,Bd,BY,Bc,Ba,BW){Ba=Ba||Bd.dataTypes[0];
BW=BW||{};
BW[Ba]=true;
var BZ=BU[Ba],BV=0,e=BZ?BZ.length:0,BX=(BU===y),Bb;
for(;
BV<e&&(BX||!Bb);
BV++){Bb=BZ[BV](Bd,BY,Bc);
if(typeof Bb==="string"){if(!BX||BW[Bb]){Bb=l
}else{Bd.dataTypes.unshift(Bb);
Bb=Ar(BU,Bd,BY,Bc,Bb,BW)
}}}if((BX||!Bb)&&!BW["*"]){Bb=Ar(BU,Bd,BY,Bc,"*",BW)
}return Bb
}B.fn.extend({load:function(BV,BY,BZ){if(typeof BV!=="string"&&a){return a.apply(this,arguments)
}else{if(!this.length){return this
}}var BX=BV.indexOf(" ");
if(BX>=0){var e=BV.slice(BX,BV.length);
BV=BV.slice(0,BX)
}var BW="GET";
if(BY){if(B.isFunction(BY)){BZ=BY;
BY=l
}else{if(typeof BY==="object"){BY=B.param(BY,B.ajaxSettings.traditional);
BW="POST"
}}}var BU=this;
B.ajax({url:BV,type:BW,dataType:"html",data:BY,complete:function(Bb,Ba,Bc){Bc=Bb.responseText;
if(Bb.isResolved()){Bb.done(function(Bd){Bc=Bd
});
BU.html(e?B("<div>").append(Bc.replace(A5,"")).find(e):Bc)
}if(BZ){BU.each(BZ,[Bc,Ba,Bb])
}}});
return this
},serialize:function(){return B.param(this.serializeArray())
},serializeArray:function(){return this.map(function(){return this.elements?B.makeArray(this.elements):this
}).filter(function(){return this.name&&!this.disabled&&(this.checked||Q.test(this.nodeName)||Ax.test(this.type))
}).map(function(e,BU){var BV=B(this).val();
return BV==null?null:B.isArray(BV)?B.map(BV,function(BX,BW){return{name:BU.name,value:BX.replace(BS,"\r\n")}
}):{name:BU.name,value:BV.replace(BS,"\r\n")}
}).get()
}});
B.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,BU){B.fn[BU]=function(BV){return this.bind(BU,BV)
}
});
B.each(["get","post"],function(e,BU){B[BU]=function(BV,BX,BY,BW){if(B.isFunction(BX)){BW=BW||BY;
BY=BX;
BX=l
}return B.ajax({type:BU,url:BV,data:BX,success:BY,dataType:BW})
}
});
B.extend({getScript:function(e,BU){return B.get(e,l,BU,"script")
},getJSON:function(e,BU,BV){return B.get(e,BU,BV,"json")
},ajaxSetup:function(BV,e){if(!e){e=BV;
BV=B.extend(true,B.ajaxSettings,e)
}else{B.extend(true,BV,B.ajaxSettings,e)
}for(var BU in {context:1,url:1}){if(BU in e){BV[BU]=e[BU]
}else{if(BU in B.ajaxSettings){BV[BU]=B.ajaxSettings[BU]
}}}return BV
},ajaxSettings:{url:Aa,isLocal:Aj.test(S[1]),global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":"*/*"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":BB.String,"text html":true,"text json":B.parseJSON,"text xml":B.parseXML}},ajaxPrefilter:E(y),ajaxTransport:E(R),ajax:function(BY,BW){if(typeof BY==="object"){BW=BY;
BY=l
}BW=BW||{};
var Bc=B.ajaxSetup({},BW),Br=Bc.context||Bc,Bf=Br!==Bc&&(Br.nodeType||Br instanceof B)?B(Br):B.event,Bq=B.Deferred(),Bm=B._Deferred(),Ba=Bc.statusCode||{},Bb,Bg={},Bn={},Bp,BX,Bk,Bd,Bh,BZ=0,BV,Bj,Bi={readyState:0,setRequestHeader:function(Bs,Bt){if(!BZ){var e=Bs.toLowerCase();
Bs=Bn[e]=Bn[e]||Bs;
Bg[Bs]=Bt
}return this
},getAllResponseHeaders:function(){return BZ===2?Bp:null
},getResponseHeader:function(Bs){var e;
if(BZ===2){if(!BX){BX={};
while((e=AZ.exec(Bp))){BX[e[1].toLowerCase()]=e[2]
}}e=BX[Bs.toLowerCase()]
}return e===l?null:e
},overrideMimeType:function(e){if(!BZ){Bc.mimeType=e
}return this
},abort:function(e){e=e||"abort";
if(Bk){Bk.abort(e)
}Be(0,e);
return this
}};
function Be(Bx,Bv,By,Bu){if(BZ===2){return 
}BZ=2;
if(Bd){clearTimeout(Bd)
}Bk=l;
Bp=Bu||"";
Bi.readyState=Bx?4:0;
var Bs,B2,B1,Bw=By?BI(Bc,Bi,By):l,Bt,B0;
if(Bx>=200&&Bx<300||Bx===304){if(Bc.ifModified){if((Bt=Bi.getResponseHeader("Last-Modified"))){B.lastModified[Bb]=Bt
}if((B0=Bi.getResponseHeader("Etag"))){B.etag[Bb]=B0
}}if(Bx===304){Bv="notmodified";
Bs=true
}else{try{B2=g(Bc,Bw);
Bv="success";
Bs=true
}catch(Bz){Bv="parsererror";
B1=Bz
}}}else{B1=Bv;
if(!Bv||Bx){Bv="error";
if(Bx<0){Bx=0
}}}Bi.status=Bx;
Bi.statusText=Bv;
if(Bs){Bq.resolveWith(Br,[B2,Bv,Bi])
}else{Bq.rejectWith(Br,[Bi,Bv,B1])
}Bi.statusCode(Ba);
Ba=l;
if(BV){Bf.trigger("ajax"+(Bs?"Success":"Error"),[Bi,Bc,Bs?B2:B1])
}Bm.resolveWith(Br,[Bi,Bv]);
if(BV){Bf.trigger("ajaxComplete",[Bi,Bc]);
if(!(--B.active)){B.event.trigger("ajaxStop")
}}}Bq.promise(Bi);
Bi.success=Bi.done;
Bi.error=Bi.fail;
Bi.complete=Bm.done;
Bi.statusCode=function(Bs){if(Bs){var e;
if(BZ<2){for(e in Bs){Ba[e]=[Ba[e],Bs[e]]
}}else{e=Bs[Bi.status];
Bi.then(e,e)
}}return this
};
Bc.url=((BY||Bc.url)+"").replace(BQ,"").replace(C,S[1]+"//");
Bc.dataTypes=B.trim(Bc.dataType||"*").toLowerCase().split(G);
if(Bc.crossDomain==null){Bh=k.exec(Bc.url.toLowerCase());
Bc.crossDomain=!!(Bh&&(Bh[1]!=S[1]||Bh[2]!=S[2]||(Bh[3]||(Bh[1]==="http:"?80:443))!=(S[3]||(S[1]==="http:"?80:443))))
}if(Bc.data&&Bc.processData&&typeof Bc.data!=="string"){Bc.data=B.param(Bc.data,Bc.traditional)
}Ar(y,Bc,BW,Bi);
if(BZ===2){return false
}BV=Bc.global;
Bc.type=Bc.type.toUpperCase();
Bc.hasContent=!Am.test(Bc.type);
if(BV&&B.active++===0){B.event.trigger("ajaxStart")
}if(!Bc.hasContent){if(Bc.data){Bc.url+=(m.test(Bc.url)?"&":"?")+Bc.data
}Bb=Bc.url;
if(Bc.cache===false){var BU=B.now(),Bo=Bc.url.replace(BR,"$1_="+BU);
Bc.url=Bo+((Bo===Bc.url)?(m.test(Bc.url)?"&":"?")+"_="+BU:"")
}}if(Bc.data&&Bc.hasContent&&Bc.contentType!==false||BW.contentType){Bi.setRequestHeader("Content-Type",Bc.contentType)
}if(Bc.ifModified){Bb=Bb||Bc.url;
if(B.lastModified[Bb]){Bi.setRequestHeader("If-Modified-Since",B.lastModified[Bb])
}if(B.etag[Bb]){Bi.setRequestHeader("If-None-Match",B.etag[Bb])
}}Bi.setRequestHeader("Accept",Bc.dataTypes[0]&&Bc.accepts[Bc.dataTypes[0]]?Bc.accepts[Bc.dataTypes[0]]+(Bc.dataTypes[0]!=="*"?", */*; q=0.01":""):Bc.accepts["*"]);
for(Bj in Bc.headers){Bi.setRequestHeader(Bj,Bc.headers[Bj])
}if(Bc.beforeSend&&(Bc.beforeSend.call(Br,Bi,Bc)===false||BZ===2)){Bi.abort();
return false
}for(Bj in {success:1,error:1,complete:1}){Bi[Bj](Bc[Bj])
}Bk=Ar(R,Bc,BW,Bi);
if(!Bk){Be(-1,"No Transport")
}else{Bi.readyState=1;
if(BV){Bf.trigger("ajaxSend",[Bi,Bc])
}if(Bc.async&&Bc.timeout>0){Bd=setTimeout(function(){Bi.abort("timeout")
},Bc.timeout)
}try{BZ=1;
Bk.send(Bg,Be)
}catch(Bl){if(status<2){Be(-1,Bl)
}else{B.error(Bl)
}}}return Bi
},param:function(e,BV){var BU=[],BX=function(BY,BZ){BZ=B.isFunction(BZ)?BZ():BZ;
BU[BU.length]=encodeURIComponent(BY)+"="+encodeURIComponent(BZ)
};
if(BV===l){BV=B.ajaxSettings.traditional
}if(B.isArray(e)||(e.jquery&&!B.isPlainObject(e))){B.each(e,function(){BX(this.name,this.value)
})
}else{for(var BW in e){V(BW,e[BW],BV,BX)
}}return BU.join("&").replace(I,"+")
}});
function V(BV,BX,BU,BW){if(B.isArray(BX)){B.each(BX,function(BZ,BY){if(BU||AM.test(BV)){BW(BV,BY)
}else{V(BV+"["+(typeof BY==="object"||B.isArray(BY)?BZ:"")+"]",BY,BU,BW)
}})
}else{if(!BU&&BX!=null&&typeof BX==="object"){for(var e in BX){V(BV+"["+e+"]",BX[e],BU,BW)
}}else{BW(BV,BX)
}}}B.extend({active:0,lastModified:{},etag:{}});
function BI(Bc,Bb,BY){var BU=Bc.contents,Ba=Bc.dataTypes,BV=Bc.responseFields,BX,BZ,BW,e;
for(BZ in BV){if(BZ in BY){Bb[BV[BZ]]=BY[BZ]
}}while(Ba[0]==="*"){Ba.shift();
if(BX===l){BX=Bc.mimeType||Bb.getResponseHeader("content-type")
}}if(BX){for(BZ in BU){if(BU[BZ]&&BU[BZ].test(BX)){Ba.unshift(BZ);
break
}}}if(Ba[0] in BY){BW=Ba[0]
}else{for(BZ in BY){if(!Ba[0]||Bc.converters[BZ+" "+Ba[0]]){BW=BZ;
break
}if(!e){e=BZ
}}BW=BW||e
}if(BW){if(BW!==Ba[0]){Ba.unshift(BW)
}return BY[BW]
}}function g(Bg,BY){if(Bg.dataFilter){BY=Bg.dataFilter(BY,Bg.dataType)
}var Bc=Bg.dataTypes,Bf={},BZ,Bd,BV=Bc.length,Ba,Bb=Bc[0],BW,BX,Be,BU,e;
for(BZ=1;
BZ<BV;
BZ++){if(BZ===1){for(Bd in Bg.converters){if(typeof Bd==="string"){Bf[Bd.toLowerCase()]=Bg.converters[Bd]
}}}BW=Bb;
Bb=Bc[BZ];
if(Bb==="*"){Bb=BW
}else{if(BW!=="*"&&BW!==Bb){BX=BW+" "+Bb;
Be=Bf[BX]||Bf["* "+Bb];
if(!Be){e=l;
for(BU in Bf){Ba=BU.split(" ");
if(Ba[0]===BW||Ba[0]==="*"){e=Bf[Ba[1]+" "+Bb];
if(e){BU=Bf[BU];
if(BU===true){Be=e
}else{if(e===true){Be=BU
}}break
}}}}if(!(Be||e)){B.error("No conversion from "+BX.replace(" "," to "))
}if(Be!==true){BY=Be?Be(BY):e(BU(BY))
}}}}return BY
}var AY=B.now(),U=/(\=)\?(&|$)|\?\?/i;
B.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return B.expando+"_"+(AY++)
}});
B.ajaxPrefilter("json jsonp",function(Bc,BZ,Bb){var BW=Bc.contentType==="application/x-www-form-urlencoded"&&(typeof Bc.data==="string");
if(Bc.dataTypes[0]==="jsonp"||Bc.jsonp!==false&&(U.test(Bc.url)||BW&&U.test(Bc.data))){var Ba,BV=Bc.jsonpCallback=B.isFunction(Bc.jsonpCallback)?Bc.jsonpCallback():Bc.jsonpCallback,BY=BB[BV],e=Bc.url,BX=Bc.data,BU="$1"+BV+"$2";
if(Bc.jsonp!==false){e=e.replace(U,BU);
if(Bc.url===e){if(BW){BX=BX.replace(U,BU)
}if(Bc.data===BX){e+=(/\?/.test(e)?"&":"?")+Bc.jsonp+"="+BV
}}}Bc.url=e;
Bc.data=BX;
BB[BV]=function(Bd){Ba=[Bd]
};
Bb.always(function(){BB[BV]=BY;
if(Ba&&B.isFunction(BY)){BB[BV](Ba[0])
}});
Bc.converters["script json"]=function(){if(!Ba){B.error(BV+" was not called")
}return Ba[0]
};
Bc.dataTypes[0]="json";
return"script"
}});
B.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){B.globalEval(e);
return e
}}});
B.ajaxPrefilter("script",function(e){if(e.cache===l){e.cache=false
}if(e.crossDomain){e.type="GET";
e.global=false
}});
B.ajaxTransport("script",function(BV){if(BV.crossDomain){var e,BU=AR.head||AR.getElementsByTagName("head")[0]||AR.documentElement;
return{send:function(BW,BX){e=AR.createElement("script");
e.async="async";
if(BV.scriptCharset){e.charset=BV.scriptCharset
}e.src=BV.url;
e.onload=e.onreadystatechange=function(BZ,BY){if(BY||!e.readyState||/loaded|complete/.test(e.readyState)){e.onload=e.onreadystatechange=null;
if(BU&&e.parentNode){BU.removeChild(e)
}e=l;
if(!BY){BX(200,"success")
}}};
BU.insertBefore(e,BU.firstChild)
},abort:function(){if(e){e.onload(0,1)
}}}
}});
var b=BB.ActiveXObject?function(){for(var e in n){n[e](0,1)
}}:false,Y=0,n;
function Ai(){try{return new BB.XMLHttpRequest()
}catch(BU){}}function AG(){try{return new BB.ActiveXObject("Microsoft.XMLHTTP")
}catch(BU){}}B.ajaxSettings.xhr=BB.ActiveXObject?function(){return !this.isLocal&&Ai()||AG()
}:Ai;
(function(e){B.extend(B.support,{ajax:!!e,cors:!!e&&("withCredentials" in e)})
})(B.ajaxSettings.xhr());
if(B.support.ajax){B.ajaxTransport(function(e){if(!e.crossDomain||B.support.cors){var BU;
return{send:function(Ba,BV){var BZ=e.xhr(),BY,BX;
if(e.username){BZ.open(e.type,e.url,e.async,e.username,e.password)
}else{BZ.open(e.type,e.url,e.async)
}if(e.xhrFields){for(BX in e.xhrFields){BZ[BX]=e.xhrFields[BX]
}}if(e.mimeType&&BZ.overrideMimeType){BZ.overrideMimeType(e.mimeType)
}if(!e.crossDomain&&!Ba["X-Requested-With"]){Ba["X-Requested-With"]="XMLHttpRequest"
}try{for(BX in Ba){BZ.setRequestHeader(BX,Ba[BX])
}}catch(BW){}BZ.send((e.hasContent&&e.data)||null);
BU=function(Bj,Bd){var Be,Bc,Bb,Bh,Bg;
try{if(BU&&(Bd||BZ.readyState===4)){BU=l;
if(BY){BZ.onreadystatechange=B.noop;
if(b){delete n[BY]
}}if(Bd){if(BZ.readyState!==4){BZ.abort()
}}else{Be=BZ.status;
Bb=BZ.getAllResponseHeaders();
Bh={};
Bg=BZ.responseXML;
if(Bg&&Bg.documentElement){Bh.xml=Bg
}Bh.text=BZ.responseText;
try{Bc=BZ.statusText
}catch(Bi){Bc=""
}if(!Be&&e.isLocal&&!e.crossDomain){Be=Bh.text?200:404
}else{if(Be===1223){Be=204
}}}}}catch(Bf){if(!Bd){BV(-1,Bf)
}}if(Bh){BV(Be,Bc,Bh,Bb)
}};
if(!e.async||BZ.readyState===4){BU()
}else{BY=++Y;
if(b){if(!n){n={};
B(BB).unload(b)
}n[BY]=BU
}BZ.onreadystatechange=BU
}},abort:function(){if(BU){BU(0,1)
}}}
}})
}var r={},A8,L,AX=/^(?:toggle|show|hide)$/,Ao=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,A1,Ae=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],A3,s=BB.webkitRequestAnimationFrame||BB.mozRequestAnimationFrame||BB.oRequestAnimationFrame;
B.fn.extend({show:function(BW,BZ,BY){var BV,BX;
if(BW||BW===0){return this.animate(Az("show",3),BW,BZ,BY)
}else{for(var BU=0,e=this.length;
BU<e;
BU++){BV=this[BU];
if(BV.style){BX=BV.style.display;
if(!B._data(BV,"olddisplay")&&BX==="none"){BX=BV.style.display=""
}if(BX===""&&B.css(BV,"display")==="none"){B._data(BV,"olddisplay",X(BV.nodeName))
}}}for(BU=0;
BU<e;
BU++){BV=this[BU];
if(BV.style){BX=BV.style.display;
if(BX===""||BX==="none"){BV.style.display=B._data(BV,"olddisplay")||""
}}}return this
}},hide:function(BV,BY,BX){if(BV||BV===0){return this.animate(Az("hide",3),BV,BY,BX)
}else{for(var BU=0,e=this.length;
BU<e;
BU++){if(this[BU].style){var BW=B.css(this[BU],"display");
if(BW!=="none"&&!B._data(this[BU],"olddisplay")){B._data(this[BU],"olddisplay",BW)
}}}for(BU=0;
BU<e;
BU++){if(this[BU].style){this[BU].style.display="none"
}}return this
}},_toggle:B.fn.toggle,toggle:function(BV,BU,BW){var e=typeof BV==="boolean";
if(B.isFunction(BV)&&B.isFunction(BU)){this._toggle.apply(this,arguments)
}else{if(BV==null||e){this.each(function(){var BX=e?BV:B(this).is(":hidden");
B(this)[BX?"show":"hide"]()
})
}else{this.animate(Az("toggle",3),BV,BU,BW)
}}return this
},fadeTo:function(e,BW,BV,BU){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:BW},e,BV,BU)
},animate:function(BX,BU,BW,BV){var e=B.speed(BU,BW,BV);
if(B.isEmptyObject(BX)){return this.each(e.complete,[false])
}BX=B.extend({},BX);
return this[e.queue===false?"each":"queue"](function(){if(e.queue===false){B._mark(this)
}var Bb=B.extend({},e),Bi=this.nodeType===1,Bf=Bi&&B(this).is(":hidden"),BY,Bc,Ba,Bh,Bg,Be,BZ,Bd,Bj;
Bb.animatedProperties={};
for(Ba in BX){BY=B.camelCase(Ba);
if(Ba!==BY){BX[BY]=BX[Ba];
delete BX[Ba]
}Bc=BX[BY];
if(B.isArray(Bc)){Bb.animatedProperties[BY]=Bc[1];
Bc=BX[BY]=Bc[0]
}else{Bb.animatedProperties[BY]=Bb.specialEasing&&Bb.specialEasing[BY]||Bb.easing||"swing"
}if(Bc==="hide"&&Bf||Bc==="show"&&!Bf){return Bb.complete.call(this)
}if(Bi&&(BY==="height"||BY==="width")){Bb.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];
if(B.css(this,"display")==="inline"&&B.css(this,"float")==="none"){if(!B.support.inlineBlockNeedsLayout){this.style.display="inline-block"
}else{Bh=X(this.nodeName);
if(Bh==="inline"){this.style.display="inline-block"
}else{this.style.display="inline";
this.style.zoom=1
}}}}}if(Bb.overflow!=null){this.style.overflow="hidden"
}for(Ba in BX){Bg=new B.fx(this,Bb,Ba);
Bc=BX[Ba];
if(AX.test(Bc)){Bg[Bc==="toggle"?Bf?"show":"hide":Bc]()
}else{Be=Ao.exec(Bc);
BZ=Bg.cur();
if(Be){Bd=parseFloat(Be[2]);
Bj=Be[3]||(B.cssNumber[Ba]?"":"px");
if(Bj!=="px"){B.style(this,Ba,(Bd||1)+Bj);
BZ=((Bd||1)/Bg.cur())*BZ;
B.style(this,Ba,BZ+Bj)
}if(Be[1]){Bd=((Be[1]==="-="?-1:1)*Bd)+BZ
}Bg.custom(BZ,Bd,Bj)
}else{Bg.custom(BZ,Bc,"")
}}}return true
})
},stop:function(BU,e){if(BU){this.queue([])
}this.each(function(){var BW=B.timers,BV=BW.length;
if(!e){B._unmark(true,this)
}while(BV--){if(BW[BV].elem===this){if(e){BW[BV](true)
}BW.splice(BV,1)
}}});
if(!e){this.dequeue()
}return this
}});
function BF(){setTimeout(AP,0);
return(A3=B.now())
}function AP(){A3=l
}function Az(BU,e){var BV={};
B.each(Ae.concat.apply([],Ae.slice(0,e)),function(){BV[this]=BU
});
return BV
}B.each({slideDown:Az("show",1),slideUp:Az("hide",1),slideToggle:Az("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,BU){B.fn[e]=function(BV,BX,BW){return this.animate(BU,BV,BX,BW)
}
});
B.extend({speed:function(BV,BW,BU){var e=BV&&typeof BV==="object"?B.extend({},BV):{complete:BU||!BU&&BW||B.isFunction(BV)&&BV,duration:BV,easing:BU&&BW||BW&&!B.isFunction(BW)&&BW};
e.duration=B.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in B.fx.speeds?B.fx.speeds[e.duration]:B.fx.speeds._default;
e.old=e.complete;
e.complete=function(BX){if(e.queue!==false){B.dequeue(this)
}else{if(BX!==false){B._unmark(this)
}}if(B.isFunction(e.old)){e.old.call(this)
}};
return e
},easing:{linear:function(BV,BW,e,BU){return e+BU*BV
},swing:function(BV,BW,e,BU){return((-Math.cos(BV*Math.PI)/2)+0.5)*BU+e
}},timers:[],fx:function(BU,e,BV){this.options=e;
this.elem=BU;
this.prop=BV;
e.orig=e.orig||{}
}});
B.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)
}(B.fx.step[this.prop]||B.fx.step._default)(this)
},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]
}var e,BU=B.css(this.elem,this.prop);
return isNaN(e=parseFloat(BU))?!BU||BU==="auto"?0:BU:e
},custom:function(BZ,BY,BW){var e=this,BV=B.fx,BX;
this.startTime=A3||BF();
this.start=BZ;
this.end=BY;
this.unit=BW||this.unit||(B.cssNumber[this.prop]?"":"px");
this.now=this.start;
this.pos=this.state=0;
function BU(Ba){return e.step(Ba)
}BU.elem=this.elem;
if(BU()&&B.timers.push(BU)&&!A1){if(s){A1=1;
BX=function(){if(A1){s(BX);
BV.tick()
}};
s(BX)
}else{A1=setInterval(BV.tick,BV.interval)
}}},show:function(){this.options.orig[this.prop]=B.style(this.elem,this.prop);
this.options.show=true;
this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());
B(this.elem).show()
},hide:function(){this.options.orig[this.prop]=B.style(this.elem,this.prop);
this.options.hide=true;
this.custom(this.cur(),0)
},step:function(BX){var BW=A3||BF(),e=true,BY=this.elem,BU=this.options,BV,Ba;
if(BX||BW>=BU.duration+this.startTime){this.now=this.end;
this.pos=this.state=1;
this.update();
BU.animatedProperties[this.prop]=true;
for(BV in BU.animatedProperties){if(BU.animatedProperties[BV]!==true){e=false
}}if(e){if(BU.overflow!=null&&!B.support.shrinkWrapBlocks){B.each(["","X","Y"],function(Bb,Bc){BY.style["overflow"+Bc]=BU.overflow[Bb]
})
}if(BU.hide){B(BY).hide()
}if(BU.hide||BU.show){for(var BZ in BU.animatedProperties){B.style(BY,BZ,BU.orig[BZ])
}}BU.complete.call(BY)
}return false
}else{if(BU.duration==Infinity){this.now=BW
}else{Ba=BW-this.startTime;
this.state=Ba/BU.duration;
this.pos=B.easing[BU.animatedProperties[this.prop]](this.state,Ba,0,1,BU.duration);
this.now=this.start+((this.end-this.start)*this.pos)
}this.update()
}return true
}};
B.extend(B.fx,{tick:function(){for(var BU=B.timers,e=0;
e<BU.length;
++e){if(!BU[e]()){BU.splice(e--,1)
}}if(!BU.length){B.fx.stop()
}},interval:13,stop:function(){clearInterval(A1);
A1=null
},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(e){B.style(e.elem,"opacity",e.now)
},_default:function(e){if(e.elem.style&&e.elem.style[e.prop]!=null){e.elem.style[e.prop]=(e.prop==="width"||e.prop==="height"?Math.max(0,e.now):e.now)+e.unit
}else{e.elem[e.prop]=e.now
}}}});
if(B.expr&&B.expr.filters){B.expr.filters.animated=function(e){return B.grep(B.timers,function(BU){return e===BU.elem
}).length
}
}function X(BV){if(!r[BV]){var e=B("<"+BV+">").appendTo("body"),BU=e.css("display");
e.remove();
if(BU==="none"||BU===""){if(!A8){A8=AR.createElement("iframe");
A8.frameBorder=A8.width=A8.height=0
}AR.body.appendChild(A8);
if(!L||!A8.createElement){L=(A8.contentWindow||A8.contentDocument).document;
L.write("<!doctype><html><body></body></html>")
}e=L.createElement(BV);
L.body.appendChild(e);
BU=B.css(e,"display");
AR.body.removeChild(A8)
}r[BV]=BU
}return r[BV]
}var v=/^t(?:able|d|h)$/i,AB=/^(?:body|html)$/i;
if("getBoundingClientRect" in AR.documentElement){B.fn.offset=function(Bh){var BX=this[0],Ba;
if(Bh){return this.each(function(e){B.offset.setOffset(this,Bh,e)
})
}if(!BX||!BX.ownerDocument){return null
}if(BX===BX.ownerDocument.body){return B.offset.bodyOffset(BX)
}try{Ba=BX.getBoundingClientRect()
}catch(Be){}var Bg=BX.ownerDocument,BV=Bg.documentElement;
if(!Ba||!B.contains(BV,BX)){return Ba?{top:Ba.top,left:Ba.left}:{top:0,left:0}
}var Bb=Bg.body,Bc=Ah(Bg),BZ=BV.clientTop||Bb.clientTop||0,Bd=BV.clientLeft||Bb.clientLeft||0,BU=Bc.pageYOffset||B.support.boxModel&&BV.scrollTop||Bb.scrollTop,BY=Bc.pageXOffset||B.support.boxModel&&BV.scrollLeft||Bb.scrollLeft,Bf=Ba.top+BU-BZ,BW=Ba.left+BY-Bd;
return{top:Bf,left:BW}
}
}else{B.fn.offset=function(Bf){var BY=this[0];
if(Bf){return this.each(function(Bg){B.offset.setOffset(this,Bf,Bg)
})
}if(!BY||!BY.ownerDocument){return null
}if(BY===BY.ownerDocument.body){return B.offset.bodyOffset(BY)
}B.offset.initialize();
var Bc,BV=BY.offsetParent,BU=BY,Be=BY.ownerDocument,BW=Be.documentElement,BZ=Be.body,Bb=Be.defaultView,e=Bb?Bb.getComputedStyle(BY,null):BY.currentStyle,Bd=BY.offsetTop,BX=BY.offsetLeft,Ba=e.position==="absolute";
while((BY=BY.parentNode)&&BY!==BZ&&BY!==BW){if(B.offset.supportsFixedPosition&&e.position==="fixed"){break
}Bc=Bb?Bb.getComputedStyle(BY,null):BY.currentStyle;
if((!Ba&&e.position==="static")||e.position==="relative"||BY===BV){Bd-=BY.scrollTop,BX-=BY.scrollLeft;
Ba=e.position==="absolute"
}if(BY===BV){Bd+=BY.offsetTop;
BX+=BY.offsetLeft;
if(B.offset.doesNotAddBorder&&!(B.offset.doesAddBorderForTableAndCells&&v.test(BY.nodeName))){Bd+=parseFloat(Bc.borderTopWidth)||0;
BX+=parseFloat(Bc.borderLeftWidth)||0
}BU=BV;
BV=BY.offsetParent
}if(B.offset.subtractsBorderForOverflowNotVisible&&Bc.overflow!=="visible"){Bd+=parseFloat(Bc.borderTopWidth)||0;
BX+=parseFloat(Bc.borderLeftWidth)||0
}e=Bc
}if(e.position==="relative"||e.position==="static"){Bd+=BZ.offsetTop;
BX+=BZ.offsetLeft
}if(B.offset.supportsFixedPosition&&e.position==="fixed"){Bd+=Math.max(BW.scrollTop,BZ.scrollTop);
BX+=Math.max(BW.scrollLeft,BZ.scrollLeft)
}return{top:Bd,left:BX}
}
}B.offset={initialize:function(){var e=AR.body,BU=AR.createElement("div"),BX,BZ,BY,Ba,BV=parseFloat(B.css(e,"marginTop"))||0,BW="<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>";
B.extend(BU.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});
BU.innerHTML=BW;
e.insertBefore(BU,e.firstChild);
BX=BU.firstChild;
BZ=BX.firstChild;
Ba=BX.nextSibling.firstChild.firstChild;
this.doesNotAddBorder=(BZ.offsetTop!==5);
this.doesAddBorderForTableAndCells=(Ba.offsetTop===5);
BZ.style.position="fixed";
BZ.style.top="20px";
this.supportsFixedPosition=(BZ.offsetTop===20||BZ.offsetTop===15);
BZ.style.position=BZ.style.top="";
BX.style.overflow="hidden";
BX.style.position="relative";
this.subtractsBorderForOverflowNotVisible=(BZ.offsetTop===-5);
this.doesNotIncludeMarginInBodyOffset=(e.offsetTop!==BV);
e.removeChild(BU);
B.offset.initialize=B.noop
},bodyOffset:function(e){var BV=e.offsetTop,BU=e.offsetLeft;
B.offset.initialize();
if(B.offset.doesNotIncludeMarginInBodyOffset){BV+=parseFloat(B.css(e,"marginTop"))||0;
BU+=parseFloat(B.css(e,"marginLeft"))||0
}return{top:BV,left:BU}
},setOffset:function(BW,Bf,BZ){var Ba=B.css(BW,"position");
if(Ba==="static"){BW.style.position="relative"
}var BY=B(BW),BU=BY.offset(),e=B.css(BW,"top"),Bd=B.css(BW,"left"),Be=(Ba==="absolute"||Ba==="fixed")&&B.inArray("auto",[e,Bd])>-1,Bc={},Bb={},BV,BX;
if(Be){Bb=BY.position();
BV=Bb.top;
BX=Bb.left
}else{BV=parseFloat(e)||0;
BX=parseFloat(Bd)||0
}if(B.isFunction(Bf)){Bf=Bf.call(BW,BZ,BU)
}if(Bf.top!=null){Bc.top=(Bf.top-BU.top)+BV
}if(Bf.left!=null){Bc.left=(Bf.left-BU.left)+BX
}if("using" in Bf){Bf.using.call(BW,Bc)
}else{BY.css(Bc)
}}};
B.fn.extend({position:function(){if(!this[0]){return null
}var BV=this[0],BU=this.offsetParent(),BW=this.offset(),e=AB.test(BU[0].nodeName)?{top:0,left:0}:BU.offset();
BW.top-=parseFloat(B.css(BV,"marginTop"))||0;
BW.left-=parseFloat(B.css(BV,"marginLeft"))||0;
e.top+=parseFloat(B.css(BU[0],"borderTopWidth"))||0;
e.left+=parseFloat(B.css(BU[0],"borderLeftWidth"))||0;
return{top:BW.top-e.top,left:BW.left-e.left}
},offsetParent:function(){return this.map(function(){var e=this.offsetParent||AR.body;
while(e&&(!AB.test(e.nodeName)&&B.css(e,"position")==="static")){e=e.offsetParent
}return e
})
}});
B.each(["Left","Top"],function(BU,e){var BV="scroll"+e;
B.fn[BV]=function(BY){var BW,BX;
if(BY===l){BW=this[0];
if(!BW){return null
}BX=Ah(BW);
return BX?("pageXOffset" in BX)?BX[BU?"pageYOffset":"pageXOffset"]:B.support.boxModel&&BX.document.documentElement[BV]||BX.document.body[BV]:BW[BV]
}return this.each(function(){BX=Ah(this);
if(BX){BX.scrollTo(!BU?BY:B(BX).scrollLeft(),BU?BY:B(BX).scrollTop())
}else{this[BV]=BY
}})
}
});
function Ah(e){return B.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:false
}(function(){var BU;
var e=function(BW){var BX=BW.document.compatMode;
if(!BX&&B.browser.safari){if(!BU){var BV=B(BW.document.createElement("div")).attr("style","position:absolute;width:0;height:0;width:1").css("width");
BU=BX=(BV=="1px"?"BackCompat":"CSS1Compat")
}else{BX=BU
}}return BX
};
B.each(["Height","Width"],function(BW,BV){var BX=BV.toLowerCase();
B.fn["inner"+BV]=function(){return this[0]?parseFloat(B.css(this[0],BX,"padding")):null
};
B.fn["outer"+BV]=function(BY){return this[0]?parseFloat(B.css(this[0],BX,BY?"margin":"border")):null
};
B.fn[BX]=function(BZ){var Ba=this[0];
if(!Ba){return BZ==null?null:this
}if(B.isFunction(BZ)){return this.each(function(Be){var Bd=B(this);
Bd[BX](BZ.call(this,Be,Bd[BX]()))
})
}if(B.isWindow(Ba)){var Bb=Ba.document.documentElement["client"+BV];
return e(Ba)==="CSS1Compat"&&Bb||Ba.document.body["client"+BV]||Bb
}else{if(Ba.nodeType===9){return Math.max(Ba.documentElement["client"+BV],Ba.body["scroll"+BV],Ba.documentElement["scroll"+BV],Ba.body["offset"+BV],Ba.documentElement["offset"+BV])
}else{if(BZ===l){var Bc=B.css(Ba,BX),BY=parseFloat(Bc);
return B.isNaN(BY)?Bc:BY
}else{return this.css(BX,typeof BZ==="string"?BZ:BZ+"px")
}}}}
})
}());
BB.jQuery=BB.j$=B
})(window);
if(!window.RichFaces){window.RichFaces={}
}if(!window.RichFaces.Memory){window.RichFaces.Memory={nodeCleaners:{},componentCleaners:{},addCleaner:function(A,B){this.nodeCleaners[A]=B
},addComponentCleaner:function(B,C,A){this.componentCleaners[B]={cleaner:C,checker:A}
},applyCleaners:function(B,C,D){for(var A in this.nodeCleaners){this.nodeCleaners[A](B,C)
}for(var A in this.componentCleaners){if(this.componentCleaners[A].checker(B,C)){D.push(B)
}}},_clean:function(F,E,G){if(F){this.applyCleaners(F,E,G);
var B=F.all;
if(B){var A=0;
var D=B.length;
for(var A=0;
A<D;
A++){this.applyCleaners(B[A],E,G)
}}else{var C=F.firstChild;
while(C){this._clean(C,E,G);
C=C.nextSibling
}}}},_cleanComponentNodes:function(E,D){for(var B=0;
B<E.length;
B++){var C=E[B];
for(var A in this.componentCleaners){this.componentCleaners[A].cleaner(C,D)
}}},clean:function(B,A){var C=[];
this._clean(B,A,C);
this._cleanComponentNodes(C,A);
C=null
}};
window.RichFaces.Memory.addComponentCleaner("richfaces",function(D,E){var B=D.component;
if(B){var C=B["rich:destructor"];
if(C){var A=B[C];
if(A){A.call(B,E)
}}}},function(A,B){return(A.component&&A.component["rich:destructor"])
});
if(window.attachEvent){window.attachEvent("onunload",function(){var A=window.RichFaces.Memory;
A.clean(document);
A.clean(window)
})
}}if(!window.RichFaces){window.RichFaces={}
}if(!window.RichFaces.isJQueryWrapped){var oldJQuery=jQuery;
if(window.RichFaces&&window.RichFaces.Memory){window.RichFaces.Memory.addCleaner("jquery",function(A,B){if(A&&A[oldJQuery.expando]){oldJQuery.event.remove(A);
oldJQuery.removeData(A)
}})
}window.RichFaces.isJQueryWrapped=true
}
if(!window.Richfaces){window.Richfaces={}
}Richfaces.jQuery={};
(function(C,B){var D=/^\s*[^\s]*px\s*$/;
var A=function(E){if(E){if(D.test(E)){try{return parseInt(E.replace(D,""),10)
}catch(F){}}}return NaN
};
C.position=function(P,L){var J=B(L);
var F=J.width();
var S=J.height();
var H=A(J.css("left"));
if(isNaN(H)){H=0;
J.css("left","0px")
}var O=A(J.css("top"));
if(isNaN(O)){O=0;
J.css("top","0px")
}var E=J.offset();
var M=B(window);
var G=M.width();
var Q=M.scrollLeft();
var I=M.height();
var K=M.scrollTop();
var R;
if(P.left+F>Q+G&&P.left+P.width-F>=Q){R=P.left+P.width-F
}else{R=P.left
}var N;
if(P.top+P.height+S>K+I&&P.top-S>=K){N=P.top-S
}else{N=P.top+P.height
}H+=R-E.left;
O+=N-E.top;
J.css("left",(H+"px")).css("top",(O+"px"))
};
C.getPointerRectangle=function(E){var F=B.event.fix(E);
return{width:0,height:0,left:F.pageX,top:F.pageY}
};
C.getElementRectangle=function(E){var F=B(E);
var G=F.offset();
return{width:F.width(),height:F.height(),left:G.left,top:G.top}
}
}(Richfaces.jQuery,jQuery))

var DnD={CODE_ACCEPT:"accept",CODE_DEFAULT:"default",CODE_REJECT:"reject",startDrag:function(A){if(!window.drag){this.init();
window.drag=A;
Event.observe(document,"mousemove",this.mousemove);
Event.observe(document,"mouseup",this.mouseup)
}else{alert("drag in progress")
}},endDrag:function(C){Event.stopObserving(document,"mousemove",this.mousemove);
Event.stopObserving(document,"mouseup",this.mouseup);
var B=window.drag;
if(B){window.drag=null;
var A=B.dropzone;
B.source.endDrag(C,B);
if(A){A.onbeforedrag(C,B);
if(A.accept(B)){A.drop(C,B)
}A.onafterdrag(C)
}}},updateDrag:function(C){var B=window.drag;
if(!B.source.onupdatedrag||(B.source.onupdatedrag(C)!=false)){var A=Richfaces.jQuery.getPointerRectangle(C);
A.left+=5;
A.top+=14;
B.indicator.position(A.left,A.top);
Event.stop(C)
}},initialized:false,init:function(){if(!this.initialized){this.mousemove=this.updateDrag.bindAsEventListener(this);
this.mouseup=this.endDrag.bindAsEventListener(this);
this.initialized=true
}}};
DnD.Drag=Class.create();
DnD.Drag.prototype={initialize:function(C,A,B){this.source=C;
this.indicator=A;
this.type=B;
this.params={}
},dragged:false,dropzone:null,getParameters:function(){var A={};
Object.extend(A,this.params);
return A
}}

A4J_Command=Class.create();
A4J_Command.prototype={initialize:function(B,C,A){this.form=Event.findElement(B,"form");
this.target=A;
this.objectsCreated=new Array();
this.oldValuesOfExistingInputs={};
this.appendParameters(C);
this.processClick();
this.cleanUp()
},processClick:function(){var B=this.form;
var A=B.target;
$A(this.objectsCreated).each(function(C){B.appendChild(C)
});
if(this.target){B.target=this.target
}B.submit();
B.target=A
},appendParameters:function(B){var A=this;
$H(B).each(function(C){A.createOrInitHiddenInput(C.key,C.value)
})
},cleanUp:function(){var A=this.form;
$H(this.oldValuesOfExistingInputs).each(function(B){($(B.key)||A[B.key]).value=B.value
});
$A(this.objectsCreated).each(function(B){A.removeChild(B)
});
delete (this.objectsCreated)
},createOrInitHiddenInput:function(B,C){var A=$(B)||this.form[B];
if(!A){A=document.createElement("input");
A.setAttribute("type","hidden");
A.setAttribute("name",B);
A.setAttribute("id",B);
this.objectsCreated.push(A)
}else{this.oldValuesOfExistingInputs[B]=A.value
}A.value=C
}}

if(!window.A4J){window.A4J={}
}if(!A4J.findForm){function _JSFFormSubmit(I,K,F,J){var C=(typeof K=="string"?document.getElementById(K):K);
if(C){var B=[];
var G=C.target;
if(F){C.target=F
}if(J){for(var D in J){B.push(D);
if(C.elements[D]){C.elements[D].value=J[D]
}else{var H=document.createElement("input");
H.type="hidden";
H.id=D;
H.name=D;
H.value=J[D];
if(D==="javax.faces.portletbridge.STATE_ID"&&C.firstChild){C.insertBefore(H,C.firstChild)
}else{C.appendChild(H)
}}}}var E;
if(C.fireEvent){E=C.fireEvent("onsubmit")
}else{var A=document.createEvent("HTMLEvents");
A.initEvent("submit",true,true);
E=C.dispatchEvent(A)
}if(E){C.submit()
}_clearJSFFormParameters(K,G,B)
}else{alert("Form "+K+" not found in document")
}return false
}function _clearJSFFormParameters(D,G,A){var E=(typeof D=="string"?document.getElementById(D):D);
if(E){if(G){E.target=G
}else{E.target=""
}if(A){for(var C=0;
C<A.length;
C++){var F=E.elements[A[C]];
if(F){var B=F.parentNode;
if(B){B.removeChild(F)
}}}}}}function clearFormHiddenParams(B,C,A){_clearJSFFormParameters(B,C,A)
}A4J.findForm=function(A){var B=A;
do{B=B.parentNode
}while(B&&B.nodeName.toLowerCase()!="form");
if(!B){B={reset:function(){},submit:function(){}}
}return B
};
A4J._formInput=null;
A4J.setupForm=function(C){var B=(typeof C=="string"?window.document.getElementById(C):C);
var A="click";
if(B.addEventListener){B.addEventListener(A,A4J._observer,false)
}else{if(B.attachEvent){B.attachEvent("on"+A,A4J._observer)
}}};
A4J._observer=function(A){var B=A.target||A.srcElement;
if(B&&B.nodeName.toUpperCase()=="INPUT"&&B.type.toUpperCase()=="SUBMIT"){A4J._formInput=B
}else{A4J._formInput=null
}}
}
if(!window.Richfaces){window.Richfaces={}
}Richfaces.setImages=function(B,A){B=$(B);
if(!B){return 
}for(imageSrc in A){if(typeof imageSrc!="function"){B[imageSrc]=new Image();
B[imageSrc].src=A[imageSrc]
}}}

if(!window.Richfaces){window.Richfaces={}
}if(!Richfaces.SmartPosition){Richfaces.SmartPosition={options:$H({"positionX":["right","left","center"],"positionY":["bottom","top"],positionFloat:true}),getBase:function(){return(document.compatMode&&document.compatMode.toLowerCase()=="css1compat"&&!/Netscape|Opera/.test(navigator.userAgent))?document.documentElement:(document.body||null)
},screenOffset:function(G,A){G=$(G);
var B=this.getBase();
var C=/Opera/.test(navigator.userAgent);
var D=0,H=0;
var I="";
var E=G;
do{I+="element: "+E.tagName+", offsetTop = "+E.offsetTop+", offsetLeft = "+E.offsetLeft+"\n";
D+=E.offsetTop||0;
H+=E.offsetLeft||0;
I+="valueT = "+D+", valueL = "+H+"\n";
if(E.offsetParent==B&&Element.getStyle(E,"position")=="absolute"){break
}}while(E=E.offsetParent);
I+="\n\n";
E=G;
do{I+="element: "+E.tagName+", scrollTop = "+E.scrollTop+", scrollLeft = "+E.scrollLeft+"\n";
if(!C||(E.tagName!=undefined&&(E.tagName.toLowerCase()!="tr"&&E!=G&&E!=G.parentNode))){D-=E.scrollTop||0;
H-=E.scrollLeft||0
}I+="valueT = "+D+", valueL = "+H+"\n";
if(E==B){break
}}while(E=E.parentNode);
var F=[H,D];
if(arguments.length>1&&A){alert(I+"\n\noffset = "+F)
}G=$(G);
if(!C&&G.tagName.toLowerCase()=="input"){F[0]+=G.scrollLeft
}return F
},getVSpaces:function(B){var D=this.getBase();
if(this.isElement(B)){var F=this.screenOffset(B);
var C=Element.getDimensions(B);
var E=F[1];
var A=D.clientHeight-F[1]-C.height
}else{var E=B[1]-D.scrollTop;
var A=D.clientHeight-(B[1]-D.scrollTop)
}return{top:E,bottom:A}
},getHSpaces:function(B){var D=this.getBase();
if(this.isElement(B)){var F=this.screenOffset(B);
var C=Element.getDimensions(B);
var E=F[0]+C.width;
var A=D.clientWidth-F[0]
}else{var E=B[0]-D.scrollLeft;
var A=D.clientWidth-(B[0]-D.scrollLeft)
}return{left:E,right:A}
},getPosition:function(D,A,J){var B=this.getBase();
var F=[$(A).offsetWidth,$(A).offsetHeight];
var C=this.getHSpaces(D);
var G=this.getVSpaces(D);
if(this.isElement(D)){var E=this.screenOffset(D);
var I={width:$(D).offsetWidth,height:$(D).offsetHeight};
var H=[E[0],E[1]+I.height]
}else{var H=[D[0],D[1]]
}if(C.right<F[0]&&C.left>=F[0]){if(this.isElement(D)){H[0]=E[0]+I.width-F[0]
}else{H[0]=D[0]-F[0]
}}if(this.isElement(D)){H[0]+=B.scrollLeft
}if(G.bottom<F[1]&&G.top>=F[1]){if(this.isElement(D)){H[1]=E[1]-F[1]
}else{H[1]=H[1]-F[1]
}}if(this.isElement(D)){H[1]+=B.scrollTop
}return H
},getOption:function(A){if(A){return $H(A)
}else{return this.options
}},calcSizes:function(A){if(A.tagName.toLowerCase()=="table"){A.style.width="0px";
A.style.height="0px";
return{width:A.offsetWidth,height:A.offsetHeight}
}},isElement:function(A){return(A.length==undefined)
}}
}
if(!document.observe){throw"prototype.js is required!"
}if(!A4J||!A4J.AJAX||!A4J.AJAX.AddListener){throw"AJAX script is required!"
}if(!window.Richfaces){window.Richfaces={}
}Object.extend(Richfaces,function(){var D=0;
var B={};
var G=false;
var J=null;
var F=function(L,N){if(N instanceof Array){for(var M=0;
M<N.length;
M++){N[M](L)
}}else{N(L)
}};
var H=function(){if(G){Event.stopObserving(document,"mouseover",K,true);
Event.stopObserving(document,"focus",K,true);
Event.stopObserving(document,"focusin",K,true);
G=false;
J=null
}};
var K=function(N){var L=Event.element(N);
while(L){var P=L.id;
if(P){if(!J){J=P
}else{if(J==P){break
}}var M=B[P];
if(M){try{F(L,M)
}catch(O){A();
throw O
}delete B[P];
if(--D==0){H();
break
}}}L=L.parentNode
}};
var C=function(){if(!G){Event.observe(document,"mousemove",K,true);
Event.observe(document,"focus",K,true);
Event.observe(document,"focusin",K,true);
G=true
}};
var A=function(){try{H();
D=0;
B={}
}catch(L){LOG.error("Error occured during cleanup: "+L)
}};
var I=function(){try{for(var M in B){var L=$(M);
if(L){F(L,B[M])
}else{LOG.error("Element with id = "+M+" hasn't been found!")
}}}finally{A()
}};
var E=function(O,P){var N=$(O);
if(N){P(N)
}else{var L=B[O];
if(!L){B[O]=P;
J=null;
D++;
C()
}else{if(L instanceof Array){L.push(P)
}else{var M=new Array();
M.push(L);
M.push(P);
B[O]=M
}}}};
A4J.AJAX.AddListener(I);
document.observe("dom:loaded",I);
return{onAvailable:E}
}())

if(!window.RichFaces){window.RichFaces={}
}RichFaces.MSIE=0;
RichFaces.FF=1;
RichFaces.OPERA=2;
RichFaces.NETSCAPE=3;
RichFaces.SAFARI=4;
RichFaces.KONQ=5;
RichFaces.navigatorType=function(){var A=navigator.userAgent.toLowerCase();
if(A.indexOf("msie")>=0||A.indexOf("explorer")>=0){return RichFaces.MSIE
}if(A.indexOf("firefox")>=0||A.indexOf("iceweasel")>=0){return RichFaces.FF
}if(A.indexOf("opera")>=0){return RichFaces.OPERA
}if(A.indexOf("netscape")>=0){return RichFaces.NETSCAPE
}if(A.indexOf("safari")>=0){return RichFaces.SAFARI
}if(A.indexOf("konqueror")>=0){return RichFaces.KONQ
}return"OTHER"
};
RichFaces.getOperaVersion=function(){var B=navigator.userAgent.toLowerCase();
var A=B.indexOf("opera");
if(A==-1){return 
}return parseFloat(B.substring(A+6))
};
RichFaces.getIEVersion=function(){var C="msie";
var D=navigator.userAgent.toLowerCase();
var A=D.indexOf(C);
if(A!=-1){var E=D.indexOf(";",A);
var B;
if(E!=-1){B=D.substring(A+C.length,E)
}else{B=D.substring(A+C.length)
}return parseFloat(B)
}else{return undefined
}}

DnD.getDnDDefaultParams=function(B){var A=Richfaces.getNSAttribute("defaultdndparams",B);
if(A){var C=A.parseJSON(EventHandlersWalk);
if(C){return C
}}return{}
};
DnD.getDnDMergedParams=function(C,B){var E=DnD.getDnDDefaultParams(C);
var A=Richfaces.getNSAttribute(B,C);
if(A){var D=A.parseJSON(EventHandlersWalk);
if(E){if(D){Object.extend(E,D)
}}else{E=D
}}return E
};
DnD.getDnDDragParams=function(A){return DnD.getDnDMergedParams(A,"dragdndparams")
};
DnD.getDnDDropParams=function(A){return DnD.getDnDMergedParams(A,"dropdndparams")
};
DnD.setDefaultDnDParams=function(B){if(B){if(drag&&drag.source&&drag.source.getDraggableItems&&drag.source.getDraggableItems()>1){var A=drag.source.getDraggableItems();
B["count"]=A;
if(!B["label"]){B["label"]=B["count"]+" "+(B["units"]?B["units"]:"items")
}}}}

DnD.Draggable=function(){};
DnD.ieReleaseCapture=function(){if(document.releaseCapture){document.releaseCapture()
}};
DnD.DragEndListener=Class.create();
DnD.DragEndListener.prototype={initialize:function(A){this.callback=A;
this.onmoveBound=this.onmove.bindAsEventListener(this);
this.onupBound=this.onup.bindAsEventListener(this)
},activate:function(A){Event.observe(document,"mousemove",this.onmoveBound);
Event.observe(document,"mouseup",this.onupBound);
if(A.type=="mousemove"){this.onmoveBound(A)
}this.onSelectStartHandler=document.onselectstart;
this.onDragStartHandler=document.ondragstart;
document.onselectstart=function(){return false
};
document.ondragstart=function(){DnD.ieReleaseCapture();
return false
};
if(document.releaseCapture){Event.observe(document,"mousemove",DnD.ieReleaseCapture)
}},onmove:function(A){if("mousemove"==A.type){if(!this.mouseMoveProvidesButtonChecked){this.mouseMoveProvidesButtonChecked=true;
if(!this.mouseMoveProvidesButton){this.mouseMoveProvidesButton=A.button!=0
}}if(this.mouseMoveProvidesButton&&!Event.isLeftClick(A)&&RichFaces.getIEVersion()!=6){this.endDrag(A)
}}},onup:function(A){this.endDrag(A)
},endDrag:function(A){this.deactivate();
this.callback(A)
},deactivate:function(){Event.stopObserving(document,"mousemove",this.onmoveBound);
Event.stopObserving(document,"mouseup",this.onupBound);
document.onselectstart=this.onSelectStartHandler;
document.ondragstart=this.onDragStartHandler;
if(document.releaseCapture){Event.stopObserving(document,"mousemove",DnD.ieReleaseCapture)
}}};
DnD.Cursor=Class.create();
DnD.Cursor.prototype={initialize:function(A,B){this.element=A;
this.cursor=B;
this.visible=false;
if(this.element.style.cursor&&this.element.style.cursor!=""){this.oldcursor=this.element.style.cursor
}},showCursor:function(){var A=this.element;
this.element.style.cursor=this.cursor;
this.visible=true
},hideCursor:function(){var A=this.element;
A.style.cursor="";
this.visible=false;
if(this.oldcursor){this.element.style.cursor=this.oldcursor
}}};
DnD.Draggable.prototype={getElement:function(){return $(this.id)
},getDraggableOptions:function(){return null
},getDnDDefaultParams:function(){return DnD.getDnDDefaultParams(this.getElement())
},getDnDDragParams:function(){return DnD.getDnDDragParams(this.getElement())
},getContentType:function(){return null
},getIndicator:function(){return null
},getOrCreateDefaultIndicator:function(){var A=$("_rfDefaultDragIndicator");
if(!A){A=document.createElement("div");
A.id="_rfDefaultDragIndicatorLeft";
Element.setStyle(A,{"fontSize":"0px","lineHeight":"0px","zIndex":1000});
document.body.appendChild(A);
A=document.createElement("div");
A.id="_rfDefaultDragIndicatorRight";
Element.setStyle(A,{"fontSize":"0px","lineHeight":"0px","zIndex":1000});
document.body.appendChild(A);
A=document.createElement("div");
A.id="_rfDefaultDragIndicatorBottom";
Element.setStyle(A,{"fontSize":"0px","lineHeight":"0px","zIndex":1000});
document.body.appendChild(A);
A=document.createElement("div");
A.id="_rfDefaultDragIndicator";
Element.setStyle(A,{"fontSize":"0px","lineHeight":"0px","zIndex":1000});
Object.extend(A,DefaultDragIndicator);
document.body.appendChild(A)
}DefaultDragIndicator.changeIndicatorColor(A,"black");
return A
},setIndicator:function(C){var A=this.getIndicator();
if(A){var B=this.getDnDDragParams();
DnD.setDefaultDnDParams(B);
if(this.getDraggableItems&&this.getDraggableItems()>1){A.setContent("default",false,B)
}else{A.setContent("default",true,B)
}}},moveDrag:function(B){var A=Richfaces.jQuery.getPointerRectangle(B);
if(!window.drag&&(Math.abs(this.lastDragX-A.left)+Math.abs(this.lastDragY-A.top))>2){this.updateDrag(B)
}},isDragEnabled:function(){return !!this.getContentType()
},startDrag:function(B){if(this.isDragEnabled()){if(this.grabbingCursor){if(this.grabCursor&&this.grabCursor.visible){this.grabCursor.hideCursor()
}this.grabbingCursor.showCursor()
}if(!this.endDragListener){this.dragTrigger=this.moveDrag.bindAsEventListener(this);
this.endDragListener=new DnD.DragEndListener(function(C){Event.stopObserving(document,"mousemove",this.dragTrigger);
DnD.endDrag(C,window.drag)
}.bind(this))
}this.endDragListener.activate(B);
Event.observe(document,"mousemove",this.dragTrigger);
var A=Richfaces.jQuery.getPointerRectangle(B);
this.lastDragX=A.left;
this.lastDragY=A.top
}},updateDrag:function(G){var E=this.getContentType();
var A=this.getIndicator();
var D=new DnD.Drag(this,A,E);
if(A.id.indexOf("_rfDefaultDragIndicator")!=-1){var H=D.source.getElement();
A.indicatorWidth=Element.getWidth(H);
A.indicatorHeight=Element.getHeight(H);
var F=Richfaces.jQuery.getElementRectangle(H);
var C=Richfaces.jQuery.getPointerRectangle(G);
A.position(F.left,F.top);
A.removalX=C.left-F.left;
A.removalY=C.top-F.top
}DnD.startDrag(D);
DnD.updateDrag(G);
this.ondragstart(G,D);
if(A){A.show()
}var B=this.getDraggableOptions();
if(B&&B.ondragstart){B.ondragstart(G)
}},endDrag:function(E,D){DnD.endDrag(E);
this.lastDragX=undefined;
this.lastDragY=undefined;
if(this.endDragListener){this.endDragListener.deactivate()
}if(D){var A=D.indicator;
if(A){A.hide()
}this.ondragend(E,D)
}var C=this.getCurrentGrabbingCursor();
if(C){if(C.visible){C.hideCursor()
}}var B=this.getDraggableOptions();
if(B&&B.ondragend){B.ondragend(E)
}},attachCursor:function(){this.cursor=new DnD.Cursor()
},ondragstart:function(B,A){},ondragend:function(B,A){},ondragover:function(B){var A=this.getCurrentGrabCursor();
if(!document.body.style.cursor){if(A){if(!A.visible){A.showCursor()
}}}},ondragout:function(B){var A=this.getCurrentGrabCursor();
if(A){if(A.visible){A.hideCursor()
}}},getCurrentGrabbingCursor:function(){var B=window.drag;
var A=this.grabbingCursor;
if(B){A=B.source.grabbingCursor
}return A
},getCurrentGrabCursor:function(){var B=window.drag;
var A=this.grabCursor;
if(B){A=B.source.grabCursor
}return A
},onmouseup:function(C){var B=this.getCurrentGrabbingCursor();
var A=this.grabCursor;
if(B&&B.visible){B.hideCursor()
}if(A){A.showCursor()
}},ondropover:function(C,B){var A=this.getDraggableOptions();
if(A&&A.ondropover){C.drag=B;
A.ondropover(C)
}},ondropout:function(C,B){var A=this.getDraggableOptions();
if(A&&A.ondropout){C.drag=B;
A.ondropout(C)
}},enableDraggableCursors:function(A,B){var C=this.getElement();
if(A){this.dragOutBound=this.ondragout.bindAsEventListener(this);
this.dragOverBound=this.ondragover.bindAsEventListener(this);
this.dragUpBound=this.onmouseup.bindAsEventListener(this);
Event.observe(C,"mouseout",this.dragOutBound);
Event.observe(C,"mouseover",this.dragOverBound);
Event.observe(C,"mouseup",this.dragUpBound);
this.grabCursor=new DnD.Cursor(C,A)
}if(B){this.grabbingCursor=new DnD.Cursor(document.body,B)
}},disableDraggableCursors:function(){var A=this.getElement();
if(this.dragOutBound&&this.dragOverBound){Event.stopObserving(A,"mouseover",this.dragOutBound);
Event.stopObserving(A,"mouseout",this.dragOverBound)
}else{return false
}return true
},isDraggableCursorsEnabled:function(){if(this.isCursorsEnabled){this.isCursorsEnabled=true
}else{this.isCursorsEnabled=false
}return this.isCursorsEnabled
}};
DefaultDragIndicator={setContent:function(A,C,B){},show:function(){if(window.drag&&window.drag.source){var B=window.drag.source.getElement();
Element.setStyle(this,{"width":Element.getWidth(B)+"px","height":"1px"});
Element.show(this);
this.style.position="absolute";
var A=$("_rfDefaultDragIndicatorLeft");
if(A){Element.setStyle(A,{"width":"1px","height":Element.getHeight(B)+"px"});
Element.show(A);
A.style.position="absolute"
}A=$("_rfDefaultDragIndicatorRight");
if(A){Element.setStyle(A,{"width":"1px","height":Element.getHeight(B)+"px"});
Element.show(A);
A.style.position="absolute"
}A=$("_rfDefaultDragIndicatorBottom");
if(A){Element.setStyle(A,{"width":Element.getWidth(B)+"px","height":"1px"});
Element.show(A);
A.style.position="absolute"
}}},hide:function(){Element.hide(this);
this.style.position="";
var A=$("_rfDefaultDragIndicatorLeft");
if(A){Element.hide(A);
A.style.position=""
}A=$("_rfDefaultDragIndicatorRight");
if(A){Element.hide(A);
A.style.position=""
}A=$("_rfDefaultDragIndicatorBottom");
if(A){Element.hide(A);
A.style.position=""
}},position:function(A,C){if(this.removalX&&this.removalY){A-=(this.removalX+5);
C-=(this.removalY+14)
}Element.setStyle(this,{"left":A+"px","top":C+"px"});
var B=$("_rfDefaultDragIndicatorLeft");
if(B){Element.setStyle(B,{"left":A+"px","top":C+"px"})
}A+=this.indicatorWidth;
B=$("_rfDefaultDragIndicatorRight");
if(B){Element.setStyle(B,{"left":A+"px","top":C+"px"})
}A-=this.indicatorWidth;
C+=this.indicatorHeight;
B=$("_rfDefaultDragIndicatorBottom");
if(B){Element.setStyle(B,{"left":A+"px","top":C+"px"})
}},accept:function(){this.changeIndicatorColor(this,"green")
},reject:function(){this.changeIndicatorColor(this,"red")
},leave:function(){this.changeIndicatorColor(this,"black")
},changeIndicatorColor:function(A,B){Element.setStyle(A,{"borderTop":"1px dashed "+B});
var C=$("_rfDefaultDragIndicatorLeft");
if(C){Element.setStyle(C,{"borderLeft":"1px dashed "+B})
}C=$("_rfDefaultDragIndicatorRight");
if(C){Element.setStyle(C,{"borderRight":"1px dashed "+B})
}C=$("_rfDefaultDragIndicatorBottom");
if(C){Element.setStyle(C,{"borderBottom":"1px dashed "+B})
}}}

DnD.Dropzone=function(){};
DnD.Dropzone.DROP_TARGET_ID="dropTargetId";
DnD.Dropzone.prototype={getElement:function(){return $(this.id)
},getDropzoneOptions:function(){return null
},getDnDDefaultParams:function(){return DnD.getDnDDefaultParams(this.getElement())
},getDnDDropParams:function(){return DnD.getDnDDropParams(this.getElement())
},accept:function(A){return DnD.CLIENT_VALIDATION_OFF||this.getAcceptedTypes().indexOf(A.type)>-1
},getAcceptedTypes:function(){return[]
},getTypeMapping:function(){return{}
},getCursorTypeMapping:function(){return{}
},drop:function(B,A){},getIconCodeForType:function(B){var A=this.getTypeMapping();
if(B&&A){return A[B]
}return null
},getCursorForType:function(B){var A=this.getCursorTypeMapping();
if(B&&A){return A[B]
}},dragEnter:function(C){var F=window.drag;
F.dropzone=this;
F.source.ondropover(C,F);
var H=F.indicator;
var B=this.accept(F);
if(B){var I=this.getCursorForType(F.type);
if(I){this.acceptMappingCursor=new DnD.Cursor(this.getElement(),I);
this.acceptMappingCursor.showCursor()
}else{if(this.acceptCursor){this.acceptCursor.showCursor()
}}}else{if(this.rejectCursor){this.rejectCursor.showCursor()
}}if(H){var G=this.getIconCodeForType(F.type);
var D=F.source.getDnDDragParams();
if(D){Object.extend(D,this.getDnDDropParams())
}else{D=this.getDnDDropParams()
}if(D){if(G){D["marker"]=D[G]
}else{D["marker"]=null
}}var E=B?"accept":"reject";
DnD.setDefaultDnDParams(D);
if(F.source.getDraggableItems&&F.source.getDraggableItems()>1){H.setContent(E,false,D)
}else{H.setContent(E,true,D)
}if(B){H.accept()
}else{H.reject()
}}var A=this.getDropzoneOptions();
if(A&&A.ondragenter){A.ondragenter.call(C)
}},dragLeave:function(D){var B=window.drag;
B.dropzone=null;
B.source.ondropout(D,B);
B.source.setIndicator(D);
var A=B.indicator;
if(A){A.leave()
}var C=this.getDropzoneOptions();
if(C&&C.ondragexit){C.ondragexit(D)
}if(this.acceptCursor){if(this.acceptCursor.visible){this.acceptCursor.hideCursor()
}}if(this.rejectCursor){if(this.rejectCursor.visible){this.rejectCursor.hideCursor()
}}if(this.acceptMappingCursor){if(this.acceptMappingCursor.visible){this.acceptMappingCursor.hideCursor()
}}},dragUp:function(B){this.ondropend(B);
if(this.acceptCursor){if(this.acceptCursor.visible){this.acceptCursor.hideCursor()
}}if(this.rejectCursor){if(this.rejectCursor.visible){this.rejectCursor.hideCursor()
}}if(this.acceptMappingCursor){if(this.acceptMappingCursor.visible){this.acceptMappingCursor.hideCursor()
}}var A=this.getDropzoneOptions();
if(A&&A.ondropend){A.ondropend()
}},enableDropzoneCursors:function(B,A){if(B){this.acceptCursor=new DnD.Cursor(this.getElement(),B)
}if(A){this.rejectCursor=new DnD.Cursor(this.getElement(),A)
}},ondropend:function(A){},onafterdrag:function(A){},onbeforedrag:function(B,A){},ondragenter:function(A){},ondragexit:function(A){}}

if(!window.Richfaces){window.Richfaces={}
}Richfaces.SYNTHETIC_EVENT="Richfaces.SYNTHETIC_EVENT";
Richfaces.createEvent=function(F,D,C,E){var G;
if(document.createEventObject){if(C){G=document.createEventObject(C)
}else{G=document.createEventObject()
}}else{var B=C&&C.bubbles||false;
var A=C&&C.cancelable||true;
switch(F){case"abort":case"blur":case"change":case"error":case"focus":case"load":case"reset":case"resize":case"scroll":case"select":case"submit":case"unload":G=document.createEvent("HTMLEvents");
G.initEvent(F,B,A);
break;
case"DOMActivate":case"DOMFocusIn":case"DOMFocusOut":case"keydown":case"keypress":case"keyup":G=document.createEvent("UIEvents");
if(C){G.initUIEvent(F,B,A,C.windowObject,C.detail)
}else{G.initEvent(F,B,A)
}break;
case"click":case"mousedown":case"mousemove":case"mouseout":case"mouseover":case"mouseup":G=document.createEvent("MouseEvents");
if(C){G.initMouseEvent(F,B,A,C.windowObject,C.detail,C.screenX,C.screenY,C.clientX,C.clientY,C.ctrlKey,C.altKey,C.shiftKey,C.metaKey,C.button,C.relatedTarget)
}else{G.initEvent(F,B,A)
}break;
case"DOMAttrModified":case"DOMNodeInserted":case"DOMNodeRemoved":case"DOMCharacterDataModified":case"DOMNodeInsertedIntoDocument":case"DOMNodeRemovedFromDocument":case"DOMSubtreeModified":G=document.createEvent("MutationEvents");
if(C){G.initMutationEvent(F,B,A,C.relatedNode,C.prevValue,C.newValue,C.attrName,C.attrChange)
}else{G.initEvent(F,B,A)
}break;
default:G=document.createEvent("Events");
G.initEvent(F,B,A)
}}if(E){Object.extend(G,E)
}G[Richfaces.SYNTHETIC_EVENT]=true;
return{event:G,fire:function(){if(D.fireEvent){D.fireEvent("on"+F,this.event)
}else{D.dispatchEvent(this.event)
}},destroy:function(){if(E){for(var H in E){this.event[H]=undefined
}}}}
};
Richfaces.eventIsSynthetic=function(A){if(A){return new Boolean(A[Richfaces.SYNTHETIC_EVENT]).valueOf()
}return false
}

if(!window.Richfaces){window.Richfaces={}
}Richfaces.jsFormSubmit=function(F,B,D,E){var C=document.getElementById(B);
if(C){var A=C.target;
var H=new Array();
if(E){for(var G in E){H.push(G)
}}_JSFFormSubmit(F,B,D,E);
_clearJSFFormParameters(B,A,H)
}}

JSNode=function(){};
JSNode.prototype={tag:null,attrs:{},childs:[],value:"",_symbols:{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&apos;","\u00A0":"&nbsp;"},getInnerHTML:function(F){var B=[];
for(var A=0;
A<this.childs.length;
A++){B.push(this.childs[A].getContent(F))
}return B.join("")
},xmlEscape:function(A){var B=A?A.toString():"";
return B.escapeHTML()
}};
E=function(F,A,B){this.tag=F;
if(A){this.attrs=A
}if(B){this.childs=B
}};
E.prototype=new JSNode();
E.prototype.getContent=function(G){var F="<"+this.tag;
var A=this.getInnerHTML(G);
if(A==""){this.isEmpty=true
}else{this.isEmpty=false
}for(var B in this.attrs){if(!this.attrs.hasOwnProperty(B)){continue
}var H=this.attrs[B];
if(typeof H=="function"){H=H.call(this,G)
}if(H){F+=" "+(B=="className"?"class":B)+'="'+this.xmlEscape(H)+'"'
}}F+=">"+A+"</"+this.tag+">";
return F
};
ET=function(A){this.value=A
};
ET.prototype.getContent=function(A){var B=this.value;
if(typeof B=="function"){B=B(A)
}if(B&&B.getContent){B=B.getContent(A)
}if(B){return B
}return""
};
T=function(A){this.value=A
};
T.prototype=new JSNode();
T.prototype.getContent=function(A){var B=this.value;
if(typeof B=="function"){B=B(A)
}if(B){return this.xmlEscape(B)
}return""
};
C=function(A){this.value=A
};
C.prototype.getContent=function(A){return"<!--"+this.value+"-->"
};
D=function(A){this.value=A
};
D.prototype.getContent=function(A){return"<![CDATA["+this.value+"]]>"
}

if(!String.prototype.parseJSON){String.prototype.parseJSON=function(hook){try{if(!/[^,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]/.test(this.replace(/("(\\.|[^"\\])*")|('(\\.|[^'\\])*')/g,""))){var j=eval("("+this+")");
if(typeof hook==="function"){function walk(v){if(v&&typeof v==="object"){for(var i in v){if(v.hasOwnProperty(i)){v[i]=walk(v[i])
}}}return hook(v)
}return walk(j)
}return j
}}catch(e){}throw new SyntaxError("parseJSON")
}
}EventHandlersWalk=function(v){if(v&&typeof v=="object"){var names=new Array();
for(var i in v){if(v.hasOwnProperty(i)){if(i.length>2&&i.substring(0,2)=="on"){names.push(i)
}}}for(var i=0;
i<names.length;
i++){var name=names[i];
var value=v[name];
if(value&&typeof value!="function"){var f=eval("(["+v[name]+"])")[0];
if(typeof f=="function"){v[name]=f
}}}}return v
}

var mediaName="rich-extended-skinning";
var userAgent=navigator.userAgent;
var skipNavigator=window.opera||(userAgent.indexOf("AppleWebKit/")>-1&&userAgent.indexOf("Chrome/")==-1);
if(!skipNavigator){var resetMedia=function(A){var B=A.getAttribute("media");
if(mediaName==B){A.removeAttribute("media")
}};
if(!window._RICH_FACES_SKINNING_ADDED_TO_BODY){var getElementByTagName=function(B,A){var E;
try{E=B.selectNodes('.//*[local-name()="'+A+'"]')
}catch(C){try{E=B.getElementsByTagName(A)
}catch(D){}}return E
};
var f=function(){if(window.RICH_FACES_EXTENDED_SKINNING_ON){var D=getElementByTagName(document,"link");
if(D){var A=D.length;
for(var C=0;
C<A;
C++){var B=D[C];
resetMedia(B)
}}}};
if(window.addEventListener){window.addEventListener("load",f,false)
}else{window.attachEvent("onload",f)
}window._RICH_FACES_SKINNING_ADDED_TO_BODY=true
}if(!window._RICH_FACES_SKINNING_ADDED_TO_AJAX&&typeof A4J!="undefined"&&A4J.AJAX){A4J.AJAX.AddHeadElementTransformer(function(A){if(window.RICH_FACES_EXTENDED_SKINNING_ON){if(A.tagName&&A.tagName.toLowerCase()=="link"){resetMedia(A)
}}});
window._RICH_FACES_SKINNING_ADDED_TO_AJAX=true
}}
jQuery.ui||(function(C){var I=C.fn.remove,D=C.browser.mozilla&&(parseFloat(C.browser.version)<1.9);
C.ui={version:"1.7.1",plugin:{add:function(K,L,N){var M=C.ui[K].prototype;
for(var J in N){M.plugins[J]=M.plugins[J]||[];
M.plugins[J].push([L,N[J]])
}},call:function(J,L,K){var N=J.plugins[L];
if(!N||!J.element[0].parentNode){return 
}for(var M=0;
M<N.length;
M++){if(J.options[N[M][0]]){N[M][1].apply(J.element,K)
}}}},contains:function(K,J){return document.compareDocumentPosition?K.compareDocumentPosition(J)&16:K!==J&&K.contains(J)
},hasScroll:function(M,K){if(C(M).css("overflow")=="hidden"){return false
}var J=(K&&K=="left")?"scrollLeft":"scrollTop",L=false;
if(M[J]>0){return true
}M[J]=1;
L=(M[J]>0);
M[J]=0;
return L
},isOverAxis:function(K,J,L){return(K>J)&&(K<(J+L))
},isOver:function(O,K,N,M,J,L){return C.ui.isOverAxis(O,N,J)&&C.ui.isOverAxis(K,M,L)
},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};
if(D){var F=C.attr,E=C.fn.removeAttr,H="http://www.w3.org/2005/07/aaa",A=/^aria-/,B=/^wairole:/;
C.attr=function(K,J,L){var M=L!==undefined;
return(J=="role"?(M?F.call(this,K,J,"wairole:"+L):(F.apply(this,arguments)||"").replace(B,"")):(A.test(J)?(M?K.setAttributeNS(H,J.replace(A,"aaa:"),L):F.call(this,K,J.replace(A,"aaa:"))):F.apply(this,arguments)))
};
C.fn.removeAttr=function(J){return(A.test(J)?this.each(function(){this.removeAttributeNS(H,J.replace(A,""))
}):E.call(this,J))
}
}C.fn.extend({remove:function(){C("*",this).add(this).each(function(){C(this).triggerHandler("remove")
});
return I.apply(this,arguments)
},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")
},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false
})
},scrollParent:function(){var J;
if((C.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){J=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(C.curCSS(this,"position",1))&&(/(auto|scroll)/).test(C.curCSS(this,"overflow",1)+C.curCSS(this,"overflow-y",1)+C.curCSS(this,"overflow-x",1))
}).eq(0)
}else{J=this.parents().filter(function(){return(/(auto|scroll)/).test(C.curCSS(this,"overflow",1)+C.curCSS(this,"overflow-y",1)+C.curCSS(this,"overflow-x",1))
}).eq(0)
}return(/fixed/).test(this.css("position"))||!J.length?C(document):J
}});
C.extend(C.expr[":"],{data:function(L,K,J){return !!C.data(L,J[3])
},focusable:function(K){var L=K.nodeName.toLowerCase(),J=C.attr(K,"tabindex");
return(/input|select|textarea|button|object/.test(L)?!K.disabled:"a"==L||"area"==L?K.href||!isNaN(J):!isNaN(J))&&!C(K)["area"==L?"parents":"closest"](":hidden").length
},tabbable:function(K){var J=C.attr(K,"tabindex");
return(isNaN(J)||J>=0)&&C(K).is(":focusable")
}});
function G(M,N,O,L){function K(Q){var P=C[M][N][Q]||[];
return(typeof P=="string"?P.split(/,?\s+/):P)
}var J=K("getter");
if(L.length==1&&typeof L[0]=="string"){J=J.concat(K("getterSetter"))
}return(C.inArray(O,J)!=-1)
}C.widget=function(K,J){var L=K.split(".")[0];
K=K.split(".")[1];
C.fn[K]=function(P){var N=(typeof P=="string"),O=Array.prototype.slice.call(arguments,1);
if(N&&P.substring(0,1)=="_"){return this
}if(N&&G(L,K,P,O)){var M=C.data(this[0],K);
return(M?M[P].apply(M,O):undefined)
}return this.each(function(){var Q=C.data(this,K);
(!Q&&!N&&C.data(this,K,new C[L][K](this,P))._init());
(Q&&N&&C.isFunction(Q[P])&&Q[P].apply(Q,O))
})
};
C[L]=C[L]||{};
C[L][K]=function(O,N){var M=this;
this.namespace=L;
this.widgetName=K;
this.widgetEventPrefix=C[L][K].eventPrefix||K;
this.widgetBaseClass=L+"-"+K;
this.options=C.extend({},C.widget.defaults,C[L][K].defaults,C.metadata&&C.metadata.get(O)[K],N);
this.element=C(O).bind("setData."+K,function(Q,P,R){if(Q.target==O){return M._setData(P,R)
}}).bind("getData."+K,function(Q,P){if(Q.target==O){return M._getData(P)
}}).bind("remove",function(){return M.destroy()
})
};
C[L][K].prototype=C.extend({},C.widget.prototype,J);
C[L][K].getterSetter="option"
};
C.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")
},option:function(L,M){var K=L,J=this;
if(typeof L=="string"){if(M===undefined){return this._getData(L)
}K={};
K[L]=M
}C.each(K,function(N,O){J._setData(N,O)
})
},_getData:function(J){return this.options[J]
},_setData:function(J,K){this.options[J]=K;
if(J=="disabled"){this.element[K?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",K)
}},enable:function(){this._setData("disabled",false)
},disable:function(){this._setData("disabled",true)
},_trigger:function(L,M,N){var P=this.options[L],J=(L==this.widgetEventPrefix?L:this.widgetEventPrefix+L);
M=C.Event(M);
M.type=J;
if(M.originalEvent){for(var K=C.event.props.length,O;
K;
){O=C.event.props[--K];
M[O]=M.originalEvent[O]
}}this.element.trigger(M,N);
return !(C.isFunction(P)&&P.call(this.element[0],M,N)===false||M.isDefaultPrevented())
}};
C.widget.defaults={disabled:false};
C.ui.mouse={_mouseInit:function(){var J=this;
this.element.bind("mousedown."+this.widgetName,function(K){return J._mouseDown(K)
}).bind("click."+this.widgetName,function(K){if(J._preventClickEvent){J._preventClickEvent=false;
K.stopImmediatePropagation();
return false
}});
if(C.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");
this.element.attr("unselectable","on")
}this.started=false
},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);
(C.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))
},_mouseDown:function(L){L.originalEvent=L.originalEvent||{};
if(L.originalEvent.mouseHandled){return 
}(this._mouseStarted&&this._mouseUp(L));
this._mouseDownEvent=L;
var K=this,M=(L.which==1),J=(typeof this.options.cancel=="string"?C(L.target).parents().add(L.target).filter(this.options.cancel).length:false);
if(!M||J||!this._mouseCapture(L)){return true
}this.mouseDelayMet=!this.options.delay;
if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){K.mouseDelayMet=true
},this.options.delay)
}if(this._mouseDistanceMet(L)&&this._mouseDelayMet(L)){this._mouseStarted=(this._mouseStart(L)!==false);
if(!this._mouseStarted){L.preventDefault();
return true
}}this._mouseMoveDelegate=function(N){return K._mouseMove(N)
};
this._mouseUpDelegate=function(N){return K._mouseUp(N)
};
C(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);
(C.browser.safari||L.preventDefault());
L.originalEvent.mouseHandled=true;
return true
},_mouseMove:function(J){if(C.browser.msie&&!J.button){return this._mouseUp(J)
}if(this._mouseStarted){this._mouseDrag(J);
return J.preventDefault()
}if(this._mouseDistanceMet(J)&&this._mouseDelayMet(J)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,J)!==false);
(this._mouseStarted?this._mouseDrag(J):this._mouseUp(J))
}return !this._mouseStarted
},_mouseUp:function(J){C(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);
if(this._mouseStarted){this._mouseStarted=false;
this._preventClickEvent=(J.target==this._mouseDownEvent.target);
this._mouseStop(J)
}return false
},_mouseDistanceMet:function(J){return(Math.max(Math.abs(this._mouseDownEvent.pageX-J.pageX),Math.abs(this._mouseDownEvent.pageY-J.pageY))>=this.options.distance)
},_mouseDelayMet:function(J){return this.mouseDelayMet
},_mouseStart:function(J){},_mouseDrag:function(J){},_mouseStop:function(J){},_mouseCapture:function(J){return true
}};
C.ui.mouse.defaults={cancel:null,distance:1,delay:0}
})(jQuery)

if(!window.Richfaces){window.Richfaces={}
}Richfaces.mergeStyles=function(B,C){var A;
for(A in B){if(typeof B[A]=="object"){this.mergeStyles(B[A],C[A])
}else{if(C[A]){C[A]+=" "+B[A]
}else{C[A]=B[A]
}}}return C
};
Richfaces.getComputedStyle=function(D,A){var B=$(D);
if(B.nodeType!=Node.ELEMENT_NODE){return""
}if(B.currentStyle){return B.currentStyle[A]
}if(document.defaultView&&document.defaultView.getComputedStyle){var C=document.defaultView.getComputedStyle(B,null);
if(C){return C.getPropertyValue(A)
}}return""
};
Richfaces.getComputedStyleSize=function(B,A){var C=Richfaces.getComputedStyle(B,A);
if(C){C=C.strip();
C=C.replace(/px$/,"");
return parseFloat(C)
}return 0
};
Richfaces.getWindowSize=function(){var B=0,A=0;
if(typeof (window.innerWidth)=="number"){B=window.innerWidth;
A=window.innerHeight
}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){B=document.documentElement.clientWidth;
A=document.documentElement.clientHeight
}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){B=document.body.clientWidth;
A=document.body.clientHeight
}}}return{"width":B,"height":A}
};
Richfaces.removePX=function(B){var A=B.indexOf("px");
if(A==-1){return B
}return B.substr(0,A)
};
Richfaces.visitTree=function(A,D){var B=A;
if(!B){B=document
}D.call(this,B);
var C=B.firstChild;
while(C){Richfaces.visitTree(C,D);
C=C.nextSibling
}};
Richfaces.getNSAttribute=function(C,E){if(E.getAttributeNS){var A=E.getAttributeNS("http://richfaces.ajax4jsf.org/rich",C);
if(A){return A
}}var B=E.attributes;
var D="rich:"+C;
var A=B[D];
if(A){return A.nodeValue
}return null
};
Richfaces.VARIABLE_NAME_PATTERN=/^\s*[_,A-Z,a-z][\w,_\.]*\s*$/;
Richfaces.getObjectValue=function(D,B){var A=D.split(".");
var C=B[A[0]];
var E=1;
while(C&&E<A.length){C=C[A[E++]]
}return(C?C:"")
};
Richfaces.evalMacro=function(template,object){var _value_="";
if(Richfaces.VARIABLE_NAME_PATTERN.test(template)){if(template.indexOf(".")==-1){_value_=object[template];
if(!_value_){_value_=window[template]
}}else{_value_=Richfaces.getObjectValue(template,object);
if(!_value_){_value_=Richfaces.getObjectValue(template,window)
}}if(_value_&&typeof _value_=="function"){_value_=_value_(object)
}if(!_value_){_value_=""
}}else{try{if(Richfaces.browser.isObjectEval){_value_=object.eval(template)
}else{with(object){_value_=eval(template)
}}if(typeof _value_=="function"){_value_=_value_(object)
}}catch(e){LOG.warn("Exception: "+e.Message+"\n["+template+"]")
}}return _value_
};
Richfaces.evalSimpleMacro=function(B,A){var C=A[B];
if(!C){C=window[B];
if(!C){C=""
}}return C
};
Richfaces.getComponent=function(A,B){var D="richfacesComponent";
var C="richfaces:"+A;
while(B.parentNode){if(B[D]&&B[D]==C){return B.component
}else{B=B.parentNode
}}};
Richfaces.browser={isIE:(!window.opera&&/MSIE/.test(navigator.userAgent)),isIE6:(!window.opera&&/MSIE\s*[6][\d,\.]+;/.test(navigator.userAgent)),isSafari:/Safari/.test(navigator.userAgent),isOpera:!!window.opera,isObjectEval:(Richfaces.eval!=undefined),isFF2:(!window.opera&&/Firefox\s*[\/]2[\.]/.test(navigator.userAgent)),isFF3:(!window.opera&&/Firefox\s*[\/]3[\.]/.test(navigator.userAgent))};
Richfaces.eval=function(template,object){var value="";
try{with(object){value=eval(template)
}}catch(e){LOG.warn("Exception: "+e.message+"\n["+template+"]")
}return value
};
Richfaces.interpolate=function(A,D){for(var C in D){var B=D[C];
var E=new RegExp("\\{"+C+"\\}","g");
A=A.replace(E,B)
}return A
};
if(!Richfaces.position){Richfaces.Position={}
}Richfaces.Position.setElementPosition=function(D,M,H,K,C){var P=Richfaces.Position.getOffsetDimensions(D);
var L=Richfaces.Position.getOffsetDimensions(M);
var F=Richfaces.Position.getWindowViewport();
var N=Position.cumulativeOffset(M);
var B=N[0];
var A=N[1];
var O=/^(top|bottom)-(left|right)$/;
var E;
if(typeof H=="object"){B=H.x;
A=H.y
}else{if(H&&(E=H.toLowerCase().match(O))!=null){if(E[2]=="right"){B+=L.width
}if(E[1]=="bottom"){A+=L.height
}}else{}}if(K&&(E=K.toLowerCase().match(O))!=null){var G=K.toLowerCase().split("-");
if(E[2]=="left"){B-=P.width+C.x
}else{B+=C.x
}if(E[1]=="top"){A-=P.height+C.y
}else{A+=C.y
}}else{var J={square:0};
var I={right:N[0]+L.width,top:N[1]+L.height};
I.left=I.right-P.width;
I.bottom=I.top+P.height;
B=I.left;
A=I.top;
var Q=Richfaces.Position.checkCollision(I,F);
if(Q!=0){if(B>=0&&A>=0&&J.square<Q){J={x:B,y:A,square:Q}
}I={right:N[0]+L.width,bottom:N[1]};
I.left=I.right-P.width;
I.top=I.bottom-P.height;
B=I.left;
A=I.top;
Q=Richfaces.Position.checkCollision(I,F);
if(Q!=0){if(B>=0&&A>=0&&J.square<Q){J={x:B,y:A,square:Q}
}I={left:N[0],top:N[1]+L.height};
I.right=I.left+P.width;
I.bottom=I.top+P.height;
B=I.left;
A=I.top;
Q=Richfaces.Position.checkCollision(I,F);
if(Q!=0){if(B>=0&&A>=0&&J.square<Q){J={x:B,y:A,square:Q}
}I={left:N[0],bottom:N[1]};
I.right=I.left+P.width;
I.top=I.bottom-P.height;
B=I.left;
A=I.top;
Q=Richfaces.Position.checkCollision(I,F);
if(Q!=0){if(B<0||A<0||J.square>Q){B=J.x;
A=J.y
}}}}}}D.style.left=B+"px";
D.style.top=A+"px"
};
Richfaces.Position.getOffsetDimensions=function(C){C=$(C);
var G=$(C).getStyle("display");
if(G!="none"&&G!=null){return{width:C.offsetWidth,height:C.offsetHeight}
}var B=C.style;
var F=B.visibility;
var D=B.position;
var A=B.display;
B.visibility="hidden";
B.position="absolute";
B.display="block";
var H=C.offsetWidth;
var E=C.offsetHeight;
B.display=A;
B.position=D;
B.visibility=F;
return{width:H,height:E}
};
Richfaces.Position.checkCollision=function(A,B,D){if(A.left>=B.left&&A.top>=B.top&&A.right<=B.right&&A.bottom<=B.bottom){return 0
}var C={left:(A.left>B.left?A.left:B.left),top:(A.top>B.top?A.top:B.top),right:(A.right<B.right?A.right:B.right),bottom:(A.bottom<B.bottom?A.bottom:B.bottom)};
return(C.right-C.left)*(C.bottom-C.top)
};
Richfaces.Position.getWindowDimensions=function(){var A=self.innerWidth||document.documentElement.clientWidth||document.body.clientWidth||0;
var B=self.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0;
return{width:A,height:B}
};
Richfaces.Position.getWindowScrollOffset=function(){var B=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;
var A=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;
return{left:B,top:A}
};
Richfaces.Position.getWindowViewport=function(){var B=Richfaces.Position.getWindowDimensions();
var A=Richfaces.Position.getWindowScrollOffset();
return{left:A.left,top:A.top,right:B.width+A.left,bottom:B.height+A.top}
};
Richfaces.firstDescendant=function(A){var B=A.firstChild;
while(B&&B.nodeType!=1){B=B.nextSibling
}return B
};
Richfaces.lastDescendant=function(A){var B=A.lastChild;
while(B&&B.nodeType!=1){B=B.previousSibling
}return B
};
Richfaces.next=function(A){var B=A;
do{B=B.nextSibling
}while(B&&B.nodeType!=1);
return B
};
Richfaces.previous=function(A){var B=A;
do{B=B.previousSibling
}while(B&&B.nodeType!=1);
return B
};
Richfaces.removeNode=function(B){if(B){var A=B.parentNode;
if(A){A.removeChild(B)
}}};
Richfaces.readAttribute=function(C,B){var A=null;
var D=C.getAttributeNode(B);
if(D){A=D.nodeValue
}return A
};
Richfaces.writeAttribute=function(B,A,D){var C=B.getAttributeNode(A);
if(D!==null){if(C){C.nodeValue=D
}else{C=document.createAttribute(A);
C.nodeValue=D;
B.setAttributeNode(C)
}}else{if(C){B.removeAttributeNode(C)
}}};
Richfaces.mergeObjects=function(){var D=arguments[0];
if(D){for(var B=1;
B<arguments.length;
B++){var C=arguments[B];
if(C){for(var A in C){if(!D[A]){D[A]=C[A]
}}}}}};
Richfaces.invokeEvent=function(E,D,C,B){var A;
if(E){D=$(D);
if(D==document&&document.createEvent&&!D.dispatchEvent){D=document.documentElement
}var F;
if(document.createEvent){F=document.createEvent("HTMLEvents");
F.initEvent("dataavailable",true,true)
}else{F=document.createEventObject();
F.eventType="ondataavailable"
}F.eventName=C;
F.rich={component:this};
F.memo=B||{};
try{A=E.call(D,F)
}catch(G){LOG.warn("Exception: "+G.Message+"\n[on"+C+"]")
}}if(A!=false){A=true
}return A
};
Richfaces.setupScrollEventHandlers=function(A,B){var C=[];
A=A.parentNode;
while(A&&A!=window.document.body){if(A.offsetWidth!=A.scrollWidth||A.offsetHeight!=A.scrollHeight){C.push(A);
Event.observe(A,"scroll",B,false)
}A=A.parentNode
}return C
};
Richfaces.removeScrollEventHandlers=function(C,B){if(C){for(var A=0;
A<C.length;
A++){Event.stopObserving(C[A],"scroll",B,false)
}C=null
}}


