<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function selectAll(cbList,bSelect) {
  for (var i=0; i<cbList.length; i++) 
    cbList[i].selected = cbList[i].checked = bSelect
}
function Ash_ToggleObject(TheObject) {
 if( document.getElementById(TheObject).style.display=='none' ){
   document.getElementById(TheObject).style.display = '';
 }else{
   document.getElementById(TheObject).style.display = 'none';
 }
}
function Paul_ToggleHotelThumbs(TheObject,HotelID) {
 if( TheObject=='ClassicSet' ){
   document.getElementById('ClassicSet').style.display = '';
   document.getElementById('ClassicSetArrow').src='http://media.vonessenhotels.co.uk/graphics/template/hotel_specific/' + HotelID + '/footer_arrow_on.gif';
   var ClassicSetTD = document.getElementById("ClassicSetTD"); 
  ClassicSetTD.setAttribute("background", "http://media.vonessenhotels.co.uk/graphics/template/hotel_specific/" + HotelID + "/footer_cellfade_on.gif");
   
   document.getElementById('CountrySet').style.display = 'none';
   document.getElementById('CountrySetArrow').src='http://media.vonessenhotels.co.uk/graphics/template/hotel_specific/' + HotelID + '/footer_arrow_off.gif'; 
   var CountrySetTD = document.getElementById("CountrySetTD"); 
  CountrySetTD.setAttribute("background", "http://media.vonessenhotels.co.uk/graphics/template/hotel_specific/" + HotelID + "/footer_cellfade_off.gif");
   
   document.getElementById('FamilySet').style.display = 'none';
   document.getElementById('FamilySetArrow').src='http://media.vonessenhotels.co.uk/graphics/template/hotel_specific/' + HotelID + '/footer_arrow_off.gif'; 
    var FamilySetTD = document.getElementById("FamilySetTD"); 
  FamilySetTD.setAttribute("background", "http://media.vonessenhotels.co.uk/graphics/template/hotel_specific/" + HotelID + "/footer_cellfade_off.gif");
   
   document.getElementById('ContinentalSet').style.display = 'none';
   document.getElementById('ContinentalSetArrow').src='http://media.vonessenhotels.co.uk/graphics/template/hotel_specific/' + HotelID + '/footer_arrow_off.gif';
   var ContinentalSetTD = document.getElementById("ContinentalSetTD"); 
  ContinentalSetTD.setAttribute("background", "http://media.vonessenhotels.co.uk/graphics/template/hotel_specific/" + HotelID + "/footer_cellfade_off.gif");
   
 }
 else if ( TheObject=='CountrySet' ) {
   document.getElementById('CountrySet').style.display = '';
   document.getElementById('CountrySetArrow').src='http://media.vonessenhotels.co.uk/graphics/template/hotel_specific/' + HotelID + '/footer_arrow_on.gif'; 
   var CountrySetTD = document.getElementById("CountrySetTD"); 
  CountrySetTD.setAttribute("background", "http://media.vonessenhotels.co.uk/graphics/template/hotel_specific/" + HotelID + "/footer_cellfade_on.gif");
	
   document.getElementById('ClassicSet').style.display = 'none';
   document.getElementById('ClassicSetArrow').src='http://media.vonessenhotels.co.uk/graphics/template/hotel_specific/' + HotelID + '/footer_arrow_off.gif';
   var ClassicSetTD = document.getElementById("ClassicSetTD"); 
  ClassicSetTD.setAttribute("background", "http://media.vonessenhotels.co.uk/graphics/template/hotel_specific/" + HotelID + "/footer_cellfade_off.gif");
   
   document.getElementById('FamilySet').style.display = 'none';
   document.getElementById('FamilySetArrow').src='http://media.vonessenhotels.co.uk/graphics/template/hotel_specific/' + HotelID + '/footer_arrow_off.gif'; 
    var FamilySetTD = document.getElementById("FamilySetTD"); 
  FamilySetTD.setAttribute("background", "http://media.vonessenhotels.co.uk/graphics/template/hotel_specific/" + HotelID + "/footer_cellfade_off.gif");
   
   document.getElementById('ContinentalSet').style.display = 'none';
   document.getElementById('ContinentalSetArrow').src='http://media.vonessenhotels.co.uk/graphics/template/hotel_specific/' + HotelID + '/footer_arrow_off.gif';
   var ContinentalSetTD = document.getElementById("ContinentalSetTD"); 
  ContinentalSetTD.setAttribute("background", "http://media.vonessenhotels.co.uk/graphics/template/hotel_specific/" + HotelID + "/footer_cellfade_off.gif");
 }
  else if ( TheObject=='FamilySet' ) {
   document.getElementById('FamilySet').style.display = '';
   document.getElementById('FamilySetArrow').src='http://media.vonessenhotels.co.uk/graphics/template/hotel_specific/' + HotelID + '/footer_arrow_on.gif'; 
    var FamilySetTD = document.getElementById("FamilySetTD"); 
  FamilySetTD.setAttribute("background", "http://media.vonessenhotels.co.uk/graphics/template/hotel_specific/" + HotelID + "/footer_cellfade_on.gif");
	
   document.getElementById('CountrySet').style.display = 'none';
   document.getElementById('CountrySetArrow').src='http://media.vonessenhotels.co.uk/graphics/template/hotel_specific/' + HotelID + '/footer_arrow_off.gif'; 
   var CountrySetTD = document.getElementById("CountrySetTD"); 
  CountrySetTD.setAttribute("background", "http://media.vonessenhotels.co.uk/graphics/template/hotel_specific/" + HotelID + "/footer_cellfade_off.gif");
   
   document.getElementById('ClassicSet').style.display = 'none';
   document.getElementById('ClassicSetArrow').src='http://media.vonessenhotels.co.uk/graphics/template/hotel_specific/' + HotelID + '/footer_arrow_off.gif';
   var ClassicSetTD = document.getElementById("ClassicSetTD"); 
  ClassicSetTD.setAttribute("background", "http://media.vonessenhotels.co.uk/graphics/template/hotel_specific/" + HotelID + "/footer_cellfade_off.gif");
   
   document.getElementById('ContinentalSet').style.display = 'none';
   document.getElementById('ContinentalSetArrow').src='http://media.vonessenhotels.co.uk/graphics/template/hotel_specific/' + HotelID + '/footer_arrow_off.gif';
   var ContinentalSetTD = document.getElementById("ContinentalSetTD"); 
  ContinentalSetTD.setAttribute("background", "http://media.vonessenhotels.co.uk/graphics/template/hotel_specific/" + HotelID + "/footer_cellfade_off.gif");
 }
  else if ( TheObject=='ContinentalSet' ) {
   document.getElementById('ContinentalSet').style.display = '';
   document.getElementById('ContinentalSetArrow').src='http://media.vonessenhotels.co.uk/graphics/template/hotel_specific/' + HotelID + '/footer_arrow_on.gif';
   var ContinentalSetTD = document.getElementById("ContinentalSetTD"); 
  ContinentalSetTD.setAttribute("background", "http://media.vonessenhotels.co.uk/graphics/template/hotel_specific/" + HotelID + "/footer_cellfade_on.gif");
	
   document.getElementById('CountrySet').style.display = 'none';
   document.getElementById('CountrySetArrow').src='http://media.vonessenhotels.co.uk/graphics/template/hotel_specific/' + HotelID + '/footer_arrow_off.gif'; 
   var CountrySetTD = document.getElementById("CountrySetTD"); 
  CountrySetTD.setAttribute("background", "http://media.vonessenhotels.co.uk/graphics/template/hotel_specific/" + HotelID + "/footer_cellfade_off.gif");
   
   document.getElementById('ClassicSet').style.display = 'none';
   document.getElementById('ClassicSetArrow').src='http://media.vonessenhotels.co.uk/graphics/template/hotel_specific/' + HotelID + '/footer_arrow_off.gif';
   var ClassicSetTD = document.getElementById("ClassicSetTD"); 
  ClassicSetTD.setAttribute("background", "http://media.vonessenhotels.co.uk/graphics/template/hotel_specific/" + HotelID + "/footer_cellfade_off.gif");
   
   document.getElementById('FamilySet').style.display = 'none';
   document.getElementById('FamilySetArrow').src='http://media.vonessenhotels.co.uk/graphics/template/hotel_specific/' + HotelID + '/footer_arrow_off.gif'; 
    var FamilySetTD = document.getElementById("FamilySetTD"); 
  FamilySetTD.setAttribute("background", "http://media.vonessenhotels.co.uk/graphics/template/hotel_specific/" + HotelID + "/footer_cellfade_off.gif");
 }
}
function Paul_ToggleScrollerTabs(TheObject) {
 if( TheObject=='EventsTab' ){
   var EventsTab = document.getElementById("EventsTab"); 
   EventsTab.setAttribute("background", "http://media.vonessenhotels.co.uk/graphics/template/tabs_on.jpg");
   var NewsTab = document.getElementById("NewsTab"); 
   NewsTab.setAttribute("background", "http://media.vonessenhotels.co.uk/graphics/template/tabs_off.jpg");
   document.getElementById('AllNews').style.display = 'none';
   document.getElementById('FullCalendar').style.display = '';
 }
 else if ( TheObject=='NewsTab' ) {
 var EventsTab = document.getElementById("EventsTab"); 
   EventsTab.setAttribute("background", "http://media.vonessenhotels.co.uk/graphics/template/tabs_off.jpg");
   var NewsTab = document.getElementById("NewsTab"); 
   NewsTab.setAttribute("background", "http://media.vonessenhotels.co.uk/graphics/template/tabs_on.jpg");
   document.getElementById('FullCalendar').style.display = 'none';
   document.getElementById('AllNews').style.display = '';
 }
}

