function popup(id,l,i)
{ /*
* Opens a popup window.
* Tested with IE6, Opera7, Mozilla5.
* (c) Björn Törnroth 2006-10-20.
*/

if (i != "availability") { var width = 700; var height = 500; var top = 50; var left = 50; }
else { var width = 600; var height = 450; var top = 90; var left = 90; }
var strUrl = "popup.php?id=" + id + "&l=" + l + "&i=" + i;
var strWinOptions = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,location=no" +
					",width=" + width + ",height=" + height + ",top=" + top + ",left=" + left;
var oPopup = window.open(strUrl, "", strWinOptions);
oPopup.focus();
return false; // Prevents link from working.
}



function checkTermStatus()
{
var terms = document.getElementById("terms");
var button = document.getElementById("submitReservationButton");
if (terms.checked) {
    button.disabled = false;
    button.style.backgroundColor = "rgb(0,150,0)";
    button.style.color = "rgb(255,255,255)";
    button.style.fontWeight = "bold";
} else {
    button.disabled = true;
    button.style.backgroundColor = "inherit";
    button.style.color = "inherit";
    button.style.fontWeight = "normal";
}
return;
}



function submitReservation(l,error)
{
var terms = document.getElementById("terms");
var form = document.getElementById("acceptTermsForm");
if (terms.checked) {
    form.action = "index.php?p=submit&amp;l=" + l;
    form.submit();
} else {
    alert(error);
}
return;
}



function awwPlease(l,error)
{
alert(error);
return;
}
