function openPopUp (url, w, h, x, y) {

	var cookie = document.cookie;
	var bPopUp = "";
	if (cookie.length > 0) {
		startIndex = cookie.indexOf (url);
		if (startIndex != -1) {
			startIndex += url.length;
			endIndex = cookie.indexOf (";", startIndex);
			if (endIndex == -1) endIndex = cookie.length;
			bPopUp = unescape (cookie.substring (startIndex +1, endIndex));
		}
	}
	if (bPopUp != "nopopup") {
		var parm = "width=" + w + ",height=" + h + ",left=" + x + ",top=" + y + ",status=no,toolbar=no,menubar=no,scrollbars=no,resizable=no";
		remote=window.open('', url, parm);
		remote.location.href = "/popup/" + url + ".htm";
	}

}

function closePopUp(url) {

	if (url != "") {
		var expires = new Date();
		expires.setTime (expires.getTime() + 86400000);
		document.cookie = url + "=nopopup; expires=" + expires.toGMTString() + "; path=/; domain=apctp.org";
	}

	self.close ();

}


function PopUpTail (url) {

	var txt = "<table width=100% height='21' border='0' cellpadding='0' cellspacing='0' align='center'> <tr> <td bgcolor='#20234F'><a href='javascript:closePopUp(\""+url+"\");'><font style='font-size: 9pt; color: #FFFFFF;'>Do not show this page today</font></a></td> <td bgcolor='#20234F' width='60' align='right'><a href='javascript:closePopUp();'><img src='images/bu_close.gif' border='0' alt=''></a></td> </tr> </table>";

	document.write (txt);

}

