var SITE_ROOT = 'http://www.burythorpehouse.co.uk/';
//var SITE_ROOT = 'http://localhost/hoteltest/';
 try {
  document.execCommand("BackgroundImageCache", false, true);
} catch(err) {}

function addDOMLoadEvent(f){if(!window.__ADLE){var n=function(){if(arguments.callee.d)return;arguments.callee.d=true;if(window.__ADLET){clearInterval(window.__ADLET);window.__ADLET=null}for(var i=0;i<window.__ADLE.length;i++){window.__ADLE[i]()}window.__ADLE=null};if(document.addEventListener)document.addEventListener("DOMContentLoaded",n,false);/*@cc_on @*//*@if (@_win32)document.write("<scr"+"ipt id=__ie_onload defer src=//0><\/scr"+"ipt>");var s=document.getElementById("__ie_onload");s.onreadystatechange=function(){if(this.readyState=="complete")n()};/*@end @*/if(/WebKit/i.test(navigator.userAgent)){window.__ADLET=setInterval(function(){if(/loaded|complete/.test(document.readyState)){n()}},10)}window.onload=n;window.__ADLE=[]}window.__ADLE.push(f)}
 
 function addLoadEvent(func) {
	var oldonload = window.onload;
	if (typeof window.onload != 'function') {
	window.onload = func;
	} else {
	window.onload = function() {
	oldonload();
	func();
		}
	}
 }


// google maps function

//    function loadmap() {
//     if (GBrowserIsCompatible()) {
//        var map = new GMap2(document.getElementById("map"));
//				map.addControl(new GSmallMapControl());
//        map.addControl(new GMapTypeControl());        
//        map.addControl(new GScaleControl()); 
//		map.setCenter(new GLatLng(54.077487, -0.792939), 11);  // post code  YO13 0PG resolves to (54.309247, -0.459132)
//		map.setMapType(G_NORMAL_MAP);

			// Creates a marker at the given point with the given number label
//			function createMarker(point) {
//				var marker = new GMarker(point);
//				GEvent.addListener(marker, "click", function() {
//					marker.openInfoWindowHtml("<b>Burythorpe House");
//				});
//				return marker;
//			}
//
//				var bounds = map.getBounds();
//				var southWest = bounds.getSouthWest();
//				var northEast = bounds.getNorthEast();
//				var lngSpan = northEast.lng() - southWest.lng();
//				var latSpan = northEast.lat() - southWest.lat();
//				var point = map.getCenter();
//				map.addOverlay(new createMarker(point));
  //    }
//    }

 
// 	addDOMLoadEvent(loadmap);   // google maps load function

// end google maps function




 function getElementsByClass(searchClass,node,tag) {
	var classElements = new Array();
	if ( node == null )
		node = document;
	if ( tag == null )
		tag = '*';
	var els = node.getElementsByTagName(tag);
	var elsLen = els.length;
	var pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)");
	for (i = 0, j = 0; i < elsLen; i++) {
		if ( pattern.test(els[i].className) ) {
			classElements[j] = els[i];
			j++;
		}
	}
	return classElements;
 }	
 
 function createCookie(name,value,seconds) {
	if (seconds) {
		var date = new Date();
		date.setTime(date.getTime()+(seconds*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = 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);
}
 
 var data1 = new Date();
 var fotos_array = new Array();	

var current_foto = 0;
/*
var relocate = [null,null,current_foto+1];
var relocate = ['links','locatie',15+1];	
current_foto = relocate[2]-1;
*/

var cookie_relocate_burythorpehouse;
var relocate = [null,null,current_foto+1];
var test_cookie = readCookie('cookie_relocate_burythorpehouse');
if(test_cookie&&document.referrer.indexOf('burythorpehouse')>-1) { 
 relocate = test_cookie.split('&');
 current_foto = relocate[2]-1;
}



 function path_images ()
 {
	var fotos_img= $$('.foto');
	
	 for(m=0; m<fotos_img.length; m++)
   {  
	  fotos_array[m] = fotos_img[m].getAttribute('src');
	  
	  }
	
 }
 
 function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "external")
     anchor.target = "_blank";
 }
}
 
 Fx.Properties = Fx.Styles.extend({	
			increase: function(){for (	var p in this.now) this.element[p] = this.now[p];	}	
		});



		Fx.FlyingScroller = Fx.Properties.extend({
			initialize: function(el, options){
				this.parent(el, options);
				this.options = Object.extend(this.options || {}, Object.extend({
					paddingLeft: 0,
					paddingTop: 0
				}, options || {}));
			},
			toElement: function(el, paddingLeft, paddingTop){
				this.goTo(el.offsetLeft - (paddingLeft || this.options.paddingLeft || 0), el.offsetTop - (paddingTop || this.options.paddingTop || 0));
			},
			goTo: function(x, y){
				this.start({
					'scrollLeft': [this.element.scrollLeft, x],
					'scrollTop': [this.element.scrollTop, y]
				})
			}
		});

