// JavaScript Document
/*Copyright (c) 2006, Yahoo! Inc. All rights reserved. Code licensed under the BSD   License: http://developer.yahoo.net/yui/license.txt version: 0.11.0*/ 

var YAHOO=window.YAHOO||{};YAHOO.namespace=function(ns){if(!ns||!ns.length){return null;}var _2=ns.split(".");var _3=YAHOO;for(var i=(_2[0]=="YAHOO")?1:0;i<_2.length;++i){_3[_2[i]]=_3[_2[i]]||{};_3=_3[_2[i]];}return _3;};YAHOO.log=function(_5,_6,_7){var l=YAHOO.widget.Logger;if(l&&l.log){return l.log(_5,_6,_7);}else{return false;}};YAHOO.extend=function(_9,_10){var f=function(){};f.prototype=_10.prototype;_9.prototype=new f();_9.prototype.constructor=_9;_9.superclass=_10.prototype;if(_10.prototype.constructor==Object.prototype.constructor){_10.prototype.constructor=_10;}};YAHOO.namespace("util");YAHOO.namespace("widget");YAHOO.namespace("example");

YAHOO.util.CustomEvent=function(_1,_2,_3){this.type=_1;this.scope=_2||window;this.silent=_3;this.subscribers=[];if(YAHOO.util.Event){YAHOO.util.Event.regCE(this);}if(!this.silent){}};YAHOO.util.CustomEvent.prototype={subscribe:function(fn,_5,_6){this.subscribers.push(new YAHOO.util.Subscriber(fn,_5,_6));},unsubscribe:function(fn,_7){var _8=false;for(var i=0,len=this.subscribers.length;i<len;++i){var s=this.subscribers[i];if(s&&s.contains(fn,_7)){this._delete(i);_8=true;}}return _8;},fire:function(){var len=this.subscribers.length;var _12=[];for(var i=0;i<arguments.length;++i){_12.push(arguments[i]);}if(!this.silent){}for(i=0;i<len;++i){var s=this.subscribers[i];if(s){if(!this.silent){}var _13=(s.override)?s.obj:this.scope;s.fn.call(_13,this.type,_12,s.obj);}}},unsubscribeAll:function(){for(var i=0,len=this.subscribers.length;i<len;++i){this._delete(i);}},_delete:function(_14){var s=this.subscribers[_14];if(s){delete s.fn;delete s.obj;}delete this.subscribers[_14];},toString:function(){return "CustomEvent: "+"'"+this.type+"', "+"scope: "+this.scope;}};YAHOO.util.Subscriber=function(fn,obj,_16){this.fn=fn;this.obj=obj||null;this.override=(_16);};YAHOO.util.Subscriber.prototype.contains=function(fn,obj){return (this.fn==fn&&this.obj==obj);};YAHOO.util.Subscriber.prototype.toString=function(){return "Subscriber { obj: "+(this.obj||"")+", override: "+(this.override||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var _17=false;var _18=[];var _19=[];var _20=[];var _21=[];var _22=[];var _23=[];var _24=0;var _25=[];var _26=[];var _27=0;return {POLL_RETRYS:200,POLL_INTERVAL:50,EL:0,TYPE:1,FN:2,WFN:3,SCOPE:3,ADJ_SCOPE:4,isSafari:(/Safari|Konqueror|KHTML/gi).test(navigator.userAgent),isIE:(!this.isSafari&&!navigator.userAgent.match(/opera/gi)&&navigator.userAgent.match(/msie/gi)),addDelayedListener:function(el,_29,fn,_30,_31){_19[_19.length]=[el,_29,fn,_30,_31];if(_17){_24=this.POLL_RETRYS;this.startTimeout(0);}},startTimeout:function(_32){var i=(_32||_32===0)?_32:this.POLL_INTERVAL;var _33=this;var _34=function(){_33._tryPreloadAttach();};this.timeout=setTimeout(_34,i);},onAvailable:function(_35,_36,_37,_38){_25.push({id:_35,fn:_36,obj:_37,override:_38});_24=this.POLL_RETRYS;this.startTimeout(0);},addListener:function(el,_39,fn,_40,_41){if(!fn||!fn.call){return false;}if(this._isValidCollection(el)){var ok=true;for(var i=0,len=el.length;i<len;++i){ok=(this.on(el[i],_39,fn,_40,_41)&&ok);}return ok;}else{if(typeof el=="string"){var oEl=this.getEl(el);if(_17&&oEl){el=oEl;}else{this.addDelayedListener(el,_39,fn,_40,_41);return true;}}}if(!el){return false;}if("unload"==_39&&_40!==this){_20[_20.length]=[el,_39,fn,_40,_41];return true;}var _44=(_41)?_40:el;var _45=function(e){return fn.call(_44,YAHOO.util.Event.getEvent(e),_40);};var li=[el,_39,fn,_45,_44];var _48=_18.length;_18[_48]=li;if(this.useLegacyEvent(el,_39)){var _49=this.getLegacyIndex(el,_39);if(_49==-1){_49=_22.length;_26[el.id+_39]=_49;_22[_49]=[el,_39,el["on"+_39]];_23[_49]=[];el["on"+_39]=function(e){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(e),_49);};}_23[_49].push(_48);}else{if(el.addEventListener){el.addEventListener(_39,_45,false);}else{if(el.attachEvent){el.attachEvent("on"+_39,_45);}}}return true;},fireLegacyEvent:function(e,_50){var ok=true;var le=_23[_50];for(var i=0,len=le.length;i<len;++i){var _52=le[i];if(_52){var li=_18[_52];if(li&&li[this.WFN]){var _53=li[this.ADJ_SCOPE];var ret=li[this.WFN].call(_53,e);ok=(ok&&ret);}else{delete le[i];}}}return ok;},getLegacyIndex:function(el,_55){var key=this.generateId(el)+_55;if(typeof _26[key]=="undefined"){return -1;}else{return _26[key];}},useLegacyEvent:function(el,_57){if(!el.addEventListener&&!el.attachEvent){return true;}else{if(this.isSafari){if("click"==_57||"dblclick"==_57){return true;}}}return false;},removeListener:function(el,_58,fn,_59){if(!fn||!fn.call){return false;}if(typeof el=="string"){el=this.getEl(el);}else{if(this._isValidCollection(el)){var ok=true;for(var i=0,len=el.length;i<len;++i){ok=(this.removeListener(el[i],_58,fn)&&ok);}return ok;}}if("unload"==_58){for(i=0,len=_20.length;i<len;i++){var li=_20[i];if(li&&li[0]==el&&li[1]==_58&&li[2]==fn){delete _20[i];return true;}}return false;}var _60=null;if("undefined"==typeof _59){_59=this._getCacheIndex(el,_58,fn);}if(_59>=0){_60=_18[_59];}if(!el||!_60){return false;}if(el.removeEventListener){el.removeEventListener(_58,_60[this.WFN],false);}else{if(el.detachEvent){el.detachEvent("on"+_58,_60[this.WFN]);}}delete _18[_59][this.WFN];delete _18[_59][this.FN];delete _18[_59];return true;},getTarget:function(ev,_62){var t=ev.target||ev.srcElement;return this.resolveTextNode(t);},resolveTextNode:function(_64){if(_64&&_64.nodeName&&"#TEXT"==_64.nodeName.toUpperCase()){return _64.parentNode;}else{return _64;}},getPageX:function(ev){var x=ev.pageX;if(!x&&0!==x){x=ev.clientX||0;if(this.isIE){x+=this._getScrollLeft();}}return x;},getPageY:function(ev){var y=ev.pageY;if(!y&&0!==y){y=ev.clientY||0;if(this.isIE){y+=this._getScrollTop();}}return y;},getXY:function(ev){return [this.getPageX(ev),this.getPageY(ev)];},getRelatedTarget:function(ev){var t=ev.relatedTarget;if(!t){if(ev.type=="mouseout"){t=ev.toElement;}else{if(ev.type=="mouseover"){t=ev.fromElement;}}}return this.resolveTextNode(t);},getTime:function(ev){if(!ev.time){var t=new Date().getTime();try{ev.time=t;}catch(e){return t;}}return ev.time;},stopEvent:function(ev){this.stopPropagation(ev);this.preventDefault(ev);},stopPropagation:function(ev){if(ev.stopPropagation){ev.stopPropagation();}else{ev.cancelBubble=true;}},preventDefault:function(ev){if(ev.preventDefault){ev.preventDefault();}else{ev.returnValue=false;}},getEvent:function(e){var ev=e||window.event;if(!ev){var c=this.getEvent.caller;while(c){ev=c.arguments[0];if(ev&&Event==ev.constructor){break;}c=c.caller;}}return ev;},getCharCode:function(ev){return ev.charCode||((ev.type=="keypress")?ev.keyCode:0);},_getCacheIndex:function(el,_68,fn){for(var i=0,len=_18.length;i<len;++i){var li=_18[i];if(li&&li[this.FN]==fn&&li[this.EL]==el&&li[this.TYPE]==_68){return i;}}return -1;},generateId:function(el){var id=el.id;if(!id){id="yuievtautoid-"+_27;++_27;el.id=id;}return id;},_isValidCollection:function(o){return (o&&o.length&&typeof o!="string"&&!o.tagName&&!o.alert&&typeof o[0]!="undefined");},elCache:{},getEl:function(id){return document.getElementById(id);},clearCache:function(){},regCE:function(ce){_21.push(ce);},_load:function(e){_17=true;},_tryPreloadAttach:function(){if(this.locked){return false;}this.locked=true;var _72=!_17;if(!_72){_72=(_24>0);}var _73=[];for(var i=0,len=_19.length;i<len;++i){var d=_19[i];if(d){var el=this.getEl(d[this.EL]);if(el){this.on(el,d[this.TYPE],d[this.FN],d[this.SCOPE],d[this.ADJ_SCOPE]);delete _19[i];}else{_73.push(d);}}}_19=_73;var _75=[];for(i=0,len=_25.length;i<len;++i){var _76=_25[i];if(_76){el=this.getEl(_76.id);if(el){var _77=(_76.override)?_76.obj:el;_76.fn.call(_77,_76.obj);delete _25[i];}else{_75.push(_76);}}}_24=(_73.length===0&&_75.length===0)?0:_24-1;if(_72){this.startTimeout();}this.locked=false;return true;},purgeElement:function(el,_78,_79){var _80=this.getListeners(el,_79);if(_80){for(var i=0,len=_80.length;i<len;++i){var l=_80[i];this.removeListener(el,l.type,l.fn,l.index);}}if(_78&&el&&el.childNodes){for(i=0,len=el.childNodes.length;i<len;++i){this.purgeElement(el.childNodes[i],_78,_79);}}},getListeners:function(el,_82){var _83=[];if(_18&&_18.length>0){for(var i=0,len=_18.length;i<len;++i){var l=_18[i];if(l&&l[this.EL]===el&&(!_82||_82===l[this.TYPE])){_83.push({type:l[this.TYPE],fn:l[this.FN],obj:l[this.SCOPE],adjust:l[this.ADJ_SCOPE],index:i});}}}return (_83.length)?_83:null;},_unload:function(e,me){for(var i=0,len=_20.length;i<len;++i){var l=_20[i];if(l){var _85=(l[this.ADJ_SCOPE])?l[this.SCOPE]:window;l[this.FN].call(_85,this.getEvent(e),l[this.SCOPE]);}}if(_18&&_18.length>0){for(i=0,len=_18.length;i<len;++i){l=_18[i];if(l){this.removeListener(l[this.EL],l[this.TYPE],l[this.FN],i);}}this.clearCache();}for(i=0,len=_21.length;i<len;++i){_21[i].unsubscribeAll();delete _21[i];}for(i=0,len=_22.length;i<len;++i){delete _22[i][0];delete _22[i];}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var dd=document.documentElement;db=document.body;if(dd&&dd.scrollTop){return [dd.scrollTop,dd.scrollLeft];}else{if(db){return [db.scrollTop,db.scrollLeft];}else{return [0,0];}}}};}();YAHOO.util.Event.on=YAHOO.util.Event.addListener;if(document&&document.body){YAHOO.util.Event._load();}else{YAHOO.util.Event.on(window,"load",YAHOO.util.Event._load,YAHOO.util.Event,true);}YAHOO.util.Event.on(window,"unload",YAHOO.util.Event._unload,YAHOO.util.Event,true);YAHOO.util.Event._tryPreloadAttach();}

