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