/* start swfobject */

/*SWFObject v2.2 
is released under the MIT License
*/
var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y<X;Y++){U[Y]()}}function K(X){if(J){X()}else{U[U.length]=X}}function s(Y){if(typeof O.addEventListener!=D){O.addEventListener("load",Y,false)}else{if(typeof j.addEventListener!=D){j.addEventListener("load",Y,false)}else{if(typeof O.attachEvent!=D){i(O,"onload",Y)}else{if(typeof O.onload=="function"){var X=O.onload;O.onload=function(){X();Y()}}else{O.onload=Y}}}}}function h(){if(T){V()}else{H()}}function V(){var X=j.getElementsByTagName("body")[0];var aa=C(r);aa.setAttribute("type",q);var Z=X.appendChild(aa);if(Z){var Y=0;(function(){if(typeof Z.GetVariable!=D){var ab=Z.GetVariable("$version");if(ab){ab=ab.split(" ")[1].split(",");M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}else{if(Y<10){Y++;setTimeout(arguments.callee,10);return}}X.removeChild(aa);Z=null;H()})()}else{H()}}function H(){var ag=o.length;if(ag>0){for(var af=0;af<ag;af++){var Y=o[af].id;var ab=o[af].callbackFn;var aa={success:false,id:Y};if(M.pv[0]>0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad<ac;ad++){if(X[ad].getAttribute("name").toLowerCase()!="movie"){ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value")}}P(ai,ah,Y,ab)}else{p(ae);if(ab){ab(aa)}}}}}else{w(Y,true);if(ab){var Z=z(Y);if(Z&&typeof Z.SetVariable!=D){aa.success=true;aa.ref=Z}ab(aa)}}}}}function z(aa){var X=null;var Y=c(aa);if(Y&&Y.nodeName=="OBJECT"){if(typeof Y.SetVariable!=D){X=Y}else{var Z=Y.getElementsByTagName(r)[0];if(Z){X=Z}}}return X}function A(){return !a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312)}function P(aa,ab,X,Z){a=true;E=Z||null;B={success:false,id:X};var ae=c(X);if(ae){if(ae.nodeName=="OBJECT"){l=g(ae);Q=null}else{l=ae;Q=X}aa.id=R;if(typeof aa.width==D||(!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)){aa.width="310"}if(typeof aa.height==D||(!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)){aa.height="137"}j.title=j.title.slice(0,47)+" - Flash Player Installation";var ad=M.ie&&M.win?"ActiveX":"PlugIn",ac="MMredirectURL="+O.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;if(typeof ab.flashvars!=D){ab.flashvars+="&"+ac}else{ab.flashvars=ac}if(M.ie&&M.win&&ae.readyState!=4){var Y=C("div");X+="SWFObjectNew";Y.setAttribute("id",X);ae.parentNode.insertBefore(Y,ae);ae.style.display="none";(function(){if(ae.readyState==4){ae.parentNode.removeChild(ae)}else{setTimeout(arguments.callee,10)}})()}u(aa,ab,X)}}function p(Y){if(M.ie&&M.win&&Y.readyState!=4){var X=C("div");Y.parentNode.insertBefore(X,Y);X.parentNode.replaceChild(g(Y),X);Y.style.display="none";(function(){if(Y.readyState==4){Y.parentNode.removeChild(Y)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.replaceChild(g(Y),Y)}}function g(ab){var aa=C("div");if(M.win&&M.ie){aa.innerHTML=ab.innerHTML}else{var Y=ab.getElementsByTagName(r)[0];if(Y){var ad=Y.childNodes;if(ad){var X=ad.length;for(var Z=0;Z<X;Z++){if(!(ad[Z].nodeType==1&&ad[Z].nodeName=="PARAM")&&!(ad[Z].nodeType==8)){aa.appendChild(ad[Z].cloneNode(true))}}}}}return aa}function u(ai,ag,Y){var X,aa=c(Y);if(M.wk&&M.wk<312){return X}if(aa){if(typeof ai.id==D){ai.id=Y}if(M.ie&&M.win){var ah="";for(var ae in ai){if(ai[ae]!=Object.prototype[ae]){if(ae.toLowerCase()=="data"){ag.movie=ai[ae]}else{if(ae.toLowerCase()=="styleclass"){ah+=' class="'+ai[ae]+'"'}else{if(ae.toLowerCase()!="classid"){ah+=" "+ae+'="'+ai[ae]+'"'}}}}}var af="";for(var ad in ag){if(ag[ad]!=Object.prototype[ad]){af+='<param name="'+ad+'" value="'+ag[ad]+'" />'}}aa.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ah+">"+af+"</object>";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab<ac;ab++){I[ab][0].detachEvent(I[ab][1],I[ab][2])}var Z=N.length;for(var aa=0;aa<Z;aa++){y(N[aa])}for(var Y in M){M[Y]=null}M=null;for(var X in swfobject){swfobject[X]=null}swfobject=null})}}();return{registerObject:function(ab,X,aa,Z){if(M.w3&&ab&&X){var Y={};Y.id=ab;Y.swfVersion=X;Y.expressInstall=aa;Y.callbackFn=Z;o[o.length]=Y;w(ab,false)}else{if(Z){Z({success:false,id:ab})}}},getObjectById:function(X){if(M.w3){return z(X)}},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var X={success:false,id:ah};if(M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y){w(ah,false);K(function(){ae+="";ag+="";var aj={};if(af&&typeof af===r){for(var al in af){aj[al]=af[al]}}aj.data=ab;aj.width=ae;aj.height=ag;var am={};if(ad&&typeof ad===r){for(var ak in ad){am[ak]=ad[ak]}}if(Z&&typeof Z===r){for(var ai in Z){if(typeof am.flashvars!=D){am.flashvars+="&"+ai+"="+Z[ai]}else{am.flashvars=ai+"="+Z[ai]}}}if(F(Y)){var an=u(aj,am,ah);if(aj.id==ah){w(ah,true)}X.success=true;X.ref=an}else{if(aa&&A()){aj.data=aa;P(aj,am,ah,ac);return}else{w(ah,true)}}if(ac){ac(X)}})}else{if(ac){ac(X)}}},switchOffAutoHideShow:function(){m=false},ua:M,getFlashPlayerVersion:function(){return{major:M.pv[0],minor:M.pv[1],release:M.pv[2]}},hasFlashPlayerVersion:F,createSWF:function(Z,Y,X){if(M.w3){return u(Z,Y,X)}else{return undefined}},showExpressInstall:function(Z,aa,X,Y){if(M.w3&&A()){P(Z,aa,X,Y)}},removeSWF:function(X){if(M.w3){y(X)}},createCSS:function(aa,Z,Y,X){if(M.w3){v(aa,Z,Y,X)}},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue:function(aa){var Z=j.location.search||j.location.hash;if(Z){if(/\?/.test(Z)){Z=Z.split("?")[1]}if(aa==null){return L(Z)}var Y=Z.split("&");for(var X=0;X<Y.length;X++){if(Y[X].substring(0,Y[X].indexOf("="))==aa){return L(Y[X].substring((Y[X].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(a){var X=c(R);if(X&&l){X.parentNode.replaceChild(l,X);if(Q){w(Q,true);if(M.ie&&M.win){l.style.display="block"}}if(E){E(B)}}a=false}}}}();
/* end swfobject */

var Prototype={Version:"1.6.0.3",Browser:{IE:!!(window.attachEvent&&navigator.userAgent.indexOf("Opera")===-1),Opera:navigator.userAgent.indexOf("Opera")>-1,WebKit:navigator.userAgent.indexOf("AppleWebKit/")>-1,Gecko:navigator.userAgent.indexOf("Gecko")>-1&&navigator.userAgent.indexOf("KHTML")===-1,MobileSafari:!!navigator.userAgent.match(/Apple.*Mobile.*Safari/)},BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:!!window.HTMLElement,SpecificElementExtensions:document.createElement("div")["__proto__"]&&document.createElement("div")["__proto__"]!==document.createElement("form")["__proto__"]},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 Class={create:function(){var f=null,d=$A(arguments);if(Object.isFunction(d[0])){f=d.shift()}function a(){this.initialize.apply(this,arguments)}Object.extend(a,Class.Methods);a.superclass=f;a.subclasses=[];if(f){var b=function(){};b.prototype=f.prototype;a.prototype=new b;f.subclasses.push(a)}for(var c=0;c<d.length;c++){a.addMethods(d[c])}if(!a.prototype.initialize){a.prototype.initialize=Prototype.emptyFunction}a.prototype.constructor=a;return a}};Class.Methods={addMethods:function(h){var c=this.superclass&&this.superclass.prototype;var b=Object.keys(h);if(!Object.keys({toString:true}).length){b.push("toString","valueOf")}for(var a=0,d=b.length;a<d;a++){var g=b[a],f=h[g];if(c&&Object.isFunction(f)&&f.argumentNames().first()=="$super"){var j=f;f=(function(l){return function(){return c[l].apply(this,arguments)}})(g).wrap(j);f.valueOf=j.valueOf.bind(j);f.toString=j.toString.bind(j)}this.prototype[g]=f}return this}};var Abstract={};Object.extend=function(a,c){for(var b in c){a[b]=c[b]}return a};Object.extend(Object,{inspect:function(a){try{if(Object.isUndefined(a)){return"undefined"}if(a===null){return"null"}return a.inspect?a.inspect():String(a)}catch(b){if(b instanceof RangeError){return"..."}throw b}},toJSON:function(a){var c=typeof a;switch(c){case"undefined":case"function":case"unknown":return;case"boolean":return a.toString()}if(a===null){return"null"}if(a.toJSON){return a.toJSON()}if(Object.isElement(a)){return}var b=[];for(var f in a){var d=Object.toJSON(a[f]);if(!Object.isUndefined(d)){b.push(f.toJSON()+": "+d)}}return"{"+b.join(", ")+"}"},toQueryString:function(a){return $H(a).toQueryString()},toHTML:function(a){return a&&a.toHTML?a.toHTML():String.interpret(a)},keys:function(a){var b=[];for(var c in a){b.push(c)}return b},values:function(b){var a=[];for(var c in b){a.push(b[c])}return a},clone:function(a){return Object.extend({},a)},isElement:function(a){return !!(a&&a.nodeType==1)},isArray:function(a){return a!=null&&typeof a=="object"&&"splice" in a&&"join" in a},isHash:function(a){return a instanceof Hash},isFunction:function(a){return typeof a=="function"},isString:function(a){return typeof a=="string"},isNumber:function(a){return typeof a=="number"},isUndefined:function(a){return typeof a=="undefined"}});Object.extend(Function.prototype,{argumentNames:function(){var a=this.toString().match(/^[\s\(]*function[^(]*\(([^\)]*)\)/)[1].replace(/\s+/g,"").split(",");return a.length==1&&!a[0]?[]:a},bind:function(){if(arguments.length<2&&Object.isUndefined(arguments[0])){return this}var a=this,c=$A(arguments),b=c.shift();return function(){return a.apply(b,c.concat($A(arguments)))}},bindAsEventListener:function(){var a=this,c=$A(arguments),b=c.shift();return function(d){return a.apply(b,[d||window.event].concat(c))}},curry:function(){if(!arguments.length){return this}var a=this,b=$A(arguments);return function(){return a.apply(this,b.concat($A(arguments)))}},delay:function(){var a=this,b=$A(arguments),c=b.shift()*1000;return window.setTimeout(function(){return a.apply(a,b)},c)},defer:function(){var a=[0.01].concat($A(arguments));return this.delay.apply(this,a)},wrap:function(b){var a=this;return function(){return b.apply(this,[a.bind(this)].concat($A(arguments)))}},methodize:function(){if(this._methodized){return this._methodized}var a=this;return this._methodized=function(){return a.apply(null,[this].concat($A(arguments)))}}});Date.prototype.toJSON=function(){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"'};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(f){}}return c}};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()}finally{this.currentlyExecuting=false}}}});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,{gsub:function(f,c){var a="",d=this,b;c=arguments.callee.prepareReplacement(c);while(d.length>0){if(b=d.match(f)){a+=d.slice(0,b.index);a+=String.interpret(c(b));d=d.slice(b.index+b[0].length)}else{a+=d,d=""}}return a},sub:function(c,a,b){a=this.gsub.prepareReplacement(a);b=Object.isUndefined(b)?1:b;return this.gsub(c,function(d){if(--b<0){return d[0]}return a(d)})},scan:function(b,a){this.gsub(b,a);return String(this)},truncate:function(b,a){b=b||30;a=Object.isUndefined(a)?"...":a;return this.length>b?this.slice(0,b-a.length)+a:String(this)},strip:function(){return this.replace(/^\s+/,"").replace(/\s+$/,"")},stripTags:function(){return this.replace(/<\/?[^>]+>/gi,"")},stripScripts:function(){return this.replace(new RegExp(Prototype.ScriptFragment,"img"),"")},extractScripts:function(){var b=new RegExp(Prototype.ScriptFragment,"img");var a=new RegExp(Prototype.ScriptFragment,"im");return(this.match(b)||[]).map(function(d){var c=(d.match(a)||["",""])[1];c=c.replace(/</,"&lt;").replace(/\s*&lt;!--[^\r\n]*/,"");return c})},evalScripts:function(){return this.extractScripts().map(function(script){return eval(script)})},escapeHTML:function(){var a=arguments.callee;a.text.data=this;return a.div.innerHTML},unescapeHTML:function(){var a=new Element("div");a.innerHTML=this.stripTags();return a.childNodes[0]?(a.childNodes.length>1?$A(a.childNodes).inject("",function(b,c){return b+c.nodeValue}):a.childNodes[0].nodeValue):""},toQueryParams:function(b){var a=this.strip().match(/([^?#]*)(#.*)?$/);if(!a){return{}}return a[1].split(b||"&").inject({},function(f,g){if((g=g.split("="))[0]){var c=decodeURIComponent(g.shift());var d=g.length>1?g.join("="):g[0];if(d!=undefined){d=decodeURIComponent(d)}if(c in f){if(!Object.isArray(f[c])){f[c]=[f[c]]}f[c].push(d)}else{f[c]=d}}return f})},toArray:function(){return this.split("")},succ:function(){return this.slice(0,this.length-1)+String.fromCharCode(this.charCodeAt(this.length-1)+1)},times:function(a){return a<1?"":new Array(a+1).join(this)},camelize:function(){var d=this.split("-"),a=d.length;if(a==1){return d[0]}var c=this.charAt(0)=="-"?d[0].charAt(0).toUpperCase()+d[0].substring(1):d[0];for(var b=1;b<a;b++){c+=d[b].charAt(0).toUpperCase()+d[b].substring(1)}return c},capitalize:function(){return this.charAt(0).toUpperCase()+this.substring(1).toLowerCase()},underscore:function(){return this.gsub(/::/,"/").gsub(/([A-Z]+)([A-Z][a-z])/,"#{1}_#{2}").gsub(/([a-z\d])([A-Z])/,"#{1}_#{2}").gsub(/-/,"_").toLowerCase()},dasherize:function(){return this.gsub(/_/,"-")},inspect:function(b){var a=this.gsub(/[\x00-\x1f\\]/,function(c){var d=String.specialChar[c[0]];return d?d:"\\u00"+c[0].charCodeAt().toPaddedString(2,16)});if(b){return'"'+a.replace(/"/g,'\\"')+'"'}return"'"+a.replace(/'/g,"\\'")+"'"},toJSON:function(){return this.inspect(true)},unfilterJSON:function(a){return this.sub(a||Prototype.JSONFilter,"#{1}")},isJSON:function(){var a=this;if(a.blank()){return false}a=this.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,"");return(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(a)},evalJSON:function(sanitize){var json=this.unfilterJSON();try{if(!sanitize||json.isJSON()){return eval("("+json+")")}}catch(e){}throw new SyntaxError("Badly formed JSON string: "+this.inspect())},include:function(a){return this.indexOf(a)>-1},startsWith:function(a){return this.indexOf(a)===0},endsWith:function(a){var b=this.length-a.length;return b>=0&&this.lastIndexOf(a)===b},empty:function(){return this==""},blank:function(){return/^\s*$/.test(this)},interpolate:function(a,b){return new Template(this,b).evaluate(a)}});if(Prototype.Browser.WebKit||Prototype.Browser.IE){Object.extend(String.prototype,{escapeHTML:function(){return this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},unescapeHTML:function(){return this.stripTags().replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">")}})}String.prototype.gsub.prepareReplacement=function(b){if(Object.isFunction(b)){return b}var a=new Template(b);return function(c){return a.evaluate(c)}};String.prototype.parseQuery=String.prototype.toQueryParams;Object.extend(String.prototype.escapeHTML,{div:document.createElement("div"),text:document.createTextNode("")});String.prototype.escapeHTML.div.appendChild(String.prototype.escapeHTML.text);var Template=Class.create({initialize:function(a,b){this.template=a.toString();this.pattern=b||Template.Pattern},evaluate:function(a){if(Object.isFunction(a.toTemplateReplacements)){a=a.toTemplateReplacements()}return this.template.gsub(this.pattern,function(d){if(a==null){return""}var g=d[1]||"";if(g=="\\"){return d[2]}var b=a,h=d[3];var f=/^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/;d=f.exec(h);if(d==null){return g}while(d!=null){var c=d[1].startsWith("[")?d[2].gsub("\\\\]","]"):d[1];b=b[c];if(null==b||""==d[3]){break}h=h.substring("["==d[3]?d[1].length:d[0].length);d=f.exec(h)}return g+String.interpret(b)})}});Template.Pattern=/(^|.|\r|\n)(#\{(.*?)\})/;var $break={};var Enumerable={each:function(c,b){var a=0;try{this._each(function(f){c.call(b,f,a++)})}catch(d){if(d!=$break){throw d}}return this},eachSlice:function(d,c,b){var a=-d,f=[],g=this.toArray();if(d<1){return g}while((a+=d)<g.length){f.push(g.slice(a,a+d))}return f.collect(c,b)},all:function(c,b){c=c||Prototype.K;var a=true;this.each(function(f,d){a=a&&!!c.call(b,f,d);if(!a){throw $break}});return a},any:function(c,b){c=c||Prototype.K;var a=false;this.each(function(f,d){if(a=!!c.call(b,f,d)){throw $break}});return a},collect:function(c,b){c=c||Prototype.K;var a=[];this.each(function(f,d){a.push(c.call(b,f,d))});return a},detect:function(c,b){var a;this.each(function(f,d){if(c.call(b,f,d)){a=f;throw $break}});return a},findAll:function(c,b){var a=[];this.each(function(f,d){if(c.call(b,f,d)){a.push(f)}});return a},grep:function(d,c,b){c=c||Prototype.K;var a=[];if(Object.isString(d)){d=new RegExp(d)}this.each(function(g,f){if(d.match(g)){a.push(c.call(b,g,f))}});return a},include:function(a){if(Object.isFunction(this.indexOf)){if(this.indexOf(a)!=-1){return true}}var b=false;this.each(function(c){if(c==a){b=true;throw $break}});return b},inGroupsOf:function(b,a){a=Object.isUndefined(a)?null:a;return this.eachSlice(b,function(c){while(c.length<b){c.push(a)}return c})},inject:function(a,c,b){this.each(function(f,d){a=c.call(b,a,f,d)});return a},invoke:function(b){var a=$A(arguments).slice(1);return this.map(function(c){return c[b].apply(c,a)})},max:function(c,b){c=c||Prototype.K;var a;this.each(function(f,d){f=c.call(b,f,d);if(a==null||f>=a){a=f}});return a},min:function(c,b){c=c||Prototype.K;var a;this.each(function(f,d){f=c.call(b,f,d);if(a==null||f<a){a=f}});return a},partition:function(d,b){d=d||Prototype.K;var c=[],a=[];this.each(function(g,f){(d.call(b,g,f)?c:a).push(g)});return[c,a]},pluck:function(b){var a=[];this.each(function(c){a.push(c[b])});return a},reject:function(c,b){var a=[];this.each(function(f,d){if(!c.call(b,f,d)){a.push(f)}});return a},sortBy:function(b,a){return this.map(function(d,c){return{value:d,criteria:b.call(a,d,c)}}).sort(function(g,f){var d=g.criteria,c=f.criteria;return d<c?-1:d>c?1:0}).pluck("value")},toArray:function(){return this.map()},zip:function(){var b=Prototype.K,a=$A(arguments);if(Object.isFunction(a.last())){b=a.pop()}var c=[this].concat(a).map($A);return this.map(function(f,d){return b(c.pluck(d))})},size:function(){return this.toArray().length},inspect:function(){return"#<Enumerable:"+this.toArray().inspect()+">"}};Object.extend(Enumerable,{map:Enumerable.collect,find:Enumerable.detect,select:Enumerable.findAll,filter:Enumerable.findAll,member:Enumerable.include,entries:Enumerable.toArray,every:Enumerable.all,some:Enumerable.any});function $A(c){if(!c){return[]}if(c.toArray){return c.toArray()}var b=c.length||0,a=new Array(b);while(b--){a[b]=c[b]}return a}if(Prototype.Browser.WebKit){$A=function(c){if(!c){return[]}if(!(typeof c==="function"&&typeof c.length==="number"&&typeof c.item==="function")&&c.toArray){return c.toArray()}var b=c.length||0,a=new Array(b);while(b--){a[b]=c[b]}return a}}Array.from=$A;Object.extend(Array.prototype,Enumerable);if(!Array.prototype._reverse){Array.prototype._reverse=Array.prototype.reverse}Object.extend(Array.prototype,{_each:function(b){for(var a=0,c=this.length;a<c;a++){b(this[a])}},clear:function(){this.length=0;return this},first:function(){return this[0]},last:function(){return this[this.length-1]},compact:function(){return this.select(function(a){return a!=null})},flatten:function(){return this.inject([],function(b,a){return b.concat(Object.isArray(a)?a.flatten():[a])})},without:function(){var a=$A(arguments);return this.select(function(b){return !a.include(b)})},reverse:function(a){return(a!==false?this:this.toArray())._reverse()},reduce:function(){return this.length>1?this:this[0]},uniq:function(a){return this.inject([],function(d,c,b){if(0==b||(a?d.last()!=c:!d.include(c))){d.push(c)}return d})},intersect:function(a){return this.uniq().findAll(function(b){return a.detect(function(c){return b===c})})},clone:function(){return[].concat(this)},size:function(){return this.length},inspect:function(){return"["+this.map(Object.inspect).join(", ")+"]"},toJSON:function(){var a=[];this.each(function(b){var c=Object.toJSON(b);if(!Object.isUndefined(c)){a.push(c)}});return"["+a.join(", ")+"]"}});if(Object.isFunction(Array.prototype.forEach)){Array.prototype._each=Array.prototype.forEach}if(!Array.prototype.indexOf){Array.prototype.indexOf=function(c,a){a||(a=0);var b=this.length;if(a<0){a=b+a}for(;a<b;a++){if(this[a]===c){return a}}return -1}}if(!Array.prototype.lastIndexOf){Array.prototype.lastIndexOf=function(b,a){a=isNaN(a)?this.length:(a<0?this.length+a:a)+1;var c=this.slice(0,a).reverse().indexOf(b);return(c<0)?c:a-c-1}}Array.prototype.toArray=Array.prototype.clone;function $w(a){if(!Object.isString(a)){return[]}a=a.strip();return a?a.split(/\s+/):[]}if(Prototype.Browser.Opera){Array.prototype.concat=function(){var f=[];for(var b=0,c=this.length;b<c;b++){f.push(this[b])}for(var b=0,c=arguments.length;b<c;b++){if(Object.isArray(arguments[b])){for(var a=0,d=arguments[b].length;a<d;a++){f.push(arguments[b][a])}}else{f.push(arguments[b])}}return f}}Object.extend(Number.prototype,{toColorPart:function(){return this.toPaddedString(2,16)},succ:function(){return this+1},times:function(b,a){$R(0,this,true).each(b,a);return this},toPaddedString:function(c,b){var a=this.toString(b||10);return"0".times(c-a.length)+a},toJSON:function(){return isFinite(this)?this.toString():"null"}});$w("abs round ceil floor").each(function(a){Number.prototype[a]=Math[a].methodize()});function $H(a){return new Hash(a)}var Hash=Class.create(Enumerable,(function(){function a(b,c){if(Object.isUndefined(c)){return b}return b+"="+encodeURIComponent(String.interpret(c))}return{initialize:function(b){this._object=Object.isHash(b)?b.toObject():Object.clone(b)},_each:function(c){for(var b in this._object){var d=this._object[b],f=[b,d];f.key=b;f.value=d;c(f)}},set:function(b,c){return this._object[b]=c},get:function(b){if(this._object[b]!==Object.prototype[b]){return this._object[b]}},unset:function(b){var c=this._object[b];delete this._object[b];return c},toObject:function(){return Object.clone(this._object)},keys:function(){return this.pluck("key")},values:function(){return this.pluck("value")},index:function(c){var b=this.detect(function(d){return d.value===c});return b&&b.key},merge:function(b){return this.clone().update(b)},update:function(b){return new Hash(b).inject(this,function(c,d){c.set(d.key,d.value);return c})},toQueryString:function(){return this.inject([],function(d,f){var c=encodeURIComponent(f.key),b=f.value;if(b&&typeof b=="object"){if(Object.isArray(b)){return d.concat(b.map(a.curry(c)))}}else{d.push(a(c,b))}return d}).join("&")},inspect:function(){return"#<Hash:{"+this.map(function(b){return b.map(Object.inspect).join(": ")}).join(", ")+"}>"},toJSON:function(){return Object.toJSON(this.toObject())},clone:function(){return new Hash(this)}}})());Hash.prototype.toTemplateReplacements=Hash.prototype.toObject;Hash.from=$H;var ObjectRange=Class.create(Enumerable,{initialize:function(c,a,b){this.start=c;this.end=a;this.exclusive=b},_each:function(a){var b=this.start;while(this.include(b)){a(b);b=b.succ()}},include:function(a){if(a<this.start){return false}if(this.exclusive){return a<this.end}return a<=this.end}});var $R=function(c,a,b){return new ObjectRange(c,a,b)};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(f){if(Object.isFunction(f[d])){try{f[d].apply(f,[b,c,a])}catch(g){}}})}};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.isString(this.options.parameters)){this.options.parameters=this.options.parameters.toQueryParams()}else{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.clone(this.options.parameters);if(!["get","post"].include(this.method)){d._method=this.method;this.method="post"}this.parameters=d;if(d=Object.toQueryString(d)){if(this.method=="get"){this.url+=(this.url.include("?")?"&":"?")+d}else{if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)){d+="&_="}}}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 f={"X-Requested-With":"XMLHttpRequest","X-Prototype-Version":Prototype.Version,Accept:"text/javascript, text/html, application/xml, text/xml, */*"};if(this.method=="post"){f["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){f.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){f[c[b]]=c[b+1]}}else{$H(c).each(function(g){f[g.key]=g.value})}}for(var a in f){this.transport.setRequestHeader(a,f[a])}},success:function(){var a=this.getStatus();return !a||(a>=200&&a<300)},getStatus:function(){try{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 f=b.getHeader("Content-type");if(this.options.evalJS=="force"||(this.options.evalJS&&this.isSameOrigin()&&f&&f.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(f,g){this.updateContent(f.responseText);if(Object.isFunction(d)){d(f,g)}}).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(g,a){var c=[];var f=document.evaluate(g,$(a)||document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);for(var b=0,d=f.snapshotLength;b<d;b++){c.push(Element.extend(f.snapshotItem(b)))}return c}}if(!window.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(){var a=this.Element;this.Element=function(d,c){c=c||{};d=d.toLowerCase();var b=Element.cache;if(Prototype.Browser.IE&&c.name){d="<"+d+' name="'+c.name+'">';delete c.name;return Element.writeAttribute(document.createElement(d),c)}if(!b[d]){b[d]=Element.extend(document.createElement(d))}return Element.writeAttribute(b[d].cloneNode(false),c)};Object.extend(this.Element,a||{});if(a){this.Element.prototype=a.prototype}}).call(window);Element.cache={};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(a,b){a=$(a);if(b&&b.toElement){b=b.toElement()}if(Object.isElement(b)){return a.update().insert(b)}b=Object.toHTML(b);a.innerHTML=b.stripScripts();b.evalScripts.bind(b).defer();return a},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,f){c=$(c);if(Object.isString(f)||Object.isNumber(f)||Object.isElement(f)||(f&&(f.toElement||f.toHTML))){f={bottom:f}}var d,g,b,h;for(var a in f){d=f[a];a=a.toLowerCase();g=Element._insertionTranslations[a];if(d&&d.toElement){d=d.toElement()}if(Object.isElement(d)){g(c,d);continue}d=Object.toHTML(d);b=((a=="before"||a=="after")?c.parentNode:c).tagName.toUpperCase();h=Element._getContentFromAnonymousElement(b,d.stripScripts());if(a=="top"||a=="after"){h.reverse()}h.each(g.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(g){var f=g.first(),c=g.last();var d=(b[f]||"").toString();if(d){a+=" "+c+"="+d.inspect(true)}});return a+">"},recursivelyCollect:function(a,c){a=$(a);var b=[];while(a=a[c]){if(a.nodeType==1){b.push(Element.extend(a))}}return b},ancestors:function(a){return $(a).recursivelyCollect("parentNode")},descendants:function(a){return $(a).select("*")},firstDescendant:function(a){a=$(a).firstChild;while(a&&a.nodeType!=1){a=a.nextSibling}return $(a)},immediateDescendants:function(a){if(!(a=$(a).firstChild)){return[]}while(a&&a.nodeType!=1){a=a.nextSibling}if(a){return[a].concat($(a).nextSiblings())}return[]},previousSiblings:function(a){return $(a).recursivelyCollect("previousSibling")},nextSiblings:function(a){return $(a).recursivelyCollect("nextSibling")},siblings:function(a){a=$(a);return a.previousSiblings().reverse().concat(a.nextSiblings())},match:function(b,a){if(Object.isString(a)){a=new Selector(a)}return a.match($(b))},up:function(b,d,a){b=$(b);if(arguments.length==1){return $(b.parentNode)}var c=b.ancestors();return Object.isNumber(d)?c[d]:Selector.findElement(c,d,a)},down:function(b,c,a){b=$(b);if(arguments.length==1){return b.firstDescendant()}return Object.isNumber(c)?b.descendants()[c]:Element.select(b,c)[a||0]},previous:function(b,d,a){b=$(b);if(arguments.length==1){return $(Selector.handlers.previousElementSibling(b))}var c=b.previousSiblings();return Object.isNumber(d)?c[d]:Selector.findElement(c,d,a)},next:function(c,d,b){c=$(c);if(arguments.length==1){return $(Selector.handlers.nextElementSibling(c))}var a=c.nextSiblings();return Object.isNumber(d)?a[d]:Selector.findElement(a,d,b)},select:function(){var a=$A(arguments),b=$(a.shift());return Selector.findChildElements(b,a)},adjacent:function(){var a=$A(arguments),b=$(a.shift());return Selector.findChildElements(b.parentNode,a).without(b)},identify:function(b){b=$(b);var c=b.readAttribute("id"),a=arguments.callee;if(c){return c}do{c="anonymous_element_"+a.counter++}while($(c));b.writeAttribute("id",c);return c},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(f,c,g){f=$(f);var b={},d=Element._attributeTranslations.write;if(typeof c=="object"){b=c}else{b[c]=Object.isUndefined(g)?true:g}for(var a in b){c=d.names[a]||a;g=b[a];if(d.values[a]){c=d.values[a](f,g)}if(g===false||g===null){f.removeAttribute(c)}else{if(g===true){f.setAttribute(c,c)}else{f.setAttribute(c,g)}}}return f},getHeight:function(a){return $(a).getDimensions().height},getWidth:function(a){return $(a).getDimensions().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(!a.hasClassName(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 a[a.hasClassName(b)?"removeClassName":"addClassName"](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=a.cumulativeOffset();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 f=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{f[(d=="float"||d=="cssFloat")?(Object.isUndefined(f.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},getDimensions:function(c){c=$(c);var h=c.getStyle("display");if(h!="none"&&h!=null){return{width:c.offsetWidth,height:c.offsetHeight}}var b=c.style;var g=b.visibility;var d=b.position;var a=b.display;b.visibility="hidden";b.position="absolute";b.display="block";var j=c.clientWidth;var f=c.clientHeight;b.display=a;b.position=d;b.visibility=g;return{width:j,height:f}},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},cumulativeOffset:function(b){var a=0,d=0;do{if($(b).getStyle("position")=="fixed"){var c=document.viewport.getScrollOffsets();a+=c[1]+b.offsetTop;d+=c[0]+b.offsetLeft;break}else{a+=b.offsetTop||0;d+=b.offsetLeft||0;b=b.offsetParent}}while(b);return Element._returnOffset(d,a)},positionedOffset:function(b){var a=0,d=0;do{a+=b.offsetTop||0;d+=b.offsetLeft||0;b=b.offsetParent;if(b){if(b.tagName.toUpperCase()=="BODY"){break}var c=Element.getStyle(b,"position");if(c!=="static"){break}}}while(b);return Element._returnOffset(d,a)},absolutize:function(b){b=$(b);if(b.getStyle("position")=="absolute"){return b}var d=b.positionedOffset();var g=d[1];var f=d[0];var c=b.clientWidth;var a=b.clientHeight;b._originalLeft=f-parseFloat(b.style.left||0);b._originalTop=g-parseFloat(b.style.top||0);b._originalWidth=b.style.width;b._originalHeight=b.style.height;b.style.position="absolute";b.style.top=g+"px";b.style.left=f+"px";b.style.width=c+"px";b.style.height=a+"px";return b},relativize:function(a){a=$(a);if(a.getStyle("position")=="relative"){return a}a.style.position="relative";var c=parseFloat(a.style.top||0)-(a._originalTop||0);var b=parseFloat(a.style.left||0)-(a._originalLeft||0);a.style.top=c+"px";a.style.left=b+"px";a.style.height=a._originalHeight;a.style.width=a._originalWidth;return a},cumulativeScrollOffset:function(b){var a=0,c=0;do{a+=b.scrollTop||0;c+=b.scrollLeft||0;b=b.parentNode}while(b);return Element._returnOffset(c,a)},getOffsetParent:function(a){if(a.offsetParent){return $(a.offsetParent)}if(a==document.body){return $(a)}while((a=a.parentNode)&&a!=document.body&&Object.isElement(a)){if(Element.getStyle(a,"position")!="static"){return $(a)}}return $(document.body)},viewportOffset:function(d){var a=0,c=0;var b=d;do{a+=b.offsetTop||0;c+=b.offsetLeft||0;if(b.offsetParent==document.body&&Element.getStyle(b,"position")=="absolute"){break}}while(b=b.offsetParent);b=d;do{if(!Prototype.Browser.Opera||(b.tagName&&(b.tagName.toUpperCase()=="BODY"))){a-=b.scrollTop||0;c-=b.scrollLeft||0;if(!Prototype.Browser.WebKit&&Element.getStyle(b,"position")=="fixed"){break}}}while((b=b.parentNode)&&b.tagName);return Element._returnOffset(c,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 f=d.viewportOffset();b=$(b);var g=[0,0];var c=null;if(Element.getStyle(b,"position")=="absolute"){c=b.getOffsetParent();g=c.viewportOffset()}if(c==document.body){g[0]-=document.body.offsetLeft;g[1]-=document.body.offsetTop}if(a.setLeft){b.style.left=(f[0]-g[0]+a.offsetLeft)+"px"}if(a.setTop){b.style.top=(f[1]-g[1]+a.offsetTop)+"px"}if(a.setWidth){b.style.width=d.offsetWidth+"px"}if(a.setHeight){b.style.height=d.offsetHeight+"px"}return b}};Element.Methods.identify.counter=1;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"left":case"top":case"right":case"bottom":if(d(b,"position")==="static"){return null}case"height":case"width":if(!Element.visible(b)){return null}var f=parseInt(d(b,c),10);if(f!==b["offset"+c.capitalize()]){return f+"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(f,function(g,h){var j=d(b,h);return j===null?g:g-parseInt(j,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.getOffsetParent=Element.Methods.getOffsetParent.wrap(function(c,b){b=$(b);try{b.offsetParent}catch(f){return $(document.body)}var a=b.getStyle("position");if(a!=="static"){return c(b)}b.setStyle({position:"relative"});var d=c(b);b.setStyle({position:a});return d});$w("positionedOffset viewportOffset").each(function(a){Element.Methods[a]=Element.Methods[a].wrap(function(f,c){c=$(c);try{c.offsetParent}catch(h){return Element._returnOffset(0,0)}var b=c.getStyle("position");if(b!=="static"){return f(c)}var d=c.getOffsetParent();if(d&&d.getStyle("position")==="fixed"){d.setStyle({zoom:1})}c.setStyle({position:"relative"});var g=f(c);c.setStyle({position:b});return g})});Element.Methods.cumulativeOffset=Element.Methods.cumulativeOffset.wrap(function(b,a){try{a.offsetParent}catch(c){return Element._returnOffset(0,0)}return b(a)});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};Element.Methods.setOpacity=function(b,f){function g(h){return h.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(f==1||f===""){(d=g(d))?c.filter=d:c.removeAttribute("filter");return b}else{if(f<0.00001){f=0}}c.filter=g(d)+"alpha(opacity="+(f*100)+")";return b};Element._attributeTranslations={read:{names:{"class":"className","for":"htmlFor"},values:{_getAttr:function(a,b){return a.getAttribute(b,2)},_getAttrNode:function(a,c){var b=a.getAttributeNode(c);return b?b.value:""},_getEv:function(a,b){b=a.getAttribute(b);return b?b.toString().slice(23,-2):null},_flag:function(a,b){return $(a).hasAttribute(b)?b:null},style:function(a){return a.style.cssText.toLowerCase()},title:function(a){return a.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._getAttr,src:a._getAttr,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)}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};Element.Methods.cumulativeOffset=function(b){var a=0,c=0;do{a+=b.offsetTop||0;c+=b.offsetLeft||0;if(b.offsetParent==document.body){if(Element.getStyle(b,"position")=="absolute"){break}}b=b.offsetParent}while(b);return Element._returnOffset(c,a)}}}}}if(Prototype.Browser.IE||Prototype.Browser.Opera){Element.Methods.update=function(b,c){b=$(b);if(c&&c.toElement){c=c.toElement()}if(Object.isElement(c)){return b.update().insert(c)}c=Object.toHTML(c);var a=b.tagName.toUpperCase();if(a in Element._insertionTranslations.tags){$A(b.childNodes).each(function(d){b.removeChild(d)});Element._getContentFromAnonymousElement(a,c.stripScripts()).each(function(d){b.appendChild(d)})}else{b.innerHTML=c.stripScripts()}c.evalScripts.bind(c).defer();return b}}if("outerHTML" in document.createElement("div")){Element.Methods.replace=function(c,f){c=$(c);if(f&&f.toElement){f=f.toElement()}if(Object.isElement(f)){c.parentNode.replaceChild(f,c);return c}f=Object.toHTML(f);var d=c.parentNode,b=d.tagName.toUpperCase();if(Element._insertionTranslations.tags[b]){var g=c.next();var a=Element._getContentFromAnonymousElement(b,f.stripScripts());d.removeChild(c);if(g){a.each(function(h){d.insertBefore(h,g)})}else{a.each(function(h){d.appendChild(h)})}}else{c.outerHTML=f.stripScripts()}f.evalScripts.bind(f).defer();return c}}Element._returnOffset=function(b,c){var a=[b,c];a.left=b;a.top=c;return a};Element._getContentFromAnonymousElement=function(c,b){var d=new Element("div"),a=Element._insertionTranslations.tags[c];if(a){d.innerHTML=a[0]+b+a[1];a[2].times(function(){d=d.firstChild})}else{d.innerHTML=b}return $A(d.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(){Object.extend(this.tags,{THEAD:this.tags.TBODY,TFOOT:this.tags.TBODY,TH:this.tags.TD})}).call(Element._insertionTranslations);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);if(!Prototype.BrowserFeatures.ElementExtensions&&document.createElement("div")["__proto__"]){window.HTMLElement={};window.HTMLElement.prototype=document.createElement("div")["__proto__"];Prototype.BrowserFeatures.ElementExtensions=true}Element.extend=(function(){if(Prototype.BrowserFeatures.SpecificElementExtensions){return Prototype.K}var a={},b=Element.Methods.ByTag;var c=Object.extend(function(g){if(!g||g._extendedByPrototype||g.nodeType!=1||g==window){return g}var d=Object.clone(a),f=g.tagName.toUpperCase(),j,h;if(b[f]){Object.extend(d,b[f])}for(j in d){h=d[j];if(Object.isFunction(h)&&!(j in g)){g[j]=h.methodize()}}g._extendedByPrototype=Prototype.emptyFunction;return g},{refresh:function(){if(!Prototype.BrowserFeatures.ElementExtensions){Object.extend(a,Element.Methods);Object.extend(a,Element.Methods.Simulated)}}});c.refresh();return c})();Element.hasAttribute=function(a,b){if(a.hasAttribute){return a.hasAttribute(b)}return Element.Methods.Simulated.hasAttribute(a,b)};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)})}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(m){m=m.toUpperCase();if(!Element.Methods.ByTag[m]){Element.Methods.ByTag[m]={}}Object.extend(Element.Methods.ByTag[m],c)}function a(o,n,m){m=m||false;for(var q in o){var p=o[q];if(!Object.isFunction(p)){continue}if(!m||!(q in n)){n[q]=p.methodize()}}}function f(o){var m;var n={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(n[o]){m="HTML"+n[o]+"Element"}if(window[m]){return window[m]}m="HTML"+o+"Element";if(window[m]){return window[m]}m="HTML"+o.capitalize()+"Element";if(window[m]){return window[m]}window[m]={};window[m].prototype=document.createElement(o)["__proto__"];return window[m]}if(j.ElementExtensions){a(Element.Methods,HTMLElement.prototype);a(Element.Methods.Simulated,HTMLElement.prototype,true)}if(j.SpecificElementExtensions){for(var l in Element.Methods.ByTag){var g=f(l);if(Object.isUndefined(g)){continue}a(d[l],g.prototype)}}Object.extend(Element,Element.Methods);delete Element.ByTag;if(Element.extend.refresh){Element.extend.refresh()}Element.cache={}};document.viewport={getDimensions:function(){var a={},b=Prototype.Browser;$w("width height").each(function(f){var c=f.capitalize();if(b.WebKit&&!document.evaluate){a[f]=self["inner"+c]}else{if(b.Opera&&parseFloat(window.opera.version())<9.5){a[f]=document.body["client"+c]}else{a[f]=document.documentElement["client"+c]}}});return a},getWidth:function(){return this.getDimensions().width},getHeight:function(){return this.getDimensions().height},getScrollOffsets:function(){return Element._returnOffset(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft,window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop)}};var Selector=Class.create({initialize:function(a){this.expression=a.strip();if(this.shouldUseSelectorsAPI()){this.mode="selectorsAPI"}else{if(this.shouldUseXPath()){this.mode="xpath";this.compileXPathMatcher()}else{this.mode="normal";this.compileMatcher()}}},shouldUseXPath:function(){if(!Prototype.BrowserFeatures.XPath){return false}var a=this.expression;if(Prototype.Browser.WebKit&&(a.include("-of-type")||a.include(":empty"))){return false}if((/(\[[\w-]*?:|:checked)/).test(a)){return false}return true},shouldUseSelectorsAPI:function(){if(!Prototype.BrowserFeatures.SelectorsAPI){return false}if(!Selector._div){Selector._div=new Element("div")}try{Selector._div.querySelector(this.expression)}catch(a){return false}return true},compileMatcher:function(){var e=this.expression,ps=Selector.patterns,h=Selector.handlers,c=Selector.criteria,le,p,m;if(Selector._cache[e]){this.matcher=Selector._cache[e];return}this.matcher=["this.matcher = function(root) {","var r = root, h = Selector.handlers, c = false, n;"];while(e&&le!=e&&(/\S/).test(e)){le=e;for(var i in ps){p=ps[i];if(m=e.match(p)){this.matcher.push(Object.isFunction(c[i])?c[i](m):new Template(c[i]).evaluate(m));e=e.replace(m[0],"");break}}}this.matcher.push("return h.unique(n);\n}");eval(this.matcher.join("\n"));Selector._cache[this.expression]=this.matcher},compileXPathMatcher:function(){var f=this.expression,g=Selector.patterns,b=Selector.xpath,d,a;if(Selector._cache[f]){this.xpath=Selector._cache[f];return}this.matcher=[".//*"];while(f&&d!=f&&(/\S/).test(f)){d=f;for(var c in g){if(a=f.match(g[c])){this.matcher.push(Object.isFunction(b[c])?b[c](a):new Template(b[c]).evaluate(a));f=f.replace(a[0],"");break}}}this.xpath=this.matcher.join("");Selector._cache[this.expression]=this.xpath},findElements:function(a){a=a||document;var c=this.expression,b;switch(this.mode){case"selectorsAPI":if(a!==document){var d=a.id,f=$(a).identify();c="#"+f.replace(/:/g,"\\:")+" "+c}b=$A(a.querySelectorAll(c)).map(Element.extend);a.id=d;return b;case"xpath":return document._getElementsByXPath(this.xpath,a);default:return this.matcher(a)}},match:function(j){this.tokens=[];var q=this.expression,a=Selector.patterns,f=Selector.assertions;var b,d,g;while(q&&b!==q&&(/\S/).test(q)){b=q;for(var l in a){d=a[l];if(g=q.match(d)){if(f[l]){this.tokens.push([l,Object.clone(g)]);q=q.replace(g[0],"")}else{return this.findElements(document).include(j)}}}}var o=true,c,n;for(var l=0,h;h=this.tokens[l];l++){c=h[0],n=h[1];if(!Selector.assertions[c](j,n)){o=false;break}}return o},toString:function(){return this.expression},inspect:function(){return"#<Selector:"+this.expression.inspect()+">"}});Object.extend(Selector,{_cache:{},xpath:{descendant:"//*",child:"/*",adjacent:"/following-sibling::*[1]",laterSibling:"/following-sibling::*",tagName:function(a){if(a[1]=="*"){return""}return"[local-name()='"+a[1].toLowerCase()+"' or local-name()='"+a[1].toUpperCase()+"']"},className:"[contains(concat(' ', @class, ' '), ' #{1} ')]",id:"[@id='#{1}']",attrPresence:function(a){a[1]=a[1].toLowerCase();return new Template("[@#{1}]").evaluate(a)},attr:function(a){a[1]=a[1].toLowerCase();a[3]=a[5]||a[6];return new Template(Selector.xpath.operators[a[2]]).evaluate(a)},pseudo:function(a){var b=Selector.xpath.pseudos[a[1]];if(!b){return""}if(Object.isFunction(b)){return b(a)}return new Template(Selector.xpath.pseudos[a[1]]).evaluate(a)},operators:{"=":"[@#{1}='#{3}']","!=":"[@#{1}!='#{3}']","^=":"[starts-with(@#{1}, '#{3}')]","$=":"[substring(@#{1}, (string-length(@#{1}) - string-length('#{3}') + 1))='#{3}']","*=":"[contains(@#{1}, '#{3}')]","~=":"[contains(concat(' ', @#{1}, ' '), ' #{3} ')]","|=":"[contains(concat('-', @#{1}, '-'), '-#{3}-')]"},pseudos:{"first-child":"[not(preceding-sibling::*)]","last-child":"[not(following-sibling::*)]","only-child":"[not(preceding-sibling::* or following-sibling::*)]",empty:"[count(*) = 0 and (count(text()) = 0)]",checked:"[@checked]",disabled:"[(@disabled) and (@type!='hidden')]",enabled:"[not(@disabled) and (@type!='hidden')]",not:function(b){var j=b[6],h=Selector.patterns,a=Selector.xpath,f,c;var g=[];while(j&&f!=j&&(/\S/).test(j)){f=j;for(var d in h){if(b=j.match(h[d])){c=Object.isFunction(a[d])?a[d](b):new Template(a[d]).evaluate(b);g.push("("+c.substring(1,c.length-1)+")");j=j.replace(b[0],"");break}}}return"[not("+g.join(" and ")+")]"},"nth-child":function(a){return Selector.xpath.pseudos.nth("(count(./preceding-sibling::*) + 1) ",a)},"nth-last-child":function(a){return Selector.xpath.pseudos.nth("(count(./following-sibling::*) + 1) ",a)},"nth-of-type":function(a){return Selector.xpath.pseudos.nth("position() ",a)},"nth-last-of-type":function(a){return Selector.xpath.pseudos.nth("(last() + 1 - position()) ",a)},"first-of-type":function(a){a[6]="1";return Selector.xpath.pseudos["nth-of-type"](a)},"last-of-type":function(a){a[6]="1";return Selector.xpath.pseudos["nth-last-of-type"](a)},"only-of-type":function(a){var b=Selector.xpath.pseudos;return b["first-of-type"](a)+b["last-of-type"](a)},nth:function(h,f){var j,l=f[6],d;if(l=="even"){l="2n+0"}if(l=="odd"){l="2n+1"}if(j=l.match(/^(\d+)$/)){return"["+h+"= "+j[1]+"]"}if(j=l.match(/^(-?\d*)?n(([+-])(\d+))?/)){if(j[1]=="-"){j[1]=-1}var g=j[1]?Number(j[1]):1;var c=j[2]?Number(j[2]):0;d="[((#{fragment} - #{b}) mod #{a} = 0) and ((#{fragment} - #{b}) div #{a} >= 0)]";return new Template(d).evaluate({fragment:h,a:g,b:c})}}}},criteria:{tagName:'n = h.tagName(n, r, "#{1}", c);      c = false;',className:'n = h.className(n, r, "#{1}", c);    c = false;',id:'n = h.id(n, r, "#{1}", c);           c = false;',attrPresence:'n = h.attrPresence(n, r, "#{1}", c); c = false;',attr:function(a){a[3]=(a[5]||a[6]);return new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}", c); c = false;').evaluate(a)},pseudo:function(a){if(a[6]){a[6]=a[6].replace(/"/g,'\\"')}return new Template('n = h.pseudo(n, "#{1}", "#{6}", r, c); c = false;').evaluate(a)},descendant:'c = "descendant";',child:'c = "child";',adjacent:'c = "adjacent";',laterSibling:'c = "laterSibling";'},patterns:{laterSibling:/^\s*~\s*/,child:/^\s*>\s*/,adjacent:/^\s*\+\s*/,descendant:/^\s/,tagName:/^\s*(\*|[\w\-]+)(\b|$)?/,id:/^#([\w\-\*]+)(\b|$)/,className:/^\.([\w\-\*]+)(\b|$)/,pseudo:/^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|(?=\s|[:+~>]))/,attrPresence:/^\[((?:[\w]+:)?[\w]+)\]/,attr:/\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\4]*?)\4|([^'"][^\]]*?)))?\]/},assertions:{tagName:function(a,b){return b[1].toUpperCase()==a.tagName.toUpperCase()},className:function(a,b){return Element.hasClassName(a,b[1])},id:function(a,b){return a.id===b[1]},attrPresence:function(a,b){return Element.hasAttribute(a,b[1])},attr:function(b,c){var a=Element.readAttribute(b,c[1]);return a&&Selector.operators[c[2]](a,c[5]||c[6])}},handlers:{concat:function(d,c){for(var f=0,g;g=c[f];f++){d.push(g)}return d},mark:function(a){var d=Prototype.emptyFunction;for(var b=0,c;c=a[b];b++){c._countedByPrototype=d}return a},unmark:function(a){for(var b=0,c;c=a[b];b++){c._countedByPrototype=undefined}return a},index:function(a,d,h){a._countedByPrototype=Prototype.emptyFunction;if(d){for(var b=a.childNodes,f=b.length-1,c=1;f>=0;f--){var g=b[f];if(g.nodeType==1&&(!h||g._countedByPrototype)){g.nodeIndex=c++}}}else{for(var f=0,c=1,b=a.childNodes;g=b[f];f++){if(g.nodeType==1&&(!h||g._countedByPrototype)){g.nodeIndex=c++}}}},unique:function(b){if(b.length==0){return b}var d=[],f;for(var c=0,a=b.length;c<a;c++){if(!(f=b[c])._countedByPrototype){f._countedByPrototype=Prototype.emptyFunction;d.push(Element.extend(f))}}return Selector.handlers.unmark(d)},descendant:function(a){var d=Selector.handlers;for(var c=0,b=[],f;f=a[c];c++){d.concat(b,f.getElementsByTagName("*"))}return b},child:function(a){var f=Selector.handlers;for(var d=0,c=[],g;g=a[d];d++){for(var b=0,l;l=g.childNodes[b];b++){if(l.nodeType==1&&l.tagName!="!"){c.push(l)}}}return c},adjacent:function(a){for(var c=0,b=[],f;f=a[c];c++){var d=this.nextElementSibling(f);if(d){b.push(d)}}return b},laterSibling:function(a){var d=Selector.handlers;for(var c=0,b=[],f;f=a[c];c++){d.concat(b,Element.nextSiblings(f))}return b},nextElementSibling:function(a){while(a=a.nextSibling){if(a.nodeType==1){return a}}return null},previousElementSibling:function(a){while(a=a.previousSibling){if(a.nodeType==1){return a}}return null},tagName:function(a,l,c,b){var m=c.toUpperCase();var f=[],j=Selector.handlers;if(a){if(b){if(b=="descendant"){for(var g=0,d;d=a[g];g++){j.concat(f,d.getElementsByTagName(c))}return f}else{a=this[b](a)}if(c=="*"){return a}}for(var g=0,d;d=a[g];g++){if(d.tagName.toUpperCase()===m){f.push(d)}}return f}else{return l.getElementsByTagName(c)}},id:function(b,a,l,g){var j=$(l),d=Selector.handlers;if(!j){return[]}if(!b&&a==document){return[j]}if(b){if(g){if(g=="child"){for(var c=0,f;f=b[c];c++){if(j.parentNode==f){return[j]}}}else{if(g=="descendant"){for(var c=0,f;f=b[c];c++){if(Element.descendantOf(j,f)){return[j]}}}else{if(g=="adjacent"){for(var c=0,f;f=b[c];c++){if(Selector.handlers.previousElementSibling(j)==f){return[j]}}}else{b=d[g](b)}}}}for(var c=0,f;f=b[c];c++){if(f==j){return[j]}}return[]}return(j&&Element.descendantOf(j,a))?[j]:[]},className:function(b,a,c,d){if(b&&d){b=this[d](b)}return Selector.handlers.byClassName(b,a,c)},byClassName:function(c,b,g){if(!c){c=Selector.handlers.descendant([b])}var j=" "+g+" ";for(var f=0,d=[],h,a;h=c[f];f++){a=h.className;if(a.length==0){continue}if(a==g||(" "+a+" ").include(j)){d.push(h)}}return d},attrPresence:function(c,b,a,h){if(!c){c=b.getElementsByTagName("*")}if(c&&h){c=this[h](c)}var f=[];for(var d=0,g;g=c[d];d++){if(Element.hasAttribute(g,a)){f.push(g)}}return f},attr:function(a,l,j,m,c,b){if(!a){a=l.getElementsByTagName("*")}if(a&&b){a=this[b](a)}var n=Selector.operators[c],g=[];for(var f=0,d;d=a[f];f++){var h=Element.readAttribute(d,j);if(h===null){continue}if(n(h,m)){g.push(d)}}return g},pseudo:function(b,c,f,a,d){if(b&&d){b=this[d](b)}if(!b){b=a.getElementsByTagName("*")}return Selector.pseudos[c](b,f,a)}},pseudos:{"first-child":function(b,g,a){for(var d=0,c=[],f;f=b[d];d++){if(Selector.handlers.previousElementSibling(f)){continue}c.push(f)}return c},"last-child":function(b,g,a){for(var d=0,c=[],f;f=b[d];d++){if(Selector.handlers.nextElementSibling(f)){continue}c.push(f)}return c},"only-child":function(b,j,a){var f=Selector.handlers;for(var d=0,c=[],g;g=b[d];d++){if(!f.previousElementSibling(g)&&!f.nextElementSibling(g)){c.push(g)}}return c},"nth-child":function(b,c,a){return Selector.pseudos.nth(b,c,a)},"nth-last-child":function(b,c,a){return Selector.pseudos.nth(b,c,a,true)},"nth-of-type":function(b,c,a){return Selector.pseudos.nth(b,c,a,false,true)},"nth-last-of-type":function(b,c,a){return Selector.pseudos.nth(b,c,a,true,true)},"first-of-type":function(b,c,a){return Selector.pseudos.nth(b,"1",a,false,true)},"last-of-type":function(b,c,a){return Selector.pseudos.nth(b,"1",a,true,true)},"only-of-type":function(b,d,a){var c=Selector.pseudos;return c["last-of-type"](c["first-of-type"](b,d,a),d,a)},getIndices:function(d,c,f){if(d==0){return c>0?[c]:[]}return $R(1,f).inject([],function(a,b){if(0==(b-c)%d&&(b-c)/d>=0){a.push(b)}return a})},nth:function(c,u,w,t,f){if(c.length==0){return[]}if(u=="even"){u="2n+0"}if(u=="odd"){u="2n+1"}var s=Selector.handlers,r=[],d=[],n;s.mark(c);for(var q=0,g;g=c[q];q++){if(!g.parentNode._countedByPrototype){s.index(g.parentNode,t,f);d.push(g.parentNode)}}if(u.match(/^\d+$/)){u=Number(u);for(var q=0,g;g=c[q];q++){if(g.nodeIndex==u){r.push(g)}}}else{if(n=u.match(/^(-?\d*)?n(([+-])(\d+))?/)){if(n[1]=="-"){n[1]=-1}var y=n[1]?Number(n[1]):1;var v=n[2]?Number(n[2]):0;var z=Selector.pseudos.getIndices(y,v,c.length);for(var q=0,g,o=z.length;g=c[q];q++){for(var p=0;p<o;p++){if(g.nodeIndex==z[p]){r.push(g)}}}}}s.unmark(c);s.unmark(d);return r},empty:function(b,g,a){for(var d=0,c=[],f;f=b[d];d++){if(f.tagName=="!"||f.firstChild){continue}c.push(f)}return c},not:function(a,d,n){var j=Selector.handlers,o,c;var l=new Selector(d).findElements(n);j.mark(l);for(var g=0,f=[],b;b=a[g];g++){if(!b._countedByPrototype){f.push(b)}}j.unmark(l);return f},enabled:function(b,g,a){for(var d=0,c=[],f;f=b[d];d++){if(!f.disabled&&(!f.type||f.type!=="hidden")){c.push(f)}}return c},disabled:function(b,g,a){for(var d=0,c=[],f;f=b[d];d++){if(f.disabled){c.push(f)}}return c},checked:function(b,g,a){for(var d=0,c=[],f;f=b[d];d++){if(f.checked){c.push(f)}}return c}},operators:{"=":function(b,a){return b==a},"!=":function(b,a){return b!=a},"^=":function(b,a){return b==a||b&&b.startsWith(a)},"$=":function(b,a){return b==a||b&&b.endsWith(a)},"*=":function(b,a){return b==a||b&&b.include(a)},"$=":function(b,a){return b.endsWith(a)},"*=":function(b,a){return b.include(a)},"~=":function(b,a){return(" "+b+" ").include(" "+a+" ")},"|=":function(b,a){return("-"+(b||"").toUpperCase()+"-").include("-"+(a||"").toUpperCase()+"-")}},split:function(b){var a=[];b.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/,function(c){a.push(c[1].strip())});return a},matchElements:function(g,j){var f=$$(j),d=Selector.handlers;d.mark(f);for(var c=0,b=[],a;a=g[c];c++){if(a._countedByPrototype){b.push(a)}}d.unmark(f);return b},findElement:function(b,c,a){if(Object.isNumber(c)){a=c;c=false}return Selector.matchElements(b,c||"*")[a||0]},findChildElements:function(f,j){j=Selector.split(j.join(","));var d=[],g=Selector.handlers;for(var c=0,b=j.length,a;c<b;c++){a=new Selector(j[c].strip());g.concat(d,a.findElements(f))}return(b>1)?g.unique(d):d}});if(Prototype.Browser.IE){Object.extend(Selector.handlers,{concat:function(d,c){for(var f=0,g;g=c[f];f++){if(g.tagName!=="!"){d.push(g)}}return d},unmark:function(a){for(var b=0,c;c=a[b];b++){c.removeAttribute("_countedByPrototype")}return a}})}function $$(){return Selector.findChildElements(document,$A(arguments))}var Form={reset:function(a){$(a).reset();return a},serializeElements:function(h,b){if(typeof b!="object"){b={hash:!!b}}else{if(Object.isUndefined(b.hash)){b.hash=true}}var c,g,a=false,f=b.submit;var d=h.inject({},function(j,l){if(!l.disabled&&l.name){c=l.name;g=$(l).getValue();if(g!=null&&l.type!="file"&&(l.type!="submit"||(!a&&f!==false&&(!f||c==f)&&(a=true)))){if(c in j){if(!Object.isArray(j[c])){j[c]=[j[c]]}j[c].push(g)}else{j[c]=g}}}return j});return b.hash?d:Object.toQueryString(d)}};Form.Methods={serialize:function(b,a){return Form.serializeElements(Form.getElements(b),a)},getElements:function(a){return $A($(a).getElementsByTagName("*")).inject([],function(b,c){if(Form.Element.Serializers[c.tagName.toLowerCase()]){b.push(Element.extend(c))}return b})},getInputs:function(h,c,d){h=$(h);var a=h.getElementsByTagName("input");if(!c&&!d){return $A(a).map(Element.extend)}for(var f=0,j=[],g=a.length;f<g;f++){var b=a[f];if((c&&b.type!=c)||(d&&b.name!=d)){continue}j.push(Element.extend(b))}return j},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"].include(d.tagName.toLowerCase())})},focusFirstElement:function(a){a=$(a);a.findFirstElement().activate();return a},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"].include(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={input:function(a,b){switch(a.type.toLowerCase()){case"checkbox":case"radio":return Form.Element.Serializers.inputSelector(a,b);default:return Form.Element.Serializers.textarea(a,b)}},inputSelector:function(a,b){if(Object.isUndefined(b)){return a.checked?a.value:null}else{a.checked=!!b}},textarea:function(a,b){if(Object.isUndefined(b)){return a.value}else{a.value=b}},select:function(c,g){if(Object.isUndefined(g)){return this[c.type=="select-one"?"selectOne":"selectMany"](c)}else{var b,d,h=!Object.isArray(g);for(var a=0,f=c.length;a<f;a++){b=c.options[a];d=this.optionValue(b);if(h){if(d==g){b.selected=true;return}}else{b.selected=g.include(d)}}}},selectOne:function(b){var a=b.selectedIndex;return a>=0?this.optionValue(b.options[a]):null},selectMany:function(d){var a,f=d.length;if(!f){return null}for(var c=0,a=[];c<f;c++){var b=d.options[c];if(b.selected){a.push(this.optionValue(b))}}return a},optionValue:function(a){return Element.extend(a).hasAttribute("value")?a.value:a.text}};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)}});if(!window.Event){var Event={}}Object.extend(Event,{KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,KEY_HOME:36,KEY_END:35,KEY_PAGEUP:33,KEY_PAGEDOWN:34,KEY_INSERT:45,cache:{},relatedTarget:function(b){var a;switch(b.type){case"mouseover":a=b.fromElement;break;case"mouseout":a=b.toElement;break;default:return null}return Element.extend(a)}});Event.Methods=(function(){var a;if(Prototype.Browser.IE){var b={0:1,1:4,2:2};a=function(d,c){return d.button==b[c]}}else{if(Prototype.Browser.WebKit){a=function(d,c){switch(c){case 0:return d.which==1&&!d.metaKey;case 1:return d.which==1&&d.metaKey;default:return false}}}else{a=function(d,c){return d.which?(d.which===c+1):(d.button===c)}}}return{isLeftClick:function(c){return a(c,0)},isMiddleClick:function(c){return a(c,1)},isRightClick:function(c){return a(c,2)},element:function(f){f=Event.extend(f);var d=f.target,c=f.type,g=f.currentTarget;if(g&&g.tagName){if(c==="load"||c==="error"||(c==="click"&&g.tagName.toLowerCase()==="input"&&g.type==="radio")){d=g}}if(d.nodeType==Node.TEXT_NODE){d=d.parentNode}return Element.extend(d)},findElement:function(d,g){var c=Event.element(d);if(!g){return c}var f=[c].concat(c.ancestors());return Selector.findElement(f,g,0)},pointer:function(f){var d=document.documentElement,c=document.body||{scrollLeft:0,scrollTop:0};return{x:f.pageX||(f.clientX+(d.scrollLeft||c.scrollLeft)-(d.clientLeft||0)),y:f.pageY||(f.clientY+(d.scrollTop||c.scrollTop)-(d.clientTop||0))}},pointerX:function(c){return Event.pointer(c).x},pointerY:function(c){return Event.pointer(c).y},stop:function(c){Event.extend(c);c.preventDefault();c.stopPropagation();c.stopped=true}}})();Event.extend=(function(){var a=Object.keys(Event.Methods).inject({},function(b,c){b[c]=Event.Methods[c].methodize();return b});if(Prototype.Browser.IE){Object.extend(a,{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]"}});return function(b){if(!b){return false}if(b._extendedByPrototype){return b}b._extendedByPrototype=Prototype.emptyFunction;var c=Event.pointer(b);Object.extend(b,{target:b.srcElement,relatedTarget:Event.relatedTarget(b),pageX:c.x,pageY:c.y});b._stopPropagation=b.stopPropagation;b._preventDefault=b.preventDefault;return Object.extend(b,a)}}else{Event.prototype=Event.prototype||document.createEvent("HTMLEvents")["__proto__"];Object.extend(Event.prototype,a);return Prototype.K}})();Object.extend(Event,(function(){var d=Event.cache;function f(l){if(l._prototypeEventID){return l._prototypeEventID[0]}arguments.callee.id=arguments.callee.id||1;return l._prototypeEventID=[++arguments.callee.id]}function b(l){if(l&&l.include(":")){return"dataavailable"}return l}function g(l){return d[l]=d[l]||{}}function h(n,l){var m=g(n);return m[l]=m[l]||[]}function a(m,l,n){var q=f(m);var p=h(q,l);if(p.pluck("handler").include(n)){return false}var o=function(r){if(!Event||!Event.extend||(r.eventName&&r.eventName!=l)){return false}Event.extend(r);n.call(m,r)};o.handler=n;p.push(o);return o}function c(o,l,m){var n=h(o,l);return n.find(function(p){return p.handler==m})}function j(o,l,m){var n=g(o);if(!n[l]){return false}n[l]=n[l].without(c(o,l,m))}if(Prototype.Browser.WebKit){window.addEventListener("unload",Prototype.emptyFunction,false)}return{getDOMEventName:b,observe:function(n,l,o){n=$(n);var m=b(l);var p=a(n,l,o);if(!p){return n}if(n.addEventListener){n.addEventListener(m,p,false)}else{n.attachEvent("on"+m,p)}return n},stopObserving:function(n,l,o){n=$(n);var q=f(n),m=b(l);if(!o&&l){h(q,l).each(function(r){n.stopObserving(l,r.handler)});return n}else{if(!l){Object.keys(g(q)).each(function(r){n.stopObserving(r)});return n}}var p=c(q,l,o);if(!p){return n}if(n.removeEventListener){n.removeEventListener(m,p,false)}else{n.detachEvent("on"+m,p)}j(q,l,o);return n},fire:function(n,m,l){n=$(n);if(n==document&&document.createEvent&&!n.dispatchEvent){n=document.documentElement}var o;if(document.createEvent){o=document.createEvent("HTMLEvents");o.initEvent("dataavailable",true,true)}else{o=document.createEventObject();o.eventType="ondataavailable"}o.eventName=m;o.memo=l||{};if(document.createEvent){n.dispatchEvent(o)}else{n.fireEvent(o.eventType,o)}return Event.extend(o)}}})());Object.extend(Event,Event.Methods);Element.addMethods({fire:Event.fire,observe:Event.observe,stopObserving:Event.stopObserving});Object.extend(document,{fire:Element.Methods.fire.methodize(),observe:Element.Methods.observe.methodize(),stopObserving:Element.Methods.stopObserving.methodize(),loaded:false});(function(){var c;function b(){if(document.loaded){return}if(c){window.clearInterval(c)}document.fire("dom:loaded");document.loaded=true}if(document.addEventListener){if(Prototype.Browser.WebKit){c=window.setInterval(function(){if(/loaded|complete/.test(document.readyState)){b()}},0);Event.observe(window,"load",b)}else{document.addEventListener("DOMContentLoaded",b,false)}}else{if(document.loaded){return}if(document.readyState!="complete"){document.write("<script id=__onDOMContentLoaded defer src=//:><\/script>");var a=$("__onDOMContentLoaded");if(a){a.onreadystatechange=function(){if(this.readyState=="complete"){this.onreadystatechange=null;b()}}}}}})();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,f){f=f.toString().strip();var d=/\s/.test(f)?$w(f).map(a).join(""):a(f);return d?document._getElementsByXPath(".//*"+d,c):[]}:function(f,g){g=g.toString().strip();var h=[],j=(/\s/.test(g)?$w(g):null);if(!j&&!g){return h}var c=$(f).getElementsByTagName("*");g=" "+g+" ";for(var d=0,m,l;m=c[d];d++){if(m.className&&(l=" "+m.className+" ")&&(l.include(g)||(j&&j.all(function(n){return !n.toString().blank()&&l.include(" "+n+" ")})))){h.push(Element.extend(m))}}return h};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);Element.addMethods();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(g,f,h){if(g){this.applyCleaners(g,f,h);var b=g.all;if(b){var a=0;var d=b.length;for(var a=0;a<d;a++){this.applyCleaners(b[a],f,h)}}else{var c=g.firstChild;while(c){this._clean(c,f,h);c=c.nextSibling}}}},_cleanComponentNodes:function(f,d){for(var b=0;b<f.length;b++){var c=f[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,f){var b=d.component;if(b){var c=b["rich:destructor"];if(c){var a=b[c];if(a){a.call(b,f)}}}},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(f,h){var d=f._prototypeEventID?f._prototypeEventID[0]:undefined;if(d){var b=Event.cache[d];for(var a in b){var g=b[a];var c=Event.getDOMEventName(a);g.each(function(j){if(f.removeEventListener){f.removeEventListener(c,j,false)}else{f.detachEvent("on"+c,j)}});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_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(f){var d=false,h;var g;for(var b=0;b<f.length&&!d;b++){try{var a=new ActiveXObject(f[b]);g=f[b];d=true}catch(c){h=c}}if(!d){throw"Could not retrieve a valid progID of Class: "+f[f.length-1]+". (original exception: "+h+")"}f=null;return g};_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(j,d){this.processor.input=j;this.processor.transform();var g=this.processor.output;var h=d.createDocumentFragment();var b;if(this.outputMethod=="text"){h.appendChild(d.createTextNode(g))}else{if(d.body&&d.body.innerHTML){b=d.createElement("div");b.innerHTML=g;while(b.hasChildNodes()){h.appendChild(b.firstChild)}}else{var a=new ActiveXObject(_SARISSA_DOM_PROGID);if(g.substring(0,5)=="<?xml"){g=g.substring(g.indexOf("?>")+2)}var c="".concat("<my>",g,"</my>");a.loadXML(c);b=a.documentElement;while(b.hasChildNodes()){h.appendChild(b.firstChild)}}}return h};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){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(n,h){var j;if(n.nodeName=="#text"){return document.createTextNode(n.data)}else{var d=n.nodeName.toUpperCase();var b=importTable[d];var c;if(h){c=n.xml?n.xml:n.outerHTML}else{c=n.xml?n.cloneNode(false).xml:n.cloneNode(false).outerHTML}var l=document.createElement("div");if(b){c=b[0]+c+b[1]}l.innerHTML=c;var m=new Array(l.firstChild);var o;while(!o){var a=new Array();for(var g=0;g<m.length&&!o;g++){var f=m[g];while(f){if(f.tagName&&f.tagName.toUpperCase()==d){o=f;break}else{if(f.firstChild){a.push(f.firstChild)}f=f.nextSibling}}}m=a}return o}}}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(h,b){var f="";var c=h.childNodes;for(var d=0;d<c.length;d++){var g=c[d];var a=g.nodeType;if(a==Node.TEXT_NODE||a==Node.CDATA_SECTION_NODE){f+=g.data}else{if(b===true&&(a==Node.ELEMENT_NODE||a==Node.DOCUMENT_NODE||a==Node.DOCUMENT_FRAGMENT_NODE)){f+=Sarissa.getText(g,true)}}}return f};if(!window.XMLSerializer&&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,f,g){if(Sarissa._SARISSA_IS_SAFARI&&f.nodeType==Node.DOCUMENT_NODE){f=f.documentElement}if((!d)||(!f)){throw"Both source and destination nodes must be provided"}if(!g){Sarissa.clearChildNodes(f)}var b=f.nodeType==Node.DOCUMENT_NODE?f:f.ownerDocument;var a=d.childNodes;var c;if(typeof(b.importNode)!="undefined"){for(c=0;c<a.length;c++){f.appendChild(b.importNode(a[c],true))}}else{for(c=0;c<a.length;c++){f.appendChild(a[c].cloneNode(true))}}};Sarissa.moveChildNodes=function(d,f,g){if((!d)||(!f)){throw"Both source and destination nodes must be provided"}if(!g){Sarissa.clearChildNodes(f)}var a=d.childNodes;if(d.ownerDocument==f.ownerDocument){while(d.firstChild){f.appendChild(d.firstChild)}}else{var b=f.nodeType==Node.DOCUMENT_NODE?f:f.ownerDocument;var c;if(typeof(b.importNode)!="undefined"){for(c=0;c<a.length;c++){f.appendChild(b.importNode(a[c],true))}}else{for(c=0;c<a.length;c++){f.appendChild(a[c].cloneNode(true))}}Sarissa.clearChildNodes(d)}};Sarissa.xmlize=function(f,h,d){d=d?d:"";var g=d+"<"+h+">";var b=false;if(!(f instanceof Object)||f instanceof Number||f instanceof String||f instanceof Boolean||f instanceof Date){g+=Sarissa.escape(""+f);b=true}else{g+="\n";var a=f instanceof Array;for(var c in f){g+=Sarissa.xmlize(f[c],(a?'array-item key="'+c+'"':c),d+"   ")}g+=d}return(g+=(h.indexOf(" ")!=-1?"</array-item>\n":"</"+h+">\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,j,a,h,f){try{Sarissa.updateCursor(j,"wait");var b=new XMLHttpRequest();b.open("GET",c,true);b.onreadystatechange=function(){if(b.readyState==4){try{var l=b.responseXML;if(l&&Sarissa.getParseErrorText(l)==Sarissa.PARSED_OK){Sarissa.updateContentFromNode(b.responseXML,j,a);h(c,j)}else{throw Sarissa.getParseErrorText(l)}}catch(m){if(h){h(c,j,m)}else{throw m}}}};if(f){var g="Sat, 1 Jan 2000 00:00:00 GMT";b.setRequestHeader("If-Modified-Since",g)}b.send("")}catch(d){Sarissa.updateCursor(j,"auto");if(h){h(c,j,d)}else{throw d}}};Sarissa.updateContentFromNode=function(f,g,a){try{Sarissa.updateCursor(g,"wait");Sarissa.clearChildNodes(g);var b=f.nodeType==Node.DOCUMENT_NODE?f:f.ownerDocument;if(b.parseError&&b.parseError.errorCode!=0){var d=document.createElement("pre");d.appendChild(document.createTextNode(Sarissa.getParseErrorText(b)));g.appendChild(d)}else{if(a){f=a.transformToDocument(f)}if(g.tagName.toLowerCase()=="textarea"||g.tagName.toLowerCase()=="input"){g.value=new XMLSerializer().serializeToString(f)}else{if(f.nodeType==Node.DOCUMENT_NODE||f.ownerDocument.documentElement==f){g.innerHTML=new XMLSerializer().serializeToString(f)}else{g.appendChild(g.ownerDocument.importNode(f,true))}}}}catch(c){throw c}finally{Sarissa.updateCursor(g,"auto")}};Sarissa.formToQueryString=function(h){var a="";for(var g=0;g<h.elements.length;g++){var f=h.elements[g];var d=f.getAttribute("name")?f.getAttribute("name"):f.getAttribute("id");if(d&&((!f.disabled)||f.type=="hidden")){switch(f.type){case"hidden":case"text":case"textarea":case"password":a+=d+"="+encodeURIComponent(f.value)+"&";break;case"select-one":a+=d+"="+encodeURIComponent(f.options[f.selectedIndex].value)+"&";break;case"select-multiple":for(var c=0;c<f.length;c++){var b=f.options[c];if(b.selected===true){a+=d+"[]="+encodeURIComponent(b.value)+"&"}}break;case"checkbox":case"radio":if(f.checked){a+=d+"="+encodeURIComponent(f.value)+"&"}break}}}return a.substr(0,a.length-1)};Sarissa.updateContentFromForm=function(g,j,a,h){try{Sarissa.updateCursor(j,"wait");var f=Sarissa.formToQueryString(g)+"&"+Sarissa.REMOTE_CALL_FLAG+"=true";var b=new XMLHttpRequest();var c=g.getAttribute("method")&&g.getAttribute("method").toLowerCase()=="get";if(c){b.open("GET",g.getAttribute("action")+"?"+f,true)}else{b.open("POST",g.getAttribute("action"),true);b.setRequestHeader("Content-type","application/x-www-form-urlencoded");b.setRequestHeader("Content-length",f.length);b.setRequestHeader("Connection","close")}b.onreadystatechange=function(){try{if(b.readyState==4){var l=b.responseXML;if(l&&Sarissa.getParseErrorText(l)==Sarissa.PARSED_OK){Sarissa.updateContentFromNode(b.responseXML,j,a);h(g,j)}else{throw Sarissa.getParseErrorText(l)}}}catch(m){if(h){h(g,j,m)}else{throw m}}};b.send(c?"":f)}catch(d){Sarissa.updateCursor(j,"auto");if(h){h(g,j,d)}else{throw d}}return false};A4J.AJAX={};A4J.AJAX.Stub=function(){};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("Reqest 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("Reqest end with state 4");if(c._timeoutID){window.clearTimeout(c._timeoutID)}var g;var d;try{g=c._request.status;d=c._request.statusText}catch(f){LOG.error("request don't have status code - network problem, "+f.message);g=599;d="Network error"}if(g==200){try{LOG.debug("Response  with content-type: "+c.getResponseHeader("Content-Type"));LOG.debug("Full response content: ",c.getResponseText())}catch(f){}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="Reqest error, status : "+g+" "+d;LOG.error(c._errorMessage);if(typeof(c._onerror)=="function"){c._onerror(c,g,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(f){}if(!a){LOG.debug("Header "+b+" not found, search in <meta>");if(this._parsingStatus==Sarissa.PARSED_OK){var g=this.getElementsByTagName("meta");for(var c=0;c<g.length;c++){var d=g[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 f;try{f=c.selectNodes('.//*[local-name()="'+a+'"]')}catch(b){try{f=c.getElementsByTagName(a)}catch(d){LOG.debug("getElementsByTagName found no elements, "+d.Message)}}return f},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 f=0;f<d.length;f++){c._evaluateScript(d[f])}d=null;if(b){c.doFinish()}c=undefined},0)}else{if(b){this.doFinish()}}},updatePagePart:function(j,d){var c=this.getElementById(j);if(!c){LOG.error("New node for ID "+j+" is not present in response");if(d){this.doFinish()}return}var a=window.document.getElementById(j);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(g){LOG.error("Error to clear node content by innerHTML "+g.message);Sarissa.clearChildNodes(a)}}a.outerHTML=new XMLSerializer().serializeToString(c)}else{Sarissa.clearChildNodes(a);var f=window.document.importNode(c,true);LOG.debug("Replace content of node by replaceChild()");var h=null;A4J.AJAX.TestReplacedGetElementByIdVisibility();if(!A4J.AJAX._testReplacedGetElementByIdVisibility){LOG.debug("Temporarily substituting document.getElementById() to work around WebKit issue");h=document.getElementById;document.getElementById=function(o){var m=h.apply(document,arguments);if(!m){var o=arguments[0];LOG.debug("Element [@id='"+o+"'] was not found in document, trying to locate XPath match");try{var l=f.ownerDocument.evaluate("//*[@id='"+o+"']",f,null,XPathResult.ANY_UNORDERED_NODE_TYPE);if(l){m=l.singleNodeValue}LOG.debug("XPath located: "+m)}catch(n){LOG.error("Error locating [@id='"+o+"'] element: "+n.message)}}return m}}try{b.replaceChild(f,a)}finally{if(h){LOG.debug("Restoring document.getElementById()");document.getElementById=h}}}if(!A4J.AJAX._scriptEvaluated){this.evalScripts(c,d)}LOG.debug("Update part of page for Id: "+j+" successful")}else{LOG.warn("Node for replace by response with id "+j+" 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(g){var c=this._appendNewElements("script","src",null,null,["type","language","charset"]);var f=this;c.concat(this._appendNewElements("link","href","class",["component","user"],["type","rev","media"],{"class":"className"},function(j,h){f._copyAttribute(j,h,"rel")}));if(c.length==0){g();return}A4J.AJAX.headElementsCounter=c.length;var a=function(){if(this.readyState=="loaded"||this.readyState=="complete"){this.onreadystatechange=null;this.onload=null;g()}};var d=function(){this.onreadystatechange=null;this.onload=null;g()};for(var b=0;b<c.length;b++){c[b].onreadystatechange=a;c[b].onload=d}},_appendNewElements:function(B,u,C,r,n,b,d){var f=document.getElementsByTagName("head")[0]||document.documentElement;var c=this.getElementsByTagName(B);var p=document.getElementsByTagName(B);var g=(b&&b[C])||C;var q=[];var v={};if(r){var t=0;for(var s=0;s<p.length;s++){var h=p[s];var w=h[g];for(;t<r.length&&r[t]!=w;t++){v[r[t]]=h}if(t==r.length){break}}}for(var t=0;t<c.length;t++){var a=c[t];var l=a.getAttribute(u);var o;if(r){o=a.getAttribute(C)}if(l){var z=false;LOG.debug("<"+B+"> in response with src="+l);for(var s=0;s<p.length;s++){if(this._noSessionHref(l)==this._noSessionHref(p[s].getAttribute(u))){LOG.debug("Such element exist in document");if(C){var A=p[s][g];if((!o^!A)||(o&&A&&o!=A)){LOG.warn("Roles are different")}}z=true;break}}if(!z){var y=document.createElement(B);y.setAttribute(u,l);for(var s=0;s<n.length;s++){this._copyAttribute(a,y,n[s])}if(o){y[g]=o}LOG.debug("append element to document");for(var s=0;s<A4J.AJAX._headTransformers.length;s++){A4J.AJAX._headTransformers[s](y)}var m=v[o];if(m&&m.parentNode){m.parentNode.insertBefore(y,m)}else{f.appendChild(y)}if(d){d(a,y)}if(B!="link"||y.type.toLowerCase()=="text/javascript"){q.push(y)}}}}return q},_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(a,c,b){A4J.AJAX.StopPoll(b.pollId);if(!b.onerror){b.onerror=function(g,d,f){if(typeof(A4J.AJAX.onError)=="function"){A4J.AJAX.onError(g,d,f)}A4J.AJAX.Poll(a,c,b)}}if(!b.onqueuerequestdrop){b.onqueuerequestdrop=function(){A4J.AJAX.Poll(a,c,b)}}A4J.AJAX.SetZeroRequestDelay(b);A4J.AJAX._pollers[b.pollId]=window.setTimeout(function(){A4J.AJAX._pollers[b.pollId]=undefined;if((typeof(b.onsubmit)=="function")&&(b.onsubmit()==false)){A4J.AJAX.Poll(a,c,b)}else{A4J.AJAX.Submit(a,c,null,b)}},b.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(a,c,b){A4J.AJAX.StopPush(b.pushId);b.onerror=function(){A4J.AJAX.Push(a,c,b)};b.onqueuerequestdrop=function(){LOG.debug("Push main request dropped from queue")};A4J.AJAX._pollers[b.pushId]=window.setTimeout(function(){var d=new XMLHttpRequest();d.onreadystatechange=function(){if(d.readyState==4){try{if(d.status==200){if(d.getResponseHeader("Ajax-Push-Status")=="READY"){A4J.AJAX.SetZeroRequestDelay(b);A4J.AJAX.Submit(a,c||b.dummyForm,null,b)}}}catch(f){}d=null;A4J.AJAX._pollers[b.pushId]=null;A4J.AJAX.Push(a,c,b)}};A4J.AJAX.SendPush(d,b)},b.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(a,d,b){var c=A4J.AJAX.CloneObject(b);if(A4J._formInput){LOG.debug("Form submitted by button "+A4J._formInput.id);c.control=A4J._formInput;A4J._formInput=null;c.submitByForm=true}A4J.AJAX.Submit(a,d,null,c)};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(f,h,d,l){for(var j=0;j<A4J.AJAX._listeners.length;j++){var b=A4J.AJAX._listeners[j];if(b.onbeforeajax){b.onbeforeajax(h,d,l)}}LOG.debug("Query preparation for form '"+h+"' requested");var a=window.document.getElementById(h);if((!a||a.nodeName.toUpperCase()!="FORM")&&d){var g=d.target||d.srcElement||null;if(g){a=A4J.AJAX.locateForm(g)}}if(!l.submitByForm&&a&&a.onsubmit){LOG.debug("Form have onsubmit function, call it");if(a.onsubmit()==false){return false}}var c=new A4J.Query(f,a);c.appendFormControls(l.single,l.control);if(l.parameters){c.appendParameters(l.parameters)}if(l.actionUrl){c.setActionUrl(l.actionUrl)}return c};A4J.AJAX.SubmitQuery=function(h,b,g){var f=new A4J.AJAX.XMLHttpRequest(h);var d=h._form;var a=h._containerId;f.options=b;f.containerId=a;f.domEvt=g;f.form=d;if(b.timeout){f.setRequestTimeout(b.timeout)}f.onready=A4J.AJAX.processResponse;if(b.onerror){f._onerror=b.onerror}else{if(typeof(A4J.AJAX.onError)=="function"){f._onerror=A4J.AJAX.onError}}var c=b.queueonerror;if(c){var j=f._onerror;if(j){f._onerror=function(){c.apply(this,arguments);j.apply(this,arguments)}}else{f._onerror=c}}f.onfinish=A4J.AJAX.finishRequest;LOG.debug("NEW AJAX REQUEST !!! with form: "+(d.id||d.name||d));A4J.AJAX.status(a,b.status,true);f.send();return f};A4J.AJAX.Submit=function(b,h,d,c){var g=A4J.AJAX.CloneEvent(d);var f=A4J.AJAX.PrepareQuery(b,h,g,c);if(f){var a=A4J.AJAX.EventQueue.getOrCreateQueue(c,h);if(a){a.push(f,c,g)}else{A4J.AJAX.SubmitQuery(f,c,g)}}return false};A4J.AJAX.SubmitRequest=function(a,g,c,b){var f=A4J.AJAX.CloneEvent(c);var d=A4J.AJAX.PrepareQuery(a,g,f,b);if(d){A4J.AJAX.SubmitQuery(d,b,f)}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 f=a.options;var w=a.getResponseHeader("Ajax-Response");var u=a.getResponseHeader("Ajax-Expired");if(u&&typeof(A4J.AJAX.onExpired)=="function"){var l=A4J.AJAX.onExpired(window.location,u);if(l){window.location=l;return}}if(w!="true"){LOG.warn("No ajax response header ");var l=a.getResponseHeader("Location");try{if(w=="redirect"&&l){window.location=l}else{if(w=="reload"){window.location.reload(true)}else{A4J.AJAX.replacePage(a)}}}catch(r){LOG.error("Error redirect to new location ")}}else{if(a.getParserStatus()==Sarissa.PARSED_OK){if(f.onbeforedomupdate||f.queueonbeforedomupdate){var p=a.domEvt;var v=a.getJSON("_ajax:data");LOG.debug("Call local onbeforedomupdate function before replacing elemements");if(f.onbeforedomupdate){f.onbeforedomupdate(a,p,v)}if(f.queueonbeforedomupdate){f.queueonbeforedomupdate(a,p,v)}}var b=a.getResponseHeader("Ajax-Update-Ids");var o;var h=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,o)}};if(f.affected){o=f.affected;a.appendNewHeadElements(h)}else{if(b&&b!=""){LOG.debug("Update page by list of rendered areas from response "+b);o=b.split(",");a.appendNewHeadElements(h)}else{LOG.warn("No information in response about elements to replace");a.doFinish()}}var t=a.getElementById("ajax-view-state");LOG.debug("Hidden JSF state fields: "+t);if(t!=null){var m=f.parameters["org.ajax4jsf.portlet.NAMESPACE"];LOG.debug("Namespace for hidden view-state input fields is "+m);var j=m?window.document.getElementById(m):window.document;var c=j.getElementsByTagName("input");try{var q=a.getElementsByTagName("input",t);A4J.AJAX.replaceViewState(c,q)}catch(r){LOG.warn("No elements 'input' in response")}try{var q=a.getElementsByTagName("INPUT",t);A4J.AJAX.replaceViewState(c,q)}catch(r){LOG.warn("No elements 'INPUT' in response")}}for(var n=0;n<A4J.AJAX._listeners.length;n++){var g=A4J.AJAX._listeners[n];if(g.onafterajax){var v=a.getJSON("_ajax:data");g.onafterajax(a,a.domEvt,v)}}var s=a.getJSON("_A4J.AJAX.focus");if(s){LOG.debug("focus must be set to control "+s);var d=false;if(a.form){d=a.form.elements[s]}if(!d){LOG.debug("No control element "+s+" in submitted form");d=document.getElementById(s)}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(f,h,d,g){c(f,h,d,g)}}window.setTimeout(function(){var f=false;try{var n=b.getContentType();var l=a?b.getResponseText().replace(/(<script(?!\s+src=))/igm,"$1 defer "):b.getResponseText();window.document.open(n,"replace");if(window.LOG){LOG.debug("window.document has opened for writing")}f=true;window.document.write(l);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(m){if(window.LOG){LOG.debug("exception during write page content "+m.Message)}if(f){window.document.close()}var j=(new DOMParser()).parseFromString(b.getResponseText(),"text/xml");if(Sarissa.getParseErrorText(j)==Sarissa.PARSED_OK){if(window.LOG){LOG.debug("response has parsed as DOM documnet.")}Sarissa.clearChildNodes(window.document.documentElement);var d=j.documentElement.childNodes;for(var g=0;g<d.length;g++){if(d[g].nodeType==1){if(window.LOG){LOG.debug("append new node in document")}var h=window.document.importNode(d[g],true);window.document.documentElement.appendChild(h)}}}else{if(window.LOG){LOG.error("Error parsing response",Sarissa.getParseErrorText(j))}}}finally{window.document.open=c}if(window.LOG){LOG.debug("page content has been replaced")}},0)};A4J.AJAX.replaceViewState=function(a,f){LOG.debug("Replace value for inputs: "+a.length+" by new values: "+f.length);if((f.length>0)&&(a.length>0)){for(var d=0;d<f.length;d++){var g=f[d];LOG.debug("Input in response: "+g.getAttribute("name"));for(var c=0;c<a.length;c++){var b=a[c];if(b.name==g.getAttribute("name")){LOG.debug("Found same input on page with type: "+b.type);b.value=g.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 h=c.domEvt;var j;try{j=c.getJSON("_ajax:data")}catch(m){LOG.warn("Error reading data from request "+m.message)}try{var l=null;if(h){l=h.target?h.target:h.srcElement}var g=Sarissa.getText(a,true);var f=new Function("request","event","data",g);f.call(l,c,h,j);if(b.queueoncomplete){b.queueoncomplete.call(l,c,h,j)}}catch(m){LOG.error("Error evaluate oncomplete function "+m.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 f=c.domEvt;var g;try{g=c.getJSON("_ajax:data")}catch(h){LOG.warn("Error reading data from request "+h.message)}if(b.oncomplete){b.oncomplete(c,f,g)}if(b.queueoncomplete){b.queueoncomplete(c,f,g)}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(f){if(f.selectionEnd!=null){return f.selectionEnd}var d=document.selection.createRange();var c=d.compareEndPoints("StartToEnd",d)==0;if(!c){d.collapse(false)}var a=d.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(f,b){var d=b["org.ajax4jsf.portlet.NAMESPACE"];var a=d?window.document.getElementById(d):window.document;var c;if(a){c=a.getElementById(f)}else{LOG.error("No root element for portlet namespace "+d+" on page")}return c};A4J.AJAX._requestsCounts={};A4J.AJAX.status=function(f,a,g){try{a=a||f+":status";A4J.AJAX._requestsCounts[a]=(A4J.AJAX._requestsCounts[a]||0)+(g?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(g){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,b){this._query={AJAXREQUEST:a};this._oldSubmit=null;this._form=b;this._containerId=a;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(f){var b=f.name;var a=f.options;for(var c=0;c<f.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(g,d){try{var c=this._form.elements;if(c){var b=0;for(b=0;b<c.length;b++){var f=c[b];if(f==d){continue}try{if(!g||f.type=="hidden"){this.appendControl(f,false)}}catch(a){LOG.error("exception in building query ( append form control ) "+a)}}}}catch(h){LOG.warn("Error with append form controls to query "+h)}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 g=[];var f;for(var c in this._query){if(typeof Object.prototype[c]=="undefined"){d=this._query[c];f=this._encode(c);if(d instanceof Object){for(var b=0;b<d.length;b++){g.push(f);g.push("=");g.push(this._encode(d[b]));g.push("&")}}else{g.push(f);g.push("=");g.push(this._encode(d));g.push("&")}}}a=g.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(h,c){var f="";var b=h.childNodes;for(var d=0;d<b.length;d++){var g=b[d];var a=g.nodeType;if(a==Node.TEXT_NODE||a==Node.CDATA_SECTION_NODE||(c&&a==Node.COMMENT_NODE)){f+=g.data}else{if(a==Node.ELEMENT_NODE||a==Node.DOCUMENT_NODE||a==Node.DOCUMENT_FRAGMENT_NODE){f+=arguments.callee(g,c)}}}return f};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 d=false;var b=a.firstChild;while(b){if(b.nodeType==Node.ELEMENT_NODE){var f=b.firstChild;while(f){if(f.nodeType==Node.COMMENT_NODE){d=true;break}f=f.nextSibling}break}b=b.nextSibling}if(d){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 g="<html xmlns='http://www.w3.org/1999/xhtml'><script>A4J.AJAX._scriptEvaluated=true;<\/script></html>";c=(new DOMParser()).parseFromString(g,"text/xml");var b=c.getElementsByTagName("script")[0];if(!window.opera&&!A4J.AJAX.isWebkitBreakingAmps()&&a.outerHTML){a.outerHTML=new XMLSerializer().serializeToString(b)}else{var f;f=window.document.importNode(b,true);document.body.replaceChild(f,a)}}catch(d){}}A4J.AJAX._scriptTested=true};A4J.AJAX.TestReplacedGetElementByIdVisibility=function(){if(!A4J.AJAX._replacedGetElementByIdVisibilityTested){A4J.AJAX._replacedGetElementByIdVisibilityTested=true;A4J.AJAX.TestScriptEvaluation();if(A4J.AJAX._scriptEvaluated){try{A4J.AJAX._testReplacedGetElementByIdVisibility=true;var b=document.createElement("span");document.body.appendChild(b);var f="<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(f,"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 f="dropNew";var j="dropNext";var b="fireNew";var g="fireNext";var h=function(n,m){for(var l in m){n[l]=m[l]}};var a=function(m){var n={};for(var l in m){n[l]=m[l]}for(var l in this.requestOptions){if(typeof n[l]=="undefined"){n[l]=this.requestOptions[l]}}return n};var c=function(){var l=function(m,p,n,o){this.queue=m;this.query=p;this.options=n;this.event=o;this.similarityGroupingId=this.options.similarityGroupingId;this.eventsCount=1};h(l.prototype,{isIgnoreDupResponses:function(){return this.options.ignoreDupResponses},getSimilarityGroupingId:function(){return this.similarityGroupingId},setSimilarityGroupingId:function(m){this.similarityGroupingId=m},submit:function(){this.query.appendParameter("AJAX:EVENTS_COUNT",this.eventsCount);this.request=A4J.AJAX.SubmitQuery(this.query,this.options,this.event);var m=this.queue;this.request.queue=m;return this.request},abort:function(){if(this.request&&!this.aborted){this.aborted=true;this.request.abort()}},ondrop:function(){var m=this.options.onqueuerequestdrop;if(m){m.call(this.queue,this.query,this.options,this.event)}},onRequestDelayPassed:function(){this.readyToSubmit=true;this.queue.submitFirst()},startTimer:function(){var m=this.options.requestDelay;LOG.debug("Queue will wait "+(m||0)+"ms before submit");if(m){var n=this;this.timer=setTimeout(function(){try{n.onRequestDelayPassed()}finally{n.timer=undefined;n=undefined}},m)}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(m){this.eventsCount=m},getEventArguments:function(){return[this.query,this.options,this.event]}});return l}();var d=function(m,n,l){this.items=new Array();this.name=m;this.queueOptions=n||{};this.requestOptions=l||{}};h(d.prototype,{submitFirst:function(){var m=this.items[0];if(m){if(!m.request){if(m.readyToSubmit){LOG.debug("Queue '"+this.name+"' will submit request NOW");var l=m.submit();l.shouldNotifyQueue=true;if(this.requestOptions.queueonsubmit){this.requestOptions.queueonsubmit.call(this,l)}}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 l=this.queueOptions.sizeExceededBehavior;if(!l){l=j}return l},queue:function(l){this.items.push(l);if(this.queueOptions.onrequestqueue){LOG.debug("Call onrequestqueue handler");this.queueOptions.onrequestqueue.apply(this,l.getEventArguments())}},dequeue:function(){var l=this.items.shift();if(this.queueOptions.onrequestdequeue){LOG.debug("Call onrequestdequeue handler");this.queueOptions.onrequestdequeue.apply(this,l.getEventArguments())}},push:function(p,l,m){var w=a.call(this,l);var u=new c(this,p,w,m);var o=u.getSimilarityGroupingId();var t=this.items.length-1;var v=this.items[t];var n=false;if(v){if(v.getSimilarityGroupingId()==o){LOG.debug("Similar request currently in queue '"+this.name+"'");if(v.request){LOG.debug("Request has already beeen sent to server");if(u.isIgnoreDupResponses()){LOG.debug("Duplicate responses ignore requested");if(!this.isFull()){v.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");n=true;v.stopTimer();u.setEventsCount(v.getEventsCount()+1);this.items[t]=u;u.startTimer()}}else{LOG.debug("Last queue entry is not the last anymore. Stopping requestDelay timer and marking entry as ready for submission");v.stopTimer();v.setSimilarityGroupingId(undefined);v.readyToSubmit=true}}if(!n){if(this.isFull()){LOG.debug("Queue '"+this.name+"' is currently full");var s=this.getSizeExceededBehavior();var r=0;while(this.items[r]&&this.items[r].request){r++}if(this.queueOptions.onsizeexceeded){this.queueOptions.onsizeexceeded.apply(this,u.getEventArguments())}if(s==f){LOG.debug("Queue '"+this.name+"' is going to drop new item");u.ondrop();n=true}else{if(s==j){LOG.debug("Queue '"+this.name+"' is going to drop ["+r+"] item that is the next one");var q=this.items.splice(r,1)[0];if(q){LOG.debug("Item dropped from queue");q.stopTimer();q.ondrop()}else{LOG.debug("There's no such item, will handle new request instead");u.ondrop();n=true}}else{if(s==b){LOG.debug("Queue '"+this.name+"' will submit new request");u.submit();n=true}else{if(s==g){LOG.debug("Queue '"+this.name+"' is going to drop and fire immediately ["+r+"] item that is the next one");var q=this.items.splice(r,1)[0];if(q){LOG.debug("Item dropped from queue");q.stopTimer();q.submit()}else{LOG.debug("There's no such item, will handle new request instead");u.submit();n=true}}}}}}this.submitFirst()}if(!n){this.queue(u);LOG.debug("New request added to queue '"+this.name+"'. Queue similarityGroupingId changed to "+o);u.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 m=this.items.length;for(var l=0;l<this.items.length;l++){this.items[l].clearEntry()}this.items.splice(0,m)}});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(f,m){var j=f.eventsQueue;var h=f.namespace;var d;var g;var l;if(j){LOG.debug("Look up queue with name '"+j+"'");d=a(j,m);g=b(j,h);l=g}else{LOG.debug("Look up queue with default name");d=m;g=b(A4J.AJAX.EventQueue.DEFAULT_QUEUE_NAME,h);l=f.implicitEventsQueue}var c=A4J.AJAX._eventQueues[d];if(!c){c=A4J.AJAX._eventQueues[g];if(!c){if(l){c=A4J.AJAX._eventQueues[l];if(!c){LOG.debug("Creating new transient queue '"+l+"' with default settings");c=new A4J.AJAX.EventQueue(l);c._transient=true;A4J.AJAX.EventQueue.addQueue(c)}else{LOG.debug("Found transient queue '"+l+"'")}}}else{LOG.debug("Found view queue '"+g+"'")}}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,f,a,g){if(!LOG._onkeydown){LOG._onkeydown=document.onkeydown}var d=b.toUpperCase();document.onkeydown=function(h){if(window.event){h=window.event}if(String.fromCharCode(h.keyCode)==d&h.shiftKey&h.ctrlKey){LOG.LEVEL=g;LOG.openWindow(c,"width="+f+",height="+a+",toolbar=no,scrollbars=yes,location=no,statusbar=no,menubar=no,resizable=yes,left = "+((screen.width-f)/2)+",top ="+((screen.height-a)/2))}else{if(LOG._onkeydown){LOG._onkeydown(h)}}}};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 f=d.getSeconds();if(f<10){f="0"+f}var b=d.getTime()%1000;if(b<100){b="0"+b}if(b<10){b="0"+b}return a+":"+c+":"+f+","+b};LOG._logToConsole=function(c,b,f){var g;var h;if(LOG._window&&LOG._window.document){h=LOG._window.document;g=LOG._window.document.body}else{h=window.document;g=window.document.getElementById(LOG.consoleDivId)}if(g){var j=h.createElement("span");j.style.color=b.color;j.appendChild(h.createTextNode(b.name+"["+LOG._time()+"]: "));var a=h.createElement("div");var l=h.createTextNode(c);a.appendChild(j);a.appendChild(l);if(f){var d=h.createElement("span");l=h.createTextNode(f);d.appendChild(l);a.appendChild(d)}g.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(g,f,h){if(g){this.applyCleaners(g,f,h);var b=g.all;if(b){var a=0;var d=b.length;for(var a=0;a<d;a++){this.applyCleaners(b[a],f,h)}}else{var c=g.firstChild;while(c){this._clean(c,f,h);c=c.nextSibling}}}},_cleanComponentNodes:function(f,d){for(var b=0;b<f.length;b++){var c=f[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,f){var b=d.component;if(b){var c=b["rich:destructor"];if(c){var a=b[c];if(a){a.call(b,f)}}}},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 g=this.NODEMAP[a]||"div";var b=document.createElement(g);try{b.innerHTML="<"+a+"></"+a+">"}catch(f){}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(f){}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 f;if(((typeof b=="object")||Object.isFunction(b))&&(b.length)){f=b}else{f=$(b).childNodes}var a=Object.extend({speed:0.1,delay:0},arguments[2]||{});var d=a.delay;$A(f).each(function(h,g){new c(h,Object.extend(a,{delay:g*a.speed+d}))})},PAIRS:{slide:["SlideDown","SlideUp"],blind:["BlindDown","BlindUp"],appear:["Appear","Fade"]},toggle:function(b,c){b=$(b);c=(c||"appear").toLowerCase();var a=Object.extend({queue:{position:"end",scope:(b.id||"global"),limit:1}},arguments[2]||{});Effect[b.visible()?Effect.PAIRS[c][1]:Effect.PAIRS[c][0]](b,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){function b(d,c){return((d[c+"Internal"]?"this.options."+c+"Internal(this);":"")+(d[c]?"this.options."+c+"(this);":""))}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 c(f,d){if(f.options[d+"Internal"]){f.options[d+"Internal"](f)}if(f.options[d]){f.options[d](f)}}return function(d){if(this.state==="idle"){this.state="running";c(this,"beforeSetup");if(this.setup){this.setup()}c(this,"afterSetup")}if(this.state==="running"){d=(this.options.transition(d)*this.fromToDelta)+this.options.from;this.position=d;c(this,"beforeUpdate");if(this.update){this.update(d)}c(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,g,f){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(h){c[d]=h};this.start(Object.extend({from:g,to:f},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,f){var g={};if(this.options.scaleX){g.width=f.round()+"px"}if(this.options.scaleY){g.height=a.round()+"px"}if(this.options.scaleFromCenter){var c=(a-this.dims[0])/2;var b=(f-this.dims[1])/2;if(this.elementPositioning=="absolute"){if(this.options.scaleY){g.top=this.originalTop-c+"px"}if(this.options.scaleX){g.left=this.originalLeft-b+"px"}}else{if(this.options.scaleY){g.top=-c+"px"}if(this.options.scaleX){g.left=-b+"px"}}}this.element.setStyle(g)}});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(f){scrollTo(a.left,f.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 f=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:f,y:0,duration:c,afterFinishInternal:function(g){new Effect.Move(g.element,{x:-f*2,y:0,duration:c*2,afterFinishInternal:function(h){new Effect.Move(h.element,{x:f*2,y:0,duration:c*2,afterFinishInternal:function(j){new Effect.Move(j.element,{x:-f*2,y:0,duration:c*2,afterFinishInternal:function(l){new Effect.Move(l.element,{x:f*2,y:0,duration:c*2,afterFinishInternal:function(m){new Effect.Move(m.element,{x:-f,y:0,duration:c,afterFinishInternal:function(n){n.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 h=c.getDimensions();var j,g;var f,d;switch(b.direction){case"top-left":j=g=f=d=0;break;case"top-right":j=h.width;g=d=0;f=-h.width;break;case"bottom-left":j=f=0;g=h.height;d=-h.height;break;case"bottom-right":j=h.width;g=h.height;f=-h.width;d=-h.height;break;case"center":j=h.width/2;g=h.height/2;f=-h.width/2;d=-h.height/2;break}return new Effect.Move(c,{x:j,y:g,duration:0.01,beforeSetup:function(l){l.element.hide().makeClipping().makePositioned()},afterFinishInternal:function(l){new Effect.Parallel([new Effect.Opacity(l.element,{sync:true,to:1,from:0,transition:b.opacityTransition}),new Effect.Move(l.element,{x:f,y:d,sync:true,transition:b.moveTransition}),new Effect.Scale(l.element,100,{scaleMode:{originalHeight:h.height,originalWidth:h.width},sync:true,scaleFrom:window.opera?1:0,transition:b.scaleTransition,restoreAfterFinish:true})],Object.extend({beforeSetup:function(m){m.effects[0].element.setStyle({height:"0px"}).show()},afterFinishInternal:function(m){m.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 g=c.getDimensions();var f,d;switch(b.direction){case"top-left":f=d=0;break;case"top-right":f=g.width;d=0;break;case"bottom-left":f=0;d=g.height;break;case"bottom-right":f=g.width;d=g.height;break;case"center":f=g.width/2;d=g.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:f,y:d,sync:true,transition:b.moveTransition})],Object.extend({beforeStartInternal:function(h){h.effects[0].element.makePositioned().makeClipping()},afterFinishInternal:function(h){h.effects[0].element.hide().undoClipping().undoPositioned().setStyle(a)}},b))};Effect.Pulsate=function(c){c=$(c);var b=arguments[1]||{},a=c.getInlineOpacity(),f=b.transition||Effect.Transitions.linear,d=function(g){return 1-f((-Math.cos((g*(b.pulses||5)*2)*Math.PI)/2)+0.5)};return new Effect.Opacity(c,Object.extend(Object.extend({duration:2,from:0,afterFinishInternal:function(g){g.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(f){d.element.style[f.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(h){var g=h[0],f=h[1],d=null;if(f.parseColor("#zzzzzz")!="#zzzzzz"){f=f.parseColor();d="color"}else{if(g=="opacity"){f=parseFloat(f);if(Prototype.Browser.IE&&(!this.element.currentStyle.hasLayout)){this.element.setStyle({zoom:1})}}else{if(Element.CSS_LENGTH.test(f)){var c=f.match(/^([\+\-]?[0-9\.]+)(.*)$/);f=parseFloat(c[1]);d=(c.length==3)?c[2]:null}}}var b=this.element.getStyle(g);return{style:g.camelize(),originalValue:d=="color"?a(b):parseFloat(b||0),targetValue:d=="color"?a(f):f,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 f=[$(d)||$$(d)].flatten();return f.map(function(g){return new c(g,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,f){d[f]=a[f];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,f,b){c=$(c);var d=f.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(f){if(Droppables.isAffected(a,c,f)){d.push(f)}});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(g,f,d){var h=Math.sqrt(Math.abs(f^2)+Math.abs(d^2))*0.02;new Effect.Move(g,{x:-d,y:-f,duration:h,queue:{scope:"_draggable",position:"end"}})},endeffect:function(f){var d=Object.isNumber(f._opacity)?f._opacity:1;new Effect.Opacity(f,{duration:0.2,from:0.7,to:d,queue:{scope:"_draggable",position:"end"},afterFinish:function(){Draggable._dragging[f]=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=Position.cumulativeOffset(this.element);this.offset=[0,1].map(function(f){return(b[f]-d[f])});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);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,g){this.dragging=false;if(this.options.quiet){Position.prepare();var f=[Event.pointerX(b),Event.pointerY(b)];Droppables.show(f,this.element)}if(this.options.ghosting){if(!this._originallyAbsolute){Position.relativize(this.element)}delete this._originallyAbsolute;Element.remove(this._clone);this._clone=null}var h=false;if(g){h=Droppables.fire(b,this.element);if(!h){h=false}}if(h&&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(h==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 h=Position.cumulativeOffset(this.element);if(this.options.ghosting){var c=Position.realOffset(this.element);h[0]+=c[0]-Position.deltaX;h[1]+=c[1]-Position.deltaY}var g=this.currentDelta();h[0]-=g[0];h[1]-=g[1];if(this.options.scroll&&(this.options.scroll!=window&&this._isScrollChild)){h[0]-=this.options.scroll.scrollLeft-this.originalScrollLeft;h[1]-=this.options.scroll.scrollTop-this.originalScrollTop}var f=[0,1].map(function(d){return(a[d]-h[d]-this.offset[d])}.bind(this));if(this.options.snap){if(Object.isFunction(this.options.snap)){f=this.options.snap(f[0],f[1],this)}else{if(Object.isArray(this.options.snap)){f=f.map(function(d,j){return(d/this.options.snap[j]).round()*this.options.snap[j]}.bind(this))}else{f=f.map(function(d){return(d/this.options.snap).round()*this.options.snap}.bind(this))}}}var b=this.element.style;if((!this.options.constraint)||(this.options.constraint=="horizontal")){b.left=f[0]+"px"}if((!this.options.constraint)||(this.options.constraint=="vertical")){b.top=f[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(g){g.style.top=0;g.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 f={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,f);b.droppables.push(c)}(b.elements||this.findElements(c,b)||[]).each(function(j,g){var h=b.handles?$(b.handles[g]):(b.handle?$(j).select("."+b.handle)[0]:j);b.draggables.push(new Draggable(j,Object.extend(a,{handle:h})));Droppables.add(j,d);if(b.tree){j.treeNode=c}b.droppables.push(j)});if(b.tree){(Sortable.findTreeElements(c,b)||[]).each(function(g){Droppables.add(g,f);g.treeNode=c;b.droppables.push(g)})}this.sortables[c.id]=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(f,d,a){if(Element.isParent(d,f)){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!=f){var b=f.parentNode;f.style.visibility="hidden";d.parentNode.insertBefore(f,d);if(d.parentNode!=b){Sortable.options(b).onChange(f)}Sortable.options(d.parentNode).onChange(f)}}else{Sortable.mark(d,"after");var c=d.nextSibling||null;if(c!=f){var b=f.parentNode;f.style.visibility="hidden";d.parentNode.insertBefore(f,c);if(d.parentNode!=b){Sortable.options(b).onChange(f)}Sortable.options(d.parentNode).onChange(f)}}}},onEmptyHover:function(f,h,j){var l=f.parentNode;var a=Sortable.options(h);if(!Element.isParent(h,f)){var g;var c=Sortable.findElements(h,{tag:a.tag,only:a.only});var b=null;if(c){var d=Element.offsetSize(h,a.overlap)*(1-j);for(g=0;g<c.length;g+=1){if(d-Element.offsetSize(c[g],a.overlap)>=0){d-=Element.offsetSize(c[g],a.overlap)}else{if(d-(Element.offsetSize(c[g],a.overlap)/2)>=0){b=g+1<c.length?c[g+1]:null;break}else{b=c[g];break}}}}h.insertBefore(f,b);Sortable.options(l).onChange(f);a.onChange(f)}},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=Position.cumulativeOffset(b);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(f,b,g){var d=Sortable.findElements(f,b)||[];for(var c=0;c<d.length;++c){var a=d[c].id.match(b.format);if(!a){continue}var h={id:encodeURIComponent(a?a[1]:null),element:f,parent:g,children:[],position:g.children.length,container:$(d[c]).down(b.treeTag)};if(h.container){this._tree(h.container,b,h)}g.children.push(h)}return g},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(f){if(f.id.match(a.format)){d[f.id.match(a.format)[1]]=[f,f.parentNode]}f.parentNode.removeChild(f)});c.each(function(f){var g=d[f];if(g){g[1].appendChild(g[0]);delete d[f]}})},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 f=[];$A(d.childNodes).each(function(h){if(h.tagName&&h.tagName.toUpperCase()==c&&(!b||(Element.classNames(h).detect(function(j){return b.include(j)})))){f.push(h)}if(a){var g=Element.findChildren(h,b,a,c);if(g){f.push(g)}}});return(f.length>0?f.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,f){if(!f.style.position||f.style.position=="absolute"){f.style.position="absolute";Position.clone(d,f,{setHeight:false,offsetTop:d.offsetHeight})}Effect.Appear(f,{duration:0.15})};this.options.onHide=this.options.onHide||function(d,f){new Effect.Fade(f,{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(g){if(this.options.updateElement){this.options.updateElement(g);return}var d="";if(this.options.select){var a=$(g).select("."+this.options.select)||[];if(a.length>0){d=Element.collectTextNodes(a[0],this.options.select)}}else{d=Element.collectTextNodesIgnoreClass(g,"informal")}var c=this.getTokenBounds();if(c[0]!=-1){var f=this.element.value.substr(0,c[0]);var b=this.element.value.substr(c[0]).match(/^\s+/);if(b){f+=b[0]}this.element.value=f+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,g)}},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 f=this.element.value;if(f.strip().empty()){return[-1,0]}var g=arguments.callee.getFirstDifferencePos(f,this.oldElementValue);var j=(g==this.oldElementValue.length?1:0);var d=-1,c=f.length;var h;for(var b=0,a=this.options.tokens.length;b<a;++b){h=f.lastIndexOf(this.options.tokens[b],g+j-1);if(h>d){d=h}h=f.indexOf(this.options.tokens[b],g+j);if(-1!=h&&h<c){c=h}}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 j=b.getToken();var h=0;for(var f=0;f<b.options.array.length&&d.length<b.options.choices;f++){var g=b.options.array[f];var l=b.options.ignoreCase?g.toLowerCase().indexOf(j.toLowerCase()):g.indexOf(j);while(l!=-1){if(l==0&&g.length!=j.length){d.push("<li><strong>"+g.substr(0,j.length)+"</strong>"+g.substr(j.length)+"</li>");break}else{if(j.length>=b.options.partialChars&&b.options.partialSearch&&l!=-1){if(b.options.fullSearch||/\s/.test(g.substr(l-1,1))){c.push("<li>"+g.substr(0,l)+"<strong>"+g.substr(l,j.length)+"</strong>"+g.substr(l+j.length)+"</li>");break}}}l=b.options.ignoreCase?g.toLowerCase().indexOf(j.toLowerCase(),l+1):g.indexOf(j,l+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(h,c,b){var f=this.options[h+"Control"];var g=this.options[h+"Text"];if("button"==f){var a=document.createElement("input");a.type="submit";a.value=g;a.className="editor_"+h+"_button";if("cancel"==h){a.onclick=this._boundCancelHandler}this._form.appendChild(a);this._controls[h]=a}else{if("link"==f){var d=document.createElement("a");d.href="#";d.appendChild(document.createTextNode(g));d.onclick="cancel"==h?this._boundCancelHandler:this._boundSubmitHandler;d.className="editor_"+h+"_link";if(b){d.className+=" "+b}this._form.appendChild(d);this._controls[h]=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,f){var c=b.options["text"+d+"Controls"];if(!c||f===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 f=this.options.callback(b,c)||"";if(Object.isString(f)){f=f.toQueryParams()}f.editorId=this.element.id;if(this.options.htmlResponse){var a=Object.extend({evalScripts:true},this.options.ajaxOptions);Object.extend(a,{parameters:f,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:f,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(f,d){c=document.createElement("option");c.value=f[0];c.selected=a?f[0]==b:0==d;c.appendChild(document.createTextNode(f[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(f){return $(f)})}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(f){return $(f)}):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(g,f){f=c.handles.length-1-f;c.setValue(parseFloat((Object.isArray(c.options.sliderValue)?c.options.sliderValue[f]:c.options.sliderValue)||c.range.start),f);g.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 f=Math.abs(d-a);if(f<=c){b=d;c=f}});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 f=[Event.pointerX(c),Event.pointerY(c)];var a=d;if(a==this.track){var b=Position.cumulativeOffset(this.track);this.event=c;this.setValue(this.translateToValue((this.isVertical()?f[1]-b[1]:f[0]-b[0])-(this.handleLength/2)));var b=Position.cumulativeOffset(this.activeHandle);this.offsetX=(f[0]-b[0]);this.offsetY=(f[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=Position.cumulativeOffset(this.activeHandle);this.offsetX=(f[0]-b[0]);this.offsetY=(f[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=Position.cumulativeOffset(this.track);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{Sound.play=function(){}}
/*
 * jQuery JavaScript Library v1.3.2
 * http://jquery.com/
 *
 * Copyright (c) 2009 John Resig
 * Dual licensed under the MIT and GPL licenses.
 * http://docs.jquery.com/License
 *
 * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
 * Revision: 6246
 */
}(function(){var o=this,h,C=o.jQuery,s=o.$,r=o.jQuery=o.j$=function(I,J){if(arguments[0]==arguments.callee){return arguments.callee}return new r.fn.init(I,J)},H=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,g=/^.[^:#\[\.,]*$/;r.fn=r.prototype={init:function(I,L){I=I||document;if(I.nodeType){this[0]=I;this.length=1;this.context=I;return this}if(typeof I==="string"){var K=H.exec(I);if(K&&(K[1]||!L)){if(K[1]){I=r.clean([K[1]],L)}else{var M=document.getElementById(K[3]);if(M&&M.id!=K[3]){return r().find(I)}var J=r(M||[]);J.context=document;J.selector=I;return J}}else{return r(L).find(I)}}else{if(r.isFunction(I)){return r(document).ready(I)}}if(I.selector&&I.context){this.selector=I.selector;this.context=I.context}return this.setArray(r.isArray(I)?I:r.makeArray(I))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(I){return I===h?Array.prototype.slice.call(this):this[I]},pushStack:function(J,L,I){var K=r(J);K.prevObject=this;K.context=this.context;if(L==="find"){K.selector=this.selector+(this.selector?" ":"")+I}else{if(L){K.selector=this.selector+"."+L+"("+I+")"}}return K},setArray:function(I){this.length=0;Array.prototype.push.apply(this,I);return this},each:function(J,I){return r.each(this,J,I)},index:function(I){return r.inArray(I&&I.jquery?I[0]:I,this)},attr:function(J,L,K){var I=J;if(typeof J==="string"){if(L===h){return this[0]&&r[K||"attr"](this[0],J)}else{I={};I[J]=L}}return this.each(function(M){for(J in I){r.attr(K?this.style:this,J,r.prop(this,I[J],K,M,J))}})},css:function(I,J){if((I=="width"||I=="height")&&parseFloat(J)<0){J=h}return this.attr(I,J,"curCSS")},text:function(J){if(typeof J!=="object"&&J!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(J))}var I="";r.each(J||this,function(){r.each(this.childNodes,function(){if(this.nodeType!=8){I+=this.nodeType!=1?this.nodeValue:r.fn.text([this])}})});return I},wrapAll:function(I){if(this[0]){var J=r(I,this[0].ownerDocument).clone();if(this[0].parentNode){J.insertBefore(this[0])}J.map(function(){var K=this;while(K.firstChild){K=K.firstChild}return K}).append(this)}return this},wrapInner:function(I){return this.each(function(){r(this).contents().wrapAll(I)})},wrap:function(I){return this.each(function(){r(this).wrapAll(I)})},append:function(){return this.domManip(arguments,true,function(I){if(this.nodeType==1){this.appendChild(I)}})},prepend:function(){return this.domManip(arguments,true,function(I){if(this.nodeType==1){this.insertBefore(I,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(I){this.parentNode.insertBefore(I,this)})},after:function(){return this.domManip(arguments,false,function(I){this.parentNode.insertBefore(I,this.nextSibling)})},end:function(){return this.prevObject||r([])},push:[].push,sort:[].sort,splice:[].splice,find:function(I){if(this.length===1){var J=this.pushStack([],"find",I);J.length=0;r.find(I,this[0],J);return J}else{return this.pushStack(r.unique(r.map(this,function(K){return r.find(I,K)})),"find",I)}},clone:function(K){var I=this.map(function(){if(!r.support.noCloneEvent&&!r.isXMLDoc(this)){var M=this.outerHTML;if(!M){var N=this.ownerDocument.createElement("div");N.appendChild(this.cloneNode(true));M=N.innerHTML}return r.clean([M.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(K===true){var L=this.find("*").andSelf(),J=0;I.find("*").andSelf().each(function(){if(this.nodeName!==L[J].nodeName){return}var M=r.data(L[J],"events");for(var O in M){for(var N in M[O]){r.event.add(this,O,M[O][N],M[O][N].data)}}J++})}return I},filter:function(I){return this.pushStack(r.isFunction(I)&&r.grep(this,function(K,J){return I.call(K,J)})||r.multiFilter(I,r.grep(this,function(J){return J.nodeType===1})),"filter",I)},closest:function(I){var K=r.expr.match.POS.test(I)?r(I):null,J=0;return this.map(function(){var L=this;while(L&&L.ownerDocument){if(K?K.index(L)>-1:r(L).is(I)){r.data(L,"closest",J);return L}L=L.parentNode;J++}})},not:function(I){if(typeof I==="string"){if(g.test(I)){return this.pushStack(r.multiFilter(I,this,true),"not",I)}else{I=r.multiFilter(I,this)}}var J=I.length&&I[I.length-1]!==h&&!I.nodeType;return this.filter(function(){return J?r.inArray(this,I)<0:this!=I})},add:function(I){return this.pushStack(r.unique(r.merge(this.get(),typeof I==="string"?r(I):r.makeArray(I))))},is:function(I){return !!I&&r.multiFilter(I,this).length>0},hasClass:function(I){return !!I&&this.is("."+I)},val:function(O){if(O===h){var I=this[0];if(I){if(r.nodeName(I,"option")){return(I.attributes.value||{}).specified?I.value:I.text}if(r.nodeName(I,"select")){var M=I.selectedIndex,P=[],Q=I.options,L=I.type=="select-one";if(M<0){return null}for(var J=L?M:0,N=L?M+1:Q.length;J<N;J++){var K=Q[J];if(K.selected){O=r(K).val();if(L){return O}P.push(O)}}return P}return(I.value||"").replace(/\r/g,"")}return h}if(typeof O==="number"){O+=""}return this.each(function(){if(this.nodeType!=1){return}if(r.isArray(O)&&/radio|checkbox/.test(this.type)){this.checked=(r.inArray(this.value,O)>=0||r.inArray(this.name,O)>=0)}else{if(r.nodeName(this,"select")){var R=r.makeArray(O);r("option",this).each(function(){this.selected=(r.inArray(this.value,R)>=0||r.inArray(this.text,R)>=0)});if(!R.length){this.selectedIndex=-1}}else{this.value=O}}})},html:function(I){return I===h?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(I)},replaceWith:function(I){return this.after(I).remove()},eq:function(I){return this.slice(I,+I+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(I){return this.pushStack(r.map(this,function(K,J){return I.call(K,J,K)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(N,Q,P){if(this[0]){var M=(this[0].ownerDocument||this[0]).createDocumentFragment(),J=r.clean(N,(this[0].ownerDocument||this[0]),M),L=M.firstChild;if(L){for(var K=0,I=this.length;K<I;K++){P.call(O(this[K],L),this.length>1||K>0?M.cloneNode(true):M)}}if(J){r.each(J,D)}}return this;function O(R,S){return Q&&r.nodeName(R,"table")&&r.nodeName(S,"tr")?(R.getElementsByTagName("tbody")[0]||R.appendChild(R.ownerDocument.createElement("tbody"))):R}}};r.fn.init.prototype=r.fn;function D(I,J){if(J.src){r.ajax({url:J.src,async:false,dataType:"script"})}else{r.globalEval(J.text||J.textContent||J.innerHTML||"")}if(J.parentNode){J.parentNode.removeChild(J)}}function f(){return +new Date}r.extend=r.fn.extend=function(){var N=arguments[0]||{},L=1,M=arguments.length,I=false,K;if(typeof N==="boolean"){I=N;N=arguments[1]||{};L=2}if(typeof N!=="object"&&!r.isFunction(N)){N={}}if(M==L){N=this;--L}for(;L<M;L++){if((K=arguments[L])!=null){for(var J in K){var O=N[J],P=K[J];if(N===P){continue}if(I&&P&&typeof P==="object"&&!P.nodeType){N[J]=r.extend(I,O||(P.length!=null?[]:{}),P)}else{if(P!==h){N[J]=P}}}}}return N};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,t=document.defaultView||{},v=Object.prototype.toString;r.extend({noConflict:function(I){o.$=s;if(I){o.jQuery=C}return r},isFunction:function(I){return v.call(I)==="[object Function]"},isArray:function(I){return v.call(I)==="[object Array]"},isXMLDoc:function(I){return I.nodeType===9&&I.documentElement.nodeName!=="HTML"||!!I.ownerDocument&&r.isXMLDoc(I.ownerDocument)},globalEval:function(K){if(K&&/\S/.test(K)){var J=document.getElementsByTagName("head")[0]||document.documentElement,I=document.createElement("script");I.type="text/javascript";if(r.support.scriptEval){I.appendChild(document.createTextNode(K))}else{I.text=K}J.insertBefore(I,J.firstChild);J.removeChild(I)}},nodeName:function(J,I){return J.nodeName&&J.nodeName.toUpperCase()==I.toUpperCase()},each:function(K,O,J){var I,L=0,M=K.length;if(J){if(M===h){for(I in K){if(O.apply(K[I],J)===false){break}}}else{for(;L<M;){if(O.apply(K[L++],J)===false){break}}}}else{if(M===h){for(I in K){if(O.call(K[I],I,K[I])===false){break}}}else{for(var N=K[0];L<M&&O.call(N,L,N)!==false;N=K[++L]){}}}return K},prop:function(L,M,K,J,I){if(r.isFunction(M)){M=M.call(L,J)}return typeof M==="number"&&K=="curCSS"&&!b.test(I)?M+"px":M},className:{add:function(I,J){r.each((J||"").split(/\s+/),function(K,L){if(I.nodeType==1&&!r.className.has(I.className,L)){I.className+=(I.className?" ":"")+L}})},remove:function(I,J){if(I.nodeType==1){I.className=J!==h?r.grep(I.className.split(/\s+/),function(K){return !r.className.has(J,K)}).join(" "):""}},has:function(J,I){return J&&r.inArray(I,(J.className||J).toString().split(/\s+/))>-1}},swap:function(L,K,M){var I={};for(var J in K){I[J]=L.style[J];L.style[J]=K[J]}M.call(L);for(var J in K){L.style[J]=I[J]}},css:function(L,J,N,I){if(J=="width"||J=="height"){var P,K={position:"absolute",visibility:"hidden",display:"block"},O=J=="width"?["Left","Right"]:["Top","Bottom"];function M(){P=J=="width"?L.offsetWidth:L.offsetHeight;if(I==="border"){return}r.each(O,function(){if(!I){P-=parseFloat(r.curCSS(L,"padding"+this,true))||0}if(I==="margin"){P+=parseFloat(r.curCSS(L,"margin"+this,true))||0}else{P-=parseFloat(r.curCSS(L,"border"+this+"Width",true))||0}})}if(L.offsetWidth!==0){M()}else{r.swap(L,K,M)}return Math.max(0,Math.round(P))}return r.curCSS(L,J,N)},curCSS:function(M,J,K){var P,I=M.style;if(J=="opacity"&&!r.support.opacity){P=r.attr(I,"opacity");return P==""?"1":P}if(J.match(/float/i)){J=A}if(!K&&I&&I[J]){P=I[J]}else{if(t.getComputedStyle){if(J.match(/float/i)){J="float"}J=J.replace(/([A-Z])/g,"-$1").toLowerCase();var Q=t.getComputedStyle(M,null);if(Q){P=Q.getPropertyValue(J)}if(J=="opacity"&&P==""){P="1"}}else{if(M.currentStyle){var N=J.replace(/\-(\w)/g,function(R,S){return S.toUpperCase()});P=M.currentStyle[J]||M.currentStyle[N];if(!/^\d+(px)?$/i.test(P)&&/^\d/.test(P)){var L=I.left,O=M.runtimeStyle.left;M.runtimeStyle.left=M.currentStyle.left;I.left=P||0;P=I.pixelLeft+"px";I.left=L;M.runtimeStyle.left=O}}}}return P},clean:function(J,O,M){O=O||document;if(typeof O.createElement==="undefined"){O=O.ownerDocument||O[0]&&O[0].ownerDocument||document}if(!M&&J.length===1&&typeof J[0]==="string"){var L=/^<(\w+)\s*\/?>$/.exec(J[0]);if(L){return[O.createElement(L[1])]}}var K=[],I=[],P=O.createElement("div");r.each(J,function(T,W){if(typeof W==="number"){W+=""}if(!W){return}if(typeof W==="string"){W=W.replace(/(<(\w+)[^>]*?)\/>/g,function(Y,Z,X){return X.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?Y:Z+"></"+X+">"});var S=W.replace(/^\s+/,"").substring(0,10).toLowerCase();var U=!S.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!S.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||S.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!S.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!S.indexOf("<td")||!S.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!S.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!r.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];P.innerHTML=U[1]+W+U[2];while(U[0]--){P=P.lastChild}if(!r.support.tbody){var V=/<tbody/i.test(W),R=!S.indexOf("<table")&&!V?P.firstChild&&P.firstChild.childNodes:U[1]=="<table>"&&!V?P.childNodes:[];for(var Q=R.length-1;Q>=0;--Q){if(r.nodeName(R[Q],"tbody")&&!R[Q].childNodes.length){R[Q].parentNode.removeChild(R[Q])}}}if(!r.support.leadingWhitespace&&/^\s/.test(W)){P.insertBefore(O.createTextNode(W.match(/^\s*/)[0]),P.firstChild)}W=r.makeArray(P.childNodes)}if(W.nodeType){K.push(W)}else{K=r.merge(K,W)}});if(M){for(var N=0;K[N];N++){if(r.nodeName(K[N],"script")&&(!K[N].type||K[N].type.toLowerCase()==="text/javascript")){I.push(K[N].parentNode?K[N].parentNode.removeChild(K[N]):K[N])}else{if(K[N].nodeType===1){K.splice.apply(K,[N+1,0].concat(r.makeArray(K[N].getElementsByTagName("script"))))}M.appendChild(K[N])}}return I}return K},attr:function(N,K,O){if(!N||N.nodeType==3||N.nodeType==8){return h}var L=!r.isXMLDoc(N),P=O!==h;K=L&&r.props[K]||K;if(N.tagName){var J=/href|src|style/.test(K);if(K=="selected"&&N.parentNode){N.parentNode.selectedIndex}if(K in N&&L&&!J){if(P){if(K=="type"&&r.nodeName(N,"input")&&N.parentNode){throw"type property can't be changed"}N[K]=O}if(r.nodeName(N,"form")&&N.getAttributeNode(K)){return N.getAttributeNode(K).nodeValue}if(K=="tabIndex"){var M=N.getAttributeNode("tabIndex");return M&&M.specified?M.value:N.nodeName.match(/(button|input|object|select|textarea)/i)?0:N.nodeName.match(/^(a|area)$/i)&&N.href?0:h}return N[K]}if(!r.support.style&&L&&K=="style"){return r.attr(N.style,"cssText",O)}if(P){N.setAttribute(K,""+O)}var I=!r.support.hrefNormalized&&L&&J?N.getAttribute(K,2):N.getAttribute(K);return I===null?h:I}if(!r.support.opacity&&K=="opacity"){if(P){N.zoom=1;N.filter=(N.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(O)+""=="NaN"?"":"alpha(opacity="+O*100+")")}return N.filter&&N.filter.indexOf("opacity=")>=0?(parseFloat(N.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}K=K.replace(/-([a-z])/ig,function(Q,R){return R.toUpperCase()});if(P){N[K]=O}return N[K]},trim:function(I){return(I||"").replace(/^\s+|\s+$/g,"")},makeArray:function(K){var I=[];if(K!=null){var J=K.length;if(J==null||typeof K==="string"||r.isFunction(K)||K.setInterval){I[0]=K}else{while(J){I[--J]=K[J]}}}return I},inArray:function(K,L){for(var I=0,J=L.length;I<J;I++){if(L[I]===K){return I}}return -1},merge:function(L,I){var J=0,K,M=L.length;if(!r.support.getAll){while((K=I[J++])!=null){if(K.nodeType!=8){L[M++]=K}}}else{while((K=I[J++])!=null){L[M++]=K}}return L},unique:function(O){var J=[],I={};try{for(var K=0,L=O.length;K<L;K++){var N=r.data(O[K]);if(!I[N]){I[N]=true;J.push(O[K])}}}catch(M){J=O}return J},grep:function(J,N,I){var K=[];for(var L=0,M=J.length;L<M;L++){if(!I!=!N(J[L],L)){K.push(J[L])}}return K},map:function(I,N){var J=[];for(var K=0,L=I.length;K<L;K++){var M=N(I[K],K);if(M!=null){J[J.length]=M}}return J.concat.apply([],J)}});var G=navigator.userAgent.toLowerCase();r.browser={version:(G.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(G),opera:/opera/.test(G),msie:/msie/.test(G)&&!/opera/.test(G),mozilla:/mozilla/.test(G)&&!/(compatible|webkit)/.test(G)};r.each({parent:function(I){return I.parentNode},parents:function(I){return r.dir(I,"parentNode")},next:function(I){return r.nth(I,2,"nextSibling")},prev:function(I){return r.nth(I,2,"previousSibling")},nextAll:function(I){return r.dir(I,"nextSibling")},prevAll:function(I){return r.dir(I,"previousSibling")},siblings:function(I){return r.sibling(I.parentNode.firstChild,I)},children:function(I){return r.sibling(I.firstChild)},contents:function(I){return r.nodeName(I,"iframe")?I.contentDocument||I.contentWindow.document:r.makeArray(I.childNodes)}},function(I,J){r.fn[I]=function(K){var L=r.map(this,J);if(K&&typeof K=="string"){L=r.multiFilter(K,L)}return this.pushStack(r.unique(L),I,K)}});r.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(I,J){r.fn[I]=function(K){var N=[],P=r(K);for(var O=0,L=P.length;O<L;O++){var M=(O>0?this.clone(true):this).get();r.fn[J].apply(r(P[O]),M);N=N.concat(M)}return this.pushStack(N,I,K)}});r.each({removeAttr:function(I){r.attr(this,I,"");if(this.nodeType==1){this.removeAttribute(I)}},addClass:function(I){r.className.add(this,I)},removeClass:function(I){r.className.remove(this,I)},toggleClass:function(J,I){if(typeof I!=="boolean"){I=!r.className.has(this,J)}r.className[I?"add":"remove"](this,J)},remove:function(I){if(!I||r.filter(I,[this]).length){r("*",this).add([this]).each(function(){r.event.remove(this);r.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){r(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(I,J){r.fn[I]=function(){return this.each(J,arguments)}});function m(I,J){return I[0]&&parseInt(r.curCSS(I[0],J,true),10)||0}var j=r.expando="jQuery"+f(),z=0,E={};r.extend({cache:{},data:function(J,I,K){J=J==o?E:J;var L=J[j];if(!L){L=J[j]=++z}if(I&&!r.cache[L]){r.cache[L]={}}if(K!==h){r.cache[L][I]=K}return I?r.cache[L][I]:L},removeData:function(J,I){J=J==o?E:J;var L=J[j];if(I){if(r.cache[L]){delete r.cache[L][I];I="";for(I in r.cache[L]){break}if(!I){r.removeData(J)}}}else{try{delete J[j]}catch(K){if(J.removeAttribute){J.removeAttribute(j)}}delete r.cache[L]}},queue:function(J,I,L){if(J){I=(I||"fx")+"queue";var K=r.data(J,I);if(!K||r.isArray(L)){K=r.data(J,I,r.makeArray(L))}else{if(L){K.push(L)}}}return K},dequeue:function(L,K){var I=r.queue(L,K),J=I.shift();if(!K||K==="fx"){J=I[0]}if(J!==h){J.call(L)}}});r.fn.extend({data:function(I,K){var L=I.split(".");L[1]=L[1]?"."+L[1]:"";if(K===h){var J=this.triggerHandler("getData"+L[1]+"!",[L[0]]);if(J===h&&this.length){J=r.data(this[0],I)}return J===h&&L[1]?this.data(L[0]):J}else{return this.trigger("setData"+L[1]+"!",[L[0],K]).each(function(){r.data(this,I,K)})}},removeData:function(I){return this.each(function(){r.removeData(this,I)})},queue:function(I,J){if(typeof I!=="string"){J=I;I="fx"}if(J===h){return r.queue(this[0],I)}return this.each(function(){var K=r.queue(this,I,J);if(I=="fx"&&K.length==1){K[0].call(this)}})},dequeue:function(I){return this.each(function(){r.dequeue(this,I)})}});
/*
 * Sizzle CSS Selector Engine - v0.9.3
 *  Copyright 2009, The Dojo Foundation
 *  Released under the MIT, BSD, and GPL Licenses.
 *  More information: http://sizzlejs.com/
 */
(function(){var V=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,P=0,L=Object.prototype.toString;var J=function(ac,Y,af,ag){af=af||[];Y=Y||document;if(Y.nodeType!==1&&Y.nodeType!==9){return[]}if(!ac||typeof ac!=="string"){return af}var ad=[],aa,aj,am,X,ah,Z,ab=true;V.lastIndex=0;while((aa=V.exec(ac))!==null){ad.push(aa[1]);if(aa[2]){Z=RegExp.rightContext;break}}if(ad.length>1&&Q.exec(ac)){if(ad.length===2&&M.relative[ad[0]]){aj=N(ad[0]+ad[1],Y)}else{aj=M.relative[ad[0]]?[Y]:J(ad.shift(),Y);while(ad.length){ac=ad.shift();if(M.relative[ac]){ac+=ad.shift()}aj=N(ac,aj)}}}else{var ai=ag?{expr:ad.pop(),set:I(ag)}:J.find(ad.pop(),ad.length===1&&Y.parentNode?Y.parentNode:Y,U(Y));aj=J.filter(ai.expr,ai.set);if(ad.length>0){am=I(aj)}else{ab=false}while(ad.length){var al=ad.pop(),ak=al;if(!M.relative[al]){al=""}else{ak=ad.pop()}if(ak==null){ak=Y}M.relative[al](am,ak,U(Y))}}if(!am){am=aj}if(!am){throw"Syntax error, unrecognized expression: "+(al||ac)}if(L.call(am)==="[object Array]"){if(!ab){af.push.apply(af,am)}else{if(Y.nodeType===1){for(var ae=0;am[ae]!=null;ae++){if(am[ae]&&(am[ae]===true||am[ae].nodeType===1&&O(Y,am[ae]))){af.push(aj[ae])}}}else{for(var ae=0;am[ae]!=null;ae++){if(am[ae]&&am[ae].nodeType===1){af.push(aj[ae])}}}}}else{I(am,af)}if(Z){J(Z,Y,af,ag);if(K){hasDuplicate=false;af.sort(K);if(hasDuplicate){for(var ae=1;ae<af.length;ae++){if(af[ae]===af[ae-1]){af.splice(ae--,1)}}}}}return af};J.matches=function(X,Y){return J(X,null,null,Y)};J.find=function(ae,X,af){var ad,ab;if(!ae){return[]}for(var aa=0,Z=M.order.length;aa<Z;aa++){var ac=M.order[aa],ab;if((ab=M.match[ac].exec(ae))){var Y=RegExp.leftContext;if(Y.substr(Y.length-1)!=="\\"){ab[1]=(ab[1]||"").replace(/\\/g,"");ad=M.find[ac](ab,X,af);if(ad!=null){ae=ae.replace(M.match[ac],"");break}}}}if(!ad){ad=X.getElementsByTagName("*")}return{set:ad,expr:ae}};J.filter=function(ah,ag,ak,aa){var Z=ah,am=[],ae=ag,ac,X,ad=ag&&ag[0]&&U(ag[0]);while(ah&&ag.length){for(var af in M.filter){if((ac=M.match[af].exec(ah))!=null){var Y=M.filter[af],al,aj;X=false;if(ae==am){am=[]}if(M.preFilter[af]){ac=M.preFilter[af](ac,ae,ak,am,aa,ad);if(!ac){X=al=true}else{if(ac===true){continue}}}if(ac){for(var ab=0;(aj=ae[ab])!=null;ab++){if(aj){al=Y(aj,ac,ab,ae);var ai=aa^!!al;if(ak&&al!=null){if(ai){X=true}else{ae[ab]=false}}else{if(ai){am.push(aj);X=true}}}}}if(al!==h){if(!ak){ae=am}ah=ah.replace(M.match[af],"");if(!X){return[]}break}}}if(ah==Z){if(X==null){throw"Syntax error, unrecognized expression: "+ah}else{break}}Z=ah}return ae};var M=J.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(X){return X.getAttribute("href")}},relative:{"+":function(ae,X,ad){var ab=typeof X==="string",af=ab&&!/\W/.test(X),ac=ab&&!af;if(af&&!ad){X=X.toUpperCase()}for(var aa=0,Z=ae.length,Y;aa<Z;aa++){if((Y=ae[aa])){while((Y=Y.previousSibling)&&Y.nodeType!==1){}ae[aa]=ac||Y&&Y.nodeName===X?Y||false:Y===X}}if(ac){J.filter(X,ae,true)}},">":function(ad,Y,ae){var ab=typeof Y==="string";if(ab&&!/\W/.test(Y)){Y=ae?Y:Y.toUpperCase();for(var Z=0,X=ad.length;Z<X;Z++){var ac=ad[Z];if(ac){var aa=ac.parentNode;ad[Z]=aa.nodeName===Y?aa:false}}}else{for(var Z=0,X=ad.length;Z<X;Z++){var ac=ad[Z];if(ac){ad[Z]=ab?ac.parentNode:ac.parentNode===Y}}if(ab){J.filter(Y,ad,true)}}},"":function(aa,Y,ac){var Z=P++,X=W;if(!Y.match(/\W/)){var ab=Y=ac?Y:Y.toUpperCase();X=T}X("parentNode",Y,Z,aa,ab,ac)},"~":function(aa,Y,ac){var Z=P++,X=W;if(typeof Y==="string"&&!Y.match(/\W/)){var ab=Y=ac?Y:Y.toUpperCase();X=T}X("previousSibling",Y,Z,aa,ab,ac)}},find:{ID:function(Y,Z,aa){if(typeof Z.getElementById!=="undefined"&&!aa){var X=Z.getElementById(Y[1]);return X?[X]:[]}},NAME:function(Z,ac,ad){if(typeof ac.getElementsByName!=="undefined"){var Y=[],ab=ac.getElementsByName(Z[1]);for(var aa=0,X=ab.length;aa<X;aa++){if(ab[aa].getAttribute("name")===Z[1]){Y.push(ab[aa])}}return Y.length===0?null:Y}},TAG:function(X,Y){return Y.getElementsByTagName(X[1])}},preFilter:{CLASS:function(aa,Y,Z,X,ad,ae){aa=" "+aa[1].replace(/\\/g,"")+" ";if(ae){return aa}for(var ab=0,ac;(ac=Y[ab])!=null;ab++){if(ac){if(ad^(ac.className&&(" "+ac.className+" ").indexOf(aa)>=0)){if(!Z){X.push(ac)}}else{if(Z){Y[ab]=false}}}}return false},ID:function(X){return X[1].replace(/\\/g,"")},TAG:function(Y,X){for(var Z=0;X[Z]===false;Z++){}return X[Z]&&U(X[Z])?Y[1]:Y[1].toUpperCase()},CHILD:function(X){if(X[1]=="nth"){var Y=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(X[2]=="even"&&"2n"||X[2]=="odd"&&"2n+1"||!/\D/.test(X[2])&&"0n+"+X[2]||X[2]);X[2]=(Y[1]+(Y[2]||1))-0;X[3]=Y[3]-0}X[0]=P++;return X},ATTR:function(ab,Y,Z,X,ac,ad){var aa=ab[1].replace(/\\/g,"");if(!ad&&M.attrMap[aa]){ab[1]=M.attrMap[aa]}if(ab[2]==="~="){ab[4]=" "+ab[4]+" "}return ab},PSEUDO:function(ab,Y,Z,X,ac){if(ab[1]==="not"){if(ab[3].match(V).length>1||/^\w/.test(ab[3])){ab[3]=J(ab[3],null,null,Y)}else{var aa=J.filter(ab[3],Y,Z,true^ac);if(!Z){X.push.apply(X,aa)}return false}}else{if(M.match.POS.test(ab[0])||M.match.CHILD.test(ab[0])){return true}}return ab},POS:function(X){X.unshift(true);return X}},filters:{enabled:function(X){return X.disabled===false&&X.type!=="hidden"},disabled:function(X){return X.disabled===true},checked:function(X){return X.checked===true},selected:function(X){X.parentNode.selectedIndex;return X.selected===true},parent:function(X){return !!X.firstChild},empty:function(X){return !X.firstChild},has:function(Z,Y,X){return !!J(X[3],Z).length},header:function(X){return/h\d/i.test(X.nodeName)},text:function(X){return"text"===X.type},radio:function(X){return"radio"===X.type},checkbox:function(X){return"checkbox"===X.type},file:function(X){return"file"===X.type},password:function(X){return"password"===X.type},submit:function(X){return"submit"===X.type},image:function(X){return"image"===X.type},reset:function(X){return"reset"===X.type},button:function(X){return"button"===X.type||X.nodeName.toUpperCase()==="BUTTON"},input:function(X){return/input|select|textarea|button/i.test(X.nodeName)}},setFilters:{first:function(Y,X){return X===0},last:function(Z,Y,X,aa){return Y===aa.length-1},even:function(Y,X){return X%2===0},odd:function(Y,X){return X%2===1},lt:function(Z,Y,X){return Y<X[3]-0},gt:function(Z,Y,X){return Y>X[3]-0},nth:function(Z,Y,X){return X[3]-0==Y},eq:function(Z,Y,X){return X[3]-0==Y}},filter:{PSEUDO:function(ad,Z,aa,ae){var Y=Z[1],ab=M.filters[Y];if(ab){return ab(ad,aa,Z,ae)}else{if(Y==="contains"){return(ad.textContent||ad.innerText||"").indexOf(Z[3])>=0}else{if(Y==="not"){var ac=Z[3];for(var aa=0,X=ac.length;aa<X;aa++){if(ac[aa]===ad){return false}}return true}}}},CHILD:function(X,aa){var ad=aa[1],Y=X;switch(ad){case"only":case"first":while(Y=Y.previousSibling){if(Y.nodeType===1){return false}}if(ad=="first"){return true}Y=X;case"last":while(Y=Y.nextSibling){if(Y.nodeType===1){return false}}return true;case"nth":var Z=aa[2],ag=aa[3];if(Z==1&&ag==0){return true}var ac=aa[0],af=X.parentNode;if(af&&(af.sizcache!==ac||!X.nodeIndex)){var ab=0;for(Y=af.firstChild;Y;Y=Y.nextSibling){if(Y.nodeType===1){Y.nodeIndex=++ab}}af.sizcache=ac}var ae=X.nodeIndex-ag;if(Z==0){return ae==0}else{return(ae%Z==0&&ae/Z>=0)}}},ID:function(Y,X){return Y.nodeType===1&&Y.getAttribute("id")===X},TAG:function(Y,X){return(X==="*"&&Y.nodeType===1)||Y.nodeName===X},CLASS:function(Y,X){return(" "+(Y.className||Y.getAttribute("class"))+" ").indexOf(X)>-1},ATTR:function(ac,aa){var Z=aa[1],X=M.attrHandle[Z]?M.attrHandle[Z](ac):ac[Z]!=null?ac[Z]:ac.getAttribute(Z),ad=X+"",ab=aa[2],Y=aa[4];return X==null?ab==="!=":ab==="="?ad===Y:ab==="*="?ad.indexOf(Y)>=0:ab==="~="?(" "+ad+" ").indexOf(Y)>=0:!Y?ad&&X!==false:ab==="!="?ad!=Y:ab==="^="?ad.indexOf(Y)===0:ab==="$="?ad.substr(ad.length-Y.length)===Y:ab==="|="?ad===Y||ad.substr(0,Y.length+1)===Y+"-":false},POS:function(ab,Y,Z,ac){var X=Y[2],aa=M.setFilters[X];if(aa){return aa(ab,Z,Y,ac)}}}};var Q=M.match.POS;for(var S in M.match){M.match[S]=RegExp(M.match[S].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var I=function(Y,X){Y=Array.prototype.slice.call(Y);if(X){X.push.apply(X,Y);return X}return Y};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(R){I=function(ab,aa){var Y=aa||[];if(L.call(ab)==="[object Array]"){Array.prototype.push.apply(Y,ab)}else{if(typeof ab.length==="number"){for(var Z=0,X=ab.length;Z<X;Z++){Y.push(ab[Z])}}else{for(var Z=0;ab[Z];Z++){Y.push(ab[Z])}}}return Y}}var K;if(document.documentElement.compareDocumentPosition){K=function(Y,X){var Z=Y.compareDocumentPosition(X)&4?-1:Y===X?0:1;if(Z===0){hasDuplicate=true}return Z}}else{if("sourceIndex" in document.documentElement){K=function(Y,X){var Z=Y.sourceIndex-X.sourceIndex;if(Z===0){hasDuplicate=true}return Z}}else{if(document.createRange){K=function(aa,Y){var Z=aa.ownerDocument.createRange(),X=Y.ownerDocument.createRange();Z.selectNode(aa);Z.collapse(true);X.selectNode(Y);X.collapse(true);var ab=Z.compareBoundaryPoints(Range.START_TO_END,X);if(ab===0){hasDuplicate=true}return ab}}}}(function(){var Y=document.createElement("form"),Z="script"+(new Date).getTime();Y.innerHTML="<input name='"+Z+"'/>";var X=document.documentElement;X.insertBefore(Y,X.firstChild);if(!!document.getElementById(Z)){M.find.ID=function(ab,ac,ad){if(typeof ac.getElementById!=="undefined"&&!ad){var aa=ac.getElementById(ab[1]);return aa?aa.id===ab[1]||typeof aa.getAttributeNode!=="undefined"&&aa.getAttributeNode("id").nodeValue===ab[1]?[aa]:h:[]}};M.filter.ID=function(ac,aa){var ab=typeof ac.getAttributeNode!=="undefined"&&ac.getAttributeNode("id");return ac.nodeType===1&&ab&&ab.nodeValue===aa}}X.removeChild(Y)})();(function(){var X=document.createElement("div");X.appendChild(document.createComment(""));if(X.getElementsByTagName("*").length>0){M.find.TAG=function(Y,ac){var ab=ac.getElementsByTagName(Y[1]);if(Y[1]==="*"){var aa=[];for(var Z=0;ab[Z];Z++){if(ab[Z].nodeType===1){aa.push(ab[Z])}}ab=aa}return ab}}X.innerHTML="<a href='#'></a>";if(X.firstChild&&typeof X.firstChild.getAttribute!=="undefined"&&X.firstChild.getAttribute("href")!=="#"){M.attrHandle.href=function(Y){return Y.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var X=J,Y=document.createElement("div");Y.innerHTML="<p class='TEST'></p>";if(Y.querySelectorAll&&Y.querySelectorAll(".TEST").length===0){return}J=function(ac,ab,Z,aa){ab=ab||document;if(!aa&&ab.nodeType===9&&!U(ab)){try{return I(ab.querySelectorAll(ac),Z)}catch(ad){}}return X(ac,ab,Z,aa)};J.find=X.find;J.filter=X.filter;J.selectors=X.selectors;J.matches=X.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var X=document.createElement("div");X.innerHTML="<div class='test e'></div><div class='test'></div>";if(X.getElementsByClassName("e").length===0){return}X.lastChild.className="e";if(X.getElementsByClassName("e").length===1){return}M.order.splice(1,0,"CLASS");M.find.CLASS=function(Y,Z,aa){if(typeof Z.getElementsByClassName!=="undefined"&&!aa){return Z.getElementsByClassName(Y[1])}}})()}function T(Y,ad,ac,ah,ae,ag){var af=Y=="previousSibling"&&!ag;for(var aa=0,Z=ah.length;aa<Z;aa++){var X=ah[aa];if(X){if(af&&X.nodeType===1){X.sizcache=ac;X.sizset=aa}X=X[Y];var ab=false;while(X){if(X.sizcache===ac){ab=ah[X.sizset];break}if(X.nodeType===1&&!ag){X.sizcache=ac;X.sizset=aa}if(X.nodeName===ad){ab=X;break}X=X[Y]}ah[aa]=ab}}}function W(Y,ad,ac,ah,ae,ag){var af=Y=="previousSibling"&&!ag;for(var aa=0,Z=ah.length;aa<Z;aa++){var X=ah[aa];if(X){if(af&&X.nodeType===1){X.sizcache=ac;X.sizset=aa}X=X[Y];var ab=false;while(X){if(X.sizcache===ac){ab=ah[X.sizset];break}if(X.nodeType===1){if(!ag){X.sizcache=ac;X.sizset=aa}if(typeof ad!=="string"){if(X===ad){ab=true;break}}else{if(J.filter(ad,[X]).length>0){ab=X;break}}}X=X[Y]}ah[aa]=ab}}}var O=document.compareDocumentPosition?function(Y,X){return Y.compareDocumentPosition(X)&16}:function(Y,X){return Y!==X&&(Y.contains?Y.contains(X):true)};var U=function(X){return X.nodeType===9&&X.documentElement.nodeName!=="HTML"||!!X.ownerDocument&&U(X.ownerDocument)};var N=function(X,ae){var aa=[],ab="",ac,Z=ae.nodeType?[ae]:ae;while((ac=M.match.PSEUDO.exec(X))){ab+=ac[0];X=X.replace(M.match.PSEUDO,"")}X=M.relative[X]?X+"*":X;for(var ad=0,Y=Z.length;ad<Y;ad++){J(X,Z[ad],aa)}return J.filter(ab,aa)};r.find=J;r.filter=J.filter;r.expr=J.selectors;r.expr[":"]=r.expr.filters;J.selectors.filters.hidden=function(X){return X.offsetWidth===0||X.offsetHeight===0};J.selectors.filters.visible=function(X){return X.offsetWidth>0||X.offsetHeight>0};J.selectors.filters.animated=function(X){return r.grep(r.timers,function(Y){return X===Y.elem}).length};r.multiFilter=function(Z,X,Y){if(Y){Z=":not("+Z+")"}return J.matches(Z,X)};r.dir=function(Z,Y){var X=[],aa=Z[Y];while(aa&&aa!=document){if(aa.nodeType==1){X.push(aa)}aa=aa[Y]}return X};r.nth=function(ab,X,Z,aa){X=X||1;var Y=0;for(;ab;ab=ab[Z]){if(ab.nodeType==1&&++Y==X){break}}return ab};r.sibling=function(Z,Y){var X=[];for(;Z;Z=Z.nextSibling){if(Z.nodeType==1&&Z!=Y){X.push(Z)}}return X};return;o.Sizzle=J})();r.event={add:function(M,J,L,O){if(M.nodeType==3||M.nodeType==8){return}if(M.setInterval&&M!=o){M=o}if(!L.guid){L.guid=this.guid++}if(O!==h){var K=L;L=this.proxy(K);L.data=O}var I=r.data(M,"events")||r.data(M,"events",{}),N=r.data(M,"handle")||r.data(M,"handle",function(){return typeof r!=="undefined"&&!r.event.triggered?r.event.handle.apply(arguments.callee.elem,arguments):h});N.elem=M;r.each(J.split(/\s+/),function(Q,R){var S=R.split(".");R=S.shift();L.type=S.slice().sort().join(".");var P=I[R];if(r.event.specialAll[R]){r.event.specialAll[R].setup.call(M,O,S)}if(!P){P=I[R]={};if(!r.event.special[R]||r.event.special[R].setup.call(M,O,S)===false){if(M.addEventListener){M.addEventListener(R,N,false)}else{if(M.attachEvent){M.attachEvent("on"+R,N)}}}}P[L.guid]=L;r.event.global[R]=true});M=null},guid:1,global:{},remove:function(O,L,N){if(O.nodeType==3||O.nodeType==8){return}var K=r.data(O,"events"),J,I;if(K){if(L===h||(typeof L==="string"&&L.charAt(0)==".")){for(var M in K){this.remove(O,M+(L||""))}}else{if(L.type){N=L.handler;L=L.type}r.each(L.split(/\s+/),function(Q,S){var U=S.split(".");S=U.shift();var R=RegExp("(^|\\.)"+U.slice().sort().join(".*\\.")+"(\\.|$)");if(K[S]){if(N){delete K[S][N.guid]}else{for(var T in K[S]){if(R.test(K[S][T].type)){delete K[S][T]}}}if(r.event.specialAll[S]){r.event.specialAll[S].teardown.call(O,U)}for(J in K[S]){break}if(!J){if(!r.event.special[S]||r.event.special[S].teardown.call(O,U)===false){if(O.removeEventListener){O.removeEventListener(S,r.data(O,"handle"),false)}else{if(O.detachEvent){O.detachEvent("on"+S,r.data(O,"handle"))}}}J=null;delete K[S]}}})}for(J in K){break}if(!J){var P=r.data(O,"handle");if(P){P.elem=null}r.removeData(O,"events");r.removeData(O,"handle")}}},trigger:function(M,O,L,I){var K=M.type||M;if(!I){M=typeof M==="object"?M[j]?M:r.extend(r.Event(K),M):r.Event(K);if(K.indexOf("!")>=0){M.type=K=K.slice(0,-1);M.exclusive=true}if(!L){M.stopPropagation();if(this.global[K]){r.each(r.cache,function(){if(this.events&&this.events[K]){r.event.trigger(M,O,this.handle.elem)}})}}if(!L||L.nodeType==3||L.nodeType==8){return h}M.result=h;M.target=L;O=r.makeArray(O);O.unshift(M)}M.currentTarget=L;var N=r.data(L,"handle");if(N){N.apply(L,O)}if((!L[K]||(r.nodeName(L,"a")&&K=="click"))&&L["on"+K]&&L["on"+K].apply(L,O)===false){M.result=false}if(!I&&L[K]&&!M.isDefaultPrevented()&&!(r.nodeName(L,"a")&&K=="click")){this.triggered=true;try{L[K]()}catch(P){}}this.triggered=false;if(!M.isPropagationStopped()){var J=L.parentNode||L.ownerDocument;if(J){r.event.trigger(M,O,J,true)}}},handle:function(O){var N,I;O=arguments[0]=r.event.fix(O||o.event);O.currentTarget=this;var P=O.type.split(".");O.type=P.shift();N=!P.length&&!O.exclusive;var M=RegExp("(^|\\.)"+P.slice().sort().join(".*\\.")+"(\\.|$)");I=(r.data(this,"events")||{})[O.type];for(var K in I){var L=I[K];if(N||M.test(L.type)){O.handler=L;O.data=L.data;var J=L.apply(this,arguments);if(J!==h){O.result=J;if(J===false){O.preventDefault();O.stopPropagation()}}if(O.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(L){if(L[j]){return L}var J=L;L=r.Event(J);for(var K=this.props.length,N;K;){N=this.props[--K];L[N]=J[N]}if(!L.target){L.target=L.srcElement||document}if(L.target.nodeType==3){L.target=L.target.parentNode}if(!L.relatedTarget&&L.fromElement){L.relatedTarget=L.fromElement==L.target?L.toElement:L.fromElement}if(L.pageX==null&&L.clientX!=null){var M=document.documentElement,I=document.body;L.pageX=L.clientX+(M&&M.scrollLeft||I&&I.scrollLeft||0)-(M.clientLeft||0);L.pageY=L.clientY+(M&&M.scrollTop||I&&I.scrollTop||0)-(M.clientTop||0)}if(!L.which&&((L.charCode||L.charCode===0)?L.charCode:L.keyCode)){L.which=L.charCode||L.keyCode}if(!L.metaKey&&L.ctrlKey){L.metaKey=L.ctrlKey}if(!L.which&&L.button){L.which=(L.button&1?1:(L.button&2?3:(L.button&4?2:0)))}return L},proxy:function(J,I){I=I||function(){return J.apply(this,arguments)};I.guid=J.guid=J.guid||I.guid||this.guid++;return I},special:{ready:{setup:F,teardown:function(){}}},specialAll:{live:{setup:function(I,J){r.event.add(this,J[0],c)},teardown:function(K){if(K.length){var I=0,J=RegExp("(^|\\.)"+K[0]+"(\\.|$)");r.each((r.data(this,"events").live||{}),function(){if(J.test(this.type)){I++}});if(I<1){r.event.remove(this,K[0],c)}}}}}};r.Event=function(I){if(!this.preventDefault){return new r.Event(I)}if(I&&I.type){this.originalEvent=I;this.type=I.type}else{this.type=I}this.timeStamp=f();this[j]=true};function n(){return false}function y(){return true}r.Event.prototype={preventDefault:function(){this.isDefaultPrevented=y;var I=this.originalEvent;if(!I){return}if(I.preventDefault){I.preventDefault()}I.returnValue=false},stopPropagation:function(){this.isPropagationStopped=y;var I=this.originalEvent;if(!I){return}if(I.stopPropagation){I.stopPropagation()}I.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=y;this.stopPropagation()},isDefaultPrevented:n,isPropagationStopped:n,isImmediatePropagationStopped:n};var a=function(J){var I=J.relatedTarget;while(I&&I!=this){try{I=I.parentNode}catch(K){I=this}}if(I!=this){J.type=J.data;r.event.handle.apply(this,arguments)}};r.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(J,I){r.event.special[I]={setup:function(){r.event.add(this,J,a,I)},teardown:function(){r.event.remove(this,J,a)}}});r.fn.extend({bind:function(J,K,I){return J=="unload"?this.one(J,K,I):this.each(function(){r.event.add(this,J,I||K,I&&K)})},one:function(K,L,J){var I=r.event.proxy(J||L,function(M){r(this).unbind(M,I);return(J||L).apply(this,arguments)});return this.each(function(){r.event.add(this,K,I,J&&L)})},unbind:function(J,I){return this.each(function(){r.event.remove(this,J,I)})},trigger:function(I,J){return this.each(function(){r.event.trigger(I,J,this)})},triggerHandler:function(I,K){if(this[0]){var J=r.Event(I);J.preventDefault();J.stopPropagation();r.event.trigger(J,K,this[0]);return J.result}},toggle:function(K){var I=arguments,J=1;while(J<I.length){r.event.proxy(K,I[J++])}return this.click(r.event.proxy(K,function(L){this.lastToggle=(this.lastToggle||0)%J;L.preventDefault();return I[this.lastToggle++].apply(this,arguments)||false}))},hover:function(I,J){return this.mouseenter(I).mouseleave(J)},ready:function(I){F();if(r.isReady){I.call(document,r)}else{r.readyList.push(I)}return this},live:function(K,J){var I=r.event.proxy(J);I.guid+=this.selector+K;r(document).bind(l(K,this.selector),this.selector,I);return this},die:function(J,I){r(document).unbind(l(J,this.selector),I?{guid:I.guid+this.selector+J}:null);return this}});function c(L){var I=RegExp("(^|\\.)"+L.type+"(\\.|$)"),K=true,J=[];r.each(r.data(this,"events").live||[],function(M,N){if(I.test(N.type)){var O=r(L.target).closest(N.data)[0];if(O){J.push({elem:O,fn:N})}}});J.sort(function(N,M){return r.data(N.elem,"closest")-r.data(M.elem,"closest")});r.each(J,function(){if(this.fn.call(this.elem,L,this.fn.data)===false){return(K=false)}});return K}function l(J,I){return["live",J,I.replace(/\./g,"`").replace(/ /g,"|")].join(".")}r.extend({isReady:false,readyList:[],ready:function(){if(!r.isReady){r.isReady=true;if(r.readyList){r.each(r.readyList,function(){this.call(document,r)});r.readyList=null}r(document).triggerHandler("ready")}}});var B=false;function F(){if(B){return}B=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);r.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);r.ready()}});if(document.documentElement.doScroll&&o==o.top){(function(){if(r.isReady){return}try{document.documentElement.doScroll("left")}catch(I){setTimeout(arguments.callee,0);return}r.ready()})()}}}r.event.add(o,"load",r.ready)}r.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(J,I){r.fn[I]=function(K){return K?this.bind(I,K):this.trigger(I)}});r(o).bind("unload",function(){for(var I in r.cache){if(I!=1&&r.cache[I].handle){r.event.remove(r.cache[I].handle.elem)}}});(function(){r.support={};var J=document.documentElement,K=document.createElement("script"),O=document.createElement("div"),N="script"+(new Date).getTime();O.style.display="none";O.innerHTML='   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select>';var L=O.getElementsByTagName("*"),I=O.getElementsByTagName("a")[0];if(!L||!L.length||!I){return}r.support={leadingWhitespace:O.firstChild.nodeType==3,tbody:!O.getElementsByTagName("tbody").length,htmlSerialize:!!O.getElementsByTagName("link").length,style:/red/.test(I.getAttribute("style")),hrefNormalized:I.getAttribute("href")==="/a",opacity:I.style.opacity==="0.5",cssFloat:!!I.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};K.type="text/javascript";try{K.appendChild(document.createTextNode("window."+N+"=1;"))}catch(M){}J.insertBefore(K,J.firstChild);if(o[N]){r.support.scriptEval=true;delete o[N]}J.removeChild(K);if(O.attachEvent&&O.fireEvent){O.attachEvent("onclick",function(){r.support.noCloneEvent=false;O.detachEvent("onclick",arguments.callee)});O.cloneNode(true).fireEvent("onclick")}r(function(){var P=document.createElement("div");P.style.width=P.style.paddingLeft="1px";document.body.appendChild(P);r.boxModel=r.support.boxModel=P.offsetWidth===2;document.body.removeChild(P).style.display="none"})})();var A=r.support.cssFloat?"cssFloat":"styleFloat";r.props={"for":"htmlFor","class":"className","float":A,cssFloat:A,styleFloat:A,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};r.fn.extend({_load:r.fn.load,load:function(K,N,O){if(typeof K!=="string"){return this._load(K)}var M=K.indexOf(" ");if(M>=0){var I=K.slice(M,K.length);K=K.slice(0,M)}var L="GET";if(N){if(r.isFunction(N)){O=N;N=null}else{if(typeof N==="object"){N=r.param(N);L="POST"}}}var J=this;r.ajax({url:K,type:L,dataType:"html",data:N,complete:function(Q,P){if(P=="success"||P=="notmodified"){J.html(I?r("<div/>").append(Q.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(I):Q.responseText)}if(O){J.each(O,[Q.responseText,P,Q])}}});return this},serialize:function(){return r.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?r.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(I,J){var K=r(this).val();return K==null?null:r.isArray(K)?r.map(K,function(M,L){return{name:J.name,value:M}}):{name:J.name,value:K}}).get()}});r.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(I,J){r.fn[J]=function(K){return this.bind(J,K)}});var u=f();r.extend({get:function(I,K,L,J){if(r.isFunction(K)){L=K;K=null}return r.ajax({type:"GET",url:I,data:K,success:L,dataType:J})},getScript:function(I,J){return r.get(I,null,J,"script")},getJSON:function(I,J,K){return r.get(I,J,K,"json")},post:function(I,K,L,J){if(r.isFunction(K)){L=K;K={}}return r.ajax({type:"POST",url:I,data:K,success:L,dataType:J})},ajaxSetup:function(I){r.extend(r.ajaxSettings,I)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return o.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(Q){Q=r.extend(true,Q,r.extend(true,{},r.ajaxSettings,Q));var aa,J=/=\?(&|$)/g,V,Z,K=Q.type.toUpperCase();if(Q.data&&Q.processData&&typeof Q.data!=="string"){Q.data=r.param(Q.data)}if(Q.dataType=="jsonp"){if(K=="GET"){if(!Q.url.match(J)){Q.url+=(Q.url.match(/\?/)?"&":"?")+(Q.jsonp||"callback")+"=?"}}else{if(!Q.data||!Q.data.match(J)){Q.data=(Q.data?Q.data+"&":"")+(Q.jsonp||"callback")+"=?"}}Q.dataType="json"}if(Q.dataType=="json"&&(Q.data&&Q.data.match(J)||Q.url.match(J))){aa="jsonp"+u++;if(Q.data){Q.data=(Q.data+"").replace(J,"="+aa+"$1")}Q.url=Q.url.replace(J,"="+aa+"$1");Q.dataType="script";o[aa]=function(ab){Z=ab;M();P();o[aa]=h;try{delete o[aa]}catch(ac){}if(L){L.removeChild(X)}}}if(Q.dataType=="script"&&Q.cache==null){Q.cache=false}if(Q.cache===false&&K=="GET"){var I=f();var Y=Q.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+I+"$2");Q.url=Y+((Y==Q.url)?(Q.url.match(/\?/)?"&":"?")+"_="+I:"")}if(Q.data&&K=="GET"){Q.url+=(Q.url.match(/\?/)?"&":"?")+Q.data;Q.data=null}if(Q.global&&!r.active++){r.event.trigger("ajaxStart")}var U=/^(\w+:)?\/\/([^\/?#]+)/.exec(Q.url);if(Q.dataType=="script"&&K=="GET"&&U&&(U[1]&&U[1]!=location.protocol||U[2]!=location.host)){var L=document.getElementsByTagName("head")[0];var X=document.createElement("script");X.src=Q.url;if(Q.scriptCharset){X.charset=Q.scriptCharset}if(!aa){var S=false;X.onload=X.onreadystatechange=function(){if(!S&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){S=true;M();P();X.onload=X.onreadystatechange=null;L.removeChild(X)}}}L.appendChild(X);return h}var O=false;var N=Q.xhr();if(Q.username){N.open(K,Q.url,Q.async,Q.username,Q.password)}else{N.open(K,Q.url,Q.async)}try{if(Q.data){N.setRequestHeader("Content-Type",Q.contentType)}if(Q.ifModified){N.setRequestHeader("If-Modified-Since",r.lastModified[Q.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}N.setRequestHeader("X-Requested-With","XMLHttpRequest");N.setRequestHeader("Accept",Q.dataType&&Q.accepts[Q.dataType]?Q.accepts[Q.dataType]+", */*":Q.accepts._default)}catch(W){}if(Q.beforeSend&&Q.beforeSend(N,Q)===false){if(Q.global&&!--r.active){r.event.trigger("ajaxStop")}N.abort();return false}if(Q.global){r.event.trigger("ajaxSend",[N,Q])}var R=function(ab){if(N.readyState==0){if(T){clearInterval(T);T=null;if(Q.global&&!--r.active){r.event.trigger("ajaxStop")}}}else{if(!O&&N&&(N.readyState==4||ab=="timeout")){O=true;if(T){clearInterval(T);T=null}V=ab=="timeout"?"timeout":!r.httpSuccess(N)?"error":Q.ifModified&&r.httpNotModified(N,Q.url)?"notmodified":"success";if(V=="success"){try{Z=r.httpData(N,Q.dataType,Q)}catch(ad){V="parsererror"}}if(V=="success"){var ac;try{ac=N.getResponseHeader("Last-Modified")}catch(ad){}if(Q.ifModified&&ac){r.lastModified[Q.url]=ac}if(!aa){M()}}else{r.handleError(Q,N,V)}P();if(ab){N.abort()}if(Q.async){N=null}}}};if(Q.async){var T=setInterval(R,13);if(Q.timeout>0){setTimeout(function(){if(N&&!O){R("timeout")}},Q.timeout)}}try{N.send(Q.data)}catch(W){r.handleError(Q,N,null,W)}if(!Q.async){R()}function M(){if(Q.success){Q.success(Z,V)}if(Q.global){r.event.trigger("ajaxSuccess",[N,Q])}}function P(){if(Q.complete){Q.complete(N,V)}if(Q.global){r.event.trigger("ajaxComplete",[N,Q])}if(Q.global&&!--r.active){r.event.trigger("ajaxStop")}}return N},handleError:function(J,L,I,K){if(J.error){J.error(L,I,K)}if(J.global){r.event.trigger("ajaxError",[L,J,K])}},active:0,httpSuccess:function(J){try{return !J.status&&location.protocol=="file:"||(J.status>=200&&J.status<300)||J.status==304||J.status==1223}catch(I){}return false},httpNotModified:function(K,I){try{var L=K.getResponseHeader("Last-Modified");return K.status==304||L==r.lastModified[I]}catch(J){}return false},httpData:function(N,L,K){var J=N.getResponseHeader("content-type"),I=L=="xml"||!L&&J&&J.indexOf("xml")>=0,M=I?N.responseXML:N.responseText;if(I&&M.documentElement.tagName=="parsererror"){throw"parsererror"}if(K&&K.dataFilter){M=K.dataFilter(M,L)}if(typeof M==="string"){if(L=="script"){r.globalEval(M)}if(L=="json"){M=o["eval"]("("+M+")")}}return M},param:function(I){var K=[];function L(M,N){K[K.length]=encodeURIComponent(M)+"="+encodeURIComponent(N)}if(r.isArray(I)||I.jquery){r.each(I,function(){L(this.name,this.value)})}else{for(var J in I){if(r.isArray(I[J])){r.each(I[J],function(){L(J,this)})}else{L(J,r.isFunction(I[J])?I[J]():I[J])}}}return K.join("&").replace(/%20/g,"+")}});var p={},q,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function w(J,I){var K={};r.each(d.concat.apply([],d.slice(0,I)),function(){K[this]=J});return K}r.fn.extend({show:function(N,P){if(N){return this.animate(w("show",3),N,P)}else{for(var L=0,J=this.length;L<J;L++){var I=r.data(this[L],"olddisplay");this[L].style.display=I||"";if(r.css(this[L],"display")==="none"){var K=this[L].tagName,O;if(p[K]){O=p[K]}else{var M=r("<"+K+" />").appendTo("body");O=M.css("display");if(O==="none"){O="block"}M.remove();p[K]=O}r.data(this[L],"olddisplay",O)}}for(var L=0,J=this.length;L<J;L++){this[L].style.display=r.data(this[L],"olddisplay")||""}return this}},hide:function(L,M){if(L){return this.animate(w("hide",3),L,M)}else{for(var K=0,J=this.length;K<J;K++){var I=r.data(this[K],"olddisplay");if(!I&&I!=="none"){r.data(this[K],"olddisplay",r.css(this[K],"display"))}}for(var K=0,J=this.length;K<J;K++){this[K].style.display="none"}return this}},_toggle:r.fn.toggle,toggle:function(K,J){var I=typeof K==="boolean";return r.isFunction(K)&&r.isFunction(J)?this._toggle.apply(this,arguments):K==null||I?this.each(function(){var L=I?K:r(this).is(":hidden");r(this)[L?"show":"hide"]()}):this.animate(w("toggle",3),K,J)},fadeTo:function(I,K,J){return this.animate({opacity:K},I,J)},animate:function(M,J,L,K){var I=r.speed(J,L,K);return this[I.queue===false?"each":"queue"](function(){var O=r.extend({},I),Q,P=this.nodeType==1&&r(this).is(":hidden"),N=this;for(Q in M){if(M[Q]=="hide"&&P||M[Q]=="show"&&!P){return O.complete.call(this)}if((Q=="height"||Q=="width")&&this.style){O.display=r.css(this,"display");O.overflow=this.style.overflow}}if(O.overflow!=null){this.style.overflow="hidden"}O.curAnim=r.extend({},M);r.each(M,function(S,W){var V=new r.fx(N,O,S);if(/toggle|show|hide/.test(W)){V[W=="toggle"?P?"show":"hide":W](M)}else{var U=W.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),X=V.cur(true)||0;if(U){var R=parseFloat(U[2]),T=U[3]||"px";if(T!="px"){N.style[S]=(R||1)+T;X=((R||1)/V.cur(true))*X;N.style[S]=X+T}if(U[1]){R=((U[1]=="-="?-1:1)*R)+X}V.custom(X,R,T)}else{V.custom(X,W,"")}}});return true})},stop:function(J,I){var K=r.timers;if(J){this.queue([])}this.each(function(){for(var L=K.length-1;L>=0;L--){if(K[L].elem==this){if(I){K[L](true)}K.splice(L,1)}}});if(!I){this.dequeue()}return this}});r.each({slideDown:w("show",1),slideUp:w("hide",1),slideToggle:w("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(I,J){r.fn[I]=function(K,L){return this.animate(J,K,L)}});r.extend({speed:function(K,L,J){var I=typeof K==="object"?K:{complete:J||!J&&L||r.isFunction(K)&&K,duration:K,easing:J&&L||L&&!r.isFunction(L)&&L};I.duration=r.fx.off?0:typeof I.duration==="number"?I.duration:r.fx.speeds[I.duration]||r.fx.speeds._default;I.old=I.complete;I.complete=function(){if(I.queue!==false){r(this).dequeue()}if(r.isFunction(I.old)){I.old.call(this)}};return I},easing:{linear:function(K,L,I,J){return I+J*K},swing:function(K,L,I,J){return((-Math.cos(K*Math.PI)/2)+0.5)*J+I}},timers:[],fx:function(J,I,K){this.options=I;this.elem=J;this.prop=K;if(!I.orig){I.orig={}}}});r.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(r.fx.step[this.prop]||r.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(J){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var I=parseFloat(r.css(this.elem,this.prop,J));return I&&I>-10000?I:parseFloat(r.curCSS(this.elem,this.prop))||0},custom:function(M,L,K){this.startTime=f();this.start=M;this.end=L;this.unit=K||this.unit||"px";this.now=this.start;this.pos=this.state=0;var I=this;function J(N){return I.step(N)}J.elem=this.elem;if(J()&&r.timers.push(J)&&!q){q=setInterval(function(){var O=r.timers;for(var N=0;N<O.length;N++){if(!O[N]()){O.splice(N--,1)}}if(!O.length){clearInterval(q);q=h}},13)}},show:function(){this.options.orig[this.prop]=r.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());r(this.elem).show()},hide:function(){this.options.orig[this.prop]=r.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(L){var K=f();if(L||K>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var I=true;for(var J in this.options.curAnim){if(this.options.curAnim[J]!==true){I=false}}if(I){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(r.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){r(this.elem).hide()}if(this.options.hide||this.options.show){for(var M in this.options.curAnim){r.attr(this.elem.style,M,this.options.orig[M])}}this.options.complete.call(this.elem)}return false}else{var N=K-this.startTime;this.state=N/this.options.duration;this.pos=r.easing[this.options.easing||(r.easing.swing?"swing":"linear")](this.state,N,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};r.extend(r.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(I){r.attr(I.elem.style,"opacity",I.now)},_default:function(I){if(I.elem.style&&I.elem.style[I.prop]!=null){I.elem.style[I.prop]=I.now+I.unit}else{I.elem[I.prop]=I.now}}}});if(document.documentElement.getBoundingClientRect){r.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return r.offset.bodyOffset(this[0])}var K=this[0].getBoundingClientRect(),N=this[0].ownerDocument,J=N.body,I=N.documentElement,P=I.clientTop||J.clientTop||0,O=I.clientLeft||J.clientLeft||0,M=K.top+(self.pageYOffset||r.boxModel&&I.scrollTop||J.scrollTop)-P,L=K.left+(self.pageXOffset||r.boxModel&&I.scrollLeft||J.scrollLeft)-O;return{top:M,left:L}}}else{r.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return r.offset.bodyOffset(this[0])}r.offset.initialized||r.offset.initialize();var N=this[0],K=N.offsetParent,J=N,T=N.ownerDocument,R,L=T.documentElement,O=T.body,Q=T.defaultView,I=Q.getComputedStyle(N,null),S=N.offsetTop,M=N.offsetLeft,P=I.position==="absolute";while((N=N.parentNode)&&N!==O&&N!==L&&I.position!=="fixed"){R=Q.getComputedStyle(N,null);if((!P&&I.position==="static")||I.position==="relative"||N===K){S-=N.scrollTop,M-=N.scrollLeft;P=I.position==="absolute"}if(N===K){S+=N.offsetTop,M+=N.offsetLeft;if(r.offset.doesNotAddBorder&&!(r.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(N.tagName))){S+=parseInt(R.borderTopWidth,10)||0,M+=parseInt(R.borderLeftWidth,10)||0}J=K,K=N.offsetParent}if(r.offset.subtractsBorderForOverflowNotVisible&&R.overflow!=="visible"){S+=parseInt(R.borderTopWidth,10)||0,M+=parseInt(R.borderLeftWidth,10)||0}I=R}if(I.position==="relative"||I.position==="static"){S+=O.offsetTop,M+=O.offsetLeft}if(I.position==="fixed"){S+=Math.max(L.scrollTop,O.scrollTop),M+=Math.max(L.scrollLeft,O.scrollLeft)}return{top:S,left:M}}}r.offset={initialize:function(){if(this.initialized){return}var P=document.body,J=document.createElement("div"),L,K,R,M,Q,I,N=P.style.marginTop,O='<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>';Q={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(I in Q){J.style[I]=Q[I]}J.innerHTML=O;P.insertBefore(J,P.firstChild);L=J.firstChild,K=L.firstChild,M=L.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(K.offsetTop!==5);this.doesAddBorderForTableAndCells=(M.offsetTop===5);L.style.overflow="hidden",L.style.position="relative";this.subtractsBorderForOverflowNotVisible=(K.offsetTop===-5);P.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(P.offsetTop===0);P.style.marginTop=N;P.removeChild(J);this.initialized=true},bodyOffset:function(I){r.offset.initialized||r.offset.initialize();var K=I.offsetTop,J=I.offsetLeft;if(r.offset.doesNotIncludeMarginInBodyOffset){K+=parseInt(r.curCSS(I,"marginTop",true),10)||0,J+=parseInt(r.curCSS(I,"marginLeft",true),10)||0}return{top:K,left:J}}};r.fn.extend({position:function(){var M=0,L=0,J;if(this[0]){var K=this.offsetParent(),N=this.offset(),I=/^body|html$/i.test(K[0].tagName)?{top:0,left:0}:K.offset();N.top-=m(this,"marginTop");N.left-=m(this,"marginLeft");I.top+=m(K,"borderTopWidth");I.left+=m(K,"borderLeftWidth");J={top:N.top-I.top,left:N.left-I.left}}return J},offsetParent:function(){var I=this[0].offsetParent||document.body;while(I&&(!/^body|html$/i.test(I.tagName)&&r.css(I,"position")=="static")){I=I.offsetParent}return r(I)}});r.each(["Left","Top"],function(J,I){var K="scroll"+I;r.fn[K]=function(L){if(!this[0]){return null}return L!==h?this.each(function(){this==o||this==document?o.scrollTo(!J?L:r(o).scrollLeft(),J?L:r(o).scrollTop()):this[K]=L}):this[0]==o||this[0]==document?self[J?"pageYOffset":"pageXOffset"]||r.boxModel&&document.documentElement[K]||document.body[K]:this[0][K]}});(function(){var J;var I=function(){var L=document.compatMode;if(!L&&r.browser.safari){if(!J){var K=r(document.createElement("div")).attr("style","position:absolute;width:0;height:0;width:1").css("width");J=L=(K=="1px"?"BackCompat":"CSS1Compat")}else{L=J}}return L};r.each(["Height","Width"],function(O,M){var K=O?"Left":"Top",N=O?"Right":"Bottom",L=M.toLowerCase();r.fn["inner"+M]=function(){return this[0]?r.css(this[0],L,false,"padding"):null};r.fn["outer"+M]=function(Q){return this[0]?r.css(this[0],L,false,Q?"margin":"border"):null};var P=M.toLowerCase();r.fn[P]=function(Q){return this[0]==o?I()=="CSS1Compat"&&document.documentElement["client"+M]||document.body["client"+M]:this[0]==document?Math.max(document.documentElement["client"+M],document.body["scroll"+M],document.documentElement["scroll"+M],document.body["offset"+M],document.documentElement["offset"+M]):Q===h?(this.length?r.css(this[0],P):null):this.css(P,typeof Q==="string"?Q:Q+"px")}})}())})();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(g,f,h){if(g){this.applyCleaners(g,f,h);var b=g.all;if(b){var a=0;var d=b.length;for(var a=0;a<d;a++){this.applyCleaners(b[a],f,h)}}else{var c=g.firstChild;while(c){this._clean(c,f,h);c=c.nextSibling}}}},_cleanComponentNodes:function(f,d){for(var b=0;b<f.length;b++){var c=f[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,f){var b=d.component;if(b){var c=b["rich:destructor"];if(c){var a=b[c];if(a){a.call(b,f)}}}},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};
/* start jQuery.ui */
/*
 * jQuery UI 1.7.2
 *
 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI
 */
jQuery.ui||(function(c){var i=c.fn.remove,d=c.browser.mozilla&&(parseFloat(c.browser.version)<1.9);c.ui={version:"1.7.2",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);;/*
 * jQuery UI Accordion 1.7.2
 *
 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Accordion
 *
 * Depends:
 *ui.core.js
 */
(function(a){a.widget("ui.accordion",{_init:function(){var d=this.options,b=this;this.running=0;if(d.collapsible==a.ui.accordion.defaults.collapsible&&d.alwaysOpen!=a.ui.accordion.defaults.alwaysOpen){d.collapsible=!d.alwaysOpen}if(d.navigation){var c=this.element.find("a").filter(d.navigationFilter);if(c.length){if(c.filter(d.header).length){this.active=c}else{this.active=c.parent().parent().prev();c.addClass("ui-accordion-content-active")}}}this.element.addClass("ui-accordion ui-widget ui-helper-reset");if(this.element[0].nodeName=="UL"){this.element.children("li").addClass("ui-accordion-li-fix")}this.headers=this.element.find(d.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){a(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){a(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){a(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){a(this).removeClass("ui-state-focus")});this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");this.active=this._findActive(this.active||d.active).toggleClass("ui-state-default").toggleClass("ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");this.active.next().addClass("ui-accordion-content-active");a("<span/>").addClass("ui-icon "+d.icons.header).prependTo(this.headers);this.active.find(".ui-icon").toggleClass(d.icons.header).toggleClass(d.icons.headerSelected);if(a.browser.msie){this.element.find("a").css("zoom","1")}this.resize();this.element.attr("role","tablist");this.headers.attr("role","tab").bind("keydown",function(e){return b._keydown(e)}).next().attr("role","tabpanel");this.headers.not(this.active||"").attr("aria-expanded","false").attr("tabIndex","-1").next().hide();if(!this.active.length){this.headers.eq(0).attr("tabIndex","0")}else{this.active.attr("aria-expanded","true").attr("tabIndex","0")}if(!a.browser.safari){this.headers.find("a").attr("tabIndex","-1")}if(d.event){this.headers.bind((d.event)+".accordion",function(e){return b._clickHandler.call(b,e,this)})}},destroy:function(){var c=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role").unbind(".accordion").removeData("accordion");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("tabindex");this.headers.find("a").removeAttr("tabindex");this.headers.children(".ui-icon").remove();var b=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active");if(c.autoHeight||c.fillHeight){b.css("height","")}},_setData:function(b,c){if(b=="alwaysOpen"){b="collapsible";c=!c}a.widget.prototype._setData.apply(this,arguments)},_keydown:function(e){var g=this.options,f=a.ui.keyCode;if(g.disabled||e.altKey||e.ctrlKey){return}var d=this.headers.length;var b=this.headers.index(e.target);var c=false;switch(e.keyCode){case f.RIGHT:case f.DOWN:c=this.headers[(b+1)%d];break;case f.LEFT:case f.UP:c=this.headers[(b-1+d)%d];break;case f.SPACE:case f.ENTER:return this._clickHandler({target:e.target},e.target)}if(c){a(e.target).attr("tabIndex","-1");a(c).attr("tabIndex","0");c.focus();return false}return true},resize:function(){var e=this.options,d;if(e.fillSpace){if(a.browser.msie){var b=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}d=this.element.parent().height();if(a.browser.msie){this.element.parent().css("overflow",b)}this.headers.each(function(){d-=a(this).outerHeight()});var c=0;this.headers.next().each(function(){c=Math.max(c,a(this).innerHeight()-a(this).height())}).height(Math.max(0,d-c)).css("overflow","auto")}else{if(e.autoHeight){d=0;this.headers.next().each(function(){d=Math.max(d,a(this).outerHeight())}).height(d)}}},activate:function(b){var c=this._findActive(b)[0];this._clickHandler({target:c},c)},_findActive:function(b){return b?typeof b=="number"?this.headers.filter(":eq("+b+")"):this.headers.not(this.headers.not(b)):b===false?a([]):this.headers.filter(":eq(0)")},_clickHandler:function(b,f){var d=this.options;if(d.disabled){return false}if(!b.target&&d.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);this.active.next().addClass("ui-accordion-content-active");var h=this.active.next(),e={options:d,newHeader:a([]),oldHeader:d.active,newContent:a([]),oldContent:h},c=(this.active=a([]));this._toggle(c,h,e);return false}var g=a(b.currentTarget||f);var i=g[0]==this.active[0];if(this.running||(!d.collapsible&&i)){return false}this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);this.active.next().addClass("ui-accordion-content-active");if(!i){g.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").find(".ui-icon").removeClass(d.icons.header).addClass(d.icons.headerSelected);g.next().addClass("ui-accordion-content-active")}var c=g.next(),h=this.active.next(),e={options:d,newHeader:i&&d.collapsible?a([]):g,oldHeader:this.active,newContent:i&&d.collapsible?a([]):c.find("> *"),oldContent:h.find("> *")},j=this.headers.index(this.active[0])>this.headers.index(g[0]);this.active=i?a([]):g;this._toggle(c,h,e,i,j);return false},_toggle:function(b,i,g,j,k){var d=this.options,m=this;this.toShow=b;this.toHide=i;this.data=g;var c=function(){if(!m){return}return m._completed.apply(m,arguments)};this._trigger("changestart",null,this.data);this.running=i.size()===0?b.size():i.size();if(d.animated){var f={};if(d.collapsible&&j){f={toShow:a([]),toHide:i,complete:c,down:k,autoHeight:d.autoHeight||d.fillSpace}}else{f={toShow:b,toHide:i,complete:c,down:k,autoHeight:d.autoHeight||d.fillSpace}}if(!d.proxied){d.proxied=d.animated}if(!d.proxiedDuration){d.proxiedDuration=d.duration}d.animated=a.isFunction(d.proxied)?d.proxied(f):d.proxied;d.duration=a.isFunction(d.proxiedDuration)?d.proxiedDuration(f):d.proxiedDuration;var l=a.ui.accordion.animations,e=d.duration,h=d.animated;if(!l[h]){l[h]=function(n){this.slide(n,{easing:h,duration:e||700})}}l[h](f)}else{if(d.collapsible&&j){b.toggle()}else{i.hide();b.show()}c(true)}i.prev().attr("aria-expanded","false").attr("tabIndex","-1").blur();b.prev().attr("aria-expanded","true").attr("tabIndex","0").focus()},_completed:function(b){var c=this.options;this.running=b?0:--this.running;if(this.running){return}if(c.clearStyle){this.toShow.add(this.toHide).css({height:"",overflow:""})}this._trigger("change",null,this.data)}});a.extend(a.ui.accordion,{version:"1.7.2",defaults:{active:null,alwaysOpen:true,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()==location.href.toLowerCase()}},animations:{slide:function(j,h){j=a.extend({easing:"swing",duration:300},j,h);if(!j.toHide.size()){j.toShow.animate({height:"show"},j);return}if(!j.toShow.size()){j.toHide.animate({height:"hide"},j);return}var c=j.toShow.css("overflow"),g,d={},f={},e=["height","paddingTop","paddingBottom"],b;var i=j.toShow;b=i[0].style.width;i.width(parseInt(i.parent().width(),10)-parseInt(i.css("paddingLeft"),10)-parseInt(i.css("paddingRight"),10)-(parseInt(i.css("borderLeftWidth"),10)||0)-(parseInt(i.css("borderRightWidth"),10)||0));a.each(e,function(k,m){f[m]="hide";var l=(""+a.css(j.toShow[0],m)).match(/^([\d+-.]+)(.*)$/);d[m]={value:l[1],unit:l[2]||"px"}});j.toShow.css({height:0,overflow:"hidden"}).show();j.toHide.filter(":hidden").each(j.complete).end().filter(":visible").animate(f,{step:function(k,l){if(l.prop=="height"){g=(l.now-l.start)/(l.end-l.start)}j.toShow[0].style[l.prop]=(g*d[l.prop].value)+d[l.prop].unit},duration:j.duration,easing:j.easing,complete:function(){if(!j.autoHeight){j.toShow.css("height","")}j.toShow.css("width",b);j.toShow.css({overflow:c});j.complete()}})},bounceslide:function(b){this.slide(b,{easing:b.down?"easeOutBounce":"swing",duration:b.down?1000:200})},easeslide:function(b){this.slide(b,{easing:"easeinout",duration:700})}}})})(jQuery);;/*
 * jQuery UI Slider 1.7.2
 *
 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Slider
 *
 * Depends:
 *ui.core.js
 */
(function(a){a.widget("ui.slider",a.extend({},a.ui.mouse,{_init:function(){var b=this,c=this.options;this._keySliding=false;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");this.range=a([]);if(c.range){if(c.range===true){this.range=a("<div></div>");if(!c.values){c.values=[this._valueMin(),this._valueMin()]}if(c.values.length&&c.values.length!=2){c.values=[c.values[0],c.values[0]]}}else{this.range=a("<div></div>")}this.range.appendTo(this.element).addClass("ui-slider-range");if(c.range=="min"||c.range=="max"){this.range.addClass("ui-slider-range-"+c.range)}this.range.addClass("ui-widget-header")}if(a(".ui-slider-handle",this.element).length==0){a('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle")}if(c.values&&c.values.length){while(a(".ui-slider-handle",this.element).length<c.values.length){a('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle")}}this.handles=a(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(d){d.preventDefault()}).hover(function(){if(!c.disabled){a(this).addClass("ui-state-hover")}},function(){a(this).removeClass("ui-state-hover")}).focus(function(){if(!c.disabled){a(".ui-slider .ui-state-focus").removeClass("ui-state-focus");a(this).addClass("ui-state-focus")}else{a(this).blur()}}).blur(function(){a(this).removeClass("ui-state-focus")});this.handles.each(function(d){a(this).data("index.ui-slider-handle",d)});this.handles.keydown(function(i){var f=true;var e=a(this).data("index.ui-slider-handle");if(b.options.disabled){return}switch(i.keyCode){case a.ui.keyCode.HOME:case a.ui.keyCode.END:case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:f=false;if(!b._keySliding){b._keySliding=true;a(this).addClass("ui-state-active");b._start(i,e)}break}var g,d,h=b._step();if(b.options.values&&b.options.values.length){g=d=b.values(e)}else{g=d=b.value()}switch(i.keyCode){case a.ui.keyCode.HOME:d=b._valueMin();break;case a.ui.keyCode.END:d=b._valueMax();break;case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:if(g==b._valueMax()){return}d=g+h;break;case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(g==b._valueMin()){return}d=g-h;break}b._slide(i,e,d);return f}).keyup(function(e){var d=a(this).data("index.ui-slider-handle");if(b._keySliding){b._stop(e,d);b._change(e,d);b._keySliding=false;a(this).removeClass("ui-state-active")}});this._refreshValue()},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy()},_mouseCapture:function(d){var e=this.options;if(e.disabled){return false}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();var h={x:d.pageX,y:d.pageY};var j=this._normValueFromMouse(h);var c=this._valueMax()-this._valueMin()+1,f;var k=this,i;this.handles.each(function(l){var m=Math.abs(j-k.values(l));if(c>m){c=m;f=a(this);i=l}});if(e.range==true&&this.values(1)==e.min){f=a(this.handles[++i])}this._start(d,i);k._handleIndex=i;f.addClass("ui-state-active").focus();var g=f.offset();var b=!a(d.target).parents().andSelf().is(".ui-slider-handle");this._clickOffset=b?{left:0,top:0}:{left:d.pageX-g.left-(f.width()/2),top:d.pageY-g.top-(f.height()/2)-(parseInt(f.css("borderTopWidth"),10)||0)-(parseInt(f.css("borderBottomWidth"),10)||0)+(parseInt(f.css("marginTop"),10)||0)};j=this._normValueFromMouse(h);this._slide(d,i,j);return true},_mouseStart:function(b){return true},_mouseDrag:function(d){var b={x:d.pageX,y:d.pageY};var c=this._normValueFromMouse(b);this._slide(d,this._handleIndex,c);return false},_mouseStop:function(b){this.handles.removeClass("ui-state-active");this._stop(b,this._handleIndex);this._change(b,this._handleIndex);this._handleIndex=null;this._clickOffset=null;return false},_detectOrientation:function(){this.orientation=this.options.orientation=="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(d){var c,h;if("horizontal"==this.orientation){c=this.elementSize.width;h=d.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{c=this.elementSize.height;h=d.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}var f=(h/c);if(f>1){f=1}if(f<0){f=0}if("vertical"==this.orientation){f=1-f}var e=this._valueMax()-this._valueMin(),i=f*e,b=i%this.options.step,g=this._valueMin()+i-b;if(b>(this.options.step/2)){g+=this.options.step}return parseFloat(g.toFixed(5))},_start:function(d,c){var b={handle:this.handles[c],value:this.value()};if(this.options.values&&this.options.values.length){b.value=this.values(c);b.values=this.values()}this._trigger("start",d,b)},_slide:function(f,e,d){var g=this.handles[e];if(this.options.values&&this.options.values.length){var b=this.values(e?0:1);if((this.options.values.length==2&&this.options.range===true)&&((e==0&&d>b)||(e==1&&d<b))){d=b}if(d!=this.values(e)){var c=this.values();c[e]=d;var h=this._trigger("slide",f,{handle:this.handles[e],value:d,values:c});var b=this.values(e?0:1);if(h!==false){this.values(e,d,(f.type=="mousedown"&&this.options.animate),true)}}}else{if(d!=this.value()){var h=this._trigger("slide",f,{handle:this.handles[e],value:d});if(h!==false){this._setData("value",d,(f.type=="mousedown"&&this.options.animate))}}}},_stop:function(d,c){var b={handle:this.handles[c],value:this.value()};if(this.options.values&&this.options.values.length){b.value=this.values(c);b.values=this.values()}this._trigger("stop",d,b)},_change:function(d,c){var b={handle:this.handles[c],value:this.value()};if(this.options.values&&this.options.values.length){b.value=this.values(c);b.values=this.values()}this._trigger("change",d,b)},value:function(b){if(arguments.length){this._setData("value",b);this._change(null,0)}return this._value()},values:function(b,e,c,d){if(arguments.length>1){this.options.values[b]=e;this._refreshValue(c);if(!d){this._change(null,b)}}if(arguments.length){if(this.options.values&&this.options.values.length){return this._values(b)}else{return this.value()}}else{return this._values()}},_setData:function(b,d,c){a.widget.prototype._setData.apply(this,arguments);switch(b){case"disabled":if(d){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.attr("disabled","disabled")}else{this.handles.removeAttr("disabled")}case"orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue(c);break;case"value":this._refreshValue(c);break}},_step:function(){var b=this.options.step;return b},_value:function(){var b=this.options.value;if(b<this._valueMin()){b=this._valueMin()}if(b>this._valueMax()){b=this._valueMax()}return b},_values:function(b){if(arguments.length){var c=this.options.values[b];if(c<this._valueMin()){c=this._valueMin()}if(c>this._valueMax()){c=this._valueMax()}return c}else{return this.options.values}},_valueMin:function(){var b=this.options.min;return b},_valueMax:function(){var b=this.options.max;return b},_refreshValue:function(c){var f=this.options.range,d=this.options,l=this;if(this.options.values&&this.options.values.length){var i,h;this.handles.each(function(p,n){var o=(l.values(p)-l._valueMin())/(l._valueMax()-l._valueMin())*100;var m={};m[l.orientation=="horizontal"?"left":"bottom"]=o+"%";a(this).stop(1,1)[c?"animate":"css"](m,d.animate);if(l.options.range===true){if(l.orientation=="horizontal"){(p==0)&&l.range.stop(1,1)[c?"animate":"css"]({left:o+"%"},d.animate);(p==1)&&l.range[c?"animate":"css"]({width:(o-lastValPercent)+"%"},{queue:false,duration:d.animate})}else{(p==0)&&l.range.stop(1,1)[c?"animate":"css"]({bottom:(o)+"%"},d.animate);(p==1)&&l.range[c?"animate":"css"]({height:(o-lastValPercent)+"%"},{queue:false,duration:d.animate})}}lastValPercent=o})}else{var j=this.value(),g=this._valueMin(),k=this._valueMax(),e=k!=g?(j-g)/(k-g)*100:0;var b={};b[l.orientation=="horizontal"?"left":"bottom"]=e+"%";this.handle.stop(1,1)[c?"animate":"css"](b,d.animate);(f=="min")&&(this.orientation=="horizontal")&&this.range.stop(1,1)[c?"animate":"css"]({width:e+"%"},d.animate);(f=="max")&&(this.orientation=="horizontal")&&this.range[c?"animate":"css"]({width:(100-e)+"%"},{queue:false,duration:d.animate});(f=="min")&&(this.orientation=="vertical")&&this.range.stop(1,1)[c?"animate":"css"]({height:e+"%"},d.animate);(f=="max")&&(this.orientation=="vertical")&&this.range[c?"animate":"css"]({height:(100-e)+"%"},{queue:false,duration:d.animate})}}}));a.extend(a.ui.slider,{getter:"value values",version:"1.7.2",eventPrefix:"slide",defaults:{animate:false,delay:0,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null}})})(jQuery);;
/* end jQuery.ui */

/* start jQuery.easing */

/*
 * jQuery Easing v1.1.1 - http://gsgd.co.uk/sandbox/jquery.easing.php
 *
 * Uses the built in easing capabilities added in jQuery 1.1
 * to offer multiple easing options
 *
 * Copyright (c) 2007 George Smith
 * Licensed under the MIT License:
 *   http://www.opensource.org/licenses/mit-license.php
 */
jQuery.extend(jQuery.easing,{easein:function(x,t,b,c,d){return c*(t/=d)*t+b;},easeinout:function(x,t,b,c,d){if(t<d/2)return 2*c*t*t/(d*d)+b;var ts=t-d/2;return-2*c*ts*ts/(d*d)+2*c*ts/d+c/2+b;},easeout:function(x,t,b,c,d){return-c*t*t/(d*d)+2*c*t/d+b;},expoin:function(x,t,b,c,d){var flip=1;if(c<0){flip*=-1;c*=-1;}
return flip*(Math.exp(Math.log(c)/d*t))+b;},expoout:function(x,t,b,c,d){var flip=1;if(c<0){flip*=-1;c*=-1;}
return flip*(-Math.exp(-Math.log(c)/d*(t-d))+c+1)+b;},expoinout:function(x,t,b,c,d){var flip=1;if(c<0){flip*=-1;c*=-1;}
if(t<d/2)return flip*(Math.exp(Math.log(c/2)/(d/2)*t))+b;return flip*(-Math.exp(-2*Math.log(c/2)/d*(t-d))+c+1)+b;},bouncein:function(x,t,b,c,d){return c-jQuery.easing['bounceout'](x,d-t,0,c,d)+b;},bounceout:function(x,t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b;}else if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b;}else if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b;}else{return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b;}},bounceinout:function(x,t,b,c,d){if(t<d/2)return jQuery.easing['bouncein'](x,t*2,0,c,d)*.5+b;return jQuery.easing['bounceout'](x,t*2-d,0,c,d)*.5+c*.5+b;},elasin:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;},elasout:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b;},elasinout:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d/2)==2)return b+c;if(!p)p=d*(.3*1.5);if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);if(t<1)return-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*.5+c+b;},backin:function(x,t,b,c,d){var s=1.70158;return c*(t/=d)*t*((s+1)*t-s)+b;},backout:function(x,t,b,c,d){var s=1.70158;return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b;},backinout:function(x,t,b,c,d){var s=1.70158;if((t/=d/2)<1)return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b;}});
/* end jQuery.easing */

/* start jQuery.Dimensions */

/* Copyright (c) 2007 Paul Bakaus (paul.bakaus@googlemail.com) and Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 *
 * $LastChangedDate: 2007-12-20 08:43:48 -0600 (Thu, 20 Dec 2007) $
 * $Rev: 4257 $
 *
 * Version: 1.2
 *
 * Requires: jQuery 1.2+
 */
(function($){$.dimensions={version:'1.2'};$.each(['Height','Width'],function(i,name){$.fn['inner'+name]=function(){if(!this[0])return;var torl=name=='Height'?'Top':'Left',borr=name=='Height'?'Bottom':'Right';return this.is(':visible')?this[0]['client'+name]:num(this,name.toLowerCase())+num(this,'padding'+torl)+num(this,'padding'+borr);};$.fn['outer'+name]=function(options){if(!this[0])return;var torl=name=='Height'?'Top':'Left',borr=name=='Height'?'Bottom':'Right';options=$.extend({margin:false},options||{});var val=this.is(':visible')?this[0]['offset'+name]:num(this,name.toLowerCase())+num(this,'border'+torl+'Width')+num(this,'border'+borr+'Width')+num(this,'padding'+torl)+num(this,'padding'+borr);return val+(options.margin?(num(this,'margin'+torl)+num(this,'margin'+borr)):0);};});$.each(['Left','Top'],function(i,name){$.fn['scroll'+name]=function(val){if(!this[0])return;return val!=undefined?this.each(function(){this==window||this==document?window.scrollTo(name=='Left'?val:$(window)['scrollLeft'](),name=='Top'?val:$(window)['scrollTop']()):this['scroll'+name]=val;}):this[0]==window||this[0]==document?self[(name=='Left'?'pageXOffset':'pageYOffset')]||$.boxModel&&document.documentElement['scroll'+name]||document.body['scroll'+name]:this[0]['scroll'+name];};});$.fn.extend({position:function(){var left=0,top=0,elem=this[0],offset,parentOffset,offsetParent,results;if(elem){offsetParent=this.offsetParent();offset=this.offset();parentOffset=offsetParent.offset();offset.top-=num(elem,'marginTop');offset.left-=num(elem,'marginLeft');parentOffset.top+=num(offsetParent,'borderTopWidth');parentOffset.left+=num(offsetParent,'borderLeftWidth');results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};}return results;},offsetParent:function(){var offsetParent=this[0].offsetParent;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&$.css(offsetParent,'position')=='static'))offsetParent=offsetParent.offsetParent;return $(offsetParent);}});function num(el,prop){return parseInt($.curCSS(el.jquery?el[0]:el,prop,true))||0;};})(jQuery);
/* end jQuery.Dimensions */

/* start jQuery.higlight */
jQuery.fn.highlight=function(b){function a(e,j){var l=0;if(e.nodeType==3){var k=e.data.toUpperCase().indexOf(j);if(k>=0){var h=document.createElement("span");h.className="highlight";var f=e.splitText(k);var c=f.splitText(j.length);var d=f.cloneNode(true);h.appendChild(d);f.parentNode.replaceChild(h,f);l=1}}else{if(e.nodeType==1&&e.childNodes&&!/(script|style)/i.test(e.tagName)){for(var g=0;g<e.childNodes.length;++g){g+=a(e.childNodes[g],j)}}}return l}return this.each(function(){a(this,b.toUpperCase())})};jQuery.fn.removeHighlight=function(){return this.find("span.highlight").each(function(){this.parentNode.firstChild.nodeName;with(this.parentNode){replaceChild(this.firstChild,this);normalize()}}).end()};
/* end jQuery.easing */

/* start jQuery intoVieport */
(function($){jQuery.fn.intoViewport=function(options){options=$.extend({duration:200,easing:"swing"},options||{});return this.each(function(){function scrTo(dest){$("html,body").stop().animate({scrollTop:dest},options);}var scr=$(document).scrollTop()||$(window).scrollTop(),wheight=$(window).height(),top=$(this).offset().top,eheight=$(this).outerHeight();if(scr>top){scrTo(top);}else if(scr!=top&&top+eheight>scr+wheight){scrTo(top+Math.min(eheight-wheight,0));}});};})(jQuery);
/* end jQuery intoVieport */

/* start jQuery.livequery */
/*! Copyright (c) 2008 Brandon Aaron (http://brandonaaron.net)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 *
 * Version: 1.0.3
 * Requires jQuery 1.1.3+
 * Docs: http://docs.jquery.com/Plugins/livequery
 */
(function($){$.extend($.fn,{livequery:function(type,fn,fn2){var self=this,q;if($.isFunction(type))
fn2=fn,fn=type,type=undefined;$.each($.livequery.queries,function(i,query){if(self.selector==query.selector&&self.context==query.context&&type==query.type&&(!fn||fn.$lqguid==query.fn.$lqguid)&&(!fn2||fn2.$lqguid==query.fn2.$lqguid))
return(q=query)&&false;});q=q||new $.livequery(this.selector,this.context,type,fn,fn2);q.stopped=false;q.run();return this;},expire:function(type,fn,fn2){var self=this;if($.isFunction(type))
fn2=fn,fn=type,type=undefined;$.each($.livequery.queries,function(i,query){if(self.selector==query.selector&&self.context==query.context&&(!type||type==query.type)&&(!fn||fn.$lqguid==query.fn.$lqguid)&&(!fn2||fn2.$lqguid==query.fn2.$lqguid)&&!this.stopped)
$.livequery.stop(query.id);});return this;}});$.livequery=function(selector,context,type,fn,fn2){this.selector=selector;this.context=context||document;this.type=type;this.fn=fn;this.fn2=fn2;this.elements=[];this.stopped=false;this.id=$.livequery.queries.push(this)-1;fn.$lqguid=fn.$lqguid||$.livequery.guid++;if(fn2)fn2.$lqguid=fn2.$lqguid||$.livequery.guid++;return this;};$.livequery.prototype={stop:function(){var query=this;if(this.type)
this.elements.unbind(this.type,this.fn);else if(this.fn2)
this.elements.each(function(i,el){query.fn2.apply(el);});this.elements=[];this.stopped=true;},run:function(){if(this.stopped)return;var query=this;var oEls=this.elements,els=$(this.selector,this.context),nEls=els.not(oEls);this.elements=els;if(this.type){nEls.bind(this.type,this.fn);if(oEls.length>0)
$.each(oEls,function(i,el){if($.inArray(el,els)<0)
$.event.remove(el,query.type,query.fn);});}
else{nEls.each(function(){query.fn.apply(this);});if(this.fn2&&oEls.length>0)
$.each(oEls,function(i,el){if($.inArray(el,els)<0)
query.fn2.apply(el);});}}};$.extend($.livequery,{guid:0,queries:[],queue:[],running:false,timeout:null,checkQueue:function(){if($.livequery.running&&$.livequery.queue.length){var length=$.livequery.queue.length;while(length--)
$.livequery.queries[$.livequery.queue.shift()].run();}},pause:function(){$.livequery.running=false;},play:function(){$.livequery.running=true;$.livequery.run();},registerPlugin:function(){$.each(arguments,function(i,n){if(!$.fn[n])return;var old=$.fn[n];$.fn[n]=function(){var r=old.apply(this,arguments);$.livequery.run();return r;}});},run:function(id){if(id!=undefined){if($.inArray(id,$.livequery.queue)<0)
$.livequery.queue.push(id);}
else
$.each($.livequery.queries,function(id){if($.inArray(id,$.livequery.queue)<0)
$.livequery.queue.push(id);});if($.livequery.timeout)clearTimeout($.livequery.timeout);$.livequery.timeout=setTimeout($.livequery.checkQueue,20);},stop:function(id){if(id!=undefined)
$.livequery.queries[id].stop();else
$.each($.livequery.queries,function(id){$.livequery.queries[id].stop();});}});$.livequery.registerPlugin('append','prepend','after','before','wrap','attr','removeAttr','addClass','removeClass','toggleClass','empty','remove');$(function(){$.livequery.play();});var init=$.prototype.init;$.prototype.init=function(a,c){var r=init.apply(this,arguments);if(a&&a.selector)
r.context=a.context,r.selector=a.selector;if(typeof a=='string')
r.context=c||document,r.selector=a;return r;};$.prototype.init.prototype=$.prototype;})(jQuery);
/* end jQuery.livequery */
if(typeof jQuery=="undefined"){throw"Unable to load Shadowbox, jQuery library not found"}var Shadowbox={};Shadowbox.lib={adapter:"jquery",getStyle:function(B,A){return jQuery(B).css(A)},setStyle:function(C,B,D){if(typeof B!="object"){var A={};A[B]=D;B=A}jQuery(C).css(B)},get:function(A){return(typeof A=="string")?document.getElementById(A):A},remove:function(A){jQuery(A).remove()},getTarget:function(A){return A.target},getPageXY:function(A){return[A.pageX,A.pageY]},preventDefault:function(A){A.preventDefault()},keyCode:function(A){return A.keyCode},addEvent:function(C,A,B){jQuery(C).bind(A,B)},removeEvent:function(C,A,B){jQuery(C).unbind(A,B)},append:function(B,A){jQuery(B).append(A)}};(function(A){A.fn.shadowbox=function(B){return this.each(function(){var E=A(this);var D=A.extend({},B||{},A.metadata?E.metadata():A.meta?E.data():{});var C=this.className||"";D.width=parseInt((C.match(/w:(\d+)/)||[])[1])||D.width;D.height=parseInt((C.match(/h:(\d+)/)||[])[1])||D.height;Shadowbox.setup(E,D)})}})(jQuery);
if(typeof Shadowbox=="undefined"){throw"Unable to load Shadowbox, no base library adapter found"}(function(){var version="2.0";var options={animate:true,animateFade:true,animSequence:"wh",flvPlayer:"/web/cms/contentblob/237678/data/37470/blob.swf",modal:false,overlayColor:"#000",overlayOpacity:0.8,flashBgColor:"#ffffff",autoplayMovies:true,showMovieControls:true,slideshowDelay:0,resizeDuration:0.55,fadeDuration:0.35,displayNav:true,continuous:false,displayCounter:true,counterType:"default",counterLimit:20,viewportPadding:20,handleOversize:"resize",handleException:null,handleUnsupported:"link",initialHeight:160,initialWidth:320,enableKeys:true,onOpen:null,onFinish:null,onChange:null,onClose:null,skipSetup:false,errors:{fla:{name:"Flash",url:"http://www.adobe.com/products/flashplayer/"},qt:{name:"QuickTime",url:"http://www.apple.com/quicktime/download/"},wmp:{name:"Windows Media Player",url:"http://www.microsoft.com/windows/windowsmedia/"},f4m:{name:"Flip4Mac",url:"http://www.flip4mac.com/wmv_download.htm"}},ext:{img:["png","jpg","jpeg","gif","bmp"],swf:["swf"],flv:["flv"],qt:["dv","mov","moov","movie","mp4"],wmp:["asf","wm","wmv"],qtwmp:["avi","mpg","mpeg"],iframe:["asp","aspx","cgi","cfm","htm","html","pl","php","php3","php4","php5","phtml","rb","rhtml","shtml","txt","vbs"]}};var SB=Shadowbox;var SL=SB.lib;var default_options;var RE={domain:/:\/\/(.*?)[:\/]/,inline:/#(.+)$/,rel:/^(light|shadow)box/i,gallery:/^(light|shadow)box\[(.*?)\]/i,unsupported:/^unsupported-(\w+)/,param:/\s*([a-z_]*?)\s*=\s*(.+)\s*/,empty:/^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i};var cache=[];var gallery;var current;var content;var content_id="shadowbox_content";var dims;var initialized=false;var activated=false;var slide_timer;var slide_start;var slide_delay=0;var ua=navigator.userAgent.toLowerCase();var client={isStrict:document.compatMode=="CSS1Compat",isOpera:ua.indexOf("opera")>-1,isIE:ua.indexOf("msie")>-1,isIE7:ua.indexOf("msie 7")>-1,isSafari:/webkit|khtml/.test(ua),isWindows:ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1,isMac:ua.indexOf("macintosh")!=-1||ua.indexOf("mac os x")!=-1,isLinux:ua.indexOf("linux")!=-1};client.isBorderBox=client.isIE&&!client.isStrict;client.isSafari3=client.isSafari&&!!(document.evaluate);client.isGecko=ua.indexOf("gecko")!=-1&&!client.isSafari;var ltIE7=client.isIE&&!client.isIE7;var plugins;if(navigator.plugins&&navigator.plugins.length){var detectPlugin=function(plugin_name){var detected=false;for(var i=0,len=navigator.plugins.length;i<len;++i){if(navigator.plugins[i].name.indexOf(plugin_name)>-1){detected=true;break}}return detected};var f4m=detectPlugin("Flip4Mac");plugins={fla:detectPlugin("Shockwave Flash"),qt:detectPlugin("QuickTime"),wmp:!f4m&&detectPlugin("Windows Media"),f4m:f4m}}else{var detectPlugin=function(plugin_name){var detected=false;try{var axo=new ActiveXObject(plugin_name);if(axo){detected=true}}catch(e){}return detected};plugins={fla:detectPlugin("ShockwaveFlash.ShockwaveFlash"),qt:detectPlugin("QuickTime.QuickTime"),wmp:detectPlugin("wmplayer.ocx"),f4m:false}}var apply=function(o,e){for(var p in e){o[p]=e[p]}return o};var isLink=function(el){return el&&typeof el.tagName=="string"&&(el.tagName.toUpperCase()=="A"||el.tagName.toUpperCase()=="AREA")};SL.getViewportHeight=function(){var h=window.innerHeight;var mode=document.compatMode;if((mode||client.isIE)&&!client.isOpera){h=client.isStrict?document.documentElement.clientHeight:document.body.clientHeight}return h};SL.getViewportWidth=function(){var w=window.innerWidth;var mode=document.compatMode;if(mode||client.isIE){w=client.isStrict?document.documentElement.clientWidth:document.body.clientWidth}return w};SL.createHTML=function(obj){var html="<"+obj.tag;for(var attr in obj){if(attr=="tag"||attr=="html"||attr=="children"){continue}if(attr=="cls"){html+=' class="'+obj.cls+'"'}else{html+=" "+attr+'="'+obj[attr]+'"'}}if(RE.empty.test(obj.tag)){html+="/>"}else{html+=">";var cn=obj.children;if(cn){for(var i=0,len=cn.length;i<len;++i){html+=this.createHTML(cn[i])}}if(obj.html){html+=obj.html}html+="</"+obj.tag+">"}return html};var ease=function(x){return 1+Math.pow(x-1,3)};var animate=function(el,p,to,d,cb){var from=parseFloat(SL.getStyle(el,p));if(isNaN(from)){from=0}if(from==to){if(typeof cb=="function"){cb()}return }var delta=to-from;var op=p=="opacity";var unit=op?"":"px";var fn=function(ease){SL.setStyle(el,p,from+ease*delta+unit)};if(!options.animate&&!op||op&&!options.animateFade){fn(1);if(typeof cb=="function"){cb()}return }d*=1000;var begin=new Date().getTime();var end=begin+d;var timer=setInterval(function(){var time=new Date().getTime();if(time>=end){clearInterval(timer);fn(1);if(typeof cb=="function"){cb()}}else{fn(ease((time-begin)/d))}},10)};var clearOpacity=function(el){var s=el.style;if(client.isIE){if(typeof s.filter=="string"&&(/alpha/i).test(s.filter)){s.filter=s.filter.replace(/[\w\.]*alpha\(.*?\);?/i,"")}}else{s.opacity="";s["-moz-opacity"]="";s["-khtml-opacity"]=""}};var getComputedHeight=function(el){var h=Math.max(el.offsetHeight,el.clientHeight);if(!h){h=parseInt(SL.getStyle(el,"height"),10)||0;if(!client.isBorderBox){h+=parseInt(SL.getStyle(el,"padding-top"),10)+parseInt(SL.getStyle(el,"padding-bottom"),10)+parseInt(SL.getStyle(el,"border-top-width"),10)+parseInt(SL.getStyle(el,"border-bottom-width"),10)}}return h};var getPlayer=function(url){var m=url.match(RE.domain);var d=m&&document.domain==m[1];if(url.indexOf("#")>-1&&d){return"inline"}var q=url.indexOf("?");if(q>-1){url=url.substring(0,q)}if(RE.img.test(url)){return"img"}if(RE.swf.test(url)){return plugins.fla?"swf":"unsupported-swf"}if(RE.flv.test(url)){return plugins.fla?"flv":"unsupported-flv"}if(RE.qt.test(url)){return plugins.qt?"qt":"unsupported-qt"}if(RE.wmp.test(url)){if(plugins.wmp){return"wmp"}if(plugins.f4m){return"qt"}if(client.isMac){return plugins.qt?"unsupported-f4m":"unsupported-qtf4m"}return"unsupported-wmp"}else{if(RE.qtwmp.test(url)){if(plugins.qt){return"qt"}if(plugins.wmp){return"wmp"}return client.isMac?"unsupported-qt":"unsupported-qtwmp"}else{if(!d||RE.iframe.test(url)){return"iframe"}}}return"iframe"};var handleClick=function(ev){var link;if(isLink(this)){link=this}else{link=SL.getTarget(ev);while(!isLink(link)&&link.parentNode){link=link.parentNode}}if(link){SB.open(link);if(gallery.length){SL.preventDefault(ev)}}};var toggleNav=function(id,on){var el=SL.get("shadowbox_nav_"+id);if(el){el.style.display=on?"":"none"}};var buildBars=function(cb){var obj=gallery[current];var title_i=SL.get("shadowbox_title_inner");title_i.innerHTML=obj.title||"";var nav=SL.get("shadowbox_nav");if(nav){var c,n,pl,pa,p;if(options.displayNav){c=true;var len=gallery.length;if(len>1){if(options.continuous){n=p=true}else{n=(len-1)>current;p=current>0}}if(options.slideshowDelay>0&&hasNext()){pa=slide_timer!="paused";pl=!pa}}else{c=n=pl=pa=p=false}toggleNav("close",c);toggleNav("next",n);toggleNav("play",pl);toggleNav("pause",pa);toggleNav("previous",p)}var counter=SL.get("shadowbox_counter");if(counter){var co="";if(options.displayCounter&&gallery.length>1){if(options.counterType=="skip"){var i=0,len=gallery.length,end=len;var limit=parseInt(options.counterLimit);if(limit<len){var h=Math.round(limit/2);i=current-h;if(i<0){i+=len}end=current+(limit-h);if(end>len){end-=len}}while(i!=end){if(i==len){i=0}co+='<a onclick="Shadowbox.change('+i+');"';if(i==current){co+=' class="shadowbox_counter_current"'}co+=">"+(++i)+"</a>"}}else{co=(current+1)+" "+SB.LANG.of+" "+len}}counter.innerHTML=co}cb()};var hideBars=function(anim,cb){var obj=gallery[current];var title=SL.get("shadowbox_title");var info=SL.get("shadowbox_info");var title_i=SL.get("shadowbox_title_inner");var info_i=SL.get("shadowbox_info_inner");var fn=function(){buildBars(cb)};var title_h=getComputedHeight(title);var info_h=getComputedHeight(info)*-1;if(anim){animate(title_i,"margin-top",title_h,0.35);animate(info_i,"margin-top",info_h,0.35,fn)}else{SL.setStyle(title_i,"margin-top",title_h+"px");SL.setStyle(info_i,"margin-top",info_h+"px");fn()}};var showBars=function(cb){var title_i=SL.get("shadowbox_title_inner");var info_i=SL.get("shadowbox_info_inner");var t=title_i.innerHTML!="";if(t){animate(title_i,"margin-top",0,0.35)}animate(info_i,"margin-top",0,0.35,cb)};var loadContent=function(){var obj=gallery[current];if(!obj){return }var changing=false;if(content){content.remove();changing=true}var p=obj.player=="inline"?"html":obj.player;if(typeof SB[p]!="function"){SB.raise("Unknown player "+obj.player)}content=new SB[p](content_id,obj);listenKeys(false);toggleLoading(true);hideBars(changing,function(){if(!content){return }if(!changing){SL.get("shadowbox").style.display=""}var fn=function(){resizeContent(function(){if(!content){return }showBars(function(){if(!content){return }SL.get("shadowbox_body_inner").innerHTML=SL.createHTML(content.markup(dims));toggleLoading(false,function(){if(!content){return }if(typeof content.onLoad=="function"){content.onLoad()}if(options.onFinish&&typeof options.onFinish=="function"){options.onFinish(gallery[current])}if(slide_timer!="paused"){SB.play()}listenKeys(true)})})})};if(typeof content.ready!="undefined"){var id=setInterval(function(){if(content){if(content.ready){clearInterval(id);id=null;fn()}}else{clearInterval(id);id=null}},100)}else{fn()}});if(gallery.length>1){var next=gallery[current+1]||gallery[0];if(next.player=="img"){var a=new Image();a.src=next.content}var prev=gallery[current-1]||gallery[gallery.length-1];if(prev.player=="img"){var b=new Image();b.src=prev.content}}};var setDimensions=function(height,width,resizable){resizable=resizable||false;var sb=SL.get("shadowbox_body");var h=height=parseInt(height);var w=width=parseInt(width);var view_h=SL.getViewportHeight();var view_w=SL.getViewportWidth();var border_w=parseInt(SL.getStyle(sb,"border-left-width"),10)+parseInt(SL.getStyle(sb,"border-right-width"),10);var extra_w=border_w+2*options.viewportPadding;if(w+extra_w>=view_w){w=view_w-extra_w}var border_h=parseInt(SL.getStyle(sb,"border-top-width"),10)+parseInt(SL.getStyle(sb,"border-bottom-width"),10);var bar_h=getComputedHeight(SL.get("shadowbox_title"))+getComputedHeight(SL.get("shadowbox_info"));var extra_h=border_h+2*options.viewportPadding+bar_h;if(h+extra_h>=view_h){h=view_h-extra_h}var drag=false;var resize_h=height;var resize_w=width;var handle=options.handleOversize;if(resizable&&(handle=="resize"||handle=="drag")){var change_h=(height-h)/height;var change_w=(width-w)/width;if(handle=="resize"){if(change_h>change_w){w=Math.round((width/height)*h)}else{if(change_w>change_h){h=Math.round((height/width)*w)}}resize_w=w;resize_h=h}else{var link=gallery[current];if(link){drag=link.player=="img"&&(change_h>0||change_w>0)}}}dims={height:h+border_h+bar_h,width:w+border_w,inner_h:h,inner_w:w,top:(view_h-(h+extra_h))/2+options.viewportPadding,resize_h:resize_h,resize_w:resize_w,drag:drag}};var resizeContent=function(cb){if(!content){return }setDimensions(content.height,content.width,content.resizable);if(cb){switch(options.animSequence){case"hw":adjustHeight(dims.inner_h,dims.top,true,function(){adjustWidth(dims.width,true,cb)});break;case"wh":adjustWidth(dims.width,true,function(){adjustHeight(dims.inner_h,dims.top,true,cb)});break;case"sync":default:adjustWidth(dims.width,true);adjustHeight(dims.inner_h,dims.top,true,cb)}}else{adjustWidth(dims.width,false);adjustHeight(dims.inner_h,dims.top,false);var c=SL.get(content_id);if(c){if(content.resizable&&options.handleOversize=="resize"){c.height=dims.resize_h;c.width=dims.resize_w}if(gallery[current].player=="img"&&options.handleOversize=="drag"){var top=parseInt(SL.getStyle(c,"top"));if(top+content.height<dims.inner_h){SL.setStyle(c,"top",dims.inner_h-content.height+"px")}var left=parseInt(SL.getStyle(c,"left"));if(left+content.width<dims.inner_w){SL.setStyle(c,"left",dims.inner_w-content.width+"px")}}}}};var adjustHeight=function(height,top,anim,cb){height=parseInt(height);var sb=SL.get("shadowbox_body");if(anim){animate(sb,"height",height,options.resizeDuration)}else{SL.setStyle(sb,"height",height+"px")}var s=SL.get("shadowbox");if(anim){animate(s,"top",top,options.resizeDuration,cb)}else{SL.setStyle(s,"top",top+"px");if(typeof cb=="function"){cb()}}};var adjustWidth=function(width,anim,cb){width=parseInt(width);var s=SL.get("shadowbox");if(anim){animate(s,"width",width,options.resizeDuration,cb)}else{SL.setStyle(s,"width",width+"px");if(typeof cb=="function"){cb()}}};var listenKeys=function(on){if(!options.enableKeys){return }SL[(on?"add":"remove")+"Event"](document,"keydown",handleKey)};var handleKey=function(e){var code=SL.keyCode(e);SL.preventDefault(e);if(code==81||code==88||code==27){SB.close()}else{if(code==37){SB.previous()}else{if(code==39){SB.next()}else{if(code==32){SB[(typeof slide_timer=="number"?"pause":"play")]()}}}}};var toggleLoading=function(on,cb){var loading=SL.get("shadowbox_loading");if(on){loading.style.display="";if(typeof cb=="function"){cb()}}else{var p=gallery[current].player;var anim=(p=="img"||p=="html");var fn=function(){loading.style.display="none";clearOpacity(loading);if(typeof cb=="function"){cb()}};if(anim){animate(loading,"opacity",0,options.fadeDuration,fn)}else{fn()}}};var fixTop=function(){SL.get("shadowbox_container").style.top=document.documentElement.scrollTop+"px"};var fixHeight=function(){SL.get("shadowbox_overlay").style.height=SL.getViewportHeight()+"px"};var hasNext=function(){return gallery.length>1&&(current!=gallery.length-1||options.continuous)};var toggleVisible=function(cb){var els,v=(cb)?"hidden":"visible";var hide=["select","object","embed"];for(var i=0;i<hide.length;++i){els=document.getElementsByTagName(hide[i]);for(var j=0,len=els.length;j<len;++j){els[j].style.visibility=v}}var so=SL.get("shadowbox_overlay");var sc=SL.get("shadowbox_container");var sb=SL.get("shadowbox");if(cb){SL.setStyle(so,{backgroundColor:options.overlayColor,opacity:0});if(!options.modal){SL.addEvent(so,"click",SB.close)}if(ltIE7){fixTop();fixHeight();SL.addEvent(window,"scroll",fixTop)}sb.style.display="none";sc.style.visibility="visible";animate(so,"opacity",parseFloat(options.overlayOpacity),options.fadeDuration,cb)}else{SL.removeEvent(so,"click",SB.close);if(ltIE7){SL.removeEvent(window,"scroll",fixTop)}sb.style.display="none";animate(so,"opacity",0,options.fadeDuration,function(){sc.style.visibility="hidden";sb.style.display="";clearOpacity(so)})}};Shadowbox.init=function(opts){if(initialized){return }if(typeof SB.LANG=="undefined"){SB.raise("No Shadowbox language loaded");return }if(typeof SB.SKIN=="undefined"){SB.raise("No Shadowbox skin loaded");return }apply(options,opts||{});var markup=SB.SKIN.markup.replace(/\{(\w+)\}/g,function(m,p){return SB.LANG[p]});var bd=document.body||document.documentElement;SL.append(bd,markup);if(ltIE7){SL.setStyle(SL.get("shadowbox_container"),"position","absolute");SL.get("shadowbox_body").style.zoom=1;var png=SB.SKIN.png_fix;if(png&&png.constructor==Array){for(var i=0;i<png.length;++i){var el=SL.get(png[i]);if(el){var match=SL.getStyle(el,"background-image").match(/url\("(.*\.png)"\)/);if(match){SL.setStyle(el,{backgroundImage:"none",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,src="+match[1]+",sizingMethod=scale);"})}}}}}for(var e in options.ext){RE[e]=new RegExp(".("+options.ext[e].join("|")+")s*$","i")}var id;SL.addEvent(window,"resize",function(){if(id){clearTimeout(id);id=null}id=setTimeout(function(){if(ltIE7){fixHeight()}resizeContent()},50)});if(!options.skipSetup){SB.setup()}initialized=true};Shadowbox.loadSkin=function(skin,dir){if(!(/\/$/.test(dir))){dir+="/"}skin=dir+skin+"/";document.write('<link rel="stylesheet" type="text/css" href="'+skin+'skin.css">');document.write('<script type="text/javascript" src="'+skin+'skin.js"><\/script>')};Shadowbox.loadLanguage=function(lang,dir){if(!(/\/$/.test(dir))){dir+="/"}document.write('<script type="text/javascript" src="'+dir+"shadowbox-"+lang+'.js"><\/script>')};Shadowbox.loadPlayer=function(players,dir){if(typeof players=="string"){players=[players]}if(!(/\/$/.test(dir))){dir+="/"}for(var i=0,len=players.length;i<len;++i){document.write('<script type="text/javascript" src="'+dir+"shadowbox-"+players[i]+'.js"><\/script>')}};Shadowbox.setup=function(links,opts){if(!links){var links=[];var a=document.getElementsByTagName("a"),rel;for(var i=0,len=a.length;i<len;++i){rel=a[i].getAttribute("rel");if(rel&&RE.rel.test(rel)){links[links.length]=a[i]}}}else{if(!links.length){links=[links]}}var link;for(var i=0,len=links.length;i<len;++i){link=links[i];if(typeof link.shadowboxCacheKey=="undefined"){link.shadowboxCacheKey=cache.length;SL.addEvent(link,"click",handleClick)}cache[link.shadowboxCacheKey]=this.buildCacheObj(link,opts)}};Shadowbox.buildCacheObj=function(link,opts){var href=link.href;var o={el:link,title:link.getAttribute("title"),player:getPlayer(href),options:apply({},opts||{}),content:href};var opt,l_opts=["player","title","height","width","gallery"];for(var i=0,len=l_opts.length;i<len;++i){opt=l_opts[i];if(typeof o.options[opt]!="undefined"){o[opt]=o.options[opt];delete o.options[opt]}}var rel=link.getAttribute("rel");if(rel){var match=rel.match(RE.gallery);if(match){o.gallery=escape(match[2])}var params=rel.split(";");for(var i=0,len=params.length;i<len;++i){match=params[i].match(RE.param);if(match){if(match[1]=="options"){eval("apply(o.options, "+match[2]+")")}else{o[match[1]]=match[2]}}}}return o};Shadowbox.applyOptions=function(opts){if(opts){default_options=apply({},options);options=apply(options,opts)}};Shadowbox.revertOptions=function(){if(default_options){options=default_options;default_options=null}};Shadowbox.open=function(obj,opts){this.revertOptions();if(isLink(obj)){if(typeof obj.shadowboxCacheKey=="undefined"||typeof cache[obj.shadowboxCacheKey]=="undefined"){obj=this.buildCacheObj(obj,opts)}else{obj=cache[obj.shadowboxCacheKey]}}if(obj.constructor==Array){gallery=obj;current=0}else{var copy=apply({},obj);if(!obj.gallery){gallery=[copy];current=0}else{current=null;gallery=[];var ci;for(var i=0,len=cache.length;i<len;++i){ci=cache[i];if(ci.gallery){if(ci.content==obj.content&&ci.gallery==obj.gallery&&ci.title==obj.title){current=gallery.length}if(ci.gallery==obj.gallery){gallery.push(apply({},ci))}}}if(current==null){gallery.unshift(copy);current=0}}}obj=gallery[current];if(obj.options||opts){this.applyOptions(apply(apply({},obj.options||{}),opts||{}))}var match,r;for(var i=0,len=gallery.length;i<len;++i){r=false;if(gallery[i].player=="unsupported"){r=true}else{if(match=RE.unsupported.exec(gallery[i].player)){if(options.handleUnsupported=="link"){gallery[i].player="html";var s,a,oe=options.errors;switch(match[1]){case"qtwmp":s="either";a=[oe.qt.url,oe.qt.name,oe.wmp.url,oe.wmp.name];break;case"qtf4m":s="shared";a=[oe.qt.url,oe.qt.name,oe.f4m.url,oe.f4m.name];break;default:s="single";if(match[1]=="swf"||match[1]=="flv"){match[1]="fla"}a=[oe[match[1]].url,oe[match[1]].name]}var msg=SB.LANG.errors[s].replace(/\{(\d+)\}/g,function(m,i){return a[i]});gallery[i].content='<div class="shadowbox_message">'+msg+"</div>"}else{r=true}}else{if(gallery[i].player=="inline"){var match=RE.inline.exec(gallery[i].content);if(match){var el;if(el=SL.get(match[1])){gallery[i].content=el.innerHTML}else{SB.raise("Cannot find element with id "+match[1])}}else{SB.raise("Cannot find element id for inline content")}}}}if(r){gallery.splice(i,1);if(i<current){--current}else{if(i==current){current=i>0?current-1:i}}--i;len=gallery.length}}if(gallery.length){if(options.onOpen&&typeof options.onOpen=="function"){options.onOpen(obj)}if(!activated){setDimensions(options.initialHeight,options.initialWidth);adjustHeight(dims.inner_h,dims.top,false);adjustWidth(dims.width,false);toggleVisible(loadContent)}else{loadContent()}activated=true}};Shadowbox.change=function(num){if(!gallery){return }if(!gallery[num]){if(!options.continuous){return }else{num=num<0?(gallery.length-1):0}}if(typeof slide_timer=="number"){clearTimeout(slide_timer);slide_timer=null;slide_delay=slide_start=0}current=num;if(options.onChange&&typeof options.onChange=="function"){options.onChange(gallery[current])}loadContent()};Shadowbox.next=function(){this.change(current+1)};Shadowbox.previous=function(){this.change(current-1)};Shadowbox.play=function(){if(!hasNext()){return }if(!slide_delay){slide_delay=options.slideshowDelay*1000}if(slide_delay){slide_start=new Date().getTime();slide_timer=setTimeout(function(){slide_delay=slide_start=0;SB.next()},slide_delay);toggleNav("play",false);toggleNav("pause",true)}};Shadowbox.pause=function(){if(typeof slide_timer=="number"){var time=new Date().getTime();slide_delay=Math.max(0,slide_delay-(time-slide_start));if(slide_delay){clearTimeout(slide_timer);slide_timer="paused"}toggleNav("pause",false);toggleNav("play",true)}};Shadowbox.close=function(){if(!activated){return }listenKeys(false);toggleVisible(false);if(content){content.remove();content=null}if(typeof slide_timer=="number"){clearTimeout(slide_timer)}slide_timer=null;slide_delay=0;if(options.onClose&&typeof options.onClose=="function"){options.onClose(gallery[current])}activated=false};Shadowbox.clearCache=function(){for(var i=0,len=cache.length;i<len;++i){if(cache[i].el){SL.removeEvent(cache[i].el,"click",handleClick);delete cache[i].el.shadowboxCacheKey}}cache=[]};Shadowbox.getPlugins=function(){return plugins};Shadowbox.getOptions=function(){return options};Shadowbox.getCurrent=function(){return gallery[current]};Shadowbox.getVersion=function(){return version};Shadowbox.getClient=function(){return client};Shadowbox.getContent=function(){return content};Shadowbox.getDimensions=function(){return dims};Shadowbox.raise=function(e){if(typeof options.handleException=="function"){options.handleException(e)}else{throw e}}})();
if(typeof Shadowbox=="undefined"){throw"Unable to load Shadowbox language file, base library not found."}Shadowbox.LANG={code:"en",of:"/",loading:"loading",cancel:"Cancel",next:"Next",previous:"Previous",play:"Play",pause:"Pause",close:"Close",errors:{single:'You must install the <a href="{0}">{1}</a> browser plugin to view this content.',shared:'You must install both the <a href="{0}">{1}</a> and <a href="{2}">{3}</a> browser plugins to view this content.',either:'You must install either the <a href="{0}">{1}</a> or the <a href="{2}">{3}</a> browser plugin to view this content.'}};
/**
 * The "classic" theme markup for Shadowbox.
 *
 * This file is part of Shadowbox.
 *
 * Shadowbox is an online media viewer application that supports all of the
 * web's most popular media publishing formats. Shadowbox is written entirely
 * in JavaScript and CSS and is highly customizable. Using Shadowbox, website
 * authors can showcase a wide assortment of media in all major browsers without
 * navigating users away from the linking page.
 *
 * Shadowbox is released under version 3.0 of the Creative Commons Attribution-
 * Noncommercial-Share Alike license. This means that it is absolutely free
 * for personal, noncommercial use provided that you 1) make attribution to the
 * author and 2) release any derivative work under the same or a similar
 * license.
 *
 * If you wish to use Shadowbox for commercial purposes, licensing information
 * can be found at http://mjijackson.com/shadowbox/.
 *
 * @author      Michael J. I. Jackson <mjijackson@gmail.com>
 * @copyright   2007-2008 Michael J. I. Jackson
 * @license     http://creativecommons.org/licenses/by-nc-sa/3.0/
 * @version     SVN: $Id: skin.js 108 2008-07-11 04:19:01Z mjijackson $
 */
if(typeof Shadowbox == 'undefined'){
    throw 'Unable to load Shadowbox skin, base library not found.';
}
if(typeof Shadowbox=='undefined'){throw'Unable to load Shadowbox skin, base library not found.';}
Shadowbox.SKIN={markup:'<div id="shadowbox_container">'+'<div id="shadowbox_overlay"></div>'+'<div id="shadowbox">'+'<div id="shadowbox_title">'+'<div id="shadowbox_title_inner"></div>'+'</div>'+'<div id="shadowbox_body">'+'<div id="shadowbox_body_inner"></div>'+'<div id="shadowbox_loading">'+'<div id="shadowbox_loading_indicator"></div>'+'<span><a onclick="Shadowbox.close();">{cancel}</a></span>'+'</div>'+'</div>'+'<div id="shadowbox_info">'+'<div id="shadowbox_info_inner">'+'<div id="shadowbox_counter"></div>'+'<div id="shadowbox_nav">'+'<a id="shadowbox_nav_close" title="{close}" onclick="Shadowbox.close()"></a>'+'<a id="shadowbox_nav_next" title="{next}" onclick="Shadowbox.next()"></a>'+'<a id="shadowbox_nav_play" title="{play}" onclick="Shadowbox.play()"></a>'+'<a id="shadowbox_nav_pause" title="{pause}" onclick="Shadowbox.pause()"></a>'+'<a id="shadowbox_nav_previous" title="{previous}" onclick="Shadowbox.previous()"></a>'+'</div>'+'<div class="shadowbox_clear"></div>'+'</div>'+'</div>'+'</div>'+'</div>',png_fix:['shadowbox_nav_close','shadowbox_nav_next','shadowbox_nav_play','shadowbox_nav_pause','shadowbox_nav_previous']};
(function(){var F=Shadowbox;var L=F.lib;var A=F.getClient();var I;var M;var J="shadowbox_drag_layer";var K;var D=function(){I={x:0,y:0,start_x:null,start_y:null}};var E=function(N,O,C){if(N){D();var P=["position:absolute","height:"+O+"px","width:"+C+"px","cursor:"+(A.isGecko?"-moz-grab":"move"),"background-color:"+(A.isIE?"#fff;filter:alpha(opacity=0)":"transparent")];L.append(L.get("shadowbox_body_inner"),'<div id="'+J+'" style="'+P.join(";")+'"></div>');L.addEvent(L.get(J),"mousedown",H)}else{var Q=L.get(J);if(Q){L.removeEvent(Q,"mousedown",H);L.remove(Q)}}};var H=function(N){L.preventDefault(N);var C=L.getPageXY(N);I.start_x=C[0];I.start_y=C[1];M=L.get("shadowbox_content");L.addEvent(document,"mousemove",G);L.addEvent(document,"mouseup",B);if(A.isGecko){L.setStyle(L.get(J),"cursor","-moz-grabbing")}};var B=function(){L.removeEvent(document,"mousemove",G);L.removeEvent(document,"mouseup",B);if(A.isGecko){L.setStyle(L.get(J),"cursor","-moz-grab")}};var G=function(Q){var O=F.getContent();var R=F.getDimensions();var P=L.getPageXY(Q);var N=P[0]-I.start_x;I.start_x+=N;I.x=Math.max(Math.min(0,I.x+N),R.inner_w-O.width);L.setStyle(M,"left",I.x+"px");var C=P[1]-I.start_y;I.start_y+=C;I.y=Math.max(Math.min(0,I.y+C),R.inner_h-O.height);L.setStyle(M,"top",I.y+"px")};Shadowbox.img=function(O,N){this.id=O;this.obj=N;this.resizable=true;this.ready=false;var C=this;K=new Image();K.onload=function(){C.height=C.obj.height?parseInt(C.obj.height,10):K.height;C.width=C.obj.width?parseInt(C.obj.width,10):K.width;C.ready=true;K.onload="";K=null};K.src=N.content};Shadowbox.img.prototype={markup:function(C){return{tag:"img",id:this.id,height:C.resize_h,width:C.resize_w,src:this.obj.content,style:"position:absolute"}},onLoad:function(){var C=F.getDimensions();if(C.drag&&F.getOptions().handleOversize=="drag"){E(true,C.resize_h,C.resize_w)}},remove:function(){var C=L.get(this.id);if(C){L.remove(C)}E(false);if(K){K.onload="";K=null}}}})();
(function(){var A=Shadowbox;var B=A.lib;Shadowbox.flv=function(D,C){this.id=D;this.obj=C;this.resizable=true;this.height=this.obj.height?parseInt(this.obj.height,10):300;if(A.getOptions().showMovieControls==true){this.height+=20}this.width=this.obj.width?parseInt(this.obj.width,10):300};Shadowbox.flv.prototype={markup:function(G){var E=this.obj;var F=G.resize_h;var I=G.resize_w;var L=A.getOptions();var C=String(L.autoplayMovies);var J=L.showMovieControls;var H=String(J);var K=F-(J?20:0);var D=["file="+this.obj.content,"height="+F,"width="+I,"autostart="+C,"displayheight="+K,"showicons="+H,"backcolor=0x000000","frontcolor=0xCCCCCC","lightcolor=0x557722"];return{tag:"object",id:this.id,name:this.id,type:"application/x-shockwave-flash",data:L.flvPlayer,children:[{tag:"param",name:"movie",value:L.flvPlayer},{tag:"param",name:"flashvars",value:D.join("&amp;")},{tag:"param",name:"allowfullscreen",value:"true"}],height:F,width:I}},remove:function(){var C=B.get(this.id);if(C){B.remove(C)}}}})();
(function(){var A=Shadowbox;var B=A.lib;Shadowbox.html=function(D,C){this.id=D;this.obj=C;this.height=this.obj.height?parseInt(this.obj.height,10):300;this.width=this.obj.width?parseInt(this.obj.width,10):500};Shadowbox.html.prototype={markup:function(C){return{tag:"div",id:this.id,cls:"html",html:this.obj.content}},remove:function(){var C=B.get(this.id);if(C){B.remove(C)}}}})();
(function(){var A=Shadowbox;var B=A.lib;var D=A.getClient();Shadowbox.iframe=function(E,C){this.id=E;this.obj=C;this.height=this.obj.height?parseInt(this.obj.height,10):B.getViewportHeight();this.width=this.obj.width?parseInt(this.obj.width,10):B.getViewportWidth()};Shadowbox.iframe.prototype={markup:function(E){var C={tag:"iframe",id:this.id,name:this.id,height:"100%",width:"100%",frameborder:"0",marginwidth:"0",marginheight:"0",scrolling:"auto"};if(D.isIE){C.allowtransparency="true";if(!D.isIE7){C.src='javascript:false;document.write("");'}}return C},onLoad:function(){var C=(D.isIE)?B.get(this.id).contentWindow:window.frames[this.id];C.location=this.obj.content},remove:function(){var C=B.get(this.id);if(C){B.remove(C);if(D.isGecko){delete window.frames[this.id]}}}}})();
(function(){var A=Shadowbox;var B=A.lib;Shadowbox.swf=function(D,C){this.id=D;this.obj=C;this.resizable=true;this.height=this.obj.height?parseInt(this.obj.height,10):300;this.width=this.obj.width?parseInt(this.obj.width,10):300};Shadowbox.swf.prototype={markup:function(D){var C=A.getOptions().flashBgColor;return{tag:"object",id:this.id,name:this.id,type:"application/x-shockwave-flash",data:this.obj.content,children:[{tag:"param",name:"movie",value:this.obj.content},{tag:"param",name:"allowfullscreen",value:"true"},{tag:"param",name:"bgcolor",value:C}],height:D.resize_h,width:D.resize_w}},remove:function(){var C=B.get(this.id);if(C){B.remove(C)}}}})();
(function(){var A=Shadowbox;var B=A.lib;var D=A.getClient();Shadowbox.wmp=function(E,C){this.id=E;this.obj=C;this.height=this.obj.height?parseInt(this.obj.height,10):300;if(A.getOptions().showMovieControls){this.height+=(D.isIE?70:45)}this.width=this.obj.width?parseInt(this.obj.width,10):300};Shadowbox.wmp.prototype={markup:function(H){var F=A.getOptions();var G=F.autoplayMovies?1:0;var E={tag:"object",id:this.id,name:this.id,height:this.height,width:this.width,children:[{tag:"param",name:"autostart",value:G}]};if(D.isIE){var C=F.showMovieControls?"full":"none";E.classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6";E.children[E.children.length]={tag:"param",name:"url",value:this.obj.content};E.children[E.children.length]={tag:"param",name:"uimode",value:C}}else{var C=F.showMovieControls?1:0;E.type="video/x-ms-wmv";E.data=this.obj.content;E.children[E.children.length]={tag:"param",name:"showcontrols",value:C}}return E},remove:function(){if(D.isIE){try{window[this.id].controls.stop();window[this.id].URL="non-existent.wmv";window[this.id]=function(){}}catch(E){}}var C=B.get(this.id);if(C){setTimeout(function(){B.remove(C)},10)}}}})();
/* start nifty */
var niftyOk=(document.getElementById&&document.createElement&&Array.prototype.push);var niftyCss=true;String.prototype.find=function(what){return(this.indexOf(what)>=0?true:false);}
var oldonload=window.onload;if(typeof(NiftyLoad)!='function')NiftyLoad=function(){};if(typeof(oldonload)=='function')
window.onload=function(){oldonload();NiftyLoad()};else window.onload=function(){NiftyLoad()};function Nifty(selector,options){if(niftyOk==false)return;var i,v=selector.split(","),h=0;if(options==null)options="";if(options.find("fixed-height"))
h=getElementsBySelector(v[0])[0].offsetHeight;for(i=0;i<v.length;i++)
Rounded(v[i],options);if(options.find("height"))SameHeight(selector,h);}
function Rounded(selector,options){var i,top="",bottom="",v=new Array();if(options!=""){options=options.replace("left","tl bl");options=options.replace("right","tr br");options=options.replace("top","tr tl");options=options.replace("bottom","br bl");options=options.replace("transparent","alias");if(options.find("tl")){top="both";if(!options.find("tr"))top="left";}
else if(options.find("tr"))top="right";if(options.find("bl")){bottom="both";if(!options.find("br"))bottom="left";}
else if(options.find("br"))bottom="right";}
if(top==""&&bottom==""&&!options.find("none")){top="both";bottom="both";}
v=getElementsBySelector(selector);for(i=0;i<v.length;i++){FixIE(v[i]);if(top!="")AddTop(v[i],top,options);if(bottom!="")AddBottom(v[i],bottom,options);}}
function AddTop(el,side,options){var d=CreateEl("b"),lim=4,border="",p,i,btype="r",bk,color;d.style.marginLeft="-"+getPadding(el,"Left")+"px";d.style.marginRight="-"+getPadding(el,"Right")+"px";if(options.find("alias")||(color=getBk(el))=="transparent"){color="transparent";bk="transparent";border=getParentBk(el);btype="t";}
else{bk=getParentBk(el);border=Mix(color,bk);}
d.style.background=bk;d.className="niftycorners";p=getPadding(el,"Top");if(options.find("small")){d.style.marginBottom=(p-2)+"px";btype+="s";lim=2;}
else if(options.find("big")){d.style.marginBottom=(p-10)+"px";btype+="b";lim=8;}
else d.style.marginBottom=(p-5)+"px";for(i=1;i<=lim;i++)
d.appendChild(CreateStrip(i,side,color,border,btype));el.style.paddingTop="0";el.insertBefore(d,el.firstChild);}
function AddBottom(el,side,options){var d=CreateEl("b"),lim=4,border="",p,i,btype="r",bk,color;d.style.marginLeft="-"+getPadding(el,"Left")+"px";d.style.marginRight="-"+getPadding(el,"Right")+"px";if(options.find("alias")||(color=getBk(el))=="transparent"){color="transparent";bk="transparent";border=getParentBk(el);btype="t";}
else{bk=getParentBk(el);border=Mix(color,bk);}
d.style.background=bk;d.className="niftycorners";p=getPadding(el,"Bottom");if(options.find("small")){d.style.marginTop=(p-2)+"px";btype+="s";lim=2;}
else if(options.find("big")){d.style.marginTop=(p-10)+"px";btype+="b";lim=8;}
else d.style.marginTop=(p-5)+"px";for(i=lim;i>0;i--)
d.appendChild(CreateStrip(i,side,color,border,btype));el.style.paddingBottom=0;el.appendChild(d);}
function CreateStrip(index,side,color,border,btype){var x=CreateEl("b");x.className=btype+index;x.style.backgroundColor=color;x.style.borderColor=border;if(side=="left"){x.style.borderRightWidth="0";x.style.marginRight="0";}
else if(side=="right"){x.style.borderLeftWidth="0";x.style.marginLeft="0";}
return(x);}
function CreateEl(x){return(document.createElement(x));}
function FixIE(el){if(el.currentStyle!=null&&el.currentStyle.hasLayout!=null&&el.currentStyle.hasLayout==false)
el.style.display="inline-block";}
function SameHeight(selector,maxh){var i,v=selector.split(","),t,j,els=[],gap;for(i=0;i<v.length;i++){t=getElementsBySelector(v[i]);els=els.concat(t);}
for(i=0;i<els.length;i++){if(els[i].offsetHeight>maxh)maxh=els[i].offsetHeight;els[i].style.height="auto";}
for(i=0;i<els.length;i++){gap=maxh-els[i].offsetHeight;if(gap>0){t=CreateEl("b");t.className="niftyfill";t.style.height=gap+"px";nc=els[i].lastChild;if(nc.className=="niftycorners")
els[i].insertBefore(t,nc);else els[i].appendChild(t);}}}
function getElementsBySelector(selector){var i,j,selid="",selclass="",tag=selector,tag2="",v2,k,f,a,s=[],objlist=[],c;if(selector.find("#")){if(selector.find(" ")){s=selector.split(" ");var fs=s[0].split("#");if(fs.length==1)return(objlist);f=document.getElementById(fs[1]);if(f){v=f.getElementsByTagName(s[1]);for(i=0;i<v.length;i++)objlist.push(v[i]);}
return(objlist);}
else{s=selector.split("#");tag=s[0];selid=s[1];if(selid!=""){f=document.getElementById(selid);if(f)objlist.push(f);return(objlist);}}}
if(selector.find(".")){s=selector.split(".");tag=s[0];selclass=s[1];if(selclass.find(" ")){s=selclass.split(" ");selclass=s[0];tag2=s[1];}}
var v=document.getElementsByTagName(tag);if(selclass==""){for(i=0;i<v.length;i++)objlist.push(v[i]);return(objlist);}
for(i=0;i<v.length;i++){c=v[i].className.split(" ");for(j=0;j<c.length;j++){if(c[j]==selclass){if(tag2=="")objlist.push(v[i]);else{v2=v[i].getElementsByTagName(tag2);for(k=0;k<v2.length;k++)objlist.push(v2[k]);}}}}
return(objlist);}
function getParentBk(x){var el=x.parentNode,c;while(el.tagName.toUpperCase()!="HTML"&&(c=getBk(el))=="transparent")
el=el.parentNode;if(c=="transparent")c="#FFFFFF";return(c);}
function getBk(x){var c=getStyleProp(x,"backgroundColor");if(c==null||c=="transparent"||c.find("rgba(0, 0, 0, 0)"))
return("transparent");if(c.find("rgb"))c=rgb2hex(c);return(c);}
function getPadding(x,side){var p=getStyleProp(x,"padding"+side);if(p==null||!p.find("px"))return(0);return(parseInt(p));}
function getStyleProp(x,prop){if(x.currentStyle)
return(x.currentStyle[prop]);if(document.defaultView.getComputedStyle)
return(document.defaultView.getComputedStyle(x,'')[prop]);return(null);}
function rgb2hex(value){var hex="",v,h,i;var regexp=/([0-9]+)[, ]+([0-9]+)[, ]+([0-9]+)/;var h=regexp.exec(value);for(i=1;i<4;i++){v=parseInt(h[i]).toString(16);if(v.length==1)hex+="0"+v;else hex+=v;}
return("#"+hex);}
function Mix(c1,c2){var i,step1,step2,x,y,r=new Array(3);if(c1.length==4)step1=1;else step1=2;if(c2.length==4)step2=1;else step2=2;for(i=0;i<3;i++){x=parseInt(c1.substr(1+step1*i,step1),16);if(step1==1)x=16*x+x;y=parseInt(c2.substr(1+step2*i,step2),16);if(step2==1)y=16*y+y;r[i]=Math.floor((x*50+y*50)/100);r[i]=r[i].toString(16);if(r[i].length==1)r[i]="0"+r[i];}
return("#"+r[0]+r[1]+r[2]);}
/* end nifty */
var lastLayer;
var serviceLayerCount = 0;
function openServiceLayer(content, height, serviceImg)
{
  if (lastLayer && lastLayer.parentNode)
    lastLayer.parentNode.removeChild(lastLayer);
  var id = serviceLayerCount++;
  
  var b = document.body;
  
  var div = document.createElement("DIV");
  lastLayer = div;
  div.className = "serviceLayer";
  div.id = "sl_" + id;
  
  var divBgDummy = document.createElement("DIV");
  divBgDummy.className = "bgDummy";
  div.appendChild(divBgDummy);
  
  divBgDummy.appendChild(getIFrame("about:blank"));
  
  
  var divBgRepeat = document.createElement("DIV");
  divBgRepeat.className = "bgRepeat";
  div.appendChild(divBgRepeat);
  
  
  var divBgHead = document.createElement("DIV");
  divBgHead.className = "bgHead";
  div.appendChild(divBgHead);
  
  var divBgBottom = document.createElement("DIV");
  divBgBottom.className = "bgBottom";
  div.appendChild(divBgBottom);
  
  
  var divContent = document.createElement("DIV");
  divContent.className = "slContent";
  div.appendChild(divContent);
  divContent.appendChild(content);
  
  if (!serviceImg)
    divContent.style.width = "489px";
  
  var close = document.createElement("A");
  close.href = "#";
  close.onclick = function _closa() {this.parentNode.parentNode.parentNode.removeChild(this.parentNode.parentNode)}
  var ct = (typeof closeLayerText != "undefined") ? closeLayerText : "schlieÃŸen";
  close.appendChild(document.createTextNode(ct + " X"));
  divBgBottom.appendChild(close);
  close.style.position = "relative";
  close.style.left = "-10px";
  close.style.fontWeight = "bold";
  
  b.appendChild(div);
  
  div.style.display = 'block';
  
  if (serviceImg)
  {
    if (serviceImg.indexOf("/") != -1)
	divBgHead.style.backgroundImage = "url('" + serviceImg + "')";
else
	divBgHead.className = serviceImg;
  }
  
  
  if (height)
  {
      div.style.height = height + "px"
      divBgHead.style.height = height + "px";
      divBgDummy.style.height = height + "px";
      divBgRepeat.style.height = height + "px";
      
      divContent.style.height = (height-56) + "px";     
  }
  
  div.style.left = "0px";
  
  var ow = document.documentElement ? document.documentElement.offsetWidth : document.body.offsetWidth;
  
  var left = (ow-772) / 2;
  //left -= (div.offsetWidth-768) / 2;
  if (left < 0)
    left = 0;
  div.style.left = left + 190 + "px";
  
  ow = document.documentElement ? document.documentElement.offsetWidth : document.body.offsetWidth;
  
  var st = document.documentElement ? document.documentElement.scrollTop : document.body.scrollTop;
  var pxTop = 120 + st;
  div.style.top = pxTop + "px";
  
  return div;
}
/* start socialbookmarks */
jQuery(document).ready(function(){jQuery('#functionBar').after(jQuery('#socialbookmark_popup_clone'));jQuery('.favoritLink').click(function(){if(jQuery.browser.mozilla){window.sidebar.addPanel(document.title,location.href,"");}else if(jQuery.browser.opera){var elem=document.createElement('a');elem.setAttribute('href',location.href);elem.setAttribute('title',document.title);elem.setAttribute('rel','sidebar');elem.click();}else if(jQuery.browser.msie){window.external.AddFavorite(location.href,document.title);}else if(jQuery.browser.safari){alert('Press <Control>+D to bookmark.');}
return false;});jQuery('.mail_footer').click(function(){var body=encodeURIComponent(location.href);var titel=encodeURIComponent(document.title);var to='';location.href="mailto:"+to+"?subject="+titel+"&body="+body;return false;});jQuery('.social_bookmark_link').click(function(e){var xPos;var t1= jQuery('.socialBookmarkslist li:last').offset();var t2= jQuery('#top').offset();xPos = t1.left-t2.left-160;jQuery("#socialbookmark_popup_clone").toggle('blind',function(){jQuery("#socialbookmark_popup_clone").animate({'left':xPos+'px'},'slow');},500);return false;});});
/* end socialbookmarks */

/* Start rwe.cryptEmail */
function processEmail(element,encrypt)
{var temp;var enc_temp;var dec_temp;if(encrypt)
{temp=element.href.substring(7,element.href.length)
enc_temp=b64d2t(utf8t2d(temp));element.href="mailto:"+enc_temp;return element.href;}
else
{temp=element.href.substring(7,element.href.length);dec_temp=utf8d2t(b64t2d(temp));element.href="mailto:"+dec_temp;return element.href;}}
function b64t2d(t)
{var b64s='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';b64=new Array();f64=new Array();for(var i=0;i<b64s.length;i++)
{b64[i]=b64s.charAt(i);f64[b64s.charAt(i)]=i;}
var d=[];var i=0;t=t.replace(/\n|\r/g,"");t=t.replace(/=/g,"");while(i<t.length)
{d[d.length]=(f64[t.charAt(i)]<<2)|(f64[t.charAt(i+1)]>>4);d[d.length]=(((f64[t.charAt(i+1)]&15)<<4)|(f64[t.charAt(i+2)]>>2));d[d.length]=(((f64[t.charAt(i+2)]&3)<<6)|(f64[t.charAt(i+3)]));i+=4;}
if(t.length%4==2)
d=d.slice(0,d.length-2);if(t.length%4==3)
d=d.slice(0,d.length-1);return d;}
function b64d2t(d)
{var b64s='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';b64=new Array();f64=new Array();for(var i=0;i<b64s.length;i++)
{b64[i]=b64s.charAt(i);f64[b64s.charAt(i)]=i;}
var r=new Array;var i=0;var dl=d.length;if((dl%3)==1)
{d[d.length]=0;d[d.length]=0;}
if((dl%3)==2)
d[d.length]=0;while(i<d.length)
{r[r.length]=b64[d[i]>>2];r[r.length]=b64[((d[i]&3)<<4)|(d[i+1]>>4)];r[r.length]=b64[((d[i+1]&15)<<2)|(d[i+2]>>6)];r[r.length]=b64[d[i+2]&63];if((i%57)==54)
r[r.length]="\n";i+=3;}
if((dl%3)==1)
r[r.length-1]=r[r.length-2]="=";if((dl%3)==2)
r[r.length-1]="=";var t=r.join("");return t;}
function utf8t2d(t)
{var b64s='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';b64=new Array();f64=new Array();for(var i=0;i<b64s.length;i++)
{b64[i]=b64s.charAt(i);f64[b64s.charAt(i)]=i;}
t=t.replace(/\r\n/g,"\n");var d=new Array;var test=String.fromCharCode(237);if(test.charCodeAt(0)<0)
for(var n=0;n<t.length;n++)
{var c=t.charCodeAt(n);if(c>0)
d[d.length]=c;else
{d[d.length]=(((256+c)>>6)|192);d[d.length]=(((256+c)&63)|128);}}
else
for(var n=0;n<t.length;n++)
{var c=t.charCodeAt(n);if(c<128)
d[d.length]=c;else if((c>127)&&(c<2048))
{d[d.length]=((c>>6)|192);d[d.length]=((c&63)|128);}
else
{d[d.length]=((c>>12)|224);d[d.length]=(((c>>6)&63)|128);d[d.length]=((c&63)|128);}}
return d;}
function utf8d2t(d)
{var b64s='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';b64=new Array();f64=new Array();for(var i=0;i<b64s.length;i++)
{b64[i]=b64s.charAt(i);f64[b64s.charAt(i)]=i;}
var r=new Array;var i=0;while(i<d.length)
{if(d[i]<128)
{r[r.length]=String.fromCharCode(d[i]);i++;}
else if((d[i]>191)&&(d[i]<224))
{r[r.length]=String.fromCharCode(((d[i]&31)<<6)|(d[i+1]&63));i+=2;}
else
{r[r.length]=String.fromCharCode(((d[i]&15)<<12)|((d[i+1]&63)<<6)|(d[i+2]&63));i+=3;}}
return r.join("");}
/* end rwe.crypt Email */
/* start rwe.openWindow */
function OpenCustomWindow(sUrl,sName,nWidth,nHeight,bScrollBars,bToolBar,bLocation,bResizable,bMenuBar,bStatus,nX,nY){if((typeof nWidth=='undefined')||(nWidth==null)||(nWidth=='0'))nWidth=1024;if((typeof nHeight=='undefined')||(nHeight==null)||(nHeight=='0'))nHeight=768;if((typeof bScrollBars=='undefined')||(bScrollBars==null))bScrollBars=false;if((typeof bToolBar=='undefined')||(bToolBar==null))bToolBar=false;if((typeof bLocation=='undefined')||(bLocation==null))bLocation=false;if((typeof bResizable=='undefined')||(bResizable==null))bResizable=false;if((typeof bMenuBar=='undefined')||(bMenuBar==null))bMenuBar=false;if((typeof bStatus=='undefined')||(bStatus==null))bStatus=false;if((typeof nX=='undefined')||(nX==null))nX=-1;if((typeof nY=='undefined')||(nY==null))nY=-1;var param="width="+nWidth+",height="+nHeight
+",scrollbars="+(bScrollBars?"yes":"no")
+",toolbar="+(bToolBar?"yes":"no")
+",menubar="+(bMenuBar?"yes":"no")
+",location="+(bLocation?"yes":"no")
+",resizable="+(bResizable?"yes":"no")
+",status="+(bStatus?"yes":"no")
+((nX!=-1)?",left="+nX:"")
+((nY!=-1)?",top="+nY:"");var win=window.open(sUrl,sName==null?"":sName,param);try{win.resizeTo(nWidth,nHeight);}
catch(err){}
win.focus();return win;}
/* end rwe.openWindow */
/* start rwe.pulldown */
function pulldownLinkChanged(list)
{var val=list.options[list.selectedIndex].value;if(!val)
return;var parts=val.split('#|#');var url=parts[0];var target=parts[1];var script=parts[2];if(target=='_blank')
window.open(url);else if(script)
{eval(script);}
else
location.href=url;list.selectedIndex=0}
/* end rwe.pulldown */
/* start rwe.pulldown */
function showTooltip(areaId){xOffset=-20;yOffset=20;areaId.content=jQuery('div.'+areaId.getAttribute("id")).html();jQuery("body").append("<div id='tooltip'>"+areaId.content+"</div>");jQuery('map').mousemove(function(e){varTop=e.pageY-xOffset-jQuery('#tooltip').height();varLeft=e.pageX+yOffset;jQuery("#tooltip").css("top",(varTop)+"px").css("left",(varLeft)+"px");});};function hideTooltip(areaId){jQuery("#tooltip").remove();};
/* end rwe.pulldown */
/* start rwe.windowHeight */
function getWindowHeight()
{var myWidth=0,myHeight=0;if(typeof(window.innerWidth)=='number'){myWidth=window.innerWidth;myHeight=window.innerHeight;}
else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight))
{myWidth=document.documentElement.clientWidth;myHeight=document.documentElement.clientHeight;}
else if(document.body&&(document.body.clientWidth||document.body.clientHeight))
{myWidth=document.body.clientWidth;myHeight=document.body.clientHeight;}
return(myHeight);}
/*end rwe.windowHeight */
/* start rwe.input */
jQuery(document).ready(function(){var initial='Ihr Suchbegriff';var initial_en='search term';if(jQuery('body.de').length>0){jQuery('body.de input.autovalue:text').attr('value',initial);}else{jQuery('body input.autovalue:text').attr('value',initial_en);initial=initial_en;}
jQuery('#qSearch .autovalue').click(function(){if(jQuery('#qSearch .autovalue').attr('value')==initial){jQuery('#qSearch .autovalue').attr('value','');}
jQuery('#qSearch .autovalue').blur(function(){if(jQuery('#qSearch .autovalue').attr('value')==''){jQuery('#qSearch .autovalue').attr('value',initial);}});});var initial_pq=jQuery('#pq').attr('value');jQuery('#pq').click(function(){if(jQuery('#pq').attr('value')==initial_pq){jQuery('#pq').attr('value','');}
jQuery('#pq').blur(function(){if(jQuery('#pq').attr('value')==''){jQuery('#pq').attr('value',initial_pq);}});});});
/* end rwe.input */

/* start rwe.searchPress */
function SearchPresse(languageVar)
{if(languageVar=='de'){window.location.href='/web/cms/de/113452/presse-news/pressearchiv/?suchbegriff='+jQuery('#pq').val();}
else if(languageVar=='en'){window.location.href='/web/cms/en/113452/presse-news/pressearchiv/?suchbegriff='+jQuery('#pq').val();}
return false;}
/* end rwe.searchPress */
/* start rwe.overlayFlash */
jQuery(document).ready(function(){jQuery('#startOverlayFlash').click(function(){jQuery('#flashContainer').removeClass('hidden');});jQuery('#stopOverlayFlash').click(function(){jQuery('#flashContainer').addClass('hidden');});});function startOverlayFlash(){jQuery('#flashmove').data('smallHeight',jQuery('#flashmove').css("height"))
jQuery('#flashmove').animate({height:jQuery('#flashmove').data('bigHeight')},600);}
function closeOverlayFlash(){jQuery('#flashmove').animate({height:jQuery('#flashmove').data('smallHeight')},600);}
/* end rwe.overlayFlash */

/* start rwe.fadeContent */
jQuery(document).ready(function(){jQuery('.fadelink').click(function(){jQuery('div[class*="fadecontainer"]').hide();var cssclass=jQuery(this).attr("class").split(" ")[0];if(jQuery(this).hasClass('active')){jQuery('#'+cssclass).removeClass('fadecontainer')}
jQuery('div[class*="fadecontainer"]').hide();if(jQuery('#'+cssclass).is("div:hidden")){jQuery('#'+cssclass).slideDown(700).intoViewport();}
else{jQuery('#'+cssclass).hide();}});});
/* end rwe.fadeContent */
/* start rwe.flashOpensShadowbox */
function openPopup(link,thisWidth,thisHeight,titleText)
{if((typeof titleText=='undefined')||(titleText==null)||(titleText=='0'))titleText='Statement';Shadowbox.open({content:link,player:"iframe",title:titleText,width:thisWidth,height:thisHeight})}
/* end rwe.flashOpensShadowbox */
/* start rwe.shadowboxOnLoad */
function openShadowBoxOnLoad(title,height,width,content)
{Shadowbox.init({skipSetup:true});Shadowbox.open({content:content,player:"html",title:title,height:height,width:width});return false;}
/* end rwe.shadowboxOnLoad */

/* start rwe.jumpToUrl */
function jumpToUrl(url)
{top.location.href=url;}
/* end rwe.jumpToUrl */
/*
*  Initialisierungen
*/
jQuery.noConflict();


jQuery(window).load(function() {
  var options = {
    handleOversize: 'resize',
    handleUnsupported:  'remove',
    counterType:  'default',
    autoplayMovies:true
  };
  Shadowbox.init(options);
});
jQuery(document).ready(function() {
  jQuery("#flyout").accordion({ header: 'dt', animated: 'easeslide', selectedClass: 'active', active: '.selected', autoHeight: false, clearStyle: true});
});
