window.onload = imageDisplays;

function imageDisplays() {
	for (var i=0; i<document.links.length; i++) {
		if (document.links[i].className == "est2screenshot") {
			document.links[i].onclick = est2screenshot;
		}
		else if (document.links[i].className == "rolscreenshot") {
			document.links[i].onclick = rolscreenshot;
		}
		else if (document.links[i].className == "est2art1") {
			document.links[i].onclick = est2art1;
		}
		else if (document.links[i].className == "est2art2") {
			document.links[i].onclick = est2art2;
		}
		else if (document.links[i].className == "ruinsart") {
			document.links[i].onclick = ruinsArt;
		}
		else if (document.links[i].className == "preview") {
			document.links[i].onclick = preview;
		}
		else if (document.links[i].className == "layout") {
			document.links[i].onclick = oldLayout;
		}
	}
}

function est2screenshot() {
	var screenWindow = window.open(this.href,"est2screenDisplay","top=20,left=20,height=275,width=300,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes");
	screenWindow.focus();
	return false;
}

function rolscreenshot() {
	var screenWindow = window.open(this.href,"rolScreenDisplay","top=20,left=20,height=210,width=280,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes");
	screenWindow.focus();
	return false;
}

function est2art1() {
	var screenWindow = window.open(this.href,"est2art1Display","top=20,left=20,height=580,width=380,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes");
	screenWindow.focus();
	return false;
}

function est2art2() {
	var screenWindow = window.open(this.href,"est2art2Display","top=20,left=20,height=550,width=425,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes");
	screenWindow.focus();
	return false;
}

function ruinsArt() {
	var screenWindow = window.open(this.href,"ruinsArtDisplay","top=20,left=20,height=320,width=270,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes");
	screenWindow.focus();
	return false;
}

function preview() {
	var screenWindow = window.open(this.href,"previewDisplay","top=20,left=20,height=585,width=500,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes");
	screenWindow.focus();
	return false;
}

function oldLayout() {
	var screenWindow = window.open(this.href,"layoutDisplay","top=20,left=20,height=510,width=660,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes");
	screenWindow.focus();
	return false;
}