	if (document.layers) {
		//Load the DHTML code for NS4 and Opera
		if(navigator.userAgent.indexOf("Opera") != -1){
			document.write("<scr"+"ipt language='JavaScript' type='text/javascript' src='/nav_opera.js'><\/scr"+"ipt>");
		} else {
			document.write("<scr"+"ipt language='JavaScript' type='text/javascript' src='/nav_ns4.js'><\/scr"+"ipt>");
		}
	} else {
		//Load the DHTML code for IE and NS 6
		document.write("<scr"+"ipt language='JavaScript' type='text/javascript' src='/nav.js'><\/scr"+"ipt>");
	}
sectname="shop";
// ---------------------------------------------------------------------------------------

  // Popup for model page Corp Booking
	function openpopup(popurl){
	var winpops=window.open(popurl,"","width=725px,height=600px,resizable,scrollbars")
	}
// ---------------------------------------------------------------------------------------	// DATE & MONTH CALENDER CHANGE 		function dateChange(dd, selitem) {
			if (dd=="arrdd") { document.quicksearch.depdd.selectedIndex=selitem };
			if (dd=="arrmm") { document.quicksearch.depmm.selectedIndex=selitem-1 };
			if (dd=="arryy") { document.quicksearch.depyy.selectedIndex=selitem-1 };
		}
		function openCal(arrdep) {
			window.open('/calendar.asp?mnth=0&arrdep='+arrdep, 'cal', 'top=280, left=400, width=165, height=184, scrollbars=no, address=no, location=no, status=yes')
		}
// ---------------------------------------------------------------------------------------	 // CWP Booking panel update - Dynamic Anchor
		function updaterespanel(hotelname) {
			window.location="#booknow";
			document.quicksearch.pro.selectedIndex=hotelname;
		}// ---------------------------------------------------------------------------------------	//CWP Date Validation
		function checkForm_CWP(){			errs="";			arrday=document.quicksearch.arrdd.options[document.quicksearch.arrdd.selectedIndex].value;
			arrmonth=document.quicksearch.arrmm.options[document.quicksearch.arrmm.selectedIndex].value;
			arryear=document.quicksearch.arryy.options[document.quicksearch.arryy.selectedIndex].value;

			depday=document.quicksearch.depdd.options[document.quicksearch.depdd.selectedIndex].value;
			depmonth=document.quicksearch.depmm.options[document.quicksearch.depmm.selectedIndex].value;
			depyear=document.quicksearch.depyy.options[document.quicksearch.depyy.selectedIndex].value;			ArrDate = new Date(arryear,arrmonth,arrday);
			DepDate = new Date(depyear,depmonth,depday);
		// Checking if Arr Date is > Dep Date  AND Dep Date is < than Arr date
			if (ArrDate.getTime() > DepDate.getTime())
			{ errs+=" - Arrival Date - Your arrival date is after your departure date "+"\n"; }
//			if (DepDate.getTime() < ArrDate.getTime())
//			{ errs+=" - Departure Date - Your departure date is earlier than your arrival date "+"\n"; }				if (errs!="") {				alert("Please ensure the following elements are completed correctly"+"\n\n"+errs);			} else {		//		alert("Submission OK");				document.quicksearch.submit();			}		}// ---------------------------------------------------------------------------------------	//POP gallery for Venue Finder
	function popGallery(file, hotelcode) {
		//FOR THE DROPDOWN MENU OF ALL HOTELS
		if (hotelcode!="" && file !="") {
				window.open('/locations/locationsgallerypop.asp?imagename='+file+'&hotel='+hotelcode, 'RydgesOtherPop', 'top=50, left=50, width=450, height=340, scrollbars=yes, location=no, address=no');
			 // window.open('/meetingsandbusiness/mab_gallerypop.asp?imagename='+file+'&hotel='+hotelcode, 'RydgesOtherPop', 'top=50, left=50, width=450, height=340, scrollbars=yes, location=no, address=no');
		}
	}
// ---------------------------------------------------------------------------------------
	// Venue Finder - Choose a Hotel DD
	function mab() {
	var w = document.venuemab.hotel.selectedIndex;
	var url_add = document.venuemab.hotel.options[w].value;
	window.location.href = url_add;
	}
// ---------------------------------------------------------------------------------------
	// Venue Finder - Guest Total [Numeric value ONLY]
	function validChars(e, goods) {		var key, keychar;		key = (window.event) ? window.event.keyCode : ((e) ? e.which : null);		if (key == null) return true;	 		keychar = String.fromCharCode(key);		keychar = keychar.toLowerCase();		goods = goods.toLowerCase();	 		if (goods.indexOf(keychar) != -1)			return true;	 		if (key==null || key==0 || key==8 || key==9 || key==13 || key==27)			return true;	 		return false;	}

// ---------------------------------------------------------------------------------------	
