<!--
function SelectNum(totalnum){
// returns a semi-random integer ( 0 <= num < totalnum)
// add one to return to line (1 <= num <= totalnum)
var num = Math.random();
return Math.floor(num * totalnum);
}

function SelectPic(picprefix, numpics, linkyn, textyn){
// provides link, photo, and text for given prefix
// needed: picprefix - '','txt', 'link'
//var basehref ="http://www.baylor.edu/physicscircus/images/";
var basehref ="images/";
var randnum = SelectNum(numpics);
var picaddress = basehref.concat(picprefix,randnum,".jpg");
//alert (randnum);
document.getElementById(picprefix).src=picaddress;
if (linkyn != 0) {
document.getElementById(picprefix.concat("link1")).href=piclink[randnum];
document.getElementById(picprefix.concat("link2")).href=piclink[randnum];
}
if (textyn != 0) {
document.getElementById(picprefix.concat("txt")).innerHTML=pictxt[randnum];
}
}

function SelectMultiPic(picprefix, numopt, numpics, linkyn, textyn){
// provides link, photo, and text for given prefix
// needed: picprefix - '','txt', 'link'
//var basehref ="http://www.baylor.edu/Research/test/images/";
var basehref ="images/";
var randnum = SelectNum(numpics);
var x = 0;
var parsenum = randnum;

for (x=0; x < numopt; x++) {
var picaddress = basehref.concat(picprefix,parsenum,".jpg");

document.getElementById(picprefix+x).src=picaddress;

if (linkyn != 0) {
document.getElementById(picprefix.concat(x,"link1")).href=piclink1[parsenum];
document.getElementById(picprefix.concat(x,"link1b")).href=piclink1[parsenum];
document.getElementById(picprefix.concat(x,"link1c")).href=piclink1[parsenum];
document.getElementById(picprefix.concat(x,"link2")).href=piclink2[parsenum];
} //end if
if (textyn != 0) {
document.getElementById(picprefix.concat(x,"txt1")).innerHTML=pictxt1[parsenum];
document.getElementById(picprefix.concat(x,"txt2")).innerHTML=pictxt2[parsenum];
} //end if

if (parsenum == numpics-1)
{
parsenum = 0;
} //end if
else
{
parsenum++;
} //end else
} //end for
} //end of function

function CellMouseOver(cellname){
// changes background color for rollover bar cells

document.getElementById("choiceA").bgColor='#9900cc';
document.getElementById("choiceB").bgColor='#00cc00';
document.getElementById("choiceC").bgColor='#cc0000';
document.getElementById("choiceD").bgColor='#0000cc';

ChangeList(cellname);
}

function ChangeImage(imgname){
// changes background image for rollover cells

var q = document.image[imgname].src
document.image[imgname].src = imgcache[imgname].src
imgcache[imgname].src=k

}


-->
