function showEmailForm()
{
	// Create and populate a new window:
	var widthOfPopup = "380";
	var isSafari = /AppleWebKit/.test(navigator.userAgent);
	var heightOfPopup = "450";
	if (isSafari)
		heightOfPopup = "400";
	var newWin = window.open("", "sendemail", 'toolbar=no,menubar=no,width=' + widthOfPopup + ',height=' + heightOfPopup);
	newWin.resizeTo(widthOfPopup, heightOfPopup);
	newWin.document.open();
	newWin.document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"><html><head><title>Contact Us</title></head><body style="margin: 0px; padding: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div style="overflow: hidden; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: \'Lucida Grande\', LucidaGrande, Lucida, \'Helvetica Neue\', helvetica, arial, sans-serif; color: rgb(51, 51, 51); background-image: url(/_wikithemes/paradisemotel.wikitheme/astroturfbg2.png); background-repeat: repeat; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: rgb(51, 112, 19); font-size: 100%; -webkit-text-size-adjust: auto; background-position: initial initial;"><div class="body" style="font-size: 0.76em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-align: center;"><div class="contents contentsbody">');
	newWin.document.write('<div class="header" id="page_header" style="color: rgb(255, 255, 255); background-image: url(/_wikithemes/paradisemotel.wikitheme/sky.jpg); background-repeat: repeat-x; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: white; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 5px; padding-right: 0px; padding-bottom: 4px; padding-left: 0px; border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: white; background-position: 0px 0px;"><div class="contents contentsheader" style="text-align: left; width: 90%; margin-top: 0px; margin-right: auto; margin-bottom: 0px; margin-left: auto; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"><div class="mainnav" style="clear: both; float: none; position: relative; top: 0px; left: 0px; height: 135px;"><span apple-content-name="body" style="display: block;"><a id="group_title" style="text-decoration: none; color: inherit; display: block; font-size: 2.5em; float: left; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 8px; padding-right: 0.5em; padding-bottom: 0px; padding-left: 0px; font-weight: bold; max-width: 60%; overflow-x: hidden; overflow-y: hidden; text-overflow: ellipsis; position: absolute; top: 0px; left: 13px; z-index: 3; width: 200px; height: 177px; text-indent: -9999px; background-image: url(/_wikithemes/paradisemotel.wikitheme/sign.png); min-width: 200px; background-repeat: no-repeat; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: initial; background-position: initial initial;" name="group_title">Paradise Motel</a></span>');
	newWin.document.write('</div></div><div class="end endheader" style="margin-left: auto; margin-right: auto; width: 280px; height: 75px; margin-top: -73px;"><span style="display: block; width: 280px; height: 200px; z-index: 20; background-image: url(/_wikithemes/paradisemotel.wikitheme/flamingo.png); background-repeat: repeat-x; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: initial; background-position: 0px 9px; "></span></div></div><div class="main" style="text-align: left; width: 90%; margin-top: 0px; margin-right: auto; margin-bottom: 0px; margin-left: auto; padding-top: 0px; padding-right: 0px; padding-bottom: 1.2em; padding-left: 0px;"><div class="pagecontent" id="page_body" style="margin-top: 38px; margin-right: 0px; margin-bottom: 40px; margin-left: 0px; padding-top: 3px; padding-right: 18px; padding-bottom: 10px; padding-left: 18px; overflow-x: hidden; overflow-y: hidden; text-overflow: ellipsis; word-wrap: break-word; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 2px; border-right-width: 2px; border-bottom-width: 2px; border-left-width: 2px; border-top-color: rgb(169, 169, 169); border-right-color: rgb(169, 169, 169); border-bottom-color: rgb(169, 169, 169); border-left-color: rgb(169, 169, 169); -webkit-border-top-right-radius: 10px 10px; -webkit-border-top-left-radius: 10px 10px; -webkit-border-bottom-left-radius: 10px 10px; -webkit-border-bottom-right-radius: 10px 10px; color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);">');
	newWin.document.write('<div id="wysiwyg_container"><div class="columns" style="width: 90%; position: relative; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; clear: both;"><div class="column columnprimary" style="position: relative; overflow-x: visible; overflow-y: visible; text-overflow: ellipsis; word-wrap: break-word; font-size: 1.11em; line-height: normal;"><div id="editable_content" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"><div class="wiki_entry"><div style="margin-top: 0em; margin-right: 0px; margin-bottom: 0em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"><font class="Apple-style-span" color="#333333" face="Arial"><span class="Apple-style-span" style="font-size: 10pt; line-height: normal;">');
	newWin.document.write('<form action="/paradisemotel/sendtoparadise.php" method="post" style="margin: 0px auto 0px auto; padding: 0px; position: relative;">');
	newWin.document.write(' <!-- begin IE tomfoolery --><br><!-- end --><label for="guestemail" style="display: block; float: left;">Email: </label><input id="guestemail" name="guestemail" style="clear: left; width: 298px; border: 1px solid #999;">');
	newWin.document.write('	<label for="guestmessage" style="clear: left; display: block; padding-top: 5px;">Message: </label><textarea id="guestmessage" name="guestmessage" style="clear: left; width: 300px; height: 50px; border: 1px solid #999;"></textarea>');
	newWin.document.write('	<input type="submit" value="Send" style="clear: left; display: block; width: 20%; margin: 10px auto 0px auto;">');
	newWin.document.write('</form>');
	newWin.document.write('</span></font></div></div></div></div></div></div></div></div></div></div></div></div></body></html>');
	newWin.document.close();
	newWin.focus();
	return false;
}

beforeParadise_prepare = window.prepare;
prepare = function() {
	if (window.beforeParadise_prepare) beforeParadise_prepare();
	$('linkML').onclick = showEmailForm;
	$$('a.inlinecontactlink').invoke('observe', 'click', function(inEvent) {
		Event.stop(inEvent);
		return showEmailForm();
	}.bindAsEventListener(window));
}

BurnDepartureCalculator = Class.createWithSharedInstance('burnDepartureCalculator', true);
BurnDepartureCalculator.prototype = {
	initialize: function() {
		this.departureDate = createDateObjFromISO8601('20090829T000000');
		this.populateDate();
	},
	populateDate: function() {
		var now = new Date();
		var diff = Math.max(this.departureDate - now, 0);
		var seconds = diff / 1000;
		var minutes = seconds / 60;
		var hours = minutes / 60;
		var days = hours / 24;
		$$('.time_before_departure').each(function(elm) {
			replaceElementContents(elm, ''+(Math.ceil(days)));
		});
	}
}