function rollovers() {
	if (!document.getElementById) return
	
	var preLoad = new Array();
	var preLoad2 = new Array();
	var preLoad3 = new Array();
	var tempSrc;
	var imgTemp = document.getElementsByTagName('img');
	var inputTemp = document.getElementsByTagName('input');
	var images = new Array();
	var images2 = new Array();
	for( var i=0; i<imgTemp.length; i++ ) {
		if (imgTemp[i].className == 'imgover') {
			images[ images.length ] = imgTemp[i];
		}
		if (imgTemp[i].className == 'imgover2') {
			images2[ images2.length ] = imgTemp[i];
		}
	}
	for( var i=0; i<inputTemp.length; i++ ) {
		if( inputTemp[i].getAttribute('type').toLowerCase() == 'image' && inputTemp[i].className == 'imgover' ) {
			images[ images.length ] = inputTemp[i];
		}
		if( inputTemp[i].getAttribute('type').toLowerCase() == 'image' && inputTemp[i].className == 'imgover2' ) {
			images2[ images2.length ] = inputTemp[i];
		}
	}
	for (var i = 0; i < images.length; i++) {		
		var src = images[i].getAttribute('src');
		var ftype = src.substring(src.lastIndexOf('.'), src.length);
		var hsrc = src.replace(ftype, '_on'+ftype);
		
		images[i].setAttribute('hsrc', hsrc);
		
		preLoad[i] = new Image();
		preLoad[i].src = hsrc;
		
		images[i].onmouseover = function() {
			tempSrc = this.getAttribute('src');
			this.setAttribute('src', this.getAttribute('hsrc'));
		}	
		
		images[i].onmouseout = function() {
			if (!tempSrc) tempSrc = this.getAttribute('src').replace('_on'+ftype, ftype);
			this.setAttribute('src', tempSrc);
		}
	}
	for (var i = 0; i < images2.length; i++) {		
		var src = images2[i].getAttribute('src');
		var ftype = src.substring(src.lastIndexOf('.'), src.length);
		var hsrc = src.replace(ftype, '_on'+ftype);
		var hsrc2 = src.replace(ftype, '_pr'+ftype);
		var hsrc3 = src.replace(ftype, ftype);
		
		images2[i].setAttribute('hsrc', hsrc);
		images2[i].setAttribute('hsrc2', hsrc2);
		images2[i].setAttribute('hsrc3', hsrc3);
		
		preLoad2[i] = new Image();
		preLoad2[i].src = hsrc.replace('_cu', '');
		preLoad3[i] = new Image();
		preLoad3[i].src = hsrc2.replace('_cu', '');
		
		images2[i].onmouseover = function() {
			tempSrc = this.getAttribute('hsrc').replace('_cu', '');
			this.setAttribute('src', tempSrc);
		}	

		images2[i].onmousedown = function() {
			tempSrc = this.getAttribute('hsrc2').replace('_cu', '');
			this.setAttribute('src', tempSrc);
		}

		images2[i].onmouseup = function() {
			tempSrc = this.getAttribute('hsrc').replace('_cu', '');
			this.setAttribute('src', tempSrc);
		}

		images2[i].onmouseout = function() {
			this.setAttribute('src', this.getAttribute('hsrc3'));
		}
	}
}
window.onload = rollovers;