var interval = 3500; // delay between rotating images (in millisecs)
var image_index = 0;
image_list = new Array();
var number_of_image = 5; //james neal

image_list[image_index++] = new imageItem("../images/gacadem.gif");
image_list[image_index++] = new imageItem("../images/clinict.jpg");
image_list[image_index++] = new imageItem("../images/sphinx75.jpg");
image_list[image_index++] = new imageItem("../images/ibis2.jpg");
image_list[image_index++] = new imageItem("../images/usalogom.gif");

function imageItem(image_location) {
this.image_item = new Image();
this.image_item.src = image_location;
}


function get_ImageItemLocation(imageObj) {
return(imageObj.image_item.src)
}

function rotateImage(place) {
image_index = (image_index+1) % number_of_image;
var new_image = get_ImageItemLocation(image_list[image_index]);
document[place].src = new_image;
var recur_call = "rotateImage('"+place+"')";
setTimeout(recur_call, interval);
}

var tickercontents=new Array()
tickercontents[0]='Manage your child&rsquo;s medical records, <a href="http://www.southalabama.edu/genetics/bdgc/parentjourn.htm"><font color="#cccccc">CLICK HERE.</font></a>'
tickercontents[1]='Get a portable record manager for your child <a href="http://www.southalabama.edu/genetics/bdgc/parentjourn.htm"><font color="#cccccc">HERE.</font></a>'

var tickdelay=5000; //delay btw messages
var highlightspeed=50; //10 pixels at a time.

var currentmessage=0;
var clipwidth=0

function changetickercontent(){
crosstick.style.clip="rect(0px 0px auto 0px)"
crosstick.innerHTML=tickercontents[currentmessage]
highlightmsg()
}

function highlightmsg(){
var msgwidth=crosstick.offsetWidth
if (clipwidth<msgwidth){
clipwidth+=highlightspeed
crosstick.style.clip="rect(0px "+clipwidth+"px auto 0px)"
beginclip=setTimeout("highlightmsg()",20)
}
else{
clipwidth=0
clearTimeout(beginclip)
if (currentmessage==tickercontents.length-1) currentmessage=0
else currentmessage++
setTimeout("changetickercontent()",tickdelay)
}
}

function start_ticking(){
crosstick=document.getElementById? document.getElementById("highlighter") : document.all.highlighter
crosstickParent=crosstick.parentNode? crosstick.parentNode : crosstick.parentElement
if (parseInt(crosstick.offsetHeight)>0)
crosstickParent.style.height=crosstick.offsetHeight+'px'
else
setTimeout("crosstickParent.style.height=crosstick.offsetHeight+'px'",100) //delay for Mozilla's sake
changetickercontent()
}
var msg;
function winOpen(url) {

msg=open(url,"","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=270,height=90");

}

function winclose() {

msg.close();

}
