

// Adobe image swap functions, from Photoshop, for maps

function newImage(arg) 
{
	if (document.images) 
	{
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() 
{
	if (document.images && (preloadFlag == true)) 
	{
		for (var i=0; i<changeImages.arguments.length; i+=2) 
		{
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}


function RandomBannerPhoto()
{
	if (document.images)
	{
		if (document.images["bannerphoto"])
		{
			var iRnd = Math.floor(Math.random() * 12);
			document.images["bannerphoto"].src = "http://www.hotelsagogo.co.uk/res/photos/general-" + iRnd + ".jpg";
		}
	}

}

function setDrops( theForm ) 
{
	var now = new Date();
	var theday = now.getDate()-1;
	var themonth = now.getMonth();
	var theyear = now.getFullYear();
	
	theForm.day.selectedIndex = theday;
	theForm.month.selectedIndex = themonth;
	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;
}  
