//Copyright 2007, Howling Dynamo, Inc. or its suppliers. All Rights Reserved. http://www.hdyn.com/wr/common/contact.php?addr=pr
SlideSet.prototype.getNSlides=getNSlides;
SlideSet.prototype.startTimer=startTimer;
SlideSet.prototype.stopTimer=stopTimer;
SlideSet.prototype.rtg=rtg;
SlideSet.prototype.timerDone=timerDone;
SlideSet.prototype.loadDone=loadDone;
SlideSet.prototype.display=display;
SlideSet.prototype.setTemp=setTemp;
SlideSet.prototype.set=set;
SlideSet.prototype.reset=reset;
SlideSet.prototype.next=next;
SlideSet.prototype.prev=prev;
SlideSet.prototype.rand=rand;
SlideSet.prototype.start=start;
SlideSet.prototype.stop=stop;
SlideSet.prototype.reverse=reverse;
SlideSet.prototype.setVisible=setVisible;
SlideSet.prototype.setFlags=setFlags;
SlideSet.prototype.changeTemp=changeTemp;
SlideSet.prototype.setTimerMinMax=setTimerMinMax;
SlideSet.prototype.getDisplayedInfo=getDisplayedInfo;
var g_trans=new Image();
g_trans.src="images/trans.gif";
var g_timerRetryMS=1000;
var g_slideSets=new Array();
function setSlideSet(i,_2,_3){
g_slideSets[i]=new SlideSet(i,_2,_3);
}
function setSlideSetPrefs(i,_5,_6,_7,_8,_9){
if(i>=g_slideSets.length){
return null;
}
var ss=g_slideSets[i];
ss.flags=_5;
ss.destOb=getOb(_6);
ss.infoOb=getOb(_7);
ss.setTimerMinMax(_8,_9);
return ss;
}
function getOb(ob){
if(typeof ob=="string"){
return document.getElementById(ob);
}
return ob;
}
function willPin(i,_d,_e){
if(!(_e&1)){
return false;
}
if(_e&8){
if(i<=0){
return true;
}
}else{
if(i>=_d-1){
return true;
}
}
return false;
}
function getNextTempIndex(ob){
var _10=ob.getNSlides();
if(_10<1){
return -100;
}
var i=ob.current;
if(ob.flags&4){
i=Math.floor(Math.random()*(_10-0.5))+1;
if(i==ob.current){
++i;
}
}else{
if(ob.flags&8){
--i;
}else{
++i;
}
}
return constrainTempIndex(i,_10,ob.flags&1);
}
function constrainTempIndex(i,_13,pin){
while(i>=_13){
i=pin?_13-1:i-_13;
}
while(i<0){
i=pin?0:_13+i;
}
return i;
}
function constrainObTempIndex(i,ob){
var _17=ob.getNSlides();
if(_17<1){
return -100;
}
return constrainTempIndex(i,_17,ob.flags&1);
}
function setLoadPending(){
var ob=document.getElementById("ctrlBox");
if(ob!=null){
}
}
function setLoadDone(ss){
if((ss.flags&64)!=0){
document.getElementById("holder").style.display="none";
document.getElementById("ctrlBox").style.display="block";
if(ss.infoOb!=null){
ss.infoOb.style.display="block";
}
ss.setFlags(64,0);
}
var s=document.body.style;
s.cursor="default";
s.overflow="";
ss.destOb.parentNode.style.display="block";
}
function SlideSet(i,arr,_1d){
this.i=i;
this.arr=arr;
this.flags=16;
this.current=-1;
this.iDisplayed=-1;
this.timer=null;
this.tempImg=document.createElement("img");
this.tempImg.ownerSet=this;
this.tempImg.onload=imgLoadDone;
this.destOb=null;
this.infoOb=null;
this.timerMin=5000;
this.timerMax=10000;
this.displaySrc=g_trans.src;
this.imgsPath=_1d;
this.setImgsPath=function(_1e){
this.imgsPath=_1e;
};
this.ppid="";
this.setPPID=function(_1f){
this.ppid=_1f;
};
}
function setTimerMinMax(min,max){
if(min>=0&&min<10){
min=10;
}
if(max>=0&&max<min){
max=min;
}
if(min>=0){
this.timerMin=min;
}
if(max>=0){
this.timerMax=max;
}
}
function getNSlides(){
if(this.arr==null){
return 0;
}
return this.arr.length;
}
function getDisplayedInfo(){
if(this.iDisplayed<0){
return null;
}
return infoToHTML(this.arr[this.iDisplayed][1],this.iDisplayed,this.ppid);
}
function startTimer(){
this.stopTimer();
if((this.flags&48)==48){
var t;
if(this.timerMax==this.timerMin){
t=this.timerMin;
}else{
t=Math.floor(Math.random()*(this.timerMax-this.timerMin))+this.timerMin;
}
this.timer=setTimeout("g_slideSets["+this.i+"].timerDone()",t);
}
}
function stopTimer(){
if(this.timer!=null){
clearTimeout(this.timer);
this.timer=null;
}
}
function rtg(){
this.stopTimer();
if(willPin(this.current,this.getNSlides(),this.flags)){
this.display(this.tempImg.src,this.current);
return;
}
this.startTimer();
this.display(this.tempImg.src,this.current);
this.changeTemp(-100);
}
function timerDone(){
this.stopTimer();
if((this.flags&2)==0){
this.rtg();
}
}
var g_e=null;
function loadDone(){
this.flags&=~2;
if(this.timer==null&&(this.flags&48)==48){
this.rtg();
}
}
function doUpdateRgnHack(_23,_24){
if(_23==null){
}else{
if(_23.style.zIndex>8){
_23.style.zIndex=5;
}else{
++_23.style.zIndex;
}
}
if(_24==null){
}else{
if(_24.style.zIndex>3){
_24.style.zIndex=0;
}else{
++_24.style.zIndex;
}
}
}
function imgLoadDone(e){
if(typeof this.ownerSet=="undefined"){
return false;
}
this.ownerSet.loadDone();
return true;
}
function displayLoadDone(e){
if(typeof this.ownerSet=="undefined"){
return false;
}
var ss=this.ownerSet;
setLoadDone(ss);
var _28=ss.getDisplayedInfo();
if(_28!=null&&ss.infoOb!=null){
ss.infoOb.innerHTML=_28;
}
return true;
}
function display(src,i){
if(src==null){
src=g_trans.src;
this.iDisplayed=-1;
}else{
this.displaySrc=src;
this.iDisplayed=i;
}
if(this.destOb==null){
document.body.background=src;
}else{
this.destOb.ownerSet=this;
setLoadPending();
this.destOb.onload=displayLoadDone;
this.destOb.src=src;
}
}
function setTemp(){
var _2b=(this.arr==null?g_trans.src:this.imgsPath+this.arr[this.current][0]);
this.flags|=2;
this.tempImg.src=_2b;
}
function next(){
if(this.flags&8){
this.reverse();
}
this.rtg();
}
function prev(){
if(!(this.flags&8)){
this.reverse();
}
this.rtg();
}
function rand(){
var _2c=(this.flags&4)==0;
if(_2c){
this.flags|=4;
}
this.changeTemp(-100);
if(_2c){
this.flags&=~4;
}
if((ss.flags&48)!=48){
this.rtg();
}
}
function start(){
this.flags|=16;
this.startTimer();
}
function stop(){
var _2d=(this.flags&16)!=0;
this.flags&=~16;
this.stopTimer();
return _2d;
}
function reverse(){
this.flags^=8;
if(this.current>=0){
var _2e=((this.flags&8)?-2:2);
this.changeTemp(this.current+_2e);
}
}
function set(){
this.stopTimer();
this.display(this.displaySrc,this.iDisplayed);
if(!(this.flags&2)){
this.startTimer();
}
}
function reset(){
this.stopTimer();
var i=(this.flags&8)?this.getNSlides()-1:0;
if(this.arr==null||this.arr.length<1){
return;
}
this.display(this.imgsPath+this.arr[i][0],i);
this.changeTemp(i);
if((this.flags&48)==48){
}else{
this.rtg();
}
}
function setVisible(vis){
if(vis){
this.flags|=32;
if(this.current<0){
this.reset();
}else{
this.set();
}
if(this.infoOb!=null){
this.infoOb.style.display="block";
}
}else{
this.flags&=~32;
this.stopTimer();
this.display(null,-1);
if(this.infoOb!=null){
this.infoOb.style.display="none";
}
}
}
function setFlags(_31,how){
switch(how){
case 0:
this.flags&=~_31;
break;
case 1:
this.flags|=_31;
break;
default:
this.flags^=_31;
}
}
function changeTemp(i){
if(i==-100){
i=getNextTempIndex(this);
}else{
i=constrainObTempIndex(i,this);
}
if(i>=0){
this.current=i;
this.setTemp();
}
}
function infoToHTML(_34,_35,_36){
var arr=_34.split("\t");
var _38=buildCaption(arr,_35).join(" &mdash; ");
var s=_38;
if(_36!=""){
s+="<table class='relCenter' style='margin-top: 4px;'><tr>";
var f=arr[4];
if(f.length>0){
if(f.charAt(0)=="$"){
f=f.substr(1);
}
var amt=f!=""&&!isNaN(f)?parseFloat(f):null;
f=arr[5];
if(amt!=null&&f!=""&&!isNaN(f)&&parseInt(f)>0){
s+=buildBuyLink(_36,_38,amt);
}
}
s+=showCart(_36);
s+="</tr></table>";
}
return s;
}
function buildCaption(arr,_3d){
arr=arr.slice(0);
arr[0]=(_3d+1)+". "+arr[0];
if(arr.length>4&&arr[4]!=""&&!isNaN(arr[4])){
arr[4]="$"+arr[4];
}
if(arr.length>5){
arr.length=5;
}
for(var i=arr.length-1;i>0;i--){
if(arr[i]==""){
arr.splice(i,1);
}
}
return arr;
}
function buildHiddenInput(_3f,val){
return "<input type='hidden' name='"+_3f+"' value='"+val+"'/>";
}
function buildBuyLink(_41,_42,amt){
var s="<td><form target='paypal' action='https://www.paypal.com/cgi-bin/webscr' 'method='post'><div>";
s+=buildHiddenInput("cmd","_cart");
s+=buildHiddenInput("business",_41);
s+=buildHiddenInput("amount",amt);
s+=buildHiddenInput("add","1");
s+=buildHiddenInput("item_name",_42);
s+=buildHiddenInput("page_style","fgw");
s+=buildHiddenInput("shopping_url","");
s+="<input class='buy' type='image' src='images/buy.gif' name='submit' alt='buy' title='buy'/>";
return s+"</div></form></td>";
}
function showCart(_45){
var s="<td><form target='paypal' action='https://www.paypal.com/cgi-bin/webscr' 'method='post'><div>";
s+=buildHiddenInput("cmd","_cart");
s+=buildHiddenInput("business",_45);
s+=buildHiddenInput("display","1");
s+=buildHiddenInput("page_style","fgw");
s+=buildHiddenInput("shopping_url","");
s+="<input class='buy' type='image' src='images/cart.gif' name='submit' alt='view cart' title='view cart'/>";
return s+"</div></form></td>";
}