function id(id)
	{
		var elem = document.getElementById(id);
		return elem;
	}		

function close_message(linku)
	{
		linku.parentNode.parentNode.style.display = 'none';
	}

function contact_form(form)
	{
		var form_obj = id(form);
		/*alert(form_obj);*/
		var poststr = "nume=" + form_obj.nume.value
					+ "&companie=" + form_obj.companie.value
					+ "&email=" + form_obj.email.value
					+ "&mesaj=" + form_obj.mesaj.value
					+ "&sent=" + form_obj.sent.value
					+ "&contact=1&ajax=1"
		load_content('contact_div', SITE_ROOT, poststr);
	}

function rezervare(form)
	{
		form_obj = document.getElementById(form);
		if(!form_obj.sent.value)
			{
				form_obj.sent.value = 0;
			}
		var poststr = "nume=" + form_obj.nume.value
					+ "&data_sosirii=" + form_obj.data_sosirii.value
					+ "&data_plecarii=" + form_obj.data_plecarii.value
					+ "&tip_camera=" + form_obj.tip_camera.value
					+ "&telefon=" + form_obj.telefon.value
					+ "&nr_location=" + form_obj.nr_location.value
					+ "&nr_persoane=" + form_obj.nr_persoane.value
					+ "&email=" + form_obj.email.value
					+ "&sent=" + form_obj.sent.value
					+ "&rezervari=1&ajax=1"
		load_content('rezervari_div', SITE_ROOT, poststr);
	}
	
 function navigation ()
 { var contents = $('contents');
   var fotos_big = $$('.foto');
   
   for(x=0; x<fotos_big.length; x++)
   {  fotos_big[x].setAttribute('src','templates/images/pix.gif');
	}
   var fotos = document.getElementById('fotos');
   var fotos_img= $$('#fotos img');
   var fotos_span = $$('#fotos span'); 
   
   var gallery = document.getElementById('gallery');
   gallery.removeChild(fotos);
   var fotos_wrapper = document.createElement('div');
   fotos_wrapper.setAttribute('id','fotos_wrapper');
   gallery.appendChild(fotos_wrapper);
   
   
   for(m=0; m<fotos_img.length; m++)
   {fotos_wrapper.appendChild(fotos_img[m]);
	   fotos_img[m].style.top = m*494 + 'px';
	   fotos_img[m].removeAttribute('alt');
	  
	  }
  

   var fotos_nav2 = $('fotos_nav2');
   fotos_nav2.style.visibility = 'visible';
   fotos_nav2.style.position = 'absolute';
   fotos_nav2.style.top = 471 + 'px';
   fotos_nav2.style.left = 0;
   fotos_nav2.style.margin = 0;
   
   var fotos_nav_h4 = document.createElement('h4');
  fotos_nav2.appendChild(fotos_nav_h4);
   fotos_nav_h4.innerHTML = fotos_span[0].innerHTML;
   
  var main_nav = new Fx.FlyingScroller($('contents_wrapper'), {
		transition: Fx.Transitions.quadInOut,
		duration: 1500,
		paddingLeft: 0,
		paddingTop: 0
	
	});
  if(!relocate[0]) {main_nav.clearTimer().toElement($('home')); }
  else {
	  main_nav.clearTimer().toElement($(relocate[0]));
	  var hovered = getElementsByClass(relocate[0],$('main_menu'),'a');
	  if(hovered.length>0) {
	  hovered[0].setAttribute('id','hovered');
	  }
  }


   
// hehehehehhehehe
  var extra_nav = new Fx.FlyingScroller($('extralink'), {
		transition: Fx.Transitions.quadInOut,
		duration: 1500,
		paddingLeft: 0,
		paddingTop: 0
	
	});




// Add entry here for new nav and also further down (check for comments!)



  var gal_nav = new Fx.FlyingScroller($('fotos_wrapper'), {
		transition: Fx.Transitions.quadInOut,
		duration: 1500,
		paddingLeft: 0,
		paddingTop: 0
		
	
	});
  gal_nav.clearTimer().toElement($('foto1'));
  

  var contact_nav = new Fx.FlyingScroller($('contact'), {
		transition: Fx.Transitions.quadInOut,
		duration: 1500,
		paddingLeft: 0,
		paddingTop: 0
		
	
	});
  
  var location_nav = new Fx.FlyingScroller($('location'), {
		transition: Fx.Transitions.quadInOut,
		duration: 1500,
		paddingLeft: 0,
		paddingTop: 0
		
	
	});

  var thingstoseeanddo_nav = new Fx.FlyingScroller($('thingstoseeanddo'), {
		transition: Fx.Transitions.quadInOut,
		duration: 1500,
		paddingLeft: 0,
		paddingTop: 0
		
	
	});

  var specialoffers_nav = new Fx.FlyingScroller($('specialoffers'), {
		transition: Fx.Transitions.quadInOut,
		duration: 1500,
		paddingLeft: 0,
		paddingTop: 0
		
	
	});


  if(!relocate[1]) {contact_nav.clearTimer().toElement($('formular_contact'));}
  else {contact_nav.clearTimer().toElement($(relocate[1])); }
  
  if(!relocate[1]) {location_nav.clearTimer().toElement($('location2'));}
  else {location_nav.clearTimer().toElement($(relocate[1])); }
  
   if(!relocate[1]) {thingstoseeanddo_nav.clearTimer().toElement($('thingstoseeanddo1'));}
  else {thingstoseeanddo_nav.clearTimer().toElement($(relocate[1])); }

   if(!relocate[1]) {specialoffers_nav.clearTimer().toElement($('specialoffers1'));}
  else {specialoffers_nav.clearTimer().toElement($(relocate[1])); }

// end first new entry

   var main_nav_lks = new Array();
   var linkuri = $$('a');
   var foto_nav2_lks = $$('#fotos_nav2 a');
   foto_nav2_lks[0].setAttribute('id','selectat');
   var content_div =  $$('.content');
   
   for (m=0; m<linkuri.length; m++)
   {
	 if(linkuri[m].getAttribute('rel')=='main_menu')
	 {
	    main_nav_lks.push(linkuri[m]); 	 
	  }
	}
  
   for (i=0; i<main_nav_lks.length; i++)
   {
	 main_nav_lks[i].onclick = function ()
	 {      
	   var hovered = $('hovered');
		if(hovered) {hovered.removeAttribute('id');}
		if(this.className!='home') {this.setAttribute('id','hovered');}
		
		var target_page = $(this.className);
		if(this.getAttribute('rel')=='main_menu')
	   { 
	   main_nav.clearTimer().toElement($(target_page )); 
		 relocate[0] = this.className;
	   }
	   
	   if(this.className=='contact')
	   { 
		 contact_nav.clearTimer().toElement($('formular_contact')); 
		
	   }
		 relocate[1] = null;
		
       return false;  
	  }
   }
   
  
   
   var fotos_nav = document.createElement('ul');
   fotos_nav.setAttribute('id','fotos_nav')
   for(i=0; i<2; i++)
   { var li = document.createElement('li');
     var a = document.createElement('a');
	 a.setAttribute('href','#');
	 fotos_nav.appendChild(li);
	 li.appendChild(a);
	}
	gallery.appendChild(fotos_nav);
	var fotos_nav_lks = fotos_nav.getElementsByTagName('a');
	fotos_nav_lks[0].setAttribute('id','foto_inapoi');
	fotos_nav_lks[1].setAttribute('id','foto_inainte');
	
   var foto_inapoi = fotos_nav_lks[0];
   var foto_inainte = fotos_nav_lks[1];
	
	if(relocate[2]!=1) {
		gal_nav.clearTimer().toElement($('foto'+relocate[2]));
		foto_nav2_lks[relocate[2]-1].fireEvent('click');
		var selectat = $('selectat');
		if(selectat) {selectat.removeAttribute('id');}
		foto_nav2_lks[relocate[2]-1].setAttribute('id','selectat');
		if(current_foto==0) 
		 {foto_inapoi.style.visibility = 'hidden';
		  foto_inainte.style.visibility = 'visible';
		 }
		 else if (current_foto==(foto_nav2_lks.length-1)) 
		 {foto_inainte.style.visibility = 'hidden';
		 foto_inapoi.style.visibility = 'visible';
		 } 
		 else {
		  foto_inapoi.style.visibility = 'visible';	
		  foto_inainte.style.visibility = 'visible';
		 }
		
	}
	else {
		gal_nav.clearTimer().toElement($('foto'+relocate[2]));
	}
   
   foto_inapoi.onclick = function () 
   { 
     if(current_foto==1) 
	 {this.style.visibility = 'hidden';}
     if(current_foto>0) 
      { current_foto--; }
	  
      var selectat = $('selectat');
      if(selectat) {selectat.removeAttribute('id');}
	  foto_nav2_lks[current_foto].setAttribute('id','selectat');
	  foto_inainte.style.visibility  = 'visible';
	
	 gal_nav.clearTimer().toElement($('foto'+(current_foto+1)));
	 fotos_nav_h4.innerHTML = fotos_span[current_foto].innerHTML;
	 relocate[2] = current_foto+1;
	
	 return false;
   }
   
   foto_inainte.onclick = function () 
   { 
     if(current_foto==foto_nav2_lks.length-2) 
	 {this.style.visibility = 'hidden';}
     if(current_foto<foto_nav2_lks.length-1) 
      { current_foto++; }
	  
      var selectat = $('selectat');
      if(selectat) {selectat.removeAttribute('id');}
	  foto_nav2_lks[current_foto].setAttribute('id','selectat');
	  foto_inapoi.style.visibility  = 'visible';
	
	 gal_nav.clearTimer().toElement($('foto'+(current_foto+1)));
	 fotos_nav_h4.innerHTML = fotos_span[current_foto].innerHTML;
	 relocate[2] = current_foto+1;
	 
	 return false;
   }
   
   
   for(x=0; x<foto_nav2_lks.length; x++)
  {
	 
	  foto_nav2_lks[x].addEvent('click',function(e) {
			  if (!e) var e = window.event;
			  var selectat = $('selectat');
			  if(selectat) {selectat.removeAttribute('id');}
			  this.setAttribute('id','selectat');
			  for(z=0; z<foto_nav2_lks.length; z++)
			  {
				  if(foto_nav2_lks[z].getAttribute('id')=='selectat')
				  {  current_foto = z;
					  if(current_foto==0) 
					 {foto_inapoi.style.visibility = 'hidden';
					  foto_inainte.style.visibility = 'visible';
					 }
					 else if (current_foto==(foto_nav2_lks.length-1)) 
					 {foto_inainte.style.visibility = 'hidden';
					 foto_inapoi.style.visibility = 'visible';
					 } 
					 else {
					  foto_inapoi.style.visibility = 'visible';	
					  foto_inainte.style.visibility = 'visible';
					 }
					
					 gal_nav.clearTimer().toElement($('foto'+(current_foto+1)));
					 fotos_nav_h4.innerHTML = fotos_span[current_foto].innerHTML;
					 relocate[2] = current_foto+1;
					
				  }
				 
				}
			  
			 
			  if(e) {
				if(e.preventDefault) e.preventDefault();
				if(e.returnValue) e.returnValue = false;
				}
				return false;
			 }													
																
		
	  )
	
	 
	 
  }
  
    
// add another entry here for new sub page slide nav
	 
 	 var location_lk = document.getElementById('location_link');
 	 var location_lk2 = document.getElementById('location_link2');
	 var map_lk = document.getElementById('map_link');
	 var directions_lk = document.getElementById('directions_link');
 	 var thingstoseeanddo1_lk = document.getElementById('thingstoseeanddo1_link');
 	 var thingstoseeanddo2_lk = document.getElementById('thingstoseeanddo2_link');
 	 var specialoffers1_lk = document.getElementById('specialoffers1_link');
 	 var specialoffers2_lk = document.getElementById('specialoffers2_link');

	 
	 specialoffers1_lk.onclick = function () 
	  {
		 specialoffers_nav.clearTimer().toElement($('specialoffers2')); 
		 relocate[1] = 'specialoffers2';
		 
		 return false;
	   }
     specialoffers2_lk.onclick = function () 
	  {
		 specialoffers_nav.clearTimer().toElement($('specialoffers1')); 
		 relocate[1] = 'specialoffers1';
		 
		 return false;
	   }
	 
	 thingstoseeanddo1_lk.onclick = function () 
	  {
		 thingstoseeanddo_nav.clearTimer().toElement($('thingstoseeanddo2')); 
		 relocate[1] = 'thingstoseeanddo2';
		 
		 return false;
	   }
     thingstoseeanddo2_lk.onclick = function () 
	  {
		 thingstoseeanddo_nav.clearTimer().toElement($('thingstoseeanddo1')); 
		 relocate[1] = 'thingstoseeanddo1';
		 
		 return false;
	   }

	 
	 location_lk.onclick = function () 
	  {
		 location_nav.clearTimer().toElement($('map')); 
		 relocate[1] = 'map';
		 
		 return false;
	   }
     location_lk2.onclick = function () 
	  {
		 location_nav.clearTimer().toElement($('directions')); 
		 relocate[1] = 'directions';
		 
		 return false;
	   }
	 map_lk.onclick = function () 
	  {
		 location_nav.clearTimer().toElement($('location2')); 
		  relocate[1] = 'location2';
		 
		 return false;
	   }  
	 directions_lk.onclick = function () 
	  {
		 location_nav.clearTimer().toElement($('location2')); 
		  relocate[1] = 'location2';
		 
		 return false;
	   }  
  
   
  }

  
