function delete_from_list(id)
{
	document.getElementById(id).style.backgroundColor = '#E7F3FF';
	document.getElementById(id).style.color = '#CCC';
	document.getElementById(id).style.width = '530px';
	var t=setTimeout("document.getElementById('"+id+"').style.display='none';",700);
}

function submitform()
{
  document.getElementById("wenslijstform").submit();
}

function hideLink(el2hide){
	document.getElementById(el2hide).style.display="none";
}

/* Lute matrix script */
function add(name,value,days) {
	var old = readCookie(name);
	if(old == null){
		createCookie(name, value, days);
		alert('Het arrangement toegevoegd, klik op Contact & Reserveren om de door u gekozen arrangementen te bekijken');
	} else {
		var current = old.split("#");
		
		if(old.toString().indexOf(value)!=-1){
			alert('Dit arrangementen heeft u al toegevoegd aan uw wenslijst');
		} else {
			var newCookie = old + "#" + value;
			createCookie(name, newCookie, days);		
			alert('Het arrangement toegevoegd, klik op Contact & Reserveren om de door u gekozen arrangementen te bekijken');
		}
	}
	
}

function removeitem(name,value,days) {
	var old = readCookie(name);
	//alert(old.indexOf('#')); == -1 
	var current = old.split("#");
	if(old == null || current.length == 1){
		eraseCookie(name);		
		//alert('wenslijst is geleegd');
	} else {
		var i=0;
		while(i<current.length){
			if(current[i] == value){
				current.splice(i,1);
				//alert(value + ' item is verwijderd uit wenslijst');
			} else {
				i++
			}
		}
		replaced = current.join("#")
		var newCookie = replaced;
		createCookie(name, newCookie, days);		
	
	}
	
}

function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else {
		var expires = "";
	}
	
	document.cookie = name+"="+value+expires+"; path=/";
	//alert(name+"="+value+expires+"; path=/"); 
}
function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	
	}
	
	return null;
}
function eraseCookie(name) {
	createCookie(name,"",-1);
	//alert('wenslijst verwijdert');
}

/*   end matrix script */

<!-- // (C) 2006 by hoteliers.com //
	var curDate = new Date();
	var hEngine = 'http://www.hoteliers.com/wlpEngine.php?lang=nl&ID=';

	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)
		{
			el = document.getElementById('content2');
		
			if (el)
			{
				document.getElementById('groeneBalk').id = 'groeneBalk2';
				document.getElementById('topFoto').innerHTML = '';
				document.getElementById('bottomFoto').innerHTML = '';
				document.getElementById('content').style.display = 'none';
				document.getElementById('bookForm').style.display = 'none';
				el.style.display = '';
				el.innerHTML = '<center><iframe name="' + document.hcomForm.hTarget.value + '" src="" frameborder="0" style="width: 620px; height: 460px; margin-top: 10px;"></center>';
			}
				document.hcomForm.target = document.hcomForm.hTarget.value;
				document.hcomForm.action = 'http://www.hoteliers.com/wlpEngine.php?ID=' + document.hcomForm.hotelID.value + '&lang=nl';
				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;
		}
	}

// -->
