

// Rollover functions

function SimpleSwap(el,which){
  el.src=el.getAttribute(which||"origsrc");
}

function SimpleSwapSetup(){
  var x = document.getElementsByTagName("img");
  for (var i=0;i<x.length;i++){
    var oversrc = x[i].getAttribute("oversrc");
    if (!oversrc) continue;
    // preload image
    // comment the next two lines to disable image pre-loading
    x[i].oversrc_img = new Image();
    x[i].oversrc_img.src=oversrc;
    // set event handlers
    x[i].onmouseover = new Function("SimpleSwap(this,'oversrc');");
    x[i].onmouseout = new Function("SimpleSwap(this);");
    // save original src
    x[i].setAttribute("origsrc",x[i].src);
  }
}

var PreSimpleSwapOnload =(window.onload)? window.onload : function(){};
window.onload = function(){PreSimpleSwapOnload(); SimpleSwapSetup();}

// end Rollover functions



// Randomize sets of two images, i.e. rotate in synch on refresh

// Random numbers are generated using Math.random() JavaScript function
// Whole numbers between 0 and maxnumber
var randomnumber=Math.floor(Math.random()*10);

var randomnumber2=Math.floor(Math.random()*10);

var ar = new Array(
"<img src='images/slides/t1.jpg' width='220' height='77' border='0' alt='Photos' />",
"<img src='images/slides/t2.jpg' width='220' height='77' border='0' alt='Photos' />",
"<img src='images/slides/t3.jpg' width='220' height='77' border='0' alt='Photos' />",
"<img src='images/slides/t4.jpg' width='220' height='77' border='0' alt='Photos' />",
"<img src='images/slides/t5.jpg' width='220' height='77' border='0' alt='Photos' />",
"<img src='images/slides/t6.jpg' width='220' height='77' border='0' alt='Photos' />",
"<img src='images/slides/t7.jpg' width='220' height='77' border='0' alt='Photos' />",
"<img src='images/slides/t8.jpg' width='220' height='77' border='0' alt='Photos' />",
"<img src='images/slides/t9.jpg' width='220' height='77' border='0' alt='Photos' />",
"<img src='images/slides/t10.jpg' width='220' height='77' border='0' alt='Photos' />"
);


var ar2 = new Array(
"<img src='images/slides/b1.jpg' width='220' height='248' border='0' alt='Photos' />",
"<img src='images/slides/b2.jpg' width='220' height='248' border='0' alt='Photos' />",
"<img src='images/slides/b3.jpg' width='220' height='248' border='0' alt='Photos' />",
"<img src='images/slides/b4.jpg' width='220' height='248' border='0' alt='Photos' />",
"<img src='images/slides/b5.jpg' width='220' height='248' border='0' alt='Photos' />",
"<img src='images/slides/b6.jpg' width='220' height='248' border='0' alt='Photos' />",
"<img src='images/slides/b7.jpg' width='220' height='248' border='0' alt='Photos' />",
"<img src='images/slides/b8.jpg' width='220' height='248' border='0' alt='Photos' />",
"<img src='images/slides/b9.jpg' width='220' height='248' border='0' alt='Photos' />",
"<img src='images/slides/b10.jpg' width='220' height='248' border='0' alt='Photos' />"
)


// Duplicate of above for pages in subdirectories and cgi scripts

var arSub = new Array(
"<img src='../images/slides/t1.jpg' width='220' height='77' border='0' alt='Photos' />",
"<img src='../images/slides/t2.jpg' width='220' height='77' border='0' alt='Photos' />",
"<img src='../images/slides/t3.jpg' width='220' height='77' border='0' alt='Photos' />",
"<img src='../images/slides/t4.jpg' width='220' height='77' border='0' alt='Photos' />",
"<img src='../images/slides/t5.jpg' width='220' height='77' border='0' alt='Photos' />",
"<img src='../images/slides/t6.jpg' width='220' height='77' border='0' alt='Photos' />",
"<img src='../images/slides/t7.jpg' width='220' height='77' border='0' alt='Photos' />",
"<img src='../images/slides/t8.jpg' width='220' height='77' border='0' alt='Photos' />",
"<img src='../images/slides/t9.jpg' width='220' height='77' border='0' alt='Photos' />",
"<img src='../images/slides/t10.jpg' width='220' height='77' border='0' alt='Photos' />"
);


var ar2Sub = new Array(
"<img src='../images/slides/b1.jpg' width='220' height='248' border='0' alt='Photos' />",
"<img src='../images/slides/b2.jpg' width='220' height='248' border='0' alt='Photos' />",
"<img src='../images/slides/b3.jpg' width='220' height='248' border='0' alt='Photos' />",
"<img src='../images/slides/b4.jpg' width='220' height='248' border='0' alt='Photos' />",
"<img src='../images/slides/b5.jpg' width='220' height='248' border='0' alt='Photos' />",
"<img src='../images/slides/b6.jpg' width='220' height='248' border='0' alt='Photos' />",
"<img src='../images/slides/b7.jpg' width='220' height='248' border='0' alt='Photos' />",
"<img src='../images/slides/b8.jpg' width='220' height='248' border='0' alt='Photos' />",
"<img src='../images/slides/b9.jpg' width='220' height='248' border='0' alt='Photos' />",
"<img src='../images/slides/b10.jpg' width='220' height='248' border='0' alt='Photos' />"
)