// end second entry

  function selectReplacement(obj) {
      obj.className += ' replaced';
      var ul = document.createElement('ul');
      ul.className = 'selectReplacement';
	  ul.setAttribute('id','selectReplacement');
      var opts = obj.options;
      for (var i=0; i<opts.length; i++) {
        var selectedOpt;
        if (opts[i].selected) {
          selectedOpt = i;
          break;
        } else {
          selectedOpt = 0;
        }
      }
      for (var i=0; i<opts.length; i++) {
        var li = document.createElement('li');
		
		var txt = document.createTextNode(opts[i].text);
        li.appendChild(txt);
		
        li.selIndex = opts[i].index;
        li.selectID = obj.id;
        li.onclick = function() {
          selectMe(this);
        }
		
        if (i == selectedOpt) {
          li.className = 'selected';
          li.onclick = function() {
            this.parentNode.className += ' selectOpen';
            this.onclick = function() {
              selectMe(this);
            }
          }
		  
        }
        if (window.attachEvent) {
          li.onmouseover = function() {
            this.className += ' hover';
          }
          li.onmouseout = function() {
            this.className = 
              this.className.replace(new RegExp(" hover\\b"), '');
          }
        }
        ul.appendChild(li);
      }
      obj.parentNode.insertBefore(ul,obj);
    }
    function selectMe(obj) {
      var lis = obj.parentNode.getElementsByTagName('li');
      for (var i=0; i<lis.length; i++) {
        if (lis[i] != obj) {
          lis[i].className='';
          lis[i].onclick = function() {
            selectMe(this);
          }
        } else {
          setVal(obj.selectID, obj.selIndex);
          obj.className='selected';
          obj.parentNode.className = 
            obj.parentNode.className.replace(new RegExp(" selectOpen\\b"), '');
          obj.onclick = function() {
            obj.parentNode.className += ' selectOpen';
            this.onclick = function() {
              selectMe(this);
            }
          }
        }
      }
    }
    function setVal(objID, selIndex) {
      var obj = document.getElementById(objID);
      obj.selectedIndex = selIndex;
    }
    function setForm() {
      var s = document.getElementsByTagName('select');
      for (var i=0; i<s.length; i++) {
        selectReplacement(s[i]);
      }
    }
    
  
	
 function fotos_big_replace() {
	 var fotos_big = $$('.foto');
	 for(m=0; m<fotos_big.length; m++)
    {   fotos_big[m].setAttribute('src',fotos_array[m]);
	  }
	 
	}	
  
 function timer_img ()
	{ var data2 = new Date();
	  window.setTimeout(fotos_big_replace,data2-data1);	
	}
	
 function hide_calendar ()
 {
	var calendar= $$('.calendar');
	
	 for(m=0; m<calendar.length; m++)
   {  document.body.removeChild(calendar[m]);
	  }
}	

  addDOMLoadEvent(path_images);
  addDOMLoadEvent(navigation);
  addDOMLoadEvent(setForm);
 
  addDOMLoadEvent(externalLinks);
  addLoadEvent(timer_img);


