function imageRollovers() {
/* looks for images of class roll and turns them into rollovers */
	
	function CollectionToArray(collection) {
		var r = new Array();
		for(var i=0; i<collection.length; i++) {
			//r.push(collection[i]); // doesn't work in IE5.0
			var t = new Array(collection[i]);
			r = r.concat(t);
			t = null;
		}
		return r;
	}
	
	
	var over = "-hi.";
	var out = "-lo.";
	var action = "roll";
	
	var images = CollectionToArray(document.getElementsByTagName("img"));
	var inputs = CollectionToArray(document.getElementsByTagName("input"));
	images = images.concat(inputs);
	
	var preload = new Array();
	for(var i=0; i<images.length; i++) {
		if(images[i].className.indexOf(action) > -1) {
			oldSrc = images[i].getAttribute("src");
			suffixStart = oldSrc.indexOf(out);
			
			if(suffixStart > -1) {
				newSrc = oldSrc.substring(0, suffixStart)+over+oldSrc.substring(suffixStart+4, oldSrc.length);
				if(images[i].parentNode.nodeName == "A") {
					images[i].parentNode.offstate = oldSrc;
					images[i].parentNode.onstate = newSrc;
					images[i].parentNode.onmouseover = function () {
						this.getElementsByTagName("img")[0].src = this.onstate;
						//this.src = this.onstate; 
					};
					images[i].parentNode.onmouseout = function () { 
						this.getElementsByTagName("img")[0].src = this.offstate;
						//this.src = this.offstate; 
					};
				} else {
					//alert(images[i].nodeName);
					images[i].offstate = oldSrc;
					images[i].onstate = newSrc;
					images[i].onmouseover = function () {
						this.src = this.onstate;
						//this.src = this.onstate; 
					};
					images[i].onmouseout = function () { 
						this.src = this.offstate;
						//this.src = this.offstate; 
					};
				}
						
				var oImage1 = new Image;
				oImage1.src = oldSrc;
				var oImage2 = new Image;
				oImage1.src = newSrc;
			}
		}
	}
	/*
	for(var i=0; i<inputs.length; i++) {
		if(images[i].className.indexOf(action) > -1) {
			oldSrc = images[i].getAttribute("src");
			suffixStart = oldSrc.indexOf(out);
			
			if(suffixStart > -1) {
				newSrc = oldSrc.substring(0, suffixStart)+over+oldSrc.substring(suffixStart+3, oldSrc.length);
				
				if(images[i].parentNode.nodeName == "A") {
					images[i].parentNode.offstate = oldSrc;
					images[i].parentNode.onstate = newSrc;
					images[i].parentNode.onmouseover = function () {
						this.getElementsByTagName("img")[0].src = this.onstate;
						//this.src = this.onstate; 
					};
					images[i].parentNode.onmouseout = function () { 
						this.getElementsByTagName("img")[0].src = this.offstate;
						//this.src = this.offstate; 
					};
				} else {
					alert(images[i].nodeName);
					images[i].offstate = oldSrc;
					images[i].onstate = newSrc;
					images[i].onmouseover = function () {
						this.src = this.onstate;
						//this.src = this.onstate; 
					};
					images[i].onmouseout = function () { 
						this.src = this.offstate;
						//this.src = this.offstate; 
					};
				}
						
				var oImage1 = new Image;
				oImage1.src = oldSrc;
				var oImage2 = new Image;
				oImage1.src = newSrc;
			}
		}
	*/
}
