


var gMyMovie
var gMyBrowser="void"
pathname ='/images/navbuts/'
var imagesExist
var rollSuffix='rol.gif'
var origSuffix='but.gif'
var origTextSuffix='white.gif'
var textSuffix='hi'
var ext ='.gif'
var origDotSuffix="cleardot.gif"
var downSuffix='dwn.gif'
var localPathName = 'images/'
var thumbNumber = '0'
var imageSuffix = '.jpg'
var largeImageSuffix = 'big.jpg'
var largeImageName = 'display'
var slideTextSuffix ='hi.gif'
var stageTextName = 'stageText'
var thumbTextName = 'thumbText'
var hideGif = '../images/clear.gif'
var displayTextName ='displayText'

if (document.images) imagesExist=document.images
	else  imagesExist=null


//CREATE IMAGE ARRAY FOR PRLD
if (imagesExist)  {


arImageSrc = new Array(
	pathname + "white.gif",	
	pathname + "landrol.gif",	
	pathname + "visitrol.gif",	
	pathname + "buildrol.gif",
	pathname + "panelrol.gif",
	pathname + "envirorol.gif",
    pathname + "teachrol.gif",
    pathname + "homerol.gif",
	pathname + "landhi.gif",	
	pathname + "visithi.gif",	
	pathname + "buildhi.gif",
	pathname + "panelhi.gif",
	pathname + "envirohi.gif",
    pathname + "teachhi.gif",
    pathname + "over5hi.gif",
    pathname + "imageshi.gif",
    pathname + "timehi.gif",
    pathname + "nursehi.gif",
    pathname + "bravehi.gif",
    pathname + "awwhi.gif",
    pathname + "opt2rol.gif",
    pathname + "opt3rol.gif",
    pathname + "opt4rol.gif",
    pathname + "opt5rol.gif",
    pathname + "opt6rol.gif",
    pathname + "opt7rol.gif",

    localPathName + "0t2hi.gif",
    localPathName + "0t3hi.gif",
    localPathName + "0t4hi.gif",
    localPathName + "0t5hi.gif",

    localPathName + "s1hi.gif",
    localPathName + "s2hi.gif",
    localPathName + "s3hi.gif",
    localPathName + "s4hi.gif",
    localPathName + "s5hi.gif",
    localPathName + "s6hi.gif",
    localPathName + "s7hi.gif",
    localPathName + "s8hi.gif",
    localPathName + "s9hi.gif",
    localPathName + "s10hi.gif",
    localPathName + "s11hi.gif",
    localPathName + "s12hi.gif",
    localPathName + "s13hi.gif",
    localPathName + "s14hi.gif",
    localPathName + "s15hi.gif",

    localPathName + "s1rol.gif",
    localPathName + "s2rol.gif",
    localPathName + "s3rol.gif",
    localPathName + "s4rol.gif",
    localPathName + "s5rol.gif",
    localPathName + "s6rol.gif",
    localPathName + "s7rol.gif",
    localPathName + "s8rol.gif",
    localPathName + "s9rol.gif",
    localPathName + "s11rol.gif",
    localPathName + "s12rol.gif",
    localPathName + "s13rol.gif",
    localPathName + "s14rol.gif",
    localPathName + "s15rol.gif",

    localPathName + "s1dwn.gif",
    localPathName + "s2dwn.gif",
    localPathName + "s3dwn.gif",
    localPathName + "s4dwn.gif",
    localPathName + "s5dwn.gif",
    localPathName + "s6dwn.gif",
    localPathName + "s7dwn.gif",
   	localPathName + "s8dwn.gif",
    localPathName + "s9dwn.gif",
    localPathName + "s11dwn.gif",
    localPathName + "s12dwn.gif",
    localPathName + "s13dwn.gif",
    localPathName + "s14dwn.gif",
    localPathName + "s15dwn.gif")


arImageList = new Array()



for (counter in arImageSrc) {
	arImageList[counter] = new Image()
	arImageList[counter].src = arImageSrc[counter]
	}

}




