var Prototype={Version:"1.4.0",ScriptFragment:"(?:<script.*?>)((\n|\r|.)*?)(?:</script>)",emptyFunction:function(){
},K:function(x){
return x;
}};
var Class={create:function(){
return function(){
this.initialize.apply(this,arguments);
};
}};
var Abstract=new Object();
Object.extend=function(_2,_3){
for(property in _3){
_2[property]=_3[property];
}
return _2;
};
Object.inspect=function(_4){
try{
if(_4==undefined){
return "undefined";
}
if(_4==null){
return "null";
}
return _4.inspect?_4.inspect():_4.toString();
}
catch(e){
if(e instanceof RangeError){
return "...";
}
throw e;
}
};
Function.prototype.bind=function(){
var _5=this,args=$A(arguments),object=args.shift();
return function(){
return _5.apply(object,args.concat($A(arguments)));
};
};
Function.prototype.bindAsEventListener=function(_6){
var _7=this;
return function(_8){
return _7.call(_6,_8||window.event);
};
};
Object.extend(Number.prototype,{toColorPart:function(){
var _9=this.toString(16);
if(this<16){
return "0"+_9;
}
return _9;
},succ:function(){
return this+1;
},times:function(_a){
$R(0,this,true).each(_a);
return this;
}});
var Try={these:function(){
var _b;
for(var i=0;i<arguments.length;i++){
var _d=arguments[i];
try{
_b=_d();
break;
}
catch(e){
}
}
return _b;
}};
function $(){
var _e=new Array();
for(var i=0;i<arguments.length;i++){
var _10=arguments[i];
if(typeof _10=="string"){
_10=document.getElementById(_10);
}
if(arguments.length==1){
return _10;
}
_e.push(_10);
}
return _e;
}
Object.extend(String.prototype,{stripTags:function(){
return this.replace(/<\/?[^>]+>/gi,"");
},stripScripts:function(){
return this.replace(new RegExp(Prototype.ScriptFragment,"img"),"");
},extractScripts:function(){
var _11=new RegExp(Prototype.ScriptFragment,"img");
var _12=new RegExp(Prototype.ScriptFragment,"im");
return (this.match(_11)||[]).map(function(_13){
return (_13.match(_12)||["",""])[1];
});
},evalScripts:function(){
return this.extractScripts().map(eval);
},escapeHTML:function(){
var div=document.createElement("div");
var _15=document.createTextNode(this);
div.appendChild(_15);
return div.innerHTML;
},unescapeHTML:function(){
var div=document.createElement("div");
div.innerHTML=this.stripTags();
return div.childNodes[0]?div.childNodes[0].nodeValue:"";
},toQueryParams:function(){
var _17=this.match(/^\??(.*)$/)[1].split("&");
return _17.inject({},function(_18,_19){
var _1a=_19.split("=");
_18[_1a[0]]=_1a[1];
return _18;
});
},toArray:function(){
return this.split("");
},camelize:function(){
var _1b=this.split("-");
if(_1b.length==1){
return _1b[0];
}
var _1c=this.indexOf("-")==0?_1b[0].charAt(0).toUpperCase()+_1b[0].substring(1):_1b[0];
for(var i=1,len=_1b.length;i<len;i++){
var s=_1b[i];
_1c+=s.charAt(0).toUpperCase()+s.substring(1);
}
return _1c;
},inspect:function(){
return "'"+this.replace("\\","\\\\").replace("'","\\'")+"'";
}});
String.prototype.parseQuery=String.prototype.toQueryParams;
var $break=new Object();
var $continue=new Object();
var Enumerable={each:function(_1f){
var _20=0;
try{
this._each(function(_21){
try{
_1f(_21,_20++);
}
catch(e){
if(e!=$continue){
throw e;
}
}
});
}
catch(e){
if(e!=$break){
throw e;
}
}
},all:function(_22){
var _23=true;
this.each(function(_24,_25){
_23=_23&&!!(_22||Prototype.K)(_24,_25);
if(!_23){
throw $break;
}
});
return _23;
},any:function(_26){
var _27=true;
this.each(function(_28,_29){
if(_27=!!(_26||Prototype.K)(_28,_29)){
throw $break;
}
});
return _27;
},collect:function(_2a){
var _2b=[];
this.each(function(_2c,_2d){
_2b.push(_2a(_2c,_2d));
});
return _2b;
},detect:function(_2e){
var _2f;
this.each(function(_30,_31){
if(_2e(_30,_31)){
_2f=_30;
throw $break;
}
});
return _2f;
},findAll:function(_32){
var _33=[];
this.each(function(_34,_35){
if(_32(_34,_35)){
_33.push(_34);
}
});
return _33;
},grep:function(_36,_37){
var _38=[];
this.each(function(_39,_3a){
var _3b=_39.toString();
if(_3b.match(_36)){
_38.push((_37||Prototype.K)(_39,_3a));
}
});
return _38;
},include:function(_3c){
var _3d=false;
this.each(function(_3e){
if(_3e==_3c){
_3d=true;
throw $break;
}
});
return _3d;
},inject:function(_3f,_40){
this.each(function(_41,_42){
_3f=_40(_3f,_41,_42);
});
return _3f;
},invoke:function(_43){
var _44=$A(arguments).slice(1);
return this.collect(function(_45){
return _45[_43].apply(_45,_44);
});
},max:function(_46){
var _47;
this.each(function(_48,_49){
_48=(_46||Prototype.K)(_48,_49);
if(_48>=(_47||_48)){
_47=_48;
}
});
return _47;
},min:function(_4a){
var _4b;
this.each(function(_4c,_4d){
_4c=(_4a||Prototype.K)(_4c,_4d);
if(_4c<=(_4b||_4c)){
_4b=_4c;
}
});
return _4b;
},partition:function(_4e){
var _4f=[],falses=[];
this.each(function(_50,_51){
((_4e||Prototype.K)(_50,_51)?_4f:falses).push(_50);
});
return [_4f,falses];
},pluck:function(_52){
var _53=[];
this.each(function(_54,_55){
_53.push(_54[_52]);
});
return _53;
},reject:function(_56){
var _57=[];
this.each(function(_58,_59){
if(!_56(_58,_59)){
_57.push(_58);
}
});
return _57;
},sortBy:function(_5a){
return this.collect(function(_5b,_5c){
return {value:_5b,criteria:_5a(_5b,_5c)};
}).sort(function(_5d,_5e){
var a=_5d.criteria,b=_5e.criteria;
return a<b?-1:a>b?1:0;
}).pluck("value");
},toArray:function(){
return this.collect(Prototype.K);
},zip:function(){
var _60=Prototype.K,args=$A(arguments);
if(typeof args.last()=="function"){
_60=args.pop();
}
var _61=[this].concat(args).map($A);
return this.map(function(_62,_63){
_60(_62=_61.pluck(_63));
return _62;
});
},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});
var $A=Array.from=function(_64){
if(!_64){
return [];
}
if(_64.toArray){
return _64.toArray();
}else{
var _65=[];
for(var i=0;i<_64.length;i++){
_65.push(_64[i]);
}
return _65;
}
};
Object.extend(Array.prototype,Enumerable);
Array.prototype._reverse=Array.prototype.reverse;
Object.extend(Array.prototype,{_each:function(_67){
for(var i=0;i<this.length;i++){
_67(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(_69){
return _69!=undefined||_69!=null;
});
},flatten:function(){
return this.inject([],function(_6a,_6b){
return _6a.concat(_6b.constructor==Array?_6b.flatten():[_6b]);
});
},without:function(){
var _6c=$A(arguments);
return this.select(function(_6d){
return !_6c.include(_6d);
});
},indexOf:function(_6e){
for(var i=0;i<this.length;i++){
if(this[i]==_6e){
return i;
}
}
return -1;
},reverse:function(_70){
return (_70!==false?this:this.toArray())._reverse();
},shift:function(){
var _71=this[0];
for(var i=0;i<this.length-1;i++){
this[i]=this[i+1];
}
this.length--;
return _71;
},inspect:function(){
return "["+this.map(Object.inspect).join(", ")+"]";
}});
var Hash={_each:function(_73){
for(key in this){
var _74=this[key];
if(typeof _74=="function"){
continue;
}
var _75=[key,_74];
_75.key=key;
_75.value=_74;
_73(_75);
}
},keys:function(){
return this.pluck("key");
},values:function(){
return this.pluck("value");
},merge:function(_76){
return $H(_76).inject($H(this),function(_77,_78){
_77[_78.key]=_78.value;
return _77;
});
},toQueryString:function(){
return this.map(function(_79){
return _79.map(encodeURIComponent).join("=");
}).join("&");
},inspect:function(){
return "#<Hash:{"+this.map(function(_7a){
return _7a.map(Object.inspect).join(": ");
}).join(", ")+"}>";
}};
function $H(_7b){
var _7c=Object.extend({},_7b||{});
Object.extend(_7c,Enumerable);
Object.extend(_7c,Hash);
return _7c;
}
ObjectRange=Class.create();
Object.extend(ObjectRange.prototype,Enumerable);
Object.extend(ObjectRange.prototype,{initialize:function(_7d,end,_7f){
this.start=_7d;
this.end=end;
this.exclusive=_7f;
},_each:function(_80){
var _81=this.start;
do{
_80(_81);
_81=_81.succ();
}while(this.include(_81));
},include:function(_82){
if(_82<this.start){
return false;
}
if(this.exclusive){
return _82<this.end;
}
return _82<=this.end;
}});
var $R=function(_83,end,_85){
return new ObjectRange(_83,end,_85);
};
var Ajax={getTransport:function(){
return Try.these(function(){
return new ActiveXObject("Msxml2.XMLHTTP");
},function(){
return new ActiveXObject("Microsoft.XMLHTTP");
},function(){
return new XMLHttpRequest();
})||false;
},activeRequestCount:0};
Ajax.Responders={responders:[],_each:function(_86){
this.responders._each(_86);
},register:function(_87){
if(!this.include(_87)){
this.responders.push(_87);
}
},unregister:function(_88){
this.responders=this.responders.without(_88);
},dispatch:function(_89,_8a,_8b,_8c){
this.each(function(_8d){
if(_8d[_89]&&typeof _8d[_89]=="function"){
try{
_8d[_89].apply(_8d,[_8a,_8b,_8c]);
}
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(_8e){
this.options={method:"post",asynchronous:true,parameters:""};
Object.extend(this.options,_8e||{});
},responseIsSuccess:function(){
return this.transport.status==undefined||this.transport.status==0||(this.transport.status>=200&&this.transport.status<300);
},responseIsFailure:function(){
return !this.responseIsSuccess();
}};
Ajax.Request=Class.create();
Ajax.Request.Events=["Uninitialized","Loading","Loaded","Interactive","Complete"];
Ajax.Request.prototype=Object.extend(new Ajax.Base(),{initialize:function(url,_90){
this.transport=Ajax.getTransport();
this.setOptions(_90);
this.request(url);
},request:function(url){
var _92=this.options.parameters||"";
if(_92.length>0){
_92+="&_=";
}
try{
this.url=url;
if(this.options.method=="get"&&_92.length>0){
this.url+=(this.url.match(/\?/)?"&":"?")+_92;
}
Ajax.Responders.dispatch("onCreate",this,this.transport);
this.transport.open(this.options.method,this.url,this.options.asynchronous);
if(this.options.asynchronous){
this.transport.onreadystatechange=this.onStateChange.bind(this);
setTimeout((function(){
this.respondToReadyState(1);
}).bind(this),10);
}
this.setRequestHeaders();
var _93=this.options.postBody?this.options.postBody:_92;
this.transport.send(this.options.method=="post"?_93:null);
}
catch(e){
this.dispatchException(e);
}
},setRequestHeaders:function(){
var _94=["X-Requested-With","XMLHttpRequest","X-Prototype-Version",Prototype.Version];
if(this.options.method=="post"){
_94.push("Content-type","application/x-www-form-urlencoded");
if(this.transport.overrideMimeType){
_94.push("Connection","close");
}
}
if(this.options.requestHeaders){
_94.push.apply(_94,this.options.requestHeaders);
}
for(var i=0;i<_94.length;i+=2){
this.transport.setRequestHeader(_94[i],_94[i+1]);
}
},onStateChange:function(){
var _96=this.transport.readyState;
if(_96!=1){
this.respondToReadyState(this.transport.readyState);
}
},header:function(_97){
try{
return this.transport.getResponseHeader(_97);
}
catch(e){
}
},evalJSON:function(){
try{
return eval(this.header("X-JSON"));
}
catch(e){
}
},evalResponse:function(){
try{
return eval(this.transport.responseText);
}
catch(e){
this.dispatchException(e);
}
},respondToReadyState:function(_98){
var _99=Ajax.Request.Events[_98];
var _9a=this.transport,json=this.evalJSON();
if(_99=="Complete"){
try{
(this.options["on"+this.transport.status]||this.options["on"+(this.responseIsSuccess()?"Success":"Failure")]||Prototype.emptyFunction)(_9a,json);
}
catch(e){
this.dispatchException(e);
}
if((this.header("Content-type")||"").match(/^text\/javascript/i)){
this.evalResponse();
}
}
try{
(this.options["on"+_99]||Prototype.emptyFunction)(_9a,json);
Ajax.Responders.dispatch("on"+_99,this,_9a,json);
}
catch(e){
this.dispatchException(e);
}
if(_99=="Complete"){
this.transport.onreadystatechange=Prototype.emptyFunction;
}
},dispatchException:function(_9b){
(this.options.onException||Prototype.emptyFunction)(this,_9b);
Ajax.Responders.dispatch("onException",this,_9b);
}});
Ajax.Updater=Class.create();
Object.extend(Object.extend(Ajax.Updater.prototype,Ajax.Request.prototype),{initialize:function(_9c,url,_9e){
this.containers={success:_9c.success?$(_9c.success):$(_9c),failure:_9c.failure?$(_9c.failure):(_9c.success?null:$(_9c))};
this.transport=Ajax.getTransport();
this.setOptions(_9e);
var _9f=this.options.onComplete||Prototype.emptyFunction;
this.options.onComplete=(function(_a0,_a1){
this.updateContent();
_9f(_a0,_a1);
}).bind(this);
this.request(url);
},updateContent:function(){
var _a2=this.responseIsSuccess()?this.containers.success:this.containers.failure;
var _a3=this.transport.responseText;
if(!this.options.evalScripts){
_a3=_a3.stripScripts();
}
if(_a2){
if(this.options.insertion){
new this.options.insertion(_a2,_a3);
}else{
Element.update(_a2,_a3);
}
}
if(this.responseIsSuccess()){
if(this.onComplete){
setTimeout(this.onComplete.bind(this),10);
}
}
}});
Ajax.PeriodicalUpdater=Class.create();
Ajax.PeriodicalUpdater.prototype=Object.extend(new Ajax.Base(),{initialize:function(_a4,url,_a6){
this.setOptions(_a6);
this.onComplete=this.options.onComplete;
this.frequency=(this.options.frequency||2);
this.decay=(this.options.decay||1);
this.updater={};
this.container=_a4;
this.url=url;
this.start();
},start:function(){
this.options.onComplete=this.updateComplete.bind(this);
this.onTimerEvent();
},stop:function(){
this.updater.onComplete=undefined;
clearTimeout(this.timer);
(this.onComplete||Prototype.emptyFunction).apply(this,arguments);
},updateComplete:function(_a7){
if(this.options.decay){
this.decay=(_a7.responseText==this.lastText?this.decay*this.options.decay:1);
this.lastText=_a7.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);
}});
document.getElementsByClassName=function(_a8,_a9){
var _aa=($(_a9)||document.body).getElementsByTagName("*");
return $A(_aa).inject([],function(_ab,_ac){
if(_ac.className.match(new RegExp("(^|\\s)"+_a8+"(\\s|$)"))){
_ab.push(_ac);
}
return _ab;
});
};
if(!window.Element){
var Element=new Object();
}
Object.extend(Element,{visible:function(_ad){
return $(_ad).style.display!="none";
},toggle:function(){
for(var i=0;i<arguments.length;i++){
var _af=$(arguments[i]);
Element[Element.visible(_af)?"hide":"show"](_af);
}
},hide:function(){
for(var i=0;i<arguments.length;i++){
var _b1=$(arguments[i]);
_b1.style.display="none";
}
},show:function(){
for(var i=0;i<arguments.length;i++){
var _b3=$(arguments[i]);
_b3.style.display="";
}
},remove:function(_b4){
_b4=$(_b4);
_b4.parentNode.removeChild(_b4);
},update:function(_b5,_b6){
$(_b5).innerHTML=_b6.stripScripts();
setTimeout(function(){
_b6.evalScripts();
},10);
},getHeight:function(_b7){
_b7=$(_b7);
return _b7.offsetHeight;
},classNames:function(_b8){
return new Element.ClassNames(_b8);
},hasClassName:function(_b9,_ba){
if(!(_b9=$(_b9))){
return;
}
return Element.classNames(_b9).include(_ba);
},addClassName:function(_bb,_bc){
if(!(_bb=$(_bb))){
return;
}
return Element.classNames(_bb).add(_bc);
},removeClassName:function(_bd,_be){
if(!(_bd=$(_bd))){
return;
}
return Element.classNames(_bd).remove(_be);
},cleanWhitespace:function(_bf){
_bf=$(_bf);
for(var i=0;i<_bf.childNodes.length;i++){
var _c1=_bf.childNodes[i];
if(_c1.nodeType==3&&!/\S/.test(_c1.nodeValue)){
Element.remove(_c1);
}
}
},empty:function(_c2){
return $(_c2).innerHTML.match(/^\s*$/);
},scrollTo:function(_c3){
_c3=$(_c3);
var x=_c3.x?_c3.x:_c3.offsetLeft,y=_c3.y?_c3.y:_c3.offsetTop;
window.scrollTo(x,y);
},getStyle:function(_c5,_c6){
_c5=$(_c5);
var _c7=_c5.style[_c6.camelize()];
if(!_c7){
if(document.defaultView&&document.defaultView.getComputedStyle){
var css=document.defaultView.getComputedStyle(_c5,null);
_c7=css?css.getPropertyValue(_c6):null;
}else{
if(_c5.currentStyle){
_c7=_c5.currentStyle[_c6.camelize()];
}
}
}
if(window.opera&&["left","top","right","bottom"].include(_c6)){
if(Element.getStyle(_c5,"position")=="static"){
_c7="auto";
}
}
return _c7=="auto"?null:_c7;
},setStyle:function(_c9,_ca){
_c9=$(_c9);
for(name in _ca){
_c9.style[name.camelize()]=_ca[name];
}
},getDimensions:function(_cb){
_cb=$(_cb);
if(Element.getStyle(_cb,"display")!="none"){
return {width:_cb.offsetWidth,height:_cb.offsetHeight};
}
var els=_cb.style;
var _cd=els.visibility;
var _ce=els.position;
els.visibility="hidden";
els.position="absolute";
els.display="";
var _cf=_cb.clientWidth;
var _d0=_cb.clientHeight;
els.display="none";
els.position=_ce;
els.visibility=_cd;
return {width:_cf,height:_d0};
},makePositioned:function(_d1){
_d1=$(_d1);
var pos=Element.getStyle(_d1,"position");
if(pos=="static"||!pos){
_d1._madePositioned=true;
_d1.style.position="relative";
if(window.opera){
_d1.style.top=0;
_d1.style.left=0;
}
}
},undoPositioned:function(_d3){
_d3=$(_d3);
if(_d3._madePositioned){
_d3._madePositioned=undefined;
_d3.style.position=_d3.style.top=_d3.style.left=_d3.style.bottom=_d3.style.right="";
}
},makeClipping:function(_d4){
_d4=$(_d4);
if(_d4._overflow){
return;
}
_d4._overflow=_d4.style.overflow;
if((Element.getStyle(_d4,"overflow")||"visible")!="hidden"){
_d4.style.overflow="hidden";
}
},undoClipping:function(_d5){
_d5=$(_d5);
if(_d5._overflow){
return;
}
_d5.style.overflow=_d5._overflow;
_d5._overflow=undefined;
}});
var Toggle=new Object();
Toggle.display=Element.toggle;
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,element:function(_d6){
return _d6.target||_d6.srcElement;
},isLeftClick:function(_d7){
return (((_d7.which)&&(_d7.which==1))||((_d7.button)&&(_d7.button==1)));
},pointerX:function(_d8){
return _d8.pageX||(_d8.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft));
},pointerY:function(_d9){
return _d9.pageY||(_d9.clientY+(document.documentElement.scrollTop||document.body.scrollTop));
},stop:function(_da){
if(_da.preventDefault){
_da.preventDefault();
_da.stopPropagation();
}else{
_da.returnValue=false;
_da.cancelBubble=true;
}
},findElement:function(_db,_dc){
var _dd=Event.element(_db);
while(_dd.parentNode&&(!_dd.tagName||(_dd.tagName.toUpperCase()!=_dc.toUpperCase()))){
_dd=_dd.parentNode;
}
return _dd;
},observers:false,_observeAndCache:function(_de,_df,_e0,_e1){
if(!this.observers){
this.observers=[];
}
if(_de.addEventListener){
this.observers.push([_de,_df,_e0,_e1]);
_de.addEventListener(_df,_e0,_e1);
}else{
if(_de.attachEvent){
this.observers.push([_de,_df,_e0,_e1]);
_de.attachEvent("on"+_df,_e0);
}
}
},unloadCache:function(){
if(!Event.observers){
return;
}
for(var i=0;i<Event.observers.length;i++){
Event.stopObserving.apply(this,Event.observers[i]);
Event.observers[i][0]=null;
}
Event.observers=false;
},observe:function(_e3,_e4,_e5,_e6){
var _e3=$(_e3);
_e6=_e6||false;
if(_e4=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||_e3.attachEvent)){
_e4="keydown";
}
this._observeAndCache(_e3,_e4,_e5,_e6);
},stopObserving:function(_e7,_e8,_e9,_ea){
var _e7=$(_e7);
_ea=_ea||false;
if(_e8=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||_e7.detachEvent)){
_e8="keydown";
}
if(_e7.removeEventListener){
_e7.removeEventListener(_e8,_e9,_ea);
}else{
if(_e7.detachEvent){
_e7.detachEvent("on"+_e8,_e9);
}
}
}});
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(_eb){
var _ec=0,valueL=0;
do{
_ec+=_eb.scrollTop||0;
valueL+=_eb.scrollLeft||0;
_eb=_eb.parentNode;
}while(_eb);
return [valueL,_ec];
},cumulativeOffset:function(_ed){
var _ee=0,valueL=0;
do{
_ee+=_ed.offsetTop||0;
valueL+=_ed.offsetLeft||0;
_ed=_ed.offsetParent;
}while(_ed);
return [valueL,_ee];
},positionedOffset:function(_ef){
var _f0=0,valueL=0;
do{
_f0+=_ef.offsetTop||0;
valueL+=_ef.offsetLeft||0;
_ef=_ef.offsetParent;
if(_ef){
p=Element.getStyle(_ef,"position");
if(p=="relative"||p=="absolute"){
break;
}
}
}while(_ef);
return [valueL,_f0];
},offsetParent:function(_f1){
if(_f1.offsetParent){
return _f1.offsetParent;
}
if(_f1==document.body){
return _f1;
}
while((_f1=_f1.parentNode)&&_f1!=document.body){
if(Element.getStyle(_f1,"position")!="static"){
return _f1;
}
}
return document.body;
},within:function(_f2,x,y){
if(this.includeScrollOffsets){
return this.withinIncludingScrolloffsets(_f2,x,y);
}
this.xcomp=x;
this.ycomp=y;
this.offset=this.cumulativeOffset(_f2);
return (y>=this.offset[1]&&y<this.offset[1]+_f2.offsetHeight&&x>=this.offset[0]&&x<this.offset[0]+_f2.offsetWidth);
},withinIncludingScrolloffsets:function(_f5,x,y){
var _f8=this.realOffset(_f5);
this.xcomp=x+_f8[0]-this.deltaX;
this.ycomp=y+_f8[1]-this.deltaY;
this.offset=this.cumulativeOffset(_f5);
return (this.ycomp>=this.offset[1]&&this.ycomp<this.offset[1]+_f5.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+_f5.offsetWidth);
},overlap:function(_f9,_fa){
if(!_f9){
return 0;
}
if(_f9=="vertical"){
return ((this.offset[1]+_fa.offsetHeight)-this.ycomp)/_fa.offsetHeight;
}
if(_f9=="horizontal"){
return ((this.offset[0]+_fa.offsetWidth)-this.xcomp)/_fa.offsetWidth;
}
},clone:function(_fb,_fc){
_fb=$(_fb);
_fc=$(_fc);
_fc.style.position="absolute";
var _fd=this.cumulativeOffset(_fb);
_fc.style.top=_fd[1]+"px";
_fc.style.left=_fd[0]+"px";
_fc.style.width=_fb.offsetWidth+"px";
_fc.style.height=_fb.offsetHeight+"px";
},page:function(_fe){
var _ff=0,valueL=0;
var _100=_fe;
do{
_ff+=_100.offsetTop||0;
valueL+=_100.offsetLeft||0;
if(_100.offsetParent==document.body){
if(Element.getStyle(_100,"position")=="absolute"){
break;
}
}
}while(_100=_100.offsetParent);
_100=_fe;
do{
_ff-=_100.scrollTop||0;
valueL-=_100.scrollLeft||0;
}while(_100=_100.parentNode);
return [valueL,_ff];
},clone:function(_101,_102){
var _103=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},arguments[2]||{});
_101=$(_101);
var p=Position.page(_101);
_102=$(_102);
var _105=[0,0];
var _106=null;
if(Element.getStyle(_102,"position")=="absolute"){
_106=Position.offsetParent(_102);
_105=Position.page(_106);
}
if(_106==document.body){
_105[0]-=document.body.offsetLeft;
_105[1]-=document.body.offsetTop;
}
if(_103.setLeft){
_102.style.left=(p[0]-_105[0]+_103.offsetLeft)+"px";
}
if(_103.setTop){
_102.style.top=(p[1]-_105[1]+_103.offsetTop)+"px";
}
if(_103.setWidth){
_102.style.width=_101.offsetWidth+"px";
}
if(_103.setHeight){
_102.style.height=_101.offsetHeight+"px";
}
},absolutize:function(_107){
_107=$(_107);
if(_107.style.position=="absolute"){
return;
}
Position.prepare();
var _108=Position.positionedOffset(_107);
var top=_108[1];
var left=_108[0];
var _10b=_107.clientWidth;
var _10c=_107.clientHeight;
_107._originalLeft=left-parseFloat(_107.style.left||0);
_107._originalTop=top-parseFloat(_107.style.top||0);
_107._originalWidth=_107.style.width;
_107._originalHeight=_107.style.height;
_107.style.position="absolute";
_107.style.top=top+"px";
_107.style.left=left+"px";
_107.style.width=_10b+"px";
_107.style.height=_10c+"px";
},relativize:function(_10d){
_10d=$(_10d);
if(_10d.style.position=="relative"){
return;
}
Position.prepare();
_10d.style.position="relative";
var top=parseFloat(_10d.style.top||0)-(_10d._originalTop||0);
var left=parseFloat(_10d.style.left||0)-(_10d._originalLeft||0);
_10d.style.top=top+"px";
_10d.style.left=left+"px";
_10d.style.height=_10d._originalHeight;
_10d.style.width=_10d._originalWidth;
}};
if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)){
Position.cumulativeOffset=function(_110){
var _111=0,valueL=0;
do{
_111+=_110.offsetTop||0;
valueL+=_110.offsetLeft||0;
if(_110.offsetParent==document.body){
if(Element.getStyle(_110,"position")=="absolute"){
break;
}
}
_110=_110.offsetParent;
}while(_110);
return [valueL,_111];
};
}

