﻿<!-- // (C) 2006 by hoteliers.com //
var curDate = new Date();

if(GETDATA["L"] != undefined){
	actieveTaal = GETDATA["L"];
	
	if(parseInt(actieveTaal) == 2){
		languageEngine = "de";
	}
	else if(parseInt(actieveTaal) == 4){
		languageEngine = "nl";
	}
	else if(parseInt(actieveTaal) == 1){
		languageEngine = "en";
	}
}
else{
	languageEngine = "nl";
}



function dInM(mon){
	if (mon == 2){
	Year = curDate.getFullYear();
	if(Math.round(Year/4) == Year/4){
	if(Math.round(Year/100) == Year/100){
	if(Math.round(Year/400) == Year/400)
		return 29;
		else return 28;
	}
	else return 29;
	}
	return 28;
	}
	else if (mon == 4 || mon == 6 || mon == 9 || mon == 11)
	{
	return 30;
	}
	return 31;
}

function getNDay(){
	theMonth = parseInt(document.hcomForm.am.options.selectedIndex) + 1;
	theDay = parseInt(document.hcomForm.ad.options.selectedIndex) + 1;
	
	//alert(theMonth);
	//alert(theDay);
	
	if (! theMonth == 0 && ! theDay == 0){
		dInMonth = dInM(theMonth);
		if (theDay > dInMonth){
			document.hcomForm.ad.options.selectedIndex = theDay = dInMonth;
		}
		newDay = theDay;
		newMonth = theMonth;
		if (newDay > dInMonth){
			newDay = 1;
			newMonth = theMonth;
			if (newMonth > 12){
				newMonth = 1;
			}
		}
		document.hcomForm.dd.selectedIndex = newDay;
		document.hcomForm.dm.selectedIndex = newMonth - 1;
	}
}

function doCheckForm(){
el = document.getElementById('hotdiv');
if (el){
	var closeButTags = "<span style=\"position: relative; overflow: hidden; top: -11px;padding-left: 15px;font-size:10pt;color:white;font-family: Tahoma;\" onmouseover=\"this.style.cursor='pointer';\" onclick=\"hideFormResults();\"><img src=\"fileadmin/template/atlanta/images/closebutton.png\" style=\"position: relative; top: 5px;\"> Klik hier om deze boekingsmodule te sluiten en terug te gaan naar onze website.  </span>";
	el.innerHTML = closeButTags + '<iframe style="position: relative; top: -4px; " name="' + document.hcomForm.hTarget.value + '" src="" width="986" height="632" frameborder="0">';
}
document.hcomForm.target = document.hcomForm.hTarget.value;
document.hcomForm.action = 'http://www.hoteliers.com/wlpEngine.php?ID=' + document.hcomForm.hotelID.value + '&lang='+languageEngine;
document.hcomForm.submit();
showAndPosHotDiv('hotdiv');
document.getElementById('darkOverlayDiv').style.display = "block";
}

function checkDDate()
{
theMonth = document.hcomForm.dm.options.selectedIndex + 1;
theDay = document.hcomForm.dd.options.selectedIndex + 1;
dInMonth = dInM(theMonth);

if (theDay > dInMonth)
{
theDay = dInMonth;
document.hcomForm.dd.options.selectedIndex = dInMonth - 1;
}
}

// -->

