	 function addLoadEvent(func) { 	var oldonload = window.onload; 	if (typeof window.onload != 'function') { 		window.onload = func; 	} else { 		window.onload = function() { 	      if (oldonload) { 	        oldonload(); 	      } 	      func(); 	    } 	  } 	} 	 	/* GETS SEVER TIME */	addLoadEvent(GetPage);		 	//addLoadEvent(function() { 	 	//autoScroll('newsslider','newssection',5,true)	//}) 	function AjaxCommand(URL,DIV,CMD){	var url = URL;	var pars = CMD;	var target = DIV;	var myAjax = new Ajax.Updater(target, url, {	method: 'post',	parameters: pars});}function GetPage() {	var Hash = window.location.hash;	Hash = Hash.replace(/#/,'');		if (Hash != "") {		PageName = Hash;	} else {		PageName = "home";	}		return LoadPage(PageName,status);	}function LoadPage(LoadPage) {	var LoadPage	var PageName		PageName = LoadPage;		 /*config*/	var url = "all_pages.asp"; /*url of the mailer program*/	var XHRequest = false;			if(window.XMLHttpRequest){	XHRequest = new XMLHttpRequest();	} else if(window.ActiveXObject){	XHRequest = new ActiveXObject("Microsoft.XMLHTTP");	}			if(XHRequest){	XHRequest.open("POST", url);	XHRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');		XHRequest.onreadystatechange = function(){	if(XHRequest.readyState < 4){		//document.getElementById("PageContent").innerHTML = "LOADING";			} 		else if(XHRequest.readyState == 4 && XHRequest.status == 200){		document.getElementById("PageContent").innerHTML = XHRequest.responseText;				var Carousel = document.getElementById("horizontal_carousel");		if (Carousel != null) {			hCarousel = new UI.Carousel("horizontal_carousel");		}				delete XHRequest;		XHRequest = null;		}	}	//XHRequest.send(null);	var Title = PageName.replace(/_/,' ');		window.location.hash = PageName;		document.title = "The Lancers  Bed & Breakfast - " + Title;	XHRequest.send("PageName=" + PageName);	self.setTimeout("LoadSlider();",500);		}}function LoadSlider() {	var SliderHTML;	var textselect = document.getElementById("textsection-1").offsetHeight;		SliderHTML = '<div id="slidertop"><img src="images/slider_top.png" onmouseover="scrollContent(\'textslider\',-1)" onmouseout="cancelScroll(\'textslider\')" /></div><div id="sliderbottom"><img src="images/slider_bottom.png"onmouseover="scrollContent(\'textslider\',1)" onmouseout="cancelScroll(\'textslider\')" /></div>';		if (textselect > 220) {		document.getElementById("slidebar").innerHTML = SliderHTML;		document.getElementById("slidebar").style.backgroundImage = "url(images/slider_bg.png)";	} else {		document.getElementById("slidebar").innerHTML = "";		document.getElementById("slidebar").style.background = "none";	}}function SwitchImg(ImgSrc) {	var ImgSrc = ImgSrc.replace(/_thumb/,'');	var MainImg = document.getElementById("MainImg");	MainImg.src = ImgSrc;	}