var ihr_suchbegriff="Ihr Suchbegriff";
var bitte_geben_sie_einen_suchbegriff_ein="Bitte geben Sie einen Suchbegriff ein";
var Prototype={Version:"1.5.0",BrowserFeatures:{XPath:!!document.evaluate},ScriptFragment:"(?:<script.*?>)((\n|\r|.)*?)(?:</script>)",emptyFunction:function(){
},K:function(x){
return x;
}};
var Class={create:function(){
return function(){
this.initialize.apply(this,arguments);
};
}};
var $A=Array.from=function(_2){
if(!_2){
return [];
}
if(_2.toArray){
return _2.toArray();
}else{
var _3=[];
for(var i=0,_5=_2.length;i<_5;i++){
_3.push(_2[i]);
}
return _3;
}
};
var Abstract=new Object();
Object.extend=function(_6,_7){
for(var _8 in _7){
_6[_8]=_7[_8];
}
return _6;
};
Object.extend(Object,{inspect:function(_9){
try{
if(_9===undefined){
return "undefined";
}
if(_9===null){
return "null";
}
return _9.inspect?_9.inspect():_9.toString();
}
catch(e){
if(e instanceof RangeError){
return "...";
}
throw e;
}
},keys:function(_a){
var _b=[];
for(var _c in _a){
_b.push(_c);
}
return _b;
},values:function(_d){
var _e=[];
for(var _f in _d){
_e.push(_d[_f]);
}
return _e;
},clone:function(_10){
return Object.extend({},_10);
}});
Function.prototype.bind=function(){
var _11=this,_12=$A(arguments),_13=_12.shift();
return function(){
if(typeof $A=="function"){
return _11.apply(_13,_12.concat($A(arguments)));
}
};
};
Function.prototype.bindAsEventListener=function(_14){
var _15=this,_16=$A(arguments),_14=_16.shift();
return function(_17){
if(typeof $A=="function"){
return _15.apply(_14,[(_17||window.event)].concat(_16).concat($A(arguments)));
}
};
};
Object.extend(Number.prototype,{toColorPart:function(){
var _18=this.toString(16);
if(this<16){
return "0"+_18;
}
return _18;
},succ:function(){
return this+1;
},times:function(_19){
$R(0,this,true).each(_19);
return this;
}});
var Try={these:function(){
var _1a;
for(var i=0,_1c=arguments.length;i<_1c;i++){
var _1d=arguments[i];
try{
_1a=_1d();
break;
}
catch(e){
}
}
return _1a;
}};
var PeriodicalExecuter=Class.create();
PeriodicalExecuter.prototype={initialize:function(_1e,_1f){
this.callback=_1e;
this.frequency=_1f;
this.currentlyExecuting=false;
this.registerCallback();
},registerCallback:function(){
this.timer=setInterval(this.onTimerEvent.bind(this),this.frequency*1000);
},stop:function(){
if(!this.timer){
return;
}
clearInterval(this.timer);
this.timer=null;
},onTimerEvent:function(){
if(!this.currentlyExecuting){
try{
this.currentlyExecuting=true;
this.callback(this);
}
finally{
this.currentlyExecuting=false;
}
}
}};
String.interpret=function(_20){
return _20==null?"":String(_20);
};
Object.extend(String.prototype,{gsub:function(_21,_22){
var _23="",_24=this,_25;
_22=arguments.callee.prepareReplacement(_22);
while(_24.length>0){
if(_25=_24.match(_21)){
_23+=_24.slice(0,_25.index);
_23+=String.interpret(_22(_25));
_24=_24.slice(_25.index+_25[0].length);
}else{
_23+=_24,_24="";
}
}
return _23;
},sub:function(_26,_27,_28){
_27=this.gsub.prepareReplacement(_27);
_28=_28===undefined?1:_28;
return this.gsub(_26,function(_29){
if(--_28<0){
return _29[0];
}
return _27(_29);
});
},scan:function(_2a,_2b){
this.gsub(_2a,_2b);
return this;
},truncate:function(_2c,_2d){
_2c=_2c||30;
_2d=_2d===undefined?"...":_2d;
return this.length>_2c?this.slice(0,_2c-_2d.length)+_2d: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 _2e=new RegExp(Prototype.ScriptFragment,"img");
var _2f=new RegExp(Prototype.ScriptFragment,"im");
return (this.match(_2e)||[]).map(function(_30){
return (_30.match(_2f)||["",""])[1];
});
},evalScripts:function(){
return this.extractScripts().map(function(_31){
return eval(_31);
});
},escapeHTML:function(){
var div=document.createElement("div");
var _33=document.createTextNode(this);
div.appendChild(_33);
return div.innerHTML;
},unescapeHTML:function(){
var div=document.createElement("div");
div.innerHTML=this.stripTags();
return div.childNodes[0]?(div.childNodes.length>1?$A(div.childNodes).inject("",function(_35,_36){
return _35+_36.nodeValue;
}):div.childNodes[0].nodeValue):"";
},toQueryParams:function(_37){
var _38=this.strip().match(/([^?#]*)(#.*)?$/);
if(!_38){
return {};
}
return _38[1].split(_37||"&").inject({},function(_39,_3a){
if((_3a=_3a.split("="))[0]){
var _3b=unescape(_3a[0]);
var _3c=_3a[1]?unescape(_3a[1]):undefined;
if(_39[_3b]!==undefined){
if(_39[_3b].constructor!=Array){
_39[_3b]=[_39[_3b]];
}
if(_3c){
_39[_3b].push(_3c);
}
}else{
_39[_3b]=_3c;
}
}
return _39;
});
},toArray:function(){
return this.split("");
},succ:function(){
return this.slice(0,this.length-1)+String.fromCharCode(this.charCodeAt(this.length-1)+1);
},camelize:function(){
var _3d=this.split("-"),len=_3d.length;
if(len==1){
return _3d[0];
}
var _3f=this.charAt(0)=="-"?_3d[0].charAt(0).toUpperCase()+_3d[0].substring(1):_3d[0];
for(var i=1;i<len;i++){
_3f+=_3d[i].charAt(0).toUpperCase()+_3d[i].substring(1);
}
return _3f;
},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(_41){
var _42=this.replace(/\\/g,"\\\\");
if(_41){
return "\""+_42.replace(/"/g,"\\\"")+"\"";
}else{
return "'"+_42.replace(/'/g,"\\'")+"'";
}
}});
String.prototype.gsub.prepareReplacement=function(_43){
if(typeof _43=="function"){
return _43;
}
var _44=new Template(_43);
return function(_45){
return _44.evaluate(_45);
};
};
String.prototype.parseQuery=String.prototype.toQueryParams;
var Template=Class.create();
Template.Pattern=/(^|.|\r|\n)(#\{(.*?)\})/;
Template.prototype={initialize:function(_46,_47){
this.template=_46.toString();
this.pattern=_47||Template.Pattern;
},evaluate:function(_48){
return this.template.gsub(this.pattern,function(_49){
var _4a=_49[1];
if(_4a=="\\"){
return _49[2];
}
return _4a+String.interpret(_48[_49[3]]);
});
}};
var $break=new Object();
var $continue=new Object();
var Enumerable={each:function(_4b){
var _4c=0;
try{
this._each(function(_4d){
try{
_4b(_4d,_4c++);
}
catch(e){
if(e!=$continue){
throw e;
}
}
});
}
catch(e){
if(e!=$break){
throw e;
}
}
return this;
},eachSlice:function(_4e,_4f){
var _50=-_4e,_51=[],_52=this.toArray();
while((_50+=_4e)<_52.length){
_51.push(_52.slice(_50,_50+_4e));
}
return _51.map(_4f);
},all:function(_53){
var _54=true;
this.each(function(_55,_56){
_54=_54&&!!(_53||Prototype.K)(_55,_56);
if(!_54){
throw $break;
}
});
return _54;
},any:function(_57){
var _58=false;
this.each(function(_59,_5a){
if(_58=!!(_57||Prototype.K)(_59,_5a)){
throw $break;
}
});
return _58;
},collect:function(_5b){
var _5c=[];
this.each(function(_5d,_5e){
_5c.push((_5b||Prototype.K)(_5d,_5e));
});
return _5c;
},detect:function(_5f){
var _60;
this.each(function(_61,_62){
if(_5f(_61,_62)){
_60=_61;
throw $break;
}
});
return _60;
},findAll:function(_63){
var _64=[];
this.each(function(_65,_66){
if(_63(_65,_66)){
_64.push(_65);
}
});
return _64;
},grep:function(_67,_68){
var _69=[];
this.each(function(_6a,_6b){
var _6c=_6a.toString();
if(_6c.match(_67)){
_69.push((_68||Prototype.K)(_6a,_6b));
}
});
return _69;
},include:function(_6d){
var _6e=false;
this.each(function(_6f){
if(_6f==_6d){
_6e=true;
throw $break;
}
});
return _6e;
},inGroupsOf:function(_70,_71){
_71=_71===undefined?null:_71;
return this.eachSlice(_70,function(_72){
while(_72.length<_70){
_72.push(_71);
}
return _72;
});
},inject:function(_73,_74){
this.each(function(_75,_76){
_73=_74(_73,_75,_76);
});
return _73;
},invoke:function(_77){
var _78=$A(arguments).slice(1);
return this.map(function(_79){
return _79[_77].apply(_79,_78);
});
},max:function(_7a){
var _7b;
this.each(function(_7c,_7d){
_7c=(_7a||Prototype.K)(_7c,_7d);
if(_7b==undefined||_7c>=_7b){
_7b=_7c;
}
});
return _7b;
},min:function(_7e){
var _7f;
this.each(function(_80,_81){
_80=(_7e||Prototype.K)(_80,_81);
if(_7f==undefined||_80<_7f){
_7f=_80;
}
});
return _7f;
},partition:function(_82){
var _83=[],_84=[];
this.each(function(_85,_86){
((_82||Prototype.K)(_85,_86)?_83:_84).push(_85);
});
return [_83,_84];
},pluck:function(_87){
var _88=[];
this.each(function(_89,_8a){
_88.push(_89[_87]);
});
return _88;
},reject:function(_8b){
var _8c=[];
this.each(function(_8d,_8e){
if(!_8b(_8d,_8e)){
_8c.push(_8d);
}
});
return _8c;
},sortBy:function(_8f){
return this.map(function(_90,_91){
return {value:_90,criteria:_8f(_90,_91)};
}).sort(function(_92,_93){
var a=_92.criteria,b=_93.criteria;
return a<b?-1:a>b?1:0;
}).pluck("value");
},toArray:function(){
return this.map();
},zip:function(){
var _96=Prototype.K,_97=$A(arguments);
if(typeof _97.last()=="function"){
_96=_97.pop();
}
var _98=[this].concat(_97).map($A);
return this.map(function(_99,_9a){
return _96(_98.pluck(_9a));
});
},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,member:Enumerable.include,entries:Enumerable.toArray});
Object.extend(Array.prototype,Enumerable);
if(!Array.prototype._reverse){
Array.prototype._reverse=Array.prototype.reverse;
}
Object.extend(Array.prototype,{_each:function(_9b){
for(var i=0,_9d=this.length;i<_9d;i++){
_9b(this[i]);
}
},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(_9e){
return _9e!=null;
});
},flatten:function(){
return this.inject([],function(_9f,_a0){
return _9f.concat(_a0&&_a0.constructor==Array?_a0.flatten():[_a0]);
});
},without:function(){
var _a1=$A(arguments);
return this.select(function(_a2){
return !_a1.include(_a2);
});
},indexOf:function(_a3){
for(var i=0,_a5=this.length;i<_a5;i++){
if(this[i]==_a3){
return i;
}
}
return -1;
},reverse:function(_a6){
return (_a6!==false?this:this.toArray())._reverse();
},reduce:function(){
return this.length>1?this:this[0];
},uniq:function(){
return this.inject([],function(_a7,_a8){
return _a7.include(_a8)?_a7:_a7.concat([_a8]);
});
},clone:function(){
return [].concat(this);
},size:function(){
return this.length;
},inspect:function(){
return "["+this.map(Object.inspect).join(", ")+"]";
}});
Array.prototype.toArray=Array.prototype.clone;
function $w(_a9){
_a9=_a9.strip();
return _a9?_a9.split(/\s+/):[];
}
if(window.opera){
Array.prototype.concat=function(){
var _aa=[];
for(var i=0,_ac=this.length;i<_ac;i++){
_aa.push(this[i]);
}
for(var i=0,_ac=arguments.length;i<_ac;i++){
if(arguments[i].constructor==Array){
for(var j=0,_ae=arguments[i].length;j<_ae;j++){
_aa.push(arguments[i][j]);
}
}else{
_aa.push(arguments[i]);
}
}
return _aa;
};
}
var Hash=function(obj){
Object.extend(this,obj||{});
};
Object.extend(Hash,{toQueryString:function(obj){
var _b1=[];
this.prototype._each.call(obj,function(_b2){
if(!_b2.key){
return;
}
if(_b2.value&&_b2.value.constructor==Array){
var _b3=_b2.value.compact();
if(_b3.length<2){
_b2.value=_b3.reduce();
}else{
key=escape(_b2.key);
_b3.each(function(_b4){
_b4=_b4!=undefined?escape(_b4):"";
_b1.push(key+"="+escape(_b4));
});
return;
}
}
if(_b2.value==undefined){
_b2[1]="";
}
_b1.push(_b2.map(escape).join("="));
});
return _b1.join("&");
}});
Object.extend(Hash.prototype,Enumerable);
Object.extend(Hash.prototype,{_each:function(_b5){
for(var key in this){
var _b7=this[key];
if(_b7&&_b7==Hash.prototype[key]){
continue;
}
var _b8=[key,_b7];
_b8.key=key;
_b8.value=_b7;
_b5(_b8);
}
},keys:function(){
return this.pluck("key");
},values:function(){
return this.pluck("value");
},merge:function(_b9){
return $H(_b9).inject(this,function(_ba,_bb){
_ba[_bb.key]=_bb.value;
return _ba;
});
},remove:function(){
var _bc;
for(var i=0,_be=arguments.length;i<_be;i++){
var _bf=this[arguments[i]];
if(_bf!==undefined){
if(_bc===undefined){
_bc=_bf;
}else{
if(_bc.constructor!=Array){
_bc=[_bc];
}
_bc.push(_bf);
}
}
delete this[arguments[i]];
}
return _bc;
},toQueryString:function(){
return Hash.toQueryString(this);
},inspect:function(){
return "#<Hash:{"+this.map(function(_c0){
return _c0.map(Object.inspect).join(": ");
}).join(", ")+"}>";
}});
function $H(_c1){
if(_c1&&_c1.constructor==Hash){
return _c1;
}
return new Hash(_c1);
}
ObjectRange=Class.create();
Object.extend(ObjectRange.prototype,Enumerable);
Object.extend(ObjectRange.prototype,{initialize:function(_c2,end,_c4){
this.start=_c2;
this.end=end;
this.exclusive=_c4;
},_each:function(_c5){
var _c6=this.start;
while(this.include(_c6)){
_c5(_c6);
_c6=_c6.succ();
}
},include:function(_c7){
if(_c7<this.start){
return false;
}
if(this.exclusive){
return _c7<this.end;
}
return _c7<=this.end;
}});
var $R=function(_c8,end,_ca){
return new ObjectRange(_c8,end,_ca);
};
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(_cb){
this.responders._each(_cb);
},register:function(_cc){
if(!this.include(_cc)){
this.responders.push(_cc);
}
},unregister:function(_cd){
this.responders=this.responders.without(_cd);
},dispatch:function(_ce,_cf,_d0,_d1){
this.each(function(_d2){
if(typeof _d2[_ce]=="function"){
try{
_d2[_ce].apply(_d2,[_cf,_d0,_d1]);
}
catch(e){
}
}
});
}};
Object.extend(Ajax.Responders,Enumerable);
Ajax.Responders.register({onCreate:function(){
Ajax.activeRequestCount++;
},onComplete:function(){
Ajax.activeRequestCount--;
}});
Ajax.Base=function(){
};
Ajax.Base.prototype={setOptions:function(_d3){
this.options={method:"get",asynchronous:true,contentType:"application/x-www-form-urlencoded",encoding:"ISO-8859-1",parameters:""};
Object.extend(this.options,_d3||{});
this.options.method=this.options.method.toLowerCase();
}};
Ajax.Request=Class.create();
Ajax.Request.Events=["Uninitialized","Loading","Loaded","Interactive","Complete"];
Ajax.Request.prototype=Object.extend(new Ajax.Base(),{_complete:false,initialize:function(url,_d5){
this.transport=Ajax.getTransport();
this.setOptions(_d5);
this.request(url);
},cancel:function(){
this._complete=true;
Ajax.activeRequestCount=0;
},request:function(url){
if(url.substring(0,4)!="http"){
pageurl=document.location.href;
if(url.charAt(0)=="/"){
idx=pageurl.indexOf("/")+1;
if(idx>0){
idx2=pageurl.indexOf("/",idx)+1;
if(idx2>0){
idx=idx2;
}
idx3=pageurl.indexOf("/",idx2);
if(idx3>0){
idx=idx3;
}
}
base_url=pageurl.substring(0,idx);
url=base_url+url;
}else{
idx=pageurl.lastIndexOf("/")+1;
if(idx>0){
base_url=pageurl.substring(0,idx);
url=base_url+url;
}
}
}
this.url=url;
this.method=this.options.method;
var _d7=this.options.parameters;
if(!["get","post"].include(this.method)){
_d7["_method"]=this.method;
this.method="get";
}
if(_d7&&/Konqueror|Safari|KHTML/.test(navigator.userAgent)){
_d7+="&_=";
}
if(this.method=="get"&&_d7){
this.url+=(this.url.indexOf("?")>-1?"&":"?")+_d7;
}
if(_d7!=this.options.paramName+"="+escape(bitte_geben_sie_einen_suchbegriff_ein)&&_d7!=this.options.paramName+"="+escape(ihr_suchbegriff)){
try{
Ajax.Responders.dispatch("onCreate",this,this.transport);
this.transport.open(this.method.toUpperCase(),this.url,this.options.asynchronous);
if(this.options.asynchronous){
setTimeout(function(){
this.respondToReadyState(1);
}.bind(this),10);
}
this.transport.onreadystatechange=this.onStateChange.bind(this);
this.setRequestHeaders();
var _d8=this.method=="post"?(this.options.postBody||_d7):null;
this.transport.send(_d8);
if(!this.options.asynchronous&&this.transport.overrideMimeType){
this.onStateChange();
}
}
catch(e){
this.dispatchException(e);
}
}
},onStateChange:function(){
var _d9=this.transport.readyState;
if(_d9>1&&!((_d9==4)&&this._complete)){
this.respondToReadyState(this.transport.readyState);
}
},setRequestHeaders:function(){
var _da={"X-Requested-With":"XMLHttpRequest","X-Prototype-Version":Prototype.Version,"Accept":"text/javascript, text/html, application/xml, text/xml, */*"};
if(this.method=="post"){
_da["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){
_da["Connection"]="close";
}
}
if(typeof this.options.requestHeaders=="object"){
var _db=this.options.requestHeaders;
if(typeof _db.push=="function"){
for(var i=0,_dd=_db.length;i<_dd;i+=2){
_da[_db[i]]=_db[i+1];
}
}else{
$H(_db).each(function(_de){
_da[_de.key]=_de.value;
});
}
}
for(var _df in _da){
this.transport.setRequestHeader(_df,_da[_df]);
}
},success:function(){
return !this.transport.status||(this.transport.status>=200&&this.transport.status<300);
},respondToReadyState:function(_e0){
var _e1=Ajax.Request.Events[_e0];
var _e2=this.transport,_e3=this.evalJSON();
if(_e1=="Complete"){
try{
this._complete=true;
(this.options["on"+this.transport.status]||this.options["on"+(this.success()?"Success":"Failure")]||Prototype.emptyFunction)(_e2,_e3);
}
catch(e){
this.dispatchException(e);
}
if((this.getHeader("Content-type")||"text/javascript").strip().match(/^(text|application)\/(x-)?(java|ecma)script(;.*)?$/i)){
this.evalResponse();
}
}
try{
(this.options["on"+_e1]||Prototype.emptyFunction)(_e2,_e3);
Ajax.Responders.dispatch("on"+_e1,this,_e2,_e3);
}
catch(e){
this.dispatchException(e);
}
if(_e1=="Complete"){
this.transport.onreadystatechange=Prototype.emptyFunction;
}
},getHeader:function(_e4){
try{
return this.transport.getResponseHeader(_e4);
}
catch(e){
return null;
}
},evalJSON:function(){
try{
var _e5=this.getHeader("X-JSON");
return _e5?eval("("+_e5+")"):null;
}
catch(e){
return null;
}
},evalResponse:function(){
try{
return eval(this.transport.responseText);
}
catch(e){
this.dispatchException(e);
}
},dispatchException:function(_e6){
(this.options.onException||Prototype.emptyFunction)(this,_e6);
Ajax.Responders.dispatch("onException",this,_e6);
}});
Ajax.Updater=Class.create();
Object.extend(Object.extend(Ajax.Updater.prototype,Ajax.Request.prototype),{initialize:function(_e7,url,_e9){
this.container={success:(_e7.success||_e7),failure:(_e7.failure||(_e7.success?null:_e7))};
this.transport=Ajax.getTransport();
this.setOptions(_e9);
var _ea=this.options.onComplete||Prototype.emptyFunction;
this.options.onComplete=(function(_eb,_ec){
this.updateContent();
_ea(_eb,_ec);
}).bind(this);
this.request(url);
},updateContent:function(){
var _ed=this.container[this.success()?"success":"failure"];
var _ee=this.transport.responseText;
if(!this.options.evalScripts){
_ee=_ee.stripScripts();
}
if(_ed=$(_ed)){
if(this.options.insertion){
new this.options.insertion(_ed,_ee);
}else{
_ed.update(_ee);
}
}
if(this.success()){
if(this.onComplete){
setTimeout(this.onComplete.bind(this),10);
}
}
}});
Ajax.PeriodicalUpdater=Class.create();
Ajax.PeriodicalUpdater.prototype=Object.extend(new Ajax.Base(),{initialize:function(_ef,url,_f1){
this.setOptions(_f1);
this.onComplete=this.options.onComplete;
this.frequency=(this.options.frequency||2);
this.decay=(this.options.decay||1);
this.updater={};
this.container=_ef;
this.url=url;
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(_f2){
if(this.options.decay){
this.decay=(_f2.responseText==this.lastText?this.decay*this.options.decay:1);
this.lastText=_f2.responseText;
}
this.timer=setTimeout(this.onTimerEvent.bind(this),this.decay*this.frequency*1000);
},onTimerEvent:function(){
this.updater=new Ajax.Updater(this.container,this.url,this.options);
}});
function $(_f3){
if(arguments.length>1){
for(var i=0,_f5=[],_f6=arguments.length;i<_f6;i++){
_f5.push($(arguments[i]));
}
return _f5;
}
if(typeof _f3=="string"){
_f3=document.getElementById(_f3);
}
return Element.extend(_f3);
}
if(Prototype.BrowserFeatures.XPath){
document._getElementsByXPath=function(_f7,_f8){
var _f9=[];
var _fa=document.evaluate(_f7,$(_f8)||document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);
for(var i=0,_fc=_fa.snapshotLength;i<_fc;i++){
_f9.push(_fa.snapshotItem(i));
}
return _f9;
};
}
document.getElementsByClassName=function(_fd,_fe){
if(Prototype.BrowserFeatures.XPath){
var q=".//*[contains(concat(' ', @class, ' '), ' "+_fd+" ')]";
return document._getElementsByXPath(q,_fe);
}else{
var _100=($(_fe)||document.body).getElementsByTagName("*");
var _101=[],_102;
for(var i=0,_104=_100.length;i<_104;i++){
_102=_100[i];
if(Element.hasClassName(_102,_fd)){
_101.push(Element.extend(_102));
}
}
return _101;
}
};
if(!window.Element){
var Element=new Object();
}
Element.extend=function(_105){
if(!_105||_nativeExtensions||_105.nodeType==3){
return _105;
}
if(!_105._extended&&_105.tagName&&_105!=window){
var _106=Object.clone(Element.Methods),_107=Element.extend.cache;
if(_105.tagName=="FORM"){
Object.extend(_106,Form.Methods);
}
if(["INPUT","TEXTAREA","SELECT"].include(_105.tagName)){
Object.extend(_106,Form.Element.Methods);
}
Object.extend(_106,Element.Methods.Simulated);
for(var _108 in _106){
var _109=_106[_108];
if(typeof _109=="function"&&!(_108 in _105)){
_105[_108]=_107.findOrStore(_109);
}
}
}
_105._extended=true;
return _105;
};
Element.extend.cache={findOrStore:function(_10a){
return this[_10a]=this[_10a]||function(){
return _10a.apply(null,[this].concat($A(arguments)));
};
}};
Element.Methods={visible:function(_10b){
return $(_10b).style.display!="none";
},toggle:function(_10c){
_10c=$(_10c);
Element[Element.visible(_10c)?"hide":"show"](_10c);
return _10c;
},hide:function(_10d){
$(_10d).style.display="none";
return _10d;
},show:function(_10e){
$(_10e).style.display="";
return _10e;
},remove:function(_10f){
_10f=$(_10f);
_10f.parentNode.removeChild(_10f);
return _10f;
},update:function(_110,html){
html=typeof html=="undefined"?"":html.toString();
$(_110).innerHTML=html.stripScripts();
setTimeout(function(){
html.evalScripts();
},10);
return _110;
},replace:function(_112,html){
_112=$(_112);
html=typeof html=="undefined"?"":html.toString();
if(_112.outerHTML){
_112.outerHTML=html.stripScripts();
}else{
var _114=_112.ownerDocument.createRange();
_114.selectNodeContents(_112);
_112.parentNode.replaceChild(_114.createContextualFragment(html.stripScripts()),_112);
}
setTimeout(function(){
html.evalScripts();
},10);
return _112;
},inspect:function(_115){
_115=$(_115);
var _116="<"+_115.tagName.toLowerCase();
$H({"id":"id","className":"class"}).each(function(pair){
var _118=pair.first(),_119=pair.last();
var _11a=(_115[_118]||"").toString();
if(_11a){
_116+=" "+_119+"="+_11a.inspect(true);
}
});
return _116+">";
},recursivelyCollect:function(_11b,_11c){
_11b=$(_11b);
var _11d=[];
while(_11b=_11b[_11c]){
if(_11b.nodeType==1){
_11d.push(Element.extend(_11b));
}
}
return _11d;
},ancestors:function(_11e){
return $(_11e).recursivelyCollect("parentNode");
},descendants:function(_11f){
return $A($(_11f).getElementsByTagName("*"));
},immediateDescendants:function(_120){
if(!(_120=$(_120).firstChild)){
return [];
}
while(_120&&_120.nodeType!=1){
_120=_120.nextSibling;
}
if(_120){
return [_120].concat($(_120).nextSiblings());
}
return [];
},previousSiblings:function(_121){
return $(_121).recursivelyCollect("previousSibling");
},nextSiblings:function(_122){
return $(_122).recursivelyCollect("nextSibling");
},siblings:function(_123){
_123=$(_123);
return _123.previousSiblings().reverse().concat(_123.nextSiblings());
},match:function(_124,_125){
if(typeof _125=="string"){
_125=new Selector(_125);
}
return _125.match($(_124));
},up:function(_126,_127,_128){
return Selector.findElement($(_126).ancestors(),_127,_128);
},down:function(_129,_12a,_12b){
return Selector.findElement($(_129).descendants(),_12a,_12b);
},previous:function(_12c,_12d,_12e){
return Selector.findElement($(_12c).previousSiblings(),_12d,_12e);
},next:function(_12f,_130,_131){
return Selector.findElement($(_12f).nextSiblings(),_130,_131);
},getElementsBySelector:function(){
var args=$A(arguments),_133=$(args.shift());
return Selector.findChildElements(_133,args);
},getElementsByClassName:function(_134,_135){
return document.getElementsByClassName(_135,_134);
},readAttribute:function(_136,name){
_136=$(_136);
if(document.all&&!window.opera){
var t=Element._attributeTranslations;
if(t.values[name]){
return t.values[name](_136,name);
}
if(t.names[name]){
name=t.names[name];
}
var _139=_136.attributes[name];
if(_139){
return _139.nodeValue;
}
}
return _136.getAttribute(name);
},getHeight:function(_13a){
return $(_13a).getDimensions().height;
},getWidth:function(_13b){
return $(_13b).getDimensions().width;
},classNames:function(_13c){
return new Element.ClassNames(_13c);
},hasClassName:function(_13d,_13e){
if(!(_13d=$(_13d))){
return;
}
var _13f=_13d.className;
if(_13f.length==0){
return false;
}
if(_13f==_13e||_13f.match(new RegExp("(^|\\s)"+_13e+"(\\s|$)"))){
return true;
}
return false;
},addClassName:function(_140,_141){
if(!(_140=$(_140))){
return;
}
Element.classNames(_140).add(_141);
return _140;
},removeClassName:function(_142,_143){
if(!(_142=$(_142))){
return;
}
Element.classNames(_142).remove(_143);
return _142;
},toggleClassName:function(_144,_145){
if(!(_144=$(_144))){
return;
}
Element.classNames(_144)[_144.hasClassName(_145)?"remove":"add"](_145);
return _144;
},observe:function(){
Event.observe.apply(Event,arguments);
return $A(arguments).first();
},stopObserving:function(){
Event.stopObserving.apply(Event,arguments);
return $A(arguments).first();
},cleanWhitespace:function(_146){
_146=$(_146);
var node=_146.firstChild;
while(node){
var _148=node.nextSibling;
if(node.nodeType==3&&!/\S/.test(node.nodeValue)){
_146.removeChild(node);
}
node=_148;
}
return _146;
},empty:function(_149){
return $(_149).innerHTML.match(/^\s*$/);
},descendantOf:function(_14a,_14b){
_14a=$(_14a),_14b=$(_14b);
while(_14a=_14a.parentNode){
if(_14a==_14b){
return true;
}
}
return false;
},scrollTo:function(_14c){
_14c=$(_14c);
var pos=Position.cumulativeOffset(_14c);
window.scrollTo(pos[0],pos[1]);
return _14c;
},getStyle:function(_14e,_14f){
_14e=$(_14e);
if(["float","cssFloat"].include(_14f)){
_14f=(typeof _14e.style.styleFloat!="undefined"?"styleFloat":"cssFloat");
}
_14f=_14f.camelize();
var _150=_14e.style[_14f];
if(!_150){
if(document.defaultView&&document.defaultView.getComputedStyle){
var css=document.defaultView.getComputedStyle(_14e,null);
_150=css?css[_14f]:null;
}else{
if(_14e.currentStyle){
_150=_14e.currentStyle[_14f];
}
}
}
if((_150=="auto")&&["width","height"].include(_14f)&&(_14e.getStyle("display")!="none")){
_150=_14e["offset"+_14f.capitalize()]+"px";
}
if(window.opera&&["left","top","right","bottom"].include(_14f)){
if(Element.getStyle(_14e,"position")=="static"){
_150="auto";
}
}
if(_14f=="opacity"){
if(_150){
return parseFloat(_150);
}
if(_150=(_14e.getStyle("filter")||"").match(/alpha\(opacity=(.*)\)/)){
if(_150[1]){
return parseFloat(_150[1])/100;
}
}
return 1;
}
return _150=="auto"?null:_150;
},setStyle:function(_152,_153){
_152=$(_152);
for(var name in _153){
var _155=_153[name];
if(name=="opacity"){
if(_155==1){
_155=(/Gecko/.test(navigator.userAgent)&&!/Konqueror|Safari|KHTML/.test(navigator.userAgent))?0.999999:1;
if(/MSIE/.test(navigator.userAgent)&&!window.opera){
_152.style.filter=_152.getStyle("filter").replace(/alpha\([^\)]*\)/gi,"");
}
}else{
if(_155===""){
if(/MSIE/.test(navigator.userAgent)&&!window.opera){
_152.style.filter=_152.getStyle("filter").replace(/alpha\([^\)]*\)/gi,"");
}
}else{
if(_155<0.00001){
_155=0;
}
if(/MSIE/.test(navigator.userAgent)&&!window.opera){
_152.style.filter=_152.getStyle("filter").replace(/alpha\([^\)]*\)/gi,"")+"alpha(opacity="+_155*100+")";
}
}
}
}else{
if(["float","cssFloat"].include(name)){
name=(typeof _152.style.styleFloat!="undefined")?"styleFloat":"cssFloat";
}
}
_152.style[name.camelize()]=_155;
}
return _152;
},getDimensions:function(_156){
_156=$(_156);
var _157=$(_156).getStyle("display");
if(_157!="none"&&_157!=null){
return {width:_156.offsetWidth,height:_156.offsetHeight};
}
var els=_156.style;
var _159=els.visibility;
var _15a=els.position;
var _15b=els.display;
els.visibility="hidden";
els.position="absolute";
els.display="block";
var _15c=_156.clientWidth;
var _15d=_156.clientHeight;
els.display=_15b;
els.position=_15a;
els.visibility=_159;
return {width:_15c,height:_15d};
},makePositioned:function(_15e){
_15e=$(_15e);
var pos=Element.getStyle(_15e,"position");
if(pos=="static"||!pos){
_15e._madePositioned=true;
_15e.style.position="relative";
if(window.opera){
_15e.style.top=0;
_15e.style.left=0;
}
}
return _15e;
},undoPositioned:function(_160){
_160=$(_160);
if(_160._madePositioned){
_160._madePositioned=undefined;
_160.style.position=_160.style.top=_160.style.left=_160.style.bottom=_160.style.right="";
}
return _160;
},makeClipping:function(_161){
_161=$(_161);
if(_161._overflow){
return _161;
}
_161._overflow=_161.style.overflow||"auto";
if((Element.getStyle(_161,"overflow")||"visible")!="hidden"){
_161.style.overflow="hidden";
}
return _161;
},undoClipping:function(_162){
_162=$(_162);
if(!_162._overflow){
return _162;
}
_162.style.overflow=_162._overflow=="auto"?"":_162._overflow;
_162._overflow=null;
return _162;
}};
Object.extend(Element.Methods,{childOf:Element.Methods.descendantOf});
Element._attributeTranslations={};
Element._attributeTranslations.names={colspan:"colSpan",rowspan:"rowSpan",valign:"vAlign",datetime:"dateTime",accesskey:"accessKey",tabindex:"tabIndex",enctype:"encType",maxlength:"maxLength",readonly:"readOnly",longdesc:"longDesc"};
Element._attributeTranslations.values={_getAttr:function(_163,_164){
return _163.getAttribute(_164,2);
},_flag:function(_165,_166){
return $(_165).hasAttribute(_166)?_166:null;
},style:function(_167){
return _167.style.cssText.toLowerCase();
},title:function(_168){
var node=_168.getAttributeNode("title");
return node.specified?node.nodeValue:null;
}};
Object.extend(Element._attributeTranslations.values,{href:Element._attributeTranslations.values._getAttr,src:Element._attributeTranslations.values._getAttr,disabled:Element._attributeTranslations.values._flag,checked:Element._attributeTranslations.values._flag,readonly:Element._attributeTranslations.values._flag,multiple:Element._attributeTranslations.values._flag});
Element.Methods.Simulated={hasAttribute:function(_16a,_16b){
var t=Element._attributeTranslations;
_16b=t.names[_16b]||_16b;
return $(_16a).getAttributeNode(_16b).specified;
}};
if(document.all&&!window.opera){
Element.Methods.update=function(_16d,html){
_16d=$(_16d);
html=typeof html=="undefined"?"":html.toString();
var _16f=_16d.tagName.toUpperCase();
if(["THEAD","TBODY","TR","TD"].include(_16f)){
var div=document.createElement("div");
switch(_16f){
case "THEAD":
case "TBODY":
div.innerHTML="<table><tbody>"+html.stripScripts()+"</tbody></table>";
depth=2;
break;
case "TR":
div.innerHTML="<table><tbody><tr>"+html.stripScripts()+"</tr></tbody></table>";
depth=3;
break;
case "TD":
div.innerHTML="<table><tbody><tr><td>"+html.stripScripts()+"</td></tr></tbody></table>";
depth=4;
}
$A(_16d.childNodes).each(function(node){
_16d.removeChild(node);
});
depth.times(function(){
div=div.firstChild;
});
$A(div.childNodes).each(function(node){
_16d.appendChild(node);
});
}else{
_16d.innerHTML=html.stripScripts();
}
setTimeout(function(){
html.evalScripts();
},10);
return _16d;
};
}
Object.extend(Element,Element.Methods);
var _nativeExtensions=false;
if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)){
["","Form","Input","TextArea","Select"].each(function(tag){
var _174="HTML"+tag+"Element";
if(window[_174]){
return;
}
var _175=window[_174]={};
_175.prototype=document.createElement(tag?tag.toLowerCase():"div").__proto__;
});
}
Element.addMethods=function(_176){
Object.extend(Element.Methods,_176||{});
function copy(_177,_178,_179){
_179=_179||false;
var _17a=Element.extend.cache;
for(var _17b in _177){
var _17c=_177[_17b];
if(!_179||!(_17b in _178)){
_178[_17b]=_17a.findOrStore(_17c);
}
}
}
if(typeof HTMLElement!="undefined"){
copy(Element.Methods,HTMLElement.prototype);
copy(Element.Methods.Simulated,HTMLElement.prototype,true);
copy(Form.Methods,HTMLFormElement.prototype);
[HTMLInputElement,HTMLTextAreaElement,HTMLSelectElement].each(function(_17d){
copy(Form.Element.Methods,_17d.prototype);
});
_nativeExtensions=true;
}
};
var Toggle=new Object();
Toggle.display=Element.toggle;
Abstract.Insertion=function(_17e){
this.adjacency=_17e;
};
Abstract.Insertion.prototype={initialize:function(_17f,_180){
this.element=$(_17f);
this.content=_180.stripScripts();
if(this.adjacency&&this.element.insertAdjacentHTML){
try{
this.element.insertAdjacentHTML(this.adjacency,this.content);
}
catch(e){
var _181=this.element.tagName.toUpperCase();
if(["TBODY","TR"].include(_181)){
this.insertContent(this.contentFromAnonymousTable());
}else{
throw e;
}
}
}else{
this.range=this.element.ownerDocument.createRange();
if(this.initializeRange){
this.initializeRange();
}
this.insertContent([this.range.createContextualFragment(this.content)]);
}
setTimeout(function(){
_180.evalScripts();
},10);
},contentFromAnonymousTable:function(){
var div=document.createElement("div");
div.innerHTML="<table><tbody>"+this.content+"</tbody></table>";
return $A(div.childNodes[0].childNodes[0].childNodes);
}};
var Insertion=new Object();
Insertion.Before=Class.create();
Insertion.Before.prototype=Object.extend(new Abstract.Insertion("beforeBegin"),{initializeRange:function(){
this.range.setStartBefore(this.element);
},insertContent:function(_183){
_183.each((function(_184){
this.element.parentNode.insertBefore(_184,this.element);
}).bind(this));
}});
Insertion.Top=Class.create();
Insertion.Top.prototype=Object.extend(new Abstract.Insertion("afterBegin"),{initializeRange:function(){
this.range.selectNodeContents(this.element);
this.range.collapse(true);
},insertContent:function(_185){
_185.reverse(false).each((function(_186){
this.element.insertBefore(_186,this.element.firstChild);
}).bind(this));
}});
Insertion.Bottom=Class.create();
Insertion.Bottom.prototype=Object.extend(new Abstract.Insertion("beforeEnd"),{initializeRange:function(){
this.range.selectNodeContents(this.element);
this.range.collapse(this.element);
},insertContent:function(_187){
_187.each((function(_188){
this.element.appendChild(_188);
}).bind(this));
}});
Insertion.After=Class.create();
Insertion.After.prototype=Object.extend(new Abstract.Insertion("afterEnd"),{initializeRange:function(){
this.range.setStartAfter(this.element);
},insertContent:function(_189){
_189.each((function(_18a){
this.element.parentNode.insertBefore(_18a,this.element.nextSibling);
}).bind(this));
}});
Element.ClassNames=Class.create();
Element.ClassNames.prototype={initialize:function(_18b){
this.element=$(_18b);
},_each:function(_18c){
this.element.className.split(/\s+/).select(function(name){
return name.length>0;
})._each(_18c);
},set:function(_18e){
this.element.className=_18e;
},add:function(_18f){
if(this.include(_18f)){
return;
}
this.set($A(this).concat(_18f).join(" "));
},remove:function(_190){
if(!this.include(_190)){
return;
}
this.set($A(this).without(_190).join(" "));
},toString:function(){
return $A(this).join(" ");
}};
Object.extend(Element.ClassNames.prototype,Enumerable);
var Selector=Class.create();
Selector.prototype={initialize:function(_191){
this.params={classNames:[]};
this.expression=_191.toString().strip();
this.parseExpression();
this.compileMatcher();
},parseExpression:function(){
function abort(_192){
throw "Parse error in selector: "+_192;
}
if(this.expression==""){
abort("empty expression");
}
var _193=this.params,expr=this.expression,_195,_196,_197,rest;
while(_195=expr.match(/^(.*)\[([a-z0-9_:-]+?)(?:([~\|!]?=)(?:"([^"]*)"|([^\]\s]*)))?\]$/i)){
_193.attributes=_193.attributes||[];
_193.attributes.push({name:_195[2],operator:_195[3],value:_195[4]||_195[5]||""});
expr=_195[1];
}
if(expr=="*"){
return this.params.wildcard=true;
}
while(_195=expr.match(/^([^a-z0-9_-])?([a-z0-9_-]+)(.*)/i)){
_196=_195[1],_197=_195[2],rest=_195[3];
switch(_196){
case "#":
_193.id=_197;
break;
case ".":
_193.classNames.push(_197);
break;
case "":
case undefined:
_193.tagName=_197.toUpperCase();
break;
default:
abort(expr.inspect());
}
expr=rest;
}
if(expr.length>0){
abort(expr.inspect());
}
},buildMatchExpression:function(){
var _199=this.params,_19a=[],_19b;
if(_199.wildcard){
_19a.push("true");
}
if(_19b=_199.id){
_19a.push("element.readAttribute(\"id\") == "+_19b.inspect());
}
if(_19b=_199.tagName){
_19a.push("element.tagName.toUpperCase() == "+_19b.inspect());
}
if((_19b=_199.classNames).length>0){
for(var i=0,_19d=_19b.length;i<_19d;i++){
_19a.push("element.hasClassName("+_19b[i].inspect()+")");
}
}
if(_19b=_199.attributes){
_19b.each(function(_19e){
var _19f="element.readAttribute("+_19e.name.inspect()+")";
var _1a0=function(_1a1){
return _19f+" && "+_19f+".split("+_1a1.inspect()+")";
};
switch(_19e.operator){
case "=":
_19a.push(_19f+" == "+_19e.value.inspect());
break;
case "~=":
_19a.push(_1a0(" ")+".include("+_19e.value.inspect()+")");
break;
case "|=":
_19a.push(_1a0("-")+".first().toUpperCase() == "+_19e.value.toUpperCase().inspect());
break;
case "!=":
_19a.push(_19f+" != "+_19e.value.inspect());
break;
case "":
case undefined:
_19a.push("element.hasAttribute("+_19e.name.inspect()+")");
break;
default:
throw "Unknown operator "+_19e.operator+" in selector";
}
});
}
return _19a.join(" && ");
},compileMatcher:function(){
this.match=new Function("element","if (!element.tagName) return false;       element = $(element);       return "+this.buildMatchExpression());
},findElements:function(_1a2){
var _1a3;
if(_1a3=$(this.params.id)){
if(this.match(_1a3)){
if(!_1a2||Element.childOf(_1a3,_1a2)){
return [_1a3];
}
}
}
_1a2=(_1a2||document).getElementsByTagName(this.params.tagName||"*");
var _1a4=[];
for(var i=0,_1a6=_1a2.length;i<_1a6;i++){
if(this.match(_1a3=_1a2[i])){
_1a4.push(Element.extend(_1a3));
}
}
return _1a4;
},toString:function(){
return this.expression;
}};
Object.extend(Selector,{matchElements:function(_1a7,_1a8){
var _1a9=new Selector(_1a8);
return _1a7.select(_1a9.match.bind(_1a9)).map(Element.extend);
},findElement:function(_1aa,_1ab,_1ac){
if(typeof _1ab=="number"){
_1ac=_1ab,_1ab=false;
}
return Selector.matchElements(_1aa,_1ab||"*")[_1ac||0];
},findChildElements:function(_1ad,_1ae){
return _1ae.map(function(_1af){
return _1af.match(/[^\s"]+(?:"[^"]*"[^\s"]+)*/g).inject([null],function(_1b0,expr){
var _1b2=new Selector(expr);
return _1b0.inject([],function(_1b3,_1b4){
return _1b3.concat(_1b2.findElements(_1b4||_1ad));
});
});
}).flatten();
}});
function $$(){
return Selector.findChildElements(document,$A(arguments));
}
var Form={reset:function(form){
$(form).reset();
return form;
},serializeElements:function(_1b6,_1b7){
var data=_1b6.inject({},function(_1b9,_1ba){
if(!_1ba.disabled&&_1ba.name){
var key=_1ba.name,_1bc=$(_1ba).getValue();
if(_1bc!=undefined){
if(_1b9[key]){
if(_1b9[key].constructor!=Array){
_1b9[key]=[_1b9[key]];
}
_1b9[key].push(_1bc);
}else{
_1b9[key]=_1bc;
}
}
}
return _1b9;
});
return _1b7?data:Hash.toQueryString(data);
}};
Form.Methods={serialize:function(form,_1be){
return Form.serializeElements(Form.getElements(form),_1be);
},getElements:function(form){
return $A($(form).getElementsByTagName("*")).inject([],function(_1c0,_1c1){
if(Form.Element.Serializers[_1c1.tagName.toLowerCase()]){
_1c0.push(Element.extend(_1c1));
}
return _1c0;
});
},getInputs:function(form,_1c3,name){
form=$(form);
var _1c5=form.getElementsByTagName("input");
if(!_1c3&&!name){
return $A(_1c5).map(Element.extend);
}
for(var i=0,_1c7=[],_1c8=_1c5.length;i<_1c8;i++){
var _1c9=_1c5[i];
if((_1c3&&_1c9.type!=_1c3)||(name&&_1c9.name!=name)){
continue;
}
_1c7.push(Element.extend(_1c9));
}
return _1c7;
},disable:function(form){
form=$(form);
form.getElements().each(function(_1cb){
_1cb.blur();
_1cb.disabled="true";
});
return form;
},enable:function(form){
form=$(form);
form.getElements().each(function(_1cd){
_1cd.disabled="";
});
return form;
},findFirstElement:function(form){
return $(form).getElements().find(function(_1cf){
return _1cf.type!="hidden"&&!_1cf.disabled&&["input","select","textarea"].include(_1cf.tagName.toLowerCase());
});
},focusFirstElement:function(form){
form=$(form);
form.findFirstElement().activate();
return form;
}};
Object.extend(Form,Form.Methods);
Form.Element={focus:function(_1d1){
$(_1d1).focus();
return _1d1;
},select:function(_1d2){
$(_1d2).select();
return _1d2;
}};
Form.Element.Methods={serialize:function(_1d3){
_1d3=$(_1d3);
if(!_1d3.disabled&&_1d3.name){
var _1d4=_1d3.getValue();
if(_1d4!=undefined){
var pair={};
pair[_1d3.name]=_1d4;
return Hash.toQueryString(pair);
}
}
return "";
},getValue:function(_1d6){
_1d6=$(_1d6);
var _1d7=_1d6.tagName.toLowerCase();
return Form.Element.Serializers[_1d7](_1d6);
},clear:function(_1d8){
$(_1d8).value="";
return _1d8;
},present:function(_1d9){
return $(_1d9).value!="";
},activate:function(_1da){
_1da=$(_1da);
_1da.focus();
if(_1da.select&&(_1da.tagName.toLowerCase()!="input"||!["button","reset","submit"].include(_1da.type))){
_1da.select();
}
return _1da;
},disable:function(_1db){
_1db=$(_1db);
_1db.disabled=true;
return _1db;
},enable:function(_1dc){
_1dc=$(_1dc);
_1dc.blur();
_1dc.disabled=false;
return _1dc;
}};
Object.extend(Form.Element,Form.Element.Methods);
var Field=Form.Element;
var $F=Form.Element.getValue;
Form.Element.Serializers={input:function(_1dd){
switch(_1dd.type.toLowerCase()){
case "checkbox":
case "radio":
return Form.Element.Serializers.inputSelector(_1dd);
default:
return Form.Element.Serializers.textarea(_1dd);
}
},inputSelector:function(_1de){
return _1de.checked?_1de.value:null;
},textarea:function(_1df){
return _1df.value;
},select:function(_1e0){
return this[_1e0.type=="select-one"?"selectOne":"selectMany"](_1e0);
},selectOne:function(_1e1){
var _1e2=_1e1.selectedIndex;
return _1e2>=0?this.optionValue(_1e1.options[_1e2]):null;
},selectMany:function(_1e3){
var _1e4,_1e5=_1e3.length;
if(!_1e5){
return null;
}
for(var i=0,_1e4=[];i<_1e5;i++){
var opt=_1e3.options[i];
if(opt.selected){
_1e4.push(this.optionValue(opt));
}
}
return _1e4;
},optionValue:function(opt){
return Element.extend(opt).hasAttribute("value")?opt.value:opt.text;
}};
Abstract.TimedObserver=function(){
};
Abstract.TimedObserver.prototype={initialize:function(_1e9,_1ea,_1eb){
this.frequency=_1ea;
this.element=$(_1e9);
this.callback=_1eb;
this.lastValue=this.getValue();
this.registerCallback();
},registerCallback:function(){
setInterval(this.onTimerEvent.bind(this),this.frequency*1000);
},onTimerEvent:function(){
var _1ec=this.getValue();
var _1ed=("string"==typeof this.lastValue&&"string"==typeof _1ec?this.lastValue!=_1ec:String(this.lastValue)!=String(_1ec));
if(_1ed){
this.callback(this.element,_1ec);
this.lastValue=_1ec;
}
}};
Form.Element.Observer=Class.create();
Form.Element.Observer.prototype=Object.extend(new Abstract.TimedObserver(),{getValue:function(){
return Form.Element.getValue(this.element);
}});
Form.Observer=Class.create();
Form.Observer.prototype=Object.extend(new Abstract.TimedObserver(),{getValue:function(){
return Form.serialize(this.element);
}});
Abstract.EventObserver=function(){
};
Abstract.EventObserver.prototype={initialize:function(_1ee,_1ef){
this.element=$(_1ee);
this.callback=_1ef;
this.lastValue=this.getValue();
if(this.element.tagName.toLowerCase()=="form"){
this.registerFormCallbacks();
}else{
this.registerCallback(this.element);
}
},onElementEvent:function(){
var _1f0=this.getValue();
if(this.lastValue!=_1f0){
this.callback(this.element,_1f0);
this.lastValue=_1f0;
}
},registerFormCallbacks:function(){
Form.getElements(this.element).each(this.registerCallback.bind(this));
},registerCallback:function(_1f1){
if(_1f1.type){
switch(_1f1.type.toLowerCase()){
case "checkbox":
case "radio":
Event.observe(_1f1,"click",this.onElementEvent.bind(this));
break;
default:
Event.observe(_1f1,"change",this.onElementEvent.bind(this));
break;
}
}
}};
Form.Element.EventObserver=Class.create();
Form.Element.EventObserver.prototype=Object.extend(new Abstract.EventObserver(),{getValue:function(){
return Form.Element.getValue(this.element);
}});
Form.EventObserver=Class.create();
Form.EventObserver.prototype=Object.extend(new Abstract.EventObserver(),{getValue:function(){
return Form.serialize(this.element);
}});
if(!window.Event){
var Event=new Object();
}
Object.extend(Event,{KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,KEY_HOME:36,KEY_END:35,KEY_PAGEUP:33,KEY_PAGEDOWN:34,element:function(_1f2){
return _1f2.target||_1f2.srcElement;
},isLeftClick:function(_1f3){
return (((_1f3.which)&&(_1f3.which==1))||((_1f3.button)&&(_1f3.button==1)));
},pointerX:function(_1f4){
return _1f4.pageX||(_1f4.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft));
},pointerY:function(_1f5){
return _1f5.pageY||(_1f5.clientY+(document.documentElement.scrollTop||document.body.scrollTop));
},stop:function(_1f6){
if(_1f6.preventDefault){
_1f6.preventDefault();
_1f6.stopPropagation();
}else{
_1f6.returnValue=false;
_1f6.cancelBubble=true;
}
},findElement:function(_1f7,_1f8){
var _1f9=Event.element(_1f7);
while(_1f9.parentNode&&(!_1f9.tagName||(_1f9.tagName.toUpperCase()!=_1f8.toUpperCase()))){
_1f9=_1f9.parentNode;
}
return _1f9;
},observers:false,_observeAndCache:function(_1fa,name,_1fc,_1fd){
if(!this.observers){
this.observers=[];
}
if(_1fa.addEventListener){
this.observers.push([_1fa,name,_1fc,_1fd]);
_1fa.addEventListener(name,_1fc,_1fd);
}else{
if(_1fa.attachEvent){
this.observers.push([_1fa,name,_1fc,_1fd]);
_1fa.attachEvent("on"+name,_1fc);
}
}
},unloadCache:function(){
if(!Event.observers){
return;
}
for(var i=0,_1ff=Event.observers.length;i<_1ff;i++){
Event.stopObserving.apply(this,Event.observers[i]);
Event.observers[i][0]=null;
}
Event.observers=false;
},observe:function(_200,name,_202,_203){
_200=$(_200);
_203=_203||false;
if(name=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||_200.attachEvent)){
name="keydown";
}
Event._observeAndCache(_200,name,_202,_203);
},stopObserving:function(_204,name,_206,_207){
_204=$(_204);
_207=_207||false;
if(name=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||_204.detachEvent)){
name="keydown";
}
if(_204.removeEventListener){
_204.removeEventListener(name,_206,_207);
}else{
if(_204.detachEvent){
try{
_204.detachEvent("on"+name,_206);
}
catch(e){
}
}
}
}});
if(navigator.appVersion.match(/\bMSIE\b/)){
Event.observe(window,"unload",Event.unloadCache,false);
}
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;
},realOffset:function(_208){
var _209=0,_20a=0;
do{
_209+=_208.scrollTop||0;
_20a+=_208.scrollLeft||0;
_208=_208.parentNode;
}while(_208);
return [_20a,_209];
},cumulativeOffset:function(_20b){
var _20c=0,_20d=0;
do{
_20c+=_20b.offsetTop||0;
_20d+=_20b.offsetLeft||0;
_20b=_20b.offsetParent;
}while(_20b);
return [_20d,_20c];
},positionedOffset:function(_20e){
var _20f=0,_210=0;
do{
_20f+=_20e.offsetTop||0;
_210+=_20e.offsetLeft||0;
_20e=_20e.offsetParent;
if(_20e){
if(_20e.tagName=="BODY"){
break;
}
var p=Element.getStyle(_20e,"position");
if(p=="relative"||p=="absolute"){
break;
}
}
}while(_20e);
return [_210,_20f];
},offsetParent:function(_212){
if(_212.offsetParent){
return _212.offsetParent;
}
if(_212==document.body){
return _212;
}
while((_212=_212.parentNode)&&_212!=document.body){
if(Element.getStyle(_212,"position")!="static"){
return _212;
}
}
return document.body;
},within:function(_213,x,y){
if(this.includeScrollOffsets){
return this.withinIncludingScrolloffsets(_213,x,y);
}
this.xcomp=x;
this.ycomp=y;
this.offset=this.cumulativeOffset(_213);
return (y>=this.offset[1]&&y<this.offset[1]+_213.offsetHeight&&x>=this.offset[0]&&x<this.offset[0]+_213.offsetWidth);
},withinIncludingScrolloffsets:function(_216,x,y){
var _219=this.realOffset(_216);
this.xcomp=x+_219[0]-this.deltaX;
this.ycomp=y+_219[1]-this.deltaY;
this.offset=this.cumulativeOffset(_216);
return (this.ycomp>=this.offset[1]&&this.ycomp<this.offset[1]+_216.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+_216.offsetWidth);
},overlap:function(mode,_21b){
if(!mode){
return 0;
}
if(mode=="vertical"){
return ((this.offset[1]+_21b.offsetHeight)-this.ycomp)/_21b.offsetHeight;
}
if(mode=="horizontal"){
return ((this.offset[0]+_21b.offsetWidth)-this.xcomp)/_21b.offsetWidth;
}
},page:function(_21c){
var _21d=0,_21e=0;
var _21f=_21c;
do{
_21d+=_21f.offsetTop||0;
_21e+=_21f.offsetLeft||0;
if(_21f.offsetParent==document.body){
if(Element.getStyle(_21f,"position")=="absolute"){
break;
}
}
}while(_21f=_21f.offsetParent);
_21f=_21c;
do{
if(!window.opera||_21f.tagName=="BODY"){
_21d-=_21f.scrollTop||0;
_21e-=_21f.scrollLeft||0;
}
}while(_21f=_21f.parentNode);
return [_21e,_21d];
},clone:function(_220,_221){
var _222=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},arguments[2]||{});
_220=$(_220);
var p=Position.page(_220);
_221=$(_221);
var _224=[0,0];
var _225=null;
if(Element.getStyle(_221,"position")=="absolute"){
_225=Position.offsetParent(_221);
_224=Position.page(_225);
}
if(_225==document.body){
_224[0]-=document.body.offsetLeft;
_224[1]-=document.body.offsetTop;
}
if(_222.setLeft){
_221.style.left=(p[0]-_224[0]+_222.offsetLeft)+"px";
}
if(_222.setTop){
_221.style.top=(p[1]-_224[1]+_222.offsetTop)+"px";
}
if(_222.setWidth){
_221.style.width=_220.offsetWidth+"px";
}
if(_222.setHeight){
_221.style.height=_220.offsetHeight+"px";
}
},absolutize:function(_226){
_226=$(_226);
if(_226.style.position=="absolute"){
return;
}
Position.prepare();
var _227=Position.positionedOffset(_226);
var top=_227[1];
var left=_227[0];
var _22a=_226.clientWidth;
var _22b=_226.clientHeight;
_226._originalLeft=left-parseFloat(_226.style.left||0);
_226._originalTop=top-parseFloat(_226.style.top||0);
_226._originalWidth=_226.style.width;
_226._originalHeight=_226.style.height;
_226.style.position="absolute";
_226.style.top=top+"px";
_226.style.left=left+"px";
_226.style.width=_22a+"px";
_226.style.height=_22b+"px";
},relativize:function(_22c){
_22c=$(_22c);
if(_22c.style.position=="relative"){
return;
}
Position.prepare();
_22c.style.position="relative";
var top=parseFloat(_22c.style.top||0)-(_22c._originalTop||0);
var left=parseFloat(_22c.style.left||0)-(_22c._originalLeft||0);
_22c.style.top=top+"px";
_22c.style.left=left+"px";
_22c.style.height=_22c._originalHeight;
_22c.style.width=_22c._originalWidth;
}};
if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)){
Position.cumulativeOffset=function(_22f){
var _230=0,_231=0;
do{
_230+=_22f.offsetTop||0;
_231+=_22f.offsetLeft||0;
if(_22f.offsetParent==document.body){
if(Element.getStyle(_22f,"position")=="absolute"){
break;
}
}
_22f=_22f.offsetParent;
}while(_22f);
return [_231,_230];
};
}
Element.addMethods();
var Autocompleter={};
Autocompleter.Base=function(){
};
Autocompleter.Base.prototype={baseInitialize:function(_232,_233,_234){
this.element=$(_232);
this.update=$(_233);
this.hasFocus=false;
this.changed=false;
this.active=false;
this.index=0;
this.entryCount=0;
if(this.setOptions){
this.setOptions(_234);
}else{
this.options=_234||{};
}
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(_235,_236){
if(!_236.style.position||_236.style.position=="absolute"){
_236.style.position="absolute";
Position.clone(_235,_236,{setHeight:false,offsetTop:_235.offsetHeight});
}
Effect.Appear(_236,{duration:0.015});
};
this.options.onHide=this.options.onHide||function(_237,_238){
new Effect.Fade(_238,{duration:0.015});
};
if(typeof (this.options.tokens)=="string"){
this.options.tokens=new Array(this.options.tokens);
}
this.observer=null;
Element.hide(this.update);
Event.observe(this.element,"blur",this.onBlur.bindAsEventListener(this));
Event.observe(this.element,"keypress",this.onKeyPress.bindAsEventListener(this));
},show:function(){
if(Element.getStyle(this.update,"display")=="none"){
this.options.onShow(this.element,this.update);
}
if(!this.iefix&&(navigator.appVersion.indexOf("MSIE")>0)&&(navigator.userAgent.indexOf("Opera")<0)&&(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(_239){
if(this.active){
switch(_239.keyCode){
case Event.KEY_TAB:
if(this.index==-1){
this.hide();
this.active=false;
Event.stop(_239);
}
this.selectEntry();
Event.stop(_239);
this.hide();
return;
case Event.KEY_RETURN:
if(this.index==-1){
this.hide();
return;
}
this.selectEntry();
Event.stop(_239);
this.handleAutoSubmit();
case Event.KEY_ESC:
this.hide();
this.active=false;
Event.stop(_239);
return;
case Event.KEY_LEFT:
case Event.KEY_RIGHT:
return;
case Event.KEY_UP:
this.markPrevious();
this.render();
if(navigator.appVersion.indexOf("AppleWebKit")>0){
Event.stop(_239);
}
return;
case Event.KEY_DOWN:
this.markNext();
this.render();
if(navigator.appVersion.indexOf("AppleWebKit")>0){
Event.stop(_239);
}
return;
case Event.KEY_PAGEUP:
this.index=0;
this.render();
if(navigator.appVersion.indexOf("AppleWebKit")>0){
Event.stop(_239);
}
return;
case Event.KEY_PAGEDOWN:
this.index=this.entryCount-1;
this.render();
if(navigator.appVersion.indexOf("AppleWebKit")>0){
Event.stop(_239);
}
return;
case Event.KEY_HOME:
this.index=0;
this.render();
if(navigator.appVersion.indexOf("AppleWebKit")>0){
Event.stop(_239);
}
return;
case Event.KEY_END:
this.index=this.entryCount-1;
this.render();
if(navigator.appVersion.indexOf("AppleWebKit")>0){
Event.stop(_239);
}
return;
}
}else{
if(_239.keyCode==Event.KEY_TAB||_239.keyCode==Event.KEY_RETURN||(navigator.appVersion.indexOf("AppleWebKit")>0&&_239.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(_23a){
var _23b=Event.findElement(_23a,"LI");
if(this.index!=_23b.autocompleteIndex){
this.index=_23b.autocompleteIndex;
this.render();
}
Event.stop(_23a);
},onClick:function(_23c){
var _23d=Event.findElement(_23c,"LI");
this.index=_23d.autocompleteIndex;
this.selectEntry();
this.hide();
Event.stop(_23c);
this.handleAutoSubmit();
},handleAutoSubmit:function(){
if(this.options.autosubmitname){
$(this.options.autosubmitname).submit();
}
},onBlur:function(_23e){
setTimeout(this.hide.bind(this),250);
this.hasFocus=false;
this.active=false;
},render:function(){
if(this.entryCount>0){
for(var i=0;i<this.entryCount;i++){
this.index==i?Element.addClassName(this.getEntry(i),"selected"):Element.removeClassName(this.getEntry(i),"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=-1;
}
},markNext:function(){
if(this.index<this.entryCount-1){
this.index++;
}else{
this.entryCount-1;
}
},getEntry:function(_240){
return this.update.firstChild.childNodes[_240];
},getCurrentEntry:function(){
return this.getEntry(this.index);
},selectEntry:function(){
this.active=false;
this.updateElement(this.getCurrentEntry());
},updateElement:function(_241){
if(this.options.updateElement){
this.options.updateElement(_241);
return;
}
var _242="";
if(this.options.select){
var _243=document.getElementsByClassName(this.options.select,_241)||[];
if(_243.length>0){
_242=Element.collectTextNodes(_243[0],this.options.select);
}
}else{
_242=Element.collectTextNodesIgnoreClass(_241,"informal");
}
var _244=this.findLastToken();
if(_244!=-1){
var _245=this.element.value.substr(0,_244+1);
var _246=this.element.value.substr(_244+1).match(/^\s+/);
if(_246){
_245+=_246[0];
}
this.element.value=_245+_242;
}else{
this.element.value=_242;
}
this.element.focus();
if(this.options.afterUpdateElement){
this.options.afterUpdateElement(this.element,_241);
}
},updateChoices:function(_247){
if(!this.changed&&this.hasFocus){
this.update.innerHTML=_247;
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 i=0;i<this.entryCount;i++){
var _249=this.getEntry(i);
_249.autocompleteIndex=i;
this.addObservers(_249);
}
}else{
this.entryCount=0;
}
this.stopIndicator();
this.index=-1;
if(this.entryCount==1&&this.options.autoSelect){
this.selectEntry();
this.hide();
}else{
this.render();
}
}
},addObservers:function(_24a){
Event.observe(_24a,"mouseover",this.onHover.bindAsEventListener(this));
Event.observe(_24a,"click",this.onClick.bindAsEventListener(this));
},onObserverEvent:function(){
this.changed=false;
if(this.getToken().length>=this.options.minChars){
this.startIndicator();
this.getUpdatedChoices();
}else{
this.active=false;
this.hide();
}
},getToken:function(){
var _24b=this.findLastToken();
if(_24b!=-1){
var ret=this.element.value.substr(_24b+1).replace(/^\s+/,"").replace(/\s+$/,"");
}else{
var ret=this.element.value;
}
return /\n/.test(ret)?"":ret;
},findLastToken:function(){
var _24d=-1;
for(var i=1;i<this.options.tokens.length;i++){
var _24f=this.element.value.lastIndexOf(this.options.tokens[i]);
if(_24f>_24d){
_24d=_24f;
}
}
return _24d;
}};
Ajax.Autocompleter=Class.create();
Object.extend(Object.extend(Ajax.Autocompleter.prototype,Autocompleter.Base.prototype),{initialize:function(_250,_251,url,_253){
this.baseInitialize(_250,_251,_253);
this.options.asynchronous=true;
this.options.onComplete=this.onComplete.bind(this);
this.options.defaultParams=this.options.parameters||null;
this.url=url;
},getUpdatedChoices:function(){
entry=escape(this.options.paramName)+"="+escape(this.getToken());
this.options.parameters=this.options.callback?this.options.callback(this.element,entry):entry;
if(this.options.defaultParams){
this.options.parameters+="&"+this.options.defaultParams;
}
new Ajax.Request(this.url,this.options);
},onComplete:function(_254){
this.updateChoices(_254.responseText);
}});
Autocompleter.Local=Class.create();
Autocompleter.Local.prototype=Object.extend(new Autocompleter.Base(),{initialize:function(_255,_256,_257,_258){
this.baseInitialize(_255,_256,_258);
this.options.array=_257;
},getUpdatedChoices:function(){
this.updateChoices(this.options.selector(this));
},setOptions:function(_259){
this.options=Object.extend({choices:10,partialSearch:true,partialChars:2,ignoreCase:true,fullSearch:false,selector:function(_25a){
var ret=[];
var _25c=[];
var _25d=_25a.getToken();
var _25e=0;
for(var i=0;i<_25a.options.array.length&&ret.length<_25a.options.choices;i++){
var elem=_25a.options.array[i];
var _261=_25a.options.ignoreCase?elem.toLowerCase().indexOf(_25d.toLowerCase()):elem.indexOf(_25d);
while(_261!=-1){
if(_261==0&&elem.length!=_25d.length){
ret.push("<li><strong>"+elem.substr(0,_25d.length)+"</strong>"+elem.substr(_25d.length)+"</li>");
break;
}else{
if(_25d.length>=_25a.options.partialChars&&_25a.options.partialSearch&&_261!=-1){
if(_25a.options.fullSearch||/\s/.test(elem.substr(_261-1,1))){
_25c.push("<li>"+elem.substr(0,_261)+"<strong>"+elem.substr(_261,_25d.length)+"</strong>"+elem.substr(_261+_25d.length)+"</li>");
break;
}
}
}
_261=_25a.options.ignoreCase?elem.toLowerCase().indexOf(_25d.toLowerCase(),_261+1):elem.indexOf(_25d,_261+1);
}
}
if(_25c.length){
ret=ret.concat(_25c.slice(0,_25a.options.choices-ret.length));
}
return "<ul>"+ret.join("")+"</ul>";
}},_259||{});
}});
String.prototype.parseColor=function(){
var _262="#";
if(this.slice(0,4)=="rgb("){
var cols=this.slice(4,this.length-1).split(",");
var i=0;
do{
_262+=parseInt(cols[i]).toColorPart();
}while(++i<3);
}else{
if(this.slice(0,1)=="#"){
if(this.length==4){
for(var i=1;i<4;i++){
_262+=(this.charAt(i)+this.charAt(i)).toLowerCase();
}
}
if(this.length==7){
_262=this.toLowerCase();
}
}
}
return (_262.length==7?_262:(arguments[0]||this));
};
Element.collectTextNodes=function(_265){
return $A($(_265).childNodes).collect(function(node){
return (node.nodeType==3?node.nodeValue:(node.hasChildNodes()?Element.collectTextNodes(node):""));
}).flatten().join("");
};
Element.collectTextNodesIgnoreClass=function(_267,_268){
return $A($(_267).childNodes).collect(function(node){
return (node.nodeType==3?node.nodeValue:((node.hasChildNodes()&&!Element.hasClassName(node,_268))?Element.collectTextNodesIgnoreClass(node,_268):""));
}).flatten().join("");
};
Element.setContentZoom=function(_26a,_26b){
_26a=$(_26a);
_26a.setStyle({fontSize:(_26b/100)+"em"});
if(navigator.appVersion.indexOf("AppleWebKit")>0){
window.scrollBy(0,0);
}
return _26a;
};
Element.getOpacity=function(_26c){
return $(_26c).getStyle("opacity");
};
Element.setOpacity=function(_26d,_26e){
return $(_26d).setStyle({opacity:_26e});
};
Element.getInlineOpacity=function(_26f){
return $(_26f).style.opacity||"";
};
Element.forceRerendering=function(_270){
try{
_270=$(_270);
var n=document.createTextNode(" ");
_270.appendChild(n);
_270.removeChild(n);
}
catch(e){
}
};
Array.prototype.call=function(){
var args=arguments;
this.each(function(f){
f.apply(this,args);
});
};
var Effect={_elementDoesNotExistError:{name:"ElementDoesNotExistError",message:"The specified DOM element does not exist, but is required for this effect to operate"},tagifyText:function(_274){
var _275="position:relative";
if(/MSIE/.test(navigator.userAgent)&&!window.opera){
_275+=";zoom:1";
}
_274=$(_274);
$A(_274.childNodes).each(function(_276){
if(_276.nodeType==3){
_276.nodeValue.toArray().each(function(_277){
_274.insertBefore(Builder.node("span",{style:_275},_277==" "?String.fromCharCode(160):_277),_276);
});
Element.remove(_276);
}
});
},multiple:function(_278,_279){
var _27a;
if(((typeof _278=="object")||(typeof _278=="function"))&&(_278.length)){
_27a=_278;
}else{
_27a=$(_278).childNodes;
}
var _27b=Object.extend({speed:0.1,delay:0},arguments[2]||{});
var _27c=_27b.delay;
$A(_27a).each(function(_27d,_27e){
new _279(_27d,Object.extend(_27b,{delay:_27e*_27b.speed+_27c}));
});
},PAIRS:{"slide":["SlideDown","SlideUp"],"blind":["BlindDown","BlindUp"],"appear":["Appear","Fade"]},toggle:function(_27f,_280){
_27f=$(_27f);
_280=(_280||"appear").toLowerCase();
var _281=Object.extend({queue:{position:"end",scope:(_27f.id||"global"),limit:1}},arguments[2]||{});
Effect[_27f.visible()?Effect.PAIRS[_280][1]:Effect.PAIRS[_280][0]](_27f,_281);
}};
var Effect2=Effect;
Effect.Transitions={linear:Prototype.K,sinoidal:function(pos){
return (-Math.cos(pos*Math.PI)/2)+0.5;
},reverse:function(pos){
return 1-pos;
},flicker:function(pos){
return ((-Math.cos(pos*Math.PI)/4)+0.75)+Math.random()/4;
},wobble:function(pos){
return (-Math.cos(pos*Math.PI*(9*pos))/2)+0.5;
},pulse:function(pos,_287){
_287=_287||5;
return (Math.round((pos%(1/_287))*_287)==0?((pos*_287*2)-Math.floor(pos*_287*2)):1-((pos*_287*2)-Math.floor(pos*_287*2)));
},none:function(pos){
return 0;
},full:function(pos){
return 1;
}};
Effect.ScopedQueue=Class.create();
Object.extend(Object.extend(Effect.ScopedQueue.prototype,Enumerable),{initialize:function(){
this.effects=[];
this.interval=null;
},_each:function(_28a){
this.effects._each(_28a);
},add:function(_28b){
var _28c=new Date().getTime();
var _28d=(typeof _28b.options.queue=="string")?_28b.options.queue:_28b.options.queue.position;
switch(_28d){
case "front":
this.effects.findAll(function(e){
return e.state=="idle";
}).each(function(e){
e.startOn+=_28b.finishOn;
e.finishOn+=_28b.finishOn;
});
break;
case "with-last":
_28c=this.effects.pluck("startOn").max()||_28c;
break;
case "end":
_28c=this.effects.pluck("finishOn").max()||_28c;
break;
}
_28b.startOn+=_28c;
_28b.finishOn+=_28c;
if(!_28b.options.queue.limit||(this.effects.length<_28b.options.queue.limit)){
this.effects.push(_28b);
}
if(!this.interval){
this.interval=setInterval(this.loop.bind(this),15);
}
},remove:function(_290){
this.effects=this.effects.reject(function(e){
return e==_290;
});
if(this.effects.length==0){
clearInterval(this.interval);
this.interval=null;
}
},loop:function(){
var _292=new Date().getTime();
for(var i=0,len=this.effects.length;i<len;i++){
if(this.effects[i]){
this.effects[i].loop(_292);
}
}
}});
Effect.Queues={instances:$H(),get:function(_295){
if(typeof _295!="string"){
return _295;
}
if(!this.instances[_295]){
this.instances[_295]=new Effect.ScopedQueue();
}
return this.instances[_295];
}};
Effect.Queue=Effect.Queues.get("global");
Effect.DefaultOptions={transition:Effect.Transitions.sinoidal,duration:1,fps:60,sync:false,from:0,to:1,delay:0,queue:"parallel"};
Effect.Base=function(){
};
Effect.Base.prototype={position:null,start:function(_296){
this.options=Object.extend(Object.extend({},Effect.DefaultOptions),_296||{});
this.currentFrame=0;
this.state="idle";
this.startOn=this.options.delay*1000;
this.finishOn=this.startOn+(this.options.duration*1000);
this.event("beforeStart");
if(!this.options.sync){
Effect.Queues.get(typeof this.options.queue=="string"?"global":this.options.queue.scope).add(this);
}
},loop:function(_297){
if(_297>=this.startOn){
if(_297>=this.finishOn){
this.render(1);
this.cancel();
this.event("beforeFinish");
if(this.finish){
this.finish();
}
this.event("afterFinish");
return;
}
var pos=(_297-this.startOn)/(this.finishOn-this.startOn);
var _299=Math.round(pos*this.options.fps*this.options.duration);
if(_299>this.currentFrame){
this.render(pos);
this.currentFrame=_299;
}
}
},render:function(pos){
if(this.state=="idle"){
this.state="running";
this.event("beforeSetup");
if(this.setup){
this.setup();
}
this.event("afterSetup");
}
if(this.state=="running"){
if(this.options.transition){
pos=this.options.transition(pos);
}
pos*=(this.options.to-this.options.from);
pos+=this.options.from;
this.position=pos;
this.event("beforeUpdate");
if(this.update){
this.update(pos);
}
this.event("afterUpdate");
}
},cancel:function(){
if(!this.options.sync){
Effect.Queues.get(typeof this.options.queue=="string"?"global":this.options.queue.scope).remove(this);
}
this.state="finished";
},event:function(_29b){
if(this.options[_29b+"Internal"]){
this.options[_29b+"Internal"](this);
}
if(this.options[_29b]){
this.options[_29b](this);
}
},inspect:function(){
var data=$H();
for(property in this){
if(typeof this[property]!="function"){
data[property]=this[property];
}
}
return "#<Effect:"+data.inspect()+",options:"+$H(this.options).inspect()+">";
}};
Effect.Parallel=Class.create();
Object.extend(Object.extend(Effect.Parallel.prototype,Effect.Base.prototype),{initialize:function(_29d){
this.effects=_29d||[];
this.start(arguments[1]);
},update:function(_29e){
this.effects.invoke("render",_29e);
},finish:function(_29f){
this.effects.each(function(_2a0){
_2a0.render(1);
_2a0.cancel();
_2a0.event("beforeFinish");
if(_2a0.finish){
_2a0.finish(_29f);
}
_2a0.event("afterFinish");
});
}});
Effect.Event=Class.create();
Object.extend(Object.extend(Effect.Event.prototype,Effect.Base.prototype),{initialize:function(){
var _2a1=Object.extend({duration:0},arguments[0]||{});
this.start(_2a1);
},update:Prototype.emptyFunction});
Effect.Opacity=Class.create();
Object.extend(Object.extend(Effect.Opacity.prototype,Effect.Base.prototype),{initialize:function(_2a2){
this.element=$(_2a2);
if(!this.element){
throw (Effect._elementDoesNotExistError);
}
if(/MSIE/.test(navigator.userAgent)&&!window.opera&&(!this.element.currentStyle.hasLayout)){
this.element.setStyle({zoom:1});
}
var _2a3=Object.extend({from:this.element.getOpacity()||0,to:1},arguments[1]||{});
this.start(_2a3);
},update:function(_2a4){
this.element.setOpacity(_2a4);
}});
Effect.Move=Class.create();
Object.extend(Object.extend(Effect.Move.prototype,Effect.Base.prototype),{initialize:function(_2a5){
this.element=$(_2a5);
if(!this.element){
throw (Effect._elementDoesNotExistError);
}
var _2a6=Object.extend({x:0,y:0,mode:"relative"},arguments[1]||{});
this.start(_2a6);
},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(_2a7){
this.element.setStyle({left:Math.round(this.options.x*_2a7+this.originalLeft)+"px",top:Math.round(this.options.y*_2a7+this.originalTop)+"px"});
}});
Effect.MoveBy=function(_2a8,_2a9,_2aa){
return new Effect.Move(_2a8,Object.extend({x:_2aa,y:_2a9},arguments[3]||{}));
};
Effect.Scale=Class.create();
Object.extend(Object.extend(Effect.Scale.prototype,Effect.Base.prototype),{initialize:function(_2ab,_2ac){
this.element=$(_2ab);
if(!this.element){
throw (Effect._elementDoesNotExistError);
}
var _2ad=Object.extend({scaleX:true,scaleY:true,scaleContent:true,scaleFromCenter:false,scaleMode:"box",scaleFrom:100,scaleTo:_2ac},arguments[2]||{});
this.start(_2ad);
},setup:function(){
this.restoreAfterFinish=this.options.restoreAfterFinish||false;
this.elementPositioning=this.element.getStyle("position");
this.originalStyle={};
["top","left","width","height","fontSize"].each(function(k){
this.originalStyle[k]=this.element.style[k];
}.bind(this));
this.originalTop=this.element.offsetTop;
this.originalLeft=this.element.offsetLeft;
var _2af=this.element.getStyle("font-size")||"100%";
["em","px","%","pt"].each(function(_2b0){
if(_2af.indexOf(_2b0)>0){
this.fontSize=parseFloat(_2af);
this.fontSizeType=_2b0;
}
}.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(_2b1){
var _2b2=(this.options.scaleFrom/100)+(this.factor*_2b1);
if(this.options.scaleContent&&this.fontSize){
this.element.setStyle({fontSize:this.fontSize*_2b2+this.fontSizeType});
}
this.setDimensions(this.dims[0]*_2b2,this.dims[1]*_2b2);
},finish:function(_2b3){
if(this.restoreAfterFinish){
this.element.setStyle(this.originalStyle);
}
},setDimensions:function(_2b4,_2b5){
var d={};
if(this.options.scaleX){
d.width=Math.round(_2b5)+"px";
}
if(this.options.scaleY){
d.height=Math.round(_2b4)+"px";
}
if(this.options.scaleFromCenter){
var topd=(_2b4-this.dims[0])/2;
var _2b8=(_2b5-this.dims[1])/2;
if(this.elementPositioning=="absolute"){
if(this.options.scaleY){
d.top=this.originalTop-topd+"px";
}
if(this.options.scaleX){
d.left=this.originalLeft-_2b8+"px";
}
}else{
if(this.options.scaleY){
d.top=-topd+"px";
}
if(this.options.scaleX){
d.left=-_2b8+"px";
}
}
}
this.element.setStyle(d);
}});
Effect.Highlight=Class.create();
Object.extend(Object.extend(Effect.Highlight.prototype,Effect.Base.prototype),{initialize:function(_2b9){
this.element=$(_2b9);
if(!this.element){
throw (Effect._elementDoesNotExistError);
}
var _2ba=Object.extend({startcolor:"#ffff99"},arguments[1]||{});
this.start(_2ba);
},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(i){
return parseInt(this.options.startcolor.slice(i*2+1,i*2+3),16);
}.bind(this));
this._delta=$R(0,2).map(function(i){
return parseInt(this.options.endcolor.slice(i*2+1,i*2+3),16)-this._base[i];
}.bind(this));
},update:function(_2bd){
this.element.setStyle({backgroundColor:$R(0,2).inject("#",function(m,v,i){
return m+(Math.round(this._base[i]+(this._delta[i]*_2bd)).toColorPart());
}.bind(this))});
},finish:function(){
this.element.setStyle(Object.extend(this.oldStyle,{backgroundColor:this.options.restorecolor}));
}});
Effect.ScrollTo=Class.create();
Object.extend(Object.extend(Effect.ScrollTo.prototype,Effect.Base.prototype),{initialize:function(_2c1){
this.element=$(_2c1);
this.start(arguments[1]||{});
},setup:function(){
Position.prepare();
var _2c2=Position.cumulativeOffset(this.element);
if(this.options.offset){
_2c2[1]+=this.options.offset;
}
var max=window.innerHeight?window.height-window.innerHeight:document.body.scrollHeight-(document.documentElement.clientHeight?document.documentElement.clientHeight:document.body.clientHeight);
this.scrollStart=Position.deltaY;
this.delta=(_2c2[1]>max?max:_2c2[1])-this.scrollStart;
},update:function(_2c4){
Position.prepare();
window.scrollTo(Position.deltaX,this.scrollStart+(_2c4*this.delta));
}});
Effect.Fade=function(_2c5){
_2c5=$(_2c5);
var _2c6=_2c5.getInlineOpacity();
var _2c7=Object.extend({from:_2c5.getOpacity()||1,to:0,afterFinishInternal:function(_2c8){
if(_2c8.options.to!=0){
return;
}
_2c8.element.hide().setStyle({opacity:_2c6});
}},arguments[1]||{});
return new Effect.Opacity(_2c5,_2c7);
};
Effect.Appear=function(_2c9){
_2c9=$(_2c9);
var _2ca=Object.extend({from:(_2c9.getStyle("display")=="none"?0:_2c9.getOpacity()||0),to:1,afterFinishInternal:function(_2cb){
_2cb.element.forceRerendering();
},beforeSetup:function(_2cc){
_2cc.element.setOpacity(_2cc.options.from).show();
}},arguments[1]||{});
return new Effect.Opacity(_2c9,_2ca);
};
Effect.Puff=function(_2cd){
_2cd=$(_2cd);
var _2ce={opacity:_2cd.getInlineOpacity(),position:_2cd.getStyle("position"),top:_2cd.style.top,left:_2cd.style.left,width:_2cd.style.width,height:_2cd.style.height};
return new Effect.Parallel([new Effect.Scale(_2cd,200,{sync:true,scaleFromCenter:true,scaleContent:true,restoreAfterFinish:true}),new Effect.Opacity(_2cd,{sync:true,to:0})],Object.extend({duration:1,beforeSetupInternal:function(_2cf){
Position.absolutize(_2cf.effects[0].element);
},afterFinishInternal:function(_2d0){
_2d0.effects[0].element.hide().setStyle(_2ce);
}},arguments[1]||{}));
};
Effect.BlindUp=function(_2d1){
_2d1=$(_2d1);
_2d1.makeClipping();
return new Effect.Scale(_2d1,0,Object.extend({scaleContent:false,scaleX:false,restoreAfterFinish:true,afterFinishInternal:function(_2d2){
_2d2.element.hide().undoClipping();
}},arguments[1]||{}));
};
Effect.BlindDown=function(_2d3){
_2d3=$(_2d3);
var _2d4=_2d3.getDimensions();
return new Effect.Scale(_2d3,100,Object.extend({scaleContent:false,scaleX:false,scaleFrom:0,scaleMode:{originalHeight:_2d4.height,originalWidth:_2d4.width},restoreAfterFinish:true,afterSetup:function(_2d5){
_2d5.element.makeClipping().setStyle({height:"0px"}).show();
},afterFinishInternal:function(_2d6){
_2d6.element.undoClipping();
}},arguments[1]||{}));
};
Effect.SwitchOff=function(_2d7){
_2d7=$(_2d7);
var _2d8=_2d7.getInlineOpacity();
return new Effect.Appear(_2d7,Object.extend({duration:0.4,from:0,transition:Effect.Transitions.flicker,afterFinishInternal:function(_2d9){
new Effect.Scale(_2d9.element,1,{duration:0.3,scaleFromCenter:true,scaleX:false,scaleContent:false,restoreAfterFinish:true,beforeSetup:function(_2da){
_2da.element.makePositioned().makeClipping();
},afterFinishInternal:function(_2db){
_2db.element.hide().undoClipping().undoPositioned().setStyle({opacity:_2d8});
}});
}},arguments[1]||{}));
};
Effect.DropOut=function(_2dc){
_2dc=$(_2dc);
var _2dd={top:_2dc.getStyle("top"),left:_2dc.getStyle("left"),opacity:_2dc.getInlineOpacity()};
return new Effect.Parallel([new Effect.Move(_2dc,{x:0,y:100,sync:true}),new Effect.Opacity(_2dc,{sync:true,to:0})],Object.extend({duration:0.5,beforeSetup:function(_2de){
_2de.effects[0].element.makePositioned();
},afterFinishInternal:function(_2df){
_2df.effects[0].element.hide().undoPositioned().setStyle(_2dd);
}},arguments[1]||{}));
};
Effect.Shake=function(_2e0){
_2e0=$(_2e0);
var _2e1={top:_2e0.getStyle("top"),left:_2e0.getStyle("left")};
return new Effect.Move(_2e0,{x:20,y:0,duration:0.05,afterFinishInternal:function(_2e2){
new Effect.Move(_2e2.element,{x:-40,y:0,duration:0.1,afterFinishInternal:function(_2e3){
new Effect.Move(_2e3.element,{x:40,y:0,duration:0.1,afterFinishInternal:function(_2e4){
new Effect.Move(_2e4.element,{x:-40,y:0,duration:0.1,afterFinishInternal:function(_2e5){
new Effect.Move(_2e5.element,{x:40,y:0,duration:0.1,afterFinishInternal:function(_2e6){
new Effect.Move(_2e6.element,{x:-20,y:0,duration:0.05,afterFinishInternal:function(_2e7){
_2e7.element.undoPositioned().setStyle(_2e1);
}});
}});
}});
}});
}});
}});
};
Effect.SlideDown=function(_2e8){
_2e8=$(_2e8).cleanWhitespace();
var _2e9=_2e8.down().getStyle("bottom");
var _2ea=_2e8.getDimensions();
return new Effect.Scale(_2e8,100,Object.extend({scaleContent:false,scaleX:false,scaleFrom:window.opera?0:1,scaleMode:{originalHeight:_2ea.height,originalWidth:_2ea.width},restoreAfterFinish:true,afterSetup:function(_2eb){
_2eb.element.makePositioned();
_2eb.element.down().makePositioned();
if(window.opera){
_2eb.element.setStyle({top:""});
}
_2eb.element.makeClipping().setStyle({height:"0px"}).show();
},afterUpdateInternal:function(_2ec){
_2ec.element.down().setStyle({bottom:(_2ec.dims[0]-_2ec.element.clientHeight)+"px"});
},afterFinishInternal:function(_2ed){
_2ed.element.undoClipping().undoPositioned();
_2ed.element.down().undoPositioned().setStyle({bottom:_2e9});
}},arguments[1]||{}));
};
Effect.SlideUp=function(_2ee){
_2ee=$(_2ee).cleanWhitespace();
var _2ef=_2ee.down().getStyle("bottom");
return new Effect.Scale(_2ee,window.opera?0:1,Object.extend({scaleContent:false,scaleX:false,scaleMode:"box",scaleFrom:100,restoreAfterFinish:true,beforeStartInternal:function(_2f0){
_2f0.element.makePositioned();
_2f0.element.down().makePositioned();
if(window.opera){
_2f0.element.setStyle({top:""});
}
_2f0.element.makeClipping().show();
},afterUpdateInternal:function(_2f1){
_2f1.element.down().setStyle({bottom:(_2f1.dims[0]-_2f1.element.clientHeight)+"px"});
},afterFinishInternal:function(_2f2){
_2f2.element.hide().undoClipping().undoPositioned().setStyle({bottom:_2ef});
_2f2.element.down().undoPositioned();
}},arguments[1]||{}));
};
Effect.Squish=function(_2f3){
return new Effect.Scale(_2f3,window.opera?1:0,{restoreAfterFinish:true,beforeSetup:function(_2f4){
_2f4.element.makeClipping();
},afterFinishInternal:function(_2f5){
_2f5.element.hide().undoClipping();
}});
};
Effect.Grow=function(_2f6){
_2f6=$(_2f6);
var _2f7=Object.extend({direction:"center",moveTransition:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.full},arguments[1]||{});
var _2f8={top:_2f6.style.top,left:_2f6.style.left,height:_2f6.style.height,width:_2f6.style.width,opacity:_2f6.getInlineOpacity()};
var dims=_2f6.getDimensions();
var _2fa,_2fb;
var _2fc,_2fd;
switch(_2f7.direction){
case "top-left":
_2fa=_2fb=_2fc=_2fd=0;
break;
case "top-right":
_2fa=dims.width;
_2fb=_2fd=0;
_2fc=-dims.width;
break;
case "bottom-left":
_2fa=_2fc=0;
_2fb=dims.height;
_2fd=-dims.height;
break;
case "bottom-right":
_2fa=dims.width;
_2fb=dims.height;
_2fc=-dims.width;
_2fd=-dims.height;
break;
case "center":
_2fa=dims.width/2;
_2fb=dims.height/2;
_2fc=-dims.width/2;
_2fd=-dims.height/2;
break;
}
return new Effect.Move(_2f6,{x:_2fa,y:_2fb,duration:0.01,beforeSetup:function(_2fe){
_2fe.element.hide().makeClipping().makePositioned();
},afterFinishInternal:function(_2ff){
new Effect.Parallel([new Effect.Opacity(_2ff.element,{sync:true,to:1,from:0,transition:_2f7.opacityTransition}),new Effect.Move(_2ff.element,{x:_2fc,y:_2fd,sync:true,transition:_2f7.moveTransition}),new Effect.Scale(_2ff.element,100,{scaleMode:{originalHeight:dims.height,originalWidth:dims.width},sync:true,scaleFrom:window.opera?1:0,transition:_2f7.scaleTransition,restoreAfterFinish:true})],Object.extend({beforeSetup:function(_300){
_300.effects[0].element.setStyle({height:"0px"}).show();
},afterFinishInternal:function(_301){
_301.effects[0].element.undoClipping().undoPositioned().setStyle(_2f8);
}},_2f7));
}});
};
Effect.Shrink=function(_302){
_302=$(_302);
var _303=Object.extend({direction:"center",moveTransition:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.none},arguments[1]||{});
var _304={top:_302.style.top,left:_302.style.left,height:_302.style.height,width:_302.style.width,opacity:_302.getInlineOpacity()};
var dims=_302.getDimensions();
var _306,_307;
switch(_303.direction){
case "top-left":
_306=_307=0;
break;
case "top-right":
_306=dims.width;
_307=0;
break;
case "bottom-left":
_306=0;
_307=dims.height;
break;
case "bottom-right":
_306=dims.width;
_307=dims.height;
break;
case "center":
_306=dims.width/2;
_307=dims.height/2;
break;
}
return new Effect.Parallel([new Effect.Opacity(_302,{sync:true,to:0,from:1,transition:_303.opacityTransition}),new Effect.Scale(_302,window.opera?1:0,{sync:true,transition:_303.scaleTransition,restoreAfterFinish:true}),new Effect.Move(_302,{x:_306,y:_307,sync:true,transition:_303.moveTransition})],Object.extend({beforeStartInternal:function(_308){
_308.effects[0].element.makePositioned().makeClipping();
},afterFinishInternal:function(_309){
_309.effects[0].element.hide().undoClipping().undoPositioned().setStyle(_304);
}},_303));
};
Effect.Pulsate=function(_30a){
_30a=$(_30a);
var _30b=arguments[1]||{};
var _30c=_30a.getInlineOpacity();
var _30d=_30b.transition||Effect.Transitions.sinoidal;
var _30e=function(pos){
return _30d(1-Effect.Transitions.pulse(pos,_30b.pulses));
};
_30e.bind(_30d);
return new Effect.Opacity(_30a,Object.extend(Object.extend({duration:2,from:0,afterFinishInternal:function(_310){
_310.element.setStyle({opacity:_30c});
}},_30b),{transition:_30e}));
};
Effect.Fold=function(_311){
_311=$(_311);
var _312={top:_311.style.top,left:_311.style.left,width:_311.style.width,height:_311.style.height};
_311.makeClipping();
return new Effect.Scale(_311,5,Object.extend({scaleContent:false,scaleX:false,afterFinishInternal:function(_313){
new Effect.Scale(_311,1,{scaleContent:false,scaleY:false,afterFinishInternal:function(_314){
_314.element.hide().undoClipping().setStyle(_312);
}});
}},arguments[1]||{}));
};
Effect.Morph=Class.create();
Object.extend(Object.extend(Effect.Morph.prototype,Effect.Base.prototype),{initialize:function(_315){
this.element=$(_315);
if(!this.element){
throw (Effect._elementDoesNotExistError);
}
var _316=Object.extend({style:{}},arguments[1]||{});
if(typeof _316.style=="string"){
if(_316.style.indexOf(":")==-1){
var _317="",_318="."+_316.style;
$A(document.styleSheets).reverse().each(function(_319){
if(_319.cssRules){
cssRules=_319.cssRules;
}else{
if(_319.rules){
cssRules=_319.rules;
}
}
$A(cssRules).reverse().each(function(rule){
if(_318==rule.selectorText){
_317=rule.style.cssText;
throw $break;
}
});
if(_317){
throw $break;
}
});
this.style=_317.parseStyle();
_316.afterFinishInternal=function(_31b){
_31b.element.addClassName(_31b.options.style);
_31b.transforms.each(function(_31c){
if(_31c.style!="opacity"){
_31b.element.style[_31c.style.camelize()]="";
}
});
};
}else{
this.style=_316.style.parseStyle();
}
}else{
this.style=$H(_316.style);
}
this.start(_316);
},setup:function(){
function parseColor(_31d){
if(!_31d||["rgba(0, 0, 0, 0)","transparent"].include(_31d)){
_31d="#ffffff";
}
_31d=_31d.parseColor();
return $R(0,2).map(function(i){
return parseInt(_31d.slice(i*2+1,i*2+3),16);
});
}
this.transforms=this.style.map(function(pair){
var _320=pair[0].underscore().dasherize(),_321=pair[1],unit=null;
if(_321.parseColor("#zzzzzz")!="#zzzzzz"){
_321=_321.parseColor();
unit="color";
}else{
if(_320=="opacity"){
_321=parseFloat(_321);
if(/MSIE/.test(navigator.userAgent)&&!window.opera&&(!this.element.currentStyle.hasLayout)){
this.element.setStyle({zoom:1});
}
}else{
if(Element.CSS_LENGTH.test(_321)){
var _323=_321.match(/^([\+\-]?[0-9\.]+)(.*)$/),_321=parseFloat(_323[1]),unit=(_323.length==3)?_323[2]:null;
}
}
}
var _324=this.element.getStyle(_320);
return $H({style:_320,originalValue:unit=="color"?parseColor(_324):parseFloat(_324||0),targetValue:unit=="color"?parseColor(_321):_321,unit:unit});
}.bind(this)).reject(function(_325){
return ((_325.originalValue==_325.targetValue)||(_325.unit!="color"&&(isNaN(_325.originalValue)||isNaN(_325.targetValue))));
});
},update:function(_326){
var _327=$H(),_328=null;
this.transforms.each(function(_329){
_328=_329.unit=="color"?$R(0,2).inject("#",function(m,v,i){
return m+(Math.round(_329.originalValue[i]+(_329.targetValue[i]-_329.originalValue[i])*_326)).toColorPart();
}):_329.originalValue+Math.round(((_329.targetValue-_329.originalValue)*_326)*1000)/1000+_329.unit;
_327[_329.style]=_328;
});
this.element.setStyle(_327);
}});
Effect.Transform=Class.create();
Object.extend(Effect.Transform.prototype,{initialize:function(_32d){
this.tracks=[];
this.options=arguments[1]||{};
this.addTracks(_32d);
},addTracks:function(_32e){
_32e.each(function(_32f){
var data=$H(_32f).values().first();
this.tracks.push($H({ids:$H(_32f).keys().first(),effect:Effect.Morph,options:{style:data}}));
}.bind(this));
return this;
},play:function(){
return new Effect.Parallel(this.tracks.map(function(_331){
var _332=[$(_331.ids)||$$(_331.ids)].flatten();
return _332.map(function(e){
return new _331.effect(e,Object.extend({sync:true},_331.options));
});
}).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.prototype.parseStyle=function(){
var _334=Element.extend(document.createElement("div"));
_334.innerHTML="<div style=\""+this+"\"></div>";
var _335=_334.down().style,_336=$H();
Element.CSS_PROPERTIES.each(function(_337){
if(_335[_337]){
_336[_337]=_335[_337];
}
});
if(/MSIE/.test(navigator.userAgent)&&!window.opera&&this.indexOf("opacity")>-1){
_336.opacity=this.match(/opacity:\s*((?:0|1)?(?:\.\d*)?)/)[1];
}
return _336;
};
Element.morph=function(_338,_339){
new Effect.Morph(_338,Object.extend({style:_339},arguments[2]||{}));
return _338;
};
["setOpacity","getOpacity","getInlineOpacity","forceRerendering","setContentZoom","collectTextNodes","collectTextNodesIgnoreClass","morph"].each(function(f){
Element.Methods[f]=Element[f];
});
Element.Methods.visualEffect=function(_33b,_33c,_33d){
s=_33c.gsub(/_/,"-").camelize();
effect_class=s.charAt(0).toUpperCase()+s.substring(1);
new Effect[effect_class](_33b,_33d);
return $(_33b);
};
Element.addMethods();
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(_33e){
_33e=_33e.toUpperCase();
var _33f=this.NODEMAP[_33e]||"div";
var _340=document.createElement(_33f);
try{
_340.innerHTML="<"+_33e+"></"+_33e+">";
}
catch(e){
}
var _341=_340.firstChild||null;
if(_341&&(_341.tagName.toUpperCase()!=_33e)){
_341=_341.getElementsByTagName(_33e)[0];
}
if(!_341){
_341=document.createElement(_33e);
}
if(!_341){
return;
}
if(arguments[1]){
if(this._isStringOrNumber(arguments[1])||(arguments[1] instanceof Array)){
this._children(_341,arguments[1]);
}else{
var _342=this._attributes(arguments[1]);
if(_342.length){
try{
_340.innerHTML="<"+_33e+" "+_342+"></"+_33e+">";
}
catch(e){
}
_341=_340.firstChild||null;
if(!_341){
_341=document.createElement(_33e);
for(attr in arguments[1]){
_341[attr=="class"?"className":attr]=arguments[1][attr];
}
}
if(_341.tagName.toUpperCase()!=_33e){
_341=_340.getElementsByTagName(_33e)[0];
}
}
}
}
if(arguments[2]){
this._children(_341,arguments[2]);
}
return _341;
},_text:function(text){
return document.createTextNode(text);
},ATTR_MAP:{"className":"class","htmlFor":"for"},_attributes:function(_344){
var _345=[];
for(attribute in _344){
_345.push((attribute in this.ATTR_MAP?this.ATTR_MAP[attribute]:attribute)+"=\""+_344[attribute].toString().escapeHTML()+"\"");
}
return _345.join(" ");
},_children:function(_346,_347){
if(typeof _347=="object"){
_347.flatten().each(function(e){
if(typeof e=="object"){
_346.appendChild(e);
}else{
if(Builder._isStringOrNumber(e)){
_346.appendChild(Builder._text(e));
}
}
});
}else{
if(Builder._isStringOrNumber(_347)){
_346.appendChild(Builder._text(_347));
}
}
},_isStringOrNumber:function(_349){
return (typeof _349=="string"||typeof _349=="number");
},build:function(html){
var _34b=this.node("div");
$(_34b).update(html.strip());
return _34b.down();
},dump:function(_34c){
if(typeof _34c!="object"&&typeof _34c!="function"){
_34c=window;
}
var tags=("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+/);
tags.each(function(tag){
_34c[tag]=function(){
return Builder.node.apply(Builder,[tag].concat($A(arguments)));
};
});
}};
var AjaxJspTag={Version:"1.3"};
AjaxJspTag.Base=function(){
};
AjaxJspTag.Base.prototype={resolveParameters:function(){
var qs=delimitQueryString(extractQueryString(this.url));
if(this.options.parameters){
this.options.parameters+=","+qs;
}else{
this.options.parameters=qs;
}
this.url=trimQueryString(this.url);
if((this.options.parameters.length>0)&&(this.options.parameters.charAt(this.options.parameters.length-1)===",")){
this.options.parameters=this.options.parameters.substr(0,this.options.parameters.length-1);
}
}};
AjaxJspTag.PreFunctionUpdateInvoke=Class.create();
AjaxJspTag.PreFunctionUpdateInvoke.prototype=Object.extend(new AjaxJspTag.Base(),{initialize:function(_350){
this.preFunction=_350.preFunction;
if(isFunction(this.preFunction)){
this.preFunction();
}
if(this.cancelExecution){
this.cancelExecution=false;
return;
}
var _351=new Ajax.Updater(_350.id,_350.href,{onComplete:_350.postFunction});
}});
AjaxJspTag.UpdateField=Class.create();
AjaxJspTag.UpdateField.prototype=Object.extend(new AjaxJspTag.Base(),{initialize:function(url,_353){
this.url=url;
this.setOptions(_353);
this.setListeners();
addAjaxListener(this);
},reload:function(){
this.setListeners();
},setOptions:function(_354){
this.options=Object.extend({parameters:_354.parameters||"",doPost:_354.doPost||false,valueUpdateByName:_354.valueUpdateByName||false,eventType:_354.eventType?_354.eventType:"click",parser:_354.parser?_354.parser:(_354.valueUpdateByName?new ResponseXmlParser():new ResponseTextParser()),handler:_354.handler?_354.handler:this.handler},_354||{});
},setListeners:function(){
eval("$(this.options.action).on"+this.options.eventType+" = this.execute.bindAsEventListener(this)");
},execute:function(e){
if(isFunction(this.options.preFunction)){
this.options.preFunction();
}
if(this.options.cancelExecution){
this.cancelExecution=false;
return;
}
var _356=buildParameterString(this.options.parameters);
var _357=this.options.target.split(",");
var obj=this;
var _359=this.setField;
var aj=new Ajax.Request(this.url,{asynchronous:true,method:obj.options.doPost?"post":"get",evalScripts:true,parameters:_356,onSuccess:function(_35b){
obj.options.parser.load(_35b);
var _35c=obj.options.parser.itemList;
obj.options.handler(_35b,{targets:_357,items:_35c});
},onFailure:function(_35d){
if(isFunction(obj.options.errorFunction)){
obj.options.errorFunction(_35d,obj.options.parser);
}
},onComplete:function(_35e){
if(isFunction(obj.options.postFunction)){
obj.options.postFunction();
}
}});
},handler:function(_35f,_360){
for(var i=0;i<_360.targets.length&&i<_360.items.length;i++){
namedIndex=i;
if(this.valueUpdateByName){
for(j=0;j<_360.items.length;j++){
if(_360.targets[i]===_360.items[j][0]){
namedIndex=j;
}
}
}
$(_360.targets[i]).value=_360.items[namedIndex][1];
}
}});
Ajax.XmlToHtmlAutocompleter=Class.create();
Object.extend(Object.extend(Ajax.XmlToHtmlAutocompleter.prototype,Autocompleter.Base.prototype),{initialize:function(_362,_363,url,_365){
this.baseInitialize(_362,_363,_365);
this.options.asynchronous=true;
this.options.onComplete=this.onComplete.bind(this);
this.options.defaultParams=this.options.parameters||null;
this.url=url;
},onBlur:function(_366){
if(Element.getStyle(this.update,"height")!=""){
var x=999999;
var y=999999;
var _369=Position.positionedOffset(this.update);
var top=_369[1];
var left=_369[0];
var data=Element.getDimensions(this.update);
var _36d=data.width;
var _36e=data.height;
if(_366){
x=_366.x-left;
y=_366.y-top;
}
if(x>0&&x<_36d&&y>0&&y<_36e){
this.element.focus();
return;
}
}
setTimeout(this.hide.bind(this),250);
this.hasFocus=false;
this.active=false;
},getUpdatedChoices:function(){
if(isFunction(this.options.preFunction)){
this.options.preFunction();
}
if(this.options.cancelExecution){
this.cancelExecution=false;
this.stopIndicator();
return;
}
entry=escape(this.options.paramName)+"="+escape(this.getToken());
this.options.parameters=this.options.callback?this.options.callback(this.element,entry):entry;
var _36f=buildParameterString(this.options.defaultParams);
if(!isEmpty(_36f)||(isString(_36f)&&_36f.length>0)){
this.options.parameters+="&"+_36f;
}
new Ajax.Request(this.url,this.options);
},onComplete:function(_370){
var _371=this.options.parser;
_371.load(_370);
this.updateChoices(_371.content);
}});
AjaxJspTag.Autocomplete=Class.create();
AjaxJspTag.Autocomplete.prototype=Object.extend(new AjaxJspTag.Base(),{initialize:function(url,_373){
this.url=url;
this.setOptions(_373);
new Insertion.After(this.options.source,"<div id=\""+this.options.divElement+"\" class=\""+this.options.className+"\"></div>");
this.execute();
},setOptions:function(_374){
this.options=Object.extend({divElement:"ajaxAuto_"+_374.source,indicator:_374.indicator||"",parameters:_374.parameters||"",autosubmitname:_374.autosubmitname||"",parser:_374.parser?_374.parser:new ResponseXmlToHtmlListParser(),handler:_374.handler?_374.handler:this.handler},_374||{});
},execute:function(e){
var obj=this;
var aj=new Ajax.XmlToHtmlAutocompleter(this.options.source,this.options.divElement,this.url,{minChars:obj.options.minimumCharacters,tokens:obj.options.appendSeparator,indicator:obj.options.indicator,parameters:obj.options.parameters,autosubmitname:obj.options.autosubmitname,evalScripts:true,preFunction:obj.options.preFunction,parser:obj.options.parser,afterUpdateElement:function(_378,_379){
obj.options.handler(null,{selectedItem:_379,tokens:obj.options.appendSeparator,target:obj.options.target,inputField:_378,postFunction:obj.options.postFunction,list:obj.options.parser.getArray(),options:obj.options,autocomplete:aj});
}});
},handler:function(_37a,_37b){
if(_37b.target){
if(_37b.tokens){
if($(_37b.target).value.length>0){
$(_37b.target).value+=_37b.tokens;
}
$(_37b.target).value+=_37b.selectedItem.id;
}else{
$(_37b.target).value=_37b.selectedItem.id;
}
}
_37b.selectedIndex=_37b.autocomplete.index;
_37b.selectedObject=_37b.list[_37b.autocomplete.index];
if(isFunction(_37b.postFunction)){
var _37c=$(_37b.inputField).onupdate;
$(_37b.inputField).onupdate="";
_37b.postFunction();
$(_37b.inputField).onupdate=_37c;
}
}});
var AbstractResponseParser=function(){
this.getArray=function(){
return null;
};
};
var DefaultResponseParser=Class.create();
var ResponseTextParser=Class.create();
var ResponseXmlParser=Class.create();
var ResponseHtmlParser=Class.create();
var ResponseXmlToHtmlParser=Class.create();
var ResponseCallBackXmlParser=Class.create();
var ResponsePlainTextXmlToHtmlParser=Class.create();
var ResponseXmlToHtmlListParser=Class.create();
var ResponseXmlToHtmlLinkListParser=Class.create();
DefaultResponseParser.prototype=Object.extend(new AbstractResponseParser(),{initialize:function(){
this.type="xml";
},getArray:function(){
return this.itemList;
},load:function(_37d){
this.content=_37d.responseXML;
this.parse();
this.prepareData(this.itemList);
},prepareData:function(_37e){
},parse:function(){
root=this.content.documentElement;
responseNodes=root.getElementsByTagName("response");
this.itemList=[];
if(responseNodes.length>0){
responseNode=responseNodes[0];
valueNodes=responseNode.getElementsByTagName("value");
for(i=0;i<valueNodes.length;i++){
value=valueNodes[i].firstChild?valueNodes[i].firstChild.nodeValue:"";
myData=[];
myData.push(value);
myData.push(value);
this.itemList.push(myData);
}
}
}});
ResponseTextParser.prototype=Object.extend(new AbstractResponseParser(),{initialize:function(){
this.type="text";
},load:function(_37f){
this.content=_37f.responseText;
this.split();
},split:function(){
this.itemList=[];
var _380=this.content.split("\n");
for(i=0;i<_380.length;i++){
this.itemList.push(_380[i].split(","));
}
}});
ResponseXmlParser.prototype=Object.extend(new DefaultResponseParser(),{prepareData:function(_381,_382){
}});
ResponseHtmlParser.prototype=Object.extend(new AbstractResponseParser(),{initialize:function(){
this.type="html";
},load:function(_383){
this.content=_383.responseText;
}});
ResponseXmlToHtmlParser.prototype=Object.extend(new DefaultResponseParser(),{initialize:function(){
this.type="xmltohtml";
this.plaintext=false;
},prepareData:function(_384){
this.contentdiv=document.createElement("div");
for(i=0;i<_384.length;i++){
h1=document.createElement("h1");
if(!this.plaintext){
h1.innerHTML+=_384[i][0];
}else{
h1.appendChild(document.createTextNode(_384[i][0]));
}
this.contentdiv.appendChild(h1);
for(j=1;j<_384[i].length;j++){
div=document.createElement("div");
if(!this.plaintext){
div.innerHTML+=_384[i][j];
}else{
div.appendChild(document.createTextNode(_384[i][j]));
}
this.contentdiv.appendChild(div);
}
}
if(_384.length>=1){
this.content=this.contentdiv.innerHTML;
}else{
this.content="";
}
}});
ResponseCallBackXmlParser.prototype=Object.extend(new DefaultResponseParser(),{initialize:function(){
this.type="xml";
},prepareData:function(_385){
this.items=[];
for(i=0;i<_385.length;i++){
this.items.push([_385[i][0],_385[i][1],(_385[i][2]?true:false)]);
}
}});
ResponsePlainTextXmlToHtmlParser.prototype=Object.extend(new ResponseXmlToHtmlParser(),{initialize:function(){
this.type="xmltohtml";
this.plaintext=true;
}});
ResponseXmlToHtmlListParser.prototype=Object.extend(new DefaultResponseParser(),{initialize:function(){
this.type="xmltohtmllist";
this.plaintext=true;
},prepareData:function(_386){
this.contentdiv=document.createElement("div");
ul=document.createElement("ul");
for(i=0;i<_386.length;i++){
liElement=document.createElement("li");
liElement.id=_386[i][1];
if(this.plaintext){
liElement.appendChild(document.createTextNode(_386[i][1]));
}else{
liElement.innerHTML=_386[i][1];
}
ul.appendChild(liElement);
}
this.contentdiv.appendChild(ul);
div=document.createElement("div");
div.id="Title";
div.innerHTML="... einige der meistverwendeten Suchbegriffe&nbsp;&nbsp;";
this.contentdiv.appendChild(div);
this.content=this.contentdiv.innerHTML;
}});
ResponseXmlToHtmlLinkListParser.prototype=Object.extend(new AbstractResponseParser(),{initialize:function(){
this.type="xmltohtmllinklist";
},load:function(_387){
this.xml=_387.responseXML;
this.collapsedClass=_387.collapsedClass;
this.treeClass=_387.treeClass;
this.nodeClass=_387.nodeClass;
this.expandedNodes=[];
this.parse();
},parse:function(){
var ul=document.createElement("ul");
ul.className=this.treeClass;
var root=this.xml.documentElement;
var _38a=root.getElementsByTagName("response");
if(_38a.length>0){
responseNode=_38a[0];
itemNodes=responseNode.getElementsByTagName("item");
if(itemNodes.length===0){
ul=null;
}
for(i=0;i<itemNodes.length;i++){
nameNodes=itemNodes[i].getElementsByTagName("name");
valueNodes=itemNodes[i].getElementsByTagName("value");
urlNodes=itemNodes[i].getElementsByTagName("url");
collapsedNodes=itemNodes[i].getElementsByTagName("collapsed");
leafnodes=itemNodes[i].getElementsByTagName("leaf");
if(nameNodes.length>0&&valueNodes.length>0){
name=nameNodes[0].firstChild.nodeValue;
value=valueNodes[0].firstChild.nodeValue;
url="#";
try{
url=urlNodes[0].firstChild.nodeValue;
}
catch(ex){
}
leaf=false;
try{
leaf=leafnodes[0].firstChild.nodeValue;
}
catch(ex){
}
collapsed=false;
try{
collapsed=parseBoolean(collapsedNodes[0].firstChild.nodeValue);
}
catch(ex){
}
li=document.createElement("li");
li.id="li_"+value;
ul.appendChild(li);
if(!parseBoolean(leaf)){
span=document.createElement("span");
li.appendChild(span);
span.id="span_"+value;
span.className=this.collapsedClass;
}
link=document.createElement("a");
li.appendChild(link);
link.href=url;
link.className=this.nodeClass;
link.appendChild(document.createTextNode(name));
div=document.createElement("div");
li.appendChild(div);
div.id=value;
div.setAttribute("style","");
div.style.display="none";
if(!collapsed){
this.expandedNodes.push(value);
}
}
}
}
this.content=ul;
}});
AJAX_DEFAULT_PARAMETER="ajaxParameter";
AJAX_PORTLET_MAX=1;
AJAX_PORTLET_MIN=2;
AJAX_PORTLET_CLOSE=3;
AJAX_CALLOUT_OVERLIB_DEFAULT="STICKY,CLOSECLICK,DELAY,250,TIMEOUT,5000,VAUTO,WRAPMAX,240,CSSCLASS,FGCLASS,'olfg',BGCLASS,'olbg',CGCLASS,'olcg',CAPTIONFONTCLASS,'olcap',CLOSEFONTCLASS,'olclo',TEXTFONTCLASS,'oltxt'";
function isAlien(a){
return isObject(a)&&typeof a.constructor!="function";
}
function isArray(a){
return isObject(a)&&a.constructor==Array;
}
function isBoolean(a){
return typeof a=="boolean";
}
function isEmpty(o){
var i,v;
if(isObject(o)){
for(i in o){
v=o[i];
if(isUndefined(v)&&isFunction(v)){
return false;
}
}
}
return true;
}
function isFunction(a){
return typeof a=="function";
}
function isNull(a){
return typeof a=="object"&&!a;
}
function isNumber(a){
return typeof a=="number"&&isFinite(a);
}
function isObject(a){
return (a&&typeof a=="object")||isFunction(a);
}
function isString(a){
return typeof a=="string";
}
function isUndefined(a){
return typeof a=="undefined";
}
function addOnLoadEvent(func){
var _398=window.onload;
if(isFunction(func)){
if(!isFunction(_398)){
window.onload=func;
}else{
window.onload=function(){
_398();
func();
};
}
}else{
if(isObject(func)&&isFunction(func.onload)){
window.onload=function(){
if(isFunction(_398)){
_398();
}
func.onload();
};
}
}
}
function extractQueryString(url){
return ((url.indexOf("?")>=0)&&(url.indexOf("?")<(url.length-1)))?url.substr(url.indexOf("?")+1):"";
}
function trimQueryString(url){
return (url.indexOf("?")>=0)?url.substring(0,url.indexOf("?")):url;
}
function delimitQueryString(qs){
var ret="";
var _39d="";
if(qs.length>0){
_39d=qs.split("&");
for(i=0;i<_39d.length;i++){
if(i>0){
ret+=",";
}
ret+=_39d[i];
}
}
return ret;
}
function trim(str){
return str.replace(/^\s*/,"").replace(/\s*$/,"");
}
function buildParameterString(_39f){
var _3a0="";
var _3a1=(_39f||"").split(",");
if(_3a1!==null){
for(p=0;p<_3a1.length;p++){
pair=_3a1[p].split("=");
key=trim(pair[0]);
val=pair[1];
if(!isEmpty(val)||isString(val)){
varList=val.match(new RegExp("\\{[\\w\\.\\(\\)\\[\\]]*\\}","g"));
if(!isNull(varList)){
field=$(varList[1].substring(1,varList[1].length-1));
switch(field.type){
case "checkbox":
case "radio":
case "text":
case "textarea":
case "password":
case "hidden":
case "select-one":
_3a0+="&"+key+"="+escape(field.value);
break;
case "select-multiple":
fieldValue=$F(varList[0].substring(1,varList[0].length-1));
for(i=0;i<fieldValue.length;i++){
_3a0+="&"+key+"="+escape(fieldValue[i]);
}
break;
default:
_3a0+="&"+key+"="+escape(field.innerHTML);
break;
}
}else{
_3a0+="&"+key+"="+escape(val);
}
}
}
}
if(_3a0.charAt(0)=="&"){
_3a0=_3a0.substr(1);
}
return _3a0;
}
function evalBoolean(_3a2,_3a3){
if(!isNull(_3a2)&&isString(_3a2)){
return (parseBoolean(_3a2))?"true":"false";
}else{
return _3a3===true?"true":"false";
}
}
function parseBoolean(_3a4){
if(!isNull(_3a4)&&isString(_3a4)){
return ("true"==_3a4.toLowerCase()||"yes"==_3a4.toLowerCase());
}else{
if(isBoolean(_3a4)){
return _3a4;
}
return false;
}
}
function evalJScriptParameters(_3a5){
if(isNull(_3a5)||!isString(_3a5)){
return null;
}
return eval("new Array("+_3a5+")");
}
function reloadAjaxListeners(){
for(i=0;i<this.ajaxListeners.length;i++){
if(isFunction(this.ajaxListeners[i].reload)){
this.ajaxListeners[i].reload();
}
}
}
function addAjaxListener(obj){
if(!this.ajaxListeners){
this.ajaxListeners=new Array(obj);
}else{
this.ajaxListeners.push(obj);
}
}
function getExpDate(days,_3a8,_3a9){
var _3aa=new Date();
if(typeof days=="number"&&typeof _3a8=="number"&&typeof _3a8=="number"){
_3aa.setDate(_3aa.getDate()+parseInt(days));
_3aa.setHours(_3aa.getHours()+parseInt(_3a8));
_3aa.setMinutes(_3aa.getMinutes()+parseInt(_3a9));
return _3aa.toGMTString();
}
}
function getCookieVal(_3ab){
var _3ac=document.cookie.indexOf(";",_3ab);
if(_3ac==-1){
_3ac=document.cookie.length;
}
return unescape(document.cookie.substring(_3ab,_3ac));
}
function getCookie(name){
var arg=name+"=";
var alen=arg.length;
var clen=document.cookie.length;
var i=0;
var j;
while(i<clen){
j=i+alen;
if(document.cookie.substring(i,j)==arg){
return getCookieVal(j);
}
i=document.cookie.indexOf(" ",i)+1;
if(i==0){
break;
}
}
return null;
}
function setCookie(name,_3b4,_3b5,path,_3b7,_3b8){
document.cookie=name+"="+escape(_3b4)+((_3b5)?"; expires="+_3b5:"")+((path)?"; path="+path:"")+((_3b7)?"; domain="+_3b7:"")+((_3b8)?"; secure":"");
}
function deleteCookie(name,path,_3bb){
if(getCookie(name)){
document.cookie=name+"="+((path)?"; path="+path:"")+((_3bb)?"; domain="+_3bb:"")+"; expires=Thu, 01-Jan-70 00:00:01 GMT";
}
}

