(function(_1,_2){
var _3=function(_4,_5){
return new _3.fn.init(_4,_5);
},_6=_1.jQuery,_$=_1.$,_8=_1.document,_9,_a=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,_b=/^.[^:#\[\.,]*$/,_c=/\S/,_d=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,_e=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,_f=navigator.userAgent,_10,_11=false,_12=[],_13,_14=Object.prototype.toString,_15=Object.prototype.hasOwnProperty,_16=Array.prototype.push,_17=Array.prototype.slice,_18=Array.prototype.indexOf;
_3.fn=_3.prototype={init:function(_19,_1a){
var _1b,_1c,ret,doc;
if(!_19){
return this;
}
if(_19.nodeType){
this.context=this[0]=_19;
this.length=1;
return this;
}
if(_19==="body"&&!_1a){
this.context=_8;
this[0]=_8.body;
this.selector="body";
this.length=1;
return this;
}
if(typeof _19==="string"){
_1b=_a.exec(_19);
if(_1b&&(_1b[1]||!_1a)){
if(_1b[1]){
doc=(_1a?_1a.ownerDocument||_1a:_8);
ret=_e.exec(_19);
if(ret){
if(_3.isPlainObject(_1a)){
_19=[_8.createElement(ret[1])];
_3.fn.attr.call(_19,_1a,true);
}else{
_19=[doc.createElement(ret[1])];
}
}else{
ret=buildFragment([_1b[1]],[doc]);
_19=(ret.cacheable?ret.fragment.cloneNode(true):ret.fragment).childNodes;
}
return _3.merge(this,_19);
}else{
_1c=_8.getElementById(_1b[2]);
if(_1c){
if(_1c.id!==_1b[2]){
return _9.find(_19);
}
this.length=1;
this[0]=_1c;
}
this.context=_8;
this.selector=_19;
return this;
}
}else{
if(!_1a&&/^\w+$/.test(_19)){
this.selector=_19;
this.context=_8;
_19=_8.getElementsByTagName(_19);
return _3.merge(this,_19);
}else{
if(!_1a||_1a.jquery){
return (_1a||_9).find(_19);
}else{
return _3(_1a).find(_19);
}
}
}
}else{
if(_3.isFunction(_19)){
return _9.ready(_19);
}
}
if(_19.selector!==_2){
this.selector=_19.selector;
this.context=_19.context;
}
return _3.makeArray(_19,this);
},selector:"",jquery:"1.4.2",length:0,size:function(){
return this.length;
},toArray:function(){
return _17.call(this,0);
},get:function(num){
return num==null?this.toArray():(num<0?this.slice(num)[0]:this[num]);
},pushStack:function(_20,_21,_22){
var ret=_3();
if(_3.isArray(_20)){
_16.apply(ret,_20);
}else{
_3.merge(ret,_20);
}
ret.prevObject=this;
ret.context=this.context;
if(_21==="find"){
ret.selector=this.selector+(this.selector?" ":"")+_22;
}else{
if(_21){
ret.selector=this.selector+"."+_21+"("+_22+")";
}
}
return ret;
},each:function(_24,_25){
return _3.each(this,_24,_25);
},ready:function(fn){
_3.bindReady();
if(_3.isReady){
fn.call(_8,_3);
}else{
if(_12){
_12.push(fn);
}
}
return this;
},eq:function(i){
return i===-1?this.slice(i):this.slice(i,+i+1);
},first:function(){
return this.eq(0);
},last:function(){
return this.eq(-1);
},slice:function(){
return this.pushStack(_17.apply(this,arguments),"slice",_17.call(arguments).join(","));
},map:function(_28){
return this.pushStack(_3.map(this,function(_29,i){
return _28.call(_29,i,_29);
}));
},end:function(){
return this.prevObject||_3(null);
},push:_16,sort:[].sort,splice:[].splice};
_3.fn.init.prototype=_3.fn;
_3.extend=_3.fn.extend=function(){
var _2b=arguments[0]||{},i=1,_2d=arguments.length,_2e=false,_2f,_30,src,_32;
if(typeof _2b==="boolean"){
_2e=_2b;
_2b=arguments[1]||{};
i=2;
}
if(typeof _2b!=="object"&&!_3.isFunction(_2b)){
_2b={};
}
if(_2d===i){
_2b=this;
--i;
}
for(;i<_2d;i++){
if((_2f=arguments[i])!=null){
for(_30 in _2f){
src=_2b[_30];
_32=_2f[_30];
if(_2b===_32){
continue;
}
if(_2e&&_32&&(_3.isPlainObject(_32)||_3.isArray(_32))){
var _33=src&&(_3.isPlainObject(src)||_3.isArray(src))?src:_3.isArray(_32)?[]:{};
_2b[_30]=_3.extend(_2e,_33,_32);
}else{
if(_32!==_2){
_2b[_30]=_32;
}
}
}
}
}
return _2b;
};
_3.extend({noConflict:function(_34){
_1.$=_$;
if(_34){
_1.jQuery=_6;
}
return _3;
},isReady:false,ready:function(){
if(!_3.isReady){
if(!_8.body){
return setTimeout(_3.ready,13);
}
_3.isReady=true;
if(_12){
var fn,i=0;
while((fn=_12[i++])){
fn.call(_8,_3);
}
_12=null;
}
if(_3.fn.triggerHandler){
_3(_8).triggerHandler("ready");
}
}
},bindReady:function(){
if(_11){
return;
}
_11=true;
if(_8.readyState==="complete"){
return _3.ready();
}
if(_8.addEventListener){
_8.addEventListener("DOMContentLoaded",_13,false);
_1.addEventListener("load",_3.ready,false);
}else{
if(_8.attachEvent){
_8.attachEvent("onreadystatechange",_13);
_1.attachEvent("onload",_3.ready);
var _37=false;
try{
_37=_1.frameElement==null;
}
catch(e){
}
if(_8.documentElement.doScroll&&_37){
doScrollCheck();
}
}
}
},isFunction:function(obj){
return _14.call(obj)==="[object Function]";
},isArray:function(obj){
return _14.call(obj)==="[object Array]";
},isPlainObject:function(obj){
if(!obj||_14.call(obj)!=="[object Object]"||obj.nodeType||obj.setInterval){
return false;
}
if(obj.constructor&&!_15.call(obj,"constructor")&&!_15.call(obj.constructor.prototype,"isPrototypeOf")){
return false;
}
var key;
for(key in obj){
}
return key===_2||_15.call(obj,key);
},isEmptyObject:function(obj){
for(var _3d in obj){
return false;
}
return true;
},error:function(msg){
throw msg;
},parseJSON:function(_3f){
if(typeof _3f!=="string"||!_3f){
return null;
}
_3f=_3.trim(_3f);
if(/^[\],:{}\s]*$/.test(_3f.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){
return _1.JSON&&_1.JSON.parse?_1.JSON.parse(_3f):(new Function("return "+_3f))();
}else{
_3.error("Invalid JSON: "+_3f);
}
},noop:function(){
},globalEval:function(_40){
if(_40&&_c.test(_40)){
var _41=_8.getElementsByTagName("head")[0]||_8.documentElement,_42=_8.createElement("script");
_42.type="text/javascript";
if(_3.support.scriptEval){
_42.appendChild(_8.createTextNode(_40));
}else{
_42.text=_40;
}
_41.insertBefore(_42,_41.firstChild);
_41.removeChild(_42);
}
},nodeName:function(_43,_44){
return _43.nodeName&&_43.nodeName.toUpperCase()===_44.toUpperCase();
},each:function(_45,_46,_47){
var _48,i=0,_4a=_45.length,_4b=_4a===_2||_3.isFunction(_45);
if(_47){
if(_4b){
for(_48 in _45){
if(_46.apply(_45[_48],_47)===false){
break;
}
}
}else{
for(;i<_4a;){
if(_46.apply(_45[i++],_47)===false){
break;
}
}
}
}else{
if(_4b){
for(_48 in _45){
if(_46.call(_45[_48],_48,_45[_48])===false){
break;
}
}
}else{
for(var _4c=_45[0];i<_4a&&_46.call(_4c,i,_4c)!==false;_4c=_45[++i]){
}
}
}
return _45;
},trim:function(_4d){
return (_4d||"").replace(_d,"");
},makeArray:function(_4e,_4f){
var ret=_4f||[];
if(_4e!=null){
if(_4e.length==null||typeof _4e==="string"||_3.isFunction(_4e)||(typeof _4e!=="function"&&_4e.setInterval)){
_16.call(ret,_4e);
}else{
_3.merge(ret,_4e);
}
}
return ret;
},inArray:function(_51,_52){
if(_52.indexOf){
return _52.indexOf(_51);
}
for(var i=0,_54=_52.length;i<_54;i++){
if(_52[i]===_51){
return i;
}
}
return -1;
},merge:function(_55,_56){
var i=_55.length,j=0;
if(typeof _56.length==="number"){
for(var l=_56.length;j<l;j++){
_55[i++]=_56[j];
}
}else{
while(_56[j]!==_2){
_55[i++]=_56[j++];
}
}
_55.length=i;
return _55;
},grep:function(_5a,_5b,inv){
var ret=[];
for(var i=0,_5f=_5a.length;i<_5f;i++){
if(!inv!==!_5b(_5a[i],i)){
ret.push(_5a[i]);
}
}
return ret;
},map:function(_60,_61,arg){
var ret=[],_64;
for(var i=0,_66=_60.length;i<_66;i++){
_64=_61(_60[i],i,arg);
if(_64!=null){
ret[ret.length]=_64;
}
}
return ret.concat.apply([],ret);
},guid:1,proxy:function(fn,_68,_69){
if(arguments.length===2){
if(typeof _68==="string"){
_69=fn;
fn=_69[_68];
_68=_2;
}else{
if(_68&&!_3.isFunction(_68)){
_69=_68;
_68=_2;
}
}
}
if(!_68&&fn){
_68=function(){
return fn.apply(_69||this,arguments);
};
}
if(fn){
_68.guid=fn.guid=fn.guid||_68.guid||_3.guid++;
}
return _68;
},uaMatch:function(ua){
ua=ua.toLowerCase();
var _6b=/(webkit)[ \/]([\w.]+)/.exec(ua)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(ua)||/(msie) ([\w.]+)/.exec(ua)||!/compatible/.test(ua)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(ua)||[];
return {browser:_6b[1]||"",version:_6b[2]||"0"};
},browser:{}});
_10=_3.uaMatch(_f);
if(_10.browser){
_3.browser[_10.browser]=true;
_3.browser.version=_10.version;
}
if(_3.browser.webkit){
_3.browser.safari=true;
}
if(_18){
_3.inArray=function(_6c,_6d){
return _18.call(_6d,_6c);
};
}
_9=_3(_8);
if(_8.addEventListener){
_13=function(){
_8.removeEventListener("DOMContentLoaded",_13,false);
_3.ready();
};
}else{
if(_8.attachEvent){
_13=function(){
if(_8.readyState==="complete"){
_8.detachEvent("onreadystatechange",_13);
_3.ready();
}
};
}
}
function doScrollCheck(){
if(_3.isReady){
return;
}
try{
_8.documentElement.doScroll("left");
}
catch(error){
setTimeout(doScrollCheck,1);
return;
}
_3.ready();
};
function evalScript(i,_6f){
if(_6f.src){
_3.ajax({url:_6f.src,async:false,dataType:"script"});
}else{
_3.globalEval(_6f.text||_6f.textContent||_6f.innerHTML||"");
}
if(_6f.parentNode){
_6f.parentNode.removeChild(_6f);
}
};
function access(_70,key,_72,_73,fn,_75){
var _76=_70.length;
if(typeof key==="object"){
for(var k in key){
access(_70,k,key[k],_73,fn,_72);
}
return _70;
}
if(_72!==_2){
_73=!_75&&_73&&_3.isFunction(_72);
for(var i=0;i<_76;i++){
fn(_70[i],key,_73?_72.call(_70[i],i,fn(_70[i],key)):_72,_75);
}
return _70;
}
return _76?fn(_70[0],key):_2;
};
function now(){
return (new Date).getTime();
};
(function(){
_3.support={};
var _79=_8.documentElement,_7a=_8.createElement("script"),div=_8.createElement("div"),id="script"+now();
div.style.display="none";
div.innerHTML="   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
var all=div.getElementsByTagName("*"),a=div.getElementsByTagName("a")[0];
if(!all||!all.length||!a){
return;
}
_3.support={leadingWhitespace:div.firstChild.nodeType===3,tbody:!div.getElementsByTagName("tbody").length,htmlSerialize:!!div.getElementsByTagName("link").length,style:/red/.test(a.getAttribute("style")),hrefNormalized:a.getAttribute("href")==="/a",opacity:/^0.55$/.test(a.style.opacity),cssFloat:!!a.style.cssFloat,checkOn:div.getElementsByTagName("input")[0].value==="on",optSelected:_8.createElement("select").appendChild(_8.createElement("option")).selected,parentNode:div.removeChild(div.appendChild(_8.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};
_7a.type="text/javascript";
try{
_7a.appendChild(_8.createTextNode("window."+id+"=1;"));
}
catch(e){
}
_79.insertBefore(_7a,_79.firstChild);
if(_1[id]){
_3.support.scriptEval=true;
delete _1[id];
}
try{
delete _7a.test;
}
catch(e){
_3.support.deleteExpando=false;
}
_79.removeChild(_7a);
if(div.attachEvent&&div.fireEvent){
div.attachEvent("onclick",function click(){
_3.support.noCloneEvent=false;
if(typeof (_7f)!=="undefined"){
div.detachEvent("onclick",_7f);
}
});
div.cloneNode(true).fireEvent("onclick");
}
div=_8.createElement("div");
div.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";
var _80=_8.createDocumentFragment();
_80.appendChild(div.firstChild);
_3.support.checkClone=_80.cloneNode(true).cloneNode(true).lastChild.checked;
_3(function(){
var div=_8.createElement("div");
div.style.width=div.style.paddingLeft="1px";
_8.body.appendChild(div);
_3.boxModel=_3.support.boxModel=div.offsetWidth===2;
_8.body.removeChild(div).style.display="none";
div=null;
});
var _82=function(_83){
var el=_8.createElement("div");
_83="on"+_83;
var _85=(_83 in el);
if(!_85){
el.setAttribute(_83,"return;");
_85=typeof el[_83]==="function";
}
el=null;
return _85;
};
_3.support.submitBubbles=_82("submit");
_3.support.changeBubbles=_82("change");
_79=_7a=div=all=a=null;
})();
_3.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};
var _86="jQuery"+now(),_87=0,_88={};
_3.extend({cache:{},expando:_86,noData:{"embed":true,"object":true,"applet":true},data:function(_89,_8a,_8b){
if(_89.nodeName&&_3.noData[_89.nodeName.toLowerCase()]){
return;
}
_89=_89==_1?_88:_89;
var id=_89[_86],_8d=_3.cache,_8e;
if(!id&&typeof _8a==="string"&&_8b===_2){
return null;
}
if(!id){
id=++_87;
}
if(typeof _8a==="object"){
_89[_86]=id;
_8e=_8d[id]=_3.extend(true,{},_8a);
}else{
if(!_8d[id]){
_89[_86]=id;
_8d[id]={};
}
}
_8e=_8d[id];
if(_8b!==_2){
_8e[_8a]=_8b;
}
return typeof _8a==="string"?_8e[_8a]:_8e;
},removeData:function(_8f,_90){
if(_8f.nodeName&&_3.noData[_8f.nodeName.toLowerCase()]){
return;
}
_8f=_8f==_1?_88:_8f;
var id=_8f[_86],_92=_3.cache,_93=_92[id];
if(_90){
if(_93){
delete _93[_90];
if(_3.isEmptyObject(_93)){
_3.removeData(_8f);
}
}
}else{
if(_3.support.deleteExpando){
delete _8f[_3.expando];
}else{
if(_8f.removeAttribute){
_8f.removeAttribute(_3.expando);
}
}
delete _92[id];
}
}});
_3.fn.extend({data:function(key,_95){
if(typeof key==="undefined"&&this.length){
return _3.data(this[0]);
}else{
if(typeof key==="object"){
return this.each(function(){
_3.data(this,key);
});
}
}
var _96=key.split(".");
_96[1]=_96[1]?"."+_96[1]:"";
if(_95===_2){
var _97=this.triggerHandler("getData"+_96[1]+"!",[_96[0]]);
if(_97===_2&&this.length){
_97=_3.data(this[0],key);
}
return _97===_2&&_96[1]?this.data(_96[0]):_97;
}else{
return this.trigger("setData"+_96[1]+"!",[_96[0],_95]).each(function(){
_3.data(this,key,_95);
});
}
},removeData:function(key){
return this.each(function(){
_3.removeData(this,key);
});
}});
_3.extend({queue:function(_99,_9a,_9b){
if(!_99){
return;
}
_9a=(_9a||"fx")+"queue";
var q=_3.data(_99,_9a);
if(!_9b){
return q||[];
}
if(!q||_3.isArray(_9b)){
q=_3.data(_99,_9a,_3.makeArray(_9b));
}else{
q.push(_9b);
}
return q;
},dequeue:function(_9d,_9e){
_9e=_9e||"fx";
var _9f=_3.queue(_9d,_9e),fn=_9f.shift();
if(fn==="inprogress"){
fn=_9f.shift();
}
if(fn){
if(_9e==="fx"){
_9f.unshift("inprogress");
}
fn.call(_9d,function(){
_3.dequeue(_9d,_9e);
});
}
}});
_3.fn.extend({queue:function(_a1,_a2){
if(typeof _a1!=="string"){
_a2=_a1;
_a1="fx";
}
if(_a2===_2){
return _3.queue(this[0],_a1);
}
return this.each(function(i,_a4){
var _a5=_3.queue(this,_a1,_a2);
if(_a1==="fx"&&_a5[0]!=="inprogress"){
_3.dequeue(this,_a1);
}
});
},dequeue:function(_a6){
return this.each(function(){
_3.dequeue(this,_a6);
});
},delay:function(_a7,_a8){
_a7=_3.fx?_3.fx.speeds[_a7]||_a7:_a7;
_a8=_a8||"fx";
return this.queue(_a8,function(){
var _a9=this;
setTimeout(function(){
_3.dequeue(_a9,_a8);
},_a7);
});
},clearQueue:function(_aa){
return this.queue(_aa||"fx",[]);
}});
var _ab=/[\n\t]/g,_ac=/\s+/,_ad=/\r/g,_ae=/href|src|style/,_af=/(button|input)/i,_b0=/(button|input|object|select|textarea)/i,_b1=/^(a|area)$/i,_b2=/radio|checkbox/;
_3.fn.extend({attr:function(_b3,_b4){
return access(this,_b3,_b4,true,_3.attr);
},removeAttr:function(_b5,fn){
return this.each(function(){
_3.attr(this,_b5,"");
if(this.nodeType===1){
this.removeAttribute(_b5);
}
});
},addClass:function(_b7){
if(_3.isFunction(_b7)){
return this.each(function(i){
var _b9=_3(this);
_b9.addClass(_b7.call(this,i,_b9.attr("class")));
});
}
if(_b7&&typeof _b7==="string"){
var _ba=(_b7||"").split(_ac);
for(var i=0,l=this.length;i<l;i++){
var _bd=this[i];
if(_bd.nodeType===1){
if(!_bd.className){
_bd.className=_b7;
}else{
var _be=" "+_bd.className+" ",_bf=_bd.className;
for(var c=0,cl=_ba.length;c<cl;c++){
if(_be.indexOf(" "+_ba[c]+" ")<0){
_bf+=" "+_ba[c];
}
}
_bd.className=_3.trim(_bf);
}
}
}
}
return this;
},removeClass:function(_c2){
if(_3.isFunction(_c2)){
return this.each(function(i){
var _c4=_3(this);
_c4.removeClass(_c2.call(this,i,_c4.attr("class")));
});
}
if((_c2&&typeof _c2==="string")||_c2===_2){
var _c5=(_c2||"").split(_ac);
for(var i=0,l=this.length;i<l;i++){
var _c8=this[i];
if(_c8.nodeType===1&&_c8.className){
if(_c2){
var _c9=(" "+_c8.className+" ").replace(_ab," ");
for(var c=0,cl=_c5.length;c<cl;c++){
_c9=_c9.replace(" "+_c5[c]+" "," ");
}
_c8.className=_3.trim(_c9);
}else{
_c8.className="";
}
}
}
}
return this;
},toggleClass:function(_cc,_cd){
var _ce=typeof _cc,_cf=typeof _cd==="boolean";
if(_3.isFunction(_cc)){
return this.each(function(i){
var _d1=_3(this);
_d1.toggleClass(_cc.call(this,i,_d1.attr("class"),_cd),_cd);
});
}
return this.each(function(){
if(_ce==="string"){
var _d2,i=0,_d4=_3(this),_d5=_cd,_d6=_cc.split(_ac);
while((_d2=_d6[i++])){
_d5=_cf?_d5:!_d4.hasClass(_d2);
_d4[_d5?"addClass":"removeClass"](_d2);
}
}else{
if(_ce==="undefined"||_ce==="boolean"){
if(this.className){
_3.data(this,"__className__",this.className);
}
this.className=this.className||_cc===false?"":_3.data(this,"__className__")||"";
}
}
});
},hasClass:function(_d7){
var _d8=" "+_d7+" ";
for(var i=0,l=this.length;i<l;i++){
if((" "+this[i].className+" ").replace(_ab," ").indexOf(_d8)>-1){
return true;
}
}
return false;
},val:function(_db){
if(_db===_2){
var _dc=this[0];
if(_dc){
if(_3.nodeName(_dc,"option")){
return (_dc.attributes.value||{}).specified?_dc.value:_dc.text;
}
if(_3.nodeName(_dc,"select")){
var _dd=_dc.selectedIndex,_de=[],_df=_dc.options,one=_dc.type==="select-one";
if(_dd<0){
return null;
}
for(var i=one?_dd:0,max=one?_dd+1:_df.length;i<max;i++){
var _e3=_df[i];
if(_e3.selected){
_db=_3(_e3).val();
if(one){
return _db;
}
_de.push(_db);
}
}
return _de;
}
if(_b2.test(_dc.type)&&!_3.support.checkOn){
return _dc.getAttribute("value")===null?"on":_dc.value;
}
return (_dc.value||"").replace(_ad,"");
}
return _2;
}
var _e4=_3.isFunction(_db);
return this.each(function(i){
var _e6=_3(this),val=_db;
if(this.nodeType!==1){
return;
}
if(_e4){
val=_db.call(this,i,_e6.val());
}
if(typeof val==="number"){
val+="";
}
if(_3.isArray(val)&&_b2.test(this.type)){
this.checked=_3.inArray(_e6.val(),val)>=0;
}else{
if(_3.nodeName(this,"select")){
var _e8=_3.makeArray(val);
_3("option",this).each(function(){
this.selected=_3.inArray(_3(this).val(),_e8)>=0;
});
if(!_e8.length){
this.selectedIndex=-1;
}
}else{
this.value=val;
}
}
});
}});
_3.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(_e9,_ea,_eb,_ec){
if(!_e9||_e9.nodeType===3||_e9.nodeType===8){
return _2;
}
if(_ec&&_ea in _3.attrFn){
return _3(_e9)[_ea](_eb);
}
var _ed=_e9.nodeType!==1||!_3.isXMLDoc(_e9),set=_eb!==_2;
_ea=_ed&&_3.props[_ea]||_ea;
if(_e9.nodeType===1){
var _ef=_ae.test(_ea);
if(_ea==="selected"&&!_3.support.optSelected){
var _f0=_e9.parentNode;
if(_f0){
_f0.selectedIndex;
if(_f0.parentNode){
_f0.parentNode.selectedIndex;
}
}
}
if(_ea in _e9&&_ed&&!_ef){
if(set){
if(_ea==="type"&&_af.test(_e9.nodeName)&&_e9.parentNode){
_3.error("type property can't be changed");
}
_e9[_ea]=_eb;
}
if(_3.nodeName(_e9,"form")&&_e9.getAttributeNode(_ea)){
return _e9.getAttributeNode(_ea).nodeValue;
}
if(_ea==="tabIndex"){
var _f1=_e9.getAttributeNode("tabIndex");
return _f1&&_f1.specified?_f1.value:_b0.test(_e9.nodeName)||_b1.test(_e9.nodeName)&&_e9.href?0:_2;
}
return _e9[_ea];
}
if(!_3.support.style&&_ed&&_ea==="style"){
if(set){
_e9.style.cssText=""+_eb;
}
return _e9.style.cssText;
}
if(set){
_e9.setAttribute(_ea,""+_eb);
}
var _f2=!_3.support.hrefNormalized&&_ed&&_ef?_e9.getAttribute(_ea,2):_e9.getAttribute(_ea);
return _f2===null?_2:_f2;
}
return _3.style(_e9,_ea,_eb);
}});
var _f3=/\.(.*)$/,_f4=function(nm){
return nm.replace(/[^\w\s\.\|`]/g,function(ch){
return "\\"+ch;
});
};
_3.event={add:function(_f7,_f8,_f9,_fa){
if(_f7.nodeType===3||_f7.nodeType===8){
return;
}
if(_f7.setInterval&&(_f7!==_1&&!_f7.frameElement)){
_f7=_1;
}
var _fb,_fc;
if(_f9.handler){
_fb=_f9;
_f9=_fb.handler;
}
if(!_f9.guid){
_f9.guid=_3.guid++;
}
var _fd=_3.data(_f7);
if(!_fd){
return;
}
var _fe=_fd.events=_fd.events||{},_ff=_fd.handle,_ff;
if(!_ff){
_fd.handle=_ff=function(){
return typeof _3!=="undefined"&&!_3.event.triggered?_3.event.handle.apply(_ff.elem,arguments):_2;
};
}
_ff.elem=_f7;
_f8=_f8.split(" ");
var type,i=0,_102;
while((type=_f8[i++])){
_fc=_fb?_3.extend({},_fb):{handler:_f9,data:_fa};
if(type.indexOf(".")>-1){
_102=type.split(".");
type=_102.shift();
_fc.namespace=_102.slice(0).sort().join(".");
}else{
_102=[];
_fc.namespace="";
}
_fc.type=type;
_fc.guid=_f9.guid;
var _103=_fe[type],_104=_3.event.special[type]||{};
if(!_103){
_103=_fe[type]=[];
if(!_104.setup||_104.setup.call(_f7,_fa,_102,_ff)===false){
if(_f7.addEventListener){
_f7.addEventListener(type,_ff,false);
}else{
if(_f7.attachEvent){
_f7.attachEvent("on"+type,_ff);
}
}
}
}
if(_104.add){
_104.add.call(_f7,_fc);
if(!_fc.handler.guid){
_fc.handler.guid=_f9.guid;
}
}
_103.push(_fc);
_3.event.global[type]=true;
}
_f7=null;
},global:{},remove:function(elem,_106,_107,pos){
if(elem.nodeType===3||elem.nodeType===8){
return;
}
var ret,type,fn,i=0,all,_10e,_10f,_110,_111,_112,_113,_114=_3.data(elem),_115=_114&&_114.events;
if(!_114||!_115){
return;
}
if(_106&&_106.type){
_107=_106.handler;
_106=_106.type;
}
if(!_106||typeof _106==="string"&&_106.charAt(0)==="."){
_106=_106||"";
for(type in _115){
_3.event.remove(elem,type+_106);
}
return;
}
_106=_106.split(" ");
while((type=_106[i++])){
_113=type;
_112=null;
all=type.indexOf(".")<0;
_10e=[];
if(!all){
_10e=type.split(".");
type=_10e.shift();
_10f=new RegExp("(^|\\.)"+_3.map(_10e.slice(0).sort(),_f4).join("\\.(?:.*\\.)?")+"(\\.|$)");
}
_111=_115[type];
if(!_111){
continue;
}
if(!_107){
for(var j=0;j<_111.length;j++){
_112=_111[j];
if(all||_10f.test(_112.namespace)){
_3.event.remove(elem,_113,_112.handler,j);
_111.splice(j--,1);
}
}
continue;
}
_110=_3.event.special[type]||{};
for(var j=pos||0;j<_111.length;j++){
_112=_111[j];
if(_107.guid===_112.guid){
if(all||_10f.test(_112.namespace)){
if(pos==null){
_111.splice(j--,1);
}
if(_110.remove){
_110.remove.call(elem,_112);
}
}
if(pos!=null){
break;
}
}
}
if(_111.length===0||pos!=null&&_111.length===1){
if(!_110.teardown||_110.teardown.call(elem,_10e)===false){
_117(elem,type,_114.handle);
}
ret=null;
delete _115[type];
}
}
if(_3.isEmptyObject(_115)){
var _118=_114.handle;
if(_118){
_118.elem=null;
}
delete _114.events;
delete _114.handle;
if(_3.isEmptyObject(_114)){
_3.removeData(elem);
}
}
},trigger:function(_119,data,elem){
var type=_119.type||_119,_11d=arguments[3];
if(!_11d){
_119=typeof _119==="object"?_119[_86]?_119:_3.extend(_3.Event(type),_119):_3.Event(type);
if(type.indexOf("!")>=0){
_119.type=type=type.slice(0,-1);
_119.exclusive=true;
}
if(!elem){
_119.stopPropagation();
if(_3.event.global[type]){
_3.each(_3.cache,function(){
if(this.events&&this.events[type]){
_3.event.trigger(_119,data,this.handle.elem);
}
});
}
}
if(!elem||elem.nodeType===3||elem.nodeType===8){
return _2;
}
_119.result=_2;
_119.target=elem;
data=_3.makeArray(data);
data.unshift(_119);
}
_119.currentTarget=elem;
var _11e=_3.data(elem,"handle");
if(_11e){
_11e.apply(elem,data);
}
var _11f=elem.parentNode||elem.ownerDocument;
try{
if(!(elem&&elem.nodeName&&_3.noData[elem.nodeName.toLowerCase()])){
if(elem["on"+type]&&elem["on"+type].apply(elem,data)===false){
_119.result=false;
}
}
}
catch(e){
}
if(!_119.isPropagationStopped()&&_11f){
_3.event.trigger(_119,data,_11f,true);
}else{
if(!_119.isDefaultPrevented()){
var _120=_119.target,old,_122=_3.nodeName(_120,"a")&&type==="click",_123=_3.event.special[type]||{};
if((!_123._default||_123._default.call(elem,_119)===false)&&!_122&&!(_120&&_120.nodeName&&_3.noData[_120.nodeName.toLowerCase()])){
try{
if(_120[type]){
old=_120["on"+type];
if(old){
_120["on"+type]=null;
}
_3.event.triggered=true;
_120[type]();
}
}
catch(e){
}
if(old){
_120["on"+type]=old;
}
_3.event.triggered=false;
}
}
}
},handle:function(_124){
var all,_126,_127,_128,_129;
_124=arguments[0]=_3.event.fix(_124||_1.event);
_124.currentTarget=this;
all=_124.type.indexOf(".")<0&&!_124.exclusive;
if(!all){
_127=_124.type.split(".");
_124.type=_127.shift();
_128=new RegExp("(^|\\.)"+_127.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)");
}
var _129=_3.data(this,"events"),_126=_129[_124.type];
if(_129&&_126){
_126=_126.slice(0);
for(var j=0,l=_126.length;j<l;j++){
var _12c=_126[j];
if(all||_128.test(_12c.namespace)){
_124.handler=_12c.handler;
_124.data=_12c.data;
_124.handleObj=_12c;
var ret=_12c.handler.apply(this,arguments);
if(ret!==_2){
_124.result=ret;
if(ret===false){
_124.preventDefault();
_124.stopPropagation();
}
}
if(_124.isImmediatePropagationStopped()){
break;
}
}
}
}
return _124.result;
},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(_12e){
if(_12e[_86]){
return _12e;
}
var _12f=_12e;
_12e=_3.Event(_12f);
for(var i=this.props.length,prop;i;){
prop=this.props[--i];
_12e[prop]=_12f[prop];
}
if(!_12e.target){
_12e.target=_12e.srcElement||_8;
}
if(_12e.target.nodeType===3){
_12e.target=_12e.target.parentNode;
}
if(!_12e.relatedTarget&&_12e.fromElement){
_12e.relatedTarget=_12e.fromElement===_12e.target?_12e.toElement:_12e.fromElement;
}
if(_12e.pageX==null&&_12e.clientX!=null){
var doc=_8.documentElement,body=_8.body;
_12e.pageX=_12e.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc&&doc.clientLeft||body&&body.clientLeft||0);
_12e.pageY=_12e.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc&&doc.clientTop||body&&body.clientTop||0);
}
if(!_12e.which&&((_12e.charCode||_12e.charCode===0)?_12e.charCode:_12e.keyCode)){
_12e.which=_12e.charCode||_12e.keyCode;
}
if(!_12e.metaKey&&_12e.ctrlKey){
_12e.metaKey=_12e.ctrlKey;
}
if(!_12e.which&&_12e.button!==_2){
_12e.which=(_12e.button&1?1:(_12e.button&2?3:(_12e.button&4?2:0)));
}
return _12e;
},guid:100000000,proxy:_3.proxy,special:{ready:{setup:_3.bindReady,teardown:_3.noop},live:{add:function(_134){
_3.event.add(this,_134.origType,_3.extend({},_134,{handler:liveHandler}));
},remove:function(_135){
var _136=true,type=_135.origType.replace(_f3,"");
_3.each(_3.data(this,"events").live||[],function(){
if(type===this.origType.replace(_f3,"")){
_136=false;
return false;
}
});
if(_136){
_3.event.remove(this,_135.origType,liveHandler);
}
}},beforeunload:{setup:function(data,_139,_13a){
if(this.setInterval){
this.onbeforeunload=_13a;
}
return false;
},teardown:function(_13b,_13c){
if(this.onbeforeunload===_13c){
this.onbeforeunload=null;
}
}}}};
var _117=_8.removeEventListener?function(elem,type,_13f){
elem.removeEventListener(type,_13f,false);
}:function(elem,type,_142){
elem.detachEvent("on"+type,_142);
};
_3.Event=function(src){
if(!this.preventDefault){
return new _3.Event(src);
}
if(src&&src.type){
this.originalEvent=src;
this.type=src.type;
}else{
this.type=src;
}
this.timeStamp=now();
this[_86]=true;
};
function returnFalse(){
return false;
};
function returnTrue(){
return true;
};
_3.Event.prototype={preventDefault:function(){
this.isDefaultPrevented=returnTrue;
var e=this.originalEvent;
if(!e){
return;
}
if(e.preventDefault){
e.preventDefault();
}
e.returnValue=false;
},stopPropagation:function(){
this.isPropagationStopped=returnTrue;
var e=this.originalEvent;
if(!e){
return;
}
if(e.stopPropagation){
e.stopPropagation();
}
e.cancelBubble=true;
},stopImmediatePropagation:function(){
this.isImmediatePropagationStopped=returnTrue;
this.stopPropagation();
},isDefaultPrevented:returnFalse,isPropagationStopped:returnFalse,isImmediatePropagationStopped:returnFalse};
var _146=function(_147){
var _148=_147.relatedTarget;
try{
while(_148&&_148!==this){
_148=_148.parentNode;
}
if(_148!==this){
_147.type=_147.data;
_3.event.handle.apply(this,arguments);
}
}
catch(e){
}
},_149=function(_14a){
_14a.type=_14a.data;
_3.event.handle.apply(this,arguments);
};
_3.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(orig,fix){
_3.event.special[orig]={setup:function(data){
_3.event.add(this,fix,data&&data.selector?_149:_146,orig);
},teardown:function(data){
_3.event.remove(this,fix,data&&data.selector?_149:_146);
}};
});
if(!_3.support.submitBubbles){
_3.event.special.submit={setup:function(data,_150){
if(this.nodeName.toLowerCase()!=="form"){
_3.event.add(this,"click.specialSubmit",function(e){
var elem=e.target,type=elem.type;
if((type==="submit"||type==="image")&&_3(elem).closest("form").length){
return trigger("submit",this,arguments);
}
});
_3.event.add(this,"keypress.specialSubmit",function(e){
var elem=e.target,type=elem.type;
if((type==="text"||type==="password")&&_3(elem).closest("form").length&&e.keyCode===13){
return trigger("submit",this,arguments);
}
});
}else{
return false;
}
},teardown:function(_157){
_3.event.remove(this,".specialSubmit");
}};
}
if(!_3.support.changeBubbles){
var _158=/textarea|input|select/i,_159,_15a=function(elem){
var type=elem.type,val=elem.value;
if(type==="radio"||type==="checkbox"){
val=elem.checked;
}else{
if(type==="select-multiple"){
val=elem.selectedIndex>-1?_3.map(elem.options,function(elem){
return elem.selected;
}).join("-"):"";
}else{
if(elem.nodeName.toLowerCase()==="select"){
val=elem.selectedIndex;
}
}
}
return val;
},_15f=function _15f(e){
var elem=e.target,data,val;
if(!_158.test(elem.nodeName)||elem.readOnly){
return;
}
data=_3.data(elem,"_change_data");
val=_15a(elem);
if(e.type!=="focusout"||elem.type!=="radio"){
_3.data(elem,"_change_data",val);
}
if(data===_2||val===data){
return;
}
if(data!=null||val){
e.type="change";
return _3.event.trigger(e,arguments[1],elem);
}
};
_3.event.special.change={filters:{focusout:_15f,click:function(e){
var elem=e.target,type=elem.type;
if(type==="radio"||type==="checkbox"||elem.nodeName.toLowerCase()==="select"){
return _15f.call(this,e);
}
},keydown:function(e){
var elem=e.target,type=elem.type;
if((e.keyCode===13&&elem.nodeName.toLowerCase()!=="textarea")||(e.keyCode===32&&(type==="checkbox"||type==="radio"))||type==="select-multiple"){
return _15f.call(this,e);
}
},beforeactivate:function(e){
var elem=e.target;
_3.data(elem,"_change_data",_15a(elem));
}},setup:function(data,_16d){
if(this.type==="file"){
return false;
}
for(var type in _159){
_3.event.add(this,type+".specialChange",_159[type]);
}
return _158.test(this.nodeName);
},teardown:function(_16f){
_3.event.remove(this,".specialChange");
return _158.test(this.nodeName);
}};
_159=_3.event.special.change.filters;
}
function trigger(type,elem,args){
args[0].type=type;
return _3.event.handle.apply(elem,args);
};
if(_8.addEventListener){
_3.each({focus:"focusin",blur:"focusout"},function(orig,fix){
_3.event.special[fix]={setup:function(){
this.addEventListener(orig,handler,true);
},teardown:function(){
this.removeEventListener(orig,handler,true);
}};
function handler(e){
e=_3.event.fix(e);
e.type=fix;
return _3.event.handle.call(this,e);
};
});
}
_3.each(["bind","one"],function(i,name){
_3.fn[name]=function(type,data,fn){
if(typeof type==="object"){
for(var key in type){
this[name](key,data,type[key],fn);
}
return this;
}
if(_3.isFunction(data)){
fn=data;
data=_2;
}
var _17c=name==="one"?_3.proxy(fn,function(_17d){
_3(this).unbind(_17d,_17c);
return fn.apply(this,arguments);
}):fn;
if(type==="unload"&&name!=="one"){
this.one(type,data,fn);
}else{
for(var i=0,l=this.length;i<l;i++){
_3.event.add(this[i],type,_17c,data);
}
}
return this;
};
});
_3.fn.extend({unbind:function(type,fn){
if(typeof type==="object"&&!type.preventDefault){
for(var key in type){
this.unbind(key,type[key]);
}
}else{
for(var i=0,l=this.length;i<l;i++){
_3.event.remove(this[i],type,fn);
}
}
return this;
},delegate:function(_185,_186,data,fn){
return this.live(_186,data,fn,_185);
},undelegate:function(_189,_18a,fn){
if(arguments.length===0){
return this.unbind("live");
}else{
return this.die(_18a,null,fn,_189);
}
},trigger:function(type,data){
return this.each(function(){
_3.event.trigger(type,data,this);
});
},triggerHandler:function(type,data){
if(this[0]){
var _190=_3.Event(type);
_190.preventDefault();
_190.stopPropagation();
_3.event.trigger(_190,data,this[0]);
return _190.result;
}
},toggle:function(fn){
var args=arguments,i=1;
while(i<args.length){
_3.proxy(fn,args[i++]);
}
return this.click(_3.proxy(fn,function(_194){
var _195=(_3.data(this,"lastToggle"+fn.guid)||0)%i;
_3.data(this,"lastToggle"+fn.guid,_195+1);
_194.preventDefault();
return args[_195].apply(this,arguments)||false;
}));
},hover:function(_196,_197){
return this.mouseenter(_196).mouseleave(_197||_196);
}});
var _198={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};
_3.each(["live","die"],function(i,name){
_3.fn[name]=function(_19b,data,fn,_19e){
var type,i=0,_1a0,_1a1,_1a2,_1a3=_19e||this.selector,_1a4=_19e?this:_3(this.context);
if(_3.isFunction(data)){
fn=data;
data=_2;
}
_19b=(_19b||"").split(" ");
while((type=_19b[i++])!=null){
_1a0=_f3.exec(type);
_1a1="";
if(_1a0){
_1a1=_1a0[0];
type=type.replace(_f3,"");
}
if(type==="hover"){
_19b.push("mouseenter"+_1a1,"mouseleave"+_1a1);
continue;
}
_1a2=type;
if(type==="focus"||type==="blur"){
_19b.push(_198[type]+_1a1);
type=type+_1a1;
}else{
type=(_198[type]||type)+_1a1;
}
if(name==="live"){
_1a4.each(function(){
_3.event.add(this,liveConvert(type,_1a3),{data:data,selector:_1a3,handler:fn,origType:type,origHandler:fn,preType:_1a2});
});
}else{
_1a4.unbind(liveConvert(type,_1a3),fn);
}
}
return this;
};
});
function liveHandler(_1a5){
var stop,_1a7=[],_1a8=[],args=arguments,_1aa,_1ab,_1ac,elem,j,i,l,data,_1b2=_3.data(this,"events");
if(_1a5.liveFired===this||!_1b2||!_1b2.live||_1a5.button&&_1a5.type==="click"){
return;
}
_1a5.liveFired=this;
var live=_1b2.live.slice(0);
for(j=0;j<live.length;j++){
_1ac=live[j];
if(_1ac.origType.replace(_f3,"")===_1a5.type){
_1a8.push(_1ac.selector);
}else{
live.splice(j--,1);
}
}
_1ab=_3(_1a5.target).closest(_1a8,_1a5.currentTarget);
for(i=0,l=_1ab.length;i<l;i++){
for(j=0;j<live.length;j++){
_1ac=live[j];
if(_1ab[i].selector===_1ac.selector){
elem=_1ab[i].elem;
_1aa=null;
if(_1ac.preType==="mouseenter"||_1ac.preType==="mouseleave"){
_1aa=_3(_1a5.relatedTarget).closest(_1ac.selector)[0];
}
if(!_1aa||_1aa!==elem){
_1a7.push({elem:elem,handleObj:_1ac});
}
}
}
}
for(i=0,l=_1a7.length;i<l;i++){
_1ab=_1a7[i];
_1a5.currentTarget=_1ab.elem;
_1a5.data=_1ab.handleObj.data;
_1a5.handleObj=_1ab.handleObj;
if(_1ab.handleObj.origHandler.apply(_1ab.elem,args)===false){
stop=false;
break;
}
}
return stop;
};
function liveConvert(type,_1b5){
return "live."+(type&&type!=="*"?type+".":"")+_1b5.replace(/\./g,"`").replace(/ /g,"&");
};
_3.each(("blur focus focusin focusout load resize scroll unload click dblclick "+"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave "+"change select submit keydown keypress keyup error").split(" "),function(i,name){
_3.fn[name]=function(fn){
return fn?this.bind(name,fn):this.trigger(name);
};
if(_3.attrFn){
_3.attrFn[name]=true;
}
});
if(_1.attachEvent&&!_1.addEventListener){
_1.attachEvent("onunload",function(){
for(var id in _3.cache){
if(_3.cache[id].handle){
try{
_3.event.remove(_3.cache[id].handle.elem);
}
catch(e){
}
}
}
});
}
(function(){
var _1ba=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,done=0,_14=Object.prototype.toString,_1bc=false,_1bd=true;
[0,0].sort(function(){
_1bd=false;
return 0;
});
var _1be=function(_1bf,_1c0,_1c1,seed){
_1c1=_1c1||[];
var _1c3=_1c0=_1c0||_8;
if(_1c0.nodeType!==1&&_1c0.nodeType!==9){
return [];
}
if(!_1bf||typeof _1bf!=="string"){
return _1c1;
}
var _1c4=[],m,set,_1c7,_1c8,_1c9=true,_1ca=_1cb(_1c0),_1cc=_1bf;
while((_1ba.exec(""),m=_1ba.exec(_1cc))!==null){
_1cc=m[3];
_1c4.push(m[1]);
if(m[2]){
_1c8=m[3];
break;
}
}
if(_1c4.length>1&&_1cd.exec(_1bf)){
if(_1c4.length===2&&Expr.relative[_1c4[0]]){
set=_1cf(_1c4[0]+_1c4[1],_1c0);
}else{
set=Expr.relative[_1c4[0]]?[_1c0]:_1be(_1c4.shift(),_1c0);
while(_1c4.length){
_1bf=_1c4.shift();
if(Expr.relative[_1bf]){
_1bf+=_1c4.shift();
}
set=_1cf(_1bf,set);
}
}
}else{
if(!seed&&_1c4.length>1&&_1c0.nodeType===9&&!_1ca&&Expr.match.ID.test(_1c4[0])&&!Expr.match.ID.test(_1c4[_1c4.length-1])){
var ret=_1be.find(_1c4.shift(),_1c0,_1ca);
_1c0=ret.expr?_1be.filter(ret.expr,ret.set)[0]:ret.set[0];
}
if(_1c0){
var ret=seed?{expr:_1c4.pop(),set:_1d1(seed)}:_1be.find(_1c4.pop(),_1c4.length===1&&(_1c4[0]==="~"||_1c4[0]==="+")&&_1c0.parentNode?_1c0.parentNode:_1c0,_1ca);
set=ret.expr?_1be.filter(ret.expr,ret.set):ret.set;
if(_1c4.length>0){
_1c7=_1d1(set);
}else{
_1c9=false;
}
while(_1c4.length){
var cur=_1c4.pop(),pop=cur;
if(!Expr.relative[cur]){
cur="";
}else{
pop=_1c4.pop();
}
if(pop==null){
pop=_1c0;
}
Expr.relative[cur](_1c7,pop,_1ca);
}
}else{
_1c7=_1c4=[];
}
}
if(!_1c7){
_1c7=set;
}
if(!_1c7){
_1be.error(cur||_1bf);
}
if(_14.call(_1c7)==="[object Array]"){
if(!_1c9){
_1c1.push.apply(_1c1,_1c7);
}else{
if(_1c0&&_1c0.nodeType===1){
for(var i=0;_1c7[i]!=null;i++){
if(_1c7[i]&&(_1c7[i]===true||_1c7[i].nodeType===1&&_1d5(_1c0,_1c7[i]))){
_1c1.push(set[i]);
}
}
}else{
for(var i=0;_1c7[i]!=null;i++){
if(_1c7[i]&&_1c7[i].nodeType===1){
_1c1.push(set[i]);
}
}
}
}
}else{
_1d1(_1c7,_1c1);
}
if(_1c8){
_1be(_1c8,_1c3,_1c1,seed);
_1be.uniqueSort(_1c1);
}
return _1c1;
};
_1be.uniqueSort=function(_1d6){
if(_1d7){
_1bc=_1bd;
_1d6.sort(_1d7);
if(_1bc){
for(var i=1;i<_1d6.length;i++){
if(_1d6[i]===_1d6[i-1]){
_1d6.splice(i--,1);
}
}
}
}
return _1d6;
};
_1be.matches=function(expr,set){
return _1be(expr,null,null,set);
};
_1be.find=function(expr,_1dc,_1dd){
var set,_1df;
if(!expr){
return [];
}
for(var i=0,l=Expr.order.length;i<l;i++){
var type=Expr.order[i],_1df;
if((_1df=Expr.leftMatch[type].exec(expr))){
var left=_1df[1];
_1df.splice(1,1);
if(left.substr(left.length-1)!=="\\"){
_1df[1]=(_1df[1]||"").replace(/\\/g,"");
set=Expr.find[type](_1df,_1dc,_1dd);
if(set!=null){
expr=expr.replace(Expr.match[type],"");
break;
}
}
}
}
if(!set){
set=_1dc.getElementsByTagName("*");
}
return {set:set,expr:expr};
};
_1be.filter=function(expr,set,_1e6,not){
var old=expr,_1e9=[],_1ea=set,_1eb,_1ec,_1ed=set&&set[0]&&_1cb(set[0]);
while(expr&&set.length){
for(var type in Expr.filter){
if((_1eb=Expr.leftMatch[type].exec(expr))!=null&&_1eb[2]){
var _1ef=Expr.filter[type],_1f0,item,left=_1eb[1];
_1ec=false;
_1eb.splice(1,1);
if(left.substr(left.length-1)==="\\"){
continue;
}
if(_1ea===_1e9){
_1e9=[];
}
if(Expr.preFilter[type]){
_1eb=Expr.preFilter[type](_1eb,_1ea,_1e6,_1e9,not,_1ed);
if(!_1eb){
_1ec=_1f0=true;
}else{
if(_1eb===true){
continue;
}
}
}
if(_1eb){
for(var i=0;(item=_1ea[i])!=null;i++){
if(item){
_1f0=_1ef(item,_1eb,i,_1ea);
var pass=not^!!_1f0;
if(_1e6&&_1f0!=null){
if(pass){
_1ec=true;
}else{
_1ea[i]=false;
}
}else{
if(pass){
_1e9.push(item);
_1ec=true;
}
}
}
}
}
if(_1f0!==_2){
if(!_1e6){
_1ea=_1e9;
}
expr=expr.replace(Expr.match[type],"");
if(!_1ec){
return [];
}
break;
}
}
}
if(expr===old){
if(_1ec==null){
_1be.error(expr);
}else{
break;
}
}
old=expr;
}
return _1ea;
};
_1be.error=function(msg){
throw "Syntax error, unrecognized expression: "+msg;
};
var Expr=_1be.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(elem){
return elem.getAttribute("href");
}},relative:{"+":function(_1f7,part){
var _1f9=typeof part==="string",_1fa=_1f9&&!/\W/.test(part),_1fb=_1f9&&!_1fa;
if(_1fa){
part=part.toLowerCase();
}
for(var i=0,l=_1f7.length,elem;i<l;i++){
if((elem=_1f7[i])){
while((elem=elem.previousSibling)&&elem.nodeType!==1){
}
_1f7[i]=_1fb||elem&&elem.nodeName.toLowerCase()===part?elem||false:elem===part;
}
}
if(_1fb){
_1be.filter(part,_1f7,true);
}
},">":function(_1ff,part){
var _201=typeof part==="string";
if(_201&&!/\W/.test(part)){
part=part.toLowerCase();
for(var i=0,l=_1ff.length;i<l;i++){
var elem=_1ff[i];
if(elem){
var _205=elem.parentNode;
_1ff[i]=_205.nodeName.toLowerCase()===part?_205:false;
}
}
}else{
for(var i=0,l=_1ff.length;i<l;i++){
var elem=_1ff[i];
if(elem){
_1ff[i]=_201?elem.parentNode:elem.parentNode===part;
}
}
if(_201){
_1be.filter(part,_1ff,true);
}
}
},"":function(_206,part,_208){
var _209=done++,_20a=dirCheck;
if(typeof part==="string"&&!/\W/.test(part)){
var _20b=part=part.toLowerCase();
_20a=dirNodeCheck;
}
_20a("parentNode",part,_209,_206,_20b,_208);
},"~":function(_20c,part,_20e){
var _20f=done++,_210=dirCheck;
if(typeof part==="string"&&!/\W/.test(part)){
var _211=part=part.toLowerCase();
_210=dirNodeCheck;
}
_210("previousSibling",part,_20f,_20c,_211,_20e);
}},find:{ID:function(_212,_213,_214){
if(typeof _213.getElementById!=="undefined"&&!_214){
var m=_213.getElementById(_212[1]);
return m?[m]:[];
}
},NAME:function(_216,_217){
if(typeof _217.getElementsByName!=="undefined"){
var ret=[],_219=_217.getElementsByName(_216[1]);
for(var i=0,l=_219.length;i<l;i++){
if(_219[i].getAttribute("name")===_216[1]){
ret.push(_219[i]);
}
}
return ret.length===0?null:ret;
}
},TAG:function(_21c,_21d){
return _21d.getElementsByTagName(_21c[1]);
}},preFilter:{CLASS:function(_21e,_21f,_220,_221,not,_223){
_21e=" "+_21e[1].replace(/\\/g,"")+" ";
if(_223){
return _21e;
}
for(var i=0,elem;(elem=_21f[i])!=null;i++){
if(elem){
if(not^(elem.className&&(" "+elem.className+" ").replace(/[\t\n]/g," ").indexOf(_21e)>=0)){
if(!_220){
_221.push(elem);
}
}else{
if(_220){
_21f[i]=false;
}
}
}
}
return false;
},ID:function(_226){
return _226[1].replace(/\\/g,"");
},TAG:function(_227,_228){
return _227[1].toLowerCase();
},CHILD:function(_229){
if(_229[1]==="nth"){
var test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(_229[2]==="even"&&"2n"||_229[2]==="odd"&&"2n+1"||!/\D/.test(_229[2])&&"0n+"+_229[2]||_229[2]);
_229[2]=(test[1]+(test[2]||1))-0;
_229[3]=test[3]-0;
}
_229[0]=done++;
return _229;
},ATTR:function(_22b,_22c,_22d,_22e,not,_230){
var name=_22b[1].replace(/\\/g,"");
if(!_230&&Expr.attrMap[name]){
_22b[1]=Expr.attrMap[name];
}
if(_22b[2]==="~="){
_22b[4]=" "+_22b[4]+" ";
}
return _22b;
},PSEUDO:function(_232,_233,_234,_235,not){
if(_232[1]==="not"){
if((_1ba.exec(_232[3])||"").length>1||/^\w/.test(_232[3])){
_232[3]=_1be(_232[3],null,null,_233);
}else{
var ret=_1be.filter(_232[3],_233,_234,true^not);
if(!_234){
_235.push.apply(_235,ret);
}
return false;
}
}else{
if(Expr.match.POS.test(_232[0])||Expr.match.CHILD.test(_232[0])){
return true;
}
}
return _232;
},POS:function(_238){
_238.unshift(true);
return _238;
}},filters:{enabled:function(elem){
return elem.disabled===false&&elem.type!=="hidden";
},disabled:function(elem){
return elem.disabled===true;
},checked:function(elem){
return elem.checked===true;
},selected:function(elem){
elem.parentNode.selectedIndex;
return elem.selected===true;
},parent:function(elem){
return !!elem.firstChild;
},empty:function(elem){
return !elem.firstChild;
},has:function(elem,i,_241){
return !!_1be(_241[3],elem).length;
},header:function(elem){
return /h\d/i.test(elem.nodeName);
},text:function(elem){
return "text"===elem.type;
},radio:function(elem){
return "radio"===elem.type;
},checkbox:function(elem){
return "checkbox"===elem.type;
},file:function(elem){
return "file"===elem.type;
},password:function(elem){
return "password"===elem.type;
},submit:function(elem){
return "submit"===elem.type;
},image:function(elem){
return "image"===elem.type;
},reset:function(elem){
return "reset"===elem.type;
},button:function(elem){
return "button"===elem.type||elem.nodeName.toLowerCase()==="button";
},input:function(elem){
return /input|select|textarea|button/i.test(elem.nodeName);
}},setFilters:{first:function(elem,i){
return i===0;
},last:function(elem,i,_251,_252){
return i===_252.length-1;
},even:function(elem,i){
return i%2===0;
},odd:function(elem,i){
return i%2===1;
},lt:function(elem,i,_259){
return i<_259[3]-0;
},gt:function(elem,i,_25c){
return i>_25c[3]-0;
},nth:function(elem,i,_25f){
return _25f[3]-0===i;
},eq:function(elem,i,_262){
return _262[3]-0===i;
}},filter:{PSEUDO:function(elem,_264,i,_266){
var name=_264[1],_268=Expr.filters[name];
if(_268){
return _268(elem,i,_264,_266);
}else{
if(name==="contains"){
return (elem.textContent||elem.innerText||getText([elem])||"").indexOf(_264[3])>=0;
}else{
if(name==="not"){
var not=_264[3];
for(var i=0,l=not.length;i<l;i++){
if(not[i]===elem){
return false;
}
}
return true;
}else{
_1be.error("Syntax error, unrecognized expression: "+name);
}
}
}
},CHILD:function(elem,_26c){
var type=_26c[1],node=elem;
switch(type){
case "only":
case "first":
while((node=node.previousSibling)){
if(node.nodeType===1){
return false;
}
}
if(type==="first"){
return true;
}
node=elem;
case "last":
while((node=node.nextSibling)){
if(node.nodeType===1){
return false;
}
}
return true;
case "nth":
var _26f=_26c[2],last=_26c[3];
if(_26f===1&&last===0){
return true;
}
var _271=_26c[0],_272=elem.parentNode;
if(_272&&(_272.sizcache!==_271||!elem.nodeIndex)){
var _273=0;
for(node=_272.firstChild;node;node=node.nextSibling){
if(node.nodeType===1){
node.nodeIndex=++_273;
}
}
_272.sizcache=_271;
}
var diff=elem.nodeIndex-last;
if(_26f===0){
return diff===0;
}else{
return (diff%_26f===0&&diff/_26f>=0);
}
}
},ID:function(elem,_276){
return elem.nodeType===1&&elem.getAttribute("id")===_276;
},TAG:function(elem,_278){
return (_278==="*"&&elem.nodeType===1)||elem.nodeName.toLowerCase()===_278;
},CLASS:function(elem,_27a){
return (" "+(elem.className||elem.getAttribute("class"))+" ").indexOf(_27a)>-1;
},ATTR:function(elem,_27c){
var name=_27c[1],_27e=Expr.attrHandle[name]?Expr.attrHandle[name](elem):elem[name]!=null?elem[name]:elem.getAttribute(name),_27f=_27e+"",type=_27c[2],_281=_27c[4];
return _27e==null?type==="!=":type==="="?_27f===_281:type==="*="?_27f.indexOf(_281)>=0:type==="~="?(" "+_27f+" ").indexOf(_281)>=0:!_281?_27f&&_27e!==false:type==="!="?_27f!==_281:type==="^="?_27f.indexOf(_281)===0:type==="$="?_27f.substr(_27f.length-_281.length)===_281:type==="|="?_27f===_281||_27f.substr(0,_281.length+1)===_281+"-":false;
},POS:function(elem,_283,i,_285){
var name=_283[2],_287=Expr.setFilters[name];
if(_287){
return _287(elem,i,_283,_285);
}
}}};
var _1cd=Expr.match.POS;
for(var type in Expr.match){
Expr.match[type]=new RegExp(Expr.match[type].source+/(?![^\[]*\])(?![^\(]*\))/.source);
Expr.leftMatch[type]=new RegExp(/(^(?:.|\r|\n)*?)/.source+Expr.match[type].source.replace(/\\(\d+)/g,function(all,num){
return "\\"+(num-0+1);
}));
}
var _1d1=function(_28b,_28c){
_28b=Array.prototype.slice.call(_28b,0);
if(_28c){
_28c.push.apply(_28c,_28b);
return _28c;
}
return _28b;
};
try{
Array.prototype.slice.call(_8.documentElement.childNodes,0)[0].nodeType;
}
catch(e){
_1d1=function(_28d,_28e){
var ret=_28e||[];
if(_14.call(_28d)==="[object Array]"){
Array.prototype.push.apply(ret,_28d);
}else{
if(typeof _28d.length==="number"){
for(var i=0,l=_28d.length;i<l;i++){
ret.push(_28d[i]);
}
}else{
for(var i=0;_28d[i];i++){
ret.push(_28d[i]);
}
}
}
return ret;
};
}
var _1d7;
if(_8.documentElement.compareDocumentPosition){
_1d7=function(a,b){
if(!a.compareDocumentPosition||!b.compareDocumentPosition){
if(a==b){
_1bc=true;
}
return a.compareDocumentPosition?-1:1;
}
var ret=a.compareDocumentPosition(b)&4?-1:a===b?0:1;
if(ret===0){
_1bc=true;
}
return ret;
};
}else{
if("sourceIndex" in _8.documentElement){
_1d7=function(a,b){
if(!a.sourceIndex||!b.sourceIndex){
if(a==b){
_1bc=true;
}
return a.sourceIndex?-1:1;
}
var ret=a.sourceIndex-b.sourceIndex;
if(ret===0){
_1bc=true;
}
return ret;
};
}else{
if(_8.createRange){
_1d7=function(a,b){
if(!a.ownerDocument||!b.ownerDocument){
if(a==b){
_1bc=true;
}
return a.ownerDocument?-1:1;
}
var _29a=a.ownerDocument.createRange(),_29b=b.ownerDocument.createRange();
_29a.setStart(a,0);
_29a.setEnd(a,0);
_29b.setStart(b,0);
_29b.setEnd(b,0);
var ret=_29a.compareBoundaryPoints(Range.START_TO_END,_29b);
if(ret===0){
_1bc=true;
}
return ret;
};
}
}
}
function getText(_29d){
var ret="",elem;
for(var i=0;_29d[i];i++){
elem=_29d[i];
if(elem.nodeType===3||elem.nodeType===4){
ret+=elem.nodeValue;
}else{
if(elem.nodeType!==8){
ret+=getText(elem.childNodes);
}
}
}
return ret;
};
(function(){
var form=_8.createElement("div"),id="script"+(new Date).getTime();
form.innerHTML="<a name='"+id+"'/>";
var root=_8.documentElement;
root.insertBefore(form,root.firstChild);
if(_8.getElementById(id)){
Expr.find.ID=function(_2a4,_2a5,_2a6){
if(typeof _2a5.getElementById!=="undefined"&&!_2a6){
var m=_2a5.getElementById(_2a4[1]);
return m?m.id===_2a4[1]||typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id").nodeValue===_2a4[1]?[m]:_2:[];
}
};
Expr.filter.ID=function(elem,_2a9){
var node=typeof elem.getAttributeNode!=="undefined"&&elem.getAttributeNode("id");
return elem.nodeType===1&&node&&node.nodeValue===_2a9;
};
}
root.removeChild(form);
root=form=null;
})();
(function(){
var div=_8.createElement("div");
div.appendChild(_8.createComment(""));
if(div.getElementsByTagName("*").length>0){
Expr.find.TAG=function(_2ac,_2ad){
var _2ae=_2ad.getElementsByTagName(_2ac[1]);
if(_2ac[1]==="*"){
var tmp=[];
for(var i=0;_2ae[i];i++){
if(_2ae[i].nodeType===1){
tmp.push(_2ae[i]);
}
}
_2ae=tmp;
}
return _2ae;
};
}
div.innerHTML="<a href='#'></a>";
if(div.firstChild&&typeof div.firstChild.getAttribute!=="undefined"&&div.firstChild.getAttribute("href")!=="#"){
Expr.attrHandle.href=function(elem){
return elem.getAttribute("href",2);
};
}
div=null;
})();
if(_8.querySelectorAll){
(function(){
var _2b2=_1be,div=_8.createElement("div");
div.innerHTML="<p class='TEST'></p>";
if(div.querySelectorAll&&div.querySelectorAll(".TEST").length===0){
return;
}
_1be=function(_2b4,_2b5,_2b6,seed){
_2b5=_2b5||_8;
if(!seed&&_2b5.nodeType===9&&!_1cb(_2b5)){
try{
return _1d1(_2b5.querySelectorAll(_2b4),_2b6);
}
catch(e){
}
}
return _2b2(_2b4,_2b5,_2b6,seed);
};
for(var prop in _2b2){
_1be[prop]=_2b2[prop];
}
div=null;
})();
}
(function(){
var div=_8.createElement("div");
div.innerHTML="<div class='test e'></div><div class='test'></div>";
if(!div.getElementsByClassName||div.getElementsByClassName("e").length===0){
return;
}
div.lastChild.className="e";
if(div.getElementsByClassName("e").length===1){
return;
}
Expr.order.splice(1,0,"CLASS");
Expr.find.CLASS=function(_2ba,_2bb,_2bc){
if(typeof _2bb.getElementsByClassName!=="undefined"&&!_2bc){
return _2bb.getElementsByClassName(_2ba[1]);
}
};
div=null;
})();
function dirNodeCheck(dir,cur,_2bf,_2c0,_2c1,_2c2){
for(var i=0,l=_2c0.length;i<l;i++){
var elem=_2c0[i];
if(elem){
elem=elem[dir];
var _2c6=false;
while(elem){
if(elem.sizcache===_2bf){
_2c6=_2c0[elem.sizset];
break;
}
if(elem.nodeType===1&&!_2c2){
elem.sizcache=_2bf;
elem.sizset=i;
}
if(elem.nodeName.toLowerCase()===cur){
_2c6=elem;
break;
}
elem=elem[dir];
}
_2c0[i]=_2c6;
}
}
};
function dirCheck(dir,cur,_2c9,_2ca,_2cb,_2cc){
for(var i=0,l=_2ca.length;i<l;i++){
var elem=_2ca[i];
if(elem){
elem=elem[dir];
var _2d0=false;
while(elem){
if(elem.sizcache===_2c9){
_2d0=_2ca[elem.sizset];
break;
}
if(elem.nodeType===1){
if(!_2cc){
elem.sizcache=_2c9;
elem.sizset=i;
}
if(typeof cur!=="string"){
if(elem===cur){
_2d0=true;
break;
}
}else{
if(_1be.filter(cur,[elem]).length>0){
_2d0=elem;
break;
}
}
}
elem=elem[dir];
}
_2ca[i]=_2d0;
}
}
};
var _1d5=_8.compareDocumentPosition?function(a,b){
return !!(a.compareDocumentPosition(b)&16);
}:function(a,b){
return a!==b&&(a.contains?a.contains(b):true);
};
var _1cb=function(elem){
var _2d6=(elem?elem.ownerDocument||elem:0).documentElement;
return _2d6?_2d6.nodeName!=="HTML":false;
};
var _1cf=function(_2d7,_2d8){
var _2d9=[],_2da="",_2db,root=_2d8.nodeType?[_2d8]:_2d8;
while((_2db=Expr.match.PSEUDO.exec(_2d7))){
_2da+=_2db[0];
_2d7=_2d7.replace(Expr.match.PSEUDO,"");
}
_2d7=Expr.relative[_2d7]?_2d7+"*":_2d7;
for(var i=0,l=root.length;i<l;i++){
_1be(_2d7,root[i],_2d9);
}
return _1be.filter(_2da,_2d9);
};
_3.find=_1be;
_3.expr=_1be.selectors;
_3.expr[":"]=_3.expr.filters;
_3.unique=_1be.uniqueSort;
_3.text=getText;
_3.isXMLDoc=_1cb;
_3.contains=_1d5;
return;
_1.Sizzle=_1be;
})();
var _2df=/Until$/,_2e0=/^(?:parents|prevUntil|prevAll)/,_2e1=/,/,_17=Array.prototype.slice;
var _2e2=function(_2e3,_2e4,keep){
if(_3.isFunction(_2e4)){
return _3.grep(_2e3,function(elem,i){
return !!_2e4.call(elem,i,elem)===keep;
});
}else{
if(_2e4.nodeType){
return _3.grep(_2e3,function(elem,i){
return (elem===_2e4)===keep;
});
}else{
if(typeof _2e4==="string"){
var _2ea=_3.grep(_2e3,function(elem){
return elem.nodeType===1;
});
if(_b.test(_2e4)){
return _3.filter(_2e4,_2ea,!keep);
}else{
_2e4=_3.filter(_2e4,_2ea);
}
}
}
}
return _3.grep(_2e3,function(elem,i){
return (_3.inArray(elem,_2e4)>=0)===keep;
});
};
_3.fn.extend({find:function(_2ee){
var ret=this.pushStack("","find",_2ee),_2f0=0;
for(var i=0,l=this.length;i<l;i++){
_2f0=ret.length;
_3.find(_2ee,this[i],ret);
if(i>0){
for(var n=_2f0;n<ret.length;n++){
for(var r=0;r<_2f0;r++){
if(ret[r]===ret[n]){
ret.splice(n--,1);
break;
}
}
}
}
}
return ret;
},has:function(_2f5){
var _2f6=_3(_2f5);
return this.filter(function(){
for(var i=0,l=_2f6.length;i<l;i++){
if(_3.contains(this,_2f6[i])){
return true;
}
}
});
},not:function(_2f9){
return this.pushStack(_2e2(this,_2f9,false),"not",_2f9);
},filter:function(_2fa){
return this.pushStack(_2e2(this,_2fa,true),"filter",_2fa);
},is:function(_2fb){
return !!_2fb&&_3.filter(_2fb,this).length>0;
},closest:function(_2fc,_2fd){
if(_3.isArray(_2fc)){
var ret=[],cur=this[0],_300,_301={},_302;
if(cur&&_2fc.length){
for(var i=0,l=_2fc.length;i<l;i++){
_302=_2fc[i];
if(!_301[_302]){
_301[_302]=_3.expr.match.POS.test(_302)?_3(_302,_2fd||this.context):_302;
}
}
while(cur&&cur.ownerDocument&&cur!==_2fd){
for(_302 in _301){
_300=_301[_302];
if(_300.jquery?_300.index(cur)>-1:_3(cur).is(_300)){
ret.push({selector:_302,elem:cur});
delete _301[_302];
}
}
cur=cur.parentNode;
}
}
return ret;
}
var pos=_3.expr.match.POS.test(_2fc)?_3(_2fc,_2fd||this.context):null;
return this.map(function(i,cur){
while(cur&&cur.ownerDocument&&cur!==_2fd){
if(pos?pos.index(cur)>-1:_3(cur).is(_2fc)){
return cur;
}
cur=cur.parentNode;
}
return null;
});
},index:function(elem){
if(!elem||typeof elem==="string"){
return _3.inArray(this[0],elem?_3(elem):this.parent().children());
}
return _3.inArray(elem.jquery?elem[0]:elem,this);
},add:function(_309,_30a){
var set=typeof _309==="string"?_3(_309,_30a||this.context):_3.makeArray(_309),all=_3.merge(this.get(),set);
return this.pushStack(isDisconnected(set[0])||isDisconnected(all[0])?all:_3.unique(all));
},andSelf:function(){
return this.add(this.prevObject);
}});
function isDisconnected(node){
return !node||!node.parentNode||node.parentNode.nodeType===11;
};
_3.each({parent:function(elem){
var _30f=elem.parentNode;
return _30f&&_30f.nodeType!==11?_30f:null;
},parents:function(elem){
return _3.dir(elem,"parentNode");
},parentsUntil:function(elem,i,_313){
return _3.dir(elem,"parentNode",_313);
},next:function(elem){
return _3.nth(elem,2,"nextSibling");
},prev:function(elem){
return _3.nth(elem,2,"previousSibling");
},nextAll:function(elem){
return _3.dir(elem,"nextSibling");
},prevAll:function(elem){
return _3.dir(elem,"previousSibling");
},nextUntil:function(elem,i,_31a){
return _3.dir(elem,"nextSibling",_31a);
},prevUntil:function(elem,i,_31d){
return _3.dir(elem,"previousSibling",_31d);
},siblings:function(elem){
return _3.sibling(elem.parentNode.firstChild,elem);
},children:function(elem){
return _3.sibling(elem.firstChild);
},contents:function(elem){
return _3.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:_3.makeArray(elem.childNodes);
}},function(name,fn){
_3.fn[name]=function(_323,_324){
var ret=_3.map(this,fn,_323);
if(!_2df.test(name)){
_324=_323;
}
if(_324&&typeof _324==="string"){
ret=_3.filter(_324,ret);
}
ret=this.length>1?_3.unique(ret):ret;
if((this.length>1||_2e1.test(_324))&&_2e0.test(name)){
ret=ret.reverse();
}
return this.pushStack(ret,name,_17.call(arguments).join(","));
};
});
_3.extend({filter:function(expr,_327,not){
if(not){
expr=":not("+expr+")";
}
return _3.find.matches(expr,_327);
},dir:function(elem,dir,_32b){
var _32c=[],cur=elem[dir];
while(cur&&cur.nodeType!==9&&(_32b===_2||cur.nodeType!==1||!_3(cur).is(_32b))){
if(cur.nodeType===1){
_32c.push(cur);
}
cur=cur[dir];
}
return _32c;
},nth:function(cur,_32f,dir,elem){
_32f=_32f||1;
var num=0;
for(;cur;cur=cur[dir]){
if(cur.nodeType===1&&++num===_32f){
break;
}
}
return cur;
},sibling:function(n,elem){
var r=[];
for(;n;n=n.nextSibling){
if(n.nodeType===1&&n!==elem){
r.push(n);
}
}
return r;
}});
var _336=/ jQuery\d+="(?:\d+|null)"/g,_337=/^\s+/,_338=/(<([\w:]+)[^>]*?)\/>/g,_339=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,_33a=/<([\w:]+)/,_33b=/<tbody/i,_33c=/<|&#?\w+;/,_33d=/<script|<object|<embed|<option|<style/i,_33e=/checked\s*(?:[^=]|=\s*.checked.)/i,_33f=function(all,_341,tag){
return _339.test(tag)?all:_341+"></"+tag+">";
},_343={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};
_343.optgroup=_343.option;
_343.tbody=_343.tfoot=_343.colgroup=_343.caption=_343.thead;
_343.th=_343.td;
if(!_3.support.htmlSerialize){
_343._default=[1,"div<div>","</div>"];
}
_3.fn.extend({text:function(text){
if(_3.isFunction(text)){
return this.each(function(i){
var self=_3(this);
self.text(text.call(this,i,self.text()));
});
}
if(typeof text!=="object"&&text!==_2){
return this.empty().append((this[0]&&this[0].ownerDocument||_8).createTextNode(text));
}
return _3.text(this);
},wrapAll:function(html){
if(_3.isFunction(html)){
return this.each(function(i){
_3(this).wrapAll(html.call(this,i));
});
}
if(this[0]){
var wrap=_3(html,this[0].ownerDocument).eq(0).clone(true);
if(this[0].parentNode){
wrap.insertBefore(this[0]);
}
wrap.map(function(){
var elem=this;
while(elem.firstChild&&elem.firstChild.nodeType===1){
elem=elem.firstChild;
}
return elem;
}).append(this);
}
return this;
},wrapInner:function(html){
if(_3.isFunction(html)){
return this.each(function(i){
_3(this).wrapInner(html.call(this,i));
});
}
return this.each(function(){
var self=_3(this),_34e=self.contents();
if(_34e.length){
_34e.wrapAll(html);
}else{
self.append(html);
}
});
},wrap:function(html){
return this.each(function(){
_3(this).wrapAll(html);
});
},unwrap:function(){
return this.parent().each(function(){
if(!_3.nodeName(this,"body")){
_3(this).replaceWith(this.childNodes);
}
}).end();
},append:function(){
return this.domManip(arguments,true,function(elem){
if(this.nodeType===1){
this.appendChild(elem);
}
});
},prepend:function(){
return this.domManip(arguments,true,function(elem){
if(this.nodeType===1){
this.insertBefore(elem,this.firstChild);
}
});
},before:function(){
if(this[0]&&this[0].parentNode){
return this.domManip(arguments,false,function(elem){
this.parentNode.insertBefore(elem,this);
});
}else{
if(arguments.length){
var set=_3(arguments[0]);
set.push.apply(set,this.toArray());
return this.pushStack(set,"before",arguments);
}
}
},after:function(){
if(this[0]&&this[0].parentNode){
return this.domManip(arguments,false,function(elem){
this.parentNode.insertBefore(elem,this.nextSibling);
});
}else{
if(arguments.length){
var set=this.pushStack(this,"after",arguments);
set.push.apply(set,_3(arguments[0]).toArray());
return set;
}
}
},remove:function(_356,_357){
for(var i=0,elem;(elem=this[i])!=null;i++){
if(!_356||_3.filter(_356,[elem]).length){
if(!_357&&elem.nodeType===1){
_3.cleanData(elem.getElementsByTagName("*"));
_3.cleanData([elem]);
}
if(elem.parentNode){
elem.parentNode.removeChild(elem);
}
}
}
return this;
},empty:function(){
for(var i=0,elem;(elem=this[i])!=null;i++){
if(elem.nodeType===1){
_3.cleanData(elem.getElementsByTagName("*"));
}
while(elem.firstChild){
elem.removeChild(elem.firstChild);
}
}
return this;
},clone:function(_35c){
var ret=this.map(function(){
if(!_3.support.noCloneEvent&&!_3.isXMLDoc(this)){
var html=this.outerHTML,_35f=this.ownerDocument;
if(!html){
var div=_35f.createElement("div");
div.appendChild(this.cloneNode(true));
html=div.innerHTML;
}
return _3.clean([html.replace(_336,"").replace(/=([^="'>\s]+\/)>/g,"=\"$1\">").replace(_337,"")],_35f)[0];
}else{
return this.cloneNode(true);
}
});
if(_35c===true){
cloneCopyEvent(this,ret);
cloneCopyEvent(this.find("*"),ret.find("*"));
}
return ret;
},html:function(_361){
if(_361===_2){
return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(_336,""):null;
}else{
if(typeof _361==="string"&&!_33d.test(_361)&&(_3.support.leadingWhitespace||!_337.test(_361))&&!_343[(_33a.exec(_361)||["",""])[1].toLowerCase()]){
_361=_361.replace(_338,_33f);
try{
for(var i=0,l=this.length;i<l;i++){
if(this[i].nodeType===1){
_3.cleanData(this[i].getElementsByTagName("*"));
this[i].innerHTML=_361;
}
}
}
catch(e){
this.empty().append(_361);
}
}else{
if(_3.isFunction(_361)){
this.each(function(i){
var self=_3(this),old=self.html();
self.empty().append(function(){
return _361.call(this,i,old);
});
});
}else{
this.empty().append(_361);
}
}
}
return this;
},replaceWith:function(_367){
if(this[0]&&this[0].parentNode){
if(_3.isFunction(_367)){
return this.each(function(i){
var self=_3(this),old=self.html();
self.replaceWith(_367.call(this,i,old));
});
}
if(typeof _367!=="string"){
_367=_3(_367).detach();
}
return this.each(function(){
var next=this.nextSibling,_36c=this.parentNode;
_3(this).remove();
if(next){
_3(next).before(_367);
}else{
_3(_36c).append(_367);
}
});
}else{
return this.pushStack(_3(_3.isFunction(_367)?_367():_367),"replaceWith",_367);
}
},detach:function(_36d){
return this.remove(_36d,true);
},domManip:function(args,_36f,_370){
var _371,_372,_373=args[0],_374=[],_375,_376;
if(!_3.support.checkClone&&arguments.length===3&&typeof _373==="string"&&_33e.test(_373)){
return this.each(function(){
_3(this).domManip(args,_36f,_370,true);
});
}
if(_3.isFunction(_373)){
return this.each(function(i){
var self=_3(this);
args[0]=_373.call(this,i,_36f?self.html():_2);
self.domManip(args,_36f,_370);
});
}
if(this[0]){
_376=_373&&_373.parentNode;
if(_3.support.parentNode&&_376&&_376.nodeType===11&&_376.childNodes.length===this.length){
_371={fragment:_376};
}else{
_371=buildFragment(args,this,_374);
}
_375=_371.fragment;
if(_375.childNodes.length===1){
_372=_375=_375.firstChild;
}else{
_372=_375.firstChild;
}
if(_372){
_36f=_36f&&_3.nodeName(_372,"tr");
for(var i=0,l=this.length;i<l;i++){
_370.call(_36f?root(this[i],_372):this[i],i>0||_371.cacheable||this.length>1?_375.cloneNode(true):_375);
}
}
if(_374.length){
_3.each(_374,evalScript);
}
}
return this;
function root(elem,cur){
return _3.nodeName(elem,"table")?(elem.getElementsByTagName("tbody")[0]||elem.appendChild(elem.ownerDocument.createElement("tbody"))):elem;
};
}});
function cloneCopyEvent(orig,ret){
var i=0;
ret.each(function(){
if(this.nodeName!==(orig[i]&&orig[i].nodeName)){
return;
}
var _380=_3.data(orig[i++]),_381=_3.data(this,_380),_382=_380&&_380.events;
if(_382){
delete _381.handle;
_381.events={};
for(var type in _382){
for(var _384 in _382[type]){
_3.event.add(this,type,_382[type][_384],_382[type][_384].data);
}
}
}
});
};
function buildFragment(args,_386,_387){
var _388,_389,_38a,doc=(_386&&_386[0]?_386[0].ownerDocument||_386[0]:_8);
if(args.length===1&&typeof args[0]==="string"&&args[0].length<512&&doc===_8&&!_33d.test(args[0])&&(_3.support.checkClone||!_33e.test(args[0]))){
_389=true;
_38a=_3.fragments[args[0]];
if(_38a){
if(_38a!==1){
_388=_38a;
}
}
}
if(!_388){
_388=doc.createDocumentFragment();
_3.clean(args,doc,_388,_387);
}
if(_389){
_3.fragments[args[0]]=_38a?_388:1;
}
return {fragment:_388,cacheable:_389};
};
_3.fragments={};
_3.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,_38d){
_3.fn[name]=function(_38e){
var ret=[],_390=_3(_38e),_391=this.length===1&&this[0].parentNode;
if(_391&&_391.nodeType===11&&_391.childNodes.length===1&&_390.length===1){
_390[_38d](this[0]);
return this;
}else{
for(var i=0,l=_390.length;i<l;i++){
var _394=(i>0?this.clone(true):this).get();
_3.fn[_38d].apply(_3(_390[i]),_394);
ret=ret.concat(_394);
}
return this.pushStack(ret,name,_390.selector);
}
};
});
_3.extend({clean:function(_395,_396,_397,_398){
_396=_396||_8;
if(typeof _396.createElement==="undefined"){
_396=_396.ownerDocument||_396[0]&&_396[0].ownerDocument||_8;
}
var ret=[];
for(var i=0,elem;(elem=_395[i])!=null;i++){
if(typeof elem==="number"){
elem+="";
}
if(!elem){
continue;
}
if(typeof elem==="string"&&!_33c.test(elem)){
elem=_396.createTextNode(elem);
}else{
if(typeof elem==="string"){
elem=elem.replace(_338,_33f);
var tag=(_33a.exec(elem)||["",""])[1].toLowerCase(),wrap=_343[tag]||_343._default,_39e=wrap[0],div=_396.createElement("div");
div.innerHTML=wrap[1]+elem+wrap[2];
while(_39e--){
div=div.lastChild;
}
if(!_3.support.tbody){
var _3a0=_33b.test(elem),_3a1=tag==="table"&&!_3a0?div.firstChild&&div.firstChild.childNodes:wrap[1]==="<table>"&&!_3a0?div.childNodes:[];
for(var j=_3a1.length-1;j>=0;--j){
if(_3.nodeName(_3a1[j],"tbody")&&!_3a1[j].childNodes.length){
_3a1[j].parentNode.removeChild(_3a1[j]);
}
}
}
if(!_3.support.leadingWhitespace&&_337.test(elem)){
div.insertBefore(_396.createTextNode(_337.exec(elem)[0]),div.firstChild);
}
elem=div.childNodes;
}
}
if(elem.nodeType){
ret.push(elem);
}else{
ret=_3.merge(ret,elem);
}
}
if(_397){
for(var i=0;ret[i];i++){
if(_398&&_3.nodeName(ret[i],"script")&&(!ret[i].type||ret[i].type.toLowerCase()==="text/javascript")){
_398.push(ret[i].parentNode?ret[i].parentNode.removeChild(ret[i]):ret[i]);
}else{
if(ret[i].nodeType===1){
ret.splice.apply(ret,[i+1,0].concat(_3.makeArray(ret[i].getElementsByTagName("script"))));
}
_397.appendChild(ret[i]);
}
}
}
return ret;
},cleanData:function(_3a3){
var data,id,_3a6=_3.cache,_3a7=_3.event.special,_3a8=_3.support.deleteExpando;
for(var i=0,elem;(elem=_3a3[i])!=null;i++){
id=elem[_3.expando];
if(id){
data=_3a6[id];
if(data.events){
for(var type in data.events){
if(_3a7[type]){
_3.event.remove(elem,type);
}else{
_117(elem,type,data.handle);
}
}
}
if(_3a8){
delete elem[_3.expando];
}else{
if(elem.removeAttribute){
elem.removeAttribute(_3.expando);
}
}
delete _3a6[id];
}
}
}});
var _3ac=/z-?index|font-?weight|opacity|zoom|line-?height/i,_3ad=/alpha\([^)]*\)/,_3ae=/opacity=([^)]*)/,_3af=/float/i,_3b0=/-([a-z])/ig,_3b1=/([A-Z])/g,_3b2=/^-?\d+(?:px)?$/i,rnum=/^-?\d/,_3b4={position:"absolute",visibility:"hidden",display:"block"},_3b5=["Left","Right"],_3b6=["Top","Bottom"],_3b7=_8.defaultView&&_8.defaultView.getComputedStyle,_3b8=_3.support.cssFloat?"cssFloat":"styleFloat",_3b9=function(all,_3bb){
return _3bb.toUpperCase();
};
_3.fn.css=function(name,_3bd){
return access(this,name,_3bd,true,function(elem,name,_3c0){
if(_3c0===_2){
return _3.curCSS(elem,name);
}
if(typeof _3c0==="number"&&!_3ac.test(name)){
_3c0+="px";
}
_3.style(elem,name,_3c0);
});
};
_3.extend({style:function(elem,name,_3c3){
if(!elem||elem.nodeType===3||elem.nodeType===8){
return _2;
}
if((name==="width"||name==="height")&&parseFloat(_3c3)<0){
_3c3=_2;
}
var _3c4=elem.style||elem,set=_3c3!==_2;
if(!_3.support.opacity&&name==="opacity"){
if(set){
_3c4.zoom=1;
var _3c6=parseInt(_3c3,10)+""==="NaN"?"":"alpha(opacity="+_3c3*100+")";
var _3c7=_3c4.filter||_3.curCSS(elem,"filter")||"";
_3c4.filter=_3ad.test(_3c7)?_3c7.replace(_3ad,_3c6):_3c6;
}
return _3c4.filter&&_3c4.filter.indexOf("opacity=")>=0?(parseFloat(_3ae.exec(_3c4.filter)[1])/100)+"":"";
}
if(_3af.test(name)){
name=_3b8;
}
name=name.replace(_3b0,_3b9);
if(set){
_3c4[name]=_3c3;
}
return _3c4[name];
},css:function(elem,name,_3ca,_3cb){
if(name==="width"||name==="height"){
var val,_3cd=_3b4,_3ce=name==="width"?_3b5:_3b6;
function getWH(){
val=name==="width"?elem.offsetWidth:elem.offsetHeight;
if(_3cb==="border"){
return;
}
_3.each(_3ce,function(){
if(!_3cb){
val-=parseFloat(_3.curCSS(elem,"padding"+this,true))||0;
}
if(_3cb==="margin"){
val+=parseFloat(_3.curCSS(elem,"margin"+this,true))||0;
}else{
val-=parseFloat(_3.curCSS(elem,"border"+this+"Width",true))||0;
}
});
};
if(elem.offsetWidth!==0){
getWH();
}else{
_3.swap(elem,_3cd,getWH);
}
return Math.max(0,Math.round(val));
}
return _3.curCSS(elem,name,_3ca);
},curCSS:function(elem,name,_3d1){
var ret,_3d3=elem.style,_3d4;
if(!_3.support.opacity&&name==="opacity"&&elem.currentStyle){
ret=_3ae.test(elem.currentStyle.filter||"")?(parseFloat(RegExp.$1)/100)+"":"";
return ret===""?"1":ret;
}
if(_3af.test(name)){
name=_3b8;
}
if(!_3d1&&_3d3&&_3d3[name]){
ret=_3d3[name];
}else{
if(_3b7){
if(_3af.test(name)){
name="float";
}
name=name.replace(_3b1,"-$1").toLowerCase();
var _3d5=elem.ownerDocument.defaultView;
if(!_3d5){
return null;
}
var _3d6=_3d5.getComputedStyle(elem,null);
if(_3d6){
ret=_3d6.getPropertyValue(name);
}
if(name==="opacity"&&ret===""){
ret="1";
}
}else{
if(elem.currentStyle){
var _3d7=name.replace(_3b0,_3b9);
ret=elem.currentStyle[name]||elem.currentStyle[_3d7];
if(!_3b2.test(ret)&&rnum.test(ret)){
var left=_3d3.left,_3d9=elem.runtimeStyle.left;
elem.runtimeStyle.left=elem.currentStyle.left;
_3d3.left=_3d7==="fontSize"?"1em":(ret||0);
ret=_3d3.pixelLeft+"px";
_3d3.left=left;
elem.runtimeStyle.left=_3d9;
}
}
}
}
return ret;
},swap:function(elem,_3db,_3dc){
var old={};
for(var name in _3db){
old[name]=elem.style[name];
elem.style[name]=_3db[name];
}
_3dc.call(elem);
for(var name in _3db){
elem.style[name]=old[name];
}
}});
if(_3.expr&&_3.expr.filters){
_3.expr.filters.hidden=function(elem){
var _3e0=elem.offsetWidth,_3e1=elem.offsetHeight,skip=elem.nodeName.toLowerCase()==="tr";
return _3e0===0&&_3e1===0&&!skip?true:_3e0>0&&_3e1>0&&!skip?false:_3.curCSS(elem,"display")==="none";
};
_3.expr.filters.visible=function(elem){
return !_3.expr.filters.hidden(elem);
};
}
var jsc=now(),_3e5=/<script(.|\s)*?\/script>/gi,_3e6=/select|textarea/i,_3e7=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,jsre=/=\?(&|$)/,_3e9=/\?/,rts=/(\?|&)_=.*?(&|$)/,rurl=/^(\w+:)?\/\/([^\/?#]+)/,r20=/%20/g,_3ed=_3.fn.load;
_3.fn.extend({load:function(url,_3ef,_3f0){
if(typeof url!=="string"){
return _3ed.call(this,url);
}else{
if(!this.length){
return this;
}
}
var off=url.indexOf(" ");
if(off>=0){
var _3f2=url.slice(off,url.length);
url=url.slice(0,off);
}
var type="GET";
if(_3ef){
if(_3.isFunction(_3ef)){
_3f0=_3ef;
_3ef=null;
}else{
if(typeof _3ef==="object"){
_3ef=_3.param(_3ef,_3.ajaxSettings.traditional);
type="POST";
}
}
}
var self=this;
_3.ajax({url:url,type:type,dataType:"html",data:_3ef,complete:function(res,_3f6){
if(_3f6==="success"||_3f6==="notmodified"){
self.html(_3f2?_3("<div />").append(res.responseText.replace(_3e5,"")).find(_3f2):res.responseText);
}
if(_3f0){
self.each(_3f0,[res.responseText,_3f6,res]);
}
}});
return this;
},serialize:function(){
return _3.param(this.serializeArray());
},serializeArray:function(){
return this.map(function(){
return this.elements?_3.makeArray(this.elements):this;
}).filter(function(){
return this.name&&!this.disabled&&(this.checked||_3e6.test(this.nodeName)||_3e7.test(this.type));
}).map(function(i,elem){
var val=_3(this).val();
return val==null?null:_3.isArray(val)?_3.map(val,function(val,i){
return {name:elem.name,value:val};
}):{name:elem.name,value:val};
}).get();
}});
_3.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(i,o){
_3.fn[o]=function(f){
return this.bind(o,f);
};
});
_3.extend({get:function(url,data,_401,type){
if(_3.isFunction(data)){
type=type||_401;
_401=data;
data=null;
}
return _3.ajax({type:"GET",url:url,data:data,success:_401,dataType:type});
},getScript:function(url,_404){
return _3.get(url,null,_404,"script");
},getJSON:function(url,data,_407){
return _3.get(url,data,_407,"json");
},post:function(url,data,_40a,type){
if(_3.isFunction(data)){
type=type||_40a;
_40a=data;
data={};
}
return _3.ajax({type:"POST",url:url,data:data,success:_40a,dataType:type});
},ajaxSetup:function(_40c){
_3.extend(_3.ajaxSettings,_40c);
},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:_1.XMLHttpRequest&&(_1.location.protocol!=="file:"||!_1.ActiveXObject)?function(){
return new _1.XMLHttpRequest();
}:function(){
try{
return new _1.ActiveXObject("Microsoft.XMLHTTP");
}
catch(e){
}
},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(_40d){
var s=_3.extend(true,{},_3.ajaxSettings,_40d);
var _40f,_410,data,_412=_40d&&_40d.context||s,type=s.type.toUpperCase();
if(s.data&&s.processData&&typeof s.data!=="string"){
s.data=_3.param(s.data,s.traditional);
}
if(s.dataType==="jsonp"){
if(type==="GET"){
if(!jsre.test(s.url)){
s.url+=(_3e9.test(s.url)?"&":"?")+(s.jsonp||"callback")+"=?";
}
}else{
if(!s.data||!jsre.test(s.data)){
s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?";
}
}
s.dataType="json";
}
if(s.dataType==="json"&&(s.data&&jsre.test(s.data)||jsre.test(s.url))){
_40f=s.jsonpCallback||("jsonp"+jsc++);
if(s.data){
s.data=(s.data+"").replace(jsre,"="+_40f+"$1");
}
s.url=s.url.replace(jsre,"="+_40f+"$1");
s.dataType="script";
_1[_40f]=_1[_40f]||function(tmp){
data=tmp;
success();
complete();
_1[_40f]=_2;
try{
delete _1[_40f];
}
catch(e){
}
if(head){
head.removeChild(_416);
}
};
}
if(s.dataType==="script"&&s.cache===null){
s.cache=false;
}
if(s.cache===false&&type==="GET"){
var ts=now();
var ret=s.url.replace(rts,"$1_="+ts+"$2");
s.url=ret+((ret===s.url)?(_3e9.test(s.url)?"&":"?")+"_="+ts:"");
}
if(s.data&&type==="GET"){
s.url+=(_3e9.test(s.url)?"&":"?")+s.data;
}
if(s.global&&!_3.active++){
_3.event.trigger("ajaxStart");
}
var _419=rurl.exec(s.url),_41a=_419&&(_419[1]&&_419[1]!==location.protocol||_419[2]!==location.host);
if(s.dataType==="script"&&type==="GET"&&_41a){
var head=_8.getElementsByTagName("head")[0]||_8.documentElement;
var _416=_8.createElement("script");
_416.src=s.url;
if(s.scriptCharset){
_416.charset=s.scriptCharset;
}
if(!_40f){
var done=false;
_416.onload=_416.onreadystatechange=function(){
if(!done&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){
done=true;
success();
complete();
_416.onload=_416.onreadystatechange=null;
if(head&&_416.parentNode){
head.removeChild(_416);
}
}
};
}
head.insertBefore(_416,head.firstChild);
return _2;
}
var _41c=false;
var xhr=s.xhr();
if(!xhr){
return;
}
if(s.username){
xhr.open(type,s.url,s.async,s.username,s.password);
}else{
xhr.open(type,s.url,s.async);
}
try{
if(s.data||_40d&&_40d.contentType){
xhr.setRequestHeader("Content-Type",s.contentType);
}
if(s.ifModified){
if(_3.lastModified[s.url]){
xhr.setRequestHeader("If-Modified-Since",_3.lastModified[s.url]);
}
if(_3.etag[s.url]){
xhr.setRequestHeader("If-None-Match",_3.etag[s.url]);
}
}
if(!_41a){
xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");
}
xhr.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default);
}
catch(e){
}
if(s.beforeSend&&s.beforeSend.call(_412,xhr,s)===false){
if(s.global&&!--_3.active){
_3.event.trigger("ajaxStop");
}
xhr.abort();
return false;
}
if(s.global){
trigger("ajaxSend",[xhr,s]);
}
var _41e=xhr.onreadystatechange=function(_41f){
if(!xhr||xhr.readyState===0||_41f==="abort"){
if(!_41c){
complete();
}
_41c=true;
if(xhr){
xhr.onreadystatechange=_3.noop;
}
}else{
if(!_41c&&xhr&&(xhr.readyState===4||_41f==="timeout")){
_41c=true;
xhr.onreadystatechange=_3.noop;
_410=_41f==="timeout"?"timeout":!_3.httpSuccess(xhr)?"error":s.ifModified&&_3.httpNotModified(xhr,s.url)?"notmodified":"success";
var _420;
if(_410==="success"){
try{
data=_3.httpData(xhr,s.dataType,s);
}
catch(err){
_410="parsererror";
_420=err;
}
}
if(_410==="success"||_410==="notmodified"){
if(!_40f){
success();
}
}else{
_3.handleError(s,xhr,_410,_420);
}
complete();
if(_41f==="timeout"){
xhr.abort();
}
if(s.async){
xhr=null;
}
}
}
};
try{
var _421=xhr.abort;
xhr.abort=function(){
if(xhr){
_421.call(xhr);
}
_41e("abort");
};
}
catch(e){
}
if(s.async&&s.timeout>0){
setTimeout(function(){
if(xhr&&!_41c){
_41e("timeout");
}
},s.timeout);
}
try{
xhr.send(type==="POST"||type==="PUT"||type==="DELETE"?s.data:null);
}
catch(e){
_3.handleError(s,xhr,null,e);
complete();
}
if(!s.async){
_41e();
}
function success(){
if(s.success){
s.success.call(_412,data,_410,xhr);
}
if(s.global){
trigger("ajaxSuccess",[xhr,s]);
}
};
function complete(){
if(s.complete){
s.complete.call(_412,xhr,_410);
}
if(s.global){
trigger("ajaxComplete",[xhr,s]);
}
if(s.global&&!--_3.active){
_3.event.trigger("ajaxStop");
}
};
function trigger(type,args){
(s.context?_3(s.context):_3.event).trigger(type,args);
};
return xhr;
},handleError:function(s,xhr,_426,e){
if(s.error){
s.error.call(s.context||s,xhr,_426,e);
}
if(s.global){
(s.context?_3(s.context):_3.event).trigger("ajaxError",[xhr,s,e]);
}
},active:0,httpSuccess:function(xhr){
try{
return !xhr.status&&location.protocol==="file:"||(xhr.status>=200&&xhr.status<300)||xhr.status===304||xhr.status===1223||xhr.status===0;
}
catch(e){
}
return false;
},httpNotModified:function(xhr,url){
var _42b=xhr.getResponseHeader("Last-Modified"),etag=xhr.getResponseHeader("Etag");
if(_42b){
_3.lastModified[url]=_42b;
}
if(etag){
_3.etag[url]=etag;
}
return xhr.status===304||xhr.status===0;
},httpData:function(xhr,type,s){
var ct=xhr.getResponseHeader("content-type")||"",xml=type==="xml"||!type&&ct.indexOf("xml")>=0,data=xml?xhr.responseXML:xhr.responseText;
if(xml&&data.documentElement.nodeName==="parsererror"){
_3.error("parsererror");
}
if(s&&s.dataFilter){
data=s.dataFilter(data,type);
}
if(typeof data==="string"){
if(type==="json"||!type&&ct.indexOf("json")>=0){
data=_3.parseJSON(data);
}else{
if(type==="script"||!type&&ct.indexOf("javascript")>=0){
_3.globalEval(data);
}
}
}
return data;
},param:function(a,_434){
var s=[];
if(_434===_2){
_434=_3.ajaxSettings.traditional;
}
if(_3.isArray(a)||a.jquery){
_3.each(a,function(){
add(this.name,this.value);
});
}else{
for(var _436 in a){
buildParams(_436,a[_436]);
}
}
return s.join("&").replace(r20,"+");
function buildParams(_437,obj){
if(_3.isArray(obj)){
_3.each(obj,function(i,v){
if(_434||/\[\]$/.test(_437)){
add(_437,v);
}else{
buildParams(_437+"["+(typeof v==="object"||_3.isArray(v)?i:"")+"]",v);
}
});
}else{
if(!_434&&obj!=null&&typeof obj==="object"){
_3.each(obj,function(k,v){
buildParams(_437+"["+k+"]",v);
});
}else{
add(_437,obj);
}
}
};
function add(key,_43e){
_43e=_3.isFunction(_43e)?_43e():_43e;
s[s.length]=encodeURIComponent(key)+"="+encodeURIComponent(_43e);
};
}});
var _43f={},_440=/toggle|show|hide/,_441=/^([+-]=)?([\d+-.]+)(.*)$/,_442,_443=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];
_3.fn.extend({show:function(_444,_445){
if(_444||_444===0){
return this.animate(genFx("show",3),_444,_445);
}else{
for(var i=0,l=this.length;i<l;i++){
var old=_3.data(this[i],"olddisplay");
this[i].style.display=old||"";
if(_3.css(this[i],"display")==="none"){
var _449=this[i].nodeName,_44a;
if(_43f[_449]){
_44a=_43f[_449];
}else{
var elem=_3("<"+_449+" />").appendTo("body");
_44a=elem.css("display");
if(_44a==="none"){
_44a="block";
}
elem.remove();
_43f[_449]=_44a;
}
_3.data(this[i],"olddisplay",_44a);
}
}
for(var j=0,k=this.length;j<k;j++){
this[j].style.display=_3.data(this[j],"olddisplay")||"";
}
return this;
}
},hide:function(_44e,_44f){
if(_44e||_44e===0){
return this.animate(genFx("hide",3),_44e,_44f);
}else{
for(var i=0,l=this.length;i<l;i++){
var old=_3.data(this[i],"olddisplay");
if(!old&&old!=="none"){
_3.data(this[i],"olddisplay",_3.css(this[i],"display"));
}
}
for(var j=0,k=this.length;j<k;j++){
this[j].style.display="none";
}
return this;
}
},_toggle:_3.fn.toggle,toggle:function(fn,fn2){
var bool=typeof fn==="boolean";
if(_3.isFunction(fn)&&_3.isFunction(fn2)){
this._toggle.apply(this,arguments);
}else{
if(fn==null||bool){
this.each(function(){
var _458=bool?fn:_3(this).is(":hidden");
_3(this)[_458?"show":"hide"]();
});
}else{
this.animate(genFx("toggle",3),fn,fn2);
}
}
return this;
},fadeTo:function(_459,to,_45b){
return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:to},_459,_45b);
},animate:function(prop,_45d,_45e,_45f){
var _460=_3.speed(_45d,_45e,_45f);
if(_3.isEmptyObject(prop)){
return this.each(_460.complete);
}
return this[_460.queue===false?"each":"queue"](function(){
var opt=_3.extend({},_460),p,_463=this.nodeType===1&&_3(this).is(":hidden"),self=this;
for(p in prop){
var name=p.replace(_3b0,_3b9);
if(p!==name){
prop[name]=prop[p];
delete prop[p];
p=name;
}
if(prop[p]==="hide"&&_463||prop[p]==="show"&&!_463){
return opt.complete.call(this);
}
if((p==="height"||p==="width")&&this.style){
opt.display=_3.css(this,"display");
opt.overflow=this.style.overflow;
}
if(_3.isArray(prop[p])){
(opt.specialEasing=opt.specialEasing||{})[p]=prop[p][1];
prop[p]=prop[p][0];
}
}
if(opt.overflow!=null){
this.style.overflow="hidden";
}
opt.curAnim=_3.extend({},prop);
_3.each(prop,function(name,val){
var e=new _3.fx(self,opt,name);
if(_440.test(val)){
e[val==="toggle"?_463?"show":"hide":val](prop);
}else{
var _469=_441.exec(val),_46a=e.cur(true)||0;
if(_469){
var end=parseFloat(_469[2]),unit=_469[3]||"px";
if(unit!=="px"){
self.style[name]=(end||1)+unit;
_46a=((end||1)/e.cur(true))*_46a;
self.style[name]=_46a+unit;
}
if(_469[1]){
end=((_469[1]==="-="?-1:1)*end)+_46a;
}
e.custom(_46a,end,unit);
}else{
e.custom(_46a,val,"");
}
}
});
return true;
});
},stop:function(_46d,_46e){
var _46f=_3.timers;
if(_46d){
this.queue([]);
}
this.each(function(){
for(var i=_46f.length-1;i>=0;i--){
if(_46f[i].elem===this){
if(_46e){
_46f[i](true);
}
_46f.splice(i,1);
}
}
});
if(!_46e){
this.dequeue();
}
return this;
}});
_3.each({slideDown:genFx("show",1),slideUp:genFx("hide",1),slideToggle:genFx("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(name,_472){
_3.fn[name]=function(_473,_474){
return this.animate(_472,_473,_474);
};
});
_3.extend({speed:function(_475,_476,fn){
var opt=_475&&typeof _475==="object"?_475:{complete:fn||!fn&&_476||_3.isFunction(_475)&&_475,duration:_475,easing:fn&&_476||_476&&!_3.isFunction(_476)&&_476};
opt.duration=_3.fx.off?0:typeof opt.duration==="number"?opt.duration:_3.fx.speeds[opt.duration]||_3.fx.speeds._default;
opt.old=opt.complete;
opt.complete=function(){
if(opt.queue!==false){
_3(this).dequeue();
}
if(_3.isFunction(opt.old)){
opt.old.call(this);
}
};
return opt;
},easing:{linear:function(p,n,_47b,diff){
return _47b+diff*p;
},swing:function(p,n,_47f,diff){
return ((-Math.cos(p*Math.PI)/2)+0.5)*diff+_47f;
}},timers:[],fx:function(elem,_482,prop){
this.options=_482;
this.elem=elem;
this.prop=prop;
if(!_482.orig){
_482.orig={};
}
}});
_3.fx.prototype={update:function(){
if(this.options.step){
this.options.step.call(this.elem,this.now,this);
}
(_3.fx.step[this.prop]||_3.fx.step._default)(this);
if((this.prop==="height"||this.prop==="width")&&this.elem.style){
this.elem.style.display="block";
}
},cur:function(_484){
if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){
return this.elem[this.prop];
}
var r=parseFloat(_3.css(this.elem,this.prop,_484));
return r&&r>-10000?r:parseFloat(_3.curCSS(this.elem,this.prop))||0;
},custom:function(from,to,unit){
this.startTime=now();
this.start=from;
this.end=to;
this.unit=unit||this.unit||"px";
this.now=this.start;
this.pos=this.state=0;
var self=this;
function t(_48a){
return self.step(_48a);
};
t.elem=this.elem;
if(t()&&_3.timers.push(t)&&!_442){
_442=setInterval(_3.fx.tick,13);
}
},show:function(){
this.options.orig[this.prop]=_3.style(this.elem,this.prop);
this.options.show=true;
this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());
_3(this.elem).show();
},hide:function(){
this.options.orig[this.prop]=_3.style(this.elem,this.prop);
this.options.hide=true;
this.custom(this.cur(),0);
},step:function(_48b){
var t=now(),done=true;
if(_48b||t>=this.options.duration+this.startTime){
this.now=this.end;
this.pos=this.state=1;
this.update();
this.options.curAnim[this.prop]=true;
for(var i in this.options.curAnim){
if(this.options.curAnim[i]!==true){
done=false;
}
}
if(done){
if(this.options.display!=null){
this.elem.style.overflow=this.options.overflow;
var old=_3.data(this.elem,"olddisplay");
this.elem.style.display=old?old:this.options.display;
if(_3.css(this.elem,"display")==="none"){
this.elem.style.display="block";
}
}
if(this.options.hide){
_3(this.elem).hide();
}
if(this.options.hide||this.options.show){
for(var p in this.options.curAnim){
_3.style(this.elem,p,this.options.orig[p]);
}
}
this.options.complete.call(this.elem);
}
return false;
}else{
var n=t-this.startTime;
this.state=n/this.options.duration;
var _492=this.options.specialEasing&&this.options.specialEasing[this.prop];
var _493=this.options.easing||(_3.easing.swing?"swing":"linear");
this.pos=_3.easing[_492||_493](this.state,n,0,1,this.options.duration);
this.now=this.start+((this.end-this.start)*this.pos);
this.update();
}
return true;
}};
_3.extend(_3.fx,{tick:function(){
var _494=_3.timers;
for(var i=0;i<_494.length;i++){
if(!_494[i]()){
_494.splice(i--,1);
}
}
if(!_494.length){
_3.fx.stop();
}
},stop:function(){
clearInterval(_442);
_442=null;
},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(fx){
_3.style(fx.elem,"opacity",fx.now);
},_default:function(fx){
if(fx.elem.style&&fx.elem.style[fx.prop]!=null){
fx.elem.style[fx.prop]=(fx.prop==="width"||fx.prop==="height"?Math.max(0,fx.now):fx.now)+fx.unit;
}else{
fx.elem[fx.prop]=fx.now;
}
}}});
if(_3.expr&&_3.expr.filters){
_3.expr.filters.animated=function(elem){
return _3.grep(_3.timers,function(fn){
return elem===fn.elem;
}).length;
};
}
function genFx(type,num){
var obj={};
_3.each(_443.concat.apply([],_443.slice(0,num)),function(){
obj[this]=type;
});
return obj;
};
if("getBoundingClientRect" in _8.documentElement){
_3.fn.offset=function(_49d){
var elem=this[0];
if(_49d){
return this.each(function(i){
_3.offset.setOffset(this,_49d,i);
});
}
if(!elem||!elem.ownerDocument){
return null;
}
if(elem===elem.ownerDocument.body){
return _3.offset.bodyOffset(elem);
}
var box=elem.getBoundingClientRect(),doc=elem.ownerDocument,body=doc.body,_4a3=doc.documentElement,_4a4=_4a3.clientTop||body.clientTop||0,_4a5=_4a3.clientLeft||body.clientLeft||0,top=box.top+(self.pageYOffset||_3.support.boxModel&&_4a3.scrollTop||body.scrollTop)-_4a4,left=box.left+(self.pageXOffset||_3.support.boxModel&&_4a3.scrollLeft||body.scrollLeft)-_4a5;
return {top:top,left:left};
};
}else{
_3.fn.offset=function(_4a8){
var elem=this[0];
if(_4a8){
return this.each(function(i){
_3.offset.setOffset(this,_4a8,i);
});
}
if(!elem||!elem.ownerDocument){
return null;
}
if(elem===elem.ownerDocument.body){
return _3.offset.bodyOffset(elem);
}
_3.offset.initialize();
var _4ab=elem.offsetParent,_4ac=elem,doc=elem.ownerDocument,_4ae,_4af=doc.documentElement,body=doc.body,_4b1=doc.defaultView,_4b2=_4b1?_4b1.getComputedStyle(elem,null):elem.currentStyle,top=elem.offsetTop,left=elem.offsetLeft;
while((elem=elem.parentNode)&&elem!==body&&elem!==_4af){
if(_3.offset.supportsFixedPosition&&_4b2.position==="fixed"){
break;
}
_4ae=_4b1?_4b1.getComputedStyle(elem,null):elem.currentStyle;
top-=elem.scrollTop;
left-=elem.scrollLeft;
if(elem===_4ab){
top+=elem.offsetTop;
left+=elem.offsetLeft;
if(_3.offset.doesNotAddBorder&&!(_3.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(elem.nodeName))){
top+=parseFloat(_4ae.borderTopWidth)||0;
left+=parseFloat(_4ae.borderLeftWidth)||0;
}
_4ac=_4ab,_4ab=elem.offsetParent;
}
if(_3.offset.subtractsBorderForOverflowNotVisible&&_4ae.overflow!=="visible"){
top+=parseFloat(_4ae.borderTopWidth)||0;
left+=parseFloat(_4ae.borderLeftWidth)||0;
}
_4b2=_4ae;
}
if(_4b2.position==="relative"||_4b2.position==="static"){
top+=body.offsetTop;
left+=body.offsetLeft;
}
if(_3.offset.supportsFixedPosition&&_4b2.position==="fixed"){
top+=Math.max(_4af.scrollTop,body.scrollTop);
left+=Math.max(_4af.scrollLeft,body.scrollLeft);
}
return {top:top,left:left};
};
}
_3.offset={initialize:function(){
var body=_8.body,_4b6=_8.createElement("div"),_4b7,_4b8,_4b9,td,_4bb=parseFloat(_3.curCSS(body,"marginTop",true))||0,html="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";
_3.extend(_4b6.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});
_4b6.innerHTML=html;
body.insertBefore(_4b6,body.firstChild);
_4b7=_4b6.firstChild;
_4b8=_4b7.firstChild;
td=_4b7.nextSibling.firstChild.firstChild;
this.doesNotAddBorder=(_4b8.offsetTop!==5);
this.doesAddBorderForTableAndCells=(td.offsetTop===5);
_4b8.style.position="fixed",_4b8.style.top="20px";
this.supportsFixedPosition=(_4b8.offsetTop===20||_4b8.offsetTop===15);
_4b8.style.position=_4b8.style.top="";
_4b7.style.overflow="hidden",_4b7.style.position="relative";
this.subtractsBorderForOverflowNotVisible=(_4b8.offsetTop===-5);
this.doesNotIncludeMarginInBodyOffset=(body.offsetTop!==_4bb);
body.removeChild(_4b6);
body=_4b6=_4b7=_4b8=_4b9=td=null;
_3.offset.initialize=_3.noop;
},bodyOffset:function(body){
var top=body.offsetTop,left=body.offsetLeft;
_3.offset.initialize();
if(_3.offset.doesNotIncludeMarginInBodyOffset){
top+=parseFloat(_3.curCSS(body,"marginTop",true))||0;
left+=parseFloat(_3.curCSS(body,"marginLeft",true))||0;
}
return {top:top,left:left};
},setOffset:function(elem,_4c1,i){
if(/static/.test(_3.curCSS(elem,"position"))){
elem.style.position="relative";
}
var _4c3=_3(elem),_4c4=_4c3.offset(),_4c5=parseInt(_3.curCSS(elem,"top",true),10)||0,_4c6=parseInt(_3.curCSS(elem,"left",true),10)||0;
if(_3.isFunction(_4c1)){
_4c1=_4c1.call(elem,i,_4c4);
}
var _4c7={top:(_4c1.top-_4c4.top)+_4c5,left:(_4c1.left-_4c4.left)+_4c6};
if("using" in _4c1){
_4c1.using.call(elem,_4c7);
}else{
_4c3.css(_4c7);
}
}};
_3.fn.extend({position:function(){
if(!this[0]){
return null;
}
var elem=this[0],_4c9=this.offsetParent(),_4ca=this.offset(),_4cb=/^body|html$/i.test(_4c9[0].nodeName)?{top:0,left:0}:_4c9.offset();
_4ca.top-=parseFloat(_3.curCSS(elem,"marginTop",true))||0;
_4ca.left-=parseFloat(_3.curCSS(elem,"marginLeft",true))||0;
_4cb.top+=parseFloat(_3.curCSS(_4c9[0],"borderTopWidth",true))||0;
_4cb.left+=parseFloat(_3.curCSS(_4c9[0],"borderLeftWidth",true))||0;
return {top:_4ca.top-_4cb.top,left:_4ca.left-_4cb.left};
},offsetParent:function(){
return this.map(function(){
var _4cc=this.offsetParent||_8.body;
while(_4cc&&(!/^body|html$/i.test(_4cc.nodeName)&&_3.css(_4cc,"position")==="static")){
_4cc=_4cc.offsetParent;
}
return _4cc;
});
}});
_3.each(["Left","Top"],function(i,name){
var _4cf="scroll"+name;
_3.fn[_4cf]=function(val){
var elem=this[0],win;
if(!elem){
return null;
}
if(val!==_2){
return this.each(function(){
win=getWindow(this);
if(win){
win.scrollTo(!i?val:_3(win).scrollLeft(),i?val:_3(win).scrollTop());
}else{
this[_4cf]=val;
}
});
}else{
win=getWindow(elem);
return win?("pageXOffset" in win)?win[i?"pageYOffset":"pageXOffset"]:_3.support.boxModel&&win.document.documentElement[_4cf]||win.document.body[_4cf]:elem[_4cf];
}
};
});
function getWindow(elem){
return ("scrollTo" in elem&&elem.document)?elem:elem.nodeType===9?elem.defaultView||elem.parentWindow:false;
};
_3.each(["Height","Width"],function(i,name){
var type=name.toLowerCase();
_3.fn["inner"+name]=function(){
return this[0]?_3.css(this[0],type,false,"padding"):null;
};
_3.fn["outer"+name]=function(_4d7){
return this[0]?_3.css(this[0],type,false,_4d7?"margin":"border"):null;
};
_3.fn[type]=function(size){
var elem=this[0];
if(!elem){
return size==null?null:this;
}
if(_3.isFunction(size)){
return this.each(function(i){
var self=_3(this);
self[type](size.call(this,i,self[type]()));
});
}
return ("scrollTo" in elem&&elem.document)?elem.document.compatMode==="CSS1Compat"&&elem.document.documentElement["client"+name]||elem.document.body["client"+name]:(elem.nodeType===9)?Math.max(elem.documentElement["client"+name],elem.body["scroll"+name],elem.documentElement["scroll"+name],elem.body["offset"+name],elem.documentElement["offset"+name]):size===_2?_3.css(elem,type):this.css(type,typeof size==="string"?size:size+"px");
};
});
_1.jQuery=_1.$=_3;
})(window);
jq=$.noConflict();
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(_4dd,_4de){
for(var _4df in _4de){
_4dd[_4df]=_4de[_4df];
}
return _4dd;
};
Object.extend(Object,{inspect:function(_4e0){
try{
if(_4e0===undefined){
return "undefined";
}
if(_4e0===null){
return "null";
}
return _4e0.inspect?_4e0.inspect():_4e0.toString();
}
catch(e){
if(e instanceof RangeError){
return "...";
}
throw e;
}
},keys:function(_4e1){
var keys=[];
for(var _4e3 in _4e1){
keys.push(_4e3);
}
return keys;
},values:function(_4e4){
var _4e5=[];
for(var _4e6 in _4e4){
_4e5.push(_4e4[_4e6]);
}
return _4e5;
},clone:function(_4e7){
return Object.extend({},_4e7);
}});
Function.prototype.bind=function(){
var _4e8=this,args=$A(arguments),_4ea=args.shift();
return function(){
return _4e8.apply(_4ea,args.concat($A(arguments)));
};
};
Function.prototype.bindAsEventListener=function(_4eb){
var _4ec=this,args=$A(arguments),_4eb=args.shift();
return function(_4ee){
return _4ec.apply(_4eb,[(_4ee||window.event)].concat(args).concat($A(arguments)));
};
};
Object.extend(Number.prototype,{toColorPart:function(){
var _4ef=this.toString(16);
if(this<16){
return "0"+_4ef;
}
return _4ef;
},succ:function(){
return this+1;
},times:function(_4f0){
$R(0,this,true).each(_4f0);
return this;
}});
var Try={these:function(){
var _4f1;
for(var i=0,_4f3=arguments.length;i<_4f3;i++){
var _4f4=arguments[i];
try{
_4f1=_4f4();
break;
}
catch(e){
}
}
return _4f1;
}};
var PeriodicalExecuter=Class.create();
PeriodicalExecuter.prototype={initialize:function(_4f5,_4f6){
this.callback=_4f5;
this.frequency=_4f6;
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(_4f7){
return _4f7==null?"":String(_4f7);
};
Object.extend(String.prototype,{gsub:function(_4f8,_4f9){
var _4fa="",_4fb=this,_4fc;
_4f9=arguments.callee.prepareReplacement(_4f9);
while(_4fb.length>0){
if(_4fc=_4fb.match(_4f8)){
_4fa+=_4fb.slice(0,_4fc.index);
_4fa+=String.interpret(_4f9(_4fc));
_4fb=_4fb.slice(_4fc.index+_4fc[0].length);
}else{
_4fa+=_4fb,_4fb="";
}
}
return _4fa;
},sub:function(_4fd,_4fe,_4ff){
_4fe=this.gsub.prepareReplacement(_4fe);
_4ff=_4ff===undefined?1:_4ff;
return this.gsub(_4fd,function(_500){
if(--_4ff<0){
return _500[0];
}
return _4fe(_500);
});
},scan:function(_501,_502){
this.gsub(_501,_502);
return this;
},truncate:function(_503,_504){
_503=_503||30;
_504=_504===undefined?"...":_504;
return this.length>_503?this.slice(0,_503-_504.length)+_504: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 _505=new RegExp(Prototype.ScriptFragment,"img");
var _506=new RegExp(Prototype.ScriptFragment,"im");
return (this.match(_505)||[]).map(function(_507){
return (_507.match(_506)||["",""])[1];
});
},evalScripts:function(){
return this.extractScripts().map(function(_508){
return eval(_508);
});
},escapeHTML:function(){
var div=document.createElement("div");
var text=document.createTextNode(this);
div.appendChild(text);
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(memo,node){
return memo+node.nodeValue;
}):div.childNodes[0].nodeValue):"";
},toQueryParams:function(_50e){
var _50f=this.strip().match(/([^?#]*)(#.*)?$/);
if(!_50f){
return {};
}
return _50f[1].split(_50e||"&").inject({},function(hash,pair){
if((pair=pair.split("="))[0]){
var name=decodeURIComponent(pair[0]);
var _513=pair[1]?decodeURIComponent(pair[1]):undefined;
if(hash[name]!==undefined){
if(hash[name].constructor!=Array){
hash[name]=[hash[name]];
}
if(_513){
hash[name].push(_513);
}
}else{
hash[name]=_513;
}
}
return hash;
});
},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 _514=this.split("-"),len=_514.length;
if(len==1){
return _514[0];
}
var _516=this.charAt(0)=="-"?_514[0].charAt(0).toUpperCase()+_514[0].substring(1):_514[0];
for(var i=1;i<len;i++){
_516+=_514[i].charAt(0).toUpperCase()+_514[i].substring(1);
}
return _516;
},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(_518){
var _519=this.replace(/\\/g,"\\\\");
if(_518){
return "\""+_519.replace(/"/g,"\\\"")+"\"";
}else{
return "'"+_519.replace(/'/g,"\\'")+"'";
}
}});
String.prototype.gsub.prepareReplacement=function(_51a){
if(typeof _51a=="function"){
return _51a;
}
var _51b=new Template(_51a);
return function(_51c){
return _51b.evaluate(_51c);
};
};
String.prototype.parseQuery=String.prototype.toQueryParams;
var Template=Class.create();
Template.Pattern=/(^|.|\r|\n)(#\{(.*?)\})/;
Template.prototype={initialize:function(_51d,_51e){
this.template=_51d.toString();
this.pattern=_51e||Template.Pattern;
},evaluate:function(_51f){
return this.template.gsub(this.pattern,function(_520){
var _521=_520[1];
if(_521=="\\"){
return _520[2];
}
return _521+String.interpret(_51f[_520[3]]);
});
}};
var $break=new Object();
var $continue=new Object();
var Enumerable={each:function(_522){
var _523=0;
try{
this._each(function(_524){
try{
_522(_524,_523++);
}
catch(e){
if(e!=$continue){
throw e;
}
}
});
}
catch(e){
if(e!=$break){
throw e;
}
}
return this;
},eachSlice:function(_525,_526){
var _527=-_525,_528=[],_529=this.toArray();
while((_527+=_525)<_529.length){
_528.push(_529.slice(_527,_527+_525));
}
return _528.map(_526);
},all:function(_52a){
var _52b=true;
this.each(function(_52c,_52d){
_52b=_52b&&!!(_52a||Prototype.K)(_52c,_52d);
if(!_52b){
throw $break;
}
});
return _52b;
},any:function(_52e){
var _52f=false;
this.each(function(_530,_531){
if(_52f=!!(_52e||Prototype.K)(_530,_531)){
throw $break;
}
});
return _52f;
},collect:function(_532){
var _533=[];
this.each(function(_534,_535){
_533.push((_532||Prototype.K)(_534,_535));
});
return _533;
},detect:function(_536){
var _537;
this.each(function(_538,_539){
if(_536(_538,_539)){
_537=_538;
throw $break;
}
});
return _537;
},findAll:function(_53a){
var _53b=[];
this.each(function(_53c,_53d){
if(_53a(_53c,_53d)){
_53b.push(_53c);
}
});
return _53b;
},grep:function(_53e,_53f){
var _540=[];
this.each(function(_541,_542){
var _543=_541.toString();
if(_543.match(_53e)){
_540.push((_53f||Prototype.K)(_541,_542));
}
});
return _540;
},include:function(_544){
var _545=false;
this.each(function(_546){
if(_546==_544){
_545=true;
throw $break;
}
});
return _545;
},inGroupsOf:function(_547,_548){
_548=_548===undefined?null:_548;
return this.eachSlice(_547,function(_549){
while(_549.length<_547){
_549.push(_548);
}
return _549;
});
},inject:function(memo,_54b){
this.each(function(_54c,_54d){
memo=_54b(memo,_54c,_54d);
});
return memo;
},invoke:function(_54e){
var args=$A(arguments).slice(1);
return this.map(function(_550){
return _550[_54e].apply(_550,args);
});
},max:function(_551){
var _552;
this.each(function(_553,_554){
_553=(_551||Prototype.K)(_553,_554);
if(_552==undefined||_553>=_552){
_552=_553;
}
});
return _552;
},min:function(_555){
var _556;
this.each(function(_557,_558){
_557=(_555||Prototype.K)(_557,_558);
if(_556==undefined||_557<_556){
_556=_557;
}
});
return _556;
},partition:function(_559){
var _55a=[],_55b=[];
this.each(function(_55c,_55d){
((_559||Prototype.K)(_55c,_55d)?_55a:_55b).push(_55c);
});
return [_55a,_55b];
},pluck:function(_55e){
var _55f=[];
this.each(function(_560,_561){
_55f.push(_560[_55e]);
});
return _55f;
},reject:function(_562){
var _563=[];
this.each(function(_564,_565){
if(!_562(_564,_565)){
_563.push(_564);
}
});
return _563;
},sortBy:function(_566){
return this.map(function(_567,_568){
return {value:_567,criteria:_566(_567,_568)};
}).sort(function(left,_56a){
var a=left.criteria,b=_56a.criteria;
return a<b?-1:a>b?1:0;
}).pluck("value");
},toArray:function(){
return this.map();
},zip:function(){
var _56d=Prototype.K,args=$A(arguments);
if(typeof args.last()=="function"){
_56d=args.pop();
}
var _56f=[this].concat(args).map($A);
return this.map(function(_570,_571){
return _56d(_56f.pluck(_571));
});
},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(_572){
if(!_572){
return [];
}
if(_572.toArray){
return _572.toArray();
}else{
var _573=[];
for(var i=0,_575=_572.length;i<_575;i++){
_573.push(_572[i]);
}
return _573;
}
};
Object.extend(Array.prototype,Enumerable);
if(!Array.prototype._reverse){
Array.prototype._reverse=Array.prototype.reverse;
}
Object.extend(Array.prototype,{_each:function(_576){
for(var i=0,_578=this.length;i<_578;i++){
_576(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(_579){
return _579!=null;
});
},flatten:function(){
return this.inject([],function(_57a,_57b){
return _57a.concat(_57b&&_57b.constructor==Array?_57b.flatten():[_57b]);
});
},without:function(){
var _57c=$A(arguments);
return this.select(function(_57d){
return !_57c.include(_57d);
});
},indexOf:function(_57e){
for(var i=0,_580=this.length;i<_580;i++){
if(this[i]==_57e){
return i;
}
}
return -1;
},reverse:function(_581){
return (_581!==false?this:this.toArray())._reverse();
},reduce:function(){
return this.length>1?this:this[0];
},uniq:function(){
return this.inject([],function(_582,_583){
return _582.include(_583)?_582:_582.concat([_583]);
});
},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(_584){
_584=_584.strip();
return _584?_584.split(/\s+/):[];
};
if(window.opera){
Array.prototype.concat=function(){
var _585=[];
for(var i=0,_587=this.length;i<_587;i++){
_585.push(this[i]);
}
for(var i=0,_587=arguments.length;i<_587;i++){
if(arguments[i].constructor==Array){
for(var j=0,_589=arguments[i].length;j<_589;j++){
_585.push(arguments[i][j]);
}
}else{
_585.push(arguments[i]);
}
}
return _585;
};
}
Prototype.Hash=function(obj){
Object.extend(this,obj||{});
};
Object.extend(Prototype.Hash,{toQueryString:function(obj){
var _58c=[];
this.prototype._each.call(obj,function(pair){
if(!pair.key){
return;
}
if(pair.value&&pair.value.constructor==Array){
var _58e=pair.value.compact();
if(_58e.length<2){
pair.value=_58e.reduce();
}else{
key=encodeURIComponent(pair.key);
_58e.each(function(_58f){
_58f=_58f!=undefined?encodeURIComponent(_58f):"";
_58c.push(key+"="+encodeURIComponent(_58f));
});
return;
}
}
if(pair.value==undefined){
pair[1]="";
}
_58c.push(pair.map(encodeURIComponent).join("="));
});
return _58c.join("&");
}});
Object.extend(Prototype.Hash.prototype,Enumerable);
Object.extend(Prototype.Hash.prototype,{_each:function(_590){
for(var key in this){
var _592=this[key];
if(_592&&_592==Prototype.Hash.prototype[key]){
continue;
}
var pair=[key,_592];
pair.key=key;
pair.value=_592;
_590(pair);
}
},keys:function(){
return this.pluck("key");
},values:function(){
return this.pluck("value");
},merge:function(hash){
return $H(hash).inject(this,function(_595,pair){
_595[pair.key]=pair.value;
return _595;
});
},remove:function(){
var _597;
for(var i=0,_599=arguments.length;i<_599;i++){
var _59a=this[arguments[i]];
if(_59a!==undefined){
if(_597===undefined){
_597=_59a;
}else{
if(_597.constructor!=Array){
_597=[_597];
}
_597.push(_59a);
}
}
delete this[arguments[i]];
}
return _597;
},toQueryString:function(){
return Prototype.Hash.toQueryString(this);
},inspect:function(){
return "#<Prototype.Hash:{"+this.map(function(pair){
return pair.map(Object.inspect).join(": ");
}).join(", ")+"}>";
}});
function $H(_59c){
if(_59c&&_59c.constructor==Prototype.Hash){
return _59c;
}
return new Prototype.Hash(_59c);
};
ObjectRange=Class.create();
Object.extend(ObjectRange.prototype,Enumerable);
Object.extend(ObjectRange.prototype,{initialize:function(_59d,end,_59f){
this.start=_59d;
this.end=end;
this.exclusive=_59f;
},_each:function(_5a0){
var _5a1=this.start;
while(this.include(_5a1)){
_5a0(_5a1);
_5a1=_5a1.succ();
}
},include:function(_5a2){
if(_5a2<this.start){
return false;
}
if(this.exclusive){
return _5a2<this.end;
}
return _5a2<=this.end;
}});
var $R=function(_5a3,end,_5a5){
return new ObjectRange(_5a3,end,_5a5);
};
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(_5a6){
this.responders._each(_5a6);
},register:function(_5a7){
if(!this.include(_5a7)){
this.responders.push(_5a7);
}
},unregister:function(_5a8){
this.responders=this.responders.without(_5a8);
},dispatch:function(_5a9,_5aa,_5ab,json){
this.each(function(_5ad){
if(typeof _5ad[_5a9]=="function"){
try{
_5ad[_5a9].apply(_5ad,[_5aa,_5ab,json]);
}
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(_5ae){
this.options={method:"post",asynchronous:true,contentType:"application/x-www-form-urlencoded",encoding:"UTF-8",parameters:""};
Object.extend(this.options,_5ae||{});
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,_5b0){
this.transport=Ajax.getTransport();
this.setOptions(_5b0);
this.request(url);
},request:function(url){
this.url=url;
this.method=this.options.method;
var _5b2=this.options.parameters;
if(!["get","post"].include(this.method)){
_5b2["_method"]=this.method;
this.method="post";
}
_5b2=Prototype.Hash.toQueryString(_5b2);
if(_5b2&&/Konqueror|Safari|KHTML/.test(navigator.userAgent)){
_5b2+="&_=";
}
if(this.method=="get"&&_5b2){
this.url+=(this.url.indexOf("?")>-1?"&":"?")+_5b2;
}
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 body=this.method=="post"?(this.options.postBody||_5b2):null;
this.transport.send(body);
if(!this.options.asynchronous&&this.transport.overrideMimeType){
this.onStateChange();
}
}
catch(e){
this.dispatchException(e);
}
},onStateChange:function(){
var _5b4=this.transport.readyState;
if(_5b4>1&&!((_5b4==4)&&this._complete)){
this.respondToReadyState(this.transport.readyState);
}
},setRequestHeaders:function(){
var _5b5={"X-Requested-With":"XMLHttpRequest","X-Prototype-Version":Prototype.Version,"Accept":"text/javascript, text/html, application/xml, text/xml, */*"};
if(this.method=="post"){
_5b5["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){
_5b5["Connection"]="close";
}
}
if(typeof this.options.requestHeaders=="object"){
var _5b6=this.options.requestHeaders;
if(typeof _5b6.push=="function"){
for(var i=0,_5b8=_5b6.length;i<_5b8;i+=2){
_5b5[_5b6[i]]=_5b6[i+1];
}
}else{
$H(_5b6).each(function(pair){
_5b5[pair.key]=pair.value;
});
}
}
for(var name in _5b5){
this.transport.setRequestHeader(name,_5b5[name]);
}
},success:function(){
return !this.transport.status||(this.transport.status>=200&&this.transport.status<300);
},respondToReadyState:function(_5bb){
var _5bc=Ajax.Request.Events[_5bb];
var _5bd=this.transport,json=this.evalJSON();
if(_5bc=="Complete"){
try{
this._complete=true;
(this.options["on"+this.transport.status]||this.options["on"+(this.success()?"Success":"Failure")]||Prototype.emptyFunction)(_5bd,json);
}
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"+_5bc]||Prototype.emptyFunction)(_5bd,json);
Ajax.Responders.dispatch("on"+_5bc,this,_5bd,json);
}
catch(e){
this.dispatchException(e);
}
if(_5bc=="Complete"){
this.transport.onreadystatechange=Prototype.emptyFunction;
}
},getHeader:function(name){
try{
return this.transport.getResponseHeader(name);
}
catch(e){
return null;
}
},evalJSON:function(){
try{
var json=this.getHeader("X-JSON");
return json?eval("("+json+")"):null;
}
catch(e){
return null;
}
},evalResponse:function(){
try{
return eval(this.transport.responseText);
}
catch(e){
this.dispatchException(e);
}
},dispatchException:function(_5c1){
(this.options.onException||Prototype.emptyFunction)(this,_5c1);
Ajax.Responders.dispatch("onException",this,_5c1);
}});
Ajax.Updater=Class.create();
Object.extend(Object.extend(Ajax.Updater.prototype,Ajax.Request.prototype),{initialize:function(_5c2,url,_5c4){
this.container={success:(_5c2.success||_5c2),failure:(_5c2.failure||(_5c2.success?null:_5c2))};
this.transport=Ajax.getTransport();
this.setOptions(_5c4);
var _5c5=this.options.onComplete||Prototype.emptyFunction;
this.options.onComplete=(function(_5c6,_5c7){
this.updateContent();
_5c5(_5c6,_5c7);
}).bind(this);
this.request(url);
},updateContent:function(){
var _5c8=this.container[this.success()?"success":"failure"];
var _5c9=this.transport.responseText;
if(!this.options.evalScripts){
_5c9=_5c9.stripScripts();
}
if(_5c8=$(_5c8)){
if(this.options.insertion){
new this.options.insertion(_5c8,_5c9);
}else{
_5c8.update(_5c9);
}
}
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(_5ca,url,_5cc){
this.setOptions(_5cc);
this.onComplete=this.options.onComplete;
this.frequency=(this.options.frequency||2);
this.decay=(this.options.decay||1);
this.updater={};
this.container=_5ca;
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(_5cd){
if(this.options.decay){
this.decay=(_5cd.responseText==this.lastText?this.decay*this.options.decay:1);
this.lastText=_5cd.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 $(_5ce){
if(arguments.length>1){
for(var i=0,_5d0=[],_5d1=arguments.length;i<_5d1;i++){
_5d0.push($(arguments[i]));
}
return _5d0;
}
if(typeof _5ce=="string"){
_5ce=document.getElementById(_5ce);
}
return Element.extend(_5ce);
};
if(Prototype.BrowserFeatures.XPath){
document._getElementsByXPath=function(_5d2,_5d3){
var _5d4=[];
var _5d5=document.evaluate(_5d2,$(_5d3)||document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);
for(var i=0,_5d7=_5d5.snapshotLength;i<_5d7;i++){
_5d4.push(_5d5.snapshotItem(i));
}
return _5d4;
};
}
document.getElementsByClassName=function(_5d8,_5d9){
if(Prototype.BrowserFeatures.XPath){
var q=".//*[contains(concat(' ', @class, ' '), ' "+_5d8+" ')]";
return document._getElementsByXPath(q,_5d9);
}else{
var _5db=($(_5d9)||document.body).getElementsByTagName("*");
var _5dc=[],_5dd;
for(var i=0,_5df=_5db.length;i<_5df;i++){
_5dd=_5db[i];
if(Element.hasClassName(_5dd,_5d8)){
_5dc.push(Element.extend(_5dd));
}
}
return _5dc;
}
};
if(!window.Element){
var Element=new Object();
}
Element.extend=function(_5e0){
if(!_5e0||_nativeExtensions||_5e0.nodeType==3){
return _5e0;
}
if(!_5e0._extended&&_5e0.tagName&&_5e0!=window){
var _5e1=Object.clone(Element.Methods),_5e2=Element.extend.cache;
if(_5e0.tagName=="FORM"){
Object.extend(_5e1,Form.Methods);
}
if(["INPUT","TEXTAREA","SELECT"].include(_5e0.tagName)){
Object.extend(_5e1,Form.Element.Methods);
}
Object.extend(_5e1,Element.Methods.Simulated);
for(var _5e3 in _5e1){
var _5e4=_5e1[_5e3];
if(typeof _5e4=="function"&&!(_5e3 in _5e0)){
_5e0[_5e3]=_5e2.findOrStore(_5e4);
}
}
}
_5e0._extended=true;
return _5e0;
};
Element.extend.cache={findOrStore:function(_5e5){
return this[_5e5]=this[_5e5]||function(){
return _5e5.apply(null,[this].concat($A(arguments)));
};
}};
Element.Methods={visible:function(_5e6){
return $(_5e6).style.display!="none";
},toggle:function(_5e7){
_5e7=$(_5e7);
Element[Element.visible(_5e7)?"hide":"show"](_5e7);
return _5e7;
},hide:function(_5e8){
$(_5e8).style.display="none";
return _5e8;
},show:function(_5e9){
$(_5e9).style.display="";
return _5e9;
},remove:function(_5ea){
_5ea=$(_5ea);
_5ea.parentNode.removeChild(_5ea);
return _5ea;
},update:function(_5eb,html){
html=typeof html=="undefined"?"":html.toString();
$(_5eb).innerHTML=html.stripScripts();
setTimeout(function(){
html.evalScripts();
},10);
return _5eb;
},replace:function(_5ed,html){
_5ed=$(_5ed);
html=typeof html=="undefined"?"":html.toString();
if(_5ed.outerHTML){
_5ed.outerHTML=html.stripScripts();
}else{
var _5ef=_5ed.ownerDocument.createRange();
_5ef.selectNodeContents(_5ed);
_5ed.parentNode.replaceChild(_5ef.createContextualFragment(html.stripScripts()),_5ed);
}
setTimeout(function(){
html.evalScripts();
},10);
return _5ed;
},inspect:function(_5f0){
_5f0=$(_5f0);
var _5f1="<"+_5f0.tagName.toLowerCase();
$H({"id":"id","className":"class"}).each(function(pair){
var _5f3=pair.first(),_5f4=pair.last();
var _5f5=(_5f0[_5f3]||"").toString();
if(_5f5){
_5f1+=" "+_5f4+"="+_5f5.inspect(true);
}
});
return _5f1+">";
},recursivelyCollect:function(_5f6,_5f7){
_5f6=$(_5f6);
var _5f8=[];
while(_5f6=_5f6[_5f7]){
if(_5f6.nodeType==1){
_5f8.push(Element.extend(_5f6));
}
}
return _5f8;
},ancestors:function(_5f9){
return $(_5f9).recursivelyCollect("parentNode");
},descendants:function(_5fa){
return $A($(_5fa).getElementsByTagName("*"));
},immediateDescendants:function(_5fb){
if(!(_5fb=$(_5fb).firstChild)){
return [];
}
while(_5fb&&_5fb.nodeType!=1){
_5fb=_5fb.nextSibling;
}
if(_5fb){
return [_5fb].concat($(_5fb).nextSiblings());
}
return [];
},previousSiblings:function(_5fc){
return $(_5fc).recursivelyCollect("previousSibling");
},nextSiblings:function(_5fd){
return $(_5fd).recursivelyCollect("nextSibling");
},siblings:function(_5fe){
_5fe=$(_5fe);
return _5fe.previousSiblings().reverse().concat(_5fe.nextSiblings());
},match:function(_5ff,_600){
if(typeof _600=="string"){
_600=new Selector(_600);
}
return _600.match($(_5ff));
},up:function(_601,_602,_603){
return Selector.findElement($(_601).ancestors(),_602,_603);
},down:function(_604,_605,_606){
return Selector.findElement($(_604).descendants(),_605,_606);
},previous:function(_607,_608,_609){
return Selector.findElement($(_607).previousSiblings(),_608,_609);
},next:function(_60a,_60b,_60c){
return Selector.findElement($(_60a).nextSiblings(),_60b,_60c);
},getElementsBySelector:function(){
var args=$A(arguments),_60e=$(args.shift());
return Selector.findChildElements(_60e,args);
},getElementsByClassName:function(_60f,_610){
return document.getElementsByClassName(_610,_60f);
},readAttribute:function(_611,name){
_611=$(_611);
if(document.all&&!window.opera){
var t=Element._attributeTranslations;
if(t.values[name]){
return t.values[name](_611,name);
}
if(t.names[name]){
name=t.names[name];
}
var _614=_611.attributes[name];
if(_614){
return _614.nodeValue;
}
}
return _611.getAttribute(name);
},getHeight:function(_615){
try{
return $(_615).getDimensions().height;
}
catch(e){
return 1;
}
},getWidth:function(_616){
return $(_616).getDimensions().width;
},classNames:function(_617){
return new Element.ClassNames(_617);
},hasClassName:function(_618,_619){
if(!(_618=$(_618))){
return;
}
var _61a=_618.className;
if(_61a.length==0){
return false;
}
if(_61a==_619||_61a.match(new RegExp("(^|\\s)"+_619+"(\\s|$)"))){
return true;
}
return false;
},addClassName:function(_61b,_61c){
if(!(_61b=$(_61b))){
return;
}
Element.classNames(_61b).add(_61c);
return _61b;
},removeClassName:function(_61d,_61e){
if(!(_61d=$(_61d))){
return;
}
Element.classNames(_61d).remove(_61e);
return _61d;
},toggleClassName:function(_61f,_620){
if(!(_61f=$(_61f))){
return;
}
Element.classNames(_61f)[_61f.hasClassName(_620)?"remove":"add"](_620);
return _61f;
},observe:function(){
Event.observe.apply(Event,arguments);
return $A(arguments).first();
},stopObserving:function(){
Event.stopObserving.apply(Event,arguments);
return $A(arguments).first();
},cleanWhitespace:function(_621){
_621=$(_621);
var node=_621.firstChild;
while(node){
var _623=node.nextSibling;
if(node.nodeType==3&&!/\S/.test(node.nodeValue)){
_621.removeChild(node);
}
node=_623;
}
return _621;
},empty:function(_624){
return $(_624).innerHTML.match(/^\s*$/);
},descendantOf:function(_625,_626){
_625=$(_625),_626=$(_626);
while(_625=_625.parentNode){
if(_625==_626){
return true;
}
}
return false;
},scrollTo:function(_627){
_627=$(_627);
var pos=Position.cumulativeOffset(_627);
window.scrollTo(pos[0],pos[1]);
return _627;
},getStyle:function(_629,_62a){
_629=$(_629);
if(["float","cssFloat"].include(_62a)){
_62a=(typeof _629.style.styleFloat!="undefined"?"styleFloat":"cssFloat");
}
_62a=_62a.camelize();
var _62b=_629.style[_62a];
if(!_62b){
if(document.defaultView&&document.defaultView.getComputedStyle){
var css=document.defaultView.getComputedStyle(_629,null);
_62b=css?css[_62a]:null;
}else{
if(_629.currentStyle){
_62b=_629.currentStyle[_62a];
}
}
}
if((_62b=="auto")&&["width","height"].include(_62a)&&(_629.getStyle("display")!="none")){
_62b=_629["offset"+_62a.capitalize()]+"px";
}
if(window.opera&&["left","top","right","bottom"].include(_62a)){
if(Element.getStyle(_629,"position")=="static"){
_62b="auto";
}
}
if(_62a=="opacity"){
if(_62b){
return parseFloat(_62b);
}
if(_62b=(_629.getStyle("filter")||"").match(/alpha\(opacity=(.*)\)/)){
if(_62b[1]){
return parseFloat(_62b[1])/100;
}
}
return 1;
}
return _62b=="auto"?null:_62b;
},setStyle:function(_62d,_62e){
_62d=$(_62d);
for(var name in _62e){
var _630=_62e[name];
if(name=="opacity"){
if(_630==1){
_630=(/Gecko/.test(navigator.userAgent)&&!/Konqueror|Safari|KHTML/.test(navigator.userAgent))?0.999999:1;
if(/MSIE/.test(navigator.userAgent)&&!window.opera){
_62d.style.filter=_62d.getStyle("filter").replace(/alpha\([^\)]*\)/gi,"");
}
}else{
if(_630==""){
if(/MSIE/.test(navigator.userAgent)&&!window.opera){
_62d.style.filter=_62d.getStyle("filter").replace(/alpha\([^\)]*\)/gi,"");
}
}else{
if(_630<0.00001){
_630=0;
}
if(/MSIE/.test(navigator.userAgent)&&!window.opera){
_62d.style.filter=_62d.getStyle("filter").replace(/alpha\([^\)]*\)/gi,"")+"alpha(opacity="+_630*100+")";
}
}
}
}else{
if(["float","cssFloat"].include(name)){
name=(typeof _62d.style.styleFloat!="undefined")?"styleFloat":"cssFloat";
}
}
_62d.style[name.camelize()]=_630;
}
return _62d;
},getDimensions:function(_631){
_631=$(_631);
var _632=$(_631).getStyle("display");
if(_632!="none"&&_632!=null){
return {width:_631.offsetWidth,height:_631.offsetHeight};
}
var els=_631.style;
var _634=els.visibility;
var _635=els.position;
var _636=els.display;
els.visibility="hidden";
els.position="absolute";
els.display="block";
var _637=_631.clientWidth;
var _638=_631.clientHeight;
els.display=_636;
els.position=_635;
els.visibility=_634;
return {width:_637,height:_638};
},makePositioned:function(_639){
_639=$(_639);
var pos=Element.getStyle(_639,"position");
if(pos=="static"||!pos){
_639._madePositioned=true;
_639.style.position="relative";
if(window.opera){
_639.style.top=0;
_639.style.left=0;
}
}
return _639;
},undoPositioned:function(_63b){
_63b=$(_63b);
if(_63b._madePositioned){
_63b._madePositioned=undefined;
_63b.style.position=_63b.style.top=_63b.style.left=_63b.style.bottom=_63b.style.right="";
}
return _63b;
},makeClipping:function(_63c){
_63c=$(_63c);
if(_63c._overflow){
return _63c;
}
_63c._overflow=_63c.style.overflow||"auto";
if((Element.getStyle(_63c,"overflow")||"visible")!="hidden"){
_63c.style.overflow="hidden";
}
return _63c;
},undoClipping:function(_63d){
_63d=$(_63d);
if(!_63d._overflow){
return _63d;
}
_63d.style.overflow=_63d._overflow=="auto"?"":_63d._overflow;
_63d._overflow=null;
return _63d;
}};
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(_63e,_63f){
return _63e.getAttribute(_63f,2);
},_flag:function(_640,_641){
return $(_640).hasAttribute(_641)?_641:null;
},style:function(_642){
return _642.style.cssText.toLowerCase();
},title:function(_643){
var node=_643.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(_645,_646){
var t=Element._attributeTranslations;
_646=t.names[_646]||_646;
return $(_645).getAttributeNode(_646).specified;
}};
if(document.all&&!window.opera){
Element.Methods.update=function(_648,html){
_648=$(_648);
html=typeof html=="undefined"?"":html.toString();
var _64a=_648.tagName.toUpperCase();
if(["THEAD","TBODY","TR","TD"].include(_64a)){
var div=document.createElement("div");
switch(_64a){
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(_648.childNodes).each(function(node){
_648.removeChild(node);
});
depth.times(function(){
div=div.firstChild;
});
$A(div.childNodes).each(function(node){
_648.appendChild(node);
});
}else{
_648.innerHTML=html.stripScripts();
}
setTimeout(function(){
html.evalScripts();
},10);
return _648;
};
}
Object.extend(Element,Element.Methods);
var _nativeExtensions=false;
if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)){
["","Form","Input","TextArea","Select"].each(function(tag){
var _64f="HTML"+tag+"Element";
if(window[_64f]){
return;
}
var _650=window[_64f]={};
_650.prototype=document.createElement(tag?tag.toLowerCase():"div").__proto__;
});
}
Element.addMethods=function(_651){
Object.extend(Element.Methods,_651||{});
function copy(_652,_653,_654){
_654=_654||false;
var _655=Element.extend.cache;
for(var _656 in _652){
var _657=_652[_656];
if(!_654||!(_656 in _653)){
_653[_656]=_655.findOrStore(_657);
}
}
};
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(_658){
copy(Form.Element.Methods,_658.prototype);
});
_nativeExtensions=true;
}
};
var Toggle=new Object();
Toggle.display=Element.toggle;
Abstract.Insertion=function(_659){
this.adjacency=_659;
};
Abstract.Insertion.prototype={initialize:function(_65a,_65b){
this.element=$(_65a);
this.content=_65b.stripScripts();
if(this.adjacency&&this.element.insertAdjacentHTML){
try{
this.element.insertAdjacentHTML(this.adjacency,this.content);
}
catch(e){
var _65c=this.element.tagName.toUpperCase();
if(["TBODY","TR"].include(_65c)){
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(){
_65b.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(_65e){
_65e.each((function(_65f){
this.element.parentNode.insertBefore(_65f,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(_660){
_660.reverse(false).each((function(_661){
this.element.insertBefore(_661,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(_662){
_662.each((function(_663){
this.element.appendChild(_663);
}).bind(this));
}});
Insertion.After=Class.create();
Insertion.After.prototype=Object.extend(new Abstract.Insertion("afterEnd"),{initializeRange:function(){
this.range.setStartAfter(this.element);
},insertContent:function(_664){
_664.each((function(_665){
this.element.parentNode.insertBefore(_665,this.element.nextSibling);
}).bind(this));
}});
Element.ClassNames=Class.create();
Element.ClassNames.prototype={initialize:function(_666){
this.element=$(_666);
},_each:function(_667){
this.element.className.split(/\s+/).select(function(name){
return name.length>0;
})._each(_667);
},set:function(_669){
this.element.className=_669;
},add:function(_66a){
if(this.include(_66a)){
return;
}
this.set($A(this).concat(_66a).join(" "));
},remove:function(_66b){
if(!this.include(_66b)){
return;
}
this.set($A(this).without(_66b).join(" "));
},toString:function(){
return $A(this).join(" ");
}};
Object.extend(Element.ClassNames.prototype,Enumerable);
var Selector=Class.create();
Selector.prototype={initialize:function(_66c){
this.params={classNames:[]};
this.expression=_66c.toString().strip();
this.parseExpression();
this.compileMatcher();
},parseExpression:function(){
function abort(_66d){
throw "Parse error in selector: "+_66d;
};
if(this.expression==""){
abort("empty expression");
}
var _66e=this.params,expr=this.expression,_670,_671,_672,rest;
while(_670=expr.match(/^(.*)\[([a-z0-9_:-]+?)(?:([~\|!]?=)(?:"([^"]*)"|([^\]\s]*)))?\]$/i)){
_66e.attributes=_66e.attributes||[];
_66e.attributes.push({name:_670[2],operator:_670[3],value:_670[4]||_670[5]||""});
expr=_670[1];
}
if(expr=="*"){
return this.params.wildcard=true;
}
while(_670=expr.match(/^([^a-z0-9_-])?([a-z0-9_-]+)(.*)/i)){
_671=_670[1],_672=_670[2],rest=_670[3];
switch(_671){
case "#":
_66e.id=_672;
break;
case ".":
_66e.classNames.push(_672);
break;
case "":
case undefined:
_66e.tagName=_672.toUpperCase();
break;
default:
abort(expr.inspect());
}
expr=rest;
}
if(expr.length>0){
abort(expr.inspect());
}
},buildMatchExpression:function(){
var _674=this.params,_675=[],_676;
if(_674.wildcard){
_675.push("true");
}
if(_676=_674.id){
_675.push("element.readAttribute(\"id\") == "+_676.inspect());
}
if(_676=_674.tagName){
_675.push("element.tagName.toUpperCase() == "+_676.inspect());
}
if((_676=_674.classNames).length>0){
for(var i=0,_678=_676.length;i<_678;i++){
_675.push("element.hasClassName("+_676[i].inspect()+")");
}
}
if(_676=_674.attributes){
_676.each(function(_679){
var _67a="element.readAttribute("+_679.name.inspect()+")";
var _67b=function(_67c){
return _67a+" && "+_67a+".split("+_67c.inspect()+")";
};
switch(_679.operator){
case "=":
_675.push(_67a+" == "+_679.value.inspect());
break;
case "~=":
_675.push(_67b(" ")+".include("+_679.value.inspect()+")");
break;
case "|=":
_675.push(_67b("-")+".first().toUpperCase() == "+_679.value.toUpperCase().inspect());
break;
case "!=":
_675.push(_67a+" != "+_679.value.inspect());
break;
case "":
case undefined:
_675.push("element.hasAttribute("+_679.name.inspect()+")");
break;
default:
throw "Unknown operator "+_679.operator+" in selector";
}
});
}
return _675.join(" && ");
},compileMatcher:function(){
this.match=new Function("element","if (!element.tagName) return false;       element = $(element);       return "+this.buildMatchExpression());
},findElements:function(_67d){
var _67e;
if(_67e=$(this.params.id)){
if(this.match(_67e)){
if(!_67d||Element.childOf(_67e,_67d)){
return [_67e];
}
}
}
_67d=(_67d||document).getElementsByTagName(this.params.tagName||"*");
var _67f=[];
for(var i=0,_681=_67d.length;i<_681;i++){
try{
if(this.match(_67e=_67d[i])){
_67f.push(Element.extend(_67e));
}
}
catch(e){
}
}
return _67f;
},toString:function(){
return this.expression;
}};
Object.extend(Selector,{matchElements:function(_682,_683){
var _684=new Selector(_683);
return _682.select(_684.match.bind(_684)).map(Element.extend);
},findElement:function(_685,_686,_687){
if(typeof _686=="number"){
_687=_686,_686=false;
}
return Selector.matchElements(_685,_686||"*")[_687||0];
},findChildElements:function(_688,_689){
return _689.map(function(_68a){
return _68a.match(/[^\s"]+(?:"[^"]*"[^\s"]+)*/g).inject([null],function(_68b,expr){
var _68d=new Selector(expr);
return _68b.inject([],function(_68e,_68f){
return _68e.concat(_68d.findElements(_68f||_688));
});
});
}).flatten();
}});
function $$(){
return Selector.findChildElements(document,$A(arguments));
};
var Form={reset:function(form){
$(form).reset();
return form;
},serializeElements:function(_691,_692){
var data=_691.inject({},function(_694,_695){
if(!_695.disabled&&_695.name){
var key=_695.name,_697=$(_695).getValue();
if(_697!=undefined){
if(_694[key]){
if(_694[key].constructor!=Array){
_694[key]=[_694[key]];
}
_694[key].push(_697);
}else{
_694[key]=_697;
}
}
}
return _694;
});
return _692?data:Prototype.Hash.toQueryString(data);
},unserializeElements:function(_698,hash){
for(i in hash){
Form.Element.setValue(i,hash[i].toString());
}
}};
Form.Methods={serialize:function(form,_69b){
return Form.serializeElements(Form.getElements(form),_69b);
},unserialize:function(form,hash){
return Form.unserializeElements(Form.getElements(form),hash);
},getElements:function(form){
return $A($(form).getElementsByTagName("*")).inject([],function(_69f,_6a0){
if(Form.Element.Serializers[_6a0.tagName.toLowerCase()]){
_69f.push(Element.extend(_6a0));
}
return _69f;
});
},getInputs:function(form,_6a2,name){
form=$(form);
var _6a4=form.getElementsByTagName("input");
if(!_6a2&&!name){
return $A(_6a4).map(Element.extend);
}
for(var i=0,_6a6=[],_6a7=_6a4.length;i<_6a7;i++){
var _6a8=_6a4[i];
if((_6a2&&_6a8.type!=_6a2)||(name&&_6a8.name!=name)){
continue;
}
_6a6.push(Element.extend(_6a8));
}
return _6a6;
},disable:function(form){
form=$(form);
form.getElements().each(function(_6aa){
_6aa.blur();
_6aa.disabled="true";
});
return form;
},enable:function(form){
form=$(form);
form.getElements().each(function(_6ac){
_6ac.disabled="";
});
return form;
},findFirstElement:function(form){
return $(form).getElements().find(function(_6ae){
return _6ae.type!="hidden"&&!_6ae.disabled&&["input","select","textarea"].include(_6ae.tagName.toLowerCase());
});
},focusFirstElement:function(form){
form=$(form);
form.findFirstElement().activate();
return form;
}};
Object.extend(Form,Form.Methods);
Form.Element={focus:function(_6b0){
$(_6b0).focus();
return _6b0;
},select:function(_6b1){
$(_6b1).select();
return _6b1;
}};
Form.Element.Methods={serialize:function(_6b2){
_6b2=$(_6b2);
if(!_6b2.disabled&&_6b2.name){
var _6b3=_6b2.getValue();
if(_6b3!=undefined){
var pair={};
pair[_6b2.name]=_6b3;
return Prototype.Hash.toQueryString(pair);
}
}
return "";
},getValue:function(_6b5){
_6b5=$(_6b5);
var _6b6=_6b5.tagName.toLowerCase();
return Form.Element.Serializers[_6b6](_6b5);
},clear:function(_6b7){
$(_6b7).value="";
return _6b7;
},present:function(_6b8){
return $(_6b8).value!="";
},activate:function(_6b9){
_6b9=$(_6b9);
_6b9.focus();
if(_6b9.select&&(_6b9.tagName.toLowerCase()!="input"||!["button","reset","submit"].include(_6b9.type))){
_6b9.select();
}
return _6b9;
},disable:function(_6ba){
_6ba=$(_6ba);
_6ba.disabled=true;
return _6ba;
},enable:function(_6bb){
_6bb=$(_6bb);
_6bb.blur();
_6bb.disabled=false;
return _6bb;
}};
Object.extend(Form.Element,Form.Element.Methods);
var Field=Form.Element;
var $F=Form.Element.getValue;
Form.Element.Serializers={input:function(_6bc){
switch(_6bc.type.toLowerCase()){
case "checkbox":
return _6bc.checked?_6bc.value:0;
case "radio":
return Form.Element.Serializers.inputSelector(_6bc);
default:
return Form.Element.Serializers.textarea(_6bc);
}
},inputSelector:function(_6bd){
return _6bd.checked?_6bd.value:null;
},textarea:function(_6be){
return _6be.value;
},select:function(_6bf){
return this[_6bf.type=="select-one"?"selectOne":"selectMany"](_6bf);
},selectOne:function(_6c0){
var _6c1=_6c0.selectedIndex;
return _6c1>=0?this.optionValue(_6c0.options[_6c1]):null;
},selectMany:function(_6c2){
var _6c3,_6c4=_6c2.length;
if(!_6c4){
return null;
}
for(var i=0,_6c3=[];i<_6c4;i++){
var opt=_6c2.options[i];
if(opt.selected){
_6c3.push(this.optionValue(opt));
}
}
return _6c3;
},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(_6c8,_6c9,_6ca){
this.frequency=_6c9;
this.element=$(_6c8);
this.callback=_6ca;
this.lastValue=this.getValue();
this.registerCallback();
},registerCallback:function(){
setInterval(this.onTimerEvent.bind(this),this.frequency*1000);
},onTimerEvent:function(){
var _6cb=this.getValue();
var _6cc=("string"==typeof this.lastValue&&"string"==typeof _6cb?this.lastValue!=_6cb:String(this.lastValue)!=String(_6cb));
if(_6cc){
this.callback(this.element,_6cb);
this.lastValue=_6cb;
}
}};
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(_6cd,_6ce){
this.element=$(_6cd);
this.callback=_6ce;
this.lastValue=this.getValue();
if(this.element.tagName.toLowerCase()=="form"){
this.registerFormCallbacks();
}else{
this.registerCallback(this.element);
}
},onElementEvent:function(){
var _6cf=this.getValue();
if(this.lastValue!=_6cf){
this.callback(this.element,_6cf);
this.lastValue=_6cf;
}
},registerFormCallbacks:function(){
Form.getElements(this.element).each(this.registerCallback.bind(this));
},registerCallback:function(_6d0){
if(_6d0.type){
switch(_6d0.type.toLowerCase()){
case "checkbox":
case "radio":
Event.observe(_6d0,"click",this.onElementEvent.bind(this));
break;
default:
Event.observe(_6d0,"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(_6d1){
return _6d1.target||_6d1.srcElement;
},isLeftClick:function(_6d2){
return (((_6d2.which)&&(_6d2.which==1))||((_6d2.button)&&(_6d2.button==1)));
},pointerX:function(_6d3){
return _6d3.pageX||(_6d3.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft));
},pointerY:function(_6d4){
return _6d4.pageY||(_6d4.clientY+(document.documentElement.scrollTop||document.body.scrollTop));
},stop:function(_6d5){
if(_6d5.preventDefault){
_6d5.preventDefault();
_6d5.stopPropagation();
}else{
_6d5.returnValue=false;
_6d5.cancelBubble=true;
}
},findElement:function(_6d6,_6d7){
var _6d8=Event.element(_6d6);
while(_6d8.parentNode&&(!_6d8.tagName||(_6d8.tagName.toUpperCase()!=_6d7.toUpperCase()))){
_6d8=_6d8.parentNode;
}
return _6d8;
},observers:false,_observeAndCache:function(_6d9,name,_6db,_6dc){
if(!this.observers){
this.observers=[];
}
if(_6d9==null){
return;
}
if(_6d9.addEventListener){
this.observers.push([_6d9,name,_6db,_6dc]);
_6d9.addEventListener(name,_6db,_6dc);
}else{
if(_6d9.attachEvent){
this.observers.push([_6d9,name,_6db,_6dc]);
_6d9.attachEvent("on"+name,_6db);
}
}
},unloadCache:function(){
if(!Event.observers){
return;
}
for(var i=0,_6de=Event.observers.length;i<_6de;i++){
Event.stopObserving.apply(this,Event.observers[i]);
Event.observers[i][0]=null;
}
Event.observers=false;
},observe:function(_6df,name,_6e1,_6e2){
_6df=$(_6df);
_6e2=_6e2||false;
if(name=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||_6df.attachEvent)){
name="keydown";
}
Event._observeAndCache(_6df,name,_6e1,_6e2);
},stopObserving:function(_6e3,name,_6e5,_6e6){
_6e3=$(_6e3);
_6e6=_6e6||false;
if(name=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||_6e3.detachEvent)){
name="keydown";
}
if(_6e3.removeEventListener){
_6e3.removeEventListener(name,_6e5,_6e6);
}else{
if(_6e3.detachEvent){
try{
_6e3.detachEvent("on"+name,_6e5);
}
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(_6e7){
var _6e8=0,_6e9=0;
do{
_6e8+=_6e7.scrollTop||0;
_6e9+=_6e7.scrollLeft||0;
_6e7=_6e7.parentNode;
}while(_6e7);
return [_6e9,_6e8];
},cumulativeOffset:function(_6ea){
var _6eb=0,_6ec=0;
do{
_6eb+=_6ea.offsetTop||0;
_6ec+=_6ea.offsetLeft||0;
_6ea=_6ea.offsetParent;
}while(_6ea);
return [_6ec,_6eb];
},positionedOffset:function(_6ed){
var _6ee=0,_6ef=0;
do{
_6ee+=_6ed.offsetTop||0;
_6ef+=_6ed.offsetLeft||0;
_6ed=_6ed.offsetParent;
if(_6ed){
if(_6ed.tagName=="BODY"){
break;
}
var p=Element.getStyle(_6ed,"position");
if(p=="relative"||p=="absolute"){
break;
}
}
}while(_6ed);
return [_6ef,_6ee];
},offsetParent:function(_6f1){
if(_6f1.offsetParent){
return _6f1.offsetParent;
}
if(_6f1==document.body){
return _6f1;
}
while((_6f1=_6f1.parentNode)&&_6f1!=document.body){
if(Element.getStyle(_6f1,"position")!="static"){
return _6f1;
}
}
return document.body;
},within:function(_6f2,x,y){
if(this.includeScrollOffsets){
return this.withinIncludingScrolloffsets(_6f2,x,y);
}
this.xcomp=x;
this.ycomp=y;
this.offset=this.cumulativeOffset(_6f2);
return (y>=this.offset[1]&&y<this.offset[1]+_6f2.offsetHeight&&x>=this.offset[0]&&x<this.offset[0]+_6f2.offsetWidth);
},withinIncludingScrolloffsets:function(_6f5,x,y){
var _6f8=this.realOffset(_6f5);
this.xcomp=x+_6f8[0]-this.deltaX;
this.ycomp=y+_6f8[1]-this.deltaY;
this.offset=this.cumulativeOffset(_6f5);
return (this.ycomp>=this.offset[1]&&this.ycomp<this.offset[1]+_6f5.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+_6f5.offsetWidth);
},overlap:function(mode,_6fa){
if(!mode){
return 0;
}
if(mode=="vertical"){
return ((this.offset[1]+_6fa.offsetHeight)-this.ycomp)/_6fa.offsetHeight;
}
if(mode=="horizontal"){
return ((this.offset[0]+_6fa.offsetWidth)-this.xcomp)/_6fa.offsetWidth;
}
},page:function(_6fb){
var _6fc=0,_6fd=0;
var _6fe=_6fb;
do{
_6fc+=_6fe.offsetTop||0;
_6fd+=_6fe.offsetLeft||0;
if(_6fe.offsetParent==document.body){
if(Element.getStyle(_6fe,"position")=="absolute"){
break;
}
}
}while(_6fe=_6fe.offsetParent);
_6fe=_6fb;
do{
if(!window.opera||_6fe.tagName=="BODY"){
_6fc-=_6fe.scrollTop||0;
_6fd-=_6fe.scrollLeft||0;
}
}while(_6fe=_6fe.parentNode);
return [_6fd,_6fc];
},clone:function(_6ff,_700){
var _701=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},arguments[2]||{});
_6ff=$(_6ff);
var p=Position.page(_6ff);
_700=$(_700);
var _703=[0,0];
var _704=null;
if(Element.getStyle(_700,"position")=="absolute"){
_704=Position.offsetParent(_700);
_703=Position.page(_704);
}
if(_704==document.body){
_703[0]-=document.body.offsetLeft;
_703[1]-=document.body.offsetTop;
}
if(_701.setLeft){
_700.style.left=(p[0]-_703[0]+_701.offsetLeft)+"px";
}
if(_701.setTop){
_700.style.top=(p[1]-_703[1]+_701.offsetTop)+"px";
}
if(_701.setWidth){
_700.style.width=_6ff.offsetWidth+"px";
}
if(_701.setHeight){
_700.style.height=_6ff.offsetHeight+"px";
}
},absolutize:function(_705){
_705=$(_705);
if(_705.style.position=="absolute"){
return;
}
Position.prepare();
var _706=Position.positionedOffset(_705);
var top=_706[1];
var left=_706[0];
var _709=_705.clientWidth;
var _70a=_705.clientHeight;
_705._originalLeft=left-parseFloat(_705.style.left||0);
_705._originalTop=top-parseFloat(_705.style.top||0);
_705._originalWidth=_705.style.width;
_705._originalHeight=_705.style.height;
_705.style.position="absolute";
_705.style.top=top+"px";
_705.style.left=left+"px";
_705.style.width=_709+"px";
_705.style.height=_70a+"px";
},relativize:function(_70b){
_70b=$(_70b);
if(_70b.style.position=="relative"){
return;
}
Position.prepare();
_70b.style.position="relative";
var top=parseFloat(_70b.style.top||0)-(_70b._originalTop||0);
var left=parseFloat(_70b.style.left||0)-(_70b._originalLeft||0);
_70b.style.top=top+"px";
_70b.style.left=left+"px";
_70b.style.height=_70b._originalHeight;
_70b.style.width=_70b._originalWidth;
}};
if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)){
Position.cumulativeOffset=function(_70e){
var _70f=0,_710=0;
do{
_70f+=_70e.offsetTop||0;
_710+=_70e.offsetLeft||0;
if(_70e.offsetParent==document.body){
if(Element.getStyle(_70e,"position")=="absolute"){
break;
}
}
_70e=_70e.offsetParent;
}while(_70e);
return [_710,_70f];
};
}
Element.addMethods();
function tip_init(){
jQuery("a.hptip").each(function(){
var url=jQuery(this).attr("data-tip");
if(jQuery(this).hasClass("mouseoverable")){
jQuery(this).hover(function(){
jQuery(this).data("sticky",1);
tip_show(url,this.id,this.name,true);
},function(){
jQuery(this).data("sticky",0);
var id=this.id;
setTimeout(function(){
tip_remove(id);
},800);
}).click(function(){
return false;
});
jQuery("#HPT").live("mouseover",function(){
var _713=jQuery(this).data("linkId");
if(_713){
jQuery("#"+_713).data("sticky",1);
}
}).live("mouseout",function(_714){
var hpts=jQuery(_714.relatedTarget).closest("#HPT");
if(hpts.size()==0){
var _716=jQuery(this).data("linkId");
if(_716){
jQuery("#"+_716).data("sticky",0);
}
setTimeout(function(){
tip_remove(_716);
},800);
}
});
}else{
jQuery(this).hover(function(){
tip_show(url,this.id,this.name,false);
},function(){
jQuery("#HPT").remove();
}).click(function(){
return false;
});
}
});
};
function tip_remove(_717){
var _718=jQuery("#HPT").data("linkId");
if(_717!=_718){
return;
}
var _719=jQuery("#"+_717).data("sticky");
if(!_719){
jQuery("#HPT").remove();
}
};
function tip_show(url,_71b,_71c,_71d){
if(jQuery("#HPT").size()){
jQuery("#HPT").remove();
}
if(_71c==false&&_71d){
_71c="&nbsp;";
}
var de=document.documentElement;
var w=self.innerWidth||(de&&de.clientWidth)||document.body.clientWidth;
var _720=getElementWidth(_71b);
var _721=w-getAbsoluteLeft(_71b)-_720;
var _722=getAbsoluteLeft(_71b);
var _723=getAbsoluteTop(_71b)-3;
var _724=url.replace(/^[^\?]+\??/,"");
var _725=parseQuery(_724);
if(_725["width"]===undefined){
_725["width"]=250;
}
if(_725["link"]!==undefined){
jQuery("#"+_71b).bind("click",function(){
window.location=_725["link"];
});
jQuery("#"+_71b).css("cursor","pointer");
}
var _726=_71d?" <a href='#' class='close' onclick='jQuery(\"#HPT\").remove(); return false;'>x</a>":"";
var _727=_725["css"]?" class='"+_725["css"]+"'":"";
var _728;
var _729=false;
if(_725["dir"]!==undefined){
_728=_725["dir"];
}else{
if(_721>(_725["width"]*1+11)){
_728="right";
}else{
if(_721+_720*0.3>(_725["width"]*1+11)){
_728="right";
_729=true;
}else{
if(_722>(_725["width"]*1+11)){
_728="left";
}else{
_728="right";
_729=true;
}
}
}
}
var _72a=_728=="left"?"right":"left";
var _72b=_71c?"<div id='HPT_close_"+_72a+"'>"+_71c+_726+"</div>":"";
var _72c=_728=="left"?"style='left:"+((_725["width"]*1)+1)+"px"+"'":"";
jQuery("#container").append("<div id='HPT' style='width:"+_725["width"]*1+"px'"+_727+"><div id='HPT_arrow_"+_72a+"' "+_72c+"></div>"+_72b+"<div id='HPT_copy'><div class='HPT_loader'><div></div></div>");
if(_728=="right"){
var _72c=_720+11;
if(_729){
var _72d=getAbsoluteLeft(_71b)+_72c-_720*0.3;
}else{
var _72d=getAbsoluteLeft(_71b)+_72c;
}
}else{
var _72d=getAbsoluteLeft(_71b)-((_725["width"]*1)+15);
}
var _72e=jQuery("#container").offset();
_72d-=_72e.left;
_723-=_72e.top;
jQuery("#HPT").css({left:_72d+"px",top:_723+"px"});
jQuery("#HPT").data("linkId",_71b);
jQuery("#HPT").show();
jQuery("#HPT_copy").load(url);
};
function getElementWidth(_72f){
x=document.getElementById(_72f);
return x.offsetWidth;
};
function getAbsoluteLeft(_730){
o=document.getElementById(_730);
oLeft=o.offsetLeft;
while(o.offsetParent!=null){
oParent=o.offsetParent;
oLeft+=oParent.offsetLeft;
o=oParent;
}
return oLeft;
};
function getAbsoluteTop(_731){
o=document.getElementById(_731);
oTop=o.offsetTop;
while(o.offsetParent!=null){
oParent=o.offsetParent;
oTop+=oParent.offsetTop;
o=oParent;
}
return oTop;
};
function parseQuery(_732){
var _733=new Object();
if(!_732){
return _733;
}
var _734=_732.split(/[;&]/);
for(var i=0;i<_734.length;i++){
var _736=_734[i].split("=");
if(!_736||_736.length!=2){
continue;
}
var key=unescape(_736[0]);
var val=unescape(_736[1]);
val=val.replace(/\+/g," ");
_733[key]=val;
}
return _733;
};
function blockEvents(evt){
if(evt.target){
evt.preventDefault();
}else{
evt.returnValue=false;
}
};
Form.Element.setValue=function(_73a,_73b){
element_id=_73a;
_73a=$(_73a);
if(!_73a){
_73a=document.getElementsByName(element_id)[0];
}
if(!_73a){
return false;
}
var _73c=_73a.tagName.toLowerCase();
var _73d=Form.Element.SetSerializers[_73c](_73a,_73b);
};
Form.Element.SetSerializers={input:function(_73e,_73f){
switch(_73e.type.toLowerCase()){
case "submit":
case "hidden":
case "password":
case "text":
return Form.Element.SetSerializers.textarea(_73e,_73f);
case "checkbox":
return Form.Element.SetSerializers.checkbox(_73e,_73f);
case "radio":
return Form.Element.SetSerializers.inputSelector(_73e,_73f);
}
return false;
},checkbox:function(_740,_741){
if(_741==0||_741==null||_741==""){
_740.checked=false;
}else{
_740.checked=true;
}
},inputSelector:function(_742,_743){
fields=document.getElementsByName(_742.name);
for(var i=0;i<fields.length;i++){
if(fields[i].value==_743){
fields[i].checked=true;
}
}
},textarea:function(_745,_746){
_745.value=_746;
},select:function(_747,_748){
var _749="",opt,_74b=_747.selectedIndex;
for(var i=0;i<_747.options.length;i++){
if(_747.options[i].value==_748){
_747.selectedIndex=i;
return true;
}
}
}};
var fx=new Object();
fx.Base=function(){
};
fx.Base.prototype={setOptions:function(_74d){
this.options={duration:500,onComplete:"",transition:fx.sinoidal};
Object.extend(this.options,_74d||{});
},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,_753){
this.el=$(el);
this.el.style.overflow="hidden";
this.iniWidth=this.el.offsetWidth;
this.iniHeight=this.el.offsetHeight;
this.setOptions(_753);
}});
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(){
var _754=this.options.toHeight?this.options.toHeight:0;
if(this.el.offsetHeight>0){
this.custom(this.el.offsetHeight,_754);
}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,_756){
this.el=$(el);
this.now=1;
this.increase();
this.setOptions(_756);
},increase:function(){
if(this.now==1&&(/Firefox/.test(navigator.userAgent))){
this.now=0.9999;
}
this.setOpacity(this.now);
},setOpacity:function(_757){
if(_757==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="+_757*100+")";
}
this.el.style.opacity=_757;
},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(_75c){
this.setOptions(_75c);
},scrollTo:function(el){
var dest=Position.cumulativeOffset($(el))[1]-20;
var _75f=window.innerHeight||document.documentElement.clientHeight;
var full=document.documentElement.scrollHeight;
var top=window.pageYOffset||document.body.scrollTop||document.documentElement.scrollTop;
if(dest+_75f>full){
this.custom(top,dest-_75f+(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,_763){
this.el=$(el);
this.setOptions(_763);
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(_764){
this.options={opacity:true,height:true,width:false};
Object.extend(this.options,_764||{});
},initialize:function(el,_766){
this.el=$(el);
this.setOptions(_766);
if(this.options.opacity){
this.o=new fx.Opacity(el,_766);
_766.onComplete=null;
}
if(this.options.height){
this.h=new fx.Height(el,_766);
_766.onComplete=null;
}
if(this.options.width){
this.w=new fx.Width(el,_766);
}
},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(_76c){
this.options={delay:100,opacity:false};
Object.extend(this.options,_76c||{});
},initialize:function(_76d,_76e,_76f){
this.elements=_76e;
this.setOptions(_76f);
var _76f=_76f||"";
_76e.each(function(el,i){
_76f.onComplete=function(){
if(el.offsetHeight>0){
el.style.height="1%";
}
};
el.fx=new fx.Combo(el,_76f);
el.fx.hide();
});
_76d.each(function(tog,i){
tog.onclick=function(){
this.showThisHideOpen(_76e[i]);
}.bind(this);
}.bind(this));
},showThisHideOpen:function(_774){
this.elements.each(function(el,i){
if(el.offsetHeight>0&&el!=_774){
this.clearAndToggle(el);
}
}.bind(this));
if(_774.offsetHeight==0){
setTimeout(function(){
this.clearAndToggle(_774);
}.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,_779){
this.el=$(el);
this.days=365;
this.options=_779;
this.effect();
var _77a=this.readCookie();
if(_77a){
this.fx.now=_77a;
this.fx.increase();
}
},setCookie:function(_77b){
var date=new Date();
date.setTime(date.getTime()+(this.days*24*60*60*1000));
var _77d="; expires="+date.toGMTString();
document.cookie=this.el+this.el.id+this.prefix+"="+_77b+_77d+"; path=/";
},readCookie:function(){
var _77e=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(_77e)==0){
return c.substring(_77e.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,_790){
this.el=$(el);
this.setOptions(_790);
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,_797){
this.el=$(el);
this.setOptions(_797);
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();
};
function overlayIsOpen(id){
toggleOverlay.init(id);
return toggleOverlay.curtain.style.display=="block";
};
toggleOverlay.init=function(id){
this.isIE6orBelow=false;
var _7a0=navigator.userAgent.toLowerCase();
var _7a1=_7a0.indexOf("msie")+1;
if(_7a1){
version=_7a0.charAt(_7a1+4);
if(version<=6){
this.isIE6orBelow=true;
}
}
this.overlay=$(id);
this.wrapper=this.getWrapper();
this.curtain=this.getCurtain();
this.wrapper.appendChild(this.overlay);
if(this.isIE6orBelow){
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.wrapper.style.display="block";
this.curtain.style.display="block";
if(this.isIE6orBelow){
this.iframe.style.display="block";
}
this.stretchCurtain();
Event.observe(window,"resize",this.stretchCurtain,false);
};
toggleOverlay.hideCurtain=function(){
this.setElementVisibility("visible");
this.curtain.style.display="none";
this.wrapper.style.display="none";
if(this.isIE6orBelow){
this.iframe.style.display="none";
}
Event.stopObserving(window,"resize",this.stretchCurtain,false);
};
toggleOverlay.setElementVisibility=function(_7a4){
if(this.elementsToHide){
for(i=0;i<this.elementsToHide.length;i++){
this.elementsToHide[i].style.visibility=_7a4;
}
}
};
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.zIndex="1000";
if(this.isIE6orBelow){
div.style.position="absolute";
div.style.top=Position.getViewportScrollY()+"px";
Event.observe(window,"scroll",function(){
div.style.top=Position.getViewportScrollY()+"px";
});
}else{
div.style.position="fixed";
}
return div;
};
toggleOverlay.getCurtain=function(){
var id="toggleOverlayCurtain";
var _7a8=$(id);
if(_7a8){
return _7a8;
}
_7a8=document.createElement("div");
_7a8.id=id;
this.wrapper.appendChild(_7a8);
return _7a8;
};
toggleOverlay.getIframe=function(){
var id="toggleOverlayIframe";
var _7aa=$(id);
if(_7aa){
return _7aa;
}
_7aa=document.createElement("iframe");
_7aa.id=id;
_7aa.src="";
_7aa.frameBorder="no";
_7aa.scrolling="no";
document.body.appendChild(_7aa);
return _7aa;
};
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.curtain.style.height=height+"px";
if(this.isIE6orBelow){
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;
};
JSONstring={compactOutput:false,includeProtos:false,includeFunctions:false,detectCirculars:false,restoreCirculars:true,make:function(arg,_7ac){
this.restore=_7ac;
this.mem=[];
this.pathMem=[];
return this.toJsonStringArray(arg).join("");
},toObject:function(x){
eval("this.myObj="+x);
if(!this.restoreCirculars||!alert){
return this.myObj;
}
this.restoreCode=[];
this.make(this.myObj,true);
var r=this.restoreCode.join(";")+";";
eval("r=r.replace(/\\W([0-9]{1,})(\\W)/g,\"[$1]$2\").replace(/\\.\\;/g,\";\")");
eval(r);
return this.myObj;
},toJsonStringArray:function(arg,out){
if(!out){
this.path=[];
}
out=out||[];
var u;
switch(typeof arg){
case "object":
this.lastObj=arg;
if(this.detectCirculars){
var m=this.mem;
var n=this.pathMem;
for(var i=0;i<m.length;i++){
if(arg===m[i]){
out.push("\"JSONcircRef:"+n[i]+"\"");
return out;
}
}
m.push(arg);
n.push(this.path.join("."));
}
if(arg){
if(arg.constructor==Array){
out.push("[");
for(var i=0;i<arg.length;++i){
this.path.push(i);
if(i>0){
out.push(",\n");
}
this.toJsonStringArray(arg[i],out);
this.path.pop();
}
out.push("]");
return out;
}else{
if(typeof arg.toString!="undefined"){
out.push("{");
var _7b5=true;
for(var i in arg){
if(!this.includeProtos&&arg[i]===arg.constructor.prototype[i]){
continue;
}
this.path.push(i);
var curr=out.length;
if(!_7b5){
out.push(this.compactOutput?",":",\n");
}
this.toJsonStringArray(i,out);
out.push(":");
this.toJsonStringArray(arg[i],out);
if(out[out.length-1]==u){
out.splice(curr,out.length-curr);
}else{
_7b5=false;
}
this.path.pop();
}
out.push("}");
return out;
}
}
return out;
}
out.push("null");
return out;
case "unknown":
case "undefined":
case "function":
out.push(this.includeFunctions?arg:u);
return out;
case "string":
if(this.restore&&arg.indexOf("JSONcircRef:")==0){
this.restoreCode.push("this.myObj."+this.path.join(".")+"="+arg.split("JSONcircRef:").join("this.myObj."));
}
out.push("\"");
var a=["\\","\\\\","\n","\\n","\r","\\r","\"","\\\""];
arg+="";
for(var i=0;i<8;i+=2){
arg=arg.split(a[i]).join(a[i+1]);
}
out.push(arg);
out.push("\"");
return out;
default:
out.push(String(arg));
return out;
}
}};
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(_7b8){
place=detect.indexOf(_7b8)+1;
thestring=_7b8;
return place;
};
function ssToId(id){
var s=new SoftScroll(id);
return false;
};
function ssTo(_7bb){
var s=new SoftScroll("mod_"+_7bb);
return false;
};
function ssOnload(){
var _7bd=location.hash.slice(1);
if(_7bd=="comments"){
ssToId("comFirst");
}else{
if(_7bd.substr(0,8)=="comment-"){
ssToId("comment"+_7bd.substr(8));
}else{
if(_7bd!=null&&_7bd){
ssToId(_7bd);
}
}
}
};
var SoftScroll=Class.create();
SoftScroll.prototype={initialize:function(ele,_7bf,_7c0){
this.ele=$(ele);
this.durat=_7bf||1000;
this.delay=_7c0||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,_7c4,_7c5,_7c6){
var _7c7="<div class=\"video\">";
var mode="opaque";
if(_7c5){
mode="transparent";
}
if(_7c6=="bad"){
_7c7="<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"){
_7c7+="<embed style=\""+_7c4+"\" 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"){
_7c7+="<embed style=\""+_7c4+"\" class=\""+css+"\" "+"type=\"application/x-shockwave-flash\" "+"src=\"http://www.youtube.com/v/"+key+"\" scale=\"exactFit\" "+"wmode=\""+mode+"\">"+"</embed>";
}else{
if(type=="Revver"){
_7c7+="<embed style=\""+_7c4+"\" 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"){
_7c7+="<embed style=\""+_7c4+"\" 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);
_7c7+="<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=="YahooSports"){
_7c7+="<embed class=\""+css+"\" vid=\""+key+"\" flashvars=\"vid="+key+"\" allowfullscreen=\"true\" allowscriptaccess=\"never\" quality=\"high\" "+" bgcolor=\"#000\" scale=\"exactFit\" src=\"http://d.yimg.com/m/up/ypp/sports/player.swf\" type=\"application/x-shockwave-flash\" wmode=\""+mode+"\" />";
}else{
if(type=="Vimeo"){
_7c7+="<embed style=\""+_7c4+"\" 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"){
_7c7+="<embed style=\""+_7c4+"\" 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"){
_7c7+="<p style=\"margin-left:1em\">The specified URL was not recognized</p>";
}else{
_7c7+="<p style=\"margin-left:1em\">Video Not Available</p>";
}
}
}
}
}
}
}
}
}
_7c7+="</div>";
if(_7c5){
Element.update(_7c5,_7c7);
}else{
if(type!="New"){
document.write(_7c7);
}
}
};
function safeScriptEval(_7cb){
var _7cc=_7cb.innerHTML.strip();
if(_7cc.substring(0,4)=="<!--"){
_7cc=_7cc.substring(4,_7cc.length-3);
}
try{
eval(_7cc);
}
catch(e){
}
};
function shareHub(url){
new Ajax.Request("/xml/hubfeedshare.php",{parameters:$H({url:url}).toQueryString(),onSuccess:function(req){
eval(req.responseText);
if(success){
$("share_with_followers").innerHTML="Hub shared!";
}else{
$("share_with_followers").innerHTML="Sorry, something went wrong!";
}
}});
};
function praiseHub(id,val,d,c){
if(!id){
return;
}
$("praise_feedback").innerHTML="Saving ...";
var uri=$H({a:id,v:val,h:1}).toQueryString();
var ajax=new Ajax.Updater("praise_item_"+val,"/xml/feedback.php",{parameters:uri,onFailure:reportError,onSuccess:function(){
$("praise_feedback").innerHTML="Saved. Thanks!";
}});
return false;
};
function recArt(id,val){
var _7d7="rec_"+id;
var uri=$H({a:id,v:val}).toQueryString();
var ajax=new Ajax.Updater({success:_7d7},"/xml/feedback.php",{parameters:uri,onFailure:reportError});
return false;
};
function selectTab(_7da,_7db,_7dc){
var _7dd,_7de;
for(var i=0;i<_7dc;i++){
_7dd=$("tab_"+_7da+"_"+i);
_7de=$("tabcontent_"+_7da+"_"+i);
if(!_7dd||!_7de){
alert("Cannot locate element: baseid="+_7da+" index="+_7db+" tabcount="+_7dc);
}
if(i==_7db){
Element.addClassName(_7dd,"selected");
Element.addClassName(_7de,"selected");
}else{
Element.removeClassName(_7dd,"selected");
Element.removeClassName(_7de,"selected");
}
}
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,-1,categorySearchCallback);
};
function categoryFanMy(){
categoryFanBulkJoin("my_category_fans",false,true);
$("category_fan_search").innerHTML="";
$("category_fan_search_text").value="";
return false;
};
function categoryFanCountChecked(){
var _7e0=document.getElementsByClassName("jc");
var _7e1=0;
for(var j=0;j<_7e0.length;j++){
if(_7e0[j].checked){
_7e1++;
}
}
return _7e1;
};
function categoryFanBulkJoin(id,_7e4,_7e5,_7e6,_7e7){
var _7e8=document.getElementsByClassName("jc");
var cids=Array();
var _7ea=Array();
var i=0;
var k=0;
for(var j=0;j<_7e8.length;j++){
if(_7e8[j].checked){
cids[i++]=Number(_7e8[j].name.substr(3));
}else{
if(!_7e6){
_7ea[k++]=Number(_7e8[j].name.substr(3));
}
}
}
checked_ids=cids.join(",");
unchecked_ids=_7ea.join(",");
if(_7e6){
var ajax=new Ajax.Request("/xml/categoryFanBulkJoin.php",{parameters:$H({checked_ids:checked_ids,unchecked_ids:unchecked_ids,html_target:id}).toQueryString(),onSuccess:function(req){
if(_7e7){
_7e7(req);
}
}});
}else{
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(req){
if(_7e4){
window.location.replace("/contacts/newuser.php");
return;
}else{
if(_7e5){
setTimeout(categoryFanHighlight,500);
}
}
if(_7e7){
_7e7(req);
}
}});
}
return false;
};
function categoryFanHighlight(){
var elts=$$(".highlighted");
elts.each(function(elt){
var _7f3=new fx.Color(elt,{duration:700,fromColor:"#feffd7",toColor:"#ffffff"});
_7f3.toggle();
});
};
function categoryFanSearch(_7f4,_7f5,_7f6,cols,_7f8){
if(!_7f6){
var _7f6=8;
}
if(!cols){
var cols=2;
}
var _7f9=$F(_7f5);
if(_7f9.strip()==""){
return;
}
var ajax=new Ajax.Updater({success:_7f4},"/xml/categoryFanSearch.php",{parameters:$H({search:_7f9,limit:_7f6,cols:cols}),onComplete:function(){
if(_7f8){
_7f8();
}
}});
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 showAskSignup(_7ff){
var uri=$H({btn_text:"ask!",explain:_7ff,show_signup:1}).toQueryString();
showAjaxOverlay("/xml/showsignup.php",uri,"linkarticle");
return false;
};
function showLinkArticle(url,_802){
var uri=$H({page_url:url,page_title:_802}).toQueryString();
showAjaxOverlay("/xml/linkarticle.php",uri,"linkarticle");
return false;
};
function showFlagHub(id){
var uri=$H({}).toQueryString();
showAjaxOverlay("/xml/flaghubrender.php?a="+id,uri,"flaghub");
return false;
};
function showFlagRequest(id){
var uri=$H({}).toQueryString();
showAjaxOverlay("/xml/flagrequest.php?r="+id,uri,"flagrequest");
return false;
};
function showFlagProfile(id){
var uri=$H({}).toQueryString();
showAjaxOverlay("/xml/flagprofile.php?u="+id,uri,"flagrequest");
return false;
};
function showEmailForm(purl,_80b,_80c){
var uri=$H({page_url:purl,page_type:_80b,page_filter:_80c}).toQueryString();
showAjaxOverlay("/xml/emailpage.php",uri,"emailhub");
return false;
};
function showHubOverlay(url,_80f,_810){
var uri=$H({url:url,addComment:_80f,commentText:_810}).toQueryString();
showAjaxOverlay("/xml/articlerender.php",uri,"hubpage");
return false;
};
function showAjaxOverlay(_812,_813,_814){
if(!$("overlay")){
var pole=new Insertion.Before("footer","<div id=\"overlay\" class=\"overlay\" style=\"display:none\"><a id=\"overlay_close\" href=\"#\" onclick=\"return closeAjaxOverlay();\"/>close</a><div id=\"overlay_content\"><div class=\"spinner\"></div></div></div>");
}
if(_814){
$("overlay").addClassName(_814);
}
toggleOverlay("overlay");
var ajax=new Ajax.Updater({success:"overlay_content"},_812,{parameters:_813,onComplete:function(){
if(!$("fixed_title")){
return;
}
var _817=$("fixed_title").getHeight();
if(browser!="IE"||version>6){
$("overlay").setStyle({paddingTop:_817+"px"});
}
adjustOverlayHeight();
}.bind(this),onFailure:reportError,evalScripts:true});
};
function closeAjaxOverlay(){
toggleOverlay("overlay");
$("overlay").className="overlay";
$("overlay_content").innerHTML="<div class=\"spinner\"></div>";
return false;
};
function adjustOverlayHeight(){
var _818=browser=="IE"&&version<=6;
var _819=$("overlay");
var _81a=Position.getViewportHeight();
if(_81a>750){
var _81b=_81a-150;
}else{
var _81b=_81a-90;
}
var _81c=_819.getStyle("paddingTop");
var _81d=_819.getStyle("paddingBottom");
_81b-=_81c.substring(0,_81c.length-2);
_81b-=_81d.substring(0,_81d.length-2);
_81b=Math.max(_81b,100);
$("overlay").setStyle({height:_81b+"px"});
if(_81a>750){
$("overlay").setStyle({top:"75px"});
if($("fixed_title")&&!_818){
$("fixed_title").setStyle({top:"75px"});
}
}else{
$("overlay").setStyle({top:"45px"});
if($("fixed_title")&&!_818){
$("fixed_title").setStyle({top:"45px"});
}
}
if($("scrollable_content")){
var _81e=$("overlay").getHeight()-$("fixed_title").getHeight()-10;
$("scrollable_content").setStyle({height:_81e+"px"});
$("overlay_content").setStyle({overflowY:"visible"});
}else{
$("overlay_content").setStyle({height:(_81b-60)+"px",overflowY:"auto"});
}
};
function expandComments(id,mm,flg){
if(flg){
var _822=$H({mdc_id:id,modMode:mm}).toQueryString();
var ajax=new Ajax.Updater({success:"comment_tgt"},"/xml/comments.php",{parameters:_822,onFailure:reportError});
}else{
$("comment_tgt").innerHTML="";
}
return false;
};
function activity_why(id,_825,_826,_827){
var ajax=new Ajax.Updater({success:id},"/xml/activity_why.php",{parameters:$H({actionTypeId:_825,actionTargetId:_826,createDate:_827}).toQueryString(),onFailure:reportError,onComplete:function(){
if(typeof canvas!="undefined"&&canvas.redraw){
canvas.redraw();
}
}});
return false;
};
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 ellipse(str,_82d){
if(str.length>_82d&&_82d!=0){
str=str.substr(0,_82d-3);
var pos=str.lastIndexOf(" ");
if(pos===-1){
str=str.substr(0,_82d-3)+"...";
}else{
str=str.substr(0,pos)+"...";
}
}
return str;
};
function loadRandomArt(_82f,_830){
var ajax=new Ajax.Request("/xml/random.php",{method:"post",parameters:"score="+_830,onFailure:reportError,onComplete:function(req){
_82f.location.href=req.responseText;
}});
};
function toggleCommentEdit(_833,_834){
if(_834){
$("cedit_"+_833).style.display="none";
$("cbox_"+_833).style.display="";
$("ctext_"+_833).style.display="none";
}else{
$("cedit_"+_833).style.display="";
$("cbox_"+_833).style.display="none";
$("ctext_"+_833).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 _836=req.getAllResponseHeaders();
var ajax=new Ajax.Request("/xml/reporterror.php",{parameters:_836+"&error=1"});
};
function addTagEntries(){
var _838=4;
var _839=document.createElement("div");
_839.id="moreEntryDiv";
var li=null;
var _83b=4+1;
var _83c=_83b+_838;
for(var i=_83b;i<_83c;i++){
li=document.createElement("li");
_839.appendChild(li);
var _83e=document.createElement("input");
_83e.className="tagEntry";
_83e.name="tag_"+i;
_83e.type="text";
_83e.size=40;
li.appendChild(_83e);
}
$("tagEntries").appendChild(_839);
return true;
};
function hubtool_add_tag(_83f){
var _840=(_83f)?$(_83f):$("add_tag_input");
if(!_840){
return;
}
var tag;
if(Field.present(_840)&&_840.type){
tag=$F(_840);
Field.clear(_840);
}else{
if(_840.innerHTML){
tag=_840.innerHTML;
Element.remove(Element.findElement(_840,"li"));
}
}
if(!tag){
return;
}
var _842=0;
var _843=/^tag_(\d+)$/i;
var _844=document.getElementsByClassName("tagEntry");
_844.each(function(ele){
if(ele.id){
var ms=_843.exec(ele.id);
if(ms&&ms.length>0){
var id=parseInt(ms[1],10);
if($F(ele).length&&id>_842){
_842=id;
}
}
}
});
_842++;
var _848="tag_"+_842;
var _849=$("add_tag_input").parentNode;
var _84a="<input class=\"tagEntry\" id=\""+_848+"\" name=\""+_848+"\" value=\""+tag+"\" size=\"30\" onFocus=\"_helpOn('help__tags')\" onBlur=\"_helpOff('help__tags')\" />";
if($(_848)){
var _84b=$(_848).tabIndex;
Element.update($(_848).parentNode,_84a);
$(_848).tabIndex=_84b;
}else{
var _84c=$("tag_1").tabIndex-1;
var _84b=_84c+_842;
var pole=new Insertion.Before(_849,"<li>"+_84a+"</li>");
$(_848).tabIndex=_84b;
_84b=$("add_tag_input").tabIndex;
_84b++;
$("add_tag_input").tabIndex=_84b;
}
return false;
};
function add_calculated_tag(_84e,tag,_850){
var _851=tag.replace(/'/g,"\\'");
var _852=tag.replace(/ /g,"+");
var _853="tagd_"+tag.replace(/ /g,"_");
_853=_853.toLowerCase();
if($(_853)){
$(_853).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 _854=$("nav_tags_edit");
var _855="<a href=\"javascript:void delete_tag('"+_84e+"','"+_851+"');\"><img src=\"http://x.hubpages.com/x/hubtool_discard_tag.gif\" width=\"14\" height=\"14\"/></a>";
_855+="<a id=\""+_853+"\" href=\"/tag/"+_852+"\">"+tag+"</a>";
var item=document.createElement("li");
item.innerHTML=_855;
_854.appendChild(item);
save_tag(_84e,tag,false);
}
}
var _857=$(_850);
Element.remove(Element.findElement(_857,"li"));
return false;
};
function update_suggested_tags(_858){
var _859=$H({id:_858});
var ajax=new Ajax.Updater({success:"suggested_tags"},"/xml/suggestedtags.php",{parameters:_859,onFailure:reportError,onComplete:function(){
}});
};
function add_tag(_85b){
if(!$("add_tag_input")||!$F("add_tag_input")){
return;
}
var tag=$F("add_tag_input");
var _85d=tag.replace(/'/g,"\\'");
var _85e=tag.replace(/ /g,"+");
var _85f="tagd_"+tag.replace(/ /g,"_");
_85f=_85f.toLowerCase();
if($(_85f)){
$(_85f).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 _860=$("nav_tags_edit");
var _861="<a href=\"javascript:void delete_tag('"+_85b+"','"+_85d+"');\"><img src=\"http://x.hubpages.com/x/hubtool_discard_tag.gif\" width=\"14\" height=\"14\"/></a>";
_861+="<a id=\""+_85f+"\" href=\"/tag/"+_85e+"\">"+tag+"</a>";
var item=document.createElement("li");
item.innerHTML=_861;
_860.appendChild(item);
save_tag(_85b,tag,false);
Field.clear("add_tag_input");
}
}
return false;
};
function delete_tag(_863,tag){
if(!_863||!tag){
return;
}
var _865="tagd_"+tag.replace(/ /g,"_");
var _866=$(_865);
if(!_866){
return;
}
var li=_866.parentNode;
Element.remove(li);
save_tag(_863,tag,true);
return false;
};
function save_tag(_868,tag,del){
var _86b=(del)?1:0;
var req={a:_868,v:tag,d:_86b};
var _86d=$H(req).toQueryString();
var ajax=new Ajax.Request("/xml/tagadd.php",{parameters:_86d,onFailure:reportError,onComplete:function(){
}});
};
function handleReturnKeyPress(_86f,func){
_86f=_86f||window.event;
if(_86f.keyCode==Event.KEY_RETURN){
Event.stop(_86f);
func();
return false;
}else{
return true;
}
};
function fireOnReturn(_871,func){
Event.observe(_871,"keyup",function(_873){
_873=_873||window.event;
if(_873.which){
if(_873.which==Event.KEY_RETURN){
_873.preventDefault();
func();
}
}else{
if(_873.keyCode){
if(_873.keyCode==Event.KEY_RETURN){
Event.stop(_873);
func();
}
}
}
},false);
};
function InlineEdit(){
};
InlineEdit._registered=[];
InlineEdit._onedit=[];
InlineEdit._ondone=[];
InlineEdit._editting=[];
InlineEdit._setonclick=false;
InlineEdit.register=function(ele,_875){
var obj=$(ele);
obj.title="Click to edit";
obj.style.backgroundColor="#ffe";
obj.empty_text="";
InlineEdit._registered[obj.id]=_875;
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,_87a,_87b){
var obj=$(ele);
InlineEdit._onedit[obj.id]=_87a;
InlineEdit._ondone[obj.id]=_87b;
};
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 _880=InlineEdit._onedit[ele.id];
_880(ele);
}
var text=ele.innerHTML;
if(ele.empty_text&&ele.empty_text==text){
text=" ";
}
var _882=document.createElement("INPUT");
_882.type="text";
Element.cloneStyles(ele,_882);
ele.parentNode.insertBefore(_882,ele);
InlineEdit._insertEditSpanBefore(ele);
_882.id=ele.id+"_edit_inplace";
InlineEdit._editting[_882.id]=ele;
Element.remove(ele);
_882.value=text;
_882.focus();
_882.select();
return false;
};
InlineEdit._onButtonClick=function(_883){
_883=_883||window.event;
var _884=_883.target||_883.srcElement;
var _885=(_884.innerHTML.search(/CANCEL/)==-1)?true:false;
var _886=_884.parentNode;
var _887=_886;
while(_887&&!InlineEdit._editting[_887.id]){
_887=_887.previousSibling;
}
var _888=InlineEdit._editting[_887.id];
_887.hasFocus=false;
var z=_887.parentNode;
z.insertBefore(_888,_887);
z.removeChild(_887);
z.removeChild(document.getElementsByClassName("buttonSpan",z)[0]);
delete InlineEdit._editting[_887.id];
if(InlineEdit._ondone[_888.id]){
var _88a=InlineEdit._ondone[_888.id];
_88a(_888);
}
if(_885){
_888.innerHTML=(_887.value.length>0)?_887.value:"&nbsp;";
var _88b=InlineEdit._registered[_888.id];
_88b(_887.value);
}
};
InlineEdit._insertEditSpanBefore=function(obj){
if(document.getElementById&&document.createElement){
var _88d=document.createElement("span");
_88d.className="buttonSpan";
var butt=document.createElement("button");
var _88f=document.createTextNode("OK");
butt.appendChild(_88f);
_88d.appendChild(butt);
var _890=document.createElement("button");
var _891=document.createTextNode("CANCEL");
_890.appendChild(_891);
_88d.appendChild(_890);
obj.parentNode.insertBefore(_88d,obj);
butt.onclick=InlineEdit._onButtonClick;
_890.onclick=InlineEdit._onButtonClick;
}
};
var SampleDuration=Class.create();
SampleDuration.prototype={initialize:function(_892){
this.art_id=_892;
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 _894=$H({art_id:this.art_id,dur:this.t.length});
var ajax=new Ajax.Request("/xml/duration",{parameters:_894.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 _897=insideHubEditor?200:0;
div.style.top=(Position.getViewportScrollY()+_897)+"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 _899=insideHubEditor?$("ajaxing_big"):$("ajaxing");
if(_899){
this.shouldShowIcon=false;
_899.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 _89b=insideHubEditor?$("ajaxing_big"):$("ajaxing");
_89b.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,_89d){
ele=$(ele);
if(window.ActiveXObject){
ele.style.filter="alpha(opacity="+Math.round(_89d*100)+")";
}
ele.style.opacity=_89d;
};
Element.getCurrentStyle=function(ele){
ele=$(ele);
var _89f;
if(document.defaultView){
_89f=document.defaultView.getComputedStyle(ele,"");
}else{
_89f=ele.currentStyle;
}
return _89f;
};
Element.cloneStyles=function(ele,_8a1,_8a2){
ele=$(ele);
_8a1=$(_8a1);
var _8a3=Element.getCurrentStyle(ele);
for(var name in _8a3){
if(browser=="Opera"){
if(name=="height"||name=="pixelHeight"||name=="pixelWidth"||name=="posHeight"||name=="posWidth"||name=="width"||name=="font"||name=="fontSize"){
continue;
}
}
var _8a5=_8a3[name];
if(_8a5!==""&&!(_8a5 instanceof Object)&&name!="length"&&name!="parentRule"){
if(_8a2&&name.indexOf(_8a2)!==0){
continue;
}
_8a1.style[name]=_8a5;
}
}
return _8a1;
};
Element.findElement=function(_8a6,_8a7){
_8a6=$(_8a6);
while(_8a6.parentNode&&(!_8a6.tagName||(_8a6.tagName.toUpperCase()!=_8a7.toUpperCase()))){
_8a6=_8a6.parentNode;
}
return _8a6;
};
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(_8a9){
var res=this;
return res.substring(0,_8a9.length)==_8a9;
};
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 _8af=p.innerHTML;
if(_8af.length>len){
_8af=_8af.substring(0,len);
_8af=_8af.replace(/\w+$/,"");
_8af+="...";
p.innerHTML=_8af;
}
}
};
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 _8b0=0;
if(document.documentElement&&document.documentElement.scrollLeft){
_8b0=document.documentElement.scrollLeft;
}else{
if(document.body&&document.body.scrollLeft){
_8b0=document.body.scrollLeft;
}else{
if(window.pageXOffset){
_8b0=window.pageXOffset;
}else{
if(window.scrollX){
_8b0=window.scrollX;
}
}
}
}
return _8b0;
};
Position.getViewportScrollY=function(){
var _8b1=0;
if(document.documentElement&&document.documentElement.scrollTop){
_8b1=document.documentElement.scrollTop;
}else{
if(document.body&&document.body.scrollTop){
_8b1=document.body.scrollTop;
}else{
if(window.pageYOffset){
_8b1=window.pageYOffset;
}else{
if(window.scrollY){
_8b1=window.scrollY;
}
}
}
}
return _8b1;
};
Position.withinViewport=function(ele){
var off=Position.cumulativeOffset($(ele));
var _8b4=[0+Position.getViewportScrollX(),Position.getViewportScrollY()];
var _8b5=[_8b4[0]+Position.getViewportWidth(),_8b4[1]+Position.getViewportHeight()];
return (_8b4[0]<off[0]&&off[0]<_8b5[0]&&_8b4[1]<off[1]&&off[1]<_8b5[1]);
};
Position.set=function(ele,_8b7){
if(ele&&_8b7){
ele.style.left=_8b7[0]+"px";
ele.style.top=_8b7[1]+"px";
}
};
function check_signed_in_ajax(_8b8,_8b9){
jQuery.ajax({url:"/xml/checksignedin.php",complete:function(_8ba,_8bb){
_8b8(eval(_8ba.responseText),_8b9);
}});
};
function select_all(name,_8bd,end){
for(var i=_8bd;i<=end;i++){
var ele=$(name+"_"+i);
if(ele){
ele.checked=true;
}
}
var disp=$(name+"_selected");
if(disp){
disp.innerHTML=(end-_8bd)+1;
}
update_plural(name);
};
function unselect_all(name,_8c3,end){
for(var i=_8c3;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(_8cf,name,_8d1,end){
var _8d3=self.opener.document.getElementById(_8cf);
if(_8d3){
for(var i=_8d1;i<=end;i++){
var ele=$(name+"_"+i);
if(ele&&ele.checked){
var _8d6=$(name+"_email_"+i);
if(_8d3.value.length<2||_8d3.value.charAt(_8d3.value.length)==","||_8d3.value.charAt(_8d3.value.length-1)==","){
_8d3.value=_8d3.value+_8d6.innerHTML;
}else{
_8d3.value=_8d3.value+", "+_8d6.innerHTML;
}
}
}
}else{
alert("cannot locate parent (opener) window!");
}
};
function charCounter(_8d7,_8d8,max){
var _8da=document.getElementById(_8d7);
var _8db=document.getElementById(_8d8);
if(!_8da){
alert("charCounter bad source: "+_8d7);
}
if(!_8db){
alert("charCounter bad source: "+_8d8);
}
if(_8da.value.length>max){
_8da.value=_8da.value.substring(0,max);
}
_8db.value=max-_8da.value.length;
};
function hideAnswers(){
$("hiddenAnswers").hide();
$("hideAnswers").hide();
$("showAnswers").show();
return false;
};
function showAnswers(){
$("hiddenAnswers").show();
$("hideAnswers").show();
$("showAnswers").hide();
return false;
};
function fetchAnswers(_8dc,_8dd,_8de){
var _8df=$H({answerIds:_8dc,enableVoting:_8dd,enableEditing:_8de}).toQueryString();
new Ajax.Updater("hiddenAnswers","/xml/answerfetch.php",{parameters:_8df});
$("hideAnswers").show();
$("fetchAnswers").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 whenSignedIn(_8e4,fn){
args=Array.prototype.slice.call(arguments);
args=args.slice(2);
info={options:_8e4,fn:fn,args:args};
check_signed_in_ajax(whenSignedInCallback,info);
return false;
};
function whenSignedInCallback(_8e6,info){
if(_8e6){
info.fn.apply(null,info.args);
}else{
if(jQuery("#signInOverlay").size()==0){
var html="<div id=\"signInOverlay\" class=\"overlay\" style=\"display: none;\">";
html+="<a class=\"close\" href=\"#\" onclick=\"toggleOverlay('signInOverlay'); return false;\">close</a>";
html+="<div id=\"signInOverlayContent\"></div>";
html+="</div>";
jQuery("body").append(html);
}
jQuery.get("/xml/signinupform.php",info.options,function(data){
jQuery("#signInOverlayContent").html(data);
suFH.onSuccess=afterSignedIn.bind(null,info);
siFH.onSuccess=afterSignedIn.bind(null,info);
fetchRecaptcha("captcha_div");
toggleOverlay("signInOverlay");
});
}
return false;
};
function afterSignedIn(info){
toggleOverlay("signInOverlay");
info.fn.apply(null,info.args);
};
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(_90f,_910,_911){
if($(_910).hasClassName("dimmed")){
$(_911).update(_90f);
}else{
if($(_910).value.length>_90f){
$(_910).value=$(_910).value.substring(0,_90f);
}
$(_911).update(_90f-$(_910).value.length);
}
};
function checkCharCount(_912,_913,_914){
updateNumCharCount(_912,_913,_914);
Event.observe(_913,"click",function(){
updateNumCharCount(_912,_913,_914);
});
Event.observe(_913,"keypress",function(evt){
updateNumCharCount(_912,_913,_914);
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($(_913).value.length>=_912){
Event.stop(evt);
return false;
}
}
return true;
});
Event.observe(_913,"keyup",function(){
updateNumCharCount(_912,_913,_914);
});
Event.observe(_913,"keydown",function(){
updateNumCharCount(_912,_913,_914);
});
};
function _drawPointerInd(_916,_917,_918){
if(typeof _918=="undefined"){
_918="ind";
}
var _919="<div id=\""+_918+"\"><div>"+_917+"</div></div>";
var pole=new Insertion.Bottom(_916,_919);
if(!window.ActiveXObject){
$(_918).style.position="fixed";
}
setTimeout(function(){
if($(_918)){
Element.remove(_918);
}
},3500);
};
function getElementScreenTop(){
var _91b=(window.pageYOffset)?window.pageYOffset:(document.documentElement)?document.documentElement.scrollTop:document.body.scrollTop;
return _91b;
};
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(_91e){
var _91f=getElementScreenTop();
var top=getElementTop(_91e);
if(top<_91f){
setElementScreenTop(top);
}
};
function getElementDimensions(elem){
var top=0,left=0,_924=elem.getWidth(),_925=elem.getHeight();
do{
top+=elem.offsetTop;
left+=elem.offsetLeft;
elem=elem.offsetParent;
}while(elem!=null);
return {top:top,left:left,right:left+_924,bottom:top+_925};
};
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(_92d){
this.buffer.push(_92d);
return this;
};
StringBuffer.prototype.toString=function toString(){
return this.buffer.join("");
};
function dump_divs(){
var _92e="DIV REPORT:<br/>";
var divs=$A(document.getElementsByTagName("div"));
divs.each(function(div){
if(div.id){
_92e+="#"+div.id+", ";
}
_92e+="."+div.className+", "+div.offsetWidth+" x "+div.offsetHeight+"<br/>";
});
if(!$("debug_div")){
out("create");
}
$("debug_div").innerHTML=_92e;
};
function out(_931){
if(window.console){
console.log(_931);
}else{
var pole;
var _933="<div id=\"debug_div\"></div>";
if(!$("debug_div")){
if($("footer")){
pole=new Insertion.Bottom("footer",_933);
}else{
if($("sidebar")){
pole=new Insertion.Bottom("sidebar",_933);
}
}
}
if($("debug_div")){
pole=new Insertion.Bottom("debug_div",_931+"<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(_935){
this.submitMode=false;
this.submitUri="/";
this.nextUri="/";
this.lit=false;
this.form=$(_935);
this.errors=$H({});
this.method="post";
this.errorId="formErrors";
this.errorHeader="<strong>Please fix these errors before continuing:</strong><br/>";
this.useEffects=true;
this.ensureSignedInBeforeSave=false;
this.ensureSignedInOptions={};
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.validateEnoughSpaces=function(ele,msg){
val=$F(ele).trim();
var _950=false;
if(val.length>=20){
var _951=val.match(/\s+/g);
var _952=_951?_951.length:0;
var _953=_952+1;
_950=_953/(val.length-_952)<0.08;
}
this.testForError(_950,ele,msg);
};
hpFormHandler.prototype.validateIsNumeric=function(ele,msg){
this.validateRegex(ele,/^\s*[0-9]*\s*$/,msg);
};
hpFormHandler.prototype.validateRegex=function(ele,_957,msg){
var val=$F(ele);
this.testForError((val.length!=0&&val.search(_957)==-1),ele,msg);
};
hpFormHandler.prototype.validateNoRegex=function(ele,_95b,msg){
var val=$F(ele);
this.testForError((val.search(_95b)!=-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.validateNoWords=function(ele,_968,msg){
var val=$F(ele);
var _96b=false;
for(i=0;i<_968.length&&!_96b;i++){
var _96c=new RegExp("[^a-zA-Z]"+_968[i]+"[^a-zA-Z]","i");
_96b=(val.search(_96c)>=0);
if(!_96b){
_96c=new RegExp("^"+_968[i]+"[^a-zA-Z]","i");
_96b=(val.search(_96c)>=0);
}
if(!_96b){
_96c=new RegExp("[^a-zA-Z]"+_968[i]+"$","i");
_96b=(val.search(_96c)>=0);
}
if(!_96b){
_96c=new RegExp("^"+_968[i]+"$","i");
_96b=(val.search(_96c)>=0);
}
}
this.testForError(_96b,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 _971=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("There was an error performing server side validation of your input, proceed with caution.");
},onFailure:reportError});
};
hpFormHandler.prototype.validateEmailList=function(ele){
var _974=800;
var _975=6;
this.validateLengthMin(ele,_975,"The address you entered is too short. Please use an address at least "+_975+" 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 _977=200;
this.validateLengthMax(ele,_977,"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 _979=2;
var _97a=200;
this.validateLengthMin(ele,_979,"Your name is too short.  Please enter at least 2 characters.");
this.validateLengthMax(ele,_97a,"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 _980=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))){
_980=true;
}
this.testForError(!_980,ele,"Please enter a valid postal code");
};
hpFormHandler.prototype.validateNewPassword=function(ele1,ele2){
ele1=$(ele1);
ele2=$(ele2);
var _986=40;
var _987=5;
this.validateMandatory(ele1,"Please protect your hubpages account with a password.");
this.validateLengthMin(ele1,_987,"Your password is too short.  Protect your account by choosing a password that is at least  "+_987+" characters long.  Safety first!");
this.validateLengthMax(ele1,_986,"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 _989=60;
var _98a=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,_989,"A tag should not be longer than 60 characters.");
};
hpFormHandler.prototype.validateGroupName=function(ele,_98c){
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=_98c.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 _98f=$A($(form).getElementsByTagName("input"));
_98f.each(function(node){
Event.observe(node,"keydown",_handleInputKeypress,false);
});
};
hpFormHandler.prototype.ghostField=function(_991,_992,_993){
if($(_991)&&$(_992)){
var gw=new GhostWatcher(_991,_992,_993);
}
};
hpFormHandler.prototype.setValidators=function(_995,_996){
this.toValidate=$H(_995);
this.toValidateOnsubmit=$H(_996);
};
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(_997){
if(this.ensureSignedInBeforeSave&&!_997){
whenSignedIn(this.ensureSignedInOptions,this.save.bind(this,true));
return false;
}
this.form.descendants().each(function(elt){
if(elt&&elt.tagName&&elt.hasClassName&&(elt.tagName=="TEXTAREA"||elt.tagName=="INPUT")&&elt.hasClassName("dimmed")){
elt.value="";
}
});
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 _999=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(_99b,ele,msg){
if(_99b){
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(_9a0){
var _9a1=Form.getElements(this.form);
var _9a2=$A(_9a1);
_9a2.each(function(node){
if(_9a0){
var _9a4=this.toValidateOnsubmit[node.id];
if(!_9a4){
_9a4=this.toValidateOnsubmit[node.className];
}
if(_9a4){
_9a4(node);
}
}
var _9a4=this.toValidate[node.id];
if(!_9a4){
_9a4=this.toValidate[node.className];
}
if(_9a4){
_9a4(node);
}
}.bind(this));
this._showErrors();
return !this.hasErrors();
};
hpFormHandler.prototype._showErrors=function(){
if(!this.errorDiv&&!$(this.errorId)){
new Insertion.Top(this.form,"<div id=\""+this.errorId+"\"></div>");
}
if(!this.errorDiv){
this.errorDiv=$(this.errorId);
}
if(this.useEffects&&!this.errFade){
this.errFade=new fx.Opacity(this.errorDiv,{duration:500});
this.errFade.now=0;
}
if(!this.hasErrors()){
if(this.lit){
if(this.useEffects){
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 _9a7=this.errorHeader;
_9a7+="<ul>";
this.errors.each(function(err){
_9a7+="<li>"+err.value+"</li>";
var ele=$(err.key);
hpFormHandler.lightEle(ele,true);
});
_9a7+="</ul>";
this.errorDiv.className="alert";
if(!this.lit){
if(this.useEffects){
Element.setOpacity(this.errorDiv,0);
this.errFade.toggle();
}
}
this.errorDiv.innerHTML=_9a7;
this.lit=true;
};
function _handleInputKeypress(_9aa){
_9aa=_9aa||window.event;
if(_9aa.which){
if(_9aa.which==Event.KEY_RETURN){
var _9ab=document.createEvent("KeyboardEvent");
_9ab.initKeyEvent("keydown",true,true,document.defaultView,_9aa.ctrlKey,_9aa.altKey,_9aa.shiftKey,_9aa.metaKey,Event.KEY_TAB,0);
_9aa.preventDefault();
_9aa.target.dispatchEvent(_9ab);
}
}else{
if(_9aa.keyCode){
if(_9aa.keyCode==Event.KEY_RETURN){
_9aa.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(_9ae,_9af,_9b0){
this.fromEle=$(_9ae);
this.toEle=$(_9af);
this.copyFunction=(_9b0!=null)?_9b0: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 makeGrowable(id,_9b4,_9b5,_9b6){
var elt=$(id);
if(!elt){
return;
}
elt.observe("keyup",function(){
var rows=Math.ceil($F(elt).length/_9b4)+1;
var _9b9=rows*_9b5;
_9b9=Math.max(_9b9,_9b6);
elt.setStyle({height:_9b9+"px"});
});
};
function makeExpandable(id,_9bb,_9bc,_9bd){
var elt=$(id);
if(!elt){
return;
}
elt.addClassName("expandable_text");
elt.addClassName("dimmed");
elt.value=_9bb;
var _9bf=elt.up("div");
elt.observe("focus",function(){
_9bf.addClassName("expanded");
if(elt.value==_9bb){
elt.removeClassName("dimmed");
elt.value="";
}
if(_9bc){
_9bc();
}
});
elt.observe("blur",function(){
setTimeout(function(elt,_9c1,_9c2,_9c3){
if(!_9c3){
_9c1.removeClassName("expanded");
elt.setStyle({height:""});
}
if(elt.value==""){
elt.addClassName("dimmed");
elt.value=_9c2;
}
}.bind(this,elt,_9bf,_9bb,_9bd),250);
});
};
var ImageViewerControl=Class.create();
ImageViewerControl.prototype={initialize:function(_9c4,_9c5,_9c6,_9c7){
this.modId=_9c4;
this.floatStatus=_9c5;
this.displayStatus=_9c6;
this.popupFlg=_9c7;
this.photoData=new Object();
this.photoOrder=new Array();
this.viewer_id=null;
this.timer=null;
this.slide_idx=-1;
this.displaySlideshowLinks=false;
this.excludeImageIdsFromSlideshow=$A(new Array());
this.resources={ht_viewer_sect:"image_viewer_"+this.modId,ht_inline_sect:"image_inline_"+this.modId,ht_slideshow_sect:"image_slideshow_"+this.modId,ht_thumbnail_sect:"image_thumbnail_"+this.modId,inline_images:"imgs_"+this.modId,viewer_display:"slide_display_"+this.modId,viewer_photo:"slide_img_"+this.modId,viewer_caption:"slide_desc_"+this.modId,thumb_tn_section:"slide_tn_section_"+this.modId,slide_play_btn:"play_"+this.modId,slide_pause_btn:"pause_"+this.modId};
},setMaxHeight:function(_9c8){
this.firstTimeLoadingImage=true;
this.maxHeight=_9c8;
},addPhoto:function(rec){
this.photoData[rec.id]=rec;
this.photoOrder.push(rec.id);
},clear:function(){
delete this.photoData;
this.photoData=new Object();
this.photoOrder.clear();
},render:function(){
switch(this.displayStatus){
case "No Border":
case "With Border":
this.renderInlineImages();
break;
case "Thumbnail":
this.renderThumbnails();
break;
case "Slideshow":
this.viewer_id=-1;
this.nextSlide(true);
break;
}
},toggleViewer:function(){
switch(this.displayStatus){
case "No Border":
case "With Border":
Element.hide(this.resources.ht_viewer_sect);
Element.show(this.resources.ht_inline_sect);
Element.hide(this.resources.ht_thumbnail_sect);
Element.hide(this.resources.ht_slideshow_sect);
break;
case "Thumbnail":
Element.show(this.resources.ht_viewer_sect);
Element.hide(this.resources.ht_inline_sect);
Element.show(this.resources.ht_thumbnail_sect);
Element.hide(this.resources.ht_slideshow_sect);
break;
case "Slideshow":
Element.show(this.resources.ht_viewer_sect);
Element.hide(this.resources.ht_inline_sect);
Element.hide(this.resources.ht_thumbnail_sect);
Element.show(this.resources.ht_slideshow_sect);
break;
}
},loadSlide:function(id){
if(!this.firstTimeLoadingImage&&this.maxHeight){
$(this.resources.viewer_display).style.height=this.maxHeight+"px";
}
this.viewer_id=id;
rec=this.photoData[id];
$(this.resources.viewer_photo).innerHTML=this._getDisplayUrl();
$(this.resources.viewer_caption).innerHTML=rec.caption;
if(this.popupFlg){
this._addpopup(id,$(this.resources.viewer_photo).firstChild);
}
this.firstTimeLoadingImage=false;
},getMaxDisplayHeight:function(){
var top=0;
this.photoOrder.each(function(id){
var hgt=this._getDisplayHeight(id);
top=hgt>top?hgt:top;
}.bind(this));
return top;
},setDisplaySlideshowLinks:function(_9ce){
this.displaySlideshowLinks=_9ce;
},setExcludeImagesFromSlideshow:function(){
this.excludeImageIdsFromSlideshow=$A(arguments);
},_getDisplayUrl:function(){
rec=this.photoData[this.viewer_id];
var _9cf=rec.origWidth>=200&&rec.origHeight>=150;
if(rec.maxSize==2&&this.displayStatus=="With Border"){
return this._createImageTag(rec.urlQuarter,"quarter_frame",rec.esc_cap)+(_9cf&&this.displaySlideshowLinks&&this.excludeImageIdsFromSlideshow.indexOf(this.viewer_id)==-1?getHubSlideshowHtml("quarter",this.displayStatus=="With Border"):"");
}else{
if(rec.maxSize==2){
return this._createImageTag(rec.urlQuarter,"quarter",rec.esc_cap)+(_9cf&&this.displaySlideshowLinks&&this.excludeImageIdsFromSlideshow.indexOf(this.viewer_id)==-1?getHubSlideshowHtml("quarter",this.displayStatus=="With Border"):"");
}else{
if((this.floatStatus=="right"||rec.maxSize==1)&&this.displayStatus=="With Border"){
return this._createImageTag(rec.urlHalfPad,"half_frame",rec.esc_cap)+(_9cf&&this.displaySlideshowLinks&&this.excludeImageIdsFromSlideshow.indexOf(this.viewer_id)==-1?getHubSlideshowHtml("half",this.displayStatus=="With Border"):"");
}else{
if(this.floatStatus=="right"||rec.maxSize==1){
return this._createImageTag(rec.urlHalf,"half",rec.esc_cap)+(_9cf&&this.displaySlideshowLinks?getHubSlideshowHtml("half",this.displayStatus=="With Border"):"");
}else{
if(this.floatStatus=="none"&&this.displayStatus=="With Border"){
return this._createImageTag(rec.urlFullPad,"full_frame",rec.esc_cap)+(_9cf&&this.displaySlideshowLinks&&this.excludeImageIdsFromSlideshow.indexOf(this.viewer_id)==-1?getHubSlideshowHtml("full",this.displayStatus=="With Border"):"");
}else{
if(this.floatStatus=="none"){
return this._createImageTag(rec.urlFull,"full",rec.esc_cap)+(_9cf&&this.displaySlideshowLinks&&this.excludeImageIdsFromSlideshow.indexOf(this.viewer_id)==-1?getHubSlideshowHtml("full",this.displayStatus=="With Border"):"");
}
}
}
}
}
}
},_createImageTag:function(url,_9d1,_9d2){
if(undefined==_9d2){
_9d2="";
}
return "<img class='"+_9d1+"' title='"+_9d2+"' alt='"+_9d2+"' src='"+url+"' />";
},_getDisplayHeight:function(_9d3){
rec=this.photoData[_9d3];
if(rec.maxSize==2){
return rec.ratio*120;
}else{
if((this.floatStatus=="right"||rec.maxSize==1)&&this.displayStatus=="With Border"){
return rec.ratio*248;
}else{
if(this.floatStatus=="right"||rec.maxSize==1){
return rec.ratio*260;
}else{
if(this.floatStatus=="none"&&this.displayStatus=="With Border"){
return rec.ratio*496;
}else{
if(this.floatStatus=="none"){
return rec.ratio*520;
}
}
}
}
}
},_addInlineImage:function(id){
this.viewer_id=id;
var rec=this.photoData[id];
var _9d6=document.createElement("div");
var _9d7=this._getDisplayUrl();
if(this.floatStatus=="none"){
var _9d8="caption_full";
}else{
var _9d8="caption_half";
}
_9d6.id="img_"+rec.id;
_9d6.innerHTML="<div id='img_url_"+rec.id+"'>"+_9d7+"</div>"+"<div class='"+_9d8+"' id='img_desc_"+rec.id+"'>"+rec.caption+"</div>";
$(this.resources.inline_images).appendChild(_9d6);
if(this.popupFlg){
this._addpopup(rec.id,$("img_url_"+rec.id).firstChild);
}
},renderInlineImages:function(){
$(this.resources.inline_images).innerHTML="";
this.photoOrder.each(function(id){
this._addInlineImage(id);
}.bind(this));
},_addThumbnail:function(id){
var rec=this.photoData[id];
var _9dc=document.createElement("img");
_9dc.id="slide_tn_"+rec.id;
_9dc.src=rec.urlThumb;
_9dc.alt=rec.caption;
_9dc.title=rec.caption;
_9dc.onclick=function(){
this.loadSlide(rec.id);
}.bind(this);
$(this.resources.thumb_tn_section).appendChild(_9dc);
},renderThumbnails:function(){
$(this.resources.thumb_tn_section).innerHTML="";
this.photoOrder.each(function(id){
this._addThumbnail(id);
}.bind(this));
if(this.photoOrder.length>0){
$("slide_tn_"+this.photoOrder[0]).onclick();
}
},nextSlide:function(_9de){
if(this.photoOrder.length==0){
return;
}
if(_9de){
this.slide_idx++;
if(this.slide_idx>=this.photoOrder.length){
this.slide_idx=0;
}
}else{
this.slide_idx--;
if(this.slide_idx<0){
this.slide_idx=this.photoOrder.length-1;
}
}
var id=this.photoOrder[this.slide_idx];
this.loadSlide(id);
},startTimer:function(){
this.nextSlide(true);
this.timer=setTimeout(this.startTimer.bind(this),3000);
Element.show($("pause_"+this.modId));
Element.hide($(this.resources.slide_play_btn));
},stopTimer:function(){
clearTimeout(this.timer);
Element.show($(this.resources.slide_play_btn));
Element.hide($(this.resources.slide_pause_btn));
},_addpopup:function(id,img){
img.onclick=function(){
this.popupFullsize(id);
}.bind(this);
img.title="Click to see full-size image.";
img.style.cursor="pointer";
},popupFullsize:function(id){
rec=this.photoData[id];
attrs="width="+rec.origWidth+",height="+rec.origHeight+",resizable=yes,scrollbars=no,toolbar=no,status=no,menubar=no,directories=no,location=no";
window.open(rec.urlOriginal,"",attrs);
}};
var ForumSelector=Class.create();
ForumSelector.prototype={initialize:function(id,_9e4){
this.id=id;
this.userId=_9e4;
this.observeChanges();
},observeChanges:function(){
$(this.id+"_forum_id").observe("change",this.changeForum.bindAsEventListener(this));
$$("."+this.id+"_category_selector").each(function(elt){
elt.observe("change",this.changeCategory.bindAsEventListener(this));
}.bind(this));
},changeForum:function(_9e6){
var elt=Event.findElement(_9e6,"select");
this.chooseForum($F(elt));
},changeCategory:function(_9e8){
var elt=Event.findElement(_9e8,"select");
this.chooseCategory($F(elt));
},chooseForum:function(_9ea){
if(/fave/.test(_9ea)){
var _9eb=_9ea.substring(5);
this.chooseCategory(_9eb);
return;
}
new Ajax.Updater(this.id+"_forum_selector","/xml/forumselector.php",{parameters:$H({forumId:_9ea,id:this.id,userId:this.userId}).toQueryString(),onComplete:this.observeChanges.bind(this)});
},chooseCategory:function(_9ec){
new Ajax.Updater(this.id+"_forum_selector","/xml/forumselector.php",{parameters:$H({categoryId:_9ec,id:this.id,userId:this.userId}).toQueryString(),onComplete:this.observeChanges.bind(this)});
}};
var CategorySelector=Class.create();
CategorySelector.prototype={initialize:function(id,_9ee,_9ef,_9f0){
this.id=id;
this.onchange=_9ee;
this.onselect=_9ef;
this.userId=_9f0?_9f0:0;
this.observeChanges();
},observeChanges:function(){
$$("."+this.id+"_category_selector").each(function(elt){
elt.observe("change",this.changeCategory.bindAsEventListener(this));
}.bind(this));
$("startOver"+this.id).observe("click",this.startOver.bind(this));
},changeCategory:function(_9f2){
var elt=Event.findElement(_9f2,"select");
this.chooseCategory($F(elt));
},chooseCategory:function(_9f4,_9f5,_9f6){
new Ajax.Request("/xml/categoryselector.php",{parameters:$H({categoryId:_9f4,userId:this.userId,id:this.id}).toQueryString(),onComplete:function(req){
var data=JSONstring.toObject(req.responseText);
$(this.id+"Wrapper").innerHTML=data["render"];
this.observeChanges();
if($(this.uniqueId+"SearchText")){
$(this.uniqueId+"SearchText").value="";
}
if($(this.uniqueId+"SearchResults")){
$(this.uniqueId+"SearchResults").innerHTML="";
}
this.onchange(data);
if(!_9f5&&_9f6){
this.onselect(_9f6);
}
}.bind(this)});
},getValue:function(){
return $F(this.id+"Id");
},startOver:function(_9f9){
this.chooseCategory(0);
},refresh:function(){
this.chooseCategory(this.getValue());
},search:function(_9fa,_9fb,_9fc){
new Ajax.Updater(_9fb,"/xml/categorysearch.php",{parameters:$H({uniqueId:this.id,searchText:_9fa,numTabs:_9fc}),onFailure:function(){
}});
return false;
}};
function addEvent(_9fd,type,_9ff){
if(!_9ff.$$guid){
_9ff.$$guid=addEvent.guid++;
}
if(!_9fd.events){
_9fd.events={};
}
var _a00=_9fd.events[type];
if(!_a00){
_a00=_9fd.events[type]={};
if(_9fd["on"+type]){
_a00[0]=_9fd["on"+type];
}
}
_a00[_9ff.$$guid]=_9ff;
_9fd["on"+type]=handleEvent;
};
addEvent.guid=1;
function removeEvent(_a01,type,_a03){
if(_a01.events&&_a01.events[type]){
delete _a01.events[type][_a03.$$guid];
}
};
function handleEvent(_a04){
var _a05=true;
_a04=_a04||fixEvent(window.event);
if(_a04==null){
return false;
}
if(this.events==null){
return false;
}
var _a06=this.events[_a04.type];
for(var i in _a06){
this.$$handleEvent=_a06[i];
if(this.$$handleEvent(_a04)===false){
_a05=false;
}
}
return _a05;
};
function fixEvent(_a08){
if(_a08!=null){
_a08.preventDefault=fixEvent.preventDefault;
_a08.stopPropagation=fixEvent.stopPropagation;
}
return _a08;
};
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,_a0c,tag){
var _a0e=new Array();
var els=node.getElementsByTagName(tag);
var _a10=els.length;
var _a11=new RegExp("(^|\\s)"+_a0c+"(\\s|$)");
for(var i=0,j=0;i<_a10;i++){
if(this.elementHasClass(els[i],_a0c)){
_a0e[j]=els[i];
j++;
}
}
return _a0e;
},elementHasClass:function(el,_a15){
if(!el){
return false;
}
var _a16=new RegExp("\\b"+_a15+"\\b");
if(el.className.match(_a16)){
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 _a17=document.getElementsByTagName("table");
for(var i=0;i<_a17.length;i++){
var _a19=_a17[i];
if(css.elementHasClass(_a19,"sortable")){
this.makeSortable(_a19);
}
}
},makeSortable:function(_a1a){
if(!_a1a.id){
_a1a.id="sortableTable"+this.lastAssignedId++;
}
if(!_a1a.tHead||!_a1a.tHead.rows||0==_a1a.tHead.rows.length){
return;
}
var row=_a1a.tHead.rows[_a1a.tHead.rows.length-1];
for(var i=0;i<row.cells.length;i++){
var _a1d=row.cells[i].firstChild;
_a1d.onclick=this.headingClicked;
_a1d.setAttribute("columnId",i);
}
},sortTheTable:function(e){
var that=standardistaTableSorting.that;
var _a20=getEventTarget(e);
var td=_a20.parentNode;
var tr=td.parentNode;
var _a23=tr.parentNode;
var _a24=_a23.parentNode;
if(!_a24.tBodies||_a24.tBodies[0].rows.length<=1){
return false;
}
var _a25=_a20.getAttribute("columnId")||td.cellIndex;
var _a26=css.getElementsByClass(td,"tableSortArrow","span");
var _a27="";
if(_a26.length>0){
_a27=_a26[0].getAttribute("sortOrder");
}
var itm="";
var _a29=0;
while(""==itm&&_a29<_a24.tBodies[0].rows.length){
var elm=_a24.tBodies[0].rows[_a29].cells[_a25];
if(elm.childNodes.length==1){
itm=that.getInnerText(_a24.tBodies[0].rows[_a29].cells[_a25]);
}else{
itm=that.getInnerText(_a24.tBodies[0].rows[_a29].cells[_a25].firstChild);
}
_a29++;
}
var _a2b=that.determineSortFunction(itm);
var _a2c;
if(_a24.id==that.lastSortedTable&&_a25==that.sortColumnIndex){
_a2c=that.newRows;
_a2c.reverse();
}else{
that.sortColumnIndex=_a25;
_a2c=new Array();
for(var j=0;j<_a24.tBodies[0].rows.length;j++){
_a2c[j]=_a24.tBodies[0].rows[j];
}
_a2c.sort(_a2b);
}
that.moveRows(_a24,_a2c);
that.newRows=_a2c;
that.lastSortedTable=_a24.id;
var _a26=css.getElementsByClass(tr,"tableSortArrow","span");
for(var j=0;j<_a26.length;j++){
if(j==_a25){
if(null==_a27||""==_a27||"DESC"==_a27){
_a26[j].innerHTML="▼";
_a26[j].setAttribute("sortOrder","ASC");
}else{
_a26[j].innerHTML="▲";
_a26[j].setAttribute("sortOrder","DESC");
}
}else{
_a26[j].innerHTML="&nbsp;";
}
}
if(Element.hasClassName(_a24.tBodies[0].rows[0],"evenRow")||Element.hasClassName(_a24.tBodies[0].rows[0],"oddRow")){
for(var i=0;i<_a24.tBodies[0].rows.length;i++){
tr=_a24.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 _a37=this.sortCaseInsensitive;
if(itm.match(/^\d\d[\/-]\d\d[\/-]\d\d\d\d$/)){
_a37=this.sortDate;
}
if(itm.match(/^\d\d[\/-]\d\d[\/-]\d\d$/)){
_a37=this.sortDate;
}
if(itm.match(/^[�$]/)){
_a37=this.sortCurrency;
}
if(itm.match(/^\d?\.?\d+$/)){
_a37=this.sortNumeric;
}
if(itm.match(/^[+-]?\d*\.?\d+([eE]-?\d+)?$/)){
_a37=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])$/)){
_a37=this.sortIP;
}
return _a37;
},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 _a4d=a.cells[that.sortColumnIndex];
if(_a4d.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 _a4f=b.cells[that.sortColumnIndex];
if(_a4f.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(_a58,_a59){
for(var i=0;i<_a59.length;i++){
var _a5b=_a59[i];
_a58.tBodies[0].appendChild(_a5b);
}
}};
function standardistaTableSortingInit(){
standardistaTableSorting.init();
};
Event.observe(window,"load",standardistaTableSortingInit);
var PollManager=Class.create();
PollManager.prototype={initialize:function(_a5c,_a5d,_a5e){
this.modId=_a5c;
this.pollId=_a5d;
this.results_div_id=_a5c+"_poll_results";
this.vote_form_id=_a5c+"_vote_form";
this.vote_radio_name=_a5c+"_vote";
this.hubnugget=_a5e;
},seePollVotes:function(){
this.question_HTML=$(this.results_div_id).innerHTML;
var _a5f=$H({id:this.pollId}).toQueryString();
var ajax=new Ajax.Updater({success:this.results_div_id},"/xml/pollvote.php",{parameters:_a5f,onFailure:reportError,onComplete:function(){
}});
},goBackAndVote:function(){
$(this.results_div_id).innerHTML=this.question_HTML;
},voteInPoll:function(){
var vote;
var hn=this.hubnugget?1:0;
var _a63=Form.getInputs(this.vote_form_id,"radio",this.vote_radio_name).find(function(_a64){
return _a64.checked;
});
if(null==_a63){
return;
}else{
vote=_a63.value;
}
var _a65=$H({id:this.pollId,vote:vote,hn:hn}).toQueryString();
var ajax=new Ajax.Updater({success:this.results_div_id},"/xml/pollvote.php",{parameters:_a65,onFailure:reportError,onComplete:function(){
}});
}};
var PollManagerManager=Class.create();
PollManagerManager.prototype={initialize:function(){
this.pollManagers=[];
},add:function(id,pm){
this.pollManagers[id]=pm;
},getById:function(id){
return this.pollManagers[id];
}};
var pmm=new PollManagerManager();
var ContentRotator=Class.create();
ContentRotator.prototype={initialize:function(ids,_a6b,_a6c,_a6d,_a6e,_a6f,_a70,_a71,_a72,loop){
this.ids=ids;
this.prefix=_a6b;
this.interval=_a6c;
this.position=0;
this.paused=false;
this.transitionEffect=_a6d;
this.transitioning=false;
this.activeUpdateThreadId=0;
if(_a6e){
this.playId=_a6e;
}
if(_a6f){
this.pauseId=_a6f;
}
if(_a70){
this.positionIndicatorId=_a70;
}
if(this.interval>0){
setTimeout(this.update.bind(this,this.activeUpdateThreadId),this.interval);
}
if(_a71){
this.prevId=_a71;
}
if(_a72){
this.nextId=_a72;
}
if(loop==undefined||loop){
this.loop=true;
}else{
this.loop=false;
}
},update:function(_a74){
if(this.paused||this.activeUpdateThreadId!=_a74){
return;
}
this.next();
setTimeout(this.update.bind(this,_a74),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(_a75){
var next=this.position<_a75;
newPosition=_a75%this.ids.length;
while(newPosition<0){
newPosition+=this.ids.length;
}
if(this.position==newPosition){
return;
}
if(this.positionIndicatorId){
$(this.positionIndicatorId+"_"+this.position).removeClassName("active");
}
if(this.transitionEffect>0){
if(this.transitioning){
if(next){
setTimeout(this.next.bind(this),400);
}else{
setTimeout(this.previous.bind(this),400);
}
return;
}
this.transitioning=true;
var _a77=new fx.Opacity(this.prefix+this.ids[this.position],{duration:this.transitionEffect});
_a77.toggle();
this.position=newPosition;
var _a78=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});
}
_a78.options.onComplete=this.endTransition.bind(this);
_a78.hide();
_a78.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 FeedManager=Class.create();
FeedManager.prototype={initialize:function(_a79,_a7a,_a7b,_a7c,_a7d){
this.typeId=_a79;
this.categoryId=_a7a;
this.starred=_a7b;
this.standalone=_a7d;
this.updateTime=_a7c;
this.originalUpdateTime=_a7c;
this.currentTime=parseInt(_a7c,10);
this.reportingFeedStoryId=0;
this.hiddenCount=0;
this.handlers=[];
this.feedItems=[];
this.feedItemCollection=[];
if(!this.standalone){
Event.observe(window,"load",function(){
if(browser=="IE"&&version<=6){
$("old_browser").show();
}
this.updateFeedTypeFilters();
$$("#sidebar .cat").each(function(elt){
if(elt.hasClassName("disabled")){
return;
}
elt.observe("mouseover",function(){
elt.addClassName("active_category");
elt.down(".delete_category").show();
});
elt.observe("mouseout",function(){
elt.removeClassName("active_category");
elt.down(".delete_category").hide();
});
});
if(this.starred==0){
this.newStoriesAvailable=0;
this.updaterFibonacciValue=60000;
this.updaterFibonacciValue2=60000;
setTimeout(this.fibonacciUpdate.bind(this),this.updaterFibonacciValue);
}
}.bind(this));
}
setInterval(this.updateTimes.bind(this),60000);
},updateTimes:function(){
this.currentTime+=60;
$$(".timestamp").each(function(elt){
var _a80=0;
elt.classNames().each(function(name){
if(name.substring(0,2)=="t_"){
_a80=parseInt(name.substring(2),10);
throw $break;
}
});
elt.innerHTML=this.getTimeAgo(this.currentTime-_a80);
}.bind(this));
},getTimeAgo:function(_a82){
if(_a82<=1){
return "1 second ago";
}
var _a83=Math.round(_a82/60);
var _a84=Math.round(_a82/3600);
var days=Math.round(_a82/86400);
var _a86=Math.round(_a82/604800);
var _a87=Math.round(_a82/2592000);
var _a88=Math.round(_a82/31536000);
var ret="";
if(_a88>=2){
ret=_a88+" years ago";
}else{
if(_a87>=2){
ret=_a87+" months ago";
}else{
if(_a86>=2){
ret=_a86+" weeks ago";
}else{
if(days>=2){
ret=days+" days ago";
}else{
if(_a84>=2){
ret=_a84+" hours ago";
}else{
if(_a83>=1){
ret=_a83+" minute"+(_a83==1?"":"s")+" ago";
}else{
ret=_a82+" second"+(_a82==1?"":"s")+" ago";
}
}
}
}
}
}
return ret;
},fibonacciUpdate:function(){
var _a8a=this.updaterFibonacciValue+this.updaterFibonacciValue2;
this.updaterFibonacciValue=this.updaterFibonacciValue2;
this.updaterFibonacciValue2=_a8a;
new Ajax.Request("/xml/feedupdate.php",{parameters:$H({render:0,a:this.updateTime,typeId:this.typeId,cId:this.categoryId}).toQueryString(),onComplete:function(req){
var _a8c=parseInt(req.responseText,10);
if(_a8c>0){
this.newStoriesAvailable=_a8c;
this.updateStoriesAvailable();
}
setTimeout(this.fibonacciUpdate.bind(this),this.updaterFibonacciValue);
}.bind(this)});
},updateStoriesAvailable:function(){
if(this.newStoriesAvailable==0){
$("new_stories_available").innerHTML="";
return;
}
var _a8d=this.newStoriesAvailable==1?"y":"ies";
var is=this.newStoriesAvailable==1?"is":"are";
$("new_stories_available").innerHTML="at least "+this.newStoriesAvailable+" new stor"+_a8d+" "+is+" available (click to load)";
},loadNewStories:function(_a8f){
var nt=_a8f?_a8f:0;
$("loading_feed").show();
new Ajax.Request("/xml/feedupdate.php",{parameters:$H({render:1,a:this.updateTime,typeId:this.typeId,cId:this.categoryId,nt:nt}).toQueryString(),onComplete:function(req){
var data=JSONstring.toObject(req.responseText);
this.updateTime=data["utime"];
var _a93=$(document.createElement("div"));
_a93.addClassName("feed_item");
_a93.innerHTML=data["render"];
var _a94=$("feed_box").down(".feed_item",0);
_a94.parentNode.insertBefore(_a93,_a94);
_a93.descendants().each(function(elt){
if(elt.tagName=="SCRIPT"){
eval(elt.innerHTML);
}
});
this.addItems(data["feedData"]);
this.updaterFibonacciValue=30000;
this.updaterFibonacciValue2=30000;
this.newStoriesAvailable=0;
this.updateStoriesAvailable();
$("loading_feed").hide();
}.bind(this)});
return false;
},userFanJoin:function(u){
$("loading_feed").show();
new Ajax.Request("/xml/fan.php",{parameters:"u="+u+"&action=add",onComplete:function(req){
var info=JSONstring.toObject(req.responseText);
$("loading_feed").hide();
var _a99=$(document.createElement("div"));
_a99.addClassName("feed_item");
_a99.innerHTML="<h2 class=\"feed_heading\">You are now following <a href=\""+info["url"]+"\">"+info["username"]+"</a>.</h2>";
var _a9a=$("feed_box").down(".feed_item",0);
_a9a.parentNode.insertBefore(_a99,_a9a);
var li=$("suggested_author_"+u);
var ul=li.up("ul");
li.remove();
if(ul.immediateDescendants().size()==0){
new Ajax.Updater("suggested_author_box","/xml/fan.php",{parameters:"action=suggest&c="+this.categoryId});
}
}.bind(this)});
return false;
},categoryFanJoin:function(){
categoryFanBulkJoin("feed_category_fans",false,false,true,this.categoryFanCallback.bind(this));
$("loading_feed").show();
$("category_fan_search").innerHTML="";
$("category_fan_search_text").value="";
return false;
},categoryFanCallback:function(req){
var info=JSONstring.toObject(req.responseText);
if(info.length>0){
if(this.starred||this.categoryId||this.typeId){
$("loading_feed").hide();
$A(info).each(function(data){
var _aa0=$(document.createElement("div"));
_aa0.addClassName("feed_item");
_aa0.innerHTML="<h2 class=\"feed_heading\">You are now following the topic <a href=\"/feed/all/"+data["id"]+"\">"+data["name"]+"</a>.</h2>";
var _aa1=$("feed_box").down(".feed_item",0);
_aa1.parentNode.insertBefore(_aa0,_aa1);
});
}else{
this.loadNewStories(info.length);
}
}else{
$("loading_feed").hide();
var _aa2=$(document.createElement("div"));
_aa2.addClassName("feed_item");
_aa2.innerHTML="<h2 class=\"feed_heading\">You were already a fan of that topic or topics.</h2>";
var _aa3=$("feed_box").down(".feed_item",0);
_aa3.parentNode.insertBefore(_aa2,_aa3);
return;
}
var _aa4=$("category_filters");
if(!_aa4){
var _aa5=$(document.createElement("div"));
_aa5.addClassName("sidebar_box");
_aa5.innerHTML="<h3>Filter By Topic</h3><ul id=\"category_filters\" class=\"feed_filter\"><li class=\"all active\">All Topics</li></ul>";
var _aa6=$("type_filters");
_aa6.parentNode.insertBefore(_aa5,_aa6);
var _aa4=$("category_filters");
}
$A(info).each(function(data){
var li=$(document.createElement("li"));
li.id="category_filter_"+data["id"];
li.addClassName("cat");
li.innerHTML="<a class=\"delete_category\" onclick=\"return fm.deleteCategory("+data["id"]+",'"+data["name"]+"');"+"\" style=\"display: none;\" href=\"#\">delete</a>";
li.innerHTML+="<a href=\"/feed/all/"+data["id"]+"\" title=\""+data["path"]+"\">"+data["name"]+"</a>";
_aa4.appendChild(li);
li.observe("mouseover",function(){
li.addClassName("active_category");
li.down(".delete_category").show();
});
li.observe("mouseout",function(){
li.removeClassName("active_category");
li.down(".delete_category").hide();
});
});
},readMore:function(_aa9,type,id){
new Ajax.Updater(_aa9,"/xml/readmore.php",{parameters:$H({id:id,type:type}).toQueryString()});
return false;
},makeGrowable:function(id,_aad,_aae,_aaf){
makeGrowable(id,_aad,_aae,_aaf);
},makeExpandable:function(id,_ab1,_ab2,_ab3){
makeExpandable(id,_ab1,_ab2,_ab3);
},addItems:function(feed){
feed.each(function(item){
var fi=new FeedItemManager(item["id"],item["fid"],item["date"],item["hidden"],item["liked"],this);
this.feedItems[item["id"]]=fi;
this.feedItemCollection.push(fi);
if(!item["temporary"]){
if(item["hidden"]){
this.hiddenCount++;
}else{
if(!this.standalone){
fi.hideMenuObserve();
}
}
}
}.bind(this));
if(!this.standalone){
this.updateHiddenLink();
}
},addHandler:function(name,h){
h.ensureSignedInBeforeSave=true;
this.handlers[name]=h;
},getHandler:function(name){
return this.handlers[name];
},saveForm:function(_aba){
this.getHandler(_aba).save();
return false;
},addStoryToTop:function(_abb,id,_abd){
var _abe=$(document.createElement("div"));
_abe.innerHTML=_abb;
_abe.addClassName("feed_item");
var _abf=$("feed_box").down(".feed_item",0);
_abf.parentNode.insertBefore(_abe,_abf);
_abe.descendants().each(function(elt){
if(elt.tagName=="SCRIPT"){
eval(elt.innerHTML);
}
});
this.addItems(new Array({id:id,fid:id,date:0,hidden:0,liked:0,temporary:1}));
var _ac1=new fx.Color(_abe,{duration:1600,fromColor:"#feffd7",toColor:"#ffffff",onComplete:(_abd?_abd:function(){
})});
_ac1.toggle();
},shrinkStatus:function(){
var s=$("status");
s.value="What's on your mind?";
s.addClassName("dimmed");
var _ac3=new fx.Height("status_wrapper",{duration:400,toHeight:23,onComplete:function(){
$("status_wrapper").setStyle({height:"auto"});
$("tabcontent_feed_top_0").removeClassName("expanded");
}});
_ac3.toggle();
},shrinkQuestion:function(data){
$("question_errors").innerHTML="";
if(data["limitReached"]){
$("tabcontent_feed_top_1").innerHTML="<h2>You have reached your daily limit for asking questions.</h2>";
}else{
var _ac5=new fx.Height("question_wrapper",{duration:800,toHeight:31,onComplete:function(){
category.startOver();
$("categorySearchResults").innerHTML="";
Form.reset($("question_form"));
var _ac6=$("question");
_ac6.value="What is your question?";
_ac6.addClassName("dimmed");
_ac6.up("div").removeClassName("expanded");
var _ac7=$("additionalDetails");
_ac7.value="Additional details to your question (optional)";
_ac7.setStyle({height:""});
_ac7.addClassName("dimmed");
_ac7.up("div").removeClassName("expanded");
$("q_numcharsvalue").innerHTML=100;
$("ad_numcharsvalue").innerHTML=600;
$("requestSuggestions").hide();
$("confirmquestion").hide();
$("requestSuggestionsButton").show();
$("question_details").hide();
selectTab("categoryTabs",1,2);
subFlg=false;
$("question_wrapper").setStyle({height:"auto"});
}});
_ac5.toggle();
}
},forumShrink:function(){
var _ac8=new fx.Height("forum_wrapper",{duration:600,toHeight:22,onComplete:function(){
$("forum_msg").innerHTML="";
$("forum_details").hide();
var _ac9=$("subject");
var _aca=$("message");
_ac9.addClassName("dimmed");
_ac9.value="What is the subject of your forum post?";
_ac9.up("div").removeClassName("expanded");
_aca.addClassName("dimmed");
_aca.value="Type your message";
_aca.setStyle({height:""});
_aca.up("div").removeClassName("expanded");
feed_forum_selector.chooseForum(0);
$("forum_wrapper").setStyle({height:"auto"});
}});
_ac8.toggle();
},forumCallback:function(req){
var data=JSONstring.toObject(req.responseText);
if(data["valid"]){
fm.addStoryToTop(data["render"],data["id"],this.forumShrink.bind(this));
}else{
if(data["msg"]){
$("forum_msg").innerHTML=data["msg"];
}
}
},statusCallback:function(req){
var data=JSONstring.toObject(req.responseText);
fm.addStoryToTop(data["render"],data["id"],this.shrinkStatus.bind(this));
},questionCallback:function(req){
var data=JSONstring.toObject(req.responseText);
this.addStoryToTop(data["render"],data["id"],this.shrinkQuestion.bind(this,data));
},moreFeed:function(_ad1){
new Ajax.Request("/xml/feedmore.php",{parameters:$H({b:this.originalUpdateTime,startpos:_ad1,typeId:this.typeId,categoryId:this.categoryId,starred:this.starred,sa:this.standalone?1:0}).toQueryString(),onComplete:function(req){
var _ad3=JSONstring.toObject(req.responseText);
var _ad4=$("show_more");
_ad4.style.display="none";
_ad4.id="";
var _ad5=$(document.createElement("div"));
$("feed_box").appendChild(_ad5);
_ad5.innerHTML=_ad3["render"];
var _ad6=$("feed_more_"+_ad1);
$$("#feed_more_"+_ad1+" script").each(function(_ad7){
safeScriptEval(_ad7);
});
this.addItems(_ad3["feed"]);
}.bind(this)});
return false;
},updateHiddenLink:function(){
if(this.hiddenCount==1){
$("show_hidden").innerHTML="show 1 hidden story";
}else{
if(this.hiddenCount>0){
$("show_hidden").innerHTML="show "+this.hiddenCount+" hidden stories";
}else{
$("show_hidden").innerHTML="";
}
}
},getById:function(id){
return this.feedItems[id];
},stopReporting:function(){
if(this.reportingFeedStoryId){
this.getById(this.reportingFeedStoryId).stopObservePostReporting();
this.reportingFeedStoryId=0;
}
},unhideAll:function(){
this.feedItemCollection.each(function(fi){
fi.unhide();
});
this.updateHiddenLink();
return false;
},unhideUser:function(_ada){
new Ajax.Request("/xml/feedhide.php",{parameters:$H({u:_ada,del:1}).toQueryString(),onComplete:function(){
$$(".u"+_ada).each(function(elt){
if(elt.id){
var fid=elt.id.substring(elt.id.indexOf("_")+1);
var _add=this.getById(fid);
if(_add){
_add.unhide(true);
}
}
}.bind(this));
var hu=$("hu_"+_ada);
if(hu){
if(hu.siblings().size()==0){
var _adf=$("hidden_people");
if(!($("hidden_topics"))){
var p=$(document.createElement("p"));
p.innerHTML="All people and topics are visible.";
_adf.parentNode.insertBefore(p,_adf);
}
_adf.remove();
}else{
hc.remove();
}
}
this.updateHiddenLink();
}.bind(this)});
return false;
},unhideCategory:function(_ae1){
new Ajax.Request("/xml/feedhide.php",{parameters:$H({c:_ae1,del:1}).toQueryString(),onComplete:function(){
$$(".c"+_ae1).each(function(elt){
if(elt.id){
var fid=elt.id.substring(elt.id.indexOf("_")+1);
var _ae4=this.getById(fid);
if(_ae4){
_ae4.unhide(true);
}
}
}.bind(this));
var hc=$("hc_"+_ae1);
if(hc){
if(hc.siblings().size()==0){
var _ae6=$("hidden_topics");
if(!($("hidden_people"))){
var p=$(document.createElement("p"));
p.innerHTML="All people and topics are visible.";
_ae6.parentNode.insertBefore(p,_ae6);
}
_ae6.remove();
}else{
hc.remove();
}
}
this.updateHiddenLink();
}.bind(this)});
return false;
},toggleEditHidden:function(){
var val=$("edit_hidden").innerHTML;
if(val=="done editing"){
$("edit_hidden").innerHTML="edit";
$("hidden_list").hide();
}else{
$("edit_hidden").innerHTML="done editing";
if($("hidden_list").innerHTML==""){
this.updateHiddenList(true);
}else{
$("hidden_list").show();
}
}
return false;
},updateHiddenList:function(show){
new Ajax.Updater("hidden_list","/xml/feedhide.php",{parameters:"list=1",onComplete:function(){
if(show){
$("hidden_list").show();
}
}});
},closeOverlay:function(){
this.stopReporting();
toggleOverlay("overlay");
var _aea=$("overlay");
_aea.classNames().each(function(name){
if(name!="overlay"){
_aea.removeClassName(name);
}
});
$("overlay_content").innerHTML="<div class=\"spinner\"></div>";
$("overlay").setStyle({paddingTop:"0"});
return false;
},openOverlay:function(_aec){
if(_aec){
$("overlay").addClassName(_aec);
}
adjustOverlayHeight();
toggleOverlay("overlay");
},showHelpOverlay:function(url){
this.openOverlay("help");
new Ajax.Updater("overlay_content","/xml/staticpage.php?url="+url);
return false;
},showQuestionOverlay:function(id){
this.openOverlay("hubpage");
new Ajax.Updater("overlay_content","/xml/answersrender.php?id="+id,{onComplete:function(){
var _aef=$("fixed_title").getHeight();
if(browser!="IE"||version>6){
$("overlay").setStyle({paddingTop:_aef+"px"});
}
adjustOverlayHeight();
}.bind(this)});
return false;
},showFlagRequestOverlay:function(id){
this.openOverlay("flagrequest");
new Ajax.Updater("overlay_content","/xml/flagrequest.php?r="+id,{evalScripts:true,onComplete:function(){
var _af1=$("fixed_title").getHeight();
if(browser!="IE"||version>6){
$("overlay").setStyle({paddingTop:_af1+"px"});
}
adjustOverlayHeight();
}.bind(this)});
return false;
},flagRequestCallback:function(){
toggleOverlay("overlay");
},showFlagHubOverlay:function(id){
this.openOverlay("flaghub");
new Ajax.Updater("overlay_content","/xml/flaghubrender.php?a="+id,{evalScripts:true,onComplete:function(req){
var _af4=$("fixed_title").getHeight();
if(browser!="IE"||version>6){
$("overlay").setStyle({paddingTop:_af4+"px"});
}
adjustOverlayHeight();
}.bind(this)});
return false;
},flagHubCallback:function(){
toggleOverlay("overlay");
},showHubOverlay:function(url){
this.openOverlay("hubpage");
new Ajax.Request("/xml/articlerender.php?url="+url,{onComplete:function(req){
var _af7=0;
$("overlay_content").innerHTML=req.responseText;
var _af8=$("fixed_title").getHeight();
if(browser!="IE"||version>6){
$("overlay").setStyle({paddingTop:_af8+"px"});
}
adjustOverlayHeight();
$$("#overlay_content script").each(function(_af9){
var code=_af9.innerHTML;
eval(code);
});
}.bind(this)});
return false;
},reportPost:function(_afb){
this.openOverlay("postreport");
new Ajax.Updater("overlay_content","/xml/reportpostrender.php?p="+_afb,{evalScripts:true});
return false;
},reportPostCallback:function(){
$("overlay_content").innerHTML="<h2>The post has been flagged. Thanks for your input!</h2>";
},deleteCategory:function(_afc,_afd){
var sure=confirm("Are you sure that you want to delete "+_afd+"?");
if(!sure){
return false;
}
var ajax=new Ajax.Request("/xml/categoryFanBulkJoin.php",{parameters:$H({checked_ids:"",unchecked_ids:_afc,html_target:"feed_category_fans"}).toQueryString(),onSuccess:function(){
$("category_filter_"+_afc).remove();
}});
return false;
},updateFeedTypeFilters:function(){
var _b00=$A(["hubs","comments","posts","questions","answers","fans","milestones"]);
_b00.each(function(type){
var _b02=false;
$$("#type_filters li."+type+" input.ht_box").each(function(_b03){
if(_b03.checked){
_b02=true;
throw $break;
}
});
var li=$("type_filters").down("li."+type);
if(li){
if(_b02){
li.removeClassName("inactive");
}else{
li.addClassName("inactive");
li.hide();
}
}
});
},toggleFeedPrefs:function(){
var _b05=$("edit_button");
var _b06=$("filter").value;
var _b07="edit";
if(_b05.innerHTML=="save"){
_b07="save";
}
if(_b07=="save"){
this.updateFeedTypeFilters();
var _b08=0;
var _b09=document.getElementsByClassName("ht_box");
for(var j=0;j<_b09.length;j++){
if(_b09[j].checked){
_b08+=Number(_b09[j].name.substr(3));
}
}
var _b0b=$("current_prefs");
if(_b08!=_b0b.value){
var ajax=new Ajax.Request("/xml/activityPref.php",{parameters:$H({prefs:_b08,filter:_b06,feed:1}).toQueryString(),onComplete:function(){
Element.update(_b05,"edit");
var pf=$("preference_feedback");
pf.update("<span class=\"changes_saved\">Saved</span>. Changes take effect going forward. <a href=\"#\" id=\"preference_change_hide\" onclick=\"$('preference_feedback').hide(); return false;\">hide</a>");
pf.setStyle({height:""});
pf.show();
var _b0e=parseInt(pf.getStyle("height"));
var _b0f=new fx.Height("preference_feedback",{duration:600});
_b0f.hide();
_b0f.custom(0,_b0e);
}});
_b0b.value=_b08;
}else{
Element.update(_b05,"edit");
var pf=$("preference_feedback");
pf.update("No changes were made. <a href=\"#\" id=\"preference_change_hide\" onclick=\"$('preference_feedback').hide(); return false;\">hide</a>");
pf.setStyle({height:""});
pf.show();
var _b11=parseInt(pf.getStyle("height"));
var _b12=new fx.Height("preference_feedback",{duration:600});
_b12.hide();
_b12.custom(0,_b11);
}
}
var curs=document.getElementsByClassName("ht_cur");
var _b14="";
for(var i=0;i<curs.length;i++){
_b14=curs[i].className;
}
var eles=document.getElementsByClassName("ht_pref");
for(var i=0;i<eles.length;i++){
if(_b07=="edit"){
if(_b14=="ht_all ht_cur"){
eles[i].style.display="block";
}else{
if(eles[i].parentNode.className==_b14){
eles[i].style.display="block";
}
}
}else{
eles[i].style.display="none";
}
}
if(_b07=="edit"){
_b05.innerHTML="save";
$("preference_feedback").hide();
$$("#type_filters li.inactive").each(function(elt){
elt.show();
});
}
return false;
}};
var FeedItemManager=Class.create();
FeedItemManager.prototype={initialize:function(id,fid,_b1a,_b1b,_b1c,_b1d){
this.id=id;
this.feedItemId=fid;
this.cdate=_b1a;
this.hidden=_b1b;
this.liked=_b1c;
this.manager=_b1d;
this.menuVisible=0;
this.mouseoverHandlers=new Array();
this.mouseoutHandlers=new Array();
this.clickHandlers=new Array();
this.prefix="story_";
this.htmlId=this.prefix+this.id;
this.triggerId="menu_trigger_"+this.id;
this.hideId="menu_"+this.id;
this.mainId="hide_menu_"+this.id;
this.messageId="message_"+this.id;
this.hideMessageId="hide_message_"+this.id;
this.likeId="feed_like_"+this.id;
},unhide:function(_b1e){
if(!$(this.htmlId).hasClassName("hidden")){
return;
}
$(this.htmlId).removeClassName("hidden");
this.manager.hiddenCount--;
if(_b1e){
this.hidden=0;
this.hideMenuObserve();
}
},hideMenuObserve:function(){
Event.observe(this.htmlId,"mouseover",this.showHideMenu.bindAsEventListener(this));
Event.observe(this.htmlId,"mouseout",this.hideHideMenu.bindAsEventListener(this));
Event.observe(this.triggerId,"mouseover",function(){
$(this.hideId).show();
}.bind(this));
Event.observe(this.triggerId,"mouseout",function(){
$(this.hideId).hide();
}.bind(this));
$(this.hideId).immediateDescendants().each(function(elt){
elt=$(elt);
var _b20=elt.immediateDescendants().detect(function(c){
return c.tagName=="UL";
});
if(_b20){
elt.observe("mouseover",function(_b22){
_b22.show();
}.bind(this,_b20));
elt.observe("mouseout",function(_b23){
_b23.hide();
}.bind(this,_b20));
}
});
$(this.hideId).descendants().each(function(elt){
elt=$(elt);
if(elt.tagName=="LI"){
elt.observe("mouseover",function(){
if(!elt.hasClassName("active")){
elt.addClassName("active");
}
});
elt.observe("mouseout",function(){
if(elt.hasClassName("active")){
elt.removeClassName("active");
}
});
}
});
},showHideMenu:function(e){
if(!this.hidden&&!this.menuVisible){
this.menuVisible=1;
$(this.mainId).show();
}
},hideHideMenu:function(e){
if(this.menuVisible){
this.menuVisible=0;
$(this.mainId).hide();
}
},showLikedBy:function(){
new Ajax.Updater(this.likeId,"/xml/feedlikes.php",{parameters:$H({id:this.feedItemId}).toQueryString()});
return false;
},updateLikedCount:function(){
var _b27="";
if(this.liked==0){
_b27="No one likes this yet";
}else{
if(this.liked==1){
var link=$(document.createElement("a"));
link.href="#";
link.innerHTML="1 person";
likeBox=$(this.likeId);
likeBox.innerHTML="";
likeBox.appendChild(link);
likeBox.appendChild(document.createTextNode(" likes this"));
link.observe("click",this.showLikedBy.bind(this));
}else{
var link=$(document.createElement("a"));
link.href="#";
link.innerHTML=this.liked+" people";
likeBox=$(this.likeId);
likeBox.innerHTML="";
likeBox.appendChild(link);
likeBox.appendChild(document.createTextNode(" like this"));
link.observe("click",this.showLikedBy.bind(this));
}
}
},share:function(){
check_signed_in_ajax(this.doShare.bind(this));
return false;
},doShare:function(_b29,_b2a){
if(_b29){
new Ajax.Updater("share_"+this.id,"/xml/feedshare.php",{parameters:$H({id:this.feedItemId,d:this.cdate}).toQueryString(),onComplete:function(){
$(this.messageId).innerHTML="This story has been shared with your followers.";
}.bind(this)});
if(_b2a){
toggleOverlay("feedSignUp");
}
}else{
suFH.onSuccess=this.doShare.bind(this,true,true);
siFH.onSuccess=this.doShare.bind(this,true,true);
fetchRecaptcha("feedCaptcha");
toggleOverlay("feedSignUp");
}
},like:function(){
check_signed_in_ajax(this.doLike.bind(this));
return false;
},doLike:function(_b2b,_b2c){
if(_b2b){
new Ajax.Updater(this.likeId,"/xml/feedlike.php",{parameters:$H({id:this.feedItemId,uid:this.id,d:this.cdate}).toQueryString(),onComplete:function(){
$("like_"+this.id).innerHTML="liked";
}.bind(this)});
if(_b2c){
toggleOverlay("feedSignUp");
}
}else{
suFH.onSuccess=this.doLike.bind(this,true,true);
siFH.onSuccess=this.doLike.bind(this,true,true);
fetchRecaptcha("feedCaptcha");
toggleOverlay("feedSignUp");
}
},star:function(){
check_signed_in_ajax(this.doStar.bind(this));
return false;
},doStar:function(_b2d,_b2e){
if(_b2d){
new Ajax.Updater("star_"+this.id,"/xml/feedstar.php",{parameters:$H({id:this.feedItemId,star:1,d:this.cdate}).toQueryString(),onComplete:function(){
$(this.messageId).innerHTML="This story has been starred.";
}.bind(this)});
if(_b2e){
toggleOverlay("feedSignUp");
}
}else{
suFH.onSuccess=this.doStar.bind(this,true,true);
siFH.onSuccess=this.doStar.bind(this,true,true);
fetchRecaptcha("feedCaptcha");
toggleOverlay("feedSignUp");
}
},unstar:function(){
check_signed_in_ajax(this.doUnstar.bind(this));
return false;
},doUnstar:function(_b2f,_b30){
if(_b2f){
new Ajax.Updater("star_"+this.id,"/xml/feedstar.php",{parameters:$H({id:this.feedItemId,star:0,d:this.cdate}).toQueryString(),onComplete:function(){
$(this.messageId).innerHTML="This story has been unstarred.";
}.bind(this)});
if(_b30){
toggleOverlay("feedSignUp");
}
}else{
suFH.onSuccess=this.doUnstar.bind(this,true,true);
siFH.onSuccess=this.doUnstar.bind(this,true,true);
fetchRecaptcha("feedCaptcha");
toggleOverlay("feedSignUp");
}
},hide:function(){
this.manager.hiddenCount++;
this.hidden=1;
$(this.htmlId).addClassName("hidden");
},hideStory:function(){
new Ajax.Request("/xml/feedhide.php",{parameters:$H({id:this.feedItemId}).toQueryString(),onComplete:function(){
var hmsg=$(this.hideMessageId);
if(!hmsg){
var hmsg=$(document.createElement("div"));
hmsg.id=this.hideMessageId;
hmsg.addClassName("hide_notice");
var _b32=$(this.htmlId);
_b32.parentNode.insertBefore(hmsg,_b32);
}
hmsg.innerHTML="Story hidden";
this.hide();
this.manager.updateHiddenLink();
}.bind(this)});
return false;
},removeHideMessage:function(){
$(this.hideMessageId).remove();
return false;
},hideUser:function(_b33,_b34){
_b34=_b34?1:0;
new Ajax.Request("/xml/feedhide.php",{parameters:$H({id:this.id,userId:_b33,force:_b34}).toQueryString(),onComplete:function(req){
var data=JSONstring.toObject(req.responseText);
var hmsg=$(this.hideMessageId);
if(!hmsg){
var hmsg=$(document.createElement("div"));
hmsg.id=this.hideMessageId;
hmsg.addClassName("hide_notice");
var _b38=$(this.htmlId);
_b38.parentNode.insertBefore(hmsg,_b38);
}
hmsg.innerHTML=data["msgHtml"];
if(data["success"]){
$$(".u"+_b33).each(function(elt){
eltId=elt.id.substring(this.prefix.length);
this.manager.getById(eltId).hide();
}.bind(this));
this.manager.updateHiddenLink();
this.manager.updateHiddenList();
}
}.bind(this)});
return false;
},hideCategory:function(_b3a,_b3b){
_b3b=_b3b?1:0;
new Ajax.Request("/xml/feedhide.php",{parameters:$H({id:this.id,force:_b3b,categoryId:_b3a}).toQueryString(),onComplete:function(req){
var data=JSONstring.toObject(req.responseText);
var hmsg=$(this.hideMessageId);
if(!hmsg){
var hmsg=$(document.createElement("div"));
hmsg.id=this.hideMessageId;
hmsg.addClassName("hide_notice");
var _b3f=$(this.htmlId);
_b3f.parentNode.insertBefore(hmsg,_b3f);
}
hmsg.innerHTML=data["msgHtml"];
if(data["success"]){
$$(".c"+_b3a).each(function(elt){
eltId=elt.id.substring(this.prefix.length);
this.manager.getById(eltId).hide();
}.bind(this));
this.manager.updateHiddenLink();
this.manager.updateHiddenList();
}
if(data["ids"]){
$A(data["ids"]).each(function(id){
if($("category_filter_"+id)){
$("category_filter_"+id).remove();
}
});
}
}.bind(this)});
return false;
},hidePreviousPosts:function(){
var _b42=$("feed_posts_"+this.id).immediateDescendants();
var _b43=_b42.size();
_b42.each(function(elt,_b45){
if(_b45==_b43-1){
elt.show();
}else{
elt.remove();
}
}.bind(this));
return false;
},hidePreviousComments:function(){
var _b46=$("feed_comments_"+this.id).immediateDescendants();
var _b47=_b46.size();
var _b48=0;
_b46.each(function(elt,_b4a){
if(elt.hasClassName("show_previous")){
_b48=_b4a;
}
});
_b46.each(function(elt,_b4c){
if(_b4c==_b48){
elt.show();
throw $break;
}else{
elt.remove();
}
}.bind(this));
return false;
},seePreviousPosts:function(_b4d,num,_b4f){
new Ajax.Request("/xml/moreposts.php",{parameters:$H({uid:this.id,t:_b4d,num:num,startpos:_b4f}).toQueryString(),onComplete:function(req){
var _b51=$("feed_posts_"+this.id);
_b51.down("div").hide();
new Insertion.Top(_b51,req.responseText);
}.bind(this)});
return false;
},seePreviousFeedComments:function(num,_b53){
new Ajax.Request("/xml/morefeedcomments.php",{parameters:$H({fid:this.feedItemId,id:this.id,num:num,startpos:_b53}).toQueryString(),onComplete:function(req){
var _b55=$("feed_comments_"+this.id);
_b55.down("div").hide();
new Insertion.Top(_b55,req.responseText);
}.bind(this)});
return false;
},seePreviousComments:function(_b56,num,_b58){
new Ajax.Request("/xml/morecomments.php",{parameters:$H({uid:this.id,mdcId:_b56,num:num,startpos:_b58}).toQueryString(),onComplete:function(req){
var _b5a=$("feed_comments_"+this.id);
_b5a.down("div").hide();
new Insertion.Top(_b5a,req.responseText);
}.bind(this)});
return false;
},commentCallback:function(req){
data=JSONstring.toObject(req.responseText);
var _b5c=$("feed_comments_"+this.id);
_b5c.innerHTML+=data["render"];
$("comment_"+this.id).value="Write a comment...";
$("comment_"+this.id).addClassName("dimmed");
},answerCallback:function(req,_b5e){
var data=JSONstring.toObject(req.responseText);
if(data["valid"]){
$("server_error_"+this.id).innerHTML="";
$("answer_interact_"+this.id).innerHTML=data["msg"];
if(_b5e){
var c=Math.max(0,data["c"]-1);
$("answers_"+this.id).innerHTML=c+" other answer"+(c==1?"":"s");
}else{
$("answers_"+this.id).innerHTML=data["c"]+" answer"+(data["c"]==1?"":"s");
}
}else{
$("server_error_"+this.id).innerHTML="<span class=\"alert\">"+data["msg"]+"</span>";
}
},postCallback:function(req){
var data=JSONstring.toObject(req.responseText);
if(data["valid"]){
$("server_error_"+this.id).innerHTML="";
$("post_"+this.id).value="Write a reply...";
$("post_"+this.id).addClassName("dimmed");
$("new_posts_"+this.id).innerHTML+=data["render"];
}else{
$("server_error_"+this.id).innerHTML="<span class=\"alert\">"+data["msg"]+"</span>";
}
},activatePost:function(elt){
elt.addClassName("feed_post_active");
},deactivatePost:function(elt){
elt.removeClassName("feed_post_active");
},observePostReporting:function(){
this.manager.stopReporting();
this.manager.reportingFeedStoryId=this.id;
var _b65=$$("#story_"+this.id+" .feed_post");
if(_b65.size()>1){
_b65.each(function(elt){
var _b67=this.postIdFromDivId(elt.id);
elt.setStyle({cursor:"pointer"});
var _b68=this.activatePost.bind(this,elt);
this.mouseoverHandlers[_b67]=_b68;
elt.observe("mouseover",_b68);
var _b69=this.deactivatePost.bind(this,elt);
this.mouseoutHandlers[_b67]=_b69;
elt.observe("mouseout",_b69);
var _b6a=this.manager.reportPost.bind(this.manager,_b67);
this.clickHandlers[_b67]=_b6a;
elt.observe("click",_b6a);
}.bind(this));
var msg=$(document.createElement("p"));
msg.appendChild(document.createTextNode("Click on the post that you want to report or "));
var _b6c=$(document.createElement("a"));
_b6c.innerHTML="cancel report";
_b6c.href="#";
msg.appendChild(_b6c);
var _b6d=$(this.messageId);
_b6d.innerHTML="";
_b6d.appendChild(msg);
_b6d.addClassName("report_instructions");
var _b6e=parseInt(_b6d.getStyle("height"));
var _b6f=new fx.Height(this.messageId,{duration:500});
_b6f.hide();
_b6f.custom(0,_b6e);
_b6c.observe("click",this.stopObservePostReporting.bind(this));
}else{
if(_b65.size()==1){
var post=_b65.detect(function(elt){
return true;
});
var _b72=post.id;
this.manager.reportPost(this.postIdFromDivId(_b72));
}
}
return false;
},postIdFromDivId:function(_b73){
return _b73.substring(_b73.lastIndexOf("_")+1);
},stopObservePostReporting:function(_b74){
var _b75=$$("#story_"+this.id+" .feed_post");
if(_b75.size()>1){
_b75.each(function(elt){
elt.setStyle({cursor:"auto"});
this.deactivatePost(elt);
var _b77=this.postIdFromDivId(elt.id);
elt.stopObserving("mouseover",this.mouseoverHandlers[_b77]);
elt.stopObserving("mouseout",this.mouseoutHandlers[_b77]);
elt.stopObserving("click",this.clickHandlers[_b77]);
}.bind(this));
}
$(this.messageId).innerHTML="";
$(this.messageId).removeClassName("report_instructions");
$(this.messageId).setStyle({height:""});
if(_b74){
Event.stop(_b74);
}
}};
var mm;
function mapsManager(){
this.maps=[];
};
mapsManager.prototype.addMap=function(id,map){
this.maps[id]=map;
map.id=id;
};
mapsManager.prototype.getMapById=function(id){
return this.maps[id];
};
function markerMap(m,_b7c,tmId,usId){
this.map=m;
this.markers=[];
this.infowindow=new google.maps.InfoWindow();
this.polyline=new google.maps.Polyline({clickable:false,strokeColor:"#0000ff",strokeWeight:5,strokeOpacity:0.7});
this.polyline.setMap(m);
this.directionsResult=null;
this.legend=$(_b7c);
this.travelModeId=tmId;
this.unitSystemId=usId;
this.id=null;
};
markerMap.prototype.addMarker=function(_b7f,_b80){
this.markers.push(new infoMarker(this,_b7f,_b80,this.markers.length));
};
markerMap.prototype.removeAllMarkers=function(){
for(var i=0;i<this.markers.length;i++){
this.markers[i].marker.setMap(null);
}
this.markers=[];
};
function infoMarker(_b82,_b83,_b84,_b85){
this.markermap=_b82;
this.marker=_b83;
this.content=_b84;
this.position=_b85;
this.open=false;
google.maps.event.addListener(this.marker,"click",function(){
this.markermap.infowindow.setContent(this.content);
this.markermap.infowindow.open(this.markermap.map,this.marker);
this.open=true;
google.maps.event.addListenerOnce(this.markermap.infowindow,"closeclick",function(){
this.open=false;
unhighlightMarker(this);
}.bind(this));
highlightMarker(this);
}.bind(this));
google.maps.event.addListener(this.marker,"mouseover",function(){
highlightMarker(this);
}.bind(this));
google.maps.event.addListener(this.marker,"mouseout",function(){
if(!this.open){
unhighlightMarker(this);
}
}.bind(this));
};
markerMap.prototype.hideDirections=function(){
var i=0;
while(true){
var _b87=$(this.legend.id+"_"+i);
if(_b87){
_b87.innerHTML="";
}else{
break;
}
i++;
}
$(this.legend.id+"_copyright").innerHTML="";
$(this.legend.id+"_warnings").innerHTML="";
this.polyline.setMap(null);
};
markerMap.prototype.renderDirections=function(){
if(this.directionsResult.routes[0].overview_path.length==0){
this.polyline.setMap(null);
}else{
if(!this.polyline.getMap()){
this.polyline.setMap(this.map);
}
this.polyline.setPath(this.directionsResult.routes[0].overview_path);
}
var _b88=this.directionsResult.routes[0];
var legs=_b88.legs;
for(var i=0;i<legs.length;i++){
var leg=legs[i];
var html="<div>"+leg.distance.text+" - about "+leg.duration.text+" of "+$F(this.travelModeId).toLowerCase()+"</div><table><tbody>";
if(leg.steps.length>100){
html+="<p>We're sorry, but the directions for this step are too long to display.</p>";
}else{
for(var j=0;j<leg.steps.length;j++){
var step=leg.steps[j];
html+="<tr><td>"+(j+1)+".</td><td>"+step.instructions+"</td><td>"+step.distance.text+"</td></tr>";
}
html+="</tbody></table>";
}
$(this.legend.id+"_"+i).innerHTML=html;
}
while(true){
var _b8f=$(this.legend.id+"_"+i);
if(_b8f){
_b8f.innerHTML="";
}else{
break;
}
i++;
}
$(this.legend.id+"_copyright").innerHTML=_b88.copyrights;
var _b90="";
for(var j=0;j<_b88.warnings.length;j++){
_b90+=_b88.warnings[j]+"<br/>";
}
$(this.legend.id+"_warnings").innerHTML=_b90;
};
markerMap.prototype.fetchDirections=function(){
var _b91=this.markers;
var l=_b91.length;
var _b93=new google.maps.LatLng(_b91[0].marker.getPosition().lat(),_b91[0].marker.getPosition().lng());
var _b94=new google.maps.LatLng(_b91[l-1].marker.getPosition().lat(),_b91[l-1].marker.getPosition().lng());
var _b95=[];
for(var i=1;i<l-1;i++){
_b95.push({location:new google.maps.LatLng(_b91[i].marker.getPosition().lat(),_b91[i].marker.getPosition().lng()),stopover:true});
}
var _b97={origin:_b93,destination:_b94,waypoints:_b95,travelMode:google.maps.DirectionsTravelMode[$F(this.travelModeId)],unitSystem:google.maps.DirectionsUnitSystem[$F(this.unitSystemId)]};
var _b98=new google.maps.DirectionsService();
_b98.route(_b97,function(_b99,_b9a){
if(_b9a==google.maps.DirectionsStatus.OK&&this.markers.length==l){
this.directionsResult=_b99;
this.renderDirections();
}
}.bind(this));
};
jQuery(function(){
mm=new mapsManager();
});
function renderMapFromData(id,data,_b9d){
var _b9e="map_canvas_"+id;
var _b9f=mm.getMapById(id);
if(!_b9f){
var map=new google.maps.Map(document.getElementById(_b9e));
var _b9f=new markerMap(map,"map_legend_"+id,"travel_mode_"+id,"unit_system_"+id);
mm.addMap(id,_b9f);
sv=true;
}else{
var map=_b9f.map;
sv=false;
}
map.setOptions({zoom:data.zoom,center:new google.maps.LatLng(data.lat,data.lng),mapTypeId:google.maps.MapTypeId[data.mapType],streetViewControl:sv,scrollwheel:false});
_b9f.removeAllMarkers();
var _ba1="";
for(var i=0;i<data.markers.length;i++){
var m=data.markers[i];
var _ba4=mapLetterFromPosition(i);
var icon="http://www.google.com/mapfiles/marker_green"+_ba4+".png";
var _ba6="<div class=\"infowindow_content\"><strong>"+m.name+"</strong><br/><small>"+m.address+"</small><p>"+m.description+"</p>";
var _ba7=new google.maps.Marker({position:new google.maps.LatLng(m.lat,m.lng),map:map,title:m.name,icon:icon});
_b9f.addMarker(_ba7,_ba6);
if(data.hubtool){
var dest=(m.address.strip()=="")?m.name:m.address;
_ba1+="<div class=\"map_stopover\" onmouseover=\"highlightMapMarker(event, "+id+", "+i+");\" onmouseout=\"unhighlightMapMarker(event, "+id+", "+i+");\">"+"<img src=\""+icon+"\" id=\"stopover_icon_"+id+"_"+i+"\"/>"+"<strong>"+m.name+"</strong> - "+"<small>"+m.address+" "+"<a href=\"http://maps.google.com/maps?f=d&z="+data.zoom+"&q="+encodeURI(dest)+"@"+m.lat+","+m.lng+"\">[get directions]</a>"+"</small>"+"<p>"+m.description+"</p>"+"</div>"+"<div id=\""+_b9f.legend.id+"_"+i+"\"></div>";
}
}
if(data.hubtool){
_ba1+="<div id=\""+_b9f.legend.id+"_warnings\" class=\"map_warnings\"></div>";
_ba1+="<div id=\""+_b9f.legend.id+"_copyright\" class=\"map_copyright\"></div>";
_b9f.legend.innerHTML=_ba1;
if(data.markers.length>=2){
$("map_route_"+id).show();
}else{
$("map_route_"+id).hide();
}
if(data.markers.length>=2&&$("route_options_"+id).visible()){
if(_b9d||!_b9f.directionsResult){
_b9f.fetchDirections();
}else{
_b9f.renderDirections();
}
}else{
var _ba9={status:"OK",routes:[{legs:[],overview_path:[],copyrights:"",warnings:[]}]};
_b9f.directionsResult=_ba9;
_b9f.renderDirections();
}
}
};
function showRouteAndDirections(id){
mm.getMapById(id).fetchDirections();
};
function hideRouteAndDirections(id){
mm.getMapById(id).hideDirections();
};
function highlightMarker(_bac){
var id=_bac.markermap.id;
if(!id){
return;
}
var _bae=mapLetterFromPosition(_bac.position);
var icon="http://www.google.com/mapfiles/marker_yellow"+_bae+".png";
_bac.marker.setIcon(icon);
var img=$("stopover_icon_"+id+"_"+_bac.position);
if(img){
img.src=icon;
}
};
function unhighlightMarker(_bb1){
var id=_bb1.markermap.id;
if(!id){
return;
}
var _bb3=mapLetterFromPosition(_bb1.position);
var icon="http://www.google.com/mapfiles/marker_green"+_bb3+".png";
_bb1.marker.setIcon(icon);
var img=$("stopover_icon_"+id+"_"+_bb1.position);
if(img){
img.src=icon;
}
};
function mapLetterFromPosition(pos){
return String.fromCharCode(65+pos);
};
function highlightMapMarker(_bb7,id,_bb9){
var _bba=mm.getMapById(id);
if(_bb9<_bba.markers.length){
highlightMarker(_bba.markers[_bb9]);
}
};
function unhighlightMapMarker(_bbb,id,_bbd){
var _bbe=mm.getMapById(id);
if(_bbd<_bbe.markers.length){
unhighlightMarker(_bbe.markers[_bbd]);
}
};
var lastEditedMessageEle=null;
function attach_forum_topic_events(){
jQuery("div.posts a.reply").live("click",function(){
jQuery("#report_box").hide();
jQuery(".actionmenu a").removeClass("selected");
jQuery(this).addClass("selected");
var post=jQuery(this).closest("li.threaded");
post.append("<img class=\"wait\" src=\"/i/spnr.gif\" />");
check_signed_in_ajax(processReplyStart,{"ele":this});
return false;
});
jQuery("div.posts a.delete").live("click",function(){
if(confirm("Are you sure you want to delete this post?")){
var post=jQuery(this).closest("li.threaded");
post.append("<img class=\"wait\" src=\"/i/spnr.gif\" />");
jQuery(this).closest("li.threaded").load("/xml/forum/delete_inline.php",{postId:post.attr("id").substring(4)},processDeleteResponse);
}
return false;
});
jQuery("div.posts a.undelete").live("click",function(){
if(confirm("Are you sure you want to undelete this post?")){
var post=jQuery(this).closest("li.threaded");
post.append("<img class=\"wait\" src=\"/i/spnr.gif\" />");
jQuery(this).closest("li.threaded").load("/xml/forum/undelete_inline.php",{postId:post.attr("id").substring(4)},processUndeleteResponse);
}
return false;
});
jQuery("div.posts a.edit").live("click",function(){
jQuery("#report_box").hide();
jQuery(".actionmenu a").removeClass("selected");
jQuery(this).addClass("selected");
var post=jQuery(this).closest("li.threaded");
post.append("<img class=\"wait\" src=\"/i/spnr.gif\" />");
jQuery.ajax({type:"GET",url:"/xml/forum/edit_inline.php",data:{postId:post.attr("id").substring(4)},complete:processStartEditResponse});
return false;
});
jQuery("div.posts a.report").live("click",function(){
jQuery("#editor_box").hide();
jQuery(".actionmenu a").removeClass("selected");
jQuery(this).addClass("selected");
var post=jQuery(this).closest("li.threaded");
post.append("<img class=\"wait\" src=\"/i/spnr.gif\" />");
check_signed_in_ajax(processReportStart,{"ele":this});
return false;
});
jQuery("#editor_box input[value=Cancel]").click(function(){
jQuery(".actionmenu a").removeClass("selected");
var _bc4=jQuery("#editor_box");
if(_bc4.hasClass("edit_box")){
jQuery(".message",_bc4.closest(".postright")).show();
}
_bc4.hide();
});
jQuery("#editor_box input[type=submit]").click(function(){
jQuery("#editor_box").append("<img class=\"wait\" src=\"/i/spnr.gif\" />");
});
jQuery("#report_box input[value=Cancel]").click(function(){
jQuery(".actionmenu a").removeClass("selected");
var _bc5=jQuery("#report_box");
_bc5.hide();
});
jQuery("#report_box input[type=submit]").click(function(){
if(jQuery("#reportTypeId").val()=="0"){
alert("Please select a reason");
return false;
}
jQuery("#report_box").append("<img class=\"wait\" src=\"/i/spnr.gif\" />");
});
jQuery("div.reply_collapser a").live("click",function(){
var _bc6=jQuery(this).closest("div.replies_box_wrapper");
var _bc7=jQuery(this).closest("div.reply_collapser");
if(_bc7.hasClass("show")){
_bc7.addClass("hide").removeClass("show");
jQuery("a",_bc7).html("");
jQuery("> .replies_box",_bc6).slideDown();
}else{
jQuery("> .replies_box",_bc6).slideUp(500,function(){
_bc7.addClass("show").removeClass("hide");
jQuery("a",_bc7).html(""+jQuery("li.threaded",_bc6).length+" replies");
});
}
return false;
});
jQuery("a.toggle").live("click",function(){
if(jQuery(this).hasClass("expanded")){
jQuery(this).removeClass("expanded");
jQuery(this).html("more &rarr;");
}else{
jQuery(this).addClass("expanded");
jQuery(this).html("less &larr;");
}
jQuery("a.more",jQuery(this).closest(".actionmenu")).toggle();
return false;
});
jQuery("#reportTypeId").change(function(){
if(jQuery(this).val()=="5"){
jQuery("#new_category_wrapper").show();
}else{
jQuery("#new_category_wrapper").hide();
}
});
jQuery("li.threaded .in_reply_to a").live("click",function(){
var _bc8=jQuery(this);
var _bc9=jQuery("#threaded_reply_to_box");
if(_bc8.html()=="hide"){
_bc8.html("this");
_bc9.hide();
return false;
}
var _bca=_bc8.attr("class").substr(7);
var _bcb=jQuery("#post"+_bca+" .username").html();
var html="<p class=\"by\">By "+_bcb+"</p>"+jQuery("#message"+_bca).html();
var _bcd=_bc8.closest("li.threaded");
if(_bc9.length>0){
_bcd.append(_bc9);
}else{
jQuery(_bcd).append("<div id=\"threaded_reply_to_box\"></div>");
_bc9=jQuery("#threaded_reply_to_box");
}
_bc9.html(html);
var pos=_bc8.position();
var _bcf=_bc8.width();
_bc9.css({"left":(pos.left+_bcf)+"px","top":pos.top+"px"});
_bc9.show();
_bc8.html("hide");
return false;
});
jQuery.each(jQuery("div.reply_collapser.show"),function(){
replies_wrapper=jQuery(this).closest("div.replies_box_wrapper");
jQuery("a",this).html(""+jQuery("li.threaded",replies_wrapper).length+" replies");
});
};
function show_post_reply_box(_bd0){
_bd0.append(jQuery("#editor_box"));
if(lastEditedMessageEle){
lastEditedMessageEle.show();
}
var _bd1=jQuery("#editor_box");
_bd1.removeClass("edit_box").addClass("reply_box");
jQuery("input[type=submit]",_bd1).val("Submit reply");
jQuery("form",_bd1).attr("action","/xml/forum/reply_inline.php");
jQuery("form",_bd1).ajaxForm({type:"POST",dataType:"json",success:processReplyResponse,error:processReplyError});
jQuery("#posterror ul",_bd1).html("");
jQuery("#posterror",_bd1).hide();
jQuery("textarea",_bd1).val("");
jQuery("#postId",_bd1).val(_bd0.attr("id").substring(4));
_bd1.append(jQuery("#formatting_tips"));
_bd1.show();
var x=_bd1.offset().top-300;
jQuery("html,body").animate({scrollTop:x},500);
};
function show_report_box(_bd3){
if(lastEditedMessageEle){
lastEditedMessageEle.show();
}
var _bd4=jQuery("#report_box");
jQuery("#reportPostId",_bd4).val(_bd3.attr("id").substring(4));
jQuery("form",_bd4).ajaxForm({type:"POST",dataType:"json",complete:processReportResponse});
jQuery("> .actionmenu",_bd3).append(_bd4);
_bd4.show();
var x=_bd4.offset().top-300;
jQuery("html,body").animate({scrollTop:x},500);
};
function processReplyStart(_bd6,_bd7){
jQuery("li.threaded img.wait").remove();
var post=jQuery(_bd7["ele"]).closest("li.threaded");
if(!_bd6){
suFH.nextUri="?reply="+post.attr("id");
siFH.nextUri=suFH.nextUri;
fetchRecaptcha("replyCaptcha");
toggleOverlay("replySignUp");
}else{
show_post_reply_box(post);
}
};
function processReplyError(data,_bda,_bdb){
alert("There may have been an error posting your reply ("+_bda+").  We recommend copying the content of your reply somewhere for safekeeping, and then refreshing this page to see if your message has been posted. If this problem persists, please contact us at team@hubpages.com.");
};
function processEditedResponseError(data,_bdd,_bde){
alert("There may have been an error updating your post ("+_bdd+").  We recommend copying the content of your edited reply somewhere for safekeeping, and then refreshing this page to see if your edit has been posted.  If this problem persists, please contact us at team@hubpages.com.");
};
function processReplyResponse(data){
jQuery("li.threaded img.wait").remove();
if(data.errors.length==0){
jQuery(".actionmenu a").removeClass("selected");
jQuery("#editor_box").hide();
var ol=jQuery("#replies_box_"+data.postId+" > ol");
if(ol.length==0){
jQuery("#replies_box_"+data.postId).append("<ol></ol>");
}
jQuery("#replies_box_"+data.postId+" > ol").append(data.replyHtml.unescapeHTML());
replies_wrapper=jQuery("#replies_box_"+data.postId).closest(".replies_box_wrapper");
replies_wrapper.show();
reply_collapser=jQuery("> .reply_collapser",replies_wrapper);
reply_collapser.addClass("hide").removeClass("show");
jQuery("a",reply_collapser).html("");
jQuery("> .replies_box",replies_wrapper).slideDown();
}else{
jQuery("#editor_box #posterror").show();
errors_html="<li>"+data.errors.join("</li><li>")+"</li>";
jQuery("#editor_box #posterror ul").html(errors_html);
}
};
function processStartEditResponse(_be1,_be2){
jQuery("li.threaded img.wait").remove();
if(_be2=="error"){
alert(_be1.responseText);
return;
}
data=eval("("+_be1.responseText+")");
if(lastEditedMessageEle){
lastEditedMessageEle.show();
}
lastEditedMessageEle=jQuery("#message"+data.postId).hide();
var _be3=jQuery("#editor_box");
_be3.removeClass("reply_box").addClass("edit_box");
jQuery("input[type=submit]",_be3).val("Save");
jQuery("form",_be3).attr("action","/xml/forum/edit_inline.php");
jQuery("form",_be3).ajaxForm({type:"POST",dataType:"json",success:processEditedResponse,error:processEditedResponseError});
jQuery("#posterror ul",_be3).html("");
jQuery("#posterror",_be3).hide();
jQuery("#postId",_be3).val(data.postId);
jQuery("textarea",_be3).val(data.message);
jQuery("#post"+data.postId+" > .postright").append(jQuery("#editor_box"));
_be3.append(jQuery("#formatting_tips"));
_be3.show();
var x=_be3.offset().top-300;
jQuery("html,body").animate({scrollTop:x},500);
};
function processEditedResponse(data){
jQuery("li.threaded img.wait").remove();
if(data.errors.length==0){
jQuery(".actionmenu a").removeClass("selected");
jQuery("#editor_box").hide();
jQuery("#message"+data.postId).html(data.editedHtml.unescapeHTML());
jQuery("#message"+data.postId).show();
}else{
jQuery("#editor_box #posterror").show();
errors_html="<li>"+data.errors.join("</li><li>")+"</li>";
jQuery("#editor_box #posterror ul").html(errors_html);
}
};
function processDeleteResponse(_be6,_be7,_be8){
if(_be7=="error"){
jQuery("li.threaded img.wait").remove();
alert(_be6);
}
};
function processUndeleteResponse(_be9,_bea,_beb){
if(_bea=="error"){
jQuery("li.threaded img.wait").remove();
alert(_be9);
}
};
function processReportStart(_bec,_bed){
jQuery("li.threaded img.wait").remove();
var post=jQuery(_bed["ele"]).closest("li.threaded");
if(!_bec){
suFH.nextUri="?report="+post.attr("id");
siFH.nextUri=suFH.nextUri;
fetchRecaptcha("replyCaptcha");
toggleOverlay("replySignUp");
}else{
show_report_box(post);
}
};
function processReportResponse(_bef,_bf0){
jQuery(".actionmenu a").removeClass("selected");
jQuery("li.threaded img.wait").remove();
var _bf1=jQuery("#report_box");
_bf1.hide();
alert(_bef.responseText);
};
(function($){
$.fn.ajaxSubmit=function(_bf3){
if(!this.length){
log("ajaxSubmit: skipping submit process - no element selected");
return this;
}
if(typeof _bf3=="function"){
_bf3={success:_bf3};
}
var url=$.trim(this.attr("action"));
if(url){
url=(url.match(/^([^#]+)/)||[])[1];
}
url=url||window.location.href||"";
_bf3=$.extend({url:url,type:this.attr("method")||"GET",iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},_bf3||{});
var veto={};
this.trigger("form-pre-serialize",[this,_bf3,veto]);
if(veto.veto){
log("ajaxSubmit: submit vetoed via form-pre-serialize trigger");
return this;
}
if(_bf3.beforeSerialize&&_bf3.beforeSerialize(this,_bf3)===false){
log("ajaxSubmit: submit aborted via beforeSerialize callback");
return this;
}
var a=this.formToArray(_bf3.semantic);
if(_bf3.data){
_bf3.extraData=_bf3.data;
for(var n in _bf3.data){
if(_bf3.data[n] instanceof Array){
for(var k in _bf3.data[n]){
a.push({name:n,value:_bf3.data[n][k]});
}
}else{
a.push({name:n,value:_bf3.data[n]});
}
}
}
if(_bf3.beforeSubmit&&_bf3.beforeSubmit(a,this,_bf3)===false){
log("ajaxSubmit: submit aborted via beforeSubmit callback");
return this;
}
this.trigger("form-submit-validate",[a,this,_bf3,veto]);
if(veto.veto){
log("ajaxSubmit: submit vetoed via form-submit-validate trigger");
return this;
}
var q=$.param(a);
if(_bf3.type.toUpperCase()=="GET"){
_bf3.url+=(_bf3.url.indexOf("?")>=0?"&":"?")+q;
_bf3.data=null;
}else{
_bf3.data=q;
}
var _bfa=this,_bfb=[];
if(_bf3.resetForm){
_bfb.push(function(){
_bfa.resetForm();
});
}
if(_bf3.clearForm){
_bfb.push(function(){
_bfa.clearForm();
});
}
if(!_bf3.dataType&&_bf3.target){
var _bfc=_bf3.success||function(){
};
_bfb.push(function(data){
$(_bf3.target).html(data).each(_bfc,arguments);
});
}else{
if(_bf3.success){
_bfb.push(_bf3.success);
}
}
_bf3.success=function(data,_bff){
for(var i=0,max=_bfb.length;i<max;i++){
_bfb[i].apply(_bf3,[data,_bff,_bfa]);
}
};
var _c02=$("input:file",this).fieldValue();
var _c03=false;
for(var j=0;j<_c02.length;j++){
if(_c02[j]){
_c03=true;
}
}
var _c05=false;
if((_c02.length&&_bf3.iframe!==false)||_bf3.iframe||_c03||_c05){
if(_bf3.closeKeepAlive){
$.get(_bf3.closeKeepAlive,fileUpload);
}else{
fileUpload();
}
}else{
$.ajax(_bf3);
}
this.trigger("form-submit-notify",[this,_bf3]);
return this;
function fileUpload(){
var form=_bfa[0];
if($(":input[name=submit]",form).length){
alert("Error: Form elements must not be named \"submit\".");
return;
}
var opts=$.extend({},$.ajaxSettings,_bf3);
var s=$.extend(true,{},$.extend(true,{},$.ajaxSettings),opts);
var id="jqFormIO"+(new Date().getTime());
var $io=$("<iframe id=\""+id+"\" name=\""+id+"\" src=\""+opts.iframeSrc+"\" />");
var io=$io[0];
$io.css({position:"absolute",top:"-1000px",left:"-1000px"});
var xhr={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){
},getResponseHeader:function(){
},setRequestHeader:function(){
},abort:function(){
this.aborted=1;
$io.attr("src",opts.iframeSrc);
}};
var g=opts.global;
if(g&&!$.active++){
$.event.trigger("ajaxStart");
}
if(g){
$.event.trigger("ajaxSend",[xhr,opts]);
}
if(s.beforeSend&&s.beforeSend(xhr,s)===false){
s.global&&$.active--;
return;
}
if(xhr.aborted){
return;
}
var _c0e=0;
var _c0f=0;
var sub=form.clk;
if(sub){
var n=sub.name;
if(n&&!sub.disabled){
_bf3.extraData=_bf3.extraData||{};
_bf3.extraData[n]=sub.value;
if(sub.type=="image"){
_bf3.extraData[name+".x"]=form.clk_x;
_bf3.extraData[name+".y"]=form.clk_y;
}
}
}
setTimeout(function(){
var t=_bfa.attr("target"),a=_bfa.attr("action");
form.setAttribute("target",id);
if(form.getAttribute("method")!="POST"){
form.setAttribute("method","POST");
}
if(form.getAttribute("action")!=opts.url){
form.setAttribute("action",opts.url);
}
if(!_bf3.skipEncodingOverride){
_bfa.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"});
}
if(opts.timeout){
setTimeout(function(){
_c0f=true;
cb();
},opts.timeout);
}
var _c13=[];
try{
if(_bf3.extraData){
for(var n in _bf3.extraData){
_c13.push($("<input type=\"hidden\" name=\""+n+"\" value=\""+_bf3.extraData[n]+"\" />").appendTo(form)[0]);
}
}
$io.appendTo("body");
io.attachEvent?io.attachEvent("onload",cb):io.addEventListener("load",cb,false);
form.submit();
}
finally{
form.setAttribute("action",a);
t?form.setAttribute("target",t):_bfa.removeAttr("target");
$(_c13).remove();
}
},10);
var _c15=50;
function cb(){
if(_c0e++){
return;
}
io.detachEvent?io.detachEvent("onload",cb):io.removeEventListener("load",cb,false);
var ok=true;
try{
if(_c0f){
throw "timeout";
}
var data,doc;
doc=io.contentWindow?io.contentWindow.document:io.contentDocument?io.contentDocument:io.document;
var _c19=opts.dataType=="xml"||doc.XMLDocument||$.isXMLDoc(doc);
log("isXml="+_c19);
if(!_c19&&(doc.body==null||doc.body.innerHTML=="")){
if(--_c15){
_c0e=0;
setTimeout(cb,100);
return;
}
log("Could not access iframe DOM after 50 tries.");
return;
}
xhr.responseText=doc.body?doc.body.innerHTML:null;
xhr.responseXML=doc.XMLDocument?doc.XMLDocument:doc;
xhr.getResponseHeader=function(_c1a){
var _c1b={"content-type":opts.dataType};
return _c1b[_c1a];
};
if(opts.dataType=="json"||opts.dataType=="script"){
var ta=doc.getElementsByTagName("textarea")[0];
if(ta){
xhr.responseText=ta.value;
}else{
var pre=doc.getElementsByTagName("pre")[0];
if(pre){
xhr.responseText=pre.innerHTML;
}
}
}else{
if(opts.dataType=="xml"&&!xhr.responseXML&&xhr.responseText!=null){
xhr.responseXML=toXml(xhr.responseText);
}
}
data=$.httpData(xhr,opts.dataType);
}
catch(e){
ok=false;
$.handleError(opts,xhr,"error",e);
}
if(ok){
opts.success(data,"success");
if(g){
$.event.trigger("ajaxSuccess",[xhr,opts]);
}
}
if(g){
$.event.trigger("ajaxComplete",[xhr,opts]);
}
if(g&&!--$.active){
$.event.trigger("ajaxStop");
}
if(opts.complete){
opts.complete(xhr,ok?"success":"error");
}
setTimeout(function(){
$io.remove();
xhr.responseXML=null;
},100);
};
function toXml(s,doc){
if(window.ActiveXObject){
doc=new ActiveXObject("Microsoft.XMLDOM");
doc.async="false";
doc.loadXML(s);
}else{
doc=(new DOMParser()).parseFromString(s,"text/xml");
}
return (doc&&doc.documentElement&&doc.documentElement.tagName!="parsererror")?doc:null;
};
};
};
$.fn.ajaxForm=function(_c20){
return this.ajaxFormUnbind().bind("submit.form-plugin",function(){
$(this).ajaxSubmit(_c20);
return false;
}).bind("click.form-plugin",function(e){
var _c22=e.target;
var $el=$(_c22);
if(!($el.is(":submit,input:image"))){
var t=$el.closest(":submit");
if(t.length==0){
return;
}
_c22=t[0];
}
var form=this;
form.clk=_c22;
if(_c22.type=="image"){
if(e.offsetX!=undefined){
form.clk_x=e.offsetX;
form.clk_y=e.offsetY;
}else{
if(typeof $.fn.offset=="function"){
var _c26=$el.offset();
form.clk_x=e.pageX-_c26.left;
form.clk_y=e.pageY-_c26.top;
}else{
form.clk_x=e.pageX-_c22.offsetLeft;
form.clk_y=e.pageY-_c22.offsetTop;
}
}
}
setTimeout(function(){
form.clk=form.clk_x=form.clk_y=null;
},100);
});
};
$.fn.ajaxFormUnbind=function(){
return this.unbind("submit.form-plugin click.form-plugin");
};
$.fn.formToArray=function(_c27){
var a=[];
if(this.length==0){
return a;
}
var form=this[0];
var els=_c27?form.getElementsByTagName("*"):form.elements;
if(!els){
return a;
}
for(var i=0,max=els.length;i<max;i++){
var el=els[i];
var n=el.name;
if(!n){
continue;
}
if(_c27&&form.clk&&el.type=="image"){
if(!el.disabled&&form.clk==el){
a.push({name:n,value:$(el).val()});
a.push({name:n+".x",value:form.clk_x},{name:n+".y",value:form.clk_y});
}
continue;
}
var v=$.fieldValue(el,true);
if(v&&v.constructor==Array){
for(var j=0,jmax=v.length;j<jmax;j++){
a.push({name:n,value:v[j]});
}
}else{
if(v!==null&&typeof v!="undefined"){
a.push({name:n,value:v});
}
}
}
if(!_c27&&form.clk){
var _c32=$(form.clk),_c33=_c32[0],n=_c33.name;
if(n&&!_c33.disabled&&_c33.type=="image"){
a.push({name:n,value:_c32.val()});
a.push({name:n+".x",value:form.clk_x},{name:n+".y",value:form.clk_y});
}
}
return a;
};
$.fn.formSerialize=function(_c34){
return $.param(this.formToArray(_c34));
};
$.fn.fieldSerialize=function(_c35){
var a=[];
this.each(function(){
var n=this.name;
if(!n){
return;
}
var v=$.fieldValue(this,_c35);
if(v&&v.constructor==Array){
for(var i=0,max=v.length;i<max;i++){
a.push({name:n,value:v[i]});
}
}else{
if(v!==null&&typeof v!="undefined"){
a.push({name:this.name,value:v});
}
}
});
return $.param(a);
};
$.fn.fieldValue=function(_c3b){
for(var val=[],i=0,max=this.length;i<max;i++){
var el=this[i];
var v=$.fieldValue(el,_c3b);
if(v===null||typeof v=="undefined"||(v.constructor==Array&&!v.length)){
continue;
}
v.constructor==Array?$.merge(val,v):val.push(v);
}
return val;
};
$.fieldValue=function(el,_c42){
var n=el.name,t=el.type,tag=el.tagName.toLowerCase();
if(typeof _c42=="undefined"){
_c42=true;
}
if(_c42&&(!n||el.disabled||t=="reset"||t=="button"||(t=="checkbox"||t=="radio")&&!el.checked||(t=="submit"||t=="image")&&el.form&&el.form.clk!=el||tag=="select"&&el.selectedIndex==-1)){
return null;
}
if(tag=="select"){
var _c46=el.selectedIndex;
if(_c46<0){
return null;
}
var a=[],ops=el.options;
var one=(t=="select-one");
var max=(one?_c46+1:ops.length);
for(var i=(one?_c46:0);i<max;i++){
var op=ops[i];
if(op.selected){
var v=op.value;
if(!v){
v=(op.attributes&&op.attributes["value"]&&!(op.attributes["value"].specified))?op.text:op.value;
}
if(one){
return v;
}
a.push(v);
}
}
return a;
}
return el.value;
};
$.fn.clearForm=function(){
return this.each(function(){
$("input,select,textarea",this).clearFields();
});
};
$.fn.clearFields=$.fn.clearInputs=function(){
return this.each(function(){
var t=this.type,tag=this.tagName.toLowerCase();
if(t=="text"||t=="password"||tag=="textarea"){
this.value="";
}else{
if(t=="checkbox"||t=="radio"){
this.checked=false;
}else{
if(tag=="select"){
this.selectedIndex=-1;
}
}
}
});
};
$.fn.resetForm=function(){
return this.each(function(){
if(typeof this.reset=="function"||(typeof this.reset=="object"&&!this.reset.nodeType)){
this.reset();
}
});
};
$.fn.enable=function(b){
if(b==undefined){
b=true;
}
return this.each(function(){
this.disabled=!b;
});
};
$.fn.selected=function(_c51){
if(_c51==undefined){
_c51=true;
}
return this.each(function(){
var t=this.type;
if(t=="checkbox"||t=="radio"){
this.checked=_c51;
}else{
if(this.tagName.toLowerCase()=="option"){
var $sel=$(this).parent("select");
if(_c51&&$sel[0]&&$sel[0].type=="select-one"){
$sel.find("option").selected(false);
}
this.selected=_c51;
}
}
});
};
function log(){
if($.fn.ajaxSubmit.debug&&window.console&&window.console.log){
window.console.log("[jquery.form] "+Array.prototype.join.call(arguments,""));
}
};
})(jQuery);
(function($){
$.ui=$.ui||{};
$.fn.extend({accordion:function(_c55,data){
var args=Array.prototype.slice.call(arguments,1);
return this.each(function(){
if(typeof _c55=="string"){
var _c58=$.data(this,"ui-accordion");
_c58[_c55].apply(_c58,args);
}else{
if(!$(this).is(".ui-accordion")){
$.data(this,"ui-accordion",new $.ui.accordion(this,_c55));
}
}
});
},activate:function(_c59){
return this.accordion("activate",_c59);
}});
$.ui.accordion=function(_c5a,_c5b){
this.options=_c5b=$.extend({},$.ui.accordion.defaults,_c5b);
this.element=_c5a;
$(_c5a).addClass("ui-accordion");
if(_c5b.navigation){
var _c5c=$(_c5a).find("a").filter(_c5b.navigationFilter);
if(_c5c.length){
if(_c5c.filter(_c5b.header).length){
_c5b.active=_c5c;
}else{
_c5b.active=_c5c.parent().parent().prev();
_c5c.addClass("current");
}
}
}
_c5b.headers=$(_c5a).find(_c5b.header);
_c5b.active=findActive(_c5b.headers,_c5b.active);
if(_c5b.fillSpace){
var _c5d=$(_c5a).parent().height();
_c5b.headers.each(function(){
_c5d-=$(this).outerHeight();
});
var _c5e=0;
_c5b.headers.next().each(function(){
_c5e=Math.max(_c5e,$(this).innerHeight()-$(this).height());
}).height(_c5d-_c5e);
}else{
if(_c5b.autoheight){
var _c5d=0;
_c5b.headers.next().each(function(){
_c5d=Math.max(_c5d,$(this).outerHeight());
}).height(_c5d);
}
}
_c5b.headers.not(_c5b.active||"").next().hide();
_c5b.active.parent().andSelf().addClass(_c5b.selectedClass);
if(_c5b.event){
$(_c5a).bind((_c5b.event)+".ui-accordion",clickHandler);
}
};
$.ui.accordion.prototype={activate:function(_c5f){
clickHandler.call(this.element,{target:findActive(this.options.headers,_c5f)[0]});
},enable:function(){
this.options.disabled=false;
},disable:function(){
this.options.disabled=true;
},destroy:function(){
this.options.headers.next().css("display","");
if(this.options.fillSpace||this.options.autoheight){
this.options.headers.next().css("height","");
}
$.removeData(this.element,"ui-accordion");
$(this.element).removeClass("ui-accordion").unbind(".ui-accordion");
}};
function scopeCallback(_c60,_c61){
return function(){
return _c60.apply(_c61,arguments);
};
};
function completed(_c62){
if(!$.data(this,"ui-accordion")){
return;
}
var _c63=$.data(this,"ui-accordion");
var _c64=_c63.options;
_c64.running=_c62?0:--_c64.running;
if(_c64.running){
return;
}
if(_c64.clearStyle){
_c64.toShow.add(_c64.toHide).css({height:"",overflow:""});
}
$(this).triggerHandler("change.ui-accordion",[_c64.data],_c64.change);
};
function toggle(_c65,_c66,data,_c68,down){
var _c6a=$.data(this,"ui-accordion").options;
_c6a.toShow=_c65;
_c6a.toHide=_c66;
_c6a.data=data;
var _c6b=scopeCallback(completed,this);
_c6a.running=_c66.size()==0?_c65.size():_c66.size();
if(_c6a.animated){
if(!_c6a.alwaysOpen&&_c68){
$.ui.accordion.animations[_c6a.animated]({toShow:jQuery([]),toHide:_c66,complete:_c6b,down:down,autoheight:_c6a.autoheight});
}else{
$.ui.accordion.animations[_c6a.animated]({toShow:_c65,toHide:_c66,complete:_c6b,down:down,autoheight:_c6a.autoheight});
}
}else{
if(!_c6a.alwaysOpen&&_c68){
_c65.toggle();
}else{
_c66.hide();
_c65.show();
}
_c6b(true);
}
};
function clickHandler(_c6c){
var _c6d=$.data(this,"ui-accordion").options;
if(_c6d.disabled){
return false;
}
if(!_c6c.target&&!_c6d.alwaysOpen){
_c6d.active.parent().andSelf().toggleClass(_c6d.selectedClass);
var _c6e=_c6d.active.next(),data={instance:this,options:_c6d,newHeader:jQuery([]),oldHeader:_c6d.active,newContent:jQuery([]),oldContent:_c6e},_c70=_c6d.active=$([]);
toggle.call(this,_c70,_c6e,data);
return false;
}
var _c71=$(_c6c.target);
if(_c71.parents(_c6d.header).length){
while(!_c71.is(_c6d.header)){
_c71=_c71.parent();
}
}
var _c72=_c71[0]==_c6d.active[0];
if(_c6d.running||(_c6d.alwaysOpen&&_c72)){
return false;
}
if(!_c71.is(_c6d.header)){
return;
}
_c6d.active.parent().andSelf().toggleClass(_c6d.selectedClass);
if(!_c72){
_c71.parent().andSelf().addClass(_c6d.selectedClass);
}
var _c70=_c71.next(),_c6e=_c6d.active.next(),data={instance:this,options:_c6d,newHeader:_c71,oldHeader:_c6d.active,newContent:_c70,oldContent:_c6e},down=_c6d.headers.index(_c6d.active[0])>_c6d.headers.index(_c71[0]);
_c6d.active=_c72?$([]):_c71;
toggle.call(this,_c70,_c6e,data,_c72,down);
return false;
};
function findActive(_c74,_c75){
return _c75!=undefined?typeof _c75=="number"?_c74.filter(":eq("+_c75+")"):_c74.not(_c74.not(_c75)):_c75===false?$([]):_c74.filter(":eq(0)");
};
$.extend($.ui.accordion,{defaults:{selectedClass:"selected",alwaysOpen:true,animated:"slide",event:"click",header:"a",autoheight:true,running:0,navigationFilter:function(){
return this.href.toLowerCase()==location.href.toLowerCase();
}},animations:{slide:function(_c76,_c77){
_c76=$.extend({easing:"swing",duration:300},_c76,_c77);
if(!_c76.toHide.size()){
_c76.toShow.animate({height:"show"},_c76);
return;
}
var _c78=_c76.toHide.height(),_c79=_c76.toShow.height(),_c7a=_c79/_c78;
_c76.toShow.css({height:0,overflow:"hidden"}).show();
_c76.toHide.filter(":hidden").each(_c76.complete).end().filter(":visible").animate({height:"hide"},{step:function(now){
var _c7c=(_c78-now)*_c7a;
if($.browser.msie||$.browser.opera){
_c7c=Math.ceil(_c7c);
}
_c76.toShow.height(_c7c);
},duration:_c76.duration,easing:_c76.easing,complete:function(){
if(!_c76.autoheight){
_c76.toShow.css("height","auto");
}
_c76.complete();
}});
},bounceslide:function(_c7d){
this.slide(_c7d,{easing:_c7d.down?"bounceout":"swing",duration:_c7d.down?1000:200});
},easeslide:function(_c7e){
this.slide(_c7e,{easing:"easeinout",duration:700});
}}});
})(jQuery);
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(_c7f){
return _c7f.collapse;
},func:function(_c80,_c81){
_c80.parentNode.removeChild(_c80);
_c81.div.className=_c81.div.className.replace("collapsed","");
}},ViewSource:{label:"view plain",func:function(_c82,_c83){
var code=dp.sh.Utils.FixForBlogger(_c83.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(_c86){
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(_c86)){
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,_c8b){
var n=_c8b;
while(n!=null&&n.className.indexOf("dp-highlighter")==-1){
n=n.parentNode;
}
if(n!=null){
dp.sh.Toolbar.Commands[name].func(_c8b,n.highlighter);
}
};
dp.sh.Utils.CopyStyles=function(_c8d,_c8e){
var _c8f=_c8e.getElementsByTagName("link");
for(var i=0;i<_c8f.length;i++){
if(_c8f[i].rel.toLowerCase()=="stylesheet"){
_c8d.write("<link type=\"text/css\" rel=\"stylesheet\" href=\""+_c8f[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(_c92,_c93,css){
this.value=_c92;
this.index=_c93;
this.length=_c92.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 _c98=document.createElement(name);
_c98.highlighter=this;
return _c98;
};
dp.sh.Highlighter.prototype.GetMatches=function(_c99,css){
var _c9b=0;
var _c9c=null;
while((_c9c=_c99.exec(this.code))!=null){
this.matches[this.matches.length]=new dp.sh.Match(_c9c[0],_c9c.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 _ca0=str.split("&nbsp;<br>");
for(var i=0;i<_ca0.length;i++){
span=this.CreateElement("SPAN");
span.className=css;
span.innerHTML=_ca0[i];
this.div.appendChild(span);
if(i+1<_ca0.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(_ca2){
if(_ca2==null||_ca2.length==0){
return false;
}
for(var i=0;i<this.matches.length;i++){
var c=this.matches[i];
if(c==null){
continue;
}
if((_ca2.index>c.index)&&(_ca2.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 _ca7=code.split("\n");
var _ca8="";
var _ca9=4;
var tab="\t";
function InsertSpaces(line,pos,_cad){
var left=line.substr(0,pos);
var _caf=line.substr(pos+1,line.length);
var _cb0="";
for(var i=0;i<_cad;i++){
_cb0+=" ";
}
return left+_cb0+_caf;
};
function ProcessLine(line,_cb3){
if(line.indexOf(tab)==-1){
return line;
}
var pos=0;
while((pos=line.indexOf(tab))!=-1){
var _cb5=_cb3-pos%_cb3;
line=InsertSpaces(line,pos,_cb5);
}
return line;
};
for(var i=0;i<_ca7.length;i++){
_ca8+=ProcessLine(_ca7[i],_ca9)+"\n";
}
return _ca8;
};
dp.sh.Highlighter.prototype.SwitchToList=function(){
var html=this.div.innerHTML.replace(/<(br)\/?>/gi,"\n");
var _cb8=html.split("\n");
if(this.addControls==true){
this.bar.appendChild(dp.sh.Toolbar.Create(this));
}
if(this.showColumns){
var div=this.CreateElement("div");
var _cba=this.CreateElement("div");
var _cbb=10;
var i=1;
while(i<=150){
if(i%_cbb==0){
div.innerHTML+=i;
i+=(i+"").length;
}else{
div.innerHTML+="&middot;";
i++;
}
}
_cba.className="dp-columns";
_cba.appendChild(div);
this.bar.appendChild(_cba);
}
for(var i=0,_cbd=this.firstLine;i<_cb8.length-1;i++,_cbd++){
var li=this.CreateElement("LI");
var span=this.CreateElement("SPAN");
li.className=(i%2==0)?"alt":"";
span.innerHTML=_cb8[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 _cc4=dp.sh.Utils.FixForBlogger(str).split("\n");
var _cc5=new Array();
var _cc6=new RegExp("^\\s*","g");
var min=1000;
for(var i=0;i<_cc4.length&&min>0;i++){
if(Trim(_cc4[i]).length==0){
continue;
}
var _cc9=_cc6.exec(_cc4[i]);
if(_cc9!=null&&_cc9.length>0){
min=Math.min(_cc9[0].length,min);
}
}
if(min>0){
for(var i=0;i<_cc4.length;i++){
_cc4[i]=_cc4[i].substr(min);
}
}
return _cc4.join("\n");
};
function Copy(_cca,pos1,pos2){
return _cca.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 _ccf=this.matches[i];
if(_ccf==null||_ccf.length==0){
continue;
}
this.AddBit(Copy(this.code,pos,_ccf.index),null);
this.AddBit(_ccf.value,_ccf.css);
pos=_ccf.index+_ccf.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,_cd2,_cd3,_cd4,_cd5,_cd6){
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(_cd9,list){
for(var i=0;i<list.length;i++){
if(list[i]==_cd9){
return true;
}
}
return false;
};
function GetOptionValue(name,list,_cde){
var _cdf=new RegExp("^"+name+"\\[(\\w+)\\]$","gi");
var _ce0=null;
for(var i=0;i<list.length;i++){
if((_ce0=_cdf.exec(list[i]))!=null){
return _ce0[1];
}
}
return _cde;
};
function FindTagsByName(list,name,_ce4){
var tags=document.getElementsByTagName(_ce4);
for(var i=0;i<tags.length;i++){
if(tags[i].getAttribute("name")==name){
list.push(tags[i]);
}
}
};
var _ce7=[];
var _ce8=null;
var _ce9={};
var _cea="innerHTML";
FindTagsByName(_ce7,name,"pre");
FindTagsByName(_ce7,name,"textarea");
if(_ce7.length==0){
return;
}
for(var _ceb in dp.sh.Brushes){
var _cec=dp.sh.Brushes[_ceb].Aliases;
if(_cec==null){
continue;
}
for(var i=0;i<_cec.length;i++){
_ce9[_cec[i]]=_ceb;
}
}
for(var i=0;i<_ce7.length;i++){
var _cee=_ce7[i];
var _cef=FindValue(_cee.attributes["class"],_cee.className,_cee.attributes["language"],_cee.language);
var _cf0="";
if(_cef==null){
continue;
}
_cef=_cef.split(":");
_cf0=_cef[0].toLowerCase();
if(_ce9[_cf0]==null){
continue;
}
_ce8=new dp.sh.Brushes[_ce9[_cf0]]();
_cee.style.display="none";
_ce8.noGutter=(_cd2==null)?IsOptionSet("nogutter",_cef):!_cd2;
_ce8.addControls=(_cd3==null)?!IsOptionSet("nocontrols",_cef):_cd3;
_ce8.collapse=(_cd4==null)?IsOptionSet("collapse",_cef):_cd4;
_ce8.showColumns=(_cd6==null)?IsOptionSet("showcolumns",_cef):_cd6;
var _cf1=document.getElementsByTagName("head")[0];
if(_ce8.Style&&_cf1){
var _cf2=document.createElement("style");
_cf2.setAttribute("type","text/css");
if(_cf2.styleSheet){
_cf2.styleSheet.cssText=_ce8.Style;
}else{
var _cf3=document.createTextNode(_ce8.Style);
_cf2.appendChild(_cf3);
}
_cf1.appendChild(_cf2);
}
_ce8.firstLine=(_cd5==null)?parseInt(GetOptionValue("firstline",_cef,1)):_cd5;
_ce8.Highlight(_cee[_cea]);
_ce8.source=_cee;
_cee.parentNode.insertBefore(_ce8.div,_cee);
}
};
dp.sh.Brushes.Cpp=function(){
var _cf4="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 _cf5="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(_cf4),"gm"),css:"datatypes"},{regex:new RegExp(this.GetKeywords(_cf5),"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 _cf6="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(_cf6),"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 _cf7="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 _cf8="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 _cf9="[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(_cf7),"gm"),css:"dp-keyword"},{regex:new RegExp(this.GetValuesCSS(_cf8),"g"),css:"value"},{regex:new RegExp(this.GetValuesCSS(_cf9),"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 _cfc="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(_cfc),"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(_cfd,_cfe){
_cfd[_cfd.length]=_cfe;
};
var _cff=0;
var _d00=null;
var _d01=null;
this.GetMatches(new RegExp("(&lt;|<)\\!\\[[\\w\\s]*?\\[(.|\\s)*?\\]\\](&gt;|>)","gm"),"cdata");
this.GetMatches(new RegExp("(&lt;|<)!--\\s*.*?\\s*--(&gt;|>)","gm"),"dp-comments");
_d01=new RegExp("([:\\w-.]+)\\s*=\\s*(\".*?\"|'.*?'|\\w+)*|(\\w+)","gm");
while((_d00=_d01.exec(this.code))!=null){
if(_d00[1]==null){
continue;
}
push(this.matches,new dp.sh.Match(_d00[1],_d00.index,"attribute"));
if(_d00[2]!=undefined){
push(this.matches,new dp.sh.Match(_d00[2],_d00.index+_d00[0].indexOf(_d00[2]),"attribute-value"));
}
}
this.GetMatches(new RegExp("(&lt;|<)/*\\?*(?!\\!)|/*\\?*(&gt;|>)","gm"),"tag");
_d01=new RegExp("(?:&lt;|<)/*\\?*\\s*([:\\w-.]+)","gm");
while((_d00=_d01.exec(this.code))!=null){
push(this.matches,new dp.sh.Match(_d00[1],_d00.index+_d00[0].indexOf(_d00[1]),"tag-name"));
}
};
dp.sh.Brushes.Java=function(){
var _d02="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(_d02),"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 _d03="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(_d03),"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 _d04="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 _d05="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(_d04),"gmi"),css:"func"},{regex:new RegExp(this.GetKeywords(_d05),"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 _d06="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 _d07="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(_d06),"gm"),css:"dp-keyword"},{regex:new RegExp(this.GetKeywords(_d07),"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 _d08="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 _d09="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(_d08),"gm"),css:"dp-keyword"},{regex:new RegExp(this.GetKeywords(_d09),"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 _d0a="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 _d0b="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 _d0c="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(_d0a),"gmi"),css:"func"},{regex:new RegExp(this.GetKeywords(_d0c),"gmi"),css:"op"},{regex:new RegExp(this.GetKeywords(_d0b),"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 _d0d="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(_d0d),"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(_d0e,_d0f){
_d0e[_d0e.length]=_d0f;
};
var _d10=0;
var _d11=null;
var _d12=null;
this.GetMatches(new RegExp("(&lt;|<)\\!\\[[\\w\\s]*?\\[(.|\\s)*?\\]\\](&gt;|>)","gm"),"cdata");
this.GetMatches(new RegExp("(&lt;|<)!--\\s*.*?\\s*--(&gt;|>)","gm"),"dp-comments");
_d12=new RegExp("([:\\w-.]+)\\s*=\\s*(\".*?\"|'.*?'|\\w+)*|(\\w+)","gm");
while((_d11=_d12.exec(this.code))!=null){
if(_d11[1]==null){
continue;
}
push(this.matches,new dp.sh.Match(_d11[1],_d11.index,"attribute"));
if(_d11[2]!=undefined){
push(this.matches,new dp.sh.Match(_d11[2],_d11.index+_d11[0].indexOf(_d11[2]),"attribute-value"));
}
}
this.GetMatches(new RegExp("(&lt;|<)/*\\?*(?!\\!)|/*\\?*(&gt;|>)","gm"),"tag");
_d12=new RegExp("(?:&lt;|<)/*\\?*\\s*([:\\w-.]+)","gm");
while((_d11=_d12.exec(this.code))!=null){
push(this.matches,new dp.sh.Match(_d11[1],_d11.index+_d11[0].indexOf(_d11[1]),"tag-name"));
}
};


