// JavaScript Document

// date changer code 
	var now = new Date();
	var theday = now.getDate()-1;
	var themonth = now.getMonth();
	var theyear = now.getFullYear();

	function setDrops(theForm) {
	theForm.day.selectedIndex = theday;
	theForm.month.selectedIndex = themonth;
	theForm.year.selectedIndex = theyear;
	theForm.nights.selectedIndex = "0";<!-- number = order in place, 0 = first -->
	theForm.rooms.selectedIndex = "0";
	theForm.countryCode.selectedIndex = "6";
	theForm.postcodeOrTown.value = "Le Touquet";
	var found = 0;
	for(i=1;i<theForm.year.options.length;i++) {
	if (theForm.year.options[i].value == theyear) {
	found = i;
	break;
	}
	}
	theForm.year.selectedIndex = found;
}
// drop menu code

var timeout	= 300;
var closetimer	= 0;
var ddmenuitem	= 0;

// open hidden layer
function mopen(id)
{	
	// cancel close timer
	mcancelclosetime();

	// close old layer
	if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';

	// get new layer and show it
	ddmenuitem = document.getElementById(id);
	ddmenuitem.style.visibility = 'visible';

}
// close showed layer
function mclose()
{
	if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';
}

// go close timer
function mclosetime()
{
	closetimer = window.setTimeout(mclose, timeout);
}

// cancel close timer
function mcancelclosetime()
{
	if(closetimer)
	{
		window.clearTimeout(closetimer);
		closetimer = null;
	}
}

// close layer when click-out
document.onclick = mclose;

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}