var hideObject;var currentMenu;function popup(url, name, width, height, x, y) {	settings="titlebar=no, toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, left="+x+", top="+y+", screenX="+x+", screenY="+y+", width="+width+", height="+height;		NewWindow=window.open(url,name,settings);}function showObject(id) {	if (currentMenu != null)	{		currentMenuObject = document.getElementById(currentMenu);		clearTimeout(currentMenuObject.timer);		hideObject(currentMenu);	}   toShow = document.getElementById(id);   currentMenu = id;   toShow.style.visibility = "visible";   clearTimeout(toShow.timer);}function hideObject(id) {   document.getElementById(id).style.visibility = "hidden";}function hideObjectDelayed(id, delay) {   toHide = document.getElementById(id);   hideFunction = "hideObject('" + id + "')";   toHide.timer = setTimeout(hideFunction, delay);}function check(id){	 document.getElementById(id).checked = true ;}function printpage() {	window.print();  }function roll_on(rollImage,extension){	rollImage.src = "/image/site/" + rollImage.getAttribute('id') + "_on." + extension;}function roll_off(rollImage,extension){	rollImage.src = "/image/site/" + rollImage.getAttribute('id') + "."  + extension;}function roll(id,rollImage) {	product = document.getElementById(id);	product.setAttribute("src", rollImage);}function changeBackground(color) {	 this.style.backgroundColor=color;}function validate_contact_us_enquiry_form() {		vName=contact_us_enquiry_form.name.value;	if (vName=='') {		alert('Please enter your name.');		event.returnValue=false;		exit();	}		vEmail=contact_us_enquiry_form.email.value;	if (vEmail=='') {		alert('Please enter your email address.');		event.returnValue=false;		exit();	}		vSubject=contact_us_enquiry_form.subject.value;	if (vSubject=='') {		alert('Please enter a subject.');		event.returnValue=false;		exit();	}		vEnquiry=contact_us_enquiry_form.enquiry.value;	if (vEnquiry=='') {		alert('Please enter your enquiry.');		event.returnValue=false;		exit();	}}function validate_conferences_enquiry_form() {		vName=conferences_enquiry_form.name.value;	if (vName=='') {		alert('Please enter your name.');		event.returnValue=false;		exit();	}		vEmail=conferences_enquiry_form.email.value;	if (vEmail=='') {		alert('Please enter your email address.');		event.returnValue=false;		exit();	}}function validate_weddings_enquiry_form() {		vName=weddings_enquiry_form.name.value;	if (vName=='') {		alert('Please enter your name.');		event.returnValue=false;		exit();	}		vEmail=weddings_enquiry_form.email.value;	if (vEmail=='') {		alert('Please enter your email address.');		event.returnValue=false;		exit();	}}function validate_banquet_hall_enquiry_form() {		vName=banquet_hall_enquiry_form.name.value;	if (vName=='') {		alert('Please enter your name.');		event.returnValue=false;		exit();	}		vEmail=banquet_hall_enquiry_form.email.value;	if (vEmail=='') {		alert('Please enter your email address.');		event.returnValue=false;		exit();	}}function validate_outside_catering_enquiry_form() {		vName=outside_catering_enquiry_form.name.value;	if (vName=='') {		alert('Please enter your name.');		event.returnValue=false;		exit();	}		vEmail=outside_catering_enquiry_form.email.value;	if (vEmail=='') {		alert('Please enter your email address.');		event.returnValue=false;		exit();	}}function validate_book_a_table_form() {		vName=book_a_table_form.name.value;	if (vName=='') {		alert('Please enter your name.');		event.returnValue=false;		exit();	}		vPhone=book_a_table_form.phone.value;	if (vPhone=='') {		alert('Please enter your telephone number.');		event.returnValue=false;		exit();	}		vEmail=book_a_table_form.email.value;	if (vEmail=='') {		alert('Please enter your email address.');		event.returnValue=false;		exit();	}		vDate=book_a_table_form.date.value;	if (vDate=='') {		alert('Please enter your required date.');		event.returnValue=false;		exit();	}		vGuests=book_a_table_form.guests.value;	if (vGuests=='') {		alert('Please enter the number of guests.');		event.returnValue=false;		exit();	}}//allows use of rel="external" instead of target="_new" for validation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";   	}   }   window.onload = externalLinks;//rolling image functionsvar slideshow2_noFading = false;var slideshow2_timeBetweenSlides = 6000;	// Amount of time between each image(1000 = 1 second)var slideshow2_fadingSpeed = 25;	// Speed of fading	(Lower value = faster)var slideshow2_galleryContainer;	// Reference to the gallery divvar slideshow2_galleryWidth;	// Width of galleryvar slideshow2_galleryHeight;	// Height of galeryvar slideshow2_slideIndex = -1;	// Index of current image shownvar slideshow2_slideIndexNext = false;	// Index of next image shownvar slideshow2_imageDivs = new Array();	// Array of image divs(Created dynamically)var slideshow2_currentOpacity = 100;	// Initial opacityvar slideshow2_imagesInGallery = false;	// Number of images in galleryvar Opera = navigator.userAgent.indexOf('Opera')>=0?true:false;function createParentDivs(imageIndex){	if(imageIndex==slideshow2_imagesInGallery){					showGallery();	}else{		var imgObj = document.getElementById('galleryImage' + imageIndex);			if(Opera)imgObj.style.position = 'static';		slideshow2_imageDivs[slideshow2_imageDivs.length] =  imgObj;		imgObj.style.visibility = 'hidden';			imageIndex++;		createParentDivs(imageIndex);		}		}function showGallery(){	if(slideshow2_slideIndex==-1)slideshow2_slideIndex=0; else slideshow2_slideIndex++;	// Index of next image to show	if(slideshow2_slideIndex==slideshow2_imageDivs.length)slideshow2_slideIndex=0;	slideshow2_slideIndexNext = slideshow2_slideIndex+1;	// Index of the next next image	if(slideshow2_slideIndexNext==slideshow2_imageDivs.length)slideshow2_slideIndexNext = 0;		slideshow2_currentOpacity=100;	// Reset current opacity	// Displaying image divs	slideshow2_imageDivs[slideshow2_slideIndex].style.visibility = 'visible';	if(Opera)slideshow2_imageDivs[slideshow2_slideIndex].style.display = 'inline';	if(navigator.userAgent.indexOf('Opera')<0){		slideshow2_imageDivs[slideshow2_slideIndexNext].style.visibility = 'visible';	}		if(document.all){	// IE rules		slideshow2_imageDivs[slideshow2_slideIndex].style.filter = 'alpha(opacity=100)';		slideshow2_imageDivs[slideshow2_slideIndexNext].style.filter = 'alpha(opacity=1)';	}else{		slideshow2_imageDivs[slideshow2_slideIndex].style.opacity = 0.99;	// Can't use 1 and 0 because of screen flickering in FF		slideshow2_imageDivs[slideshow2_slideIndexNext].style.opacity = 0.01;	}				setTimeout('revealImage()',slideshow2_timeBetweenSlides);		}function revealImage(){	if(slideshow2_noFading){		slideshow2_imageDivs[slideshow2_slideIndex].style.visibility = 'hidden';		if(Opera)slideshow2_imageDivs[slideshow2_slideIndex].style.display = 'none';		showGallery();		return;	}	slideshow2_currentOpacity--;	if(document.all){		slideshow2_imageDivs[slideshow2_slideIndex].style.filter = 'alpha(opacity='+slideshow2_currentOpacity+')';		slideshow2_imageDivs[slideshow2_slideIndexNext].style.filter = 'alpha(opacity='+(100-slideshow2_currentOpacity)+')';	}else{		slideshow2_imageDivs[slideshow2_slideIndex].style.opacity = Math.max(0.01,slideshow2_currentOpacity/100);	// Can't use 1 and 0 because of screen flickering in FF		slideshow2_imageDivs[slideshow2_slideIndexNext].style.opacity = Math.min(0.99,(1 - (slideshow2_currentOpacity/100)));	}	if(slideshow2_currentOpacity>0){		setTimeout('revealImage()',slideshow2_fadingSpeed);	}else{		slideshow2_imageDivs[slideshow2_slideIndex].style.visibility = 'hidden';			if(Opera)slideshow2_imageDivs[slideshow2_slideIndex].style.display = 'none';				showGallery();	}}function initImageGallery(){	slideshow2_galleryContainer = document.getElementById('imageSlideshowHolder');	slideshow2_galleryWidth = slideshow2_galleryContainer.clientWidth;	slideshow2_galleryHeight = slideshow2_galleryContainer.clientHeight;	galleryImgArray = slideshow2_galleryContainer.getElementsByTagName('IMG');	for(var no=0;no<galleryImgArray.length;no++){		galleryImgArray[no].id = 'galleryImage' + no;	}	slideshow2_imagesInGallery = galleryImgArray.length;	createParentDivs(0);			}function initImageGallery2(){	slideshow2_galleryContainer = document.getElementById('imageSlideshowHolder2');	slideshow2_galleryWidth = slideshow2_galleryContainer.clientWidth;	slideshow2_galleryHeight = slideshow2_galleryContainer.clientHeight;	galleryImgArray = slideshow2_galleryContainer.getElementsByTagName('IMG');	for(var no=0;no<galleryImgArray.length;no++){		galleryImgArray[no].id = 'galleryImage' + no;	}	slideshow2_imagesInGallery = galleryImgArray.length;	createParentDivs(0);			}//end rolling image functionsfunction addItemToUsersList(itemId){		 alert('Product id = ' + itemId);}function createRequest() {		// create an Ajax Request		var ajaxRequest;		try	{		ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");	}				catch (e1)		{			try			{				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");			}				catch (e2)				{					ajaxRequest = new XMLHttpRequest();				}		}		return ajaxRequest;}function addItemToList(itemID) {		var ajax_connection = createRequest();		ajax_connection.open('get', "add-to-list.php?item=" + itemID);		// setup the function to deal with the reply	ajax_connection.onreadystatechange = function(){				if (ajax_connection.readyState == 4) {			// here you can put some code to update the shopping cart HTML to show item is added						var listItems = ajax_connection.responseText;						document.getElementById('shopping_list').innerHTML = listItems;			//document.getElementById('shopping_list').innerHTML = '' + listItems;			//document.getElementById('shopping_list').innerHTML = '';		}	}			ajax_connection.send(null);}function addItemToListSeasonal(itemID) {		var ajax_connection = createRequest();		ajax_connection.open('get', "add-to-list-seasonal.php?item=" + itemID);		// setup the function to deal with the reply	ajax_connection.onreadystatechange = function(){				if (ajax_connection.readyState == 4) {			// here you can put some code to update the shopping cart HTML to show item is added						var listItems = ajax_connection.responseText;						document.getElementById('shopping_list2').innerHTML = listItems;		}	}			ajax_connection.send(null);}function removeItemFromList(itemKey) {		var ajax_connection = createRequest();		ajax_connection.open('get', "remove-from-list.php?item=" + itemKey);		// setup the function to deal with the reply	ajax_connection.onreadystatechange = function(){				if (ajax_connection.readyState == 4) {			// here you can put some code to update the shopping cart HTML to show item is added						var listItems = ajax_connection.responseText;			document.getElementById('shopping_list').innerHTML = listItems;		}	}			ajax_connection.send(null);}function removeItemFromListSeasonal(itemKey) {		var ajax_connection = createRequest();		ajax_connection.open('get', "remove-from-list-seasonal.php?item=" + itemKey);		// setup the function to deal with the reply	ajax_connection.onreadystatechange = function(){				if (ajax_connection.readyState == 4) {			// here you can put some code to update the shopping cart HTML to show item is added						var listItems = ajax_connection.responseText;			document.getElementById('shopping_list2').innerHTML = listItems;		}	}			ajax_connection.send(null);}function clearList() {		var ajax_connection = createRequest();		ajax_connection.open('get', "clear-list.php");		// setup the function to deal with the reply	ajax_connection.onreadystatechange = function(){				if (ajax_connection.readyState == 4) {			// here you can put some code to update the shopping cart HTML to show item is added						var listItems = ajax_connection.responseText;			document.getElementById('shopping_list').innerHTML = listItems;		}	}			ajax_connection.send(null);}function clearListSeasonal() {		var ajax_connection = createRequest();		ajax_connection.open('get', "clear-list.php");		// setup the function to deal with the reply	ajax_connection.onreadystatechange = function(){				if (ajax_connection.readyState == 4) {			// here you can put some code to update the shopping cart HTML to show item is added						var listItems = ajax_connection.responseText;			document.getElementById('shopping_list2').innerHTML = listItems;		}	}			ajax_connection.send(null);}function removeItemFromList2(itemKey) {		var ajax_connection = createRequest();		ajax_connection.open('get', "remove-from-list2.php?item=" + itemKey);		// setup the function to deal with the reply	ajax_connection.onreadystatechange = function(){				if (ajax_connection.readyState == 4) {			// here you can put some code to update the shopping cart HTML to show item is added						var listItems = ajax_connection.responseText;			document.getElementById('shopping_list_large').innerHTML = listItems;		}	}			ajax_connection.send(null);}function clearList2() {		var ajax_connection = createRequest();		ajax_connection.open('get', "clear-list2.php");		// setup the function to deal with the reply	ajax_connection.onreadystatechange = function(){				if (ajax_connection.readyState == 4) {			// here you can put some code to update the shopping cart HTML to show item is added						var listItems = ajax_connection.responseText;			document.getElementById('shopping_list_large').innerHTML = listItems;		}	}			ajax_connection.send(null);}/*function addItemToUsersList(itemId){  $.ajax({      'url': 'path/to/add-item.php',        'type': 'GET',      'dataType': 'json',       'data': {itemid: itemId},        'success': function(data)        {           if(data.status)           {               if(data.added)                {                        $("span#success"+itemId).attr("innerHTML","Item added to your personal list");                 }                 else                 {                        $("span#success"+itemId).attr("innerHTML","This item is already on your list");                }            }       },       beforeSend: function()          {               $("span#success"+itemId).attr("innerHTML","Adding item to your bucketlist...");         }          'error': function(data)           {          // what happens if the request fails.            $("span#success"+itemId).attr("innerHTML","An error occureed");        }});}*/
