/**
  *   This script looks after the dynamic elements on the booking form 
  */

function roomsSelected()
{
var theForm=document.getElementById('reservations');
var rooms=theForm.sltRooms.options[theForm.sltRooms.selectedIndex].value;

if(rooms==1)
{
  hide('room-details_2');
  hide('room-details_3');
}
if(rooms==2)
{
  show('room-details_2');
  hide('room-details_3');
}
if(rooms==3)
{
  show('room-details_2');
  show('room-details_3');
}

}

//Does browser support DHTML
var DHTML = (document.getElementById || document.all || document.layers);

function hide(item)
{
	if (!DHTML) return;
	var x = new getObj(item);
	x.style.visibility =  'hidden';
	x.style.height='0px';
}
function show(item)
{
	if (!DHTML) return;
	var x = new getObj(item);
	x.style.visibility = 'visible'
	x.style.height='20px';
}



function getObj(name)
{
  if (document.getElementById)
  {
  	this.obj = document.getElementById(name);
	this.style = document.getElementById(name).style;
  }
  else if (document.all)
  {
	this.obj = document.all[name];
	this.style = document.all[name].style;
  }
  else if (document.layers)
  {
   	this.obj = document.layers[name];
   	this.style = document.layers[name];
  }
}

