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,_e=$A(arguments),_f=_e.shift();
return function(){
return _d.apply(_f,_e.concat($A(arguments)));
};
};
Function.prototype.bindAsEventListener=function(_10){
var _11=this,_12=$A(arguments),_10=_12.shift();
return function(_13){
return _11.apply(_10,[(_13||window.event)].concat(_12).concat($A(arguments)));
};
};
Object.extend(Number.prototype,{toColorPart:function(){
var _14=this.toString(16);
if(this<16){
return "0"+_14;
}
return _14;
},succ:function(){
return this+1;
},times:function(_15){
$R(0,this,true).each(_15);
return this;
}});
var Try={these:function(){
var _16;
for(var i=0,_18=arguments.length;i<_18;i++){
var _19=arguments[i];
try{
_16=_19();
break;
}
catch(e){
}
}
return _16;
}};
var PeriodicalExecuter=Class.create();
PeriodicalExecuter.prototype={initialize:function(_1a,_1b){
this.callback=_1a;
this.frequency=_1b;
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(_1c){
return _1c==null?"":String(_1c);
};
Object.extend(String.prototype,{gsub:function(_1d,_1e){
var _1f="",_20=this,_21;
_1e=arguments.callee.prepareReplacement(_1e);
while(_20.length>0){
if(_21=_20.match(_1d)){
_1f+=_20.slice(0,_21.index);
_1f+=String.interpret(_1e(_21));
_20=_20.slice(_21.index+_21[0].length);
}else{
_1f+=_20,_20="";
}
}
return _1f;
},sub:function(_22,_23,_24){
_23=this.gsub.prepareReplacement(_23);
_24=_24===undefined?1:_24;
return this.gsub(_22,function(_25){
if(--_24<0){
return _25[0];
}
return _23(_25);
});
},scan:function(_26,_27){
this.gsub(_26,_27);
return this;
},truncate:function(_28,_29){
_28=_28||30;
_29=_29===undefined?"...":_29;
return this.length>_28?this.slice(0,_28-_29.length)+_29: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 _2a=new RegExp(Prototype.ScriptFragment,"img");
var _2b=new RegExp(Prototype.ScriptFragment,"im");
return (this.match(_2a)||[]).map(function(_2c){
return (_2c.match(_2b)||["",""])[1];
});
},evalScripts:function(){
return this.extractScripts().map(function(_2d){
return eval(_2d);
});
},escapeHTML:function(){
var div=document.createElement("div");
var _2f=document.createTextNode(this);
div.appendChild(_2f);
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(_31,_32){
return _31+_32.nodeValue;
}):div.childNodes[0].nodeValue):"";
},toQueryParams:function(_33){
var _34=this.strip().match(/([^?#]*)(#.*)?$/);
if(!_34){
return {};
}
return _34[1].split(_33||"&").inject({},function(_35,_36){
if((_36=_36.split("="))[0]){
var _37=decodeURIComponent(_36[0]);
var _38=_36[1]?decodeURIComponent(_36[1]):undefined;
if(_35[_37]!==undefined){
if(_35[_37].constructor!=Array){
_35[_37]=[_35[_37]];
}
if(_38){
_35[_37].push(_38);
}
}else{
_35[_37]=_38;
}
}
return _35;
});
},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 _39=this.split("-"),len=_39.length;
if(len==1){
return _39[0];
}
var _3b=this.charAt(0)=="-"?_39[0].charAt(0).toUpperCase()+_39[0].substring(1):_39[0];
for(var i=1;i<len;i++){
_3b+=_39[i].charAt(0).toUpperCase()+_39[i].substring(1);
}
return _3b;
},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(_3d){
var _3e=this.replace(/\\/g,"\\\\");
if(_3d){
return "\""+_3e.replace(/"/g,"\\\"")+"\"";
}else{
return "'"+_3e.replace(/'/g,"\\'")+"'";
}
}});
String.prototype.gsub.prepareReplacement=function(_3f){
if(typeof _3f=="function"){
return _3f;
}
var _40=new Template(_3f);
return function(_41){
return _40.evaluate(_41);
};
};
String.prototype.parseQuery=String.prototype.toQueryParams;
var Template=Class.create();
Template.Pattern=/(^|.|\r|\n)(#\{(.*?)\})/;
Template.prototype={initialize:function(_42,_43){
this.template=_42.toString();
this.pattern=_43||Template.Pattern;
},evaluate:function(_44){
return this.template.gsub(this.pattern,function(_45){
var _46=_45[1];
if(_46=="\\"){
return _45[2];
}
return _46+String.interpret(_44[_45[3]]);
});
}};
var $break=new Object();
var $continue=new Object();
var Enumerable={each:function(_47){
var _48=0;
try{
this._each(function(_49){
try{
_47(_49,_48++);
}
catch(e){
if(e!=$continue){
throw e;
}
}
});
}
catch(e){
if(e!=$break){
throw e;
}
}
return this;
},eachSlice:function(_4a,_4b){
var _4c=-_4a,_4d=[],_4e=this.toArray();
while((_4c+=_4a)<_4e.length){
_4d.push(_4e.slice(_4c,_4c+_4a));
}
return _4d.map(_4b);
},all:function(_4f){
var _50=true;
this.each(function(_51,_52){
_50=_50&&!!(_4f||Prototype.K)(_51,_52);
if(!_50){
throw $break;
}
});
return _50;
},any:function(_53){
var _54=false;
this.each(function(_55,_56){
if(_54=!!(_53||Prototype.K)(_55,_56)){
throw $break;
}
});
return _54;
},collect:function(_57){
var _58=[];
this.each(function(_59,_5a){
_58.push((_57||Prototype.K)(_59,_5a));
});
return _58;
},detect:function(_5b){
var _5c;
this.each(function(_5d,_5e){
if(_5b(_5d,_5e)){
_5c=_5d;
throw $break;
}
});
return _5c;
},findAll:function(_5f){
var _60=[];
this.each(function(_61,_62){
if(_5f(_61,_62)){
_60.push(_61);
}
});
return _60;
},grep:function(_63,_64){
var _65=[];
this.each(function(_66,_67){
var _68=_66.toString();
if(_68.match(_63)){
_65.push((_64||Prototype.K)(_66,_67));
}
});
return _65;
},include:function(_69){
var _6a=false;
this.each(function(_6b){
if(_6b==_69){
_6a=true;
throw $break;
}
});
return _6a;
},inGroupsOf:function(_6c,_6d){
_6d=_6d===undefined?null:_6d;
return this.eachSlice(_6c,function(_6e){
while(_6e.length<_6c){
_6e.push(_6d);
}
return _6e;
});
},inject:function(_6f,_70){
this.each(function(_71,_72){
_6f=_70(_6f,_71,_72);
});
return _6f;
},invoke:function(_73){
var _74=$A(arguments).slice(1);
return this.map(function(_75){
return _75[_73].apply(_75,_74);
});
},max:function(_76){
var _77;
this.each(function(_78,_79){
_78=(_76||Prototype.K)(_78,_79);
if(_77==undefined||_78>=_77){
_77=_78;
}
});
return _77;
},min:function(_7a){
var _7b;
this.each(function(_7c,_7d){
_7c=(_7a||Prototype.K)(_7c,_7d);
if(_7b==undefined||_7c<_7b){
_7b=_7c;
}
});
return _7b;
},partition:function(_7e){
var _7f=[],_80=[];
this.each(function(_81,_82){
((_7e||Prototype.K)(_81,_82)?_7f:_80).push(_81);
});
return [_7f,_80];
},pluck:function(_83){
var _84=[];
this.each(function(_85,_86){
_84.push(_85[_83]);
});
return _84;
},reject:function(_87){
var _88=[];
this.each(function(_89,_8a){
if(!_87(_89,_8a)){
_88.push(_89);
}
});
return _88;
},sortBy:function(_8b){
return this.map(function(_8c,_8d){
return {value:_8c,criteria:_8b(_8c,_8d)};
}).sort(function(_8e,_8f){
var a=_8e.criteria,b=_8f.criteria;
return a<b?-1:a>b?1:0;
}).pluck("value");
},toArray:function(){
return this.map();
},zip:function(){
var _92=Prototype.K,_93=$A(arguments);
if(typeof _93.last()=="function"){
_92=_93.pop();
}
var _94=[this].concat(_93).map($A);
return this.map(function(_95,_96){
return _92(_94.pluck(_96));
});
},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(_97){
if(!_97){
return [];
}
if(_97.toArray){
return _97.toArray();
}else{
var _98=[];
for(var i=0,_9a=_97.length;i<_9a;i++){
_98.push(_97[i]);
}
return _98;
}
};
Object.extend(Array.prototype,Enumerable);
if(!Array.prototype._reverse){
Array.prototype._reverse=Array.prototype.reverse;
}
Object.extend(Array.prototype,{_each:function(_9b){
for(var i=0,_9d=this.length;i<_9d;i++){
_9b(this[i]);
}
},clear:function(){
this.length=0;
return this;
},first:function(){
return this[0];
},last:function(){
return this[this.length-1];
},compact:function(){
return this.select(function(_9e){
return _9e!=null;
});
},flatten:function(){
return this.inject([],function(_9f,_a0){
return _9f.concat(_a0&&_a0.constructor==Array?_a0.flatten():[_a0]);
});
},without:function(){
var _a1=$A(arguments);
return this.select(function(_a2){
return !_a1.include(_a2);
});
},indexOf:function(_a3){
for(var i=0,_a5=this.length;i<_a5;i++){
if(this[i]==_a3){
return i;
}
}
return -1;
},reverse:function(_a6){
return (_a6!==false?this:this.toArray())._reverse();
},reduce:function(){
return this.length>1?this:this[0];
},uniq:function(){
return this.inject([],function(_a7,_a8){
return _a7.include(_a8)?_a7:_a7.concat([_a8]);
});
},clone:function(){
return [].concat(this);
},size:function(){
return this.length;
},inspect:function(){
return "["+this.map(Object.inspect).join(", ")+"]";
}});
Array.prototype.toArray=Array.prototype.clone;
function $w(_a9){
_a9=_a9.strip();
return _a9?_a9.split(/\s+/):[];
};
if(window.opera){
Array.prototype.concat=function(){
var _aa=[];
for(var i=0,_ac=this.length;i<_ac;i++){
_aa.push(this[i]);
}
for(var i=0,_ac=arguments.length;i<_ac;i++){
if(arguments[i].constructor==Array){
for(var j=0,_ae=arguments[i].length;j<_ae;j++){
_aa.push(arguments[i][j]);
}
}else{
_aa.push(arguments[i]);
}
}
return _aa;
};
}
Prototype.Hash=function(obj){
Object.extend(this,obj||{});
};
Object.extend(Prototype.Hash,{toQueryString:function(obj){
var _b1=[];
this.prototype._each.call(obj,function(_b2){
if(!_b2.key){
return;
}
if(_b2.value&&_b2.value.constructor==Array){
var _b3=_b2.value.compact();
if(_b3.length<2){
_b2.value=_b3.reduce();
}else{
key=encodeURIComponent(_b2.key);
_b3.each(function(_b4){
_b4=_b4!=undefined?encodeURIComponent(_b4):"";
_b1.push(key+"="+encodeURIComponent(_b4));
});
return;
}
}
if(_b2.value==undefined){
_b2[1]="";
}
_b1.push(_b2.map(encodeURIComponent).join("="));
});
return _b1.join("&");
}});
Object.extend(Prototype.Hash.prototype,Enumerable);
Object.extend(Prototype.Hash.prototype,{_each:function(_b5){
for(var key in this){
var _b7=this[key];
if(_b7&&_b7==Prototype.Hash.prototype[key]){
continue;
}
var _b8=[key,_b7];
_b8.key=key;
_b8.value=_b7;
_b5(_b8);
}
},keys:function(){
return this.pluck("key");
},values:function(){
return this.pluck("value");
},merge:function(_b9){
return $H(_b9).inject(this,function(_ba,_bb){
_ba[_bb.key]=_bb.value;
return _ba;
});
},remove:function(){
var _bc;
for(var i=0,_be=arguments.length;i<_be;i++){
var _bf=this[arguments[i]];
if(_bf!==undefined){
if(_bc===undefined){
_bc=_bf;
}else{
if(_bc.constructor!=Array){
_bc=[_bc];
}
_bc.push(_bf);
}
}
delete this[arguments[i]];
}
return _bc;
},toQueryString:function(){
return Prototype.Hash.toQueryString(this);
},inspect:function(){
return "#<Prototype.Hash:{"+this.map(function(_c0){
return _c0.map(Object.inspect).join(": ");
}).join(", ")+"}>";
}});
function $H(_c1){
if(_c1&&_c1.constructor==Prototype.Hash){
return _c1;
}
return new Prototype.Hash(_c1);
};
ObjectRange=Class.create();
Object.extend(ObjectRange.prototype,Enumerable);
Object.extend(ObjectRange.prototype,{initialize:function(_c2,end,_c4){
this.start=_c2;
this.end=end;
this.exclusive=_c4;
},_each:function(_c5){
var _c6=this.start;
while(this.include(_c6)){
_c5(_c6);
_c6=_c6.succ();
}
},include:function(_c7){
if(_c7<this.start){
return false;
}
if(this.exclusive){
return _c7<this.end;
}
return _c7<=this.end;
}});
var $R=function(_c8,end,_ca){
return new ObjectRange(_c8,end,_ca);
};
var Ajax={getTransport:function(){
return Try.these(function(){
return new XMLHttpRequest();
},function(){
return new ActiveXObject("Msxml2.XMLHTTP");
},function(){
return new ActiveXObject("Microsoft.XMLHTTP");
})||false;
},activeRequestCount:0};
Ajax.Responders={responders:[],_each:function(_cb){
this.responders._each(_cb);
},register:function(_cc){
if(!this.include(_cc)){
this.responders.push(_cc);
}
},unregister:function(_cd){
this.responders=this.responders.without(_cd);
},dispatch:function(_ce,_cf,_d0,_d1){
this.each(function(_d2){
if(typeof _d2[_ce]=="function"){
try{
_d2[_ce].apply(_d2,[_cf,_d0,_d1]);
}
catch(e){
}
}
});
}};
Object.extend(Ajax.Responders,Enumerable);
Ajax.Responders.register({onCreate:function(){
Ajax.activeRequestCount++;
},onComplete:function(){
Ajax.activeRequestCount--;
}});
Ajax.Base=function(){
};
Ajax.Base.prototype={setOptions:function(_d3){
this.options={method:"post",asynchronous:true,contentType:"application/x-www-form-urlencoded",encoding:"UTF-8",parameters:""};
Object.extend(this.options,_d3||{});
this.options.method=this.options.method.toLowerCase();
if(typeof this.options.parameters=="string"){
this.options.parameters=this.options.parameters.toQueryParams();
}
}};
Ajax.Request=Class.create();
Ajax.Request.Events=["Uninitialized","Loading","Loaded","Interactive","Complete"];
Ajax.Request.prototype=Object.extend(new Ajax.Base(),{_complete:false,initialize:function(url,_d5){
this.transport=Ajax.getTransport();
this.setOptions(_d5);
this.request(url);
},request:function(url){
this.url=url;
this.method=this.options.method;
var _d7=this.options.parameters;
if(!["get","post"].include(this.method)){
_d7["_method"]=this.method;
this.method="post";
}
_d7=Prototype.Hash.toQueryString(_d7);
if(_d7&&/Konqueror|Safari|KHTML/.test(navigator.userAgent)){
_d7+="&_=";
}
if(this.method=="get"&&_d7){
this.url+=(this.url.indexOf("?")>-1?"&":"?")+_d7;
}
try{
Ajax.Responders.dispatch("onCreate",this,this.transport);
this.transport.open(this.method.toUpperCase(),this.url,this.options.asynchronous);
if(this.options.asynchronous){
setTimeout(function(){
this.respondToReadyState(1);
}.bind(this),10);
}
this.transport.onreadystatechange=this.onStateChange.bind(this);
this.setRequestHeaders();
var _d8=this.method=="post"?(this.options.postBody||_d7):null;
this.transport.send(_d8);
if(!this.options.asynchronous&&this.transport.overrideMimeType){
this.onStateChange();
}
}
catch(e){
this.dispatchException(e);
}
},onStateChange:function(){
var _d9=this.transport.readyState;
if(_d9>1&&!((_d9==4)&&this._complete)){
this.respondToReadyState(this.transport.readyState);
}
},setRequestHeaders:function(){
var _da={"X-Requested-With":"XMLHttpRequest","X-Prototype-Version":Prototype.Version,"Accept":"text/javascript, text/html, application/xml, text/xml, */*"};
if(this.method=="post"){
_da["Content-type"]=this.options.contentType+(this.options.encoding?"; charset="+this.options.encoding:"");
if(this.transport.overrideMimeType&&(navigator.userAgent.match(/Gecko\/(\d{4})/)||[0,2005])[1]<2005){
_da["Connection"]="close";
}
}
if(typeof this.options.requestHeaders=="object"){
var _db=this.options.requestHeaders;
if(typeof _db.push=="function"){
for(var i=0,_dd=_db.length;i<_dd;i+=2){
_da[_db[i]]=_db[i+1];
}
}else{
$H(_db).each(function(_de){
_da[_de.key]=_de.value;
});
}
}
for(var _df in _da){
this.transport.setRequestHeader(_df,_da[_df]);
}
},success:function(){
return !this.transport.status||(this.transport.status>=200&&this.transport.status<300);
},respondToReadyState:function(_e0){
var _e1=Ajax.Request.Events[_e0];
var _e2=this.transport,_e3=this.evalJSON();
if(_e1=="Complete"){
try{
this._complete=true;
(this.options["on"+this.transport.status]||this.options["on"+(this.success()?"Success":"Failure")]||Prototype.emptyFunction)(_e2,_e3);
}
catch(e){
this.dispatchException(e);
}
if((this.getHeader("Content-type")||"text/javascript").strip().match(/^(text|application)\/(x-)?(java|ecma)script(;.*)?$/i)){
this.evalResponse();
}
}
try{
(this.options["on"+_e1]||Prototype.emptyFunction)(_e2,_e3);
Ajax.Responders.dispatch("on"+_e1,this,_e2,_e3);
}
catch(e){
this.dispatchException(e);
}
if(_e1=="Complete"){
this.transport.onreadystatechange=Prototype.emptyFunction;
}
},getHeader:function(_e4){
try{
return this.transport.getResponseHeader(_e4);
}
catch(e){
return null;
}
},evalJSON:function(){
try{
var _e5=this.getHeader("X-JSON");
return _e5?eval("("+_e5+")"):null;
}
catch(e){
return null;
}
},evalResponse:function(){
try{
return eval(this.transport.responseText);
}
catch(e){
this.dispatchException(e);
}
},dispatchException:function(_e6){
(this.options.onException||Prototype.emptyFunction)(this,_e6);
Ajax.Responders.dispatch("onException",this,_e6);
}});
Ajax.Updater=Class.create();
Object.extend(Object.extend(Ajax.Updater.prototype,Ajax.Request.prototype),{initialize:function(_e7,url,_e9){
this.container={success:(_e7.success||_e7),failure:(_e7.failure||(_e7.success?null:_e7))};
this.transport=Ajax.getTransport();
this.setOptions(_e9);
var _ea=this.options.onComplete||Prototype.emptyFunction;
this.options.onComplete=(function(_eb,_ec){
this.updateContent();
_ea(_eb,_ec);
}).bind(this);
this.request(url);
},updateContent:function(){
var _ed=this.container[this.success()?"success":"failure"];
var _ee=this.transport.responseText;
if(!this.options.evalScripts){
_ee=_ee.stripScripts();
}
if(_ed=$(_ed)){
if(this.options.insertion){
new this.options.insertion(_ed,_ee);
}else{
_ed.update(_ee);
}
}
if(this.success()){
if(this.onComplete){
setTimeout(this.onComplete.bind(this),10);
}
}
}});
Ajax.PeriodicalUpdater=Class.create();
Ajax.PeriodicalUpdater.prototype=Object.extend(new Ajax.Base(),{initialize:function(_ef,url,_f1){
this.setOptions(_f1);
this.onComplete=this.options.onComplete;
this.frequency=(this.options.frequency||2);
this.decay=(this.options.decay||1);
this.updater={};
this.container=_ef;
this.url=url;
this.start();
},start:function(){
this.options.onComplete=this.updateComplete.bind(this);
this.onTimerEvent();
},stop:function(){
this.updater.options.onComplete=undefined;
clearTimeout(this.timer);
(this.onComplete||Prototype.emptyFunction).apply(this,arguments);
},updateComplete:function(_f2){
if(this.options.decay){
this.decay=(_f2.responseText==this.lastText?this.decay*this.options.decay:1);
this.lastText=_f2.responseText;
}
this.timer=setTimeout(this.onTimerEvent.bind(this),this.decay*this.frequency*1000);
},onTimerEvent:function(){
this.updater=new Ajax.Updater(this.container,this.url,this.options);
}});
function $(_f3){
if(arguments.length>1){
for(var i=0,_f5=[],_f6=arguments.length;i<_f6;i++){
_f5.push($(arguments[i]));
}
return _f5;
}
if(typeof _f3=="string"){
_f3=document.getElementById(_f3);
}
return Element.extend(_f3);
};
if(Prototype.BrowserFeatures.XPath){
document._getElementsByXPath=function(_f7,_f8){
var _f9=[];
var _fa=document.evaluate(_f7,$(_f8)||document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);
for(var i=0,_fc=_fa.snapshotLength;i<_fc;i++){
_f9.push(_fa.snapshotItem(i));
}
return _f9;
};
}
document.getElementsByClassName=function(_fd,_fe){
if(Prototype.BrowserFeatures.XPath){
var q=".//*[contains(concat(' ', @class, ' '), ' "+_fd+" ')]";
return document._getElementsByXPath(q,_fe);
}else{
var _100=($(_fe)||document.body).getElementsByTagName("*");
var _101=[],_102;
for(var i=0,_104=_100.length;i<_104;i++){
_102=_100[i];
if(Element.hasClassName(_102,_fd)){
_101.push(Element.extend(_102));
}
}
return _101;
}
};
if(!window.Element){
var Element=new Object();
}
Element.extend=function(_105){
if(!_105||_nativeExtensions||_105.nodeType==3){
return _105;
}
if(!_105._extended&&_105.tagName&&_105!=window){
var _106=Object.clone(Element.Methods),_107=Element.extend.cache;
if(_105.tagName=="FORM"){
Object.extend(_106,Form.Methods);
}
if(["INPUT","TEXTAREA","SELECT"].include(_105.tagName)){
Object.extend(_106,Form.Element.Methods);
}
Object.extend(_106,Element.Methods.Simulated);
for(var _108 in _106){
var _109=_106[_108];
if(typeof _109=="function"&&!(_108 in _105)){
_105[_108]=_107.findOrStore(_109);
}
}
}
_105._extended=true;
return _105;
};
Element.extend.cache={findOrStore:function(_10a){
return this[_10a]=this[_10a]||function(){
return _10a.apply(null,[this].concat($A(arguments)));
};
}};
Element.Methods={visible:function(_10b){
return $(_10b).style.display!="none";
},toggle:function(_10c){
_10c=$(_10c);
Element[Element.visible(_10c)?"hide":"show"](_10c);
return _10c;
},hide:function(_10d){
$(_10d).style.display="none";
return _10d;
},show:function(_10e){
$(_10e).style.display="";
return _10e;
},remove:function(_10f){
_10f=$(_10f);
_10f.parentNode.removeChild(_10f);
return _10f;
},update:function(_110,html){
html=typeof html=="undefined"?"":html.toString();
$(_110).innerHTML=html.stripScripts();
setTimeout(function(){
html.evalScripts();
},10);
return _110;
},replace:function(_112,html){
_112=$(_112);
html=typeof html=="undefined"?"":html.toString();
if(_112.outerHTML){
_112.outerHTML=html.stripScripts();
}else{
var _114=_112.ownerDocument.createRange();
_114.selectNodeContents(_112);
_112.parentNode.replaceChild(_114.createContextualFragment(html.stripScripts()),_112);
}
setTimeout(function(){
html.evalScripts();
},10);
return _112;
},inspect:function(_115){
_115=$(_115);
var _116="<"+_115.tagName.toLowerCase();
$H({"id":"id","className":"class"}).each(function(pair){
var _118=pair.first(),_119=pair.last();
var _11a=(_115[_118]||"").toString();
if(_11a){
_116+=" "+_119+"="+_11a.inspect(true);
}
});
return _116+">";
},recursivelyCollect:function(_11b,_11c){
_11b=$(_11b);
var _11d=[];
while(_11b=_11b[_11c]){
if(_11b.nodeType==1){
_11d.push(Element.extend(_11b));
}
}
return _11d;
},ancestors:function(_11e){
return $(_11e).recursivelyCollect("parentNode");
},descendants:function(_11f){
return $A($(_11f).getElementsByTagName("*"));
},immediateDescendants:function(_120){
if(!(_120=$(_120).firstChild)){
return [];
}
while(_120&&_120.nodeType!=1){
_120=_120.nextSibling;
}
if(_120){
return [_120].concat($(_120).nextSiblings());
}
return [];
},previousSiblings:function(_121){
return $(_121).recursivelyCollect("previousSibling");
},nextSiblings:function(_122){
return $(_122).recursivelyCollect("nextSibling");
},siblings:function(_123){
_123=$(_123);
return _123.previousSiblings().reverse().concat(_123.nextSiblings());
},match:function(_124,_125){
if(typeof _125=="string"){
_125=new Selector(_125);
}
return _125.match($(_124));
},up:function(_126,_127,_128){
return Selector.findElement($(_126).ancestors(),_127,_128);
},down:function(_129,_12a,_12b){
return Selector.findElement($(_129).descendants(),_12a,_12b);
},previous:function(_12c,_12d,_12e){
return Selector.findElement($(_12c).previousSiblings(),_12d,_12e);
},next:function(_12f,_130,_131){
return Selector.findElement($(_12f).nextSiblings(),_130,_131);
},getElementsBySelector:function(){
var args=$A(arguments),_133=$(args.shift());
return Selector.findChildElements(_133,args);
},getElementsByClassName:function(_134,_135){
return document.getElementsByClassName(_135,_134);
},readAttribute:function(_136,name){
_136=$(_136);
if(document.all&&!window.opera){
var t=Element._attributeTranslations;
if(t.values[name]){
return t.values[name](_136,name);
}
if(t.names[name]){
name=t.names[name];
}
var _139=_136.attributes[name];
if(_139){
return _139.nodeValue;
}
}
return _136.getAttribute(name);
},getHeight:function(_13a){
try{
return $(_13a).getDimensions().height;
}
catch(e){
return 1;
}
},getWidth:function(_13b){
return $(_13b).getDimensions().width;
},classNames:function(_13c){
return new Element.ClassNames(_13c);
},hasClassName:function(_13d,_13e){
if(!(_13d=$(_13d))){
return;
}
var _13f=_13d.className;
if(_13f.length==0){
return false;
}
if(_13f==_13e||_13f.match(new RegExp("(^|\\s)"+_13e+"(\\s|$)"))){
return true;
}
return false;
},addClassName:function(_140,_141){
if(!(_140=$(_140))){
return;
}
Element.classNames(_140).add(_141);
return _140;
},removeClassName:function(_142,_143){
if(!(_142=$(_142))){
return;
}
Element.classNames(_142).remove(_143);
return _142;
},toggleClassName:function(_144,_145){
if(!(_144=$(_144))){
return;
}
Element.classNames(_144)[_144.hasClassName(_145)?"remove":"add"](_145);
return _144;
},observe:function(){
Event.observe.apply(Event,arguments);
return $A(arguments).first();
},stopObserving:function(){
Event.stopObserving.apply(Event,arguments);
return $A(arguments).first();
},cleanWhitespace:function(_146){
_146=$(_146);
var node=_146.firstChild;
while(node){
var _148=node.nextSibling;
if(node.nodeType==3&&!/\S/.test(node.nodeValue)){
_146.removeChild(node);
}
node=_148;
}
return _146;
},empty:function(_149){
return $(_149).innerHTML.match(/^\s*$/);
},descendantOf:function(_14a,_14b){
_14a=$(_14a),_14b=$(_14b);
while(_14a=_14a.parentNode){
if(_14a==_14b){
return true;
}
}
return false;
},scrollTo:function(_14c){
_14c=$(_14c);
var pos=Position.cumulativeOffset(_14c);
window.scrollTo(pos[0],pos[1]);
return _14c;
},getStyle:function(_14e,_14f){
_14e=$(_14e);
if(["float","cssFloat"].include(_14f)){
_14f=(typeof _14e.style.styleFloat!="undefined"?"styleFloat":"cssFloat");
}
_14f=_14f.camelize();
var _150=_14e.style[_14f];
if(!_150){
if(document.defaultView&&document.defaultView.getComputedStyle){
var css=document.defaultView.getComputedStyle(_14e,null);
_150=css?css[_14f]:null;
}else{
if(_14e.currentStyle){
_150=_14e.currentStyle[_14f];
}
}
}
if((_150=="auto")&&["width","height"].include(_14f)&&(_14e.getStyle("display")!="none")){
_150=_14e["offset"+_14f.capitalize()]+"px";
}
if(window.opera&&["left","top","right","bottom"].include(_14f)){
if(Element.getStyle(_14e,"position")=="static"){
_150="auto";
}
}
if(_14f=="opacity"){
if(_150){
return parseFloat(_150);
}
if(_150=(_14e.getStyle("filter")||"").match(/alpha\(opacity=(.*)\)/)){
if(_150[1]){
return parseFloat(_150[1])/100;
}
}
return 1;
}
return _150=="auto"?null:_150;
},setStyle:function(_152,_153){
_152=$(_152);
for(var name in _153){
var _155=_153[name];
if(name=="opacity"){
if(_155==1){
_155=(/Gecko/.test(navigator.userAgent)&&!/Konqueror|Safari|KHTML/.test(navigator.userAgent))?0.999999:1;
if(/MSIE/.test(navigator.userAgent)&&!window.opera){
_152.style.filter=_152.getStyle("filter").replace(/alpha\([^\)]*\)/gi,"");
}
}else{
if(_155==""){
if(/MSIE/.test(navigator.userAgent)&&!window.opera){
_152.style.filter=_152.getStyle("filter").replace(/alpha\([^\)]*\)/gi,"");
}
}else{
if(_155<0.00001){
_155=0;
}
if(/MSIE/.test(navigator.userAgent)&&!window.opera){
_152.style.filter=_152.getStyle("filter").replace(/alpha\([^\)]*\)/gi,"")+"alpha(opacity="+_155*100+")";
}
}
}
}else{
if(["float","cssFloat"].include(name)){
name=(typeof _152.style.styleFloat!="undefined")?"styleFloat":"cssFloat";
}
}
_152.style[name.camelize()]=_155;
}
return _152;
},getDimensions:function(_156){
_156=$(_156);
var _157=$(_156).getStyle("display");
if(_157!="none"&&_157!=null){
return {width:_156.offsetWidth,height:_156.offsetHeight};
}
var els=_156.style;
var _159=els.visibility;
var _15a=els.position;
var _15b=els.display;
els.visibility="hidden";
els.position="absolute";
els.display="block";
var _15c=_156.clientWidth;
var _15d=_156.clientHeight;
els.display=_15b;
els.position=_15a;
els.visibility=_159;
return {width:_15c,height:_15d};
},makePositioned:function(_15e){
_15e=$(_15e);
var pos=Element.getStyle(_15e,"position");
if(pos=="static"||!pos){
_15e._madePositioned=true;
_15e.style.position="relative";
if(window.opera){
_15e.style.top=0;
_15e.style.left=0;
}
}
return _15e;
},undoPositioned:function(_160){
_160=$(_160);
if(_160._madePositioned){
_160._madePositioned=undefined;
_160.style.position=_160.style.top=_160.style.left=_160.style.bottom=_160.style.right="";
}
return _160;
},makeClipping:function(_161){
_161=$(_161);
if(_161._overflow){
return _161;
}
_161._overflow=_161.style.overflow||"auto";
if((Element.getStyle(_161,"overflow")||"visible")!="hidden"){
_161.style.overflow="hidden";
}
return _161;
},undoClipping:function(_162){
_162=$(_162);
if(!_162._overflow){
return _162;
}
_162.style.overflow=_162._overflow=="auto"?"":_162._overflow;
_162._overflow=null;
return _162;
}};
Object.extend(Element.Methods,{childOf:Element.Methods.descendantOf});
Element._attributeTranslations={};
Element._attributeTranslations.names={colspan:"colSpan",rowspan:"rowSpan",valign:"vAlign",datetime:"dateTime",accesskey:"accessKey",tabindex:"tabIndex",enctype:"encType",maxlength:"maxLength",readonly:"readOnly",longdesc:"longDesc"};
Element._attributeTranslations.values={_getAttr:function(_163,_164){
return _163.getAttribute(_164,2);
},_flag:function(_165,_166){
return $(_165).hasAttribute(_166)?_166:null;
},style:function(_167){
return _167.style.cssText.toLowerCase();
},title:function(_168){
var node=_168.getAttributeNode("title");
return node.specified?node.nodeValue:null;
}};
Object.extend(Element._attributeTranslations.values,{href:Element._attributeTranslations.values._getAttr,src:Element._attributeTranslations.values._getAttr,disabled:Element._attributeTranslations.values._flag,checked:Element._attributeTranslations.values._flag,readonly:Element._attributeTranslations.values._flag,multiple:Element._attributeTranslations.values._flag});
Element.Methods.Simulated={hasAttribute:function(_16a,_16b){
var t=Element._attributeTranslations;
_16b=t.names[_16b]||_16b;
return $(_16a).getAttributeNode(_16b).specified;
}};
if(document.all&&!window.opera){
Element.Methods.update=function(_16d,html){
_16d=$(_16d);
html=typeof html=="undefined"?"":html.toString();
var _16f=_16d.tagName.toUpperCase();
if(["THEAD","TBODY","TR","TD"].include(_16f)){
var div=document.createElement("div");
switch(_16f){
case "THEAD":
case "TBODY":
div.innerHTML="<table><tbody>"+html.stripScripts()+"</tbody></table>";
depth=2;
break;
case "TR":
div.innerHTML="<table><tbody><tr>"+html.stripScripts()+"</tr></tbody></table>";
depth=3;
break;
case "TD":
div.innerHTML="<table><tbody><tr><td>"+html.stripScripts()+"</td></tr></tbody></table>";
depth=4;
}
$A(_16d.childNodes).each(function(node){
_16d.removeChild(node);
});
depth.times(function(){
div=div.firstChild;
});
$A(div.childNodes).each(function(node){
_16d.appendChild(node);
});
}else{
_16d.innerHTML=html.stripScripts();
}
setTimeout(function(){
html.evalScripts();
},10);
return _16d;
};
}
Object.extend(Element,Element.Methods);
var _nativeExtensions=false;
if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)){
["","Form","Input","TextArea","Select"].each(function(tag){
var _174="HTML"+tag+"Element";
if(window[_174]){
return;
}
var _175=window[_174]={};
_175.prototype=document.createElement(tag?tag.toLowerCase():"div").__proto__;
});
}
Element.addMethods=function(_176){
Object.extend(Element.Methods,_176||{});
function copy(_177,_178,_179){
_179=_179||false;
var _17a=Element.extend.cache;
for(var _17b in _177){
var _17c=_177[_17b];
if(!_179||!(_17b in _178)){
_178[_17b]=_17a.findOrStore(_17c);
}
}
};
if(typeof HTMLElement!="undefined"){
copy(Element.Methods,HTMLElement.prototype);
copy(Element.Methods.Simulated,HTMLElement.prototype,true);
copy(Form.Methods,HTMLFormElement.prototype);
[HTMLInputElement,HTMLTextAreaElement,HTMLSelectElement].each(function(_17d){
copy(Form.Element.Methods,_17d.prototype);
});
_nativeExtensions=true;
}
};
var Toggle=new Object();
Toggle.display=Element.toggle;
Abstract.Insertion=function(_17e){
this.adjacency=_17e;
};
Abstract.Insertion.prototype={initialize:function(_17f,_180){
this.element=$(_17f);
this.content=_180.stripScripts();
if(this.adjacency&&this.element.insertAdjacentHTML){
try{
this.element.insertAdjacentHTML(this.adjacency,this.content);
}
catch(e){
var _181=this.element.tagName.toUpperCase();
if(["TBODY","TR"].include(_181)){
this.insertContent(this.contentFromAnonymousTable());
}else{
throw e;
}
}
}else{
this.range=this.element.ownerDocument.createRange();
if(this.initializeRange){
this.initializeRange();
}
this.insertContent([this.range.createContextualFragment(this.content)]);
}
setTimeout(function(){
_180.evalScripts();
},10);
},contentFromAnonymousTable:function(){
var div=document.createElement("div");
div.innerHTML="<table><tbody>"+this.content+"</tbody></table>";
return $A(div.childNodes[0].childNodes[0].childNodes);
}};
var Insertion=new Object();
Insertion.Before=Class.create();
Insertion.Before.prototype=Object.extend(new Abstract.Insertion("beforeBegin"),{initializeRange:function(){
this.range.setStartBefore(this.element);
},insertContent:function(_183){
_183.each((function(_184){
this.element.parentNode.insertBefore(_184,this.element);
}).bind(this));
}});
Insertion.Top=Class.create();
Insertion.Top.prototype=Object.extend(new Abstract.Insertion("afterBegin"),{initializeRange:function(){
this.range.selectNodeContents(this.element);
this.range.collapse(true);
},insertContent:function(_185){
_185.reverse(false).each((function(_186){
this.element.insertBefore(_186,this.element.firstChild);
}).bind(this));
}});
Insertion.Bottom=Class.create();
Insertion.Bottom.prototype=Object.extend(new Abstract.Insertion("beforeEnd"),{initializeRange:function(){
this.range.selectNodeContents(this.element);
this.range.collapse(this.element);
},insertContent:function(_187){
_187.each((function(_188){
this.element.appendChild(_188);
}).bind(this));
}});
Insertion.After=Class.create();
Insertion.After.prototype=Object.extend(new Abstract.Insertion("afterEnd"),{initializeRange:function(){
this.range.setStartAfter(this.element);
},insertContent:function(_189){
_189.each((function(_18a){
this.element.parentNode.insertBefore(_18a,this.element.nextSibling);
}).bind(this));
}});
Element.ClassNames=Class.create();
Element.ClassNames.prototype={initialize:function(_18b){
this.element=$(_18b);
},_each:function(_18c){
this.element.className.split(/\s+/).select(function(name){
return name.length>0;
})._each(_18c);
},set:function(_18e){
this.element.className=_18e;
},add:function(_18f){
if(this.include(_18f)){
return;
}
this.set($A(this).concat(_18f).join(" "));
},remove:function(_190){
if(!this.include(_190)){
return;
}
this.set($A(this).without(_190).join(" "));
},toString:function(){
return $A(this).join(" ");
}};
Object.extend(Element.ClassNames.prototype,Enumerable);
var Selector=Class.create();
Selector.prototype={initialize:function(_191){
this.params={classNames:[]};
this.expression=_191.toString().strip();
this.parseExpression();
this.compileMatcher();
},parseExpression:function(){
function abort(_192){
throw "Parse error in selector: "+_192;
};
if(this.expression==""){
abort("empty expression");
}
var _193=this.params,expr=this.expression,_195,_196,_197,rest;
while(_195=expr.match(/^(.*)\[([a-z0-9_:-]+?)(?:([~\|!]?=)(?:"([^"]*)"|([^\]\s]*)))?\]$/i)){
_193.attributes=_193.attributes||[];
_193.attributes.push({name:_195[2],operator:_195[3],value:_195[4]||_195[5]||""});
expr=_195[1];
}
if(expr=="*"){
return this.params.wildcard=true;
}
while(_195=expr.match(/^([^a-z0-9_-])?([a-z0-9_-]+)(.*)/i)){
_196=_195[1],_197=_195[2],rest=_195[3];
switch(_196){
case "#":
_193.id=_197;
break;
case ".":
_193.classNames.push(_197);
break;
case "":
case undefined:
_193.tagName=_197.toUpperCase();
break;
default:
abort(expr.inspect());
}
expr=rest;
}
if(expr.length>0){
abort(expr.inspect());
}
},buildMatchExpression:function(){
var _199=this.params,_19a=[],_19b;
if(_199.wildcard){
_19a.push("true");
}
if(_19b=_199.id){
_19a.push("element.readAttribute(\"id\") == "+_19b.inspect());
}
if(_19b=_199.tagName){
_19a.push("element.tagName.toUpperCase() == "+_19b.inspect());
}
if((_19b=_199.classNames).length>0){
for(var i=0,_19d=_19b.length;i<_19d;i++){
_19a.push("element.hasClassName("+_19b[i].inspect()+")");
}
}
if(_19b=_199.attributes){
_19b.each(function(_19e){
var _19f="element.readAttribute("+_19e.name.inspect()+")";
var _1a0=function(_1a1){
return _19f+" && "+_19f+".split("+_1a1.inspect()+")";
};
switch(_19e.operator){
case "=":
_19a.push(_19f+" == "+_19e.value.inspect());
break;
case "~=":
_19a.push(_1a0(" ")+".include("+_19e.value.inspect()+")");
break;
case "|=":
_19a.push(_1a0("-")+".first().toUpperCase() == "+_19e.value.toUpperCase().inspect());
break;
case "!=":
_19a.push(_19f+" != "+_19e.value.inspect());
break;
case "":
case undefined:
_19a.push("element.hasAttribute("+_19e.name.inspect()+")");
break;
default:
throw "Unknown operator "+_19e.operator+" in selector";
}
});
}
return _19a.join(" && ");
},compileMatcher:function(){
this.match=new Function("element","if (!element.tagName) return false;       element = $(element);       return "+this.buildMatchExpression());
},findElements:function(_1a2){
var _1a3;
if(_1a3=$(this.params.id)){
if(this.match(_1a3)){
if(!_1a2||Element.childOf(_1a3,_1a2)){
return [_1a3];
}
}
}
_1a2=(_1a2||document).getElementsByTagName(this.params.tagName||"*");
var _1a4=[];
for(var i=0,_1a6=_1a2.length;i<_1a6;i++){
if(this.match(_1a3=_1a2[i])){
_1a4.push(Element.extend(_1a3));
}
}
return _1a4;
},toString:function(){
return this.expression;
}};
Object.extend(Selector,{matchElements:function(_1a7,_1a8){
var _1a9=new Selector(_1a8);
return _1a7.select(_1a9.match.bind(_1a9)).map(Element.extend);
},findElement:function(_1aa,_1ab,_1ac){
if(typeof _1ab=="number"){
_1ac=_1ab,_1ab=false;
}
return Selector.matchElements(_1aa,_1ab||"*")[_1ac||0];
},findChildElements:function(_1ad,_1ae){
return _1ae.map(function(_1af){
return _1af.match(/[^\s"]+(?:"[^"]*"[^\s"]+)*/g).inject([null],function(_1b0,expr){
var _1b2=new Selector(expr);
return _1b0.inject([],function(_1b3,_1b4){
return _1b3.concat(_1b2.findElements(_1b4||_1ad));
});
});
}).flatten();
}});
function $$(){
return Selector.findChildElements(document,$A(arguments));
};
var Form={reset:function(form){
$(form).reset();
return form;
},serializeElements:function(_1b6,_1b7){
var data=_1b6.inject({},function(_1b9,_1ba){
if(!_1ba.disabled&&_1ba.name){
var key=_1ba.name,_1bc=$(_1ba).getValue();
if(_1bc!=undefined){
if(_1b9[key]){
if(_1b9[key].constructor!=Array){
_1b9[key]=[_1b9[key]];
}
_1b9[key].push(_1bc);
}else{
_1b9[key]=_1bc;
}
}
}
return _1b9;
});
return _1b7?data:Prototype.Hash.toQueryString(data);
},unserializeElements:function(_1bd,hash){
for(i in hash){
Form.Element.setValue(i,hash[i].toString());
}
}};
Form.Methods={serialize:function(form,_1c0){
return Form.serializeElements(Form.getElements(form),_1c0);
},unserialize:function(form,hash){
return Form.unserializeElements(Form.getElements(form),hash);
},getElements:function(form){
return $A($(form).getElementsByTagName("*")).inject([],function(_1c4,_1c5){
if(Form.Element.Serializers[_1c5.tagName.toLowerCase()]){
_1c4.push(Element.extend(_1c5));
}
return _1c4;
});
},getInputs:function(form,_1c7,name){
form=$(form);
var _1c9=form.getElementsByTagName("input");
if(!_1c7&&!name){
return $A(_1c9).map(Element.extend);
}
for(var i=0,_1cb=[],_1cc=_1c9.length;i<_1cc;i++){
var _1cd=_1c9[i];
if((_1c7&&_1cd.type!=_1c7)||(name&&_1cd.name!=name)){
continue;
}
_1cb.push(Element.extend(_1cd));
}
return _1cb;
},disable:function(form){
form=$(form);
form.getElements().each(function(_1cf){
_1cf.blur();
_1cf.disabled="true";
});
return form;
},enable:function(form){
form=$(form);
form.getElements().each(function(_1d1){
_1d1.disabled="";
});
return form;
},findFirstElement:function(form){
return $(form).getElements().find(function(_1d3){
return _1d3.type!="hidden"&&!_1d3.disabled&&["input","select","textarea"].include(_1d3.tagName.toLowerCase());
});
},focusFirstElement:function(form){
form=$(form);
form.findFirstElement().activate();
return form;
}};
Object.extend(Form,Form.Methods);
Form.Element={focus:function(_1d5){
$(_1d5).focus();
return _1d5;
},select:function(_1d6){
$(_1d6).select();
return _1d6;
}};
Form.Element.Methods={serialize:function(_1d7){
_1d7=$(_1d7);
if(!_1d7.disabled&&_1d7.name){
var _1d8=_1d7.getValue();
if(_1d8!=undefined){
var pair={};
pair[_1d7.name]=_1d8;
return Prototype.Hash.toQueryString(pair);
}
}
return "";
},getValue:function(_1da){
_1da=$(_1da);
var _1db=_1da.tagName.toLowerCase();
return Form.Element.Serializers[_1db](_1da);
},clear:function(_1dc){
$(_1dc).value="";
return _1dc;
},present:function(_1dd){
return $(_1dd).value!="";
},activate:function(_1de){
_1de=$(_1de);
_1de.focus();
if(_1de.select&&(_1de.tagName.toLowerCase()!="input"||!["button","reset","submit"].include(_1de.type))){
_1de.select();
}
return _1de;
},disable:function(_1df){
_1df=$(_1df);
_1df.disabled=true;
return _1df;
},enable:function(_1e0){
_1e0=$(_1e0);
_1e0.blur();
_1e0.disabled=false;
return _1e0;
}};
Object.extend(Form.Element,Form.Element.Methods);
var Field=Form.Element;
var $F=Form.Element.getValue;
Form.Element.Serializers={input:function(_1e1){
switch(_1e1.type.toLowerCase()){
case "checkbox":
return _1e1.checked?_1e1.value:0;
case "radio":
return Form.Element.Serializers.inputSelector(_1e1);
default:
return Form.Element.Serializers.textarea(_1e1);
}
},inputSelector:function(_1e2){
return _1e2.checked?_1e2.value:null;
},textarea:function(_1e3){
return _1e3.value;
},select:function(_1e4){
return this[_1e4.type=="select-one"?"selectOne":"selectMany"](_1e4);
},selectOne:function(_1e5){
var _1e6=_1e5.selectedIndex;
return _1e6>=0?this.optionValue(_1e5.options[_1e6]):null;
},selectMany:function(_1e7){
var _1e8,_1e9=_1e7.length;
if(!_1e9){
return null;
}
for(var i=0,_1e8=[];i<_1e9;i++){
var opt=_1e7.options[i];
if(opt.selected){
_1e8.push(this.optionValue(opt));
}
}
return _1e8;
},optionValue:function(opt){
try{
ret=Element.extend(opt).hasAttribute("value")?opt.value:opt.text;
}
catch(e){
alert("caught:"+opt.value+" : "+e);
ret=opt.value;
}
return ret;
}};
Abstract.TimedObserver=function(){
};
Abstract.TimedObserver.prototype={initialize:function(_1ed,_1ee,_1ef){
this.frequency=_1ee;
this.element=$(_1ed);
this.callback=_1ef;
this.lastValue=this.getValue();
this.registerCallback();
},registerCallback:function(){
setInterval(this.onTimerEvent.bind(this),this.frequency*1000);
},onTimerEvent:function(){
var _1f0=this.getValue();
var _1f1=("string"==typeof this.lastValue&&"string"==typeof _1f0?this.lastValue!=_1f0:String(this.lastValue)!=String(_1f0));
if(_1f1){
this.callback(this.element,_1f0);
this.lastValue=_1f0;
}
}};
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(_1f2,_1f3){
this.element=$(_1f2);
this.callback=_1f3;
this.lastValue=this.getValue();
if(this.element.tagName.toLowerCase()=="form"){
this.registerFormCallbacks();
}else{
this.registerCallback(this.element);
}
},onElementEvent:function(){
var _1f4=this.getValue();
if(this.lastValue!=_1f4){
this.callback(this.element,_1f4);
this.lastValue=_1f4;
}
},registerFormCallbacks:function(){
Form.getElements(this.element).each(this.registerCallback.bind(this));
},registerCallback:function(_1f5){
if(_1f5.type){
switch(_1f5.type.toLowerCase()){
case "checkbox":
case "radio":
Event.observe(_1f5,"click",this.onElementEvent.bind(this));
break;
default:
Event.observe(_1f5,"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(_1f6){
return _1f6.target||_1f6.srcElement;
},isLeftClick:function(_1f7){
return (((_1f7.which)&&(_1f7.which==1))||((_1f7.button)&&(_1f7.button==1)));
},pointerX:function(_1f8){
return _1f8.pageX||(_1f8.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft));
},pointerY:function(_1f9){
return _1f9.pageY||(_1f9.clientY+(document.documentElement.scrollTop||document.body.scrollTop));
},stop:function(_1fa){
if(_1fa.preventDefault){
_1fa.preventDefault();
_1fa.stopPropagation();
}else{
_1fa.returnValue=false;
_1fa.cancelBubble=true;
}
},findElement:function(_1fb,_1fc){
var _1fd=Event.element(_1fb);
while(_1fd.parentNode&&(!_1fd.tagName||(_1fd.tagName.toUpperCase()!=_1fc.toUpperCase()))){
_1fd=_1fd.parentNode;
}
return _1fd;
},observers:false,_observeAndCache:function(_1fe,name,_200,_201){
if(!this.observers){
this.observers=[];
}
if(_1fe.addEventListener){
this.observers.push([_1fe,name,_200,_201]);
_1fe.addEventListener(name,_200,_201);
}else{
if(_1fe.attachEvent){
this.observers.push([_1fe,name,_200,_201]);
_1fe.attachEvent("on"+name,_200);
}
}
},unloadCache:function(){
if(!Event.observers){
return;
}
for(var i=0,_203=Event.observers.length;i<_203;i++){
Event.stopObserving.apply(this,Event.observers[i]);
Event.observers[i][0]=null;
}
Event.observers=false;
},observe:function(_204,name,_206,_207){
_204=$(_204);
_207=_207||false;
if(name=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||_204.attachEvent)){
name="keydown";
}
Event._observeAndCache(_204,name,_206,_207);
},stopObserving:function(_208,name,_20a,_20b){
_208=$(_208);
_20b=_20b||false;
if(name=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||_208.detachEvent)){
name="keydown";
}
if(_208.removeEventListener){
_208.removeEventListener(name,_20a,_20b);
}else{
if(_208.detachEvent){
try{
_208.detachEvent("on"+name,_20a);
}
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(_20c){
var _20d=0,_20e=0;
do{
_20d+=_20c.scrollTop||0;
_20e+=_20c.scrollLeft||0;
_20c=_20c.parentNode;
}while(_20c);
return [_20e,_20d];
},cumulativeOffset:function(_20f){
var _210=0,_211=0;
do{
_210+=_20f.offsetTop||0;
_211+=_20f.offsetLeft||0;
_20f=_20f.offsetParent;
}while(_20f);
return [_211,_210];
},positionedOffset:function(_212){
var _213=0,_214=0;
do{
_213+=_212.offsetTop||0;
_214+=_212.offsetLeft||0;
_212=_212.offsetParent;
if(_212){
if(_212.tagName=="BODY"){
break;
}
var p=Element.getStyle(_212,"position");
if(p=="relative"||p=="absolute"){
break;
}
}
}while(_212);
return [_214,_213];
},offsetParent:function(_216){
if(_216.offsetParent){
return _216.offsetParent;
}
if(_216==document.body){
return _216;
}
while((_216=_216.parentNode)&&_216!=document.body){
if(Element.getStyle(_216,"position")!="static"){
return _216;
}
}
return document.body;
},within:function(_217,x,y){
if(this.includeScrollOffsets){
return this.withinIncludingScrolloffsets(_217,x,y);
}
this.xcomp=x;
this.ycomp=y;
this.offset=this.cumulativeOffset(_217);
return (y>=this.offset[1]&&y<this.offset[1]+_217.offsetHeight&&x>=this.offset[0]&&x<this.offset[0]+_217.offsetWidth);
},withinIncludingScrolloffsets:function(_21a,x,y){
var _21d=this.realOffset(_21a);
this.xcomp=x+_21d[0]-this.deltaX;
this.ycomp=y+_21d[1]-this.deltaY;
this.offset=this.cumulativeOffset(_21a);
return (this.ycomp>=this.offset[1]&&this.ycomp<this.offset[1]+_21a.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+_21a.offsetWidth);
},overlap:function(mode,_21f){
if(!mode){
return 0;
}
if(mode=="vertical"){
return ((this.offset[1]+_21f.offsetHeight)-this.ycomp)/_21f.offsetHeight;
}
if(mode=="horizontal"){
return ((this.offset[0]+_21f.offsetWidth)-this.xcomp)/_21f.offsetWidth;
}
},page:function(_220){
var _221=0,_222=0;
var _223=_220;
do{
_221+=_223.offsetTop||0;
_222+=_223.offsetLeft||0;
if(_223.offsetParent==document.body){
if(Element.getStyle(_223,"position")=="absolute"){
break;
}
}
}while(_223=_223.offsetParent);
_223=_220;
do{
if(!window.opera||_223.tagName=="BODY"){
_221-=_223.scrollTop||0;
_222-=_223.scrollLeft||0;
}
}while(_223=_223.parentNode);
return [_222,_221];
},clone:function(_224,_225){
var _226=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},arguments[2]||{});
_224=$(_224);
var p=Position.page(_224);
_225=$(_225);
var _228=[0,0];
var _229=null;
if(Element.getStyle(_225,"position")=="absolute"){
_229=Position.offsetParent(_225);
_228=Position.page(_229);
}
if(_229==document.body){
_228[0]-=document.body.offsetLeft;
_228[1]-=document.body.offsetTop;
}
if(_226.setLeft){
_225.style.left=(p[0]-_228[0]+_226.offsetLeft)+"px";
}
if(_226.setTop){
_225.style.top=(p[1]-_228[1]+_226.offsetTop)+"px";
}
if(_226.setWidth){
_225.style.width=_224.offsetWidth+"px";
}
if(_226.setHeight){
_225.style.height=_224.offsetHeight+"px";
}
},absolutize:function(_22a){
_22a=$(_22a);
if(_22a.style.position=="absolute"){
return;
}
Position.prepare();
var _22b=Position.positionedOffset(_22a);
var top=_22b[1];
var left=_22b[0];
var _22e=_22a.clientWidth;
var _22f=_22a.clientHeight;
_22a._originalLeft=left-parseFloat(_22a.style.left||0);
_22a._originalTop=top-parseFloat(_22a.style.top||0);
_22a._originalWidth=_22a.style.width;
_22a._originalHeight=_22a.style.height;
_22a.style.position="absolute";
_22a.style.top=top+"px";
_22a.style.left=left+"px";
_22a.style.width=_22e+"px";
_22a.style.height=_22f+"px";
},relativize:function(_230){
_230=$(_230);
if(_230.style.position=="relative"){
return;
}
Position.prepare();
_230.style.position="relative";
var top=parseFloat(_230.style.top||0)-(_230._originalTop||0);
var left=parseFloat(_230.style.left||0)-(_230._originalLeft||0);
_230.style.top=top+"px";
_230.style.left=left+"px";
_230.style.height=_230._originalHeight;
_230.style.width=_230._originalWidth;
}};
if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)){
Position.cumulativeOffset=function(_233){
var _234=0,_235=0;
do{
_234+=_233.offsetTop||0;
_235+=_233.offsetLeft||0;
if(_233.offsetParent==document.body){
if(Element.getStyle(_233,"position")=="absolute"){
break;
}
}
_233=_233.offsetParent;
}while(_233);
return [_235,_234];
};
}
Element.addMethods();
Form.Element.setValue=function(_236,_237){
element_id=_236;
_236=$(_236);
if(!_236){
_236=document.getElementsByName(element_id)[0];
}
if(!_236){
return false;
}
var _238=_236.tagName.toLowerCase();
var _239=Form.Element.SetSerializers[_238](_236,_237);
};
Form.Element.SetSerializers={input:function(_23a,_23b){
switch(_23a.type.toLowerCase()){
case "submit":
case "hidden":
case "password":
case "text":
return Form.Element.SetSerializers.textarea(_23a,_23b);
case "checkbox":
return Form.Element.SetSerializers.checkbox(_23a,_23b);
case "radio":
return Form.Element.SetSerializers.inputSelector(_23a,_23b);
}
return false;
},checkbox:function(_23c,_23d){
if(_23d==0||_23d==null||_23d==""){
_23c.checked=false;
}else{
_23c.checked=true;
}
},inputSelector:function(_23e,_23f){
fields=document.getElementsByName(_23e.name);
for(var i=0;i<fields.length;i++){
if(fields[i].value==_23f){
fields[i].checked=true;
}
}
},textarea:function(_241,_242){
_241.value=_242;
},select:function(_243,_244){
var _245="",opt,_247=_243.selectedIndex;
for(var i=0;i<_243.options.length;i++){
if(_243.options[i].value==_244){
_243.selectedIndex=i;
return true;
}
}
}};
var fx=new Object();
fx.Base=function(){
};
fx.Base.prototype={setOptions:function(_249){
this.options={duration:500,onComplete:"",transition:fx.sinoidal};
Object.extend(this.options,_249||{});
},step:function(){
var time=(new Date).getTime();
if(time>=this.options.duration+this.startTime){
this.now=this.to;
clearInterval(this.timer);
this.timer=null;
if(this.options.onComplete){
setTimeout(this.options.onComplete.bind(this),10);
}
}else{
var Tpos=(time-this.startTime)/(this.options.duration);
this.now=this.options.transition(Tpos)*(this.to-this.from)+this.from;
}
this.increase();
},custom:function(from,to){
if(this.timer!=null){
return;
}
this.from=from;
this.to=to;
this.startTime=(new Date).getTime();
this.timer=setInterval(this.step.bind(this),13);
},hide:function(){
this.now=0;
this.increase();
},clearTimer:function(){
clearInterval(this.timer);
this.timer=null;
}};
fx.Layout=Class.create();
fx.Layout.prototype=Object.extend(new fx.Base(),{initialize:function(el,_24f){
this.el=$(el);
this.el.style.overflow="hidden";
this.iniWidth=this.el.offsetWidth;
this.iniHeight=this.el.offsetHeight;
this.setOptions(_24f);
}});
fx.Height=Class.create();
Object.extend(Object.extend(fx.Height.prototype,fx.Layout.prototype),{increase:function(){
this.el.style.height=this.now+"px";
},toggle:function(){
if(this.el.offsetHeight>0){
this.custom(this.el.offsetHeight,0);
}else{
this.custom(0,this.el.scrollHeight);
}
}});
fx.Width=Class.create();
Object.extend(Object.extend(fx.Width.prototype,fx.Layout.prototype),{increase:function(){
this.el.style.width=this.now+"px";
},toggle:function(){
if(this.el.offsetWidth>0){
this.custom(this.el.offsetWidth,0);
}else{
this.custom(0,this.iniWidth);
}
}});
fx.Opacity=Class.create();
fx.Opacity.prototype=Object.extend(new fx.Base(),{initialize:function(el,_251){
this.el=$(el);
this.now=1;
this.increase();
this.setOptions(_251);
},increase:function(){
if(this.now==1&&(/Firefox/.test(navigator.userAgent))){
this.now=0.9999;
}
this.setOpacity(this.now);
},setOpacity:function(_252){
if(_252==0&&this.el.style.visibility!="hidden"){
this.el.style.visibility="hidden";
}else{
if(this.el.style.visibility!="visible"){
this.el.style.visibility="visible";
}
}
if(window.ActiveXObject){
this.el.style.filter="alpha(opacity="+_252*100+")";
}
this.el.style.opacity=_252;
},toggle:function(){
if(this.now>0){
this.custom(1,0);
}else{
this.custom(0,1);
}
}});
fx.sinoidal=function(pos){
return ((-Math.cos(pos*Math.PI)/2)+0.5);
};
fx.linear=function(pos){
return pos;
};
fx.cubic=function(pos){
return Math.pow(pos,3);
};
fx.circ=function(pos){
return Math.sqrt(pos);
};
fx.Scroll=Class.create();
fx.Scroll.prototype=Object.extend(new fx.Base(),{initialize:function(_257){
this.setOptions(_257);
},scrollTo:function(el){
var dest=Position.cumulativeOffset($(el))[1]-20;
var _25a=window.innerHeight||document.documentElement.clientHeight;
var full=document.documentElement.scrollHeight;
var top=window.pageYOffset||document.body.scrollTop||document.documentElement.scrollTop;
if(dest+_25a>full){
this.custom(top,dest-_25a+(full-dest));
}else{
this.custom(top,dest);
}
},increase:function(){
window.scrollTo(0,this.now);
}});
fx.Text=Class.create();
fx.Text.prototype=Object.extend(new fx.Base(),{initialize:function(el,_25e){
this.el=$(el);
this.setOptions(_25e);
if(!this.options.unit){
this.options.unit="em";
}
},increase:function(){
this.el.style.fontSize=this.now+this.options.unit;
}});
fx.Combo=Class.create();
fx.Combo.prototype={setOptions:function(_25f){
this.options={opacity:true,height:true,width:false};
Object.extend(this.options,_25f||{});
},initialize:function(el,_261){
this.el=$(el);
this.setOptions(_261);
if(this.options.opacity){
this.o=new fx.Opacity(el,_261);
_261.onComplete=null;
}
if(this.options.height){
this.h=new fx.Height(el,_261);
_261.onComplete=null;
}
if(this.options.width){
this.w=new fx.Width(el,_261);
}
},toggle:function(){
this.checkExec("toggle");
},hide:function(){
this.checkExec("hide");
},clearTimer:function(){
this.checkExec("clearTimer");
},checkExec:function(func){
if(this.o){
this.o[func]();
}
if(this.h){
this.h[func]();
}
if(this.w){
this.w[func]();
}
},resizeTo:function(hto,wto){
if(this.h&&this.w){
this.h.custom(this.el.offsetHeight,this.el.offsetHeight+hto);
this.w.custom(this.el.offsetWidth,this.el.offsetWidth+wto);
}
},customSize:function(hto,wto){
if(this.h&&this.w){
this.h.custom(this.el.offsetHeight,hto);
this.w.custom(this.el.offsetWidth,wto);
}
}};
fx.Accordion=Class.create();
fx.Accordion.prototype={setOptions:function(_267){
this.options={delay:100,opacity:false};
Object.extend(this.options,_267||{});
},initialize:function(_268,_269,_26a){
this.elements=_269;
this.setOptions(_26a);
var _26a=_26a||"";
_269.each(function(el,i){
_26a.onComplete=function(){
if(el.offsetHeight>0){
el.style.height="1%";
}
};
el.fx=new fx.Combo(el,_26a);
el.fx.hide();
});
_268.each(function(tog,i){
tog.onclick=function(){
this.showThisHideOpen(_269[i]);
}.bind(this);
}.bind(this));
},showThisHideOpen:function(_26f){
this.elements.each(function(el,i){
if(el.offsetHeight>0&&el!=_26f){
this.clearAndToggle(el);
}
}.bind(this));
if(_26f.offsetHeight==0){
setTimeout(function(){
this.clearAndToggle(_26f);
}.bind(this),this.options.delay);
}
},clearAndToggle:function(el){
el.fx.clearTimer();
el.fx.toggle();
}};
var Remember=new Object();
Remember=function(){
};
Remember.prototype={initialize:function(el,_274){
this.el=$(el);
this.days=365;
this.options=_274;
this.effect();
var _275=this.readCookie();
if(_275){
this.fx.now=_275;
this.fx.increase();
}
},setCookie:function(_276){
var date=new Date();
date.setTime(date.getTime()+(this.days*24*60*60*1000));
var _278="; expires="+date.toGMTString();
document.cookie=this.el+this.el.id+this.prefix+"="+_276+_278+"; path=/";
},readCookie:function(){
var _279=this.el+this.el.id+this.prefix+"=";
var ca=document.cookie.split(";");
for(var i=0;c=ca[i];i++){
while(c.charAt(0)==" "){
c=c.substring(1,c.length);
}
if(c.indexOf(_279)==0){
return c.substring(_279.length,c.length);
}
}
return false;
},custom:function(from,to){
if(this.fx.now!=to){
this.setCookie(to);
this.fx.custom(from,to);
}
}};
fx.RememberHeight=Class.create();
fx.RememberHeight.prototype=Object.extend(new Remember(),{effect:function(){
this.fx=new fx.Height(this.el,this.options);
this.prefix="height";
},toggle:function(){
if(this.el.offsetHeight==0){
this.setCookie(this.el.scrollHeight);
}else{
this.setCookie(0);
}
this.fx.toggle();
},resize:function(to){
this.setCookie(this.el.offsetHeight+to);
this.fx.custom(this.el.offsetHeight,this.el.offsetHeight+to);
},hide:function(){
if(!this.readCookie()){
this.fx.hide();
}
}});
fx.RememberText=Class.create();
fx.RememberText.prototype=Object.extend(new Remember(),{effect:function(){
this.fx=new fx.Text(this.el,this.options);
this.prefix="text";
}});
fx.expoIn=function(pos){
return Math.pow(2,10*(pos-1));
};
fx.expoOut=function(pos){
return (-Math.pow(2,-10*pos)+1);
};
fx.quadIn=function(pos){
return Math.pow(pos,2);
};
fx.quadOut=function(pos){
return -(pos)*(pos-2);
};
fx.circOut=function(pos){
return Math.sqrt(1-Math.pow(pos-1,2));
};
fx.circIn=function(pos){
return -(Math.sqrt(1-Math.pow(pos,2))-1);
};
fx.backIn=function(pos){
return (pos)*pos*((2.7)*pos-1.7);
};
fx.backOut=function(pos){
return ((pos-1)*(pos-1)*((2.7)*(pos-1)+1.7)+1);
};
fx.sineOut=function(pos){
return Math.sin(pos*(Math.PI/2));
};
fx.sineIn=function(pos){
return -Math.cos(pos*(Math.PI/2))+1;
};
fx.sineInOut=function(pos){
return -(Math.cos(Math.PI*pos)-1)/2;
};
fx.Position=Class.create();
fx.Position.prototype=Object.extend(new fx.Base(),{initialize:function(el,_28b){
this.el=$(el);
this.setOptions(_28b);
this.now=[0,0];
},step:function(){
var time=(new Date).getTime();
if(time>=this.options.duration+this.startTime){
this.now=this.to;
clearInterval(this.timer);
this.timer=null;
if(this.options.onComplete){
setTimeout(this.options.onComplete.bind(this),10);
}
}else{
var Tpos=(time-this.startTime)/(this.options.duration);
var tmp=[];
tmp[0]=(this.options.transition(Tpos)*(this.to[0]-this.from[0])+this.from[0]);
tmp[1]=(this.options.transition(Tpos)*(this.to[1]-this.from[1])+this.from[1]);
this.now=tmp;
}
this.increase();
},increase:function(){
this.el.style["left"]=this.now[0]+"px";
this.el.style["top"]=this.now[1]+"px";
},move:function(from,to){
to=to?to:this.now;
this.custom(from,to);
}});
fx.Color=Class.create();
fx.Color.prototype=Object.extend(new fx.Base(),{initialize:function(el,_292){
this.el=$(el);
this.setOptions(_292);
this.now=0;
this.regex=new RegExp("#?(..?)(..?)(..?)");
if(!this.options.fromColor){
this.options.fromColor="#FFFFFF";
}
if(!this.options.toColor){
this.options.toColor="#FFFFFF";
}
if(!this.options.property){
this.props=new Array("backgroundColor");
}else{
this.props=this.options.property.split(",");
}
},increase:function(){
var hex="rgb("+(Math.round(this.cs[0]+(this.ce[0]-this.cs[0])*this.now))+","+(Math.round(this.cs[1]+(this.ce[1]-this.cs[1])*this.now))+","+(Math.round(this.cs[2]+(this.ce[2]-this.cs[2])*this.now))+")";
for(i=0;i<this.props.length;i++){
if(this.props[i]=="backgroundColor"){
this.el.style.backgroundColor=hex;
}else{
if(this.props[i]=="color"){
this.el.style.color=hex;
}else{
if(this.props[i]=="borderColor"){
this.el.style.borderColor=hex;
}
}
}
}
},toggle:function(){
this.cs=this.regex.exec(this.options.fromColor);
this.ce=this.regex.exec(this.options.toColor);
for(i=1;i<this.cs.length;i++){
this.cs[i-1]=parseInt(this.cs[i],16);
this.ce[i-1]=parseInt(this.ce[i],16);
}
if(this.now>0){
this.custom(1,0);
}else{
this.custom(0,1);
}
},cycle:function(){
this.toggle();
setTimeout(this.toggle.bind(this),this.options.duration+10);
},customColor:function(from,to){
this.cs=this.regex.exec(from);
this.ce=this.regex.exec(to);
for(i=1;i<this.cs.length;i++){
if(this.cs[i].length==1){
this.cs[i]+=this.cs[i];
}
if(this.ce[i].length==1){
this.ce[i]+=this.ce[i];
}
this.cs[i-1]=parseInt(this.cs[i],16);
this.ce[i-1]=parseInt(this.ce[i],16);
}
this.custom(0,1);
},customColorRGB:function(from,to){
this.rgb_regex=new RegExp("^rgb.([^,]*),s?([^,]*),s?([^)]*)");
this.cs=this.rgb_regex.exec(from);
this.ce=this.rgb_regex.exec(to);
if(!this.cs){
this.customColor(from,to);
return;
}
for(i=1;i<this.cs.length;i++){
this.cs[i-1]=parseInt(this.cs[i]);
this.ce[i-1]=parseInt(this.ce[i]);
}
this.custom(0,1);
}});
fx.Slide=Class.create();
Object.extend(Object.extend(fx.Slide.prototype,fx.Layout.prototype),{increase:function(){
this.el.style.height=this.now+"px";
},toggle:function(){
if(this.el.offsetHeight>0){
this.custom(this.el.offsetHeight,0);
}else{
this.custom(0,this.el.scrollHeight);
}
}});
function toggleOverlay(id){
toggleOverlay.init(id);
toggleOverlay.toggleCurtain();
};
toggleOverlay.init=function(id){
this.overlay=$(id);
this.wrapper=this.getWrapper();
this.curtain=this.getCurtain();
this.wrapper.appendChild(this.overlay);
this.iframe=this.getIframe();
if(navigator.userAgent.indexOf("Linux")!=-1){
tempObjects=document.body.getElementsByTagName("object");
this.elementsToHide=[];
for(var i=0;i<tempObjects.length;i++){
if(!$(tempObjects[i]).descendantOf(this.overlay)){
this.elementsToHide.push(tempObjects[i]);
}
}
}
};
toggleOverlay.toggleCurtain=function(id){
this.overlay.toggle();
if(this.curtain.style.display!="block"){
this.showCurtain();
}else{
this.hideCurtain();
}
};
toggleOverlay.showCurtain=function(){
this.setElementVisibility("hidden");
this.iframe.style.display="block";
this.wrapper.style.display="block";
this.curtain.style.display="block";
this.stretchCurtain();
Event.observe(window,"resize",this.stretchCurtain,false);
};
toggleOverlay.hideCurtain=function(){
this.setElementVisibility("visible");
this.iframe.style.display="none";
this.curtain.style.display="none";
this.wrapper.style.display="none";
Event.stopObserving(window,"resize",this.stretchCurtain,false);
};
toggleOverlay.setElementVisibility=function(_29c){
if(this.elementsToHide){
for(i=0;i<this.elementsToHide.length;i++){
this.elementsToHide[i].style.visibility=_29c;
}
}
};
toggleOverlay.getWrapper=function(){
var id="toggleOverlayWrapper";
var div=$(id);
if(div){
return div;
}
div=document.createElement("div");
div.id=id;
document.body.appendChild(div);
div.style.position="fixed";
div.style.zIndex="1000";
return div;
};
toggleOverlay.getCurtain=function(){
var id="toggleOverlayCurtain";
var _2a0=$(id);
if(_2a0){
return _2a0;
}
_2a0=document.createElement("div");
_2a0.id=id;
this.wrapper.appendChild(_2a0);
return _2a0;
};
toggleOverlay.getIframe=function(){
var id="toggleOverlayIframe";
var _2a2=$(id);
if(_2a2){
return _2a2;
}
_2a2=document.createElement("iframe");
_2a2.id=id;
_2a2.src="";
_2a2.frameBorder="no";
_2a2.scrolling="no";
document.body.appendChild(_2a2);
return _2a2;
};
toggleOverlay.stretchCurtain=function(){
if(document.documentElement){
height=document.documentElement.scrollHeight;
}else{
height=document.body.scrollHeight;
}
toggleOverlay.wrapper.style.height=height+"px";
toggleOverlay.wrapper.style.width=document.body.scrollWidth+"px";
toggleOverlay.iframe.style.height=height+"px";
toggleOverlay.iframe.style.width=document.body.scrollWidth+"px";
if(navigator.userAgent.indexOf("AppleWebKit/")>-1&&!document.evaluate){
wd=self["innerWidth"];
}else{
if(navigator.userAgent.indexOf("Opera")>-1&&parseFloat(window.opera.version())<9.5){
wd=document.body["clientWidth"];
}else{
wd=document.documentElement["clientWidth"];
}
}
left=wd/2-toggleOverlay.overlay.clientWidth/2+"px";
toggleOverlay.overlay.style.left=left;
};
var detect=navigator.userAgent.toLowerCase();
var OS,browser,version,total,thestring;
if(checkIt("konqueror")){
browser="Konqueror";
OS="Linux";
}else{
if(checkIt("safari")){
browser="Safari";
}else{
if(checkIt("opera")){
browser="Opera";
}else{
if(checkIt("msie")){
browser="IE";
}else{
if(!checkIt("compatible")){
browser="Netscape Navigator";
version=detect.charAt(8);
}else{
browser="An unknown browser";
}
}
}
}
}
if(!version){
version=detect.charAt(place+thestring.length);
}
if(!OS){
if(checkIt("linux")){
OS="Linux";
}else{
if(checkIt("x11")){
OS="Unix";
}else{
if(checkIt("mac")){
OS="Mac";
}else{
if(checkIt("win")){
OS="Windows";
}else{
OS="an unknown operating system";
}
}
}
}
}
var insideHubEditor=false;
function checkIt(_2a3){
place=detect.indexOf(_2a3)+1;
thestring=_2a3;
return place;
};
function ssToId(id){
var s=new SoftScroll(id);
return false;
};
function ssTo(_2a6){
var s=new SoftScroll("mod_"+_2a6);
return false;
};
function ssOnload(){
var _2a8=location.hash.slice(1);
if(_2a8=="comments"){
ssToId("comFirst");
}else{
if(_2a8.substr(0,8)=="comment-"){
ssToId("comment"+_2a8.substr(8));
}else{
if(_2a8!=null&&_2a8){
ssToId(_2a8);
}
}
}
};
var SoftScroll=Class.create();
SoftScroll.prototype={initialize:function(ele,_2aa,_2ab){
this.ele=$(ele);
this.durat=_2aa||1000;
this.delay=_2ab||0;
if(this.delay){
setTimeout(this.toggle.bind(this),this.delay);
}else{
this.toggle();
}
},toggle:function(){
this.scroll=new fx.Scroll({duration:this.durat});
this.scroll.scrollTo(this.ele);
}};
function insertVideo(type,key,css,_2af,_2b0,_2b1){
var _2b2="<div class=\"video\">";
var mode="opaque";
if(_2b0){
mode="transparent";
}
if(_2b1=="bad"){
_2b2="<div class=\"video\" style=\"background-color: #f7e1e1; border-bottom:3px solid #ed9693; color: #440000; padding: 5px;\">"+"<p style=\"margin:0;\">&nbsp;The specified URL is not working</p></div>";
}
if(type=="Google"){
_2b2+="<embed style=\""+_2af+"\" class=\""+css+"\" "+"type=\"application/x-shockwave-flash\" id=\"VideoPlayback\" "+"src=\"http://video.google.com/googleplayer.swf?docId="+key+"&hl=en\""+" flashvars=\"\" wmode=\""+mode+"\">"+"</embed>";
}else{
if(type=="YouTube"){
_2b2+="<embed style=\""+_2af+"\" class=\""+css+"\" "+"type=\"application/x-shockwave-flash\" "+"src=\"http://www.youtube.com/v/"+key+"\" scale=\"exactFit\" "+"wmode=\""+mode+"\">"+"</embed>";
}else{
if(type=="Revver"){
_2b2+="<embed style=\""+_2af+"\" class=\""+css+"\" "+"type=\"application/x-shockwave-flash\" "+"src=\"http://flash.revver.com/player/1.0/player.swf?mediaId="+key+"\" scale=\"exactFit\" "+"wmode=\""+mode+"\" allowfullscreen=\"true\" allowScriptAccess=\"always\" flashvars=\"allowFullScreen=true\">"+"</embed>";
}else{
if(type=="Metacafe"){
_2b2+="<embed style=\""+_2af+"\" class=\""+css+"\" "+"type=\"application/x-shockwave-flash\" "+"src=\"http://www.metacafe.com/fplayer/"+key+".swf\" scale=\"exactFit\" "+"wmode=\""+mode+"\">"+"</embed>";
}else{
if(type=="Yahoo"){
var vid=key.substr(0,key.indexOf("/"));
var id=key.substr(key.indexOf("/")+1);
_2b2+="<embed class=\""+css+"\" flashvars=\"callback_function=YAHOO.yv.Player.SWFInterface&amp;id="+id+"&amp;vid="+vid+"&amp;autoPlay=0"+"&amp;site=video.yahoo.com&amp;lang=en-US&amp;intl=us&amp;"+"thumbUrl=http%3A//us.i1.yimg.com/us.yimg.com/i/us/sch/cn/video08/"+vid+"_rnde180d393_19.jpg\""+" allowfullscreen=\"true\" allowscriptaccess=\"never\" quality=\"high\" bgcolor=\"#000\" scale=\"exactFit\" "+" src=\"http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf\""+" type=\"application/x-shockwave-flash\" wmode=\""+mode+"\" />";
}else{
if(type=="Vimeo"){
_2b2+="<embed style=\""+_2af+"\" class=\""+css+"\" "+"type=\"application/x-shockwave-flash\" "+"src=\"http://vimeo.com/moogaloop.swf?clip_id="+key+"&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;"+"show_portrait=0&amp;color=&amp;fullscreen=1\" scale=\"exactFit\" allowFullscreen=\"true\" allowScriptAccess=\"never\" "+"wmode=\""+mode+"\">"+"</embed>";
}else{
if(type=="BlipTV"){
_2b2+="<embed style=\""+_2af+"\" class=\""+css+"\" "+"type=\"application/x-shockwave-flash\" "+"src=\"http://blip.tv/play/"+key+"\" scale=\"exactFit\" allowFullscreen=\"true\" allowScriptAccess=\"always\" "+"wmode=\""+mode+"\">"+"</embed>";
}else{
if(type=="Unknown"){
_2b2+="<p style=\"margin-left:1em\">The specified URL was not recognized</p>";
}else{
_2b2+="<p style=\"margin-left:1em\">Video Not Available</p>";
}
}
}
}
}
}
}
}
_2b2+="</div>";
if(_2b0){
Element.update(_2b0,_2b2);
}else{
if(type!="New"){
document.write(_2b2);
}
}
};
function tagFan(id,_2b7){
var _2b8="tagFan_"+id;
var uri=$H({k:id,action:_2b7}).toQueryString();
var ajax=new Ajax.Updater({success:_2b8},"/xml/tagFan.php",{parameters:uri,onFailure:reportError});
return false;
};
function recArt(id,val){
var _2bd="rec_"+id;
var uri=$H({a:id,v:val}).toQueryString();
var ajax=new Ajax.Updater({success:_2bd},"/xml/feedback.php",{parameters:uri,onFailure:reportError});
return false;
};
function requestStatus(id,_2c1,_2c2){
var uri=$H({a:id,v:_2c2}).toQueryString();
var ajax=new Ajax.Updater({success:_2c1},"/xml/request.php",{parameters:uri,onFailure:reportError});
return false;
};
function categoryFanSignupNewUser(){
if(categoryFanCountChecked()==0){
$("warning").show();
}else{
categoryFanBulkJoin("category_fan_new_user",true);
}
};
function categoryFanSearchNewUser(){
$("nextStep").show();
categoryFanSearch("category_fan_new_user","category_fan_search_text",12);
};
function categoryFanMy(){
categoryFanBulkJoin("my_category_fans",false,true);
$("category_fan_search").innerHTML="";
$("category_fan_search_text").value="";
return false;
};
function categoryFanCountChecked(){
var _2c5=document.getElementsByClassName("jc");
var _2c6=0;
for(var j=0;j<_2c5.length;j++){
if(_2c5[j].checked){
_2c6++;
}
}
return _2c6;
};
function categoryFanBulkJoin(id,_2c9,_2ca){
var _2cb=document.getElementsByClassName("jc");
var cids=Array();
var _2cd=Array();
var i=0;
var k=0;
for(var j=0;j<_2cb.length;j++){
if(_2cb[j].checked){
cids[i++]=Number(_2cb[j].name.substr(3));
}else{
_2cd[k++]=Number(_2cb[j].name.substr(3));
}
}
checked_ids=cids.join(",");
unchecked_ids=_2cd.join(",");
var ajax=new Ajax.Updater({success:id},"/xml/categoryFanBulkJoin.php",{parameters:$H({checked_ids:checked_ids,unchecked_ids:unchecked_ids,html_target:id}).toQueryString(),onSuccess:function(){
if(_2c9){
window.location.replace("/contacts/newuser.php");
}else{
if(_2ca){
setTimeout(categoryFanHighlight,500);
}
}
}});
return false;
};
function categoryFanHighlight(){
var elts=$$(".highlighted");
elts.each(function(elt){
var _2d4=new fx.Color(elt,{duration:700,fromColor:"#feffd7",toColor:"#ffffff"});
_2d4.toggle();
});
};
function categoryFanSearch(_2d5,_2d6,_2d7,cols){
if(!_2d7){
var _2d7=8;
}
if(!cols){
var cols=2;
}
var ajax=new Ajax.Updater({success:_2d5},"/xml/categoryFanSearch.php",{parameters:$H({search:$F(_2d6),limit:_2d7,cols:cols})});
return false;
};
function ignoreBrokenLink(_2da,_2db,tag){
ajax=new Ajax.Request("/xml/removelinkwarning.php",{parameters:"urlId="+_2db+"&articleId="+_2da,onFailure:reportError,onComplete:function(req){
$(tag).parentNode.update("<span class='recorded ignored'>ignored</span>");
}});
return false;
};
function toggleActivityPrefs(){
var _2de=$("edit_button");
var _2df=$("filter").value;
var _2e0="edit";
if(_2de.innerHTML=="save changes"){
_2e0="save";
}
if(_2e0=="save"){
var _2e1=0;
var _2e2=document.getElementsByClassName("ht_box");
for(var j=0;j<_2e2.length;j++){
if(_2e2[j].checked){
_2e1+=Number(_2e2[j].name.substr(3));
}
}
var _2e4=$("current_prefs");
if(_2e1!=_2e4.value){
var _2e5=function(){
Element.update(_2de,"saved");
_2de.style.background="#ebb";
var text=new fx.Text(_2de,{duration:400,onComplete:function(){
this.custom(1.3,1);
this.options.onComplete=function(){
Element.update($("edit_button"),"edit preferences");
$("edit_button").style.background="#999";
};
}});
text.custom(1,1.3);
};
var ajax=new Ajax.Updater({success:"content"},"/xml/activityPref.php",{parameters:$H({prefs:_2e1,filter:_2df}).toQueryString(),onComplete:_2e5});
_2e4.value=_2e1;
}else{
Element.update(_2de,"no changes");
_2de.style.background="#ebb";
_2de.style.text_decoration="none";
var text=new fx.Text(_2de,{duration:400,onComplete:function(){
this.custom(1.3,1);
this.options.onComplete=function(){
Element.update($("edit_button"),"edit preferences");
$("edit_button").style.background="#999";
};
}});
text.custom(1,1.3);
}
}
var curs=document.getElementsByClassName("ht_cur");
var _2ea="";
for(var i=0;i<curs.length;i++){
_2ea=curs[i].className;
}
var eles=document.getElementsByClassName("ht_pref");
for(var i=0;i<eles.length;i++){
if(_2e0=="edit"){
if(_2ea=="ht_all ht_cur"){
eles[i].style.display="block";
}else{
if(eles[i].parentNode.className==_2ea){
eles[i].style.display="block";
}
}
}else{
eles[i].style.display="none";
}
}
if(_2e0=="edit"){
_2de.innerHTML="save changes";
}
return false;
};
function toggleShareIt(id,flg){
if(flg){
var uri=$H({art_id:id}).toQueryString();
var ajax=new Ajax.Updater({success:"share_tgt"},"/xml/shareit.php",{parameters:uri,onFailure:reportError});
}else{
$("share_tgt").innerHTML="";
}
return false;
};
function expandComments(id,mm,flg){
if(flg){
var _2f4=$H({mdc_id:id,modMode:mm}).toQueryString();
var ajax=new Ajax.Updater({success:"comment_tgt"},"/xml/comments.php",{parameters:_2f4,onFailure:reportError});
}else{
$("comment_tgt").innerHTML="";
}
return false;
};
function changeTags(_2f6,_2f7,_2f8){
var ajax=new Ajax.Updater({success:"tagmap"},"/xml/tagmap.php",{parameters:$H({user_id:_2f6,randomize:_2f7,display:_2f8}).toQueryString(),onFailure:reportError});
return false;
};
function toggleStats(e,id){
var tar=Event.element(e);
var pane=$("authorcenter_pane");
if(tar.showing_stats){
Element.hide(pane);
Element.update(tar,tar.showing_stats);
tar.showing_stats=false;
}else{
var _2fe=function(req){
Element.show(pane);
tar.showing_stats=tar.innerHTML;
Element.update(tar,"&nbsp;HIDE STATS&nbsp;");
};
var ajax=new Ajax.Updater({success:"authorcenter_pane"},"/xml/articlestats.php",{onComplete:_2fe,parameters:$H({art_id:id}).toQueryString(),onFailure:reportError});
}
return false;
};
function toggleUserStats(e,id){
var tar=Event.element(e);
var pane=$("usercenter_pane");
if(tar.showing_stats){
Element.hide(pane);
Element.update(tar,tar.showing_stats);
tar.showing_stats=false;
}else{
var _305=function(req){
Element.show(pane);
tar.showing_stats=tar.innerHTML;
Element.update(tar,"&nbsp;HIDE STATS&nbsp;");
};
var ajax=new Ajax.Updater({success:"usercenter_pane"},"/xml/userstats.php",{onComplete:_305,parameters:$H({user_id:id}).toQueryString(),onFailure:reportError});
}
return false;
};
function toggleRequestStats(e,id){
var tar=Event.element(e);
var pane=$("requestcenter_pane");
if(tar.showing_stats){
Element.hide(pane);
Element.update(tar,tar.showing_stats);
tar.showing_stats=false;
}else{
var _30c=function(req){
Element.show(pane);
tar.showing_stats=tar.innerHTML;
Element.update(tar,"&nbsp;HIDE STATS&nbsp;");
};
var ajax=new Ajax.Updater({success:"requestcenter_pane"},"/xml/requeststats.php",{onComplete:_30c,parameters:$H({request_id:id}).toQueryString(),onFailure:reportError});
}
return false;
};
function toggleCategoryStats(e,id){
var tar=Event.element(e);
var pane=$("categorycenter_pane");
if(tar.showing_stats){
Element.hide(pane);
Element.update(tar,tar.showing_stats);
tar.showing_stats=false;
}else{
var _313=function(req){
Element.show(pane);
tar.showing_stats=tar.innerHTML;
Element.update(tar,"&nbsp;HIDE STATS&nbsp;");
};
var ajax=new Ajax.Updater({success:"categorycenter_pane"},"/xml/categorystats.php",{onComplete:_313,parameters:$H({category_id:id}).toQueryString(),onFailure:reportError});
}
return false;
};
function toggleMyAccountHelp(){
var _316=$("show_myhelp");
var _317=$("myhelp");
if(_316.innerHTML=="help"){
Element.show(_317);
Element.update(_316,"hide");
}else{
Element.hide(_317);
Element.update(_316,"help");
}
return false;
};
function showDupeHistory(){
var hist=$("toggle_history");
var pane=$("dupe_history");
if(hist.innerHTML=="hide history"){
Element.hide(pane);
Element.update(hist,"show history");
}else{
Element.show(pane);
Element.update(hist,"hide history");
}
return false;
};
function updateDupes(e,_31b){
var tar=Event.element(e);
var pane=$("dupe_history");
var hist=$("toggle_history");
Element.update(tar,"processing");
var _31f=function(req){
Element.show(pane);
Element.update(tar,"check");
Element.update(hist,"hide history");
};
var ajax=new Ajax.Updater({success:"dupe_history"},"/xml/dupecheck.php",{onComplete:_31f,parameters:$H({articleId:_31b}).toQueryString(),onFailure:reportError});
return false;
};
function activity_why(id,_323,_324,_325){
var ajax=new Ajax.Updater({success:id},"/xml/activity_why.php",{parameters:$H({actionTypeId:_323,actionTargetId:_324,createDate:_325}).toQueryString(),onFailure:reportError,onComplete:function(){
if(typeof canvas!="undefined"&&canvas.redraw){
canvas.redraw();
}
}});
return false;
};
function request_reviewed(id){
var ajax=new Ajax.Updater({success:"request_reviewed"},"/xml/request_reviewed.php",{parameters:$H({req_id:id}).toQueryString(),onFailure:reportError});
};
function article_reviewed(id){
var ajax=new Ajax.Updater({success:"article_reviewed"},"/xml/article_reviewed.php",{parameters:$H({art_id:id}).toQueryString(),onFailure:reportError});
};
function article_flag(id,flag){
var ajax=new Ajax.Updater({success:"flaglink_"+id+"_"+flag},"/xml/flaghub.php",{parameters:$H({aID:id,reason:flag}).toQueryString(),onFailure:reportError});
};
function article_learn(_32e,_32f,key){
var ajax=new Ajax.Updater({success:"learn"},"/xml/authorcenter_learn.php",{parameters:$H({artId:_32e,flagId:_32f,key:key}).toQueryString(),onFailure:reportError});
$("learn").style.display="block";
};
function ellipse(str,_333){
if(str.length>_333&&_333!=0){
str=str.substr(0,_333-3);
var pos=str.lastIndexOf(" ");
if(pos===-1){
str=str.substr(0,_333-3)+"...";
}else{
str=str.substr(0,pos)+"...";
}
}
return str;
};
function loadRandomArt(_335,_336){
var ajax=new Ajax.Request("/xml/random.php",{method:"post",parameters:"score="+_336,onFailure:reportError,onComplete:function(req){
_335.location.href=req.responseText;
}});
};
function toggleCommentEdit(_339,_33a){
if(_33a){
$("cedit_"+_339).style.display="none";
$("cbox_"+_339).style.display="";
$("ctext_"+_339).style.display="none";
}else{
$("cedit_"+_339).style.display="";
$("cbox_"+_339).style.display="none";
$("ctext_"+_339).style.display="";
}
};
function reportError(req){
alert("Something went wrong.  Please try again. And when you get a chance, report this issue using the 'feedback' link.");
var _33c=req.getAllResponseHeaders();
var ajax=new Ajax.Request("/xml/reporterror.php",{parameters:_33c+"&error=1"});
};
function addTagEntries(){
var _33e=4;
var _33f=document.createElement("div");
_33f.id="moreEntryDiv";
var li=null;
var _341=4+1;
var _342=_341+_33e;
for(var i=_341;i<_342;i++){
li=document.createElement("li");
_33f.appendChild(li);
var _344=document.createElement("input");
_344.className="tagEntry";
_344.name="tag_"+i;
_344.type="text";
_344.size=40;
li.appendChild(_344);
}
$("tagEntries").appendChild(_33f);
return true;
};
function hubtool_add_tag(_345){
var _346=(_345)?$(_345):$("add_tag_input");
if(!_346){
return;
}
var tag;
if(Field.present(_346)&&_346.type){
tag=$F(_346);
Field.clear(_346);
}else{
if(_346.innerHTML){
tag=_346.innerHTML;
Element.remove(Element.findElement(_346,"li"));
}
}
if(!tag){
return;
}
var _348=0;
var _349=/^tag_(\d+)$/i;
var _34a=document.getElementsByClassName("tagEntry");
_34a.each(function(ele){
if(ele.id){
var ms=_349.exec(ele.id);
if(ms&&ms.length>0){
var id=parseInt(ms[1],10);
if($F(ele).length&&id>_348){
_348=id;
}
}
}
});
_348++;
var _34e="tag_"+_348;
var _34f=$("add_tag_input").parentNode;
var _350="<input class=\"tagEntry\" id=\""+_34e+"\" name=\""+_34e+"\" value=\""+tag+"\" size=\"30\" onFocus=\"_helpOn('help__tags')\" onBlur=\"_helpOff('help__tags')\" />";
if($(_34e)){
var _351=$(_34e).tabIndex;
Element.update($(_34e).parentNode,_350);
$(_34e).tabIndex=_351;
}else{
var _352=$("tag_1").tabIndex-1;
var _351=_352+_348;
var pole=new Insertion.Before(_34f,"<li>"+_350+"</li>");
$(_34e).tabIndex=_351;
_351=$("add_tag_input").tabIndex;
_351++;
$("add_tag_input").tabIndex=_351;
}
return false;
};
function add_calculated_tag(_354,tag,_356){
var _357=tag.replace(/'/g,"\\'");
var _358=tag.replace(/ /g,"+");
var _359="tagd_"+tag.replace(/ /g,"_");
_359=_359.toLowerCase();
if($(_359)){
$(_359).style.fontWeight="bolder";
Field.clear("add_tag_input");
}else{
if(!tag.match(/^[a-zA-Z0-9 \-\'\&\.]{2,100}$/)){
alert("Invalid tag \""+tag+"\".\n\nTags should be from 2-100 characters, and contain only numbers, letters, spaces, dashes, periods, and ampersands.");
}else{
var _35a=$("nav_tags_edit");
var _35b="<a href=\"javascript:void delete_tag('"+_354+"','"+_357+"');\"><img src=\"http://x.hubpages.com/x/hubtool_discard_tag.gif\" width=\"14\" height=\"14\"/></a>";
_35b+="<a id=\""+_359+"\" href=\"/tag/"+_358+"\">"+tag+"</a>";
var item=document.createElement("li");
item.innerHTML=_35b;
_35a.appendChild(item);
save_tag(_354,tag,false);
}
}
var _35d=$(_356);
Element.remove(Element.findElement(_35d,"li"));
return false;
};
function update_suggested_tags(_35e){
var _35f=$H({id:_35e});
var ajax=new Ajax.Updater({success:"suggested_tags"},"/xml/suggestedtags.php",{parameters:_35f,onFailure:reportError,onComplete:function(){
}});
};
function add_tag(_361){
if(!$("add_tag_input")||!$F("add_tag_input")){
return;
}
var tag=$F("add_tag_input");
var _363=tag.replace(/'/g,"\\'");
var _364=tag.replace(/ /g,"+");
var _365="tagd_"+tag.replace(/ /g,"_");
_365=_365.toLowerCase();
if($(_365)){
$(_365).style.fontWeight="bolder";
Field.clear("add_tag_input");
}else{
if(!tag.match(/^[a-zA-Z0-9 \-\'\&\.]{2,100}$/)){
alert("Invalid tag \""+tag+"\".\n\nTags should be from 2-100 characters, and contain only numbers, letters, spaces, dashes, periods, and ampersands.");
}else{
var _366=$("nav_tags_edit");
var _367="<a href=\"javascript:void delete_tag('"+_361+"','"+_363+"');\"><img src=\"http://x.hubpages.com/x/hubtool_discard_tag.gif\" width=\"14\" height=\"14\"/></a>";
_367+="<a id=\""+_365+"\" href=\"/tag/"+_364+"\">"+tag+"</a>";
var item=document.createElement("li");
item.innerHTML=_367;
_366.appendChild(item);
save_tag(_361,tag,false);
Field.clear("add_tag_input");
}
}
return false;
};
function delete_tag(_369,tag){
if(!_369||!tag){
return;
}
var _36b="tagd_"+tag.replace(/ /g,"_");
var _36c=$(_36b);
if(!_36c){
return;
}
var li=_36c.parentNode;
Element.remove(li);
save_tag(_369,tag,true);
return false;
};
function save_tag(_36e,tag,del){
var _371=(del)?1:0;
var req={a:_36e,v:tag,d:_371};
var _373=$H(req).toQueryString();
var ajax=new Ajax.Request("/xml/tagadd.php",{parameters:_373,onFailure:reportError,onComplete:function(){
}});
};
function handleReturnKeyPress(_375,func){
_375=_375||window.event;
if(_375.keyCode==Event.KEY_RETURN){
Event.stop(_375);
func();
return false;
}else{
return true;
}
};
function fireOnReturn(_377,func){
Event.observe(_377,"keyup",function(_379){
_379=_379||window.event;
if(_379.which){
if(_379.which==Event.KEY_RETURN){
_379.preventDefault();
func();
}
}else{
if(_379.keyCode){
if(_379.keyCode==Event.KEY_RETURN){
Event.stop(_379);
func();
}
}
}
},false);
};
function moderate_comment(_37a,_37b,_37c){
if(!_37a||!_37b||!_37c){
return;
}
ccId="cc_"+_37a+"_"+_37b;
var req={mod_id:_37a,comment_id:_37b,action:_37c};
var _37e=$H(req).toQueryString();
var ajax=new Ajax.Updater({success:ccId},"/xml/modcom.php",{parameters:_37e,onFailure:reportError});
return false;
};
function moderate_fanmail(_380,_381,_382){
if(!_380||!_381){
return;
}
ccId="fanmail__"+_380+"__"+_381;
var _383=$(ccId);
if(!_383){
return;
}
var req={fan_id:_380,comment_id:_381,action:_382};
var _385=$H(req).toQueryString();
var ajax=new Ajax.Updater({success:ccId},"/xml/modfanmail.php",{parameters:_385,onFailure:reportError});
return false;
};
function save_aff(aff,val){
if(!aff){
return;
}
var req={aff:aff,v:val};
var _38a=$H(req).toQueryString();
var ajax=new Ajax.Request("/xml/userprofile.php",{parameters:_38a,onFailure:reportError,onComplete:function(_38c){
var _38d=$(aff+"_code_status");
Element.update(_38d,"Saved");
var _38e=_38c.responseText;
if(_38e!="Set"&&_38e!="Not Set"){
_38e="Error";
}
var text=new fx.Text(_38d,{duration:500,onComplete:function(){
this.custom(1.6,1);
this.options.onComplete=function(){
Element.update(_38d,_38e);
};
}});
text.custom(1,1.6);
}.bind(aff)});
return false;
};
function InlineEdit(){
};
InlineEdit._registered=[];
InlineEdit._onedit=[];
InlineEdit._ondone=[];
InlineEdit._editting=[];
InlineEdit._setonclick=false;
InlineEdit.register=function(ele,_391){
var obj=$(ele);
obj.title="Click to edit";
obj.style.backgroundColor="#ffe";
obj.empty_text="";
InlineEdit._registered[obj.id]=_391;
obj.highlight=function(){
if(this.hide_timer){
clearTimeout(this.hide_timer);
}
this.style.backgroundColor="#ffffd3";
if(this.empty_text&&(this.innerHTML=="&nbsp;"||this.innerHTML==" "||this.innerHTML.charCodeAt(0)==160)){
this.innerHTML=this.empty_text;
}
};
obj.onmouseover=obj.highlight;
obj.onmouseout=function(){
if(this.hide_timer){
clearTimeout(this.hide_timer);
}
this.hide_timer=setTimeout("var el=$('"+this.id+"');if (el) {el.unhighlight();}",1000);
};
obj.unhighlight=function(){
this.style.backgroundColor="#ffe";
if(this.empty_text&&this.innerHTML==this.empty_text){
this.innerHTML="&nbsp;";
}
};
if(!InlineEdit._setonclick){
document.onclick=InlineEdit._handleDocClick;
InlineEdit._setonclick=true;
}
};
InlineEdit.unregister=function(ele){
var obj=$(ele);
obj.title="";
if(obj.hide_timer){
clearTimeout(obj.hide_timer);
}
obj.onmouseover=function(){
};
obj.onmouseout=function(){
};
obj.style.backgroundColor="";
delete InlineEdit._registered[obj.id];
};
InlineEdit.registerCallbacks=function(ele,_396,_397){
var obj=$(ele);
InlineEdit._onedit[obj.id]=_396;
InlineEdit._ondone[obj.id]=_397;
};
InlineEdit._handleDocClick=function(e){
if(!document.getElementById||!document.createElement){
return;
}
var obj;
if(!e){
obj=window.event.srcElement;
}else{
obj=e.target;
}
while(obj.nodeType!=1){
obj=obj.parentNode;
}
if(obj.tagName=="TEXTAREA"||obj.tagName=="A"){
return;
}
while(!InlineEdit._registered[obj.id]&&obj.nodeName!="HTML"){
obj=obj.parentNode;
}
if(obj.nodeName=="HTML"){
return;
}
InlineEdit.edit(obj);
};
InlineEdit.edit=function(ele){
ele=$(ele);
if(!InlineEdit._registered[ele.id]){
return false;
}
if(InlineEdit._onedit[ele.id]){
var _39c=InlineEdit._onedit[ele.id];
_39c(ele);
}
var text=ele.innerHTML;
if(ele.empty_text&&ele.empty_text==text){
text=" ";
}
var _39e=document.createElement("INPUT");
_39e.type="text";
Element.cloneStyles(ele,_39e);
ele.parentNode.insertBefore(_39e,ele);
InlineEdit._insertEditSpanBefore(ele);
_39e.id=ele.id+"_edit_inplace";
InlineEdit._editting[_39e.id]=ele;
Element.remove(ele);
_39e.value=text;
_39e.focus();
_39e.select();
return false;
};
InlineEdit._onButtonClick=function(_39f){
_39f=_39f||window.event;
var _3a0=_39f.target||_39f.srcElement;
var _3a1=(_3a0.innerHTML.search(/CANCEL/)==-1)?true:false;
var _3a2=_3a0.parentNode;
var _3a3=_3a2;
while(_3a3&&!InlineEdit._editting[_3a3.id]){
_3a3=_3a3.previousSibling;
}
var _3a4=InlineEdit._editting[_3a3.id];
_3a3.hasFocus=false;
var z=_3a3.parentNode;
z.insertBefore(_3a4,_3a3);
z.removeChild(_3a3);
z.removeChild(document.getElementsByClassName("buttonSpan",z)[0]);
delete InlineEdit._editting[_3a3.id];
if(InlineEdit._ondone[_3a4.id]){
var _3a6=InlineEdit._ondone[_3a4.id];
_3a6(_3a4);
}
if(_3a1){
_3a4.innerHTML=(_3a3.value.length>0)?_3a3.value:"&nbsp;";
var _3a7=InlineEdit._registered[_3a4.id];
_3a7(_3a3.value);
}
};
InlineEdit._insertEditSpanBefore=function(obj){
if(document.getElementById&&document.createElement){
var _3a9=document.createElement("span");
_3a9.className="buttonSpan";
var butt=document.createElement("button");
var _3ab=document.createTextNode("OK");
butt.appendChild(_3ab);
_3a9.appendChild(butt);
var _3ac=document.createElement("button");
var _3ad=document.createTextNode("CANCEL");
_3ac.appendChild(_3ad);
_3a9.appendChild(_3ac);
obj.parentNode.insertBefore(_3a9,obj);
butt.onclick=InlineEdit._onButtonClick;
_3ac.onclick=InlineEdit._onButtonClick;
}
};
var SampleDuration=Class.create();
SampleDuration.prototype={initialize:function(_3ae){
this.art_id=_3ae;
this.t=new Timer();
this.onleaveListener=this.onleave.bindAsEventListener(this);
Event.observe(window,"beforeunload",this.onleaveListener,false);
},onleave:function(e){
e=e||window.event;
this.t.stop();
var _3b0=$H({art_id:this.art_id,dur:this.t.length});
var ajax=new Ajax.Request("/xml/duration",{parameters:_3b0.toQueryString()});
}};
var myGlobalHandlers={onCreate:function(){
this.flag(true);
},onComplete:function(){
if(Ajax.activeRequestCount==0){
this.flag(false);
this.shouldShowIcon=false;
}
},onScroll:function(){
var div=insideHubEditor?$("ajaxing_big"):$("ajaxing");
if(div){
var _3b3=insideHubEditor?200:0;
div.style.top=(Position.getViewportScrollY()+_3b3)+"px";
}
},flagUp:function(){
this.flag(true);
},flagDown:function(){
this.flag(false);
},flag:function(up){
if(up){
this.shouldShowIcon=true;
setTimeout(this.showIcon.bind(this),2000);
}else{
if(!this.iconVisible){
return;
}
var _3b5=insideHubEditor?$("ajaxing_big"):$("ajaxing");
if(_3b5){
this.shouldShowIcon=false;
_3b5.style.display="none";
Event.stopObserving(window,"scroll",this.scrollListener,false);
this.scrollListener=null;
this.iconVisible=false;
}
}
},showIcon:function(id){
if(this.shouldShowIcon&&!this.iconVisible&&Ajax.activeRequestCount>0){
this.iconVisible=true;
var _3b7=insideHubEditor?$("ajaxing_big"):$("ajaxing");
_3b7.style.display="inline";
this.onScroll();
this.scrollListener=this.onScroll.bindAsEventListener(this);
Event.observe(window,"scroll",this.scrollListener,false);
}
}};
Ajax.Responders.register(myGlobalHandlers);
Element.setOpacity=function(ele,_3b9){
ele=$(ele);
if(window.ActiveXObject){
ele.style.filter="alpha(opacity="+Math.round(_3b9*100)+")";
}
ele.style.opacity=_3b9;
};
Element.getCurrentStyle=function(ele){
ele=$(ele);
var _3bb;
if(document.defaultView){
_3bb=document.defaultView.getComputedStyle(ele,"");
}else{
_3bb=ele.currentStyle;
}
return _3bb;
};
Element.cloneStyles=function(ele,_3bd,_3be){
ele=$(ele);
_3bd=$(_3bd);
var _3bf=Element.getCurrentStyle(ele);
for(var name in _3bf){
if(browser=="Opera"){
if(name=="height"||name=="pixelHeight"||name=="pixelWidth"||name=="posHeight"||name=="posWidth"||name=="width"||name=="font"||name=="fontSize"){
continue;
}
}
var _3c1=_3bf[name];
if(_3c1!==""&&!(_3c1 instanceof Object)&&name!="length"&&name!="parentRule"){
if(_3be&&name.indexOf(_3be)!==0){
continue;
}
_3bd.style[name]=_3c1;
}
}
return _3bd;
};
Element.findElement=function(_3c2,_3c3){
_3c2=$(_3c2);
while(_3c2.parentNode&&(!_3c2.tagName||(_3c2.tagName.toUpperCase()!=_3c3.toUpperCase()))){
_3c2=_3c2.parentNode;
}
return _3c2;
};
String.prototype.trim=function(){
var res=this;
while(res.substring(0,1)==" "){
res=res.substring(1,res.length);
}
while(res.substring(res.length-1,res.length)==" "){
res=res.substring(0,res.length-1);
}
return res;
};
String.prototype.startsWith=function(_3c5){
var res=this;
return res.substring(0,_3c5.length)==_3c5;
};
Element.getWidth=function(ele){
ele=$(ele);
return ele.offsetWidth;
};
Element.ellipsis=function(ele,len){
len=len||(100);
var p=$(ele);
if(p&&p.innerHTML){
var _3cb=p.innerHTML;
if(_3cb.length>len){
_3cb=_3cb.substring(0,len);
_3cb=_3cb.replace(/\w+$/,"");
_3cb+="...";
p.innerHTML=_3cb;
}
}
};
Position.getViewportHeight=function(){
if(window.innerHeight!=window.undefined){
return window.innerHeight;
}
if(document.compatMode=="CSS1Compat"){
return document.documentElement.clientHeight;
}
if(document.body){
return document.body.clientHeight;
}
return window.undefined;
};
Position.getViewportWidth=function(){
if(window.innerWidth!=window.undefined){
return window.innerWidth;
}
if(document.compatMode=="CSS1Compat"){
return document.documentElement.clientWidth;
}
if(document.body){
return document.body.clientWidth;
}
return window.undefined;
};
Position.getDocumentHeight=function(){
return document.documentElement.scrollHeight;
};
Position.getDocumentWidth=function(){
return document.documentElement.scrollWidth;
};
Position.getViewportScrollX=function(){
var _3cc=0;
if(document.documentElement&&document.documentElement.scrollLeft){
_3cc=document.documentElement.scrollLeft;
}else{
if(document.body&&document.body.scrollLeft){
_3cc=document.body.scrollLeft;
}else{
if(window.pageXOffset){
_3cc=window.pageXOffset;
}else{
if(window.scrollX){
_3cc=window.scrollX;
}
}
}
}
return _3cc;
};
Position.getViewportScrollY=function(){
var _3cd=0;
if(document.documentElement&&document.documentElement.scrollTop){
_3cd=document.documentElement.scrollTop;
}else{
if(document.body&&document.body.scrollTop){
_3cd=document.body.scrollTop;
}else{
if(window.pageYOffset){
_3cd=window.pageYOffset;
}else{
if(window.scrollY){
_3cd=window.scrollY;
}
}
}
}
return _3cd;
};
Position.withinViewport=function(ele){
var off=Position.cumulativeOffset($(ele));
var _3d0=[0+Position.getViewportScrollX(),Position.getViewportScrollY()];
var _3d1=[_3d0[0]+Position.getViewportWidth(),_3d0[1]+Position.getViewportHeight()];
return (_3d0[0]<off[0]&&off[0]<_3d1[0]&&_3d0[1]<off[1]&&off[1]<_3d1[1]);
};
Position.set=function(ele,_3d3){
if(ele&&_3d3){
ele.style.left=_3d3[0]+"px";
ele.style.top=_3d3[1]+"px";
}
};
function updateAdLevelOptions(){
isCommercial=document.getElementById("isCommercial");
adLevelSelect=document.getElementById("adLevelSelect");
if(isCommercial.checked){
for(i=adLevelSelect.length-2;i>=0;i--){
adLevelSelect.options[i].disabled=true;
adLevelSelect.selectedIndex=adLevelSelect.length-1;
}
}else{
for(i=adLevelSelect.length-1;i>=0;i--){
adLevelSelect.options[i].disabled=false;
}
}
};
function select_all(name,_3d5,end){
for(var i=_3d5;i<=end;i++){
var ele=$(name+"_"+i);
if(ele){
ele.checked=true;
}
}
var disp=$(name+"_selected");
if(disp){
disp.innerHTML=(end-_3d5)+1;
}
update_plural(name);
};
function unselect_all(name,_3db,end){
for(var i=_3db;i<=end;i++){
var ele=$(name+"_"+i);
if(ele){
ele.checked=false;
}
}
var disp=$(name+"_selected");
if(disp){
disp.innerHTML=0;
}
update_plural(name);
};
function checkbox_onchange(name,num){
var disp=$(name+"_selected");
if(disp){
var ele=$(name+"_"+num);
if(ele.checked){
disp.innerHTML=parseInt(disp.innerHTML,10)+1;
update_plural(name);
}else{
disp.innerHTML=parseInt(disp.innerHTML,10)-1;
update_plural(name);
}
}
};
function update_plural(name){
var ele=document.getElementById(name+"_selected");
if(ele){
var disp=document.getElementById(name+"_plural");
if(disp){
if(parseInt(ele.innerHTML,10)==1){
disp.innerHTML=" is";
}else{
disp.innerHTML="s are";
}
}
}
};
function import_now(_3e7,name,_3e9,end){
var _3eb=self.opener.document.getElementById(_3e7);
if(_3eb){
for(var i=_3e9;i<=end;i++){
var ele=$(name+"_"+i);
if(ele&&ele.checked){
var _3ee=$(name+"_email_"+i);
if(_3eb.value.length<2||_3eb.value.charAt(_3eb.value.length)==","||_3eb.value.charAt(_3eb.value.length-1)==","){
_3eb.value=_3eb.value+_3ee.innerHTML;
}else{
_3eb.value=_3eb.value+", "+_3ee.innerHTML;
}
}
}
}else{
alert("cannot locate parent (opener) window!");
}
};
function charCounter(_3ef,_3f0,max){
var _3f2=document.getElementById(_3ef);
var _3f3=document.getElementById(_3f0);
if(!_3f2){
alert("charCounter bad source: "+_3ef);
}
if(!_3f3){
alert("charCounter bad source: "+_3f0);
}
if(_3f2.value.length>max){
_3f2.value=_3f2.value.substring(0,max);
}
_3f3.value=max-_3f2.value.length;
};
function hideAnswers(){
$("hiddenAnswers").hide();
$("hideAnswers").hide();
$("showAnswers").show();
return false;
};
function showAnswers(){
$("hiddenAnswers").show();
$("hideAnswers").show();
$("showAnswers").hide();
return false;
};
function answerVote(id,v){
new Ajax.Updater("voting_"+id,"/xml/answervote.php",{parameters:{id:id,vote:v}});
return false;
};
function answerVoteDown(id){
return answerVote(id,-1);
};
function answerVoteUp(id){
return answerVote(id,1);
};
function getEvent(evt){
return window.event||evt;
};
function getKeyProperties(evt){
var e=getEvent(evt);
var k=e.keyCode?e.keyCode:e.charCode?e.charCode:e.which;
var t=e.target?e.target:e.srcElement?e.srcElement:e.which;
return {evt:e,keyCode:k,target:t};
};
function checkTabKeyAlone(evt){
var p=getKeyProperties(evt);
return (p.keyCode==9&&!p.evt.shiftKey&&!p.evt.ctrlKey&&!p.evt.altKey);
};
function checkShiftTabKey(evt){
var p=getKeyProperties(evt);
return (p.keyCode==9&&p.evt.shiftKey&&!p.evt.ctrlKey&&!p.evt.altKey);
};
function getSelectionProperties(evt){
var p=getKeyProperties(evt);
var tr=(p.target.setSelectionRange)?null:document.selection.createRange();
var tab=String.fromCharCode(9);
if(tr){
var br=document.body.createTextRange();
br.moveToElementText(p.target);
br.setEndPoint("StartToStart",tr);
var ss=p.target.value.length-br.text.length;
var se=ss+tr.text.length;
}else{
var ss=p.target.selectionStart;
var se=p.target.selectionEnd;
}
return {setSelection:function(ss,se){
if(tr){
var adj=ss-tab.length*(p.target.value.substring(0,ss).split("\n").length-1);
var adj2=se+tab.length*(p.target.value.substring(se,p.target.value.length).split("\n").length-1);
var nr=document.body.createTextRange();
nr.moveToElementText(p.target);
nr.moveStart("character",adj);
nr.moveEnd("character",-(p.target.value.length-adj2));
nr.select();
}else{
p.target.selectionStart=ss;
p.target.selectionEnd=se;
}
},isMultiline:function(){
return (se>(ss+2)&&p.target.value.slice(ss,se-2).indexOf("\n")!=-1);
},removeTab:function(){
if(this.isMultiline()){
var sel=p.target.value.slice(ss,se);
var a=sel.split("\n");
for(var i=0;i<a.length;i++){
if(a[i].slice(0,1)==tab||a[i].slice(0,1)==" "){
a[i]=a[i].slice(1,a[i].length);
}
}
sel=a.join("\n");
var pre=p.target.value.slice(0,ss);
var post=p.target.value.slice(se,p.target.value.length);
p.target.value=pre.concat(sel,post);
this.setSelection(ss,pre.length+sel.length);
}else{
var brt=p.target.value.slice(0,ss);
var ch=brt.slice(brt.length-1,brt.length);
if(ch==tab||ch==" "){
p.target.value=brt.slice(0,brt.length-1).concat(p.target.value.slice(ss,p.target.value.length));
this.setSelection(ss-1,se-1);
}
}
},addTab:function(){
if(this.isMultiline()){
if(ss>0){
ss=p.target.value.slice(0,ss).lastIndexOf("\n")+1;
}
var pre=p.target.value.slice(0,ss);
var sel=p.target.value.slice(ss,se);
var post=p.target.value.slice(se,p.target.value.length);
sel=sel.replace(/\n/g,"\n"+tab);
pre=pre.concat(tab);
p.target.value=pre.concat(sel,post);
this.setSelection(ss,se+(tab.length*sel.split("\n").length));
}else{
var pre=p.target.value.substring(0,ss);
var sel=p.target.value.substring(ss,se);
var post=p.target.value.substring(se,p.target.value.length);
pre=pre.concat(tab);
p.target.value=pre.concat(sel,post);
this.setSelection(ss+tab.length,se+tab.length);
}
}};
};
function getTextAreaSelection(evt){
var p=getKeyProperties(evt);
if(p.target.setSelectionRange){
var ss=p.target.selectionStart;
var se=p.target.selectionEnd;
return (ss!=se)?p.target.value.slice(ss,se):null;
}else{
var r=document.selection.createRange();
return (r.text.length!=0)?r.text:null;
}
};
function updateNumCharCount(_41c,_41d,_41e){
if($(_41d).hasClassName("dimmed")){
$(_41e).update(_41c);
}else{
if($(_41d).value.length>_41c){
$(_41d).value=$(_41d).value.substring(0,_41c);
}
$(_41e).update(_41c-$(_41d).value.length);
}
};
function checkCharCount(_41f,_420,_421){
updateNumCharCount(_41f,_420,_421);
Event.observe(_420,"click",function(){
updateNumCharCount(_41f,_420,_421);
});
Event.observe(_420,"keypress",function(evt){
updateNumCharCount(_41f,_420,_421);
if(evt.keyCode!=Event.KEY_BACKSPACE&&evt.keyCode!=Event.KEY_LEFT&&evt.keyCode!=Event.KEY_RIGHT&&evt.keyCode!=Event.KEY_UP&&evt.keyCode!=Event.KEY_DOWN&&(browser=="Opera"||evt.keyCode!=Event.KEY_DELETE)){
if($(_420).value.length>=_41f){
Event.stop(evt);
return false;
}
}
return true;
});
Event.observe(_420,"keyup",function(){
updateNumCharCount(_41f,_420,_421);
});
Event.observe(_420,"keydown",function(){
updateNumCharCount(_41f,_420,_421);
});
};
function _drawPointerInd(_423,_424,_425){
if(typeof _425=="undefined"){
_425="ind";
}
var _426="<div id=\""+_425+"\"><div>"+_424+"</div></div>";
var pole=new Insertion.Bottom(_423,_426);
if(!window.ActiveXObject){
$(_425).style.position="fixed";
}
setTimeout(function(){
if($(_425)){
Element.remove(_425);
}
},3500);
};
function getElementScreenTop(){
var _428=(window.pageYOffset)?window.pageYOffset:(document.documentElement)?document.documentElement.scrollTop:document.body.scrollTop;
return _428;
};
function setElementScreenTop(top){
if(window.pageYOffset){
var x=window.pageXOffset;
window.scrollTo(x,top);
}else{
if(document.documentElement){
document.documentElement.scrollTop=top;
}else{
document.body.scrollTop=top;
}
}
};
function scrollElementInView(_42b){
var _42c=getElementScreenTop();
var top=getElementTop(_42b);
if(top<_42c){
setElementScreenTop(top);
}
};
function getElementDimensions(elem){
var top=0,left=0,_431=elem.getWidth(),_432=elem.getHeight();
do{
top+=elem.offsetTop;
left+=elem.offsetLeft;
elem=elem.offsetParent;
}while(elem!=null);
return {top:top,left:left,right:left+_431,bottom:top+_432};
};
function getElementTop(elem){
var top=0;
do{
top+=elem.offsetTop;
elem=elem.offsetParent;
}while(elem!=null);
return top;
};
function getElementLeft(elem){
var left=0;
do{
left+=elem.offsetLeft;
elem=elem.offsetParent;
}while(elem!=null);
return left;
};
function getElementRight(elem){
return getElementLeft(elem)+elem.getWidth();
};
function getElementBottom(elem){
return getElementTop(elem)+elem.getHeight();
};
function removePXFromSize(size){
if(size.length>2&&size.substring(size.length-2).toLowerCase()=="px"){
return size.substring(0,size.length-2);
}else{
return size;
}
};
function StringBuffer(){
this.buffer=[];
};
StringBuffer.prototype.append=function(_43a){
this.buffer.push(_43a);
return this;
};
StringBuffer.prototype.toString=function toString(){
return this.buffer.join("");
};
function dump_divs(){
var _43b="DIV REPORT:<br/>";
var divs=$A(document.getElementsByTagName("div"));
divs.each(function(div){
if(div.id){
_43b+="#"+div.id+", ";
}
_43b+="."+div.className+", "+div.offsetWidth+" x "+div.offsetHeight+"<br/>";
});
if(!$("debug_div")){
out("create");
}
$("debug_div").innerHTML=_43b;
};
function out(_43e){
if(window.console){
console.log(_43e);
}else{
var pole;
var _440="<div id=\"debug_div\"></div>";
if(!$("debug_div")){
if($("footer")){
pole=new Insertion.Bottom("footer",_440);
}else{
if($("sidebar")){
pole=new Insertion.Bottom("sidebar",_440);
}
}
}
if($("debug_div")){
pole=new Insertion.Bottom("debug_div",_43e+"<br/>");
}
}
};
function search_escape(str){
newstr=encodeURI(str);
newstr=newstr.replace(/\%20/g,"+");
return newstr;
};
var Timer=Class.create();
Timer.prototype={initialize:function(){
this.start();
},start:function(){
this.startTime=new Date();
},stop:function(){
this.stopTime=new Date();
this.length=(this.stopTime-this.startTime);
},inspect:function(){
if(!this.stopTime){
this.stop();
}
return "duration: "+this.length+"ms";
}};
function hpFormHandler(_442){
this.submitMode=false;
this.submitUri="/";
this.nextUri="/";
this.lit=false;
this.form=$(_442);
this.errors=$H({});
this.method="post";
this.errorHeader="<strong>Please fix these errors before continuing:</strong><br/>";
this.setValidators();
};
hpFormHandler.prototype.handleSubmitServerError=function(req){
};
hpFormHandler.prototype.validateLengthMax=function(ele,max,msg){
var val=$F(ele);
this.testForError(($F(ele).trim().length>max),ele,msg);
};
hpFormHandler.prototype.validateLengthMin=function(ele,min,msg){
var val=$F(ele);
this.testForError((val.length!=0&&val.length<min),ele,msg);
};
hpFormHandler.prototype.validateLengthExactly=function(ele,len,msg){
var val=$F(ele);
this.testForError((val.length!=0&&val.length!=len),ele,msg);
};
hpFormHandler.prototype.validateValueMin=function(ele,min,msg){
var val=$F(ele);
this.testForError(val<min,ele,msg);
};
hpFormHandler.prototype.validateValueMax=function(ele,max,msg){
var val=$F(ele);
this.testForError(val>max,ele,msg);
};
hpFormHandler.prototype.validateMandatory=function(ele,msg){
var val=false;
if($F(ele)){
val=$F(ele).trim();
}
this.testForError((!val||val.length==0),ele,msg);
};
hpFormHandler.prototype.validateIsNumeric=function(ele,msg){
this.validateRegex(ele,/^\s*[0-9]*\s*$/,msg);
};
hpFormHandler.prototype.validateRegex=function(ele,_45e,msg){
var val=$F(ele);
this.testForError((val.length!=0&&val.search(_45e)==-1),ele,msg);
};
hpFormHandler.prototype.validateNoRegex=function(ele,_462,msg){
var val=$F(ele);
this.testForError((val.search(_462)!=-1),ele,msg);
};
hpFormHandler.prototype.validateNoSpaces=function(ele,msg){
var val=$F(ele);
this.testForError(val.search(/ /)!=-1,ele,msg);
};
hpFormHandler.prototype.validateNot=function(ele,not,msg){
this.testForError(($F(ele).trim()==not),ele,msg);
};
hpFormHandler.prototype.validateSameAs=function(ele,ele2,msg){
this.testForError(($F(ele)!=$F(ele2)),ele,msg);
};
hpFormHandler.prototype.validateServerCheck=function(ele,url,msg){
var val=$F(ele);
if(val.length==0){
return;
}
if(ele.lastGoodValue&&ele.lastGoodValue==val){
return;
}
val=encodeURIComponent(val);
var _472=new Ajax.Request(url,{method:"post",parameters:ele.id+"="+val,onComplete:function(req){
eval(req.responseText);
this.testForError(!valid,ele,msg);
if(valid){
ele.lastGoodValue=val;
}
this._showErrors();
}.bind(this),onException:function(){
alert("Something went very wrong.  Please try submitting again.");
},onFailure:reportError});
};
hpFormHandler.prototype.validateEmailList=function(ele){
var _475=800;
var _476=6;
this.validateLengthMin(ele,_476,"The address you entered is too short. Please use an address at least "+_476+" characters in length.");
this.validateNoRegex(ele,/\$/,"Dollar signs are not valid in an email address.");
this.validateNoRegex(ele,/\\/,"Backslashes are not valid in an email address.");
this.validateRegex(ele,/\@/,"A valid email address must contain an @ symbol.");
};
hpFormHandler.prototype.validateEmail=function(ele){
this.validateEmailList(ele);
var _478=200;
this.validateLengthMax(ele,_478,"Your email address is too long. Please use a shorter address.");
this.validateNoSpaces(ele,"Spaces are not valid characters in an email address.  Please recheck your address.");
};
hpFormHandler.prototype.validateEmailName=function(ele){
var _47a=2;
var _47b=200;
this.validateLengthMin(ele,_47a,"Your name is too short.  Please enter at least 2 characters.");
this.validateLengthMax(ele,_47b,"Your name is too long. Please use a shorter name.");
};
hpFormHandler.prototype.validatePhone=function(ele){
var val=$F(ele);
var us=/^(?:\([2-9]\d{2}\)\ ?|[2-9]\d{2}(?:\-?|\ ?))[2-9]\d{2}[- ]?\d{4}$/;
this.testForError(!us.test(val)&&val.length>0,ele,"Please enter a valid phone number");
};
hpFormHandler.prototype.validatePostal=function(ele){
var val=$F(ele).trim();
var _481=false;
var us=/^\d{5}(-\d{4})?$/;
var ca=/[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] \d[ABCEGHJKLMNPRSTVWXYZ]\d/i;
var gb=/^[A-Za-z]{1,2}[\d]{1,2}([A-Za-z])?\s?[\d][A-Za-z]{2}$/i;
if(val.length==0||(us.test(val)||ca.test(val)||gb.test(val))){
_481=true;
}
this.testForError(!_481,ele,"Please enter a valid postal code");
};
hpFormHandler.prototype.validateNewPassword=function(ele1,ele2){
ele1=$(ele1);
ele2=$(ele2);
var _487=40;
var _488=5;
this.validateMandatory(ele1,"Please protect your hubpages account with a password.");
this.validateLengthMin(ele1,_488,"Your password is too short.  Protect your account by choosing a password that is at least  "+_488+" characters long.  Safety first!");
this.validateLengthMax(ele1,_487,"Your password is too long; it will be difficult to type.  Please use a shorter password.");
this.validateMandatory(ele2,"Please confirm your password.");
this.validateSameAs(ele1,ele2,"Your passwords do not match.  Please retype them.");
};
hpFormHandler.prototype.validateTag=function(ele){
ele=$(ele);
var _48a=60;
var _48b=3;
this.validateRegex(ele,/^[\w\s\$\-\'\%\&]*$/,"Please use only alphanumeric and $, ', % or & characters in your tag.");
this.validateLengthMin(ele,3,"A tag should be at least three characters long.");
this.validateLengthMax(ele,_48a,"A tag should not be longer than 60 characters.");
};
hpFormHandler.prototype.validateGroupName=function(ele,_48d){
this.validateMandatory(ele,"Please specify a group name.");
this.validateLengthMax(ele,50,"Group names may be no longer than 50 characters.");
this.validateRegex(ele,/^[\w\s\$\-\'\%\&\!\?]*$/,"Please use only alphanumeric and $, ', -, %, !, ? or & characters in your group name.");
existingName=_48d.detect(function(name){
return ($F(ele)==name);
});
this.testForError(existingName,ele,"You already have a group with this name.  Please select it from the list, or enter a new name.");
};
hpFormHandler.prototype.observe=function(){
new Form.EventObserver(this.form,this._elemsChanged.bind(this));
};
hpFormHandler.prototype.focusFirst=function(){
Form.focusFirstElement(this.form);
};
hpFormHandler.prototype.tabOnEnter=function(){
hpFormHandler.tabOnEnter(this.form);
};
hpFormHandler.tabOnEnter=function(form){
if(!$(form)){
return;
}
var _490=$A($(form).getElementsByTagName("input"));
_490.each(function(node){
Event.observe(node,"keydown",_handleInputKeypress,false);
});
};
hpFormHandler.prototype.ghostField=function(_492,_493,_494){
if($(_492)&&$(_493)){
var gw=new GhostWatcher(_492,_493,_494);
}
};
hpFormHandler.prototype.setValidators=function(_496,_497){
this.toValidate=$H(_496);
this.toValidateOnsubmit=$H(_497);
};
hpFormHandler.prototype.hasErrors=function(){
return (this.errors&&this.errors.keys()&&this.errors.keys().length>0);
};
hpFormHandler.prototype.cancel=function(){
this.reset();
};
hpFormHandler.prototype.reset=function(){
Form.reset(this.form);
if(this.cancelUri){
location.href=this.cancelUri;
}
};
hpFormHandler.prototype.valid=function(){
this._runValidators(true);
if(this.hasErrors()){
return false;
}
return true;
};
hpFormHandler.prototype.save=function(){
this._runValidators(true);
if(this.hasErrors()){
return false;
}
if(window.tinyMCE&&tinyMCE.triggerSave){
try{
tinyMCE.triggerSave(false,true);
}
catch(e){
}
}
if(!this.submitMode){
this.params="ajax=1&"+Form.serialize(this.form);
var _498=new Ajax.Request(this.submitUri,{method:this.method,parameters:this.params,onComplete:this.handleResponse.bind(this),onFailure:reportError});
}
return (this.submitMode);
};
hpFormHandler.prototype.handleResponse=function(req){
if(!this.skipValidationOfResponse){
eval(req.responseText);
}
if(this.skipValidationOfResponse||valid==1){
if(this.saveCallback){
this.saveCallback(req);
}
if(this.nextUri){
location.href=this.nextUri;
}
return true;
}else{
this.handleSubmitServerError(req);
return false;
}
};
hpFormHandler.prototype.testForError=function(_49a,ele,msg){
if(_49a){
var tmp=new Object();
tmp[ele.id]=msg;
this.errors=this.errors.merge(tmp);
}else{
if(this.errors[ele.id]&&this.errors[ele.id]==msg){
delete this.errors[ele.id];
}
}
};
hpFormHandler.prototype._elemsChanged=function(ele){
this._runValidators(false);
};
hpFormHandler.prototype._runValidators=function(_49f){
var _4a0=Form.getElements(this.form);
var _4a1=$A(_4a0);
_4a1.each(function(node){
if(_49f){
var _4a3=this.toValidateOnsubmit[node.id];
if(!_4a3){
_4a3=this.toValidateOnsubmit[node.className];
}
if(_4a3){
_4a3(node);
}
}
var _4a3=this.toValidate[node.id];
if(!_4a3){
_4a3=this.toValidate[node.className];
}
if(_4a3){
_4a3(node);
}
}.bind(this));
this._showErrors();
return !this.hasErrors();
};
hpFormHandler.prototype._showErrors=function(){
if(!this.errorDiv&&!$("formErrors")){
new Insertion.Top(this.form,"<div id=\"formErrors\"></div>");
}
if(!this.errorDiv){
this.errorDiv=$("formErrors");
}
if(!this.errFade){
this.errFade=new fx.Opacity(this.errorDiv,{duration:500});
this.errFade.now=0;
}
if(!this.hasErrors()){
if(this.lit){
this.errFade.toggle();
var eles=document.getElementsByClassName("alertBorder",this.form);
eles.each(function(ele){
hpFormHandler.lightEle(ele,false);
});
if($("nextB")){
$("nextB").src="http://x.hubpages.com/i/next.gif";
}
this.lit=false;
}
return;
}
var _4a6=this.errorHeader;
_4a6+="<ul>";
this.errors.each(function(err){
_4a6+="<li>"+err.value+"</li>";
var ele=$(err.key);
hpFormHandler.lightEle(ele,true);
});
_4a6+="</ul>";
this.errorDiv.className="alert";
if(!this.lit){
Element.setOpacity(this.errorDiv,0);
this.errFade.toggle();
}
this.errorDiv.innerHTML=_4a6;
this.lit=true;
};
function _handleInputKeypress(_4a9){
_4a9=_4a9||window.event;
if(_4a9.which){
if(_4a9.which==Event.KEY_RETURN){
var _4aa=document.createEvent("KeyboardEvent");
_4aa.initKeyEvent("keydown",true,true,document.defaultView,_4a9.ctrlKey,_4a9.altKey,_4a9.shiftKey,_4a9.metaKey,Event.KEY_TAB,0);
_4a9.preventDefault();
_4a9.target.dispatchEvent(_4aa);
}
}else{
if(_4a9.keyCode){
if(_4a9.keyCode==Event.KEY_RETURN){
_4a9.keyCode=Event.KEY_TAB;
}
}
}
return true;
};
hpFormHandler.lightEle=function(ele,on){
ele=$(ele);
if(!ele){
return;
}
if(on){
Element.addClassName(ele,"alertBorder");
}else{
Element.removeClassName(ele,"alertBorder");
}
};
var GhostWatcher=Class.create();
GhostWatcher.prototype={initialize:function(_4ad,_4ae,_4af){
this.fromEle=$(_4ad);
this.toEle=$(_4ae);
this.copyFunction=(_4af!=null)?_4af:this.copyValue;
if(this.fromEle&&this.toEle){
Event.observe(this.fromEle,"keyup",this.copyFunction.bind(this),false);
}
Event.observe(window,"focus",this.copyFunction.bind(this),false);
Event.observe(window,"load",this.copyFunction.bind(this),false);
},copyValue:function(evt){
var text=$F(this.fromEle);
this.toEle.innerHTML=text.stripTags();
},recopy:function(){
this.copyFunction();
}};
function addEvent(_4b2,type,_4b4){
if(!_4b4.$$guid){
_4b4.$$guid=addEvent.guid++;
}
if(!_4b2.events){
_4b2.events={};
}
var _4b5=_4b2.events[type];
if(!_4b5){
_4b5=_4b2.events[type]={};
if(_4b2["on"+type]){
_4b5[0]=_4b2["on"+type];
}
}
_4b5[_4b4.$$guid]=_4b4;
_4b2["on"+type]=handleEvent;
};
addEvent.guid=1;
function removeEvent(_4b6,type,_4b8){
if(_4b6.events&&_4b6.events[type]){
delete _4b6.events[type][_4b8.$$guid];
}
};
function handleEvent(_4b9){
var _4ba=true;
_4b9=_4b9||fixEvent(window.event);
if(_4b9==null){
return false;
}
if(this.events==null){
return false;
}
var _4bb=this.events[_4b9.type];
for(var i in _4bb){
this.$$handleEvent=_4bb[i];
if(this.$$handleEvent(_4b9)===false){
_4ba=false;
}
}
return _4ba;
};
function fixEvent(_4bd){
if(_4bd!=null){
_4bd.preventDefault=fixEvent.preventDefault;
_4bd.stopPropagation=fixEvent.stopPropagation;
}
return _4bd;
};
fixEvent.preventDefault=function(){
this.returnValue=false;
};
fixEvent.stopPropagation=function(){
this.cancelBubble=true;
};
function getEventTarget(e){
var targ;
if(!e){
e=window.event;
}
if(e.target){
targ=e.target;
}else{
if(e.srcElement){
targ=e.srcElement;
}
}
if(targ.nodeType==3){
targ=targ.parentNode;
}
return targ;
};
var css={getElementsByClass:function(node,_4c1,tag){
var _4c3=new Array();
var els=node.getElementsByTagName(tag);
var _4c5=els.length;
var _4c6=new RegExp("(^|\\s)"+_4c1+"(\\s|$)");
for(var i=0,j=0;i<_4c5;i++){
if(this.elementHasClass(els[i],_4c1)){
_4c3[j]=els[i];
j++;
}
}
return _4c3;
},elementHasClass:function(el,_4ca){
if(!el){
return false;
}
var _4cb=new RegExp("\\b"+_4ca+"\\b");
if(el.className.match(_4cb)){
return true;
}
return false;
}};
var standardistaTableSorting={that:false,sortColumnIndex:-1,lastAssignedId:0,newRows:-1,lastSortedTable:-1,init:function(){
if(!document.getElementsByTagName){
return;
}
this.that=this;
this.run();
},run:function(){
var _4cc=document.getElementsByTagName("table");
for(var i=0;i<_4cc.length;i++){
var _4ce=_4cc[i];
if(css.elementHasClass(_4ce,"sortable")){
this.makeSortable(_4ce);
}
}
},makeSortable:function(_4cf){
if(!_4cf.id){
_4cf.id="sortableTable"+this.lastAssignedId++;
}
if(!_4cf.tHead||!_4cf.tHead.rows||0==_4cf.tHead.rows.length){
return;
}
var row=_4cf.tHead.rows[_4cf.tHead.rows.length-1];
for(var i=0;i<row.cells.length;i++){
var _4d2=row.cells[i].firstChild;
_4d2.onclick=this.headingClicked;
_4d2.setAttribute("columnId",i);
}
},sortTheTable:function(e){
var that=standardistaTableSorting.that;
var _4d5=getEventTarget(e);
var td=_4d5.parentNode;
var tr=td.parentNode;
var _4d8=tr.parentNode;
var _4d9=_4d8.parentNode;
if(!_4d9.tBodies||_4d9.tBodies[0].rows.length<=1){
return false;
}
var _4da=_4d5.getAttribute("columnId")||td.cellIndex;
var _4db=css.getElementsByClass(td,"tableSortArrow","span");
var _4dc="";
if(_4db.length>0){
_4dc=_4db[0].getAttribute("sortOrder");
}
var itm="";
var _4de=0;
while(""==itm&&_4de<_4d9.tBodies[0].rows.length){
var elm=_4d9.tBodies[0].rows[_4de].cells[_4da];
if(elm.childNodes.length==1){
itm=that.getInnerText(_4d9.tBodies[0].rows[_4de].cells[_4da]);
}else{
itm=that.getInnerText(_4d9.tBodies[0].rows[_4de].cells[_4da].firstChild);
}
_4de++;
}
var _4e0=that.determineSortFunction(itm);
var _4e1;
if(_4d9.id==that.lastSortedTable&&_4da==that.sortColumnIndex){
_4e1=that.newRows;
_4e1.reverse();
}else{
that.sortColumnIndex=_4da;
_4e1=new Array();
for(var j=0;j<_4d9.tBodies[0].rows.length;j++){
_4e1[j]=_4d9.tBodies[0].rows[j];
}
_4e1.sort(_4e0);
}
that.moveRows(_4d9,_4e1);
that.newRows=_4e1;
that.lastSortedTable=_4d9.id;
var _4db=css.getElementsByClass(tr,"tableSortArrow","span");
for(var j=0;j<_4db.length;j++){
if(j==_4da){
if(null==_4dc||""==_4dc||"DESC"==_4dc){
_4db[j].innerHTML="▼";
_4db[j].setAttribute("sortOrder","ASC");
}else{
_4db[j].innerHTML="▲";
_4db[j].setAttribute("sortOrder","DESC");
}
}else{
_4db[j].innerHTML="&nbsp;";
}
}
if(Element.hasClassName(_4d9.tBodies[0].rows[0],"evenRow")||Element.hasClassName(_4d9.tBodies[0].rows[0],"oddRow")){
for(var i=0;i<_4d9.tBodies[0].rows.length;i++){
tr=_4d9.tBodies[0].rows[i];
if(i%2==0){
if(!Element.hasClassName(tr,"oddRow")){
Element.addClassName(tr,"oddRow");
}
if(Element.hasClassName(tr,"evenRow")){
Element.removeClassName(tr,"evenRow");
}
}else{
if(!Element.hasClassName(tr,"evenRow")){
Element.addClassName(tr,"evenRow");
}
if(Element.hasClassName(tr,"oddRow")){
Element.removeClassName(tr,"oddRow");
}
}
}
}
return false;
},headingClicked:function(e){
var that=standardistaTableSorting.that;
that.sortTheTable(e);
return false;
},getInnerText:function(el){
if("string"==typeof el||"undefined"==typeof el){
return el;
}
if(el.innerText){
return el.innerText;
}
var str=el.getAttribute("standardistaTableSortingInnerText");
if(null!=str&&""!=str){
return str;
}
str="";
var cs=el.childNodes;
var l=cs.length;
for(var i=0;i<l;i++){
if(1==cs[i].nodeType){
str+=this.getInnerText(cs[i]);
break;
}else{
if(3==cs[i].nodeType){
str+=cs[i].nodeValue;
break;
}
}
}
el.setAttribute("standardistaTableSortingInnerText",str);
return str;
},determineSortFunction:function(itm){
var _4ec=this.sortCaseInsensitive;
if(itm.match(/^\d\d[\/-]\d\d[\/-]\d\d\d\d$/)){
_4ec=this.sortDate;
}
if(itm.match(/^\d\d[\/-]\d\d[\/-]\d\d$/)){
_4ec=this.sortDate;
}
if(itm.match(/^[�$]/)){
_4ec=this.sortCurrency;
}
if(itm.match(/^\d?\.?\d+$/)){
_4ec=this.sortNumeric;
}
if(itm.match(/^[+-]?\d*\.?\d+([eE]-?\d+)?$/)){
_4ec=this.sortNumeric;
}
if(itm.match(/^([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5])$/)){
_4ec=this.sortIP;
}
return _4ec;
},sortCaseInsensitive:function(a,b){
var that=standardistaTableSorting.that;
var aa=that.getInnerText(a.cells[that.sortColumnIndex]).toLowerCase();
var bb=that.getInnerText(b.cells[that.sortColumnIndex]).toLowerCase();
if(aa==bb){
return 0;
}else{
if(aa<bb){
return -1;
}else{
return 1;
}
}
},sortDate:function(a,b){
var that=standardistaTableSorting.that;
var aa=that.getInnerText(a.cells[that.sortColumnIndex]);
var bb=that.getInnerText(b.cells[that.sortColumnIndex]);
var dt1,dt2,yr=-1;
if(aa.length==10){
dt1=aa.substr(6,4)+aa.substr(3,2)+aa.substr(0,2);
}else{
yr=aa.substr(6,2);
if(parseInt(yr)<50){
yr="20"+yr;
}else{
yr="19"+yr;
}
dt1=yr+aa.substr(3,2)+aa.substr(0,2);
}
if(bb.length==10){
dt2=bb.substr(6,4)+bb.substr(3,2)+bb.substr(0,2);
}else{
yr=bb.substr(6,2);
if(parseInt(yr)<50){
yr="20"+yr;
}else{
yr="19"+yr;
}
dt2=yr+bb.substr(3,2)+bb.substr(0,2);
}
if(dt1==dt2){
return 0;
}else{
if(dt1<dt2){
return -1;
}
}
return 1;
},sortCurrency:function(a,b){
var that=standardistaTableSorting.that;
var aa=that.getInnerText(a.cells[that.sortColumnIndex]).replace(/[^0-9.]/g,"");
var bb=that.getInnerText(b.cells[that.sortColumnIndex]).replace(/[^0-9.]/g,"");
return parseFloat(aa)-parseFloat(bb);
},sortNumeric:function(a,b){
var that=standardistaTableSorting.that;
var _502=a.cells[that.sortColumnIndex];
if(_502.childNodes.length>1){
var aa=parseFloat(that.getInnerText(a.cells[that.sortColumnIndex].firstChild));
}else{
aa=parseFloat(that.getInnerText(a.cells[that.sortColumnIndex]));
}
if(isNaN(aa)){
aa=0;
}
var _504=b.cells[that.sortColumnIndex];
if(_504.childNodes.length>1){
var bb=parseFloat(that.getInnerText(b.cells[that.sortColumnIndex].firstChild));
}else{
bb=parseFloat(that.getInnerText(b.cells[that.sortColumnIndex]));
}
if(isNaN(bb)){
bb=0;
}
return aa-bb;
},makeStandardIPAddress:function(val){
var vals=val.split(".");
for(x in vals){
val=vals[x];
while(3>val.length){
val="0"+val;
}
vals[x]=val;
}
val=vals.join(".");
return val;
},sortIP:function(a,b){
var that=standardistaTableSorting.that;
var aa=that.makeStandardIPAddress(that.getInnerText(a.cells[that.sortColumnIndex]).toLowerCase());
var bb=that.makeStandardIPAddress(that.getInnerText(b.cells[that.sortColumnIndex]).toLowerCase());
if(aa==bb){
return 0;
}else{
if(aa<bb){
return -1;
}else{
return 1;
}
}
},moveRows:function(_50d,_50e){
for(var i=0;i<_50e.length;i++){
var _510=_50e[i];
_50d.tBodies[0].appendChild(_510);
}
}};
function standardistaTableSortingInit(){
standardistaTableSorting.init();
};
Event.observe(window,"load",standardistaTableSortingInit);
var PollManager=Class.create();
PollManager.prototype={initialize:function(_511,_512){
this.modId=_511;
this.pollId=_512;
this.results_div_id=_511+"_poll_results";
this.vote_form_id=_511+"_vote_form";
this.vote_radio_name=_511+"_vote";
},seePollVotes:function(){
this.question_HTML=$(this.results_div_id).innerHTML;
var _513=$H({id:this.pollId}).toQueryString();
var ajax=new Ajax.Updater({success:this.results_div_id},"/xml/pollvote.php",{parameters:_513,onFailure:reportError,onComplete:function(){
}});
},goBackAndVote:function(){
$(this.results_div_id).innerHTML=this.question_HTML;
},voteInPoll:function(){
var vote;
var _516=Form.getInputs(this.vote_form_id,"radio",this.vote_radio_name).find(function(_517){
return _517.checked;
});
if(null==_516){
return;
}else{
vote=_516.value;
}
var _518=$H({id:this.pollId,vote:vote}).toQueryString();
var ajax=new Ajax.Updater({success:this.results_div_id},"/xml/pollvote.php",{parameters:_518,onFailure:reportError,onComplete:function(){
}});
}};
var ContentRotator=Class.create();
ContentRotator.prototype={initialize:function(ids,_51b,_51c,_51d,_51e,_51f,_520,_521,_522,loop){
this.ids=ids;
this.prefix=_51b;
this.interval=_51c;
this.position=0;
this.paused=false;
this.transitionEffect=_51d;
this.transitioning=false;
this.activeUpdateThreadId=0;
if(_51e){
this.playId=_51e;
}
if(_51f){
this.pauseId=_51f;
}
if(_520){
this.positionIndicatorId=_520;
}
if(this.interval>0){
setTimeout(this.update.bind(this,this.activeUpdateThreadId),this.interval);
}
if(_521){
this.prevId=_521;
}
if(_522){
this.nextId=_522;
}
if(loop==undefined||loop){
this.loop=true;
}else{
this.loop=false;
}
},update:function(_524){
if(this.paused||this.activeUpdateThreadId!=_524){
return;
}
this.next();
setTimeout(this.update.bind(this,_524),this.interval);
},pause:function(){
$(this.pauseId).hide();
$(this.playId).show();
this.paused=true;
},play:function(){
$(this.playId).hide();
$(this.pauseId).show();
this.paused=false;
this.activeUpdateThreadId++;
this.update(this.activeUpdateThreadId);
},endTransition:function(){
this.transitioning=false;
},seek:function(_525){
newPosition=_525%this.ids.length;
while(newPosition<0){
newPosition+=this.ids.length;
}
if(this.positionIndicatorId){
$(this.positionIndicatorId+"_"+this.position).removeClassName("active");
}
if(this.transitionEffect>0){
if(this.transitioning){
setTimeout(this.next.bind(this),400);
return;
}
this.transitioning=true;
var _526=new fx.Opacity(this.prefix+this.ids[this.position],{duration:this.transitionEffect});
_526.toggle();
this.position=newPosition;
var _527=new fx.Height(this.prefix+this.ids[this.position],{duration:this.transitionEffect});
if(window.ActiveXObject){
$(this.prefix+this.ids[this.position]).setStyle({display:"inline",visibility:"visible"});
$(this.prefix+this.ids[this.position]).style.removeAttribute("filter");
}else{
$(this.prefix+this.ids[this.position]).setStyle({display:"inline",visibility:"visible",opacity:1});
}
_527.options.onComplete=this.endTransition.bind(this);
_527.hide();
_527.toggle();
}else{
$(this.prefix+this.ids[this.position]).hide();
this.position=newPosition;
$(this.prefix+this.ids[this.position]).show();
}
if(this.positionIndicatorId){
$(this.positionIndicatorId+"_"+this.position).addClassName("active");
}
if(!this.loop){
$(this.nextId).removeClassName("disabled");
$(this.prevId).removeClassName("disabled");
if(this.position==this.ids.length-1){
$(this.nextId).addClassName("disabled");
}
if(this.position==0){
$(this.prevId).addClassName("disabled");
}
}
},next:function(){
this.seek(this.position+1);
},previous:function(){
this.seek(this.position-1);
}};
var dp={sh:{Toolbar:{},Utils:{},RegexLib:{},Brushes:{},Strings:{AboutDialog:"<html><head><title>About...</title></head><body class=\"dp-about\"><table cellspacing=\"0\"><tr><td class=\"copy\"><p class=\"title\">dp.SyntaxHighlighter</div><div class=\"para\">Version: {V}</p><p><a href=\"http://www.dreamprojections.com/syntaxhighlighter/?ref=about\" target=\"_blank\">http://www.dreamprojections.com/syntaxhighlighter</a></p>&copy;2004-2007 Alex Gorbatchev.</td></tr><tr><td class=\"footer\"><input type=\"button\" class=\"close\" value=\"OK\" onClick=\"window.close()\"/></td></tr></table></body></html>"},ClipboardSwf:null,Version:"1.5.1"}};
dp.SyntaxHighlighter=dp.sh;
dp.sh.Toolbar.Commands={ExpandSource:{label:"+ expand source",check:function(_528){
return _528.collapse;
},func:function(_529,_52a){
_529.parentNode.removeChild(_529);
_52a.div.className=_52a.div.className.replace("collapsed","");
}},ViewSource:{label:"view plain",func:function(_52b,_52c){
var code=dp.sh.Utils.FixForBlogger(_52c.originalCode).replace(/</g,"&lt;");
var wnd=window.open("","_blank","width=750, height=400, location=0, resizable=1, menubar=0, scrollbars=0");
wnd.document.write("<textarea style=\"width:99%;height:99%\">"+code+"</textarea>");
wnd.document.close();
}}};
dp.sh.Toolbar.Create=function(_52f){
var div=document.createElement("DIV");
div.className="dp-tools";
for(var name in dp.sh.Toolbar.Commands){
var cmd=dp.sh.Toolbar.Commands[name];
if(cmd.check!=null&&!cmd.check(_52f)){
continue;
}
div.innerHTML+="<a href=\"#\" onclick=\"dp.sh.Toolbar.Command('"+name+"',this);return false;\">"+cmd.label+"</a>";
}
return div;
};
dp.sh.Toolbar.Command=function(name,_534){
var n=_534;
while(n!=null&&n.className.indexOf("dp-highlighter")==-1){
n=n.parentNode;
}
if(n!=null){
dp.sh.Toolbar.Commands[name].func(_534,n.highlighter);
}
};
dp.sh.Utils.CopyStyles=function(_536,_537){
var _538=_537.getElementsByTagName("link");
for(var i=0;i<_538.length;i++){
if(_538[i].rel.toLowerCase()=="stylesheet"){
_536.write("<link type=\"text/css\" rel=\"stylesheet\" href=\""+_538[i].href+"\"></link>");
}
}
};
dp.sh.Utils.FixForBlogger=function(str){
return (dp.sh.isBloggerMode==true)?str.replace(/<br\s*\/?>|&lt;br\s*\/?&gt;/gi,"\n"):str;
};
dp.sh.RegexLib={MultiLineCComments:new RegExp("/\\*[\\s\\S]*?\\*/","gm"),SingleLineCComments:new RegExp("//.*$","gm"),SingleLinePerlComments:new RegExp("#.*$","gm"),DoubleQuotedString:new RegExp("\"(?:\\.|(\\\\\\\")|[^\\\"\"\\n])*\"","g"),SingleQuotedString:new RegExp("'(?:\\.|(\\\\\\')|[^\\''\\n])*'","g")};
dp.sh.Match=function(_53b,_53c,css){
this.value=_53b;
this.index=_53c;
this.length=_53b.length;
this.css=css;
};
dp.sh.Highlighter=function(){
this.noGutter=false;
this.addControls=true;
this.collapse=false;
this.tabsToSpaces=true;
this.wrapColumn=80;
this.showColumns=true;
};
dp.sh.Highlighter.SortCallback=function(m1,m2){
if(m1.index<m2.index){
return -1;
}else{
if(m1.index>m2.index){
return 1;
}else{
if(m1.length<m2.length){
return -1;
}else{
if(m1.length>m2.length){
return 1;
}
}
}
}
return 0;
};
dp.sh.Highlighter.prototype.CreateElement=function(name){
var _541=document.createElement(name);
_541.highlighter=this;
return _541;
};
dp.sh.Highlighter.prototype.GetMatches=function(_542,css){
var _544=0;
var _545=null;
while((_545=_542.exec(this.code))!=null){
this.matches[this.matches.length]=new dp.sh.Match(_545[0],_545.index,css);
}
};
dp.sh.Highlighter.prototype.AddBit=function(str,css){
if(str==null||str.length==0){
return;
}
var span=this.CreateElement("SPAN");
str=str.replace(/ /g,"&nbsp;");
str=str.replace(/</g,"&lt;");
str=str.replace(/\n/gm,"&nbsp;<br>");
if(css!=null){
if((/br/gi).test(str)){
var _549=str.split("&nbsp;<br>");
for(var i=0;i<_549.length;i++){
span=this.CreateElement("SPAN");
span.className=css;
span.innerHTML=_549[i];
this.div.appendChild(span);
if(i+1<_549.length){
this.div.appendChild(this.CreateElement("BR"));
}
}
}else{
span.className=css;
span.innerHTML=str;
this.div.appendChild(span);
}
}else{
span.innerHTML=str;
this.div.appendChild(span);
}
};
dp.sh.Highlighter.prototype.IsInside=function(_54b){
if(_54b==null||_54b.length==0){
return false;
}
for(var i=0;i<this.matches.length;i++){
var c=this.matches[i];
if(c==null){
continue;
}
if((_54b.index>c.index)&&(_54b.index<c.index+c.length)){
return true;
}
}
return false;
};
dp.sh.Highlighter.prototype.ProcessRegexList=function(){
for(var i=0;i<this.regexList.length;i++){
this.GetMatches(this.regexList[i].regex,this.regexList[i].css);
}
};
dp.sh.Highlighter.prototype.ProcessSmartTabs=function(code){
var _550=code.split("\n");
var _551="";
var _552=4;
var tab="\t";
function InsertSpaces(line,pos,_556){
var left=line.substr(0,pos);
var _558=line.substr(pos+1,line.length);
var _559="";
for(var i=0;i<_556;i++){
_559+=" ";
}
return left+_559+_558;
};
function ProcessLine(line,_55c){
if(line.indexOf(tab)==-1){
return line;
}
var pos=0;
while((pos=line.indexOf(tab))!=-1){
var _55e=_55c-pos%_55c;
line=InsertSpaces(line,pos,_55e);
}
return line;
};
for(var i=0;i<_550.length;i++){
_551+=ProcessLine(_550[i],_552)+"\n";
}
return _551;
};
dp.sh.Highlighter.prototype.SwitchToList=function(){
var html=this.div.innerHTML.replace(/<(br)\/?>/gi,"\n");
var _561=html.split("\n");
if(this.addControls==true){
this.bar.appendChild(dp.sh.Toolbar.Create(this));
}
if(this.showColumns){
var div=this.CreateElement("div");
var _563=this.CreateElement("div");
var _564=10;
var i=1;
while(i<=150){
if(i%_564==0){
div.innerHTML+=i;
i+=(i+"").length;
}else{
div.innerHTML+="&middot;";
i++;
}
}
_563.className="dp-columns";
_563.appendChild(div);
this.bar.appendChild(_563);
}
for(var i=0,_566=this.firstLine;i<_561.length-1;i++,_566++){
var li=this.CreateElement("LI");
var span=this.CreateElement("SPAN");
li.className=(i%2==0)?"alt":"";
span.innerHTML=_561[i]+"&nbsp;";
li.appendChild(span);
this.ol.appendChild(li);
}
this.div.innerHTML="";
};
dp.sh.Highlighter.prototype.Highlight=function(code){
function Trim(str){
return str.replace(/^\s*(.*?)[\s\n]*$/g,"$1");
};
function Chop(str){
return str.replace(/\n*$/,"").replace(/^\n*/,"");
};
function Unindent(str){
var _56d=dp.sh.Utils.FixForBlogger(str).split("\n");
var _56e=new Array();
var _56f=new RegExp("^\\s*","g");
var min=1000;
for(var i=0;i<_56d.length&&min>0;i++){
if(Trim(_56d[i]).length==0){
continue;
}
var _572=_56f.exec(_56d[i]);
if(_572!=null&&_572.length>0){
min=Math.min(_572[0].length,min);
}
}
if(min>0){
for(var i=0;i<_56d.length;i++){
_56d[i]=_56d[i].substr(min);
}
}
return _56d.join("\n");
};
function Copy(_573,pos1,pos2){
return _573.substr(pos1,pos2-pos1);
};
var pos=0;
if(code==null){
code="";
}
this.originalCode=code;
this.code=Chop(Unindent(code));
this.div=this.CreateElement("DIV");
this.bar=this.CreateElement("DIV");
this.ol=this.CreateElement("OL");
this.matches=new Array();
this.div.className="dp-highlighter";
this.div.highlighter=this;
this.bar.className="dp-bar";
this.ol.start=this.firstLine;
if(this.CssClass!=null){
this.ol.className=this.CssClass;
}
if(this.collapse){
this.div.className+=" collapsed";
}
if(this.noGutter){
this.div.className+=" nogutter";
}
if(this.tabsToSpaces==true){
this.code=this.ProcessSmartTabs(this.code);
}
this.ProcessRegexList();
if(this.matches.length==0){
this.AddBit(this.code,null);
this.SwitchToList();
this.div.appendChild(this.bar);
this.div.appendChild(this.ol);
return;
}
this.matches=this.matches.sort(dp.sh.Highlighter.SortCallback);
for(var i=0;i<this.matches.length;i++){
if(this.IsInside(this.matches[i])){
this.matches[i]=null;
}
}
for(var i=0;i<this.matches.length;i++){
var _578=this.matches[i];
if(_578==null||_578.length==0){
continue;
}
this.AddBit(Copy(this.code,pos,_578.index),null);
this.AddBit(_578.value,_578.css);
pos=_578.index+_578.length;
}
this.AddBit(this.code.substr(pos),null);
this.SwitchToList();
this.div.appendChild(this.bar);
this.div.appendChild(this.ol);
};
dp.sh.Highlighter.prototype.GetKeywords=function(str){
return "\\b"+str.replace(/ /g,"\\b|\\b")+"\\b";
};
dp.sh.BloggerMode=function(){
dp.sh.isBloggerMode=true;
};
dp.sh.HighlightAll=function(name,_57b,_57c,_57d,_57e,_57f){
function FindValue(){
var a=arguments;
for(var i=0;i<a.length;i++){
if(a[i]==null){
continue;
}
if(typeof (a[i])=="string"&&a[i]!=""){
return a[i]+"";
}
if(typeof (a[i])=="object"&&a[i].value!=""){
return a[i].value+"";
}
}
return null;
};
function IsOptionSet(_582,list){
for(var i=0;i<list.length;i++){
if(list[i]==_582){
return true;
}
}
return false;
};
function GetOptionValue(name,list,_587){
var _588=new RegExp("^"+name+"\\[(\\w+)\\]$","gi");
var _589=null;
for(var i=0;i<list.length;i++){
if((_589=_588.exec(list[i]))!=null){
return _589[1];
}
}
return _587;
};
function FindTagsByName(list,name,_58d){
var tags=document.getElementsByTagName(_58d);
for(var i=0;i<tags.length;i++){
if(tags[i].getAttribute("name")==name){
list.push(tags[i]);
}
}
};
var _590=[];
var _591=null;
var _592={};
var _593="innerHTML";
FindTagsByName(_590,name,"pre");
FindTagsByName(_590,name,"textarea");
if(_590.length==0){
return;
}
for(var _594 in dp.sh.Brushes){
var _595=dp.sh.Brushes[_594].Aliases;
if(_595==null){
continue;
}
for(var i=0;i<_595.length;i++){
_592[_595[i]]=_594;
}
}
for(var i=0;i<_590.length;i++){
var _597=_590[i];
var _598=FindValue(_597.attributes["class"],_597.className,_597.attributes["language"],_597.language);
var _599="";
if(_598==null){
continue;
}
_598=_598.split(":");
_599=_598[0].toLowerCase();
if(_592[_599]==null){
continue;
}
_591=new dp.sh.Brushes[_592[_599]]();
_597.style.display="none";
_591.noGutter=(_57b==null)?IsOptionSet("nogutter",_598):!_57b;
_591.addControls=(_57c==null)?!IsOptionSet("nocontrols",_598):_57c;
_591.collapse=(_57d==null)?IsOptionSet("collapse",_598):_57d;
_591.showColumns=(_57f==null)?IsOptionSet("showcolumns",_598):_57f;
var _59a=document.getElementsByTagName("head")[0];
if(_591.Style&&_59a){
var _59b=document.createElement("style");
_59b.setAttribute("type","text/css");
if(_59b.styleSheet){
_59b.styleSheet.cssText=_591.Style;
}else{
var _59c=document.createTextNode(_591.Style);
_59b.appendChild(_59c);
}
_59a.appendChild(_59b);
}
_591.firstLine=(_57e==null)?parseInt(GetOptionValue("firstline",_598,1)):_57e;
_591.Highlight(_597[_593]);
_591.source=_597;
_597.parentNode.insertBefore(_591.div,_597);
}
};
dp.sh.Brushes.Cpp=function(){
var _59d="ATOM BOOL BOOLEAN BYTE CHAR COLORREF DWORD DWORDLONG DWORD_PTR "+"DWORD32 DWORD64 FLOAT HACCEL HALF_PTR HANDLE HBITMAP HBRUSH "+"HCOLORSPACE HCONV HCONVLIST HCURSOR HDC HDDEDATA HDESK HDROP HDWP "+"HENHMETAFILE HFILE HFONT HGDIOBJ HGLOBAL HHOOK HICON HINSTANCE HKEY "+"HKL HLOCAL HMENU HMETAFILE HMODULE HMONITOR HPALETTE HPEN HRESULT "+"HRGN HRSRC HSZ HWINSTA HWND INT INT_PTR INT32 INT64 LANGID LCID LCTYPE "+"LGRPID LONG LONGLONG LONG_PTR LONG32 LONG64 LPARAM LPBOOL LPBYTE LPCOLORREF "+"LPCSTR LPCTSTR LPCVOID LPCWSTR LPDWORD LPHANDLE LPINT LPLONG LPSTR LPTSTR "+"LPVOID LPWORD LPWSTR LRESULT PBOOL PBOOLEAN PBYTE PCHAR PCSTR PCTSTR PCWSTR "+"PDWORDLONG PDWORD_PTR PDWORD32 PDWORD64 PFLOAT PHALF_PTR PHANDLE PHKEY PINT "+"PINT_PTR PINT32 PINT64 PLCID PLONG PLONGLONG PLONG_PTR PLONG32 PLONG64 POINTER_32 "+"POINTER_64 PSHORT PSIZE_T PSSIZE_T PSTR PTBYTE PTCHAR PTSTR PUCHAR PUHALF_PTR "+"PUINT PUINT_PTR PUINT32 PUINT64 PULONG PULONGLONG PULONG_PTR PULONG32 PULONG64 "+"PUSHORT PVOID PWCHAR PWORD PWSTR SC_HANDLE SC_LOCK SERVICE_STATUS_HANDLE SHORT "+"SIZE_T SSIZE_T TBYTE TCHAR UCHAR UHALF_PTR UINT UINT_PTR UINT32 UINT64 ULONG "+"ULONGLONG ULONG_PTR ULONG32 ULONG64 USHORT USN VOID WCHAR WORD WPARAM WPARAM WPARAM "+"char bool short int __int32 __int64 __int8 __int16 long float double __wchar_t "+"clock_t _complex _dev_t _diskfree_t div_t ldiv_t _exception _EXCEPTION_POINTERS "+"FILE _finddata_t _finddatai64_t _wfinddata_t _wfinddatai64_t __finddata64_t "+"__wfinddata64_t _FPIEEE_RECORD fpos_t _HEAPINFO _HFILE lconv intptr_t "+"jmp_buf mbstate_t _off_t _onexit_t _PNH ptrdiff_t _purecall_handler "+"sig_atomic_t size_t _stat __stat64 _stati64 terminate_function "+"time_t __time64_t _timeb __timeb64 tm uintptr_t _utimbuf "+"va_list wchar_t wctrans_t wctype_t wint_t signed";
var _59e="break case catch class const __finally __exception __try "+"const_cast continue private public protected __declspec "+"default delete deprecated dllexport dllimport do dynamic_cast "+"else enum explicit extern if for friend goto inline "+"mutable naked namespace new noinline noreturn nothrow "+"register reinterpret_cast return selectany "+"sizeof static static_cast struct switch template this "+"thread throw true false try typedef typeid typename union "+"using uuid virtual void volatile whcar_t while";
this.regexList=[{regex:dp.sh.RegexLib.SingleLineCComments,css:"dp-comment"},{regex:dp.sh.RegexLib.MultiLineCComments,css:"dp-comment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:dp.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("^ *#.*","gm"),css:"preprocessor"},{regex:new RegExp(this.GetKeywords(_59d),"gm"),css:"datatypes"},{regex:new RegExp(this.GetKeywords(_59e),"gm"),css:"dp-keyword"}];
this.CssClass="dp-cpp";
this.Style=".dp-cpp .datatypes { color: #2E8B57; font-weight: bold; }";
};
dp.sh.Brushes.Cpp.prototype=new dp.sh.Highlighter();
dp.sh.Brushes.Cpp.Aliases=["cpp","c","c++"];
dp.sh.Brushes.CSharp=function(){
var _59f="abstract as base bool break byte case catch char checked class const "+"continue decimal default delegate do double else enum event explicit "+"extern false finally fixed float for foreach get goto if implicit in int "+"interface internal is lock long namespace new null object operator out "+"override params private protected public readonly ref return sbyte sealed set "+"short sizeof stackalloc static string struct switch this throw true try "+"typeof uint ulong unchecked unsafe ushort using virtual void while";
this.regexList=[{regex:dp.sh.RegexLib.SingleLineCComments,css:"dp-comment"},{regex:dp.sh.RegexLib.MultiLineCComments,css:"dp-comment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:dp.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("^\\s*#.*","gm"),css:"preprocessor"},{regex:new RegExp(this.GetKeywords(_59f),"gm"),css:"dp-keyword"}];
this.CssClass="dp-c";
this.Style=".dp-c .vars { color: #d00; }";
};
dp.sh.Brushes.CSharp.prototype=new dp.sh.Highlighter();
dp.sh.Brushes.CSharp.Aliases=["c#","c-sharp","csharp"];
dp.sh.Brushes.CSS=function(){
var _5a0="ascent azimuth background-attachment background-color background-image background-position "+"background-repeat background baseline bbox border-collapse border-color border-spacing border-style border-top "+"border-right border-bottom border-left border-top-color border-right-color border-bottom-color border-left-color "+"border-top-style border-right-style border-bottom-style border-left-style border-top-width border-right-width "+"border-bottom-width border-left-width border-width border cap-height caption-side centerline clear clip color "+"content counter-increment counter-reset cue-after cue-before cue cursor definition-src descent direction display "+"elevation empty-cells float font-size-adjust font-family font-size font-stretch font-style font-variant font-weight font "+"height letter-spacing line-height list-style-image list-style-position list-style-type list-style margin-top "+"margin-right margin-bottom margin-left margin marker-offset marks mathline max-height max-width min-height min-width orphans "+"outline-color outline-style outline-width outline overflow padding-top padding-right padding-bottom padding-left padding page "+"page-break-after page-break-before page-break-inside pause pause-after pause-before pitch pitch-range play-during position "+"quotes richness size slope src speak-header speak-numeral speak-punctuation speak speech-rate stemh stemv stress "+"table-layout text-align text-decoration text-indent text-shadow text-transform unicode-bidi unicode-range units-per-em "+"vertical-align visibility voice-family volume white-space widows width widths word-spacing x-height z-index";
var _5a1="above absolute all always aqua armenian attr aural auto avoid baseline behind below bidi-override black blink block blue bold bolder "+"both bottom braille capitalize caption center center-left center-right circle close-quote code collapse compact condensed "+"continuous counter counters crop cross crosshair cursive dashed decimal decimal-leading-zero default digits disc dotted double "+"embed embossed e-resize expanded extra-condensed extra-expanded fantasy far-left far-right fast faster fixed format fuchsia "+"gray green groove handheld hebrew help hidden hide high higher icon inline-table inline inset inside invert italic "+"justify landscape large larger left-side left leftwards level lighter lime line-through list-item local loud lower-alpha "+"lowercase lower-greek lower-latin lower-roman lower low ltr marker maroon medium message-box middle mix move narrower "+"navy ne-resize no-close-quote none no-open-quote no-repeat normal nowrap n-resize nw-resize oblique olive once open-quote outset "+"outside overline pointer portrait pre print projection purple red relative repeat repeat-x repeat-y rgb ridge right right-side "+"rightwards rtl run-in screen scroll semi-condensed semi-expanded separate se-resize show silent silver slower slow "+"small small-caps small-caption smaller soft solid speech spell-out square s-resize static status-bar sub super sw-resize "+"table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group teal "+"text-bottom text-top thick thin top transparent tty tv ultra-condensed ultra-expanded underline upper-alpha uppercase upper-latin "+"upper-roman url visible wait white wider w-resize x-fast x-high x-large x-loud x-low x-slow x-small x-soft xx-large xx-small yellow";
var _5a2="[mM]onospace [tT]ahoma [vV]erdana [aA]rial [hH]elvetica [sS]ans-serif [sS]erif";
this.regexList=[{regex:dp.sh.RegexLib.MultiLineCComments,css:"dp-comment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:dp.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("\\#[a-zA-Z0-9]{3,6}","g"),css:"value"},{regex:new RegExp("(-?\\d+)(.\\d+)?(px|em|pt|:|%|)","g"),css:"value"},{regex:new RegExp("!important","g"),css:"important"},{regex:new RegExp(this.GetKeywordsCSS(_5a0),"gm"),css:"dp-keyword"},{regex:new RegExp(this.GetValuesCSS(_5a1),"g"),css:"value"},{regex:new RegExp(this.GetValuesCSS(_5a2),"g"),css:"value"}];
this.CssClass="dp-css";
this.Style=".dp-css .value { color: black; }"+".dp-css .important { color: red; }";
};
dp.sh.Highlighter.prototype.GetKeywordsCSS=function(str){
return "\\b([a-z_]|)"+str.replace(/ /g,"(?=:)\\b|\\b([a-z_\\*]|\\*|)")+"(?=:)\\b";
};
dp.sh.Highlighter.prototype.GetValuesCSS=function(str){
return "\\b"+str.replace(/ /g,"(?!-)(?!:)\\b|\\b()")+":\\b";
};
dp.sh.Brushes.CSS.prototype=new dp.sh.Highlighter();
dp.sh.Brushes.CSS.Aliases=["css"];
dp.sh.Brushes.Delphi=function(){
var _5a5="abs addr and ansichar ansistring array as asm begin boolean byte cardinal "+"case char class comp const constructor currency destructor div do double "+"downto else end except exports extended false file finalization finally "+"for function goto if implementation in inherited int64 initialization "+"integer interface is label library longint longword mod nil not object "+"of on or packed pansichar pansistring pchar pcurrency pdatetime pextended "+"pint64 pointer private procedure program property pshortstring pstring "+"pvariant pwidechar pwidestring protected public published raise real real48 "+"record repeat set shl shortint shortstring shr single smallint string then "+"threadvar to true try type unit until uses val var varirnt while widechar "+"widestring with word write writeln xor";
this.regexList=[{regex:new RegExp("\\(\\*[\\s\\S]*?\\*\\)","gm"),css:"dp-comment"},{regex:new RegExp("{(?!\\$)[\\s\\S]*?}","gm"),css:"dp-comment"},{regex:dp.sh.RegexLib.SingleLineCComments,css:"dp-comment"},{regex:dp.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("\\{\\$[a-zA-Z]+ .+\\}","g"),css:"directive"},{regex:new RegExp("\\b[\\d\\.]+\\b","g"),css:"number"},{regex:new RegExp("\\$[a-zA-Z0-9]+\\b","g"),css:"number"},{regex:new RegExp(this.GetKeywords(_5a5),"gm"),css:"dp-keyword"}];
this.CssClass="dp-delphi";
this.Style=".dp-delphi .number { color: blue; }"+".dp-delphi .directive { color: #008284; }"+".dp-delphi .vars { color: #000; }";
};
dp.sh.Brushes.Delphi.prototype=new dp.sh.Highlighter();
dp.sh.Brushes.Delphi.Aliases=["delphi","pascal"];
dp.sh.Brushes.Xml=function(){
this.CssClass="dp-xml";
this.Style=".dp-xml .cdata { color: #ff1493; }"+".dp-xml .tag, .dp-xml .tag-name { color: #069; font-weight: bold; }"+".dp-xml .attribute { color: red; }"+".dp-xml .attribute-value { color: blue; }";
};
dp.sh.Brushes.Xml.prototype=new dp.sh.Highlighter();
dp.sh.Brushes.Xml.Aliases=["xml","xhtml","xslt","html","xhtml"];
dp.sh.Brushes.Xml.prototype.ProcessRegexList=function(){
function push(_5a6,_5a7){
_5a6[_5a6.length]=_5a7;
};
var _5a8=0;
var _5a9=null;
var _5aa=null;
this.GetMatches(new RegExp("(&lt;|<)\\!\\[[\\w\\s]*?\\[(.|\\s)*?\\]\\](&gt;|>)","gm"),"cdata");
this.GetMatches(new RegExp("(&lt;|<)!--\\s*.*?\\s*--(&gt;|>)","gm"),"dp-comments");
_5aa=new RegExp("([:\\w-.]+)\\s*=\\s*(\".*?\"|'.*?'|\\w+)*|(\\w+)","gm");
while((_5a9=_5aa.exec(this.code))!=null){
if(_5a9[1]==null){
continue;
}
push(this.matches,new dp.sh.Match(_5a9[1],_5a9.index,"attribute"));
if(_5a9[2]!=undefined){
push(this.matches,new dp.sh.Match(_5a9[2],_5a9.index+_5a9[0].indexOf(_5a9[2]),"attribute-value"));
}
}
this.GetMatches(new RegExp("(&lt;|<)/*\\?*(?!\\!)|/*\\?*(&gt;|>)","gm"),"tag");
_5aa=new RegExp("(?:&lt;|<)/*\\?*\\s*([:\\w-.]+)","gm");
while((_5a9=_5aa.exec(this.code))!=null){
push(this.matches,new dp.sh.Match(_5a9[1],_5a9.index+_5a9[0].indexOf(_5a9[1]),"tag-name"));
}
};
dp.sh.Brushes.Java=function(){
var _5ab="abstract assert boolean break byte case catch char class const "+"continue default do double else enum extends "+"false final finally float for goto if implements import "+"instanceof int interface long native new null "+"package private protected public return "+"short static strictfp super switch synchronized this throw throws true "+"transient try void volatile while";
this.regexList=[{regex:dp.sh.RegexLib.SingleLineCComments,css:"dp-comment"},{regex:dp.sh.RegexLib.MultiLineCComments,css:"dp-comment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:dp.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("\\b([\\d]+(\\.[\\d]+)?|0x[a-f0-9]+)\\b","gi"),css:"number"},{regex:new RegExp("(?!\\@interface\\b)\\@[\\$\\w]+\\b","g"),css:"annotation"},{regex:new RegExp("\\@interface\\b","g"),css:"dp-keyword"},{regex:new RegExp(this.GetKeywords(_5ab),"gm"),css:"dp-keyword"}];
this.CssClass="dp-j";
this.Style=".dp-j .annotation { color: #646464; }"+".dp-j .number { color: #C00000; }";
};
dp.sh.Brushes.Java.prototype=new dp.sh.Highlighter();
dp.sh.Brushes.Java.Aliases=["java"];
dp.sh.Brushes.JScript=function(){
var _5ac="abstract boolean break byte case catch char class const continue debugger "+"default delete do double else enum export extends false final finally float "+"for function goto if implements import in instanceof int interface long native "+"new null package private protected public return short static super switch "+"synchronized this throw throws transient true try typeof var void volatile while with";
this.regexList=[{regex:dp.sh.RegexLib.SingleLineCComments,css:"dp-comment"},{regex:dp.sh.RegexLib.MultiLineCComments,css:"dp-comment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:dp.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("^\\s*#.*","gm"),css:"preprocessor"},{regex:new RegExp(this.GetKeywords(_5ac),"gm"),css:"dp-keyword"}];
this.CssClass="dp-c";
};
dp.sh.Brushes.JScript.prototype=new dp.sh.Highlighter();
dp.sh.Brushes.JScript.Aliases=["js","jscript","javascript"];
dp.sh.Brushes.Php=function(){
var _5ad="abs acos acosh addcslashes addslashes "+"array_change_key_case array_chunk array_combine array_count_values array_diff "+"array_diff_assoc array_diff_key array_diff_uassoc array_diff_ukey array_fill "+"array_filter array_flip array_intersect array_intersect_assoc array_intersect_key "+"array_intersect_uassoc array_intersect_ukey array_key_exists array_keys array_map "+"array_merge array_merge_recursive array_multisort array_pad array_pop array_product "+"array_push array_rand array_reduce array_reverse array_search array_shift "+"array_slice array_splice array_sum array_udiff array_udiff_assoc "+"array_udiff_uassoc array_uintersect array_uintersect_assoc "+"array_uintersect_uassoc array_unique array_unshift array_values array_walk "+"array_walk_recursive atan atan2 atanh base64_decode base64_encode base_convert "+"basename bcadd bccomp bcdiv bcmod bcmul bindec bindtextdomain bzclose bzcompress "+"bzdecompress bzerrno bzerror bzerrstr bzflush bzopen bzread bzwrite ceil chdir "+"checkdate checkdnsrr chgrp chmod chop chown chr chroot chunk_split class_exists "+"closedir closelog copy cos cosh count count_chars date decbin dechex decoct "+"deg2rad delete ebcdic2ascii echo empty end ereg ereg_replace eregi eregi_replace error_log "+"error_reporting escapeshellarg escapeshellcmd eval exec exit exp explode extension_loaded "+"feof fflush fgetc fgetcsv fgets fgetss file_exists file_get_contents file_put_contents "+"fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype "+"floatval flock floor flush fmod fnmatch fopen fpassthru fprintf fputcsv fputs fread fscanf "+"fseek fsockopen fstat ftell ftok getallheaders getcwd getdate getenv gethostbyaddr gethostbyname "+"gethostbynamel getimagesize getlastmod getmxrr getmygid getmyinode getmypid getmyuid getopt "+"getprotobyname getprotobynumber getrandmax getrusage getservbyname getservbyport gettext "+"gettimeofday gettype glob gmdate gmmktime ini_alter ini_get ini_get_all ini_restore ini_set "+"interface_exists intval ip2long is_a is_array is_bool is_callable is_dir is_double "+"is_executable is_file is_finite is_float is_infinite is_int is_integer is_link is_long "+"is_nan is_null is_numeric is_object is_readable is_real is_resource is_scalar is_soap_fault "+"is_string is_subclass_of is_uploaded_file is_writable is_writeable mkdir mktime nl2br "+"parse_ini_file parse_str parse_url passthru pathinfo readlink realpath rewind rewinddir rmdir "+"round str_ireplace str_pad str_repeat str_replace str_rot13 str_shuffle str_split "+"str_word_count strcasecmp strchr strcmp strcoll strcspn strftime strip_tags stripcslashes "+"stripos stripslashes stristr strlen strnatcasecmp strnatcmp strncasecmp strncmp strpbrk "+"strpos strptime strrchr strrev strripos strrpos strspn strstr strtok strtolower strtotime "+"strtoupper strtr strval substr substr_compare";
var _5ae="and or xor __FILE__ __LINE__ array as break case "+"cfunction class const continue declare default die do else "+"elseif empty enddeclare endfor endforeach endif endswitch endwhile "+"extends for foreach function include include_once global if "+"new old_function return static switch use require require_once "+"var while __FUNCTION__ __CLASS__ "+"__METHOD__ abstract interface public implements extends private protected throw";
this.regexList=[{regex:dp.sh.RegexLib.SingleLineCComments,css:"dp-comment"},{regex:dp.sh.RegexLib.MultiLineCComments,css:"dp-comment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:dp.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("\\$\\w+","g"),css:"vars"},{regex:new RegExp(this.GetKeywords(_5ad),"gmi"),css:"func"},{regex:new RegExp(this.GetKeywords(_5ae),"gm"),css:"dp-keyword"}];
this.CssClass="dp-c";
};
dp.sh.Brushes.Php.prototype=new dp.sh.Highlighter();
dp.sh.Brushes.Php.Aliases=["php"];
dp.sh.Brushes.Python=function(){
var _5af="and assert break class continue def del elif else "+"except exec finally for from global if import in is "+"lambda not or pass print raise return try yield while";
var _5b0="None True False self cls class_";
this.regexList=[{regex:dp.sh.RegexLib.SingleLinePerlComments,css:"dp-comment"},{regex:new RegExp("^\\s*@\\w+","gm"),css:"decorator"},{regex:new RegExp("(['\"]{3})([^\\1])*?\\1","gm"),css:"dp-comment"},{regex:new RegExp("\"(?!\")(?:\\.|\\\\\\\"|[^\\\"\"\\n\\r])*\"","gm"),css:"string"},{regex:new RegExp("'(?!')*(?:\\.|(\\\\\\')|[^\\''\\n\\r])*'","gm"),css:"string"},{regex:new RegExp("\\b\\d+\\.?\\w*","g"),css:"number"},{regex:new RegExp(this.GetKeywords(_5af),"gm"),css:"dp-keyword"},{regex:new RegExp(this.GetKeywords(_5b0),"gm"),css:"special"}];
this.CssClass="dp-py";
this.Style=".dp-py .builtins { color: #ff1493; }"+".dp-py .magicmethods { color: #808080; }"+".dp-py .exceptions { color: brown; }"+".dp-py .types { color: brown; font-style: italic; }"+".dp-py .commonlibs { color: #8A2BE2; font-style: italic; }";
};
dp.sh.Brushes.Python.prototype=new dp.sh.Highlighter();
dp.sh.Brushes.Python.Aliases=["py","python"];
dp.sh.Brushes.Ruby=function(){
var _5b1="alias and BEGIN begin break case class def define_method defined do each else elsif "+"END end ensure false for if in module new next nil not or raise redo rescue retry return "+"self super then throw true undef unless until when while yield";
var _5b2="Array Bignum Binding Class Continuation Dir Exception FalseClass File::Stat File Fixnum Fload "+"Hash Integer IO MatchData Method Module NilClass Numeric Object Proc Range Regexp String Struct::TMS Symbol "+"ThreadGroup Thread Time TrueClass";
this.regexList=[{regex:dp.sh.RegexLib.SingleLinePerlComments,css:"dp-comment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:dp.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp(":[a-z][A-Za-z0-9_]*","g"),css:"symbol"},{regex:new RegExp("(\\$|@@|@)\\w+","g"),css:"variable"},{regex:new RegExp(this.GetKeywords(_5b1),"gm"),css:"dp-keyword"},{regex:new RegExp(this.GetKeywords(_5b2),"gm"),css:"builtin"}];
this.CssClass="dp-rb";
this.Style=".dp-rb .symbol { color: #a70; }"+".dp-rb .variable { color: #a70; font-weight: bold; }";
};
dp.sh.Brushes.Ruby.prototype=new dp.sh.Highlighter();
dp.sh.Brushes.Ruby.Aliases=["ruby","rails","ror"];
dp.sh.Brushes.Sql=function(){
var _5b3="abs avg case cast coalesce convert count current_timestamp "+"current_user day isnull left lower month nullif replace right "+"session_user space substring sum system_user upper user year";
var _5b4="absolute action add after alter as asc at authorization begin bigint "+"binary bit by cascade char character check checkpoint close collate "+"column commit committed connect connection constraint contains continue "+"create cube current current_date current_time cursor database date "+"deallocate dec decimal declare default delete desc distinct double drop "+"dynamic else end end-exec escape except exec execute false fetch first "+"float for force foreign forward free from full function global goto grant "+"group grouping having hour ignore index inner insensitive insert instead "+"int integer intersect into is isolation key last level load local max min "+"minute modify move name national nchar next no numeric of off on only "+"open option order out output partial password precision prepare primary "+"prior privileges procedure public read real references relative repeatable "+"restrict return returns revoke rollback rollup rows rule schema scroll "+"second section select sequence serializable set size smallint static "+"statistics table temp temporary then time timestamp to top transaction "+"translation trigger true truncate uncommitted union unique update values "+"varchar varying view when where with work";
var _5b5="all and any between cross in join like not null or outer some";
this.regexList=[{regex:new RegExp("--(.*)$","gm"),css:"dp-comment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:dp.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp(this.GetKeywords(_5b3),"gmi"),css:"func"},{regex:new RegExp(this.GetKeywords(_5b5),"gmi"),css:"op"},{regex:new RegExp(this.GetKeywords(_5b4),"gmi"),css:"dp-keyword"}];
this.CssClass="dp-sql";
this.Style=".dp-sql .func { color: #ff1493; }"+".dp-sql .op { color: #808080; }";
};
dp.sh.Brushes.Sql.prototype=new dp.sh.Highlighter();
dp.sh.Brushes.Sql.Aliases=["sql"];
dp.sh.Brushes.Vb=function(){
var _5b6="AddHandler AddressOf AndAlso Alias And Ansi As Assembly Auto "+"Boolean ByRef Byte ByVal Call Case Catch CBool CByte CChar CDate "+"CDec CDbl Char CInt Class CLng CObj Const CShort CSng CStr CType "+"Date Decimal Declare Default Delegate Dim DirectCast Do Double Each "+"Else ElseIf End Enum Erase Error Event Exit False Finally For Friend "+"Function Get GetType GoSub GoTo Handles If Implements Imports In "+"Inherits Integer Interface Is Let Lib Like Long Loop Me Mod Module "+"MustInherit MustOverride MyBase MyClass Namespace New Next Not Nothing "+"NotInheritable NotOverridable Object On Option Optional Or OrElse "+"Overloads Overridable Overrides ParamArray Preserve Private Property "+"Protected Public RaiseEvent ReadOnly ReDim REM RemoveHandler Resume "+"Return Select Set Shadows Shared Short Single Static Step Stop String "+"Structure Sub SyncLock Then Throw To True Try TypeOf Unicode Until "+"Variant When While With WithEvents WriteOnly Xor";
this.regexList=[{regex:new RegExp("'.*$","gm"),css:"dp-comment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:new RegExp("^\\s*#.*","gm"),css:"preprocessor"},{regex:new RegExp(this.GetKeywords(_5b6),"gm"),css:"dp-keyword"}];
this.CssClass="dp-vb";
};
dp.sh.Brushes.Vb.prototype=new dp.sh.Highlighter();
dp.sh.Brushes.Vb.Aliases=["vb","vb.net"];
dp.sh.Brushes.Xml=function(){
this.CssClass="dp-xml";
this.Style=".dp-xml .cdata { color: #ff1493; }"+".dp-xml .tag, .dp-xml .tag-name { color: #069; font-weight: bold; }"+".dp-xml .attribute { color: red; }"+".dp-xml .attribute-value { color: blue; }";
};
dp.sh.Brushes.Xml.prototype=new dp.sh.Highlighter();
dp.sh.Brushes.Xml.Aliases=["xml","xhtml","xslt","html","xhtml"];
dp.sh.Brushes.Xml.prototype.ProcessRegexList=function(){
function push(_5b7,_5b8){
_5b7[_5b7.length]=_5b8;
};
var _5b9=0;
var _5ba=null;
var _5bb=null;
this.GetMatches(new RegExp("(&lt;|<)\\!\\[[\\w\\s]*?\\[(.|\\s)*?\\]\\](&gt;|>)","gm"),"cdata");
this.GetMatches(new RegExp("(&lt;|<)!--\\s*.*?\\s*--(&gt;|>)","gm"),"dp-comments");
_5bb=new RegExp("([:\\w-.]+)\\s*=\\s*(\".*?\"|'.*?'|\\w+)*|(\\w+)","gm");
while((_5ba=_5bb.exec(this.code))!=null){
if(_5ba[1]==null){
continue;
}
push(this.matches,new dp.sh.Match(_5ba[1],_5ba.index,"attribute"));
if(_5ba[2]!=undefined){
push(this.matches,new dp.sh.Match(_5ba[2],_5ba.index+_5ba[0].indexOf(_5ba[2]),"attribute-value"));
}
}
this.GetMatches(new RegExp("(&lt;|<)/*\\?*(?!\\!)|/*\\?*(&gt;|>)","gm"),"tag");
_5bb=new RegExp("(?:&lt;|<)/*\\?*\\s*([:\\w-.]+)","gm");
while((_5ba=_5bb.exec(this.code))!=null){
push(this.matches,new dp.sh.Match(_5ba[1],_5ba.index+_5ba[0].indexOf(_5ba[1]),"tag-name"));
}
};

