<!--

myURL = "/";
var iconPath = myURL + "images/navbuts/"
var rollIcon = "rol.";
var origIcon = "but.";
var offIcon = "off.";


//CREATE IMAGE ARRAY FOR PRLOAD
if (document.images)  {

var IconSrc = new Array(
  "comrol.jpg",
  "audrol.jpg",
  "audoff.jpg",
  "docrol.jpg",
  "docoff.jpg",
  "imgrol.jpg",
  "imgoff.jpg",
  "maprol.jpg",
  "vidrol.jpg",
  "vidoff.jpg",
  "Authorrol.gif",
  "Authoroff.gif",
  "Subjectrol.gif",
  "Subjectoff.gif",
  "Categoryrol.gif",
  "Categoryoff.gif",
   "Findrol.gif",
  "Findoff.gif"
)

var IconList = new Array()

for (counter in IconSrc) {

	IconList[counter] = new Image()
	IconList[counter].src = iconPath + IconSrc[counter]
	}

}


function iconRoll(name,rollOn,fieldName,fileType) {

	if(name == document.view[fieldName].value) { 

	return; 
	}; // DONT ROLL OVER CURRENT SELECTION

  	if (document.images) {

		if(rollOn) {

			 document.images[name].src= iconPath + name + rollIcon + fileType;

		} else {

			document.images[name].src = iconPath + name + origIcon + fileType;
		}				
			
  	}

	

}


function setSelection(name,fieldName,fileType) {
	var myList = eval(fieldName + "List");

 	var len = myList.length;
	var listItem;
	var i;
 	for(i=0;i<len;i++) {
 		listItem = myList[i];
	
		if(listItem != name) {
			document.images[listItem].src =iconPath + listItem + origIcon + fileType;
		} else {
			document.images[listItem].src =iconPath + listItem + offIcon + fileType;
		}
		
 	}

	if(fieldName != null ) { 
		document.view[fieldName].value = name;
	}
 }

//-->