thumbArray = new Array(
	
	"t1",	
	"t2",	
	"t3",
	"t4",
	"t5")



function showText(name,type,num) {
    if (imagesExist) {
	if (type == 'thumb') {
	//message coming from thumbnail graphic

	imagesExist[thumbTextName].src = localPathName + thumbNumber + name + slideTextSuffix
	} else if(type=='stage'){
	//message coming from stage buttons -- need to display caption for stage and show rollover

	if(num != thumbNumber) {
	imagesExist[stageTextName].src = localPathName + name + slideTextSuffix
	imagesExist[name].src = localPathName + name + rollSuffix }
	} else {
	//need to display caption for main display
	imagesExist[displayTextName].src = localPathName + thumbNumber + name + slideTextSuffix }
    } else {
	alert('To view the slide show you will need a more up to date browser')
            }


}

function hideText(name,type,num){
    if (imagesExist) {
	if (type == 'thumb') {
		imagesExist[thumbTextName].src = hideGif
	} else if(type=='stage'){
		
		if(num != thumbNumber) {
		oldNum = parseInt(thumbNumber) + 1
		newName = 's' + oldNum
	        imagesExist[stageTextName].src = localPathName + newName + slideTextSuffix
                imagesExist[name].src = localPathName + name + origSuffix }}
   } else {
     alert('To view the slide show you will need a more up to date browser')
            }
}



function showLargeImage(imageName){
    if (imagesExist) {
	compName = thumbNumber + imageName + largeImageSuffix
	
	imagesExist[largeImageName].src = localPathName + compName
	showText(imageName)
   } else {
     alert('To view the slide show you will need a more up to date browser')
            }
}


function switchThumbs(num,name) {
    if (imagesExist) {
  	if(thumbNumber!= num) {
	showMouseDown(name)
	oldNum = parseInt(thumbNumber) + 1
	newName = 's' + oldNum
	revertButton(newName)
	thumbNumber= num
        
//use the following two lines if the large image is to change with the thumbnails
	//imageName = thumbArray[0]
	//showLargeImage(imageName)

 	for(var i=0; i<=thumbArray.length-1; i++){
		imageName = thumbArray[i]
           
		imagesExist[imageName].src = localPathName + num + imageName + imageSuffix }
		
	} else {
		//have clicked the current selected stage option

	}

   } else {
     alert('To view the slide show you will need a more up to date browser')
            }
}

function showStatus(message,num) {	
	if(num!=thumbNumber) {
	window.status=message
	return true 
	} else {
	window.status='Already loaded'
	return true}

}

function showMouseDown(name) {
    if (imagesExist) {
	imagesExist[name].src = localPathName + name + downSuffix
   } else {
     alert('To view the slide show you will need a more up to date browser')
            }
}

function revertButton(name) {
    if (imagesExist) {
	imagesExist[name].src = localPathName + name + origSuffix
    } else {
      alert('To view the slide show you will need a more up to date browser')
            }
}


//used for right menu rollover-pic detail rollover
function hilite(name,rollGraphic,isRolled) {
	if (imagesExist) {
		if(isRolled)  {

		   imagesExist[name].src= pathname + rollGraphic + ext;

		} else {
		   
		   imagesExist[name].src= pathname + origDotSuffix;}
   }		 
}


//--

function off(name,option) {
	if (imagesExist) {
		if(option)  {
		   imagesExist[option].src= pathname + option + origSuffix;
		} else {
		   imagesExist[name].src= pathname + name + origSuffix;
		   		
			}
		   imagesExist[textSuffix].src= pathname + origTextSuffix;
   }		 
}

function on(name,option) {
	if (imagesExist) {
		if(option)  { 
		   imagesExist[option].src= pathname + option + rollSuffix;
		 } else {

          imagesExist[name].src= pathname + name + rollSuffix; 
                   			}
		   imagesExist[textSuffix].src= pathname + name  + textSuffix + ext;
		
  }	
}



