function ContentSwitcher(_1,_2,_3,_4,_5,_6,_7){
if(!this.supported){
return;
}
this.items=[];
this.banners={};
this.switcherId=_1;
this.listBoxId=_2;
this.imageBoxId=_3;
this.textBoxId=_4;
this.nextId=_5;
this.prevId=_6;
this.statusId=_7;
this.timer=null;
this.attachEventHandlers();
}
ContentSwitcher.prototype={currentIndex:0,interval:7,listClassOn:"CS_active",supported:(document.getElementById&&document.getElementsByTagName&&(Array.push||Array.prototype.push)&&window.setInterval&&window.clearInterval)?true:false,total:0,add:function(_8){
if(!this.supported){
return -1;
}
this.total=this.items.push(_8);
return this.total-1;
},addBanner:function(i,_a){
if(!this.itemExists(i)){
return;
}
this.banners[i]=_a;
},attachEventHandlers:function(){
var _b=document.getElementById(this.switcherId);
var _c=document.getElementById(this.listBoxId).getElementsByTagName("li");
var i=0;
var _e=_c.length;
var a;
_b.onmouseover=this.getEvent("mouseover_switcher");
_b.onmouseout=this.getEvent("mouseout_switcher");
document.getElementById(this.nextId).onclick=this.getEvent("click_next");
document.getElementById(this.prevId).onclick=this.getEvent("click_prev");
while(i<_e){
a=_c[i].getElementsByTagName("a")[0];
a.onmouseover=a.onfocus=this.getEvent("mouseover_list",i);
a.onmouseout=a.onblur=this.getEvent("mouseout_list");
i++;
}
a=null;
_b=null;
},destroy:function(){
this.stop();
},getBanner:function(i){
return (this.banners[i])?this.banners[i]:null;
},getEvent:function(_11){
var _12=this;
var fn=function(){
};
switch(_11){
case "mouseover_list":
var _14=arguments[1];
fn=function(){
_12.stop();
_12.showItem(_14);
};
break;
case "mouseout_list":
var _14=arguments[1];
fn=function(){
_12.start();
};
break;
case "click_next":
fn=function(){
_12.showNextItem(true);
return false;
};
break;
case "click_prev":
fn=function(){
_12.showPrevItem(true);
return false;
};
break;
case "interval_switch":
fn=function(){
_12.showNextItem(false);
};
break;
case "mouseout_switcher":
fn=function(){
_12.start();
};
break;
case "mouseover_switcher":
fn=function(){
_12.stop();
};
break;
}
return fn;
},getItem:function(i){
if(i>=0||i<this.total){
return this.items[i];
}
return null;
},getLinkURL:function(i){
var _17=this.getItem(i);
if(_17){
return _17.getURL();
}
return "";
},getNextItem:function(_18){
return this.getItem(this.getNextIndex(_18));
},getNextIndex:function(_19){
return (_19<this.total-1)?_19+1:0;
},getPrevItem:function(_1a){
return this.getItem(this.getPrevIndex(_1a));
},getPrevIndex:function(_1b){
return (_1b>0)?_1b-1:this.total-1;
},initialize:function(){
if(!this.supported){
return;
}
this.showItem(this.currentIndex);
this.start();
},itemExists:function(i){
return (i<this.total&&i>=0)?true:false;
},removeChildNodes:function(_1d){
var i=_1d.childNodes.length;
while(i--){
_1d.removeChild(_1d.childNodes[i]);
}
_1d=null;
},reset:function(){
if(this.stop()){
this.start();
}
},setInterval:function(_1f){
if(typeof (_1f)=="number"&&_1f>0){
this.interval=_1f;
}
},showItem:function(i,_21){
if(!this.itemExists(i)){
this.stop();
return;
}
if(_21){
this.reset();
}
var _22=this.currentIndex;
this.currentIndex=i;
this.updateImage(i);
this.updateText(i);
this.updateLinks(i);
this.updateStatus(i);
this.updateListDisplay(i);
this.updateBanner(i,_22);
},showNextItem:function(_23){
this.showItem(this.getNextIndex(this.currentIndex,_23));
},showPrevItem:function(_24){
this.showItem(this.getPrevIndex(this.currentIndex,_24));
},start:function(){
if(this.timer===null&&this.supported){
this.timer=setInterval(this.getEvent("interval_switch"),this.interval*1000);
return true;
}
return false;
},stop:function(){
if(this.timer&&this.supported){
clearInterval(this.timer);
this.timer=null;
return true;
}else{
return false;
}
},updateBanner:function(_25,_26){
var _27=this.getBanner(_25);
var _28=this.getBanner(_26);
if(_28){
_28.hide();
}
if(_27){
_27.show();
}
_27=null;
_28=null;
},updateImage:function(_29){
var _2a=document.getElementById(this.imageBoxId);
this.removeChildNodes(_2a);
_2a.appendChild(this.getItem(_29).getImageNode());
_2a=null;
},updateLinks:function(_2b){
var _2c=this.getItem(_2b);
var _2d=this.getItem(this.getNextIndex(_2b));
var _2e=this.getItem(this.getPrevIndex(_2b));
document.getElementById(this.imageBoxId).href=_2c.getURL();
document.getElementById(this.textBoxId).href=_2c.getURL();
document.getElementById(this.nextId).href=_2d.getURL();
document.getElementById(this.prevId).href=_2e.getURL();
},updateStatus:function(_2f){
if(!this.supported){
return;
}
var _30=document.getElementById(this.statusId);
var _31=(_2f+1)+" of "+this.total+": ";
this.removeChildNodes(_30);
_30.appendChild(document.createTextNode(_31));
_30=null;
},updateText:function(_32){
var _33=document.getElementById(this.textBoxId);
this.removeChildNodes(_33);
_33.appendChild(this.getItem(_32).getTextNode());
_33=null;
},updateListDisplay:function(_34){
var _35=document.getElementById(this.listBoxId).getElementsByTagName("li");
var i=0;
var end=_35.length;
while(i<end){
_35[i].className=(i==_34)?this.listClassOn:"";
i++;
}
}};
function ContentItem(_38,url,_3a){
if(!this.supported){
return;
}
this.textNode=document.createTextNode(_38);
this.url=url;
this.imageSrc=_3a;
this.imageNode=null;
this.cacheImage();
}
ContentItem.prototype={supported:document.createElement&&document.createTextNode?true:false,cacheImage:function(){
if(this.imageNode!==null){
return;
}
this.imageNode=document.createElement("img");
this.imageNode.src=this.imageSrc;
},getImageNode:function(){
return this.imageNode;
},getTextNode:function(){
return this.textNode;
},getURL:function(){
return this.url;
}};
function ContentItemBanner(id){
this.setId(id);
}
ContentItemBanner.prototype={id:"",getNode:function(){
var _3c=null;
if(this.id!=""){
_3c=document.getElementById(this.id);
}
return _3c;
},hide:function(){
this.toggleVisibility("hide");
},setId:function(id){
if(typeof (id)=="string"&&id!=""){
this.id=id;
}
},show:function(){
this.toggleVisibility("show");
},toggleVisibility:function(_3e){
var _3f=this.getNode();
if(!_3f){
return;
}
_3f.style.display=(_3e=="hide")?"none":"block";
_3f=null;
}};

