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 Abstract=new Object();
Object.extend=function(_2,_3){
for(var _4 in _3){
_2[_4]=_3[_4];
}
return _2;
};
Object.extend(Object,{inspect:function(_5){
try{
if(_5===undefined){
return "undefined";
}
if(_5===null){
return "null";
}
return _5.inspect?_5.inspect():_5.toString();
}
catch(e){
if(e instanceof RangeError){
return "...";
}
throw e;
}
},keys:function(_6){
var _7=[];
for(var _8 in _6){
_7.push(_8);
}
return _7;
},values:function(_9){
var _a=[];
for(var _b in _9){
_a.push(_9[_b]);
}
return _a;
},clone:function(_c){
return Object.extend({},_c);
}});
Function.prototype.bind=function(){
var _d=this,args=$A(arguments),object=args.shift();
return function(){
return _d.apply(object,args.concat($A(arguments)));
};
};
Function.prototype.bindAsEventListener=function(_e){
var _f=this,args=$A(arguments),_e=args.shift();
return function(_10){
return _f.apply(_e,[(_10||window.event)].concat(args).concat($A(arguments)));
};
};
Object.extend(Number.prototype,{toColorPart:function(){
var _11=this.toString(16);
if(this<16){
return "0"+_11;
}
return _11;
},succ:function(){
return this+1;
},times:function(_12){
$R(0,this,true).each(_12);
return this;
}});
var Try={these:function(){
var _13;
for(var i=0,length=arguments.length;i<length;i++){
var _15=arguments[i];
try{
_13=_15();
break;
}
catch(e){
}
}
return _13;
}};
String.interpret=function(_16){
return _16==null?"":String(_16);
};
Object.extend(String.prototype,{gsub:function(_17,_18){
var _19="",source=this,match;
_18=arguments.callee.prepareReplacement(_18);
while(source.length>0){
if(match=source.match(_17)){
_19+=source.slice(0,match.index);
_19+=String.interpret(_18(match));
source=source.slice(match.index+match[0].length);
}else{
_19+=source,source="";
}
}
return _19;
},sub:function(_1a,_1b,_1c){
_1b=this.gsub.prepareReplacement(_1b);
_1c=_1c===undefined?1:_1c;
return this.gsub(_1a,function(_1d){
if(--_1c<0){
return _1d[0];
}
return _1b(_1d);
});
},scan:function(_1e,_1f){
this.gsub(_1e,_1f);
return this;
},truncate:function(_20,_21){
_20=_20||30;
_21=_21===undefined?"...":_21;
return this.length>_20?this.slice(0,_20-_21.length)+_21: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 _22=new RegExp(Prototype.ScriptFragment,"img");
var _23=new RegExp(Prototype.ScriptFragment,"im");
return (this.match(_22)||[]).map(function(_24){
return (_24.match(_23)||["",""])[1];
});
},evalScripts:function(){
return this.extractScripts().map(function(_25){
return eval(_25);
});
},escapeHTML:function(){
var div=document.createElement("div");
var _27=document.createTextNode(this);
div.appendChild(_27);
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(_29,_2a){
return _29+_2a.nodeValue;
}):div.childNodes[0].nodeValue):"";
},toQueryParams:function(_2b){
var _2c=this.strip().match(/([^?#]*)(#.*)?$/);
if(!_2c){
return {};
}
return _2c[1].split(_2b||"&").inject({},function(_2d,_2e){
if((_2e=_2e.split("="))[0]){
var _2f=decodeURIComponent(_2e[0]);
var _30=_2e[1]?decodeURIComponent(_2e[1]):undefined;
if(_2d[_2f]!==undefined){
if(_2d[_2f].constructor!=Array){
_2d[_2f]=[_2d[_2f]];
}
if(_30){
_2d[_2f].push(_30);
}
}else{
_2d[_2f]=_30;
}
}
return _2d;
});
},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 _31=this.split("-"),len=_31.length;
if(len==1){
return _31[0];
}
var _32=this.charAt(0)=="-"?_31[0].charAt(0).toUpperCase()+_31[0].substring(1):_31[0];
for(var i=1;i<len;i++){
_32+=_31[i].charAt(0).toUpperCase()+_31[i].substring(1);
}
return _32;
},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(_34){
var _35=this.replace(/\\/g,"\\\\");
if(_34){
return "\""+_35.replace(/"/g,"\\\"")+"\"";
}else{
return "'"+_35.replace(/'/g,"\\'")+"'";
}
}});
String.prototype.gsub.prepareReplacement=function(_36){
if(typeof _36=="function"){
return _36;
}
var _37=new Template(_36);
return function(_38){
return _37.evaluate(_38);
};
};
String.prototype.parseQuery=String.prototype.toQueryParams;
var Template=Class.create();
Template.Pattern=/(^|.|\r|\n)(#\{(.*?)\})/;
Template.prototype={initialize:function(_39,_3a){
this.template=_39.toString();
this.pattern=_3a||Template.Pattern;
},evaluate:function(_3b){
return this.template.gsub(this.pattern,function(_3c){
var _3d=_3c[1];
if(_3d=="\\"){
return _3c[2];
}
return _3d+String.interpret(_3b[_3c[3]]);
});
}};
var $break=new Object();
var $continue=new Object();
var Enumerable={each:function(_3e){
var _3f=0;
try{
this._each(function(_40){
try{
_3e(_40,_3f++);
}
catch(e){
if(e!=$continue){
throw e;
}
}
});
}
catch(e){
if(e!=$break){
throw e;
}
}
return this;
},eachSlice:function(_41,_42){
var _43=-_41,slices=[],array=this.toArray();
while((_43+=_41)<array.length){
slices.push(array.slice(_43,_43+_41));
}
return slices.map(_42);
},all:function(_44){
var _45=true;
this.each(function(_46,_47){
_45=_45&&!!(_44||Prototype.K)(_46,_47);
if(!_45){
throw $break;
}
});
return _45;
},any:function(_48){
var _49=false;
this.each(function(_4a,_4b){
if(_49=!!(_48||Prototype.K)(_4a,_4b)){
throw $break;
}
});
return _49;
},collect:function(_4c){
var _4d=[];
this.each(function(_4e,_4f){
_4d.push((_4c||Prototype.K)(_4e,_4f));
});
return _4d;
},detect:function(_50){
var _51;
this.each(function(_52,_53){
if(_50(_52,_53)){
_51=_52;
throw $break;
}
});
return _51;
},findAll:function(_54){
var _55=[];
this.each(function(_56,_57){
if(_54(_56,_57)){
_55.push(_56);
}
});
return _55;
},grep:function(_58,_59){
var _5a=[];
this.each(function(_5b,_5c){
var _5d=_5b.toString();
if(_5d.match(_58)){
_5a.push((_59||Prototype.K)(_5b,_5c));
}
});
return _5a;
},include:function(_5e){
var _5f=false;
this.each(function(_60){
if(_60==_5e){
_5f=true;
throw $break;
}
});
return _5f;
},inGroupsOf:function(_61,_62){
_62=_62===undefined?null:_62;
return this.eachSlice(_61,function(_63){
while(_63.length<_61){
_63.push(_62);
}
return _63;
});
},inject:function(_64,_65){
this.each(function(_66,_67){
_64=_65(_64,_66,_67);
});
return _64;
},invoke:function(_68){
var _69=$A(arguments).slice(1);
return this.map(function(_6a){
return _6a[_68].apply(_6a,_69);
});
},max:function(_6b){
var _6c;
this.each(function(_6d,_6e){
_6d=(_6b||Prototype.K)(_6d,_6e);
if(_6c==undefined||_6d>=_6c){
_6c=_6d;
}
});
return _6c;
},min:function(_6f){
var _70;
this.each(function(_71,_72){
_71=(_6f||Prototype.K)(_71,_72);
if(_70==undefined||_71<_70){
_70=_71;
}
});
return _70;
},partition:function(_73){
var _74=[],falses=[];
this.each(function(_75,_76){
((_73||Prototype.K)(_75,_76)?_74:falses).push(_75);
});
return [_74,falses];
},pluck:function(_77){
var _78=[];
this.each(function(_79,_7a){
_78.push(_79[_77]);
});
return _78;
},reject:function(_7b){
var _7c=[];
this.each(function(_7d,_7e){
if(!_7b(_7d,_7e)){
_7c.push(_7d);
}
});
return _7c;
},sortBy:function(_7f){
return this.map(function(_80,_81){
return {value:_80,criteria:_7f(_80,_81)};
}).sort(function(_82,_83){
var a=_82.criteria,b=_83.criteria;
return a<b?-1:a>b?1:0;
}).pluck("value");
},toArray:function(){
return this.map();
},zip:function(){
var _85=Prototype.K,args=$A(arguments);
if(typeof args.last()=="function"){
_85=args.pop();
}
var _86=[this].concat(args).map($A);
return this.map(function(_87,_88){
return _85(_86.pluck(_88));
});
},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});
var $A=Array.from=function(_89){
if(!_89){
return [];
}
if(_89.toArray){
return _89.toArray();
}else{
var _8a=[];
for(var i=0,length=_89.length;i<length;i++){
_8a.push(_89[i]);
}
return _8a;
}
};
Object.extend(Array.prototype,Enumerable);
if(!Array.prototype._reverse){
Array.prototype._reverse=Array.prototype.reverse;
}
Object.extend(Array.prototype,{_each:function(_8c){
for(var i=0,length=this.length;i<length;i++){
_8c(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(_8e){
return _8e!=null;
});
},flatten:function(){
return this.inject([],function(_8f,_90){
return _8f.concat(_90&&_90.constructor==Array?_90.flatten():[_90]);
});
},without:function(){
var _91=$A(arguments);
return this.select(function(_92){
return !_91.include(_92);
});
},indexOf:function(_93){
for(var i=0,length=this.length;i<length;i++){
if(this[i]==_93){
return i;
}
}
return -1;
},reverse:function(_95){
return (_95!==false?this:this.toArray())._reverse();
},reduce:function(){
return this.length>1?this:this[0];
},uniq:function(){
return this.inject([],function(_96,_97){
return _96.include(_97)?_96:_96.concat([_97]);
});
},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(_98){
_98=_98.strip();
return _98?_98.split(/\s+/):[];
}
if(window.opera){
Array.prototype.concat=function(){
var _99=[];
for(var i=0,length=this.length;i<length;i++){
_99.push(this[i]);
}
for(var i=0,length=arguments.length;i<length;i++){
if(arguments[i].constructor==Array){
for(var j=0,arrayLength=arguments[i].length;j<arrayLength;j++){
_99.push(arguments[i][j]);
}
}else{
_99.push(arguments[i]);
}
}
return _99;
};
}
var Hash=function(obj){
Object.extend(this,obj||{});
};
Object.extend(Hash,{toQueryString:function(obj){
var _9f=[];
this.prototype._each.call(obj,function(_a0){
if(!_a0.key){
return;
}
if(_a0.value&&_a0.value.constructor==Array){
var _a1=_a0.value.compact();
if(_a1.length<2){
_a0.value=_a1.reduce();
}else{
key=encodeURIComponent(_a0.key);
_a1.each(function(_a2){
_a2=_a2!=undefined?encodeURIComponent(_a2):"";
_9f.push(key+"="+encodeURIComponent(_a2));
});
return;
}
}
if(_a0.value==undefined){
_a0[1]="";
}
_9f.push(_a0.map(encodeURIComponent).join("="));
});
return _9f.join("&");
}});
Object.extend(Hash.prototype,Enumerable);
Object.extend(Hash.prototype,{_each:function(_a3){
for(var key in this){
var _a5=this[key];
if(_a5&&_a5==Hash.prototype[key]){
continue;
}
var _a6=[key,_a5];
_a6.key=key;
_a6.value=_a5;
_a3(_a6);
}
},keys:function(){
return this.pluck("key");
},values:function(){
return this.pluck("value");
},merge:function(_a7){
return $H(_a7).inject(this,function(_a8,_a9){
_a8[_a9.key]=_a9.value;
return _a8;
});
},remove:function(){
var _aa;
for(var i=0,length=arguments.length;i<length;i++){
var _ac=this[arguments[i]];
if(_ac!==undefined){
if(_aa===undefined){
_aa=_ac;
}else{
if(_aa.constructor!=Array){
_aa=[_aa];
}
_aa.push(_ac);
}
}
delete this[arguments[i]];
}
return _aa;
},toQueryString:function(){
return Hash.toQueryString(this);
},inspect:function(){
return "#<Hash:{"+this.map(function(_ad){
return _ad.map(Object.inspect).join(": ");
}).join(", ")+"}>";
}});
function $H(_ae){
if(_ae&&_ae.constructor==Hash){
return _ae;
}
return new Hash(_ae);
}
ObjectRange=Class.create();
Object.extend(ObjectRange.prototype,Enumerable);
Object.extend(ObjectRange.prototype,{initialize:function(_af,end,_b1){
this.start=_af;
this.end=end;
this.exclusive=_b1;
},_each:function(_b2){
var _b3=this.start;
while(this.include(_b3)){
_b2(_b3);
_b3=_b3.succ();
}
},include:function(_b4){
if(_b4<this.start){
return false;
}
if(this.exclusive){
return _b4<this.end;
}
return _b4<=this.end;
}});
var $R=function(_b5,end,_b7){
return new ObjectRange(_b5,end,_b7);
};
function $(_b8){
if(arguments.length>1){
for(var i=0,elements=[],length=arguments.length;i<length;i++){
elements.push($(arguments[i]));
}
return elements;
}
if(typeof _b8=="string"){
_b8=document.getElementById(_b8);
}
return Element.extend(_b8);
}
if(Prototype.BrowserFeatures.XPath){
document._getElementsByXPath=function(_ba,_bb){
var _bc=[];
var _bd=document.evaluate(_ba,$(_bb)||document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);
for(var i=0,length=_bd.snapshotLength;i<length;i++){
_bc.push(_bd.snapshotItem(i));
}
return _bc;
};
}
document.getElementsByClassName=function(_bf,_c0){
if(Prototype.BrowserFeatures.XPath){
var q=".//*[contains(concat(' ', @class, ' '), ' "+_bf+" ')]";
return document._getElementsByXPath(q,_c0);
}else{
var _c2=($(_c0)||document.body).getElementsByTagName("*");
var _c3=[],child;
for(var i=0,length=_c2.length;i<length;i++){
child=_c2[i];
if(Element.hasClassName(child,_bf)){
_c3.push(Element.extend(child));
}
}
return _c3;
}
};
if(!window.Element){
var Element=new Object();
}
Element.extend=function(_c5){
if(!_c5||_nativeExtensions||_c5.nodeType==3){
return _c5;
}
if(!_c5._extended&&_c5.tagName&&_c5!=window){
var _c6=Object.clone(Element.Methods),cache=Element.extend.cache;
if(_c5.tagName=="FORM"){
Object.extend(_c6,Form.Methods);
}
if(["INPUT","TEXTAREA","SELECT"].include(_c5.tagName)){
Object.extend(_c6,Form.Element.Methods);
}
Object.extend(_c6,Element.Methods.Simulated);
for(var _c7 in _c6){
var _c8=_c6[_c7];
if(typeof _c8=="function"&&!(_c7 in _c5)){
_c5[_c7]=cache.findOrStore(_c8);
}
}
}
_c5._extended=true;
return _c5;
};
Element.extend.cache={findOrStore:function(_c9){
return this[_c9]=this[_c9]||function(){
return _c9.apply(null,[this].concat($A(arguments)));
};
}};
Element.Methods={visible:function(_ca){
return $(_ca).style.display!="none";
},toggle:function(_cb){
_cb=$(_cb);
Element[Element.visible(_cb)?"hide":"show"](_cb);
return _cb;
},hide:function(_cc){
$(_cc).style.display="none";
return _cc;
},show:function(_cd){
$(_cd).style.display="";
return _cd;
},remove:function(_ce){
_ce=$(_ce);
_ce.parentNode.removeChild(_ce);
return _ce;
},update:function(_cf,_d0){
_d0=typeof _d0=="undefined"?"":_d0.toString();
$(_cf).innerHTML=_d0.stripScripts();
setTimeout(function(){
_d0.evalScripts();
},10);
return _cf;
},replace:function(_d1,_d2){
_d1=$(_d1);
_d2=typeof _d2=="undefined"?"":_d2.toString();
if(_d1.outerHTML){
_d1.outerHTML=_d2.stripScripts();
}else{
var _d3=_d1.ownerDocument.createRange();
_d3.selectNodeContents(_d1);
_d1.parentNode.replaceChild(_d3.createContextualFragment(_d2.stripScripts()),_d1);
}
setTimeout(function(){
_d2.evalScripts();
},10);
return _d1;
},inspect:function(_d4){
_d4=$(_d4);
var _d5="<"+_d4.tagName.toLowerCase();
$H({"id":"id","className":"class"}).each(function(_d6){
var _d7=_d6.first(),attribute=_d6.last();
var _d8=(_d4[_d7]||"").toString();
if(_d8){
_d5+=" "+attribute+"="+_d8.inspect(true);
}
});
return _d5+">";
},recursivelyCollect:function(_d9,_da){
_d9=$(_d9);
var _db=[];
while(_d9=_d9[_da]){
if(_d9.nodeType==1){
_db.push(Element.extend(_d9));
}
}
return _db;
},ancestors:function(_dc){
return $(_dc).recursivelyCollect("parentNode");
},descendants:function(_dd){
return $A($(_dd).getElementsByTagName("*"));
},immediateDescendants:function(_de){
if(!(_de=$(_de).firstChild)){
return [];
}
while(_de&&_de.nodeType!=1){
_de=_de.nextSibling;
}
if(_de){
return [_de].concat($(_de).nextSiblings());
}
return [];
},previousSiblings:function(_df){
return $(_df).recursivelyCollect("previousSibling");
},nextSiblings:function(_e0){
return $(_e0).recursivelyCollect("nextSibling");
},siblings:function(_e1){
_e1=$(_e1);
return _e1.previousSiblings().reverse().concat(_e1.nextSiblings());
},match:function(_e2,_e3){
if(typeof _e3=="string"){
_e3=new Selector(_e3);
}
return _e3.match($(_e2));
},up:function(_e4,_e5,_e6){
return Selector.findElement($(_e4).ancestors(),_e5,_e6);
},down:function(_e7,_e8,_e9){
return Selector.findElement($(_e7).descendants(),_e8,_e9);
},previous:function(_ea,_eb,_ec){
return Selector.findElement($(_ea).previousSiblings(),_eb,_ec);
},next:function(_ed,_ee,_ef){
return Selector.findElement($(_ed).nextSiblings(),_ee,_ef);
},getElementsBySelector:function(){
var _f0=$A(arguments),element=$(_f0.shift());
return Selector.findChildElements(element,_f0);
},getElementsByClassName:function(_f1,_f2){
return document.getElementsByClassName(_f2,_f1);
},readAttribute:function(_f3,_f4){
_f3=$(_f3);
if(document.all&&!window.opera){
var t=Element._attributeTranslations;
if(t.values[_f4]){
return t.values[_f4](_f3,_f4);
}
if(t.names[_f4]){
_f4=t.names[_f4];
}
var _f6=_f3.attributes[_f4];
if(_f6){
return _f6.nodeValue;
}
}
return _f3.getAttribute(_f4);
},getHeight:function(_f7){
return $(_f7).getDimensions().height;
},getWidth:function(_f8){
return $(_f8).getDimensions().width;
},classNames:function(_f9){
return new Element.ClassNames(_f9);
},hasClassName:function(_fa,_fb){
if(!(_fa=$(_fa))){
return;
}
var _fc=_fa.className;
if(_fc.length==0){
return false;
}
if(_fc==_fb||_fc.match(new RegExp("(^|\\s)"+_fb+"(\\s|$)"))){
return true;
}
return false;
},addClassName:function(_fd,_fe){
if(!(_fd=$(_fd))){
return;
}
Element.classNames(_fd).add(_fe);
return _fd;
},removeClassName:function(_ff,_100){
if(!(_ff=$(_ff))){
return;
}
Element.classNames(_ff).remove(_100);
return _ff;
},toggleClassName:function(_101,_102){
if(!(_101=$(_101))){
return;
}
Element.classNames(_101)[_101.hasClassName(_102)?"remove":"add"](_102);
return _101;
},observe:function(){
Event.observe.apply(Event,arguments);
return $A(arguments).first();
},stopObserving:function(){
Event.stopObserving.apply(Event,arguments);
return $A(arguments).first();
},cleanWhitespace:function(_103){
_103=$(_103);
var node=_103.firstChild;
while(node){
var _105=node.nextSibling;
if(node.nodeType==3&&!/\S/.test(node.nodeValue)){
_103.removeChild(node);
}
node=_105;
}
return _103;
},empty:function(_106){
return $(_106).innerHTML.match(/^\s*$/);
},descendantOf:function(_107,_108){
_107=$(_107),_108=$(_108);
while(_107=_107.parentNode){
if(_107==_108){
return true;
}
}
return false;
},scrollTo:function(_109){
_109=$(_109);
var pos=Position.cumulativeOffset(_109);
window.scrollTo(pos[0],pos[1]);
return _109;
},getStyle:function(_10b,_10c){
_10b=$(_10b);
if(["float","cssFloat"].include(_10c)){
_10c=(typeof _10b.style.styleFloat!="undefined"?"styleFloat":"cssFloat");
}
_10c=_10c.camelize();
var _10d=_10b.style[_10c];
if(!_10d){
if(document.defaultView&&document.defaultView.getComputedStyle){
var css=document.defaultView.getComputedStyle(_10b,null);
_10d=css?css[_10c]:null;
}else{
if(_10b.currentStyle){
_10d=_10b.currentStyle[_10c];
}
}
}
if((_10d=="auto")&&["width","height"].include(_10c)&&(_10b.getStyle("display")!="none")){
_10d=_10b["offset"+_10c.capitalize()]+"px";
}
if(window.opera&&["left","top","right","bottom"].include(_10c)){
if(Element.getStyle(_10b,"position")=="static"){
_10d="auto";
}
}
if(_10c=="opacity"){
if(_10d){
return parseFloat(_10d);
}
if(_10d=(_10b.getStyle("filter")||"").match(/alpha\(opacity=(.*)\)/)){
if(_10d[1]){
return parseFloat(_10d[1])/100;
}
}
return 1;
}
return _10d=="auto"?null:_10d;
},setStyle:function(_10f,_110){
_10f=$(_10f);
for(var name in _110){
var _112=_110[name];
if(name=="opacity"){
if(_112==1){
_112=(/Gecko/.test(navigator.userAgent)&&!/Konqueror|Safari|KHTML/.test(navigator.userAgent))?0.999999:1;
if(/MSIE/.test(navigator.userAgent)&&!window.opera){
_10f.style.filter=_10f.getStyle("filter").replace(/alpha\([^\)]*\)/gi,"");
}
}else{
if(_112==""){
if(/MSIE/.test(navigator.userAgent)&&!window.opera){
_10f.style.filter=_10f.getStyle("filter").replace(/alpha\([^\)]*\)/gi,"");
}
}else{
if(_112<0.00001){
_112=0;
}
if(/MSIE/.test(navigator.userAgent)&&!window.opera){
_10f.style.filter=_10f.getStyle("filter").replace(/alpha\([^\)]*\)/gi,"")+"alpha(opacity="+_112*100+")";
}
}
}
}else{
if(["float","cssFloat"].include(name)){
name=(typeof _10f.style.styleFloat!="undefined")?"styleFloat":"cssFloat";
}
}
_10f.style[name.camelize()]=_112;
}
return _10f;
},getDimensions:function(_113){
_113=$(_113);
var _114=$(_113).getStyle("display");
if(_114!="none"&&_114!=null){
return {width:_113.offsetWidth,height:_113.offsetHeight};
}
var els=_113.style;
var _116=els.visibility;
var _117=els.position;
var _118=els.display;
els.visibility="hidden";
els.position="absolute";
els.display="block";
var _119=_113.clientWidth;
var _11a=_113.clientHeight;
els.display=_118;
els.position=_117;
els.visibility=_116;
return {width:_119,height:_11a};
},makePositioned:function(_11b){
_11b=$(_11b);
var pos=Element.getStyle(_11b,"position");
if(pos=="static"||!pos){
_11b._madePositioned=true;
_11b.style.position="relative";
if(window.opera){
_11b.style.top=0;
_11b.style.left=0;
}
}
return _11b;
},undoPositioned:function(_11d){
_11d=$(_11d);
if(_11d._madePositioned){
_11d._madePositioned=undefined;
_11d.style.position=_11d.style.top=_11d.style.left=_11d.style.bottom=_11d.style.right="";
}
return _11d;
},makeClipping:function(_11e){
_11e=$(_11e);
if(_11e._overflow){
return _11e;
}
_11e._overflow=_11e.style.overflow||"auto";
if((Element.getStyle(_11e,"overflow")||"visible")!="hidden"){
_11e.style.overflow="hidden";
}
return _11e;
},undoClipping:function(_11f){
_11f=$(_11f);
if(!_11f._overflow){
return _11f;
}
_11f.style.overflow=_11f._overflow=="auto"?"":_11f._overflow;
_11f._overflow=null;
return _11f;
}};
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(_120,_121){
return _120.getAttribute(_121,2);
},_flag:function(_122,_123){
return $(_122).hasAttribute(_123)?_123:null;
},style:function(_124){
return _124.style.cssText.toLowerCase();
},title:function(_125){
var node=_125.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(_127,_128){
var t=Element._attributeTranslations;
_128=t.names[_128]||_128;
return $(_127).getAttributeNode(_128).specified;
}};
if(document.all&&!window.opera){
Element.Methods.update=function(_12a,html){
_12a=$(_12a);
html=typeof html=="undefined"?"":html.toString();
var _12c=_12a.tagName.toUpperCase();
if(["THEAD","TBODY","TR","TD"].include(_12c)){
var div=document.createElement("div");
switch(_12c){
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(_12a.childNodes).each(function(node){
_12a.removeChild(node);
});
depth.times(function(){
div=div.firstChild;
});
$A(div.childNodes).each(function(node){
_12a.appendChild(node);
});
}else{
_12a.innerHTML=html.stripScripts();
}
setTimeout(function(){
html.evalScripts();
},10);
return _12a;
};
}
Object.extend(Element,Element.Methods);
var _nativeExtensions=false;
if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)){
["","Form","Input","TextArea","Select"].each(function(tag){
var _131="HTML"+tag+"Element";
if(window[_131]){
return;
}
var _132=window[_131]={};
_132.prototype=document.createElement(tag?tag.toLowerCase():"div").__proto__;
});
}
Element.addMethods=function(_133){
Object.extend(Element.Methods,_133||{});
function copy(_134,_135,_136){
_136=_136||false;
var _137=Element.extend.cache;
for(var _138 in _134){
var _139=_134[_138];
if(!_136||!(_138 in _135)){
_135[_138]=_137.findOrStore(_139);
}
}
}
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(_13a){
copy(Form.Element.Methods,_13a.prototype);
});
_nativeExtensions=true;
}
};
var Toggle=new Object();
Toggle.display=Element.toggle;
Abstract.Insertion=function(_13b){
this.adjacency=_13b;
};
Abstract.Insertion.prototype={initialize:function(_13c,_13d){
this.element=$(_13c);
this.content=_13d.stripScripts();
if(this.adjacency&&this.element.insertAdjacentHTML){
try{
this.element.insertAdjacentHTML(this.adjacency,this.content);
}
catch(e){
var _13e=this.element.tagName.toUpperCase();
if(["TBODY","TR"].include(_13e)){
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(){
_13d.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(_140){
_140.each((function(_141){
this.element.parentNode.insertBefore(_141,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(_142){
_142.reverse(false).each((function(_143){
this.element.insertBefore(_143,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(_144){
_144.each((function(_145){
this.element.appendChild(_145);
}).bind(this));
}});
Insertion.After=Class.create();
Insertion.After.prototype=Object.extend(new Abstract.Insertion("afterEnd"),{initializeRange:function(){
this.range.setStartAfter(this.element);
},insertContent:function(_146){
_146.each((function(_147){
this.element.parentNode.insertBefore(_147,this.element.nextSibling);
}).bind(this));
}});
Element.ClassNames=Class.create();
Element.ClassNames.prototype={initialize:function(_148){
this.element=$(_148);
},_each:function(_149){
this.element.className.split(/\s+/).select(function(name){
return name.length>0;
})._each(_149);
},set:function(_14b){
this.element.className=_14b;
},add:function(_14c){
if(this.include(_14c)){
return;
}
this.set($A(this).concat(_14c).join(" "));
},remove:function(_14d){
if(!this.include(_14d)){
return;
}
this.set($A(this).without(_14d).join(" "));
},toString:function(){
return $A(this).join(" ");
}};
Object.extend(Element.ClassNames.prototype,Enumerable);
var Selector=Class.create();
Selector.prototype={initialize:function(_14e){
this.params={classNames:[]};
this.expression=_14e.toString().strip();
this.parseExpression();
this.compileMatcher();
},parseExpression:function(){
function abort(_14f){
throw "Parse error in selector: "+_14f;
}
if(this.expression==""){
abort("empty expression");
}
var _150=this.params,expr=this.expression,match,modifier,clause,rest;
while(match=expr.match(/^(.*)\[([a-z0-9_:-]+?)(?:([~\|!]?=)(?:"([^"]*)"|([^\]\s]*)))?\]$/i)){
_150.attributes=_150.attributes||[];
_150.attributes.push({name:match[2],operator:match[3],value:match[4]||match[5]||""});
expr=match[1];
}
if(expr=="*"){
return this.params.wildcard=true;
}
while(match=expr.match(/^([^a-z0-9_-])?([a-z0-9_-]+)(.*)/i)){
modifier=match[1],clause=match[2],rest=match[3];
switch(modifier){
case "#":
_150.id=clause;
break;
case ".":
_150.classNames.push(clause);
break;
case "":
case undefined:
_150.tagName=clause.toUpperCase();
break;
default:
abort(expr.inspect());
}
expr=rest;
}
if(expr.length>0){
abort(expr.inspect());
}
},buildMatchExpression:function(){
var _151=this.params,conditions=[],clause;
if(_151.wildcard){
conditions.push("true");
}
if(clause=_151.id){
conditions.push("element.readAttribute(\"id\") == "+clause.inspect());
}
if(clause=_151.tagName){
conditions.push("element.tagName.toUpperCase() == "+clause.inspect());
}
if((clause=_151.classNames).length>0){
for(var i=0,length=clause.length;i<length;i++){
conditions.push("element.hasClassName("+clause[i].inspect()+")");
}
}
if(clause=_151.attributes){
clause.each(function(_153){
var _154="element.readAttribute("+_153.name.inspect()+")";
var _155=function(_156){
return _154+" && "+_154+".split("+_156.inspect()+")";
};
switch(_153.operator){
case "=":
conditions.push(_154+" == "+_153.value.inspect());
break;
case "~=":
conditions.push(_155(" ")+".include("+_153.value.inspect()+")");
break;
case "|=":
conditions.push(_155("-")+".first().toUpperCase() == "+_153.value.toUpperCase().inspect());
break;
case "!=":
conditions.push(_154+" != "+_153.value.inspect());
break;
case "":
case undefined:
conditions.push("element.hasAttribute("+_153.name.inspect()+")");
break;
default:
throw "Unknown operator "+_153.operator+" in selector";
}
});
}
return conditions.join(" && ");
},compileMatcher:function(){
this.match=new Function("element","if (!element.tagName) return false;       element = $(element);       return "+this.buildMatchExpression());
},findElements:function(_157){
var _158;
if(_158=$(this.params.id)){
if(this.match(_158)){
if(!_157||Element.childOf(_158,_157)){
return [_158];
}
}
}
_157=(_157||document).getElementsByTagName(this.params.tagName||"*");
var _159=[];
for(var i=0,length=_157.length;i<length;i++){
if(this.match(_158=_157[i])){
_159.push(Element.extend(_158));
}
}
return _159;
},toString:function(){
return this.expression;
}};
Object.extend(Selector,{matchElements:function(_15b,_15c){
var _15d=new Selector(_15c);
return _15b.select(_15d.match.bind(_15d)).map(Element.extend);
},findElement:function(_15e,_15f,_160){
if(typeof _15f=="number"){
_160=_15f,_15f=false;
}
return Selector.matchElements(_15e,_15f||"*")[_160||0];
},findChildElements:function(_161,_162){
return _162.map(function(_163){
return _163.match(/[^\s"]+(?:"[^"]*"[^\s"]+)*/g).inject([null],function(_164,expr){
var _166=new Selector(expr);
return _164.inject([],function(_167,_168){
return _167.concat(_166.findElements(_168||_161));
});
});
}).flatten();
}});
function $$(){
return Selector.findChildElements(document,$A(arguments));
}
var Form={reset:function(form){
$(form).reset();
return form;
},serializeElements:function(_16a,_16b){
var data=_16a.inject({},function(_16d,_16e){
if(!_16e.disabled&&_16e.name){
var key=_16e.name,value=$(_16e).getValue();
if(value!=undefined){
if(_16d[key]){
if(_16d[key].constructor!=Array){
_16d[key]=[_16d[key]];
}
_16d[key].push(value);
}else{
_16d[key]=value;
}
}
}
return _16d;
});
return _16b?data:Hash.toQueryString(data);
}};
Form.Methods={serialize:function(form,_171){
return Form.serializeElements(Form.getElements(form),_171);
},getElements:function(form){
return $A($(form).getElementsByTagName("*")).inject([],function(_173,_174){
if(Form.Element.Serializers[_174.tagName.toLowerCase()]){
_173.push(Element.extend(_174));
}
return _173;
});
},getInputs:function(form,_176,name){
form=$(form);
var _178=form.getElementsByTagName("input");
if(!_176&&!name){
return $A(_178).map(Element.extend);
}
for(var i=0,matchingInputs=[],length=_178.length;i<length;i++){
var _17a=_178[i];
if((_176&&_17a.type!=_176)||(name&&_17a.name!=name)){
continue;
}
matchingInputs.push(Element.extend(_17a));
}
return matchingInputs;
},disable:function(form){
form=$(form);
form.getElements().each(function(_17c){
_17c.blur();
_17c.disabled="true";
});
return form;
},enable:function(form){
form=$(form);
form.getElements().each(function(_17e){
_17e.disabled="";
});
return form;
},findFirstElement:function(form){
return $(form).getElements().find(function(_180){
return _180.type!="hidden"&&!_180.disabled&&["input","select","textarea"].include(_180.tagName.toLowerCase());
});
},focusFirstElement:function(form){
form=$(form);
form.findFirstElement().activate();
return form;
}};
Object.extend(Form,Form.Methods);
Form.Element={focus:function(_182){
$(_182).focus();
return _182;
},select:function(_183){
$(_183).select();
return _183;
}};
Form.Element.Methods={serialize:function(_184){
_184=$(_184);
if(!_184.disabled&&_184.name){
var _185=_184.getValue();
if(_185!=undefined){
var pair={};
pair[_184.name]=_185;
return Hash.toQueryString(pair);
}
}
return "";
},getValue:function(_187){
_187=$(_187);
var _188=_187.tagName.toLowerCase();
return Form.Element.Serializers[_188](_187);
},clear:function(_189){
$(_189).value="";
return _189;
},present:function(_18a){
return $(_18a).value!="";
},activate:function(_18b){
_18b=$(_18b);
_18b.focus();
if(_18b.select&&(_18b.tagName.toLowerCase()!="input"||!["button","reset","submit"].include(_18b.type))){
_18b.select();
}
return _18b;
},disable:function(_18c){
_18c=$(_18c);
_18c.disabled=true;
return _18c;
},enable:function(_18d){
_18d=$(_18d);
_18d.blur();
_18d.disabled=false;
return _18d;
}};
Object.extend(Form.Element,Form.Element.Methods);
var Field=Form.Element;
var $F=Form.Element.getValue;
Form.Element.Serializers={input:function(_18e){
switch(_18e.type.toLowerCase()){
case "checkbox":
case "radio":
return Form.Element.Serializers.inputSelector(_18e);
default:
return Form.Element.Serializers.textarea(_18e);
}
},inputSelector:function(_18f){
return _18f.checked?_18f.value:null;
},textarea:function(_190){
return _190.value;
},select:function(_191){
return this[_191.type=="select-one"?"selectOne":"selectMany"](_191);
},selectOne:function(_192){
var _193=_192.selectedIndex;
return _193>=0?this.optionValue(_192.options[_193]):null;
},selectMany:function(_194){
var _195,length=_194.length;
if(!length){
return null;
}
for(var i=0,_195=[];i<length;i++){
var opt=_194.options[i];
if(opt.selected){
_195.push(this.optionValue(opt));
}
}
return _195;
},optionValue:function(opt){
return Element.extend(opt).hasAttribute("value")?opt.value:opt.text;
}};
Abstract.TimedObserver=function(){
};
Abstract.TimedObserver.prototype={initialize:function(_199,_19a,_19b){
this.frequency=_19a;
this.element=$(_199);
this.callback=_19b;
this.lastValue=this.getValue();
this.registerCallback();
},registerCallback:function(){
setInterval(this.onTimerEvent.bind(this),this.frequency*1000);
},onTimerEvent:function(){
var _19c=this.getValue();
var _19d=("string"==typeof this.lastValue&&"string"==typeof _19c?this.lastValue!=_19c:String(this.lastValue)!=String(_19c));
if(_19d){
this.callback(this.element,_19c);
this.lastValue=_19c;
}
}};
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(_19e,_19f){
this.element=$(_19e);
this.callback=_19f;
this.lastValue=this.getValue();
if(this.element.tagName.toLowerCase()=="form"){
this.registerFormCallbacks();
}else{
this.registerCallback(this.element);
}
},onElementEvent:function(){
var _1a0=this.getValue();
if(this.lastValue!=_1a0){
this.callback(this.element,_1a0);
this.lastValue=_1a0;
}
},registerFormCallbacks:function(){
Form.getElements(this.element).each(this.registerCallback.bind(this));
},registerCallback:function(_1a1){
if(_1a1.type){
switch(_1a1.type.toLowerCase()){
case "checkbox":
case "radio":
Event.observe(_1a1,"click",this.onElementEvent.bind(this));
break;
default:
Event.observe(_1a1,"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(_1a2){
return _1a2.target||_1a2.srcElement;
},isLeftClick:function(_1a3){
return (((_1a3.which)&&(_1a3.which==1))||((_1a3.button)&&(_1a3.button==1)));
},pointerX:function(_1a4){
return _1a4.pageX||(_1a4.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft));
},pointerY:function(_1a5){
return _1a5.pageY||(_1a5.clientY+(document.documentElement.scrollTop||document.body.scrollTop));
},stop:function(_1a6){
if(_1a6.preventDefault){
_1a6.preventDefault();
_1a6.stopPropagation();
}else{
_1a6.returnValue=false;
_1a6.cancelBubble=true;
}
},findElement:function(_1a7,_1a8){
var _1a9=Event.element(_1a7);
while(_1a9.parentNode&&(!_1a9.tagName||(_1a9.tagName.toUpperCase()!=_1a8.toUpperCase()))){
_1a9=_1a9.parentNode;
}
return _1a9;
},observers:false,_observeAndCache:function(_1aa,name,_1ac,_1ad){
if(!this.observers){
this.observers=[];
}
if(_1aa.addEventListener){
this.observers.push([_1aa,name,_1ac,_1ad]);
_1aa.addEventListener(name,_1ac,_1ad);
}else{
if(_1aa.attachEvent){
this.observers.push([_1aa,name,_1ac,_1ad]);
_1aa.attachEvent("on"+name,_1ac);
}
}
},unloadCache:function(){
if(!Event.observers){
return;
}
for(var i=0,length=Event.observers.length;i<length;i++){
Event.stopObserving.apply(this,Event.observers[i]);
Event.observers[i][0]=null;
}
Event.observers=false;
},observe:function(_1af,name,_1b1,_1b2){
_1af=$(_1af);
_1b2=_1b2||false;
if(name=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||_1af.attachEvent)){
name="keydown";
}
Event._observeAndCache(_1af,name,_1b1,_1b2);
},stopObserving:function(_1b3,name,_1b5,_1b6){
_1b3=$(_1b3);
_1b6=_1b6||false;
if(name=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||_1b3.detachEvent)){
name="keydown";
}
if(_1b3.removeEventListener){
_1b3.removeEventListener(name,_1b5,_1b6);
}else{
if(_1b3.detachEvent){
try{
_1b3.detachEvent("on"+name,_1b5);
}
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(_1b7){
var _1b8=0,valueL=0;
do{
_1b8+=_1b7.scrollTop||0;
valueL+=_1b7.scrollLeft||0;
_1b7=_1b7.parentNode;
}while(_1b7);
return [valueL,_1b8];
},cumulativeOffset:function(_1b9){
var _1ba=0,valueL=0;
do{
_1ba+=_1b9.offsetTop||0;
valueL+=_1b9.offsetLeft||0;
_1b9=_1b9.offsetParent;
}while(_1b9);
return [valueL,_1ba];
},positionedOffset:function(_1bb){
var _1bc=0,valueL=0;
do{
_1bc+=_1bb.offsetTop||0;
valueL+=_1bb.offsetLeft||0;
_1bb=_1bb.offsetParent;
if(_1bb){
if(_1bb.tagName=="BODY"){
break;
}
var p=Element.getStyle(_1bb,"position");
if(p=="relative"||p=="absolute"){
break;
}
}
}while(_1bb);
return [valueL,_1bc];
},offsetParent:function(_1be){
if(_1be.offsetParent){
return _1be.offsetParent;
}
if(_1be==document.body){
return _1be;
}
while((_1be=_1be.parentNode)&&_1be!=document.body){
if(Element.getStyle(_1be,"position")!="static"){
return _1be;
}
}
return document.body;
},within:function(_1bf,x,y){
if(this.includeScrollOffsets){
return this.withinIncludingScrolloffsets(_1bf,x,y);
}
this.xcomp=x;
this.ycomp=y;
this.offset=this.cumulativeOffset(_1bf);
return (y>=this.offset[1]&&y<this.offset[1]+_1bf.offsetHeight&&x>=this.offset[0]&&x<this.offset[0]+_1bf.offsetWidth);
},withinIncludingScrolloffsets:function(_1c2,x,y){
var _1c5=this.realOffset(_1c2);
this.xcomp=x+_1c5[0]-this.deltaX;
this.ycomp=y+_1c5[1]-this.deltaY;
this.offset=this.cumulativeOffset(_1c2);
return (this.ycomp>=this.offset[1]&&this.ycomp<this.offset[1]+_1c2.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+_1c2.offsetWidth);
},overlap:function(mode,_1c7){
if(!mode){
return 0;
}
if(mode=="vertical"){
return ((this.offset[1]+_1c7.offsetHeight)-this.ycomp)/_1c7.offsetHeight;
}
if(mode=="horizontal"){
return ((this.offset[0]+_1c7.offsetWidth)-this.xcomp)/_1c7.offsetWidth;
}
},page:function(_1c8){
var _1c9=0,valueL=0;
var _1ca=_1c8;
do{
_1c9+=_1ca.offsetTop||0;
valueL+=_1ca.offsetLeft||0;
if(_1ca.offsetParent==document.body){
if(Element.getStyle(_1ca,"position")=="absolute"){
break;
}
}
}while(_1ca=_1ca.offsetParent);
_1ca=_1c8;
do{
if(!window.opera||_1ca.tagName=="BODY"){
_1c9-=_1ca.scrollTop||0;
valueL-=_1ca.scrollLeft||0;
}
}while(_1ca=_1ca.parentNode);
return [valueL,_1c9];
},clone:function(_1cb,_1cc){
var _1cd=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},arguments[2]||{});
_1cb=$(_1cb);
var p=Position.page(_1cb);
_1cc=$(_1cc);
var _1cf=[0,0];
var _1d0=null;
if(Element.getStyle(_1cc,"position")=="absolute"){
_1d0=Position.offsetParent(_1cc);
_1cf=Position.page(_1d0);
}
if(_1d0==document.body){
_1cf[0]-=document.body.offsetLeft;
_1cf[1]-=document.body.offsetTop;
}
if(_1cd.setLeft){
_1cc.style.left=(p[0]-_1cf[0]+_1cd.offsetLeft)+"px";
}
if(_1cd.setTop){
_1cc.style.top=(p[1]-_1cf[1]+_1cd.offsetTop)+"px";
}
if(_1cd.setWidth){
_1cc.style.width=_1cb.offsetWidth+"px";
}
if(_1cd.setHeight){
_1cc.style.height=_1cb.offsetHeight+"px";
}
},absolutize:function(_1d1){
_1d1=$(_1d1);
if(_1d1.style.position=="absolute"){
return;
}
Position.prepare();
var _1d2=Position.positionedOffset(_1d1);
var top=_1d2[1];
var left=_1d2[0];
var _1d5=_1d1.clientWidth;
var _1d6=_1d1.clientHeight;
_1d1._originalLeft=left-parseFloat(_1d1.style.left||0);
_1d1._originalTop=top-parseFloat(_1d1.style.top||0);
_1d1._originalWidth=_1d1.style.width;
_1d1._originalHeight=_1d1.style.height;
_1d1.style.position="absolute";
_1d1.style.top=top+"px";
_1d1.style.left=left+"px";
_1d1.style.width=_1d5+"px";
_1d1.style.height=_1d6+"px";
},relativize:function(_1d7){
_1d7=$(_1d7);
if(_1d7.style.position=="relative"){
return;
}
Position.prepare();
_1d7.style.position="relative";
var top=parseFloat(_1d7.style.top||0)-(_1d7._originalTop||0);
var left=parseFloat(_1d7.style.left||0)-(_1d7._originalLeft||0);
_1d7.style.top=top+"px";
_1d7.style.left=left+"px";
_1d7.style.height=_1d7._originalHeight;
_1d7.style.width=_1d7._originalWidth;
}};
if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)){
Position.cumulativeOffset=function(_1da){
var _1db=0,valueL=0;
do{
_1db+=_1da.offsetTop||0;
valueL+=_1da.offsetLeft||0;
if(_1da.offsetParent==document.body){
if(Element.getStyle(_1da,"position")=="absolute"){
break;
}
}
_1da=_1da.offsetParent;
}while(_1da);
return [valueL,_1db];
};
}
Element.addMethods();

