var curleft = curtop = 0;
var iWidth = 500, iHeight = 400; //height and width of pop up minus arrow
var aryLoad = new Array('screen1.php', 'screen2.php', 'screen3.php'); //names of pages in order from index.php


function  PopWindow(obj, LoadID) { //nothing to edit below
	var objBox = document.getElementById('Popper');
	var sContent = "", sLoad = aryLoad[LoadID];
	
	Position(obj);
	
	sContent += "<div style='background:url(images/popout.png) no-repeat left top; height:20px; width:20px; float:left; position:absolute; margin-top: 20px;'></div>";
	sContent += "<i" + "frame allowtransparency='false' frameborder='0' marginheight='0' marginwidth='0' scrolling='no' style='border:3px solid #c1c1c1; margin-left: 17px; background:#fff; width:" + iWidth + "px; height:" + iHeight + "px;'";
	sContent += " src='" + sLoad + "'";
	sContent += "></i" + "frame" + ">";
	
	switch (LoadID) { //used to edit one-offs
		case 0:
			curleft += 270;
			break;
		case 1:
			curleft += 102;
			break;
		case 2:
			curleft += 109;
			break;
	}
	
	objBox.style.width = (iWidth + 17) + "px";
	objBox.style.height = iHeight + "px";
	objBox.innerHTML = sContent;
	
	objBox.style.left = curleft + "px";
	objBox.style.top = curtop + "px";
	objBox.style.display = "inline";
}

function Position(obj) {
	if (obj.offsetParent) {
		curleft = obj.offsetLeft
		curtop = obj.offsetTop
		while (obj = obj.offsetParent) {
			curleft += obj.offsetLeft
			curtop += obj.offsetTop
		}
	}
}

function Void() {
	var objBox = document.getElementById('Popper');
	
	objBox.style.display = "none";
	objBox.style.width = "0px";
	objBox.style.height = "0px";
	objBox.innerHTML = "";
	objBox.style.left = "0px";
	objBox.style.top = "0px";
}