function TabbedPages(el){
this._container=el;
this.decorate();
this.init();
this.morph();
}
TabbedPages.prototype._container;
TabbedPages.prototype._pages;
TabbedPages.prototype._tabList;
TabbedPages.prototype.decorate=function(){
var _2=document.createElement("link");
_2.rel="stylesheet";
_2.type="text/css";
_2.media="screen";
if(navigator.appVersion.indexOf("MSIE 7")>=0){
_2.href="/css/tabbedPages/ie7.css";
}else{
if(navigator.appVersion.indexOf("MSIE")>=0){
_2.href="/css/tabbedPages/ie.css";
}else{
_2.href="/css/tabbedPages/standard.css";
}
}
var _3=document.getElementsByTagName("head")[0];
_3.appendChild(_2);
};
TabbedPages.prototype.init=function(){
this._pages=new Array();
for(var x=0;x<this._container.childNodes.length;x++){
var _5=this._container.childNodes[x];
switch(_5.className){
case "tabPage":
var _6=new Array();
_6["page"]=_5;
for(var y=0;y<_5.childNodes.length;y++){
var c=_5.childNodes[y];
switch(c.className){
case "tabHeader":
_6["header"]=c;
break;
case "tabContent":
_6["content"]=c;
break;
}
}
this._pages.push(_6);
break;
case "tabList":
this._tabList=_5;
break;
}
}
if(!this._tabList){
this._tabList=document.createElement("div");
this._tabList.className="tabList";
this._container.appendChild(this._tabList);
}
};
TabbedPages.prototype.morph=function(){
for(var x=0;x<this._pages.length;x++){
var _a=this._pages[x]["header"];
this.attachBehavior(_a);
var _b=this._pages[x]["page"];
_b.removeChild(_a);
this._tabList.appendChild(_a);
}
this._selectTab(0);
};
TabbedPages.prototype.attachBehavior=function(_c){
var _d=this;
_c.onclick=function(){
_d.selectTab(_c);
};
};
TabbedPages.prototype._selectTab=function(p){
for(var x=0;x<this._pages.length;x++){
var _10=this._pages[x]["page"];
var _11=this._pages[x]["header"];
if(x==p){
_11.className="tabSelected";
_10.className="tabPageSelected";
}else{
_11.className="tabHeader";
_10.className="tabPageHidden";
}
}
};
TabbedPages.prototype.selectTab=function(el){
for(var x=0;x<this._pages.length;x++){
if(el==this._pages[x]["header"]){
this._selectTab(x);
}
}
};
function Slideshow(el,_15,_16,_17,_18,_19){
this._el=el;
this._slides=_15;
this._frames=_16;
this._delay=_17;
this._transition=_18;
this._button=_19;
this._frame=1;
for(var i=0;i<el.childNodes.length;i++){
if(el.childNodes[i].nodeName=="IMG"){
this._img=el.childNodes[i];
break;
}
}
this.showButton();
}
Slideshow.prototype._el;
Slideshow.prototype._img;
Slideshow.prototype._slides;
Slideshow.prototype._frames;
Slideshow.prototype._frame;
Slideshow.prototype._transition;
Slideshow.prototype._button;
Slideshow.prototype.showButton=function(){
if(this._button){
this._button.show();
}
};
Slideshow.prototype.hideButton=function(){
if(this._button){
this._button.hide();
}
};
Slideshow.prototype.start=function(){
try{
var _1b=new Image();
_1b.src=this._slides;
self=this;
_1b.onload=function(){
self._start();
};
}
catch(err){
this._start();
}
};
Slideshow.prototype._start=function(){
if(this._frame==1&&this._img.style.display!="none"){
this.hideButton();
this._el.style.width=this._img.width+"px";
this._el.style.height=this._img.height+"px";
this._el.style.backgroundImage="URL(\""+this._slides+"\")";
this._el.style.backgroundPosition="0px 0px";
this._img.style.display="none";
this.run();
}
};
Slideshow.prototype.stop=function(){
this._frame=1;
this._img.style.display="block";
this.showButton();
};
Slideshow.prototype.run=function(){
if(this._frame>this._frames||this._frame<1){
this._el.style.backgroundPosition="0px 0px";
var _1c=this;
setTimeout(function(){
_1c.stop();
},1000);
}else{
if(this._frame==1){
this._el.style.backgroundPosition="-"+(this._img.width*(this._frame-1))+"px 0px";
this._frame=this._frame+1;
var _1c=this;
if(this._transition){
setTimeout(function(){
_1c._transition.start();
},1000-((this._transition._delay*this._transition._frames)));
}
setTimeout(function(){
_1c.run();
},1000);
}else{
this._el.style.backgroundPosition="-"+(this._img.width*(this._frame-1))+"px 0px";
this._frame=this._frame+1;
var _1c=this;
if(this._transition){
setTimeout(function(){
_1c._transition.start();
},this._delay-((this._transition._delay*this._transition._frames)));
}
setTimeout(function(){
_1c.run();
},this._delay);
}
}
};
function SlideshowTransition(el,_1e,_1f,_20){
this._el=el;
this._slides=_1e;
this._frames=_1f;
this._delay=_20;
this._frame=0;
for(var i=0;i<el.childNodes.length;i++){
if(el.childNodes[i].nodeName=="IMG"){
this._img=el.childNodes[i];
break;
}
}
for(var i=0;i<el.childNodes.length;i++){
if(el.childNodes[i].className=="transition"){
var _22=el.childNodes[i];
break;
}
}
if(!_22){
var _22=document.createElement("div");
_22.className="transition";
_22.style.width="100%";
_22.style.height="100%";
el.appendChild(_22);
}
this._transition=_22;
try{
var _23=new Image();
_23.src=this._slides;
this._frame=1;
}
catch(err){
this._frame=1;
}
}
SlideshowTransition.prototype._el;
SlideshowTransition.prototype._transition;
SlideshowTransition.prototype._img;
SlideshowTransition.prototype._slides;
SlideshowTransition.prototype._frames;
SlideshowTransition.prototype._frame;
SlideshowTransition.prototype._delay;
SlideshowTransition.prototype.start=function(){
if(this._frame==1){
this._transition.style.backgroundImage="URL(\""+this._slides+"\")";
this._transition.style.backgroundPosition="0px 0px";
var _24=this;
setTimeout(function(){
_24.forward();
},this._delay);
}
};
SlideshowTransition.prototype.forward=function(){
if(this._frame>=this._frames){
this.backward();
}else{
this._transition.style.backgroundPosition="-"+(this._img.width*(this._frame-1))+"px 0px";
this._frame=this._frame+1;
var _25=this;
setTimeout(function(){
_25.forward();
},this._delay);
}
};
SlideshowTransition.prototype.backward=function(){
if(this._frame>=this._frames){
this._frame=this._frames-1;
}
if(this._frame<1){
this._frame=1;
}else{
this._transition.style.backgroundPosition="-"+(this._img.width*(this._frame-1))+"px 0px";
this._frame=this._frame-1;
var _26=this;
setTimeout(function(){
_26.backward();
},this._delay);
}
};
function Button(id,el,_29,_2a,_2b,_2c,_2d,_2e){
this._el=el;
this._normal=_2b;
this._hover=_2c?_2c:null;
this._active=_2d?_2d:null;
this._action=_2e?_2e:null;
for(var i=0;i<el.childNodes.length;i++){
if(el.childNodes[i].className=="button"&&el.childNodes[i].id==id){
var _30=el.childNodes[i];
break;
}
}
if(!_30){
var _30=document.createElement("div");
_30.id=id;
_30.className="button";
_30.style.position="absolute";
el.appendChild(_30);
}
_30.style.width=_29+"px";
_30.style.height=_2a+"px";
var _31=this;
_30.onmouseover=function(){
_31.hover();
};
_30.onmouseout=function(){
_31.normal();
};
_30.onclick=function(){
_31.active();
};
this._button=_30;
this.preload();
this.normal();
}
Button.prototype._el;
Button.prototype._action;
Button.prototype._normal;
Button.prototype._hover;
Button.prototype._active;
Button.prototype._button;
Button.prototype.preload=function(){
var _32=new Image();
_32.src=this._normal;
if(this._hover){
var _33=new Image();
_33.src=this._hover;
}
if(this._active){
var _34=new Image();
_34.src=this._active;
}
};
Button.prototype.show=function(){
this._button.style.display="block";
};
Button.prototype.hide=function(){
this._button.style.display="none";
};
Button.prototype.normal=function(){
this._button.style.backgroundImage="URL(\""+this._normal+"\")";
this._button.style.cursor="auto";
};
Button.prototype.hover=function(){
if(this._hover){
this._button.style.backgroundImage="URL(\""+this._hover+"\")";
}
this._button.style.cursor="pointer";
};
Button.prototype.active=function(){
if(this._active){
this._button.style.backgroundImage="URL(\""+this._active+"\")";
var _35=this;
setTimeout(function(){
_35.normal();
},5000);
if(this._action){
setTimeout(function(){
_35._action();
},1000);
}
}else{
if(this._action){
this._action();
}
}
};
Button.prototype.setAction=function(_36){
this._action=_36;
};