//Date Functions for booking form !!IM NOT USING THIS AT THE MOMENT BUT LEAVING IT HERE
function Paul_AddOrSubtractDays() {

var ArrivalDate = document.getElementById('Arrivalday').value
var DepartureDate = document.getElementById('DepartDay').value

	if (ArrivalDate>DepartureDate) {
		document.forms["BookingForm"].elements["Arrivalday"].selectedIndex = ArrivalDate-1;
		document.forms["BookingForm"].elements["Arrivalday"].options[ArrivalDate-1].selected = true;
		
		document.forms["BookingForm"].elements["DepartDay"].selectedIndex = ArrivalDate;
		document.forms["BookingForm"].elements["DepartDay"].options[ArrivalDate].selected = true;
	}

	else if (DepartureDate<ArrivalDate) {
		document.forms["BookingForm"].elements["DepartDay"].selectedIndex = DepartureDate-1;
		document.forms["BookingForm"].elements["DepartDay"].options[DepartureDate-1].selected = true;
		
		document.forms["BookingForm"].elements["Arrivalday"].selectedIndex = DepartureDate;
		document.forms["BookingForm"].elements["Arrivalday"].options[DepartureDate].selected = true;
	}

}

function addToArray(ar, str)

                                                {

                                                            var l

                                                            l = ar[0] + 1

                                                            ar[l] = str

                                                            ar[0] = l

                                                }

                                                function makeArray()

                                                {

                                                            array = new Object();

                                                            array[0] = 0;

                                                            return array;

                                                }

 

                                                var dayNames = makeArray()

                                                addToArray(dayNames, " Sun")

                                                addToArray(dayNames, " Mon")

                                                addToArray(dayNames, " Tue")

                                                addToArray(dayNames, " Wed")

                                                addToArray(dayNames, " Thu")

                                                addToArray(dayNames, " Fri")

                                                addToArray(dayNames, " Sat")

 

                                                function ShowDay() {

                                                            var ryear = document.r.ResYear.selectedIndex;

                                                            if(ryear < 0)

                                                                        ryear= 0;

                                                            ryear= document.r.ResYear.options[ryear].value - 0;

                                                            var rmonth = document.r.ResMonth.selectedIndex;

                                                            var rdate = document.r.ResDate.selectedIndex + 1;

                                                            var rnow = new Date(ryear,rmonth,rdate);

                                                            var now = new Date();

 

                                                            var rday = rnow.getDay() + 1;

                                                            document.r.dayweek.value = dayNames[rday]

 

                                                }

 

 

 

                                                function setDate() {

 

                                                            // extract date from literal..

                                                            var now = new Date();

                                                            var closestTime = (now.getTime() + (30 * 60000)); //1/2 hour in advance...

                                                            var nearest = new Date(closestTime)

                                                            var nearmonth = nearest.getMonth();

                                                            var neardate = nearest.getDate();

                                                            var nearyear = nearest.getFullYear();

 

                                                            document.r.ResMonth.selectedIndex = nearmonth

                                                            document.r.ResDate.selectedIndex = neardate - 1

                                                            document.r.ResYear.selectedIndex = nearyear-2008;

                                                }


//-->