﻿function ShowPopupMessage() {
    /******************
    ** STEPHEN - feel free to change this next line to anything
    ** you'd like.
    *******************/
    var popupMessageTitle = "Click the X at the Right to Close this window";

	var divOpener = '<div id="popupNotice" style="background: #333; border: 4px solid #999; width: 600px; color: #eee; position: absolute; top: 100px; left: 100px; z-index: 9999;"> \
		<div id="popupTitleBar" style="margin: 2px 2px;"> \
			<div id="popupTitle" style="float: left; background: #000; width: 570px; font-family: Arial, sans-serif; padding: 0px 3px;">';
            
    var divMid = '</div> \
			<div id="popupCloseX" style="float: right; width: 10px; color: #f00; font-weight: bold; font-family: Arial, sans-serif; padding-right: 2px;"><a href="#" id="popupClose1" onclick="HidePopupMessage();return false;">X</a></div> \
			<div id="popupContent" style="clear: both; margin: 5px 5px; text-align: center;">';
	
	var divCloser = '</div> \
			<div id="popupCloseBottom" style="text-align: center; margin-top: 10px;"> \
				<a href="#" id="popupClose2" onclick="HidePopupMessage();return false;">Close</a> \
			</div> \
		</div> \
	</div>';
	
	var divCode = divOpener + popupMessageTitle + divMid + '<iframe src="popupMessage.html" width="100%" height="100%" id="messageFrame" marginheight="5" frameborder="0" scrolling="no" onload="ResizeIframe();" />' + divCloser;
	
	$("body").append(divCode);
	
	return false;
}

function HidePopupMessage () {
	$("#popupNotice").hide();
	return false;
}

function ResizeIframe() {
    $("#messageFrame").height(document.frames["messageFrame"].document.body.scrollHeight + 40);
}
