<!-- // 31-01-2008 toegevoegd door Sander/om|vorm //-->
function deleteNode(elementId)
{
	var obj = document.getElementById(elementId);
	while( obj.hasChildNodes() )
	{
		obj.removeChild( obj.lastChild );
	}
	return true;
}
<!-- // End //-->

<!-- // (C) 2006  by hoteliers.com //-->
var curDate = new Date();
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 = document.hcomForm.am.options.selectedIndex;
	theDay = parseInt(document.hcomForm.ad.options.selectedIndex);
	if (! theMonth == 0 && ! theDay == 0)
	{
		dInMonth = dInM(theMonth);
		if (theDay > dInMonth)
		{
			document.hcomForm.ad.options.selectedIndex = theDay = dInMonth;
		}
		newDay = theDay + 1;
		newMonth = theMonth;
		if (newDay > dInMonth)
		{
			newDay = 1;
			newMonth = theMonth + 1;
			if (newMonth > 12)
			{
				newMonth = 1;
			}
		}
		document.hcomForm.dd.selectedIndex = newDay;
		document.hcomForm.dm.selectedIndex = newMonth;
	}
}

function doCheckForm()
{
	am = document.hcomForm.am.options.selectedIndex;
	ad = document.hcomForm.ad.options.selectedIndex;
	dm = document.hcomForm.dm.options.selectedIndex;
	dd = document.hcomForm.dd.options.selectedIndex;

	if (am > 0 && ad > 0 && dm > 0 && dd > 0)
	{
		<!-- // 31-01-2008 toegevoegd door Sander/om|vorm //-->
		if ( !document.getElementById('hoteliers') ) // Als iframe nog niet bestaat -> iframe opbouwen in de div genaamd 'content'
		{
			if ( deleteNode('centercontent_wrapper') ) // Als de div 'content' succesvol is leeggemaakt doorgaan
			{
				newFrame = document.createElement('iframe'); // Nieuw iframe element creeëren
				newFrame.setAttribute('onload','scaleIFrame("hoteliers")');
				newFrame.setAttribute('name','hoteliers');
				newFrame.setAttribute('id','hoteliers');
				newFrame.setAttribute('frameborder','0');
				newFrame.setAttribute('width','640');
				newFrame.setAttribute('height','380');
				newFrame.setAttribute('src','/blank.html');
				newFrame.setAttribute('class','iframeBorder');

				document.getElementById('centercontent_wrapper').appendChild( newFrame ); // iframe element invoegen in de pagina

				/* BUG FIX voor Internet Explorer */
				if(self.frames['hoteliers'].name != 'hoteliers')
				{
					self.frames['hoteliers'].name = 'hoteliers';
				}

				document.hcomForm.target = "hoteliers"; // Target van het formulier wijzigen naar het iframe
			}
		}
		<!-- // End //-->

//		document.hcomForm.target = "_blank";
//		document.hcomForm.target = document.hcomForm.hTarget.value;
//		document.hcomForm.action = 'http://www.hoteliers.com/osEngine.php?ID=' + document.hcomForm.hotelID.value;
		document.hcomForm.submit();
	} 
}

function checkDDate()
{
	theMonth = document.hcomForm.dm.options.selectedIndex;
	theDay = parseInt(document.hcomForm.dd.options.selectedIndex);
	dInMonth = dInM(theMonth);     
	if (theDay > dInMonth)
	{
		document.hcomForm.dd.options.selectedIndex = theDay = dInMonth;
	}
}