window.onload = rolloverInit;

function rolloverInit() {
	for (var i=0; i<document.images.length; i++) {
		if (document.images[i].parentNode.tagName == "A" && document.images[i].className == 'roll') {
			setupRollover(document.images[i]);
		}
		if (document.images[i].parentNode.tagName == "A" && document.images[i].className == 'home') {
			setupHomeRollover(document.images[i]);
		}
	}
	for (var i=0; i<document.forms.length; i++) {
		if(document.forms[i].className == 'paginate'){
			setupPaginate(document.forms[i]);
		}
	}
}

function setupRollover(thisImage) {
	thisImage.outImage = new Image();
	thisImage.outImage.src = thisImage.src;
	thisImage.onmouseout = rollOut;

	thisImage.overImage = new Image();
	thisImage.overImage.src = thisImage.id;
	thisImage.onmouseover = rollOver;
}


function rollOut() {
	this.src = this.outImage.src;
}

function rollOver() {
	this.src = this.overImage.src;
}

function setupHomeRollover(thisImage){
	
	thisImage.ptitle = document.getElementById(thisImage.id + '_title');
	thisImage.divcaption = document.getElementById(thisImage.id + '_caption');
	
    thisImage.onmouseover = homeRollOver;	
	thisImage.onmouseout = homeRollOut;

}

function homeRollOut() {
	this.ptitle.style.display = 'none';
	this.divcaption.style.display = 'none';
}

function homeRollOver() {
	this.ptitle.style.display = 'block';
	this.divcaption.style.display = 'block';
}

function setupPaginate(thisForm) {
	
}


