// declare the state of any animated button
var btnStat = "";

//
// Rollover
// this function changes the src for am IMG tag depending on the state and the action
// name: the name of the button convention used "b_image" all buttons must be gif images
// save the default src as name.gif, over src as name_ov.gifm and animation as name_anim.gif 
function Hilite(name,action)
{
  if(window.document.images) 
  {
	
	arrName = name.split("_");
	  
	switch(action){
		case "out":
			// return the button to default state
			window.document.images[name].src = "images/" + arrName[0] + "_" + arrName[1] + ".gif";
			btnStat = "out";
			break;
	
		case "over":
			// once the button is clicked the state will not change (must manually change the state)
			if(btnStat != "ANIM"){
				window.document.images[name].src = "images/" + arrName[0] + "_" + arrName[1] + "02.gif";
				btnStat = "over";
			} // if
			break;
		
		case "click":
			// once the button is clicked the state will not change (must manually change the state)
			if(btnStat != "anim"){
				window.document.images[name].src = "images/" + arrName[0] + "_" + arrName[1] + ".gif";
				btnStat = "click";
			} // if
			break;
			
		case "anim":
			window.document.images[name].src = "images/" + arrName[0] + "_" + arrName[1] + "_anim.gif";
			btnStat = "anim";	
			break;
	} // switch
  }
}

//
// continue the animations after the button is clicked
//
function anim(idtag){
	if (document.all && idtag != "") {document.images[idtag].src = document.images[idtag].src;}
} // function anim