<!--
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/sacs/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){
// chnages background color for rollover bar cells

document.getElementById("General Resources").bgColor='#000000';
document.getElementById("Research Resources").bgColor='#000000';
document.getElementById("Intellectual Property").bgColor='#000000';
document.getElementById("News Events").bgColor='#000000';
document.getElementById("Baylor Fastlane").bgColor='#000000';
document.getElementById(cellname).bgColor='#003300';

ChangeList(cellname);
}

function DetailLayer() { 
  var i,p,v,obj,args=DetailLayer.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { 
	  obj=obj.style; 
	  v=(v=='show')?'visible':(v=='hide')?'hidden':v; 
	  if (args[3]) {
	     obj.left=args[3]; obj.top=args[4]; 
	  }
	}
    obj.visibility=v; 
  }
}

function getRealLeft(el) {
    xPos = el.offsetLeft;
    tempEl = el.offsetParent;
    while (tempEl != null) {
        xPos += tempEl.offsetLeft;
        tempEl = tempEl.offsetParent;
    }
    return xPos;
}

function getRealTop(el) {
    yPos = el.offsetTop;
    tempEl = el.offsetParent;
    while (tempEl != null) {
        yPos += tempEl.offsetTop;
        tempEl = tempEl.offsetParent;
    }
    return yPos;
}

function MM_findObj(n, d) { 
  var p,i,x;
if(!d) d=document;

if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document;
n=n.substring(0,p);
}
if(!(x=d[n])&&d.all) x=d.all[n];

for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];

for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);

if(!x && d.getElementById) x=d.getElementById(n); return x;
}

collagex=1;

function runme(){
picprefix = "collage";
var basehref ="images/";
var picaddress = basehref.concat("collage",collagex%9,".jpg");
document.getElementById(picprefix).src=picaddress;
collagex=collagex+1;
}

function goShow() { 
splashimg.filters[0].Apply();

if (splashimg.style.visibility == "visible") 
{ 
splashimg.style.visibility = "hidden"; 
splashimg.filters.revealTrans.transition=12; 
} 
else 
{ 
splashimg.style.visibility = "visible"; 
splashimg.filters[0].transition=12; 
} 
splashimg.filters[0].Play(); 
} 

function slideshow(){
window.setTimeout("runme()", 5000);
}

-->
