//AUTHOR: ROBERT CATALANO
//MODULE FROM CODE LIB:SL
//RCATALANO@WORLDSYNERGY.COM
//V2.0

//additional improvements over 1.0
//the ability to add a path to your images repository

var verNum;
verNum = parseInt(navigator.appVersion);

button = new Array(10);

//enter any additional path information below exampld: /stores/eltech/images/topnav/
path = "images/mo/";

button[0] = "doctors";
button[1] = "services";
button[2] = "locations";
button[3] = "conditions";
button[4] = "testing";
button[5] = "surgery";
button[6] = "home";
button[7] = "staff";
button[8] = "news";
button[9] = "contact";


mevent = new Array(3);
mevent[0] = "";
mevent[1] = "_mo";
mevent[2] = "_click";

for(j=0;j<3;j++)
{
        for(i=0;i<10;i++)
        {
        eval(button[i]+mevent[j]+" = new Image;")
        eval(button[i]+mevent[j]+".src = '"+path+button[i]+mevent[j]+".gif';")
        }
}

curr_on = "";

function flip(imgName) {
if ((verNum >= 3) && (curr_on != imgName))
{
        if(document [imgName].src != eval(imgName+"_mo.src"))
        {
        document [imgName].src = eval(imgName+"_mo.src");
        }
}
}

function flipout(imgName) {
if ((verNum >= 3) && (curr_on != imgName))
{
        if(document [imgName].src != eval(imgName+".src"))
        {
        document [imgName].src = eval(imgName+".src");
        }
}
}

function setclick(imgName) {
if (verNum >= 3)
{
if(curr_on != "")
{
        document [curr_on].src = eval(curr_on+".src");
}
curr_on = imgName;
document [imgName].src = eval(imgName+"_click.src");
window.focus();
}
}

function setgray(imgName)
{
if(curr_on != "" && imgName == "")
{
        document [curr_on].src = eval(curr_on+".src");
}else if(imgName != ""){
        document [imgName].src = eval(imgName+".src");
}
curr_on = "";
window.focus();
}

//alert('2');