function Delegate(){
}
Delegate.create=function(o,f){
var a=new Array();
var l=arguments.length;
for(var i=2;i<l;i++){
a[i-2]=arguments[i];
}
return function(){
var aP=[].concat(arguments,a);
f.apply(o,aP);
};
};
Tween=function(_7,_8,_9,_a,_b,_c,_d,_e){
this.init(_7,_8,_9,_a,_b,_c,_d,_e);
};
var t=Tween.prototype;
t.obj1=new Object();
t.obj2=new Object();
t.prop="";
t.func=function(t,b,c,d){
return c*t/d+b;
};
t.begin=0;
t.change=0;
t.prevTime=0;
t.prevPos=0;
t.prevPosObj2=null;
t.looping=false;
t._duration=0;
t._time=0;
t._pos=0;
t._position=0;
t._startTime=0;
t._finish=0;
t.name="";
t.suffixe="";
t._listeners=new Array();
t.setTime=function(t){
this.prevTime=this._time;
if(t>this.getDuration()){
if(this.looping){
this.rewind(t-this._duration);
this.update();
this.broadcastMessage("onMotionLooped",{target:this,type:"onMotionLooped"});
}else{
this._time=this._duration;
this.update();
this.stop();
this.broadcastMessage("onMotionFinished",{target:this,type:"onMotionFinished"});
}
}else{
if(t<0){
this.rewind();
this.update();
}else{
this._time=t;
this.update();
}
}
};
t.getTime=function(){
return this._time;
};
t.setDuration=function(d){
this._duration=(d==null||d<=0)?100000:d;
};
t.getDuration=function(){
return this._duration;
};
t.setPosition=function(p){
this.prevPos=this._pos;
if(this.prevPosObj2==null){
this.prevPosObj2=this.getFinish();
}
var a=this.suffixe!=""?this.suffixe:"";
var p=Math.round(p);
var _18=this.prevPos-p;
var _19=this.prevPosObj2+_18;
this.obj1[this.prop]=p+a;
if(this.obj2!=null){
this.obj2[this.prop]=_19+a;
}
this._pos=p;
this.prevPosObj2=_19;
this.broadcastMessage("onMotionChanged",{target:this,type:"onMotionChanged"});
};
t.getPosition=function(t){
if(t==undefined){
t=this._time;
}
return this.func(t,this.begin,this.change,this._duration);
};
t.setFinish=function(f){
this.change=f-this.begin;
};
t.getFinish=function(){
return this.begin+this.change;
};
t.init=function(_1c,_1d,_1e,_1f,_20,_21,_22,_23){
if(!arguments.length){
return;
}
this._listeners=new Array();
this.addListener(this);
if(_23){
this.suffixe=_23;
}
this.obj1=_1c;
if(_1d==null){
this.obj2=null;
}else{
this.obj2=_1d;
}
this.prop=_1e;
this.begin=_20;
this._pos=_20;
this.setDuration(_22);
if(_1f!=null&&_1f!=""){
this.func=_1f;
}
this.setFinish(_21);
};
t.start=function(){
this.rewind();
this.startEnterFrame();
this.broadcastMessage("onMotionStarted",{target:this,type:"onMotionStarted"});
};
t.rewind=function(t){
this.stop();
this._time=(t==undefined)?0:t;
this.fixTime();
this.update();
};
t.fforward=function(){
this._time=this._duration;
this.fixTime();
this.update();
};
t.update=function(){
this.setPosition(this.getPosition(this._time));
};
t.startEnterFrame=function(){
this.stopEnterFrame();
this.isPlaying=true;
this.onEnterFrame();
};
t.onEnterFrame=function(){
if(this.isPlaying){
this.nextFrame();
setTimeout(Delegate.create(this,this.onEnterFrame),0);
}
};
t.nextFrame=function(){
this.setTime((this.getTimer()-this._startTime)/1000);
};
t.stop=function(){
this.stopEnterFrame();
this.broadcastMessage("onMotionStopped",{target:this,type:"onMotionStopped"});
};
t.stopEnterFrame=function(){
this.isPlaying=false;
};
t.continueTo=function(_25,_26){
this.begin=this._pos;
this.setFinish(_25);
if(this._duration!=undefined){
this.setDuration(_26);
}
this.start();
};
t.resume=function(){
this.fixTime();
this.startEnterFrame();
this.broadcastMessage("onMotionResumed",{target:this,type:"onMotionResumed"});
};
t.yoyo=function(){
this.continueTo(this.begin,this._time);
};
t.addListener=function(o){
this.removeListener(o);
return this._listeners.push(o);
};
t.removeListener=function(o){
var a=this._listeners;
var i=a.length;
while(i--){
if(a[i]==o){
a.splice(i,1);
return true;
}
}
return false;
};
t.broadcastMessage=function(){
var arr=new Array();
for(var i=0;i<arguments.length;i++){
arr.push(arguments[i]);
}
var e=arr.shift();
var a=this._listeners;

var l=a.length;
for(var i=0;i<l;i++){
if(a[i][e]){
a[i][e].apply(a[i],arr);
}
}
};
t.fixTime=function(){
this._startTime=this.getTimer()-this._time*1000;
};
t.getTimer=function(){
return new Date().getTime()-this._time;
};
Tween.backEaseIn=function(t,b,c,d,a,p){
if(s==undefined){
var s=1.70158;
}
return c*(t/=d)*t*((s+1)*t-s)+b;
};
Tween.backEaseOut=function(t,b,c,d,a,p){
if(s==undefined){
var s=1.70158;
}
return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b;
};
Tween.backEaseInOut=function(t,b,c,d,a,p){
if(s==undefined){
var s=1.70158;
}
if((t/=d/2)<1){
return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;
}
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b;
};
Tween.elasticEaseIn=function(t,b,c,d,a,p){
if(t==0){
return b;
}
if((t/=d)==1){
return b+c;
}
if(!p){
p=d*0.3;
}
if(!a||a<Math.abs(c)){
a=c;
var s=p/4;
}else{
var s=p/(2*Math.PI)*Math.asin(c/a);
}
return -(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;
};
Tween.elasticEaseOut=function(t,b,c,d,a,p){
if(t==0){
return b;
}
if((t/=d)==1){
return b+c;
}
if(!p){
p=d*0.3;
}
if(!a||a<Math.abs(c)){
a=c;
var s=p/4;
}else{
var s=p/(2*Math.PI)*Math.asin(c/a);
}
return (a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b);
};
Tween.elasticEaseInOut=function(t,b,c,d,a,p){
if(t==0){
return b;
}
if((t/=d/2)==2){
return b+c;
}
if(!p){
var p=d*(0.3*1.5);
}
if(!a||a<Math.abs(c)){
var a=c;
var s=p/4;
}else{
var s=p/(2*Math.PI)*Math.asin(c/a);
}
if(t<1){
return -0.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;
}
return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*0.5+c+b;
};
Tween.bounceEaseOut=function(t,b,c,d){
if((t/=d)<(1/2.75)){
return c*(7.5625*t*t)+b;
}else{
if(t<(2/2.75)){
return c*(7.5625*(t-=(1.5/2.75))*t+0.75)+b;
}else{
if(t<(2.5/2.75)){
return c*(7.5625*(t-=(2.25/2.75))*t+0.9375)+b;
}else{
return c*(7.5625*(t-=(2.625/2.75))*t+0.984375)+b;
}
}
}
};
Tween.bounceEaseIn=function(t,b,c,d){
return c-Tween.bounceEaseOut(d-t,0,c,d)+b;
};
Tween.bounceEaseInOut=function(t,b,c,d){
if(t<d/2){
return Tween.bounceEaseIn(t*2,0,c,d)*0.5+b;
}else{
return Tween.bounceEaseOut(t*2-d,0,c,d)*0.5+c*0.5+b;
}
};
Tween.strongEaseInOut=function(t,b,c,d){
return c*(t/=d)*t*t*t*t+b;
};
Tween.regularEaseIn=function(t,b,c,d){
return c*(t/=d)*t+b;
};
Tween.regularEaseOut=function(t,b,c,d){
return -c*(t/=d)*(t-2)+b;
};
Tween.regularEaseInOut=function(t,b,c,d){
if((t/=d/2)<1){
return c/2*t*t+b;
}
return -c/2*((--t)*(t-2)-1)+b;
};
Tween.strongEaseIn=function(t,b,c,d){
return c*(t/=d)*t*t*t*t+b;
};
Tween.strongEaseOut=function(t,b,c,d){
return c*((t=t/d-1)*t*t*t*t+1)+b;
};
Tween.strongEaseInOut=function(t,b,c,d){
if((t/=d/2)<1){
return c/2*t*t*t*t*t+b;
}
return c/2*((t-=2)*t*t*t*t+2)+b;
};

function createStyleRule(_1,_2){
if(!document.getElementsByTagName||!(document.createElement||document.createElementNS)){
return;
}
var _3=navigator.userAgent.toLowerCase();
var _4=((_3.indexOf("msie")!=-1)&&(_3.indexOf("opera")==-1));
var _5=(_4&&(_3.indexOf("win")!=-1));
var _6=(_4&&(_3.indexOf("mac")!=-1));
if(_6){
return;
}
var _7=document.getElementsByTagName("head")[0];
var _8=(typeof document.createElementNS!="undefined")?document.createElementNS("http://www.w3.org/1999/xhtml","style"):document.createElement("style");
if(!_5){
var _9=document.createTextNode(_1+" {"+_2+"}");
_8.appendChild(_9);
}
_8.setAttribute("type","text/css");
_8.setAttribute("media","screen");
_7.appendChild(_8);
if(_5&&document.styleSheets&&document.styleSheets.length>0){
var _a=document.styleSheets[document.styleSheets.length-1];
if(typeof _a.addRule=="object"){
_a.addRule(_1,_2);
}
}
}
createStyleRule("#listings","display:none;");
function cssjs(a,o,c1,c2){
switch(a){
case "swap":
o.className=!cssjs("check",o,c1)?o.className.replace(c2,c1):o.className.replace(c1,c2);
break;
case "add":
if(!cssjs("check",o,c1)){
o.className+=o.className?" "+c1:c1;
}
break;
case "remove":
var _f=o.className.match(" "+c1)?" "+c1:c1;
o.className=o.className.replace(_f,"");
break;
case "check":
return new RegExp("\\b"+c1+"\\b").test(o.className);
break;
}
}
function camelize(_10){
var _11=_10.split("-");
if(_11.length==1){
return _11[0];
}
var _12=_10.indexOf("-")==0?_11[0].charAt(0).toUpperCase()+_11[0].substring(1):_11[0];
for(var i=1,len=_11.length;i<len;i++){
var s=_11[i];
_12+=s.charAt(0).toUpperCase()+s.substring(1);
}
return _12;
}
function setStyle(_15,_16){
for(var _17 in _16){
_15.style[camelize(_17)]=_16[_17];
}
}
function cleanWhitespace(_18){
for(var i=0;i<_18.childNodes.length;i++){
var _1a=_18.childNodes[i];
if(_1a.nodeType==3&&!/\S/.test(_1a.nodeValue)){
_1a.parentNode.removeChild(_1a);
}
}
}
var last=[];
var delayTimeout;
function initHome(_1b){
var _1c=document.getElementById("listings");
setStyle(_1c,{display:"block"});
cleanWhitespace(_1c);
pruneByTagName(_1c,"LI");
_1c=_1c.childNodes;
var _1d;
for(var i=0;i<_1c.length;++i){
_1d=_1c[i];
cssjs("add",_1d,"closed");
setStyle(_1d,{height:"24px"});
YAHOO.util.Event.addListener(_1d,"mouseover",beginDelayedCollapse);
YAHOO.util.Event.addListener(_1d,"mouseout",cancelDelayedCollapse);
}
var _1f=randomFilter(_1c.length,_1b);
beginCollapse(_1c[_1f].id);
}
function pruneByTagName(_20,_21){
for(var i=0;i<_20.childNodes.length;++i){
var _23=_20.childNodes[i];
if(_23.tagName!=_21){
_23.parentNode.removeChild(_23);
}
}
}
function randomFilter(_24,_25){
var _26=Math.floor(Math.random()*_24);
for(var i=0;i<_25.length;i++){
if(_25[i]==_26){
return randomFilter(_24,_25);
}
}
return _26;
}
function beginDelayedCollapse(e){
cssjs("add",this,"active");
delayTimeout=setTimeout("beginCollapse('"+this.id+"');",900);
}
function cancelDelayedCollapse(e){
if(cssjs("check",this,"closed")){
cssjs("remove",this,"active");
}
clearTimeout(delayTimeout);
}
function beginCollapse(id){
var _2b=document.getElementById(id);
last.push(_2b);
if(last.length>3){
last.shift();
}
var _2c=true;
var _2d=last[(last.length)-2];
if(last.length===1){
_2c=false;
}else{
if(_2d===last[(last.length)-1]){
_2c=false;
}
}
if(_2c==true){
cssjs("remove",_2d,"active");
cssjs("add",_2d,"closed");
cssjs("remove",_2b,"closed");
cssjs("add",_2b,"active");
myAnim=new Tween(_2b.style,_2d.style,"height",Tween.regularEaseOut,24,325,0.4,"px");
myAnim.start();
}else{
if(cssjs("check",_2b,"closed")){
cssjs("remove",_2b,"closed");
cssjs("add",_2b,"active");
myAnim=new Tween(_2b.style,null,"height",Tween.regularEaseOut,24,325,0.4,"px");
myAnim.start();
}
}
}
function initHomeLegacy(_2e){
var _2f;
var _30=document.getElementById("listings");
setStyle(_30,{display:"block"});
cleanWhitespace(_30);
pruneByTagName(_30,"LI");
_30=_30.childNodes;
var _31;
var _32;
var _33;
var _34;
for(var i=0;i<_30.length;++i){

_31=_30[i];
oDivs=_31.getElementsByTagName("div");
_32=oDivs[0];
oText=oDivs[1];
oImage=_31.getElementsByTagName("img")[0];
oAnchors=_31.getElementsByTagName("a");
oSkip=oAnchors[(oAnchors.length-1)];
setStyle(_32,{display:"none"});
setStyle(_31,{height:"24px"});
cssjs("add",_31,"closed");
oImage.style.display="none";
oText.style.marginTop="0px";
_32.style.backgroundRepeat="no-repeat";
_32.style.backgroundImage="url("+oImage.src+")";
oSkip.style.display="none";
_31.onmouseover=beginCollapseLegacyWrapper;
}
var _36=randomFilter(_30.length,_2e);
beginCollapseLegacy(_30[_36].id);
}
function beginCollapseLegacyWrapper(){
beginCollapseLegacy(this.id);
}
function beginCollapseLegacy(id){
var _38=document.getElementById(id);
var _39;
last.push(_38);
if(last.length>3){
last.shift();
}
var _3a=true;
var _3b=last[(last.length)-2];
if(last.length===1){
_3a=false;
}else{
if(_3b===last[(last.length)-1]){
_3a=false;
}
}
if(_3a==true){
cssjs("remove",_3b,"active");
cssjs("add",_3b,"closed");
cssjs("remove",_38,"closed");
cssjs("add",_38,"active");
setStyle(_38,{height:"325px"});
setStyle(_3b,{height:"24px"});
_39=_3b.getElementsByTagName("div");
setStyle(_39[0],{display:"none"});
_39=_38.getElementsByTagName("div");
setStyle(_39[0],{display:"block"});
}else{
if(cssjs("check",_38,"closed")){
cssjs("remove",_38,"closed");
cssjs("add",_38,"active");
setStyle(_38,{height:"325px"});
_39=_38.getElementsByTagName("div");
setStyle(_39[0],{display:"block"});
}
}
}
if(typeof Array.prototype.copy=="undefined"){
Array.prototype.copy=function(a){
var i=0,b=[];
for(i;i<this.length;i++){
b[i]=(typeof this[i].copy!="undefined")?this[i].copy():this[i];
}
return b;
};
}
if(typeof Array.prototype.concat=="undefined"){
Array.prototype.concat=function(a){
var i=0,b=this.copy();
for(i;i<a.length;i++){
b[b.length]=a[i];
}
return b;
};
}
if(typeof Array.prototype.pop=="undefined"){
Array.prototype.pop=function(){
var b=this[this.length-1];
this.length--;
return b;
};
}
if(typeof Array.prototype.push=="undefined"){
Array.prototype.push=function(){
var i=0,b=this.length,a=arguments;
for(i;i<a.length;i++){
this[b+i]=a[i];
}
return this.length;
};
}
if(typeof Array.prototype.shift=="undefined"){
Array.prototype.shift=function(){
var i=0,b=this[0];
for(i;i<this.length-1;i++){
this[i]=this[i+1];
}
this.length--;
return b;
};
}
if(typeof Array.prototype.slice=="undefined"){
Array.prototype.slice=function(a,c){
var i=0,b,d=[];
if(!c){
c=this.length;
}
if(c<0){
c=this.length+c;
}
if(a<0){
a=this.length-a;
}
if(c<a){
b=a;
a=c;
c=b;
}
for(i;i<c-a;i++){
d[i]=this[a+i];
}
return d;
};
}
if(typeof Array.prototype.splice=="undefined"){
Array.prototype.splice=function(a,c){
var i=0,e=arguments,d=this.copy(),f=a;
if(!c){
c=this.length-a;
}
for(i;i<e.length-2;i++){
this[a+i]=e[i+2];
}
for(a;a<this.length-c;a++){
this[a+e.length-2]=d[a-c];
}
this.length-=c-e.length+2;
return d.slice(f,f+c);
};
}
if(typeof Array.prototype.unshift=="undefined"){
Array.prototype.unshift=function(a){
var b;
this.reverse();
b=this.push(a);
this.reverse();
return b;
};
}

// Detect ancient Mac browsers and give them the "legacy" version.
// Aren't web standards supposed to prevent you from maintaining
// two versions?

function isLegacy() {
    if (isIE5Mac()) {
        return true;
    } if (isSafariJaguar()) {
        return true;
    } else {
        return false;
    }
}

function isIE5Mac() {
    if (navigator.userAgent.indexOf('MSIE') != -1) {
       if (navigator.platform.indexOf('Mac') != -1) {
           return true;
       } else {
           return false;
       }
    } else {
        return false;
    }
}

function isSafariJaguar() {
    var index = navigator.userAgent.indexOf("Safari");
	if (index == -1) return false;
	
	if (parseInt(navigator.userAgent.substring(index+"Safari".length+1)) == 85) {
	    return true;
	} else {
	    return false;
	}
}

// Dean Edwards/Matthias Miller/John Resig

function init() {
	// quit if this function has already been called
    if (arguments.callee.done) return;

    // flag this function so we don't do the same thing twice
    arguments.callee.done = true;

    // kill the timer
    if (_timer) clearInterval(_timer);
    
    // set exclusions for home page
    var exclusions = new Array();
    exclusions[0] = 9;
    
    // initialize the home page
    if (isLegacy()) {
        if(typeof initHomeLegacy != 'undefined') {
            initHomeLegacy(exclusions);
        }
    } else {
        if(typeof initHome != 'undefined') {
            initHome(exclusions);
        }
    }

    // Google Analytics
    if(typeof urchinTracker != 'undefined') {
        _uacct = 'UA-69450-1';
        urchinTracker();
    }
};

/* for Mozilla/Opera9 */
if (document.addEventListener) {
    document.addEventListener("DOMContentLoaded", init, false);
}

/* for Internet Explorer */
/*@cc_on @*/
/*@if (@_win32)
    document.write("<script id=__ie_onload defer src=javascript:void(0)><\/script>");
    var script = document.getElementById("__ie_onload");
    script.onreadystatechange = function() {
        if (this.readyState == "complete") {
            init(); // call the onload handler
        }
    };
/*@end @*/

/* for Safari */
if (/WebKit/i.test(navigator.userAgent)) { // sniff
    var _timer = setInterval(function() {
        if (/loaded|complete/.test(document.readyState)) {
            init(); // call the onload handler
        }
    }, 10);
}

/* for other browsers */
window.onload = init;    