//This all linked for rooms vtours popup
function assignrooms() {
   var anc=document.getElementsByTagName('a');
for(var c=0;c<anc.length;c++) {
 /* this line looks for links with the attribute class="pu" and then opens a pop-up onclick */
if(anc[c].className=='pu') {
   anc[c].onclick=function() {
   createPopUp(this);
   return false;
    }
   }
  }
 }

function createPopUp(url) {
   var mywindow;
   var features='width=400,height=260,top=400,left=400,resizable';
   if(mywindow) {
   mywindow.close();
 }
   mywindow=window.open(url,'myExample6',features);
   mywindow.focus();
 }

  addLoadEvent(assignrooms); // replace <body onload=""> as multiple onLoads conflict without custom function addLoadEvent()

// end popupa

//This all linked for rooms booknow popup
function assignrooms() {
   var anc=document.getElementsByTagName('a');
for(var c=0;c<anc.length;c++) {
 /* this line looks for links with the attribute class="bknw" and then opens a pop-up onclick */
if(anc[c].className=='bknw') {
   anc[c].onclick=function() {
   createPopUp2(this);
   return false;
    }
   }
  }
 }

function createPopUp2(url) {
   var mywindow;
   var features='width=280,height=500,top=400,left=400,resizable';
   if(mywindow) {
   mywindow.close();
 }
   mywindow=window.open(url,'myExample6',features);
   mywindow.focus();
 }

  addLoadEvent(assignrooms); // replace <body onload=""> as multiple onLoads conflict without custom function addLoadEvent()

// end popupa



//This all linked for rooms vtours popup
function googlemap() {
   var anc=document.getElementsByTagName('a');
for(var c=0;c<anc.length;c++) {
 /* this line looks for links with the attribute class="pu" and then opens a pop-up onclick */
if(anc[c].className=='googlepu') {
   anc[c].onclick=function() {
   createPopUp3(this);
   return false;
    }
   }
  }
 }

function createPopUp3(url) {
   var mywindow;
   var features='width=510,height=510,top=150,left=250,resizable';
   if(mywindow) {
   mywindow.close();
 }
   mywindow=window.open(url,'myExample6',features);
   mywindow.focus();
 }

  addLoadEvent(googlemap); // replace <body onload=""> as multiple onLoads conflict without custom function addLoadEvent()

// end popupa

function jumptoanchor()
{	
	//if anchor exist in url
	if(window.location.href.match(/#(\w.+)/))
	{
		//jump to anchor
		window.location.hash=window.location.href.match(/#(\w.+)/)[1]; 
	}
}




	//addLoadEvent(jumptoanchor);



window.onbeforeunload = unloadPage;

function unloadPage()
{  
   string = relocate.join("&");
	createCookie('cookie_relocate_burythorpehouse',string,60)
}
  
  

function moveWindow (ref){window.location.hash=ref;}
 
 
 function showrooms(thisroom) 
{


	roomhome.style.visibility='hidden';
	rates.style.visibility='hidden';
	room1.style.visibility='hidden';
	room2.style.visibility='hidden';
	room3.style.visibility='hidden';
	room4.style.visibility='hidden';
	room5.style.visibility='hidden';
	room6.style.visibility='hidden';
	room7.style.visibility='hidden';
	room8.style.visibility='hidden';
	room9.style.visibility='hidden';
	room10.style.visibility='hidden';
	room11.style.visibility='hidden';
	room12.style.visibility='hidden';

	if(thisroom=="roomhome") {
		roomhome.style.visibility='visible';
	}
	if(thisroom=="rates") {
		rates.style.visibility='visible';
	}
	if(thisroom=="room1") {
		room1.style.visibility='visible';
	}
	if(thisroom=="room2") {
		room2.style.visibility='visible';
	}
	if(thisroom=="room3") {
		room3.style.visibility='visible';
	}
	if(thisroom=="room4") {
		room4.style.visibility='visible';
	}
	if(thisroom=="room5") {
		room5.style.visibility='visible';
	}
	if(thisroom=="room6") {
		room6.style.visibility='visible';
	}
	if(thisroom=="room7") {
		room7.style.visibility='visible';
	}
	if(thisroom=="room8") {
		room8.style.visibility='visible';
	}
	if(thisroom=="room9") {
		room9.style.visibility='visible';
	}
	if(thisroom=="room10") {
		room10.style.visibility='visible';
	}
	if(thisroom=="room11") {
		room11.style.visibility='visible';
	}
	if(thisroom=="room12") {
		room12.style.visibility='visible';
	}
}

 
 
 
 
 
