/*

		All the functions here are provided particularly for management of the pub pages. 
		toggleMap is used by all browsers but the rest are used only by the Opera type browsers
		which have a problem when a layer is located over navigation links.
		
		The toggleMap function hides and displays the map on the pubs pages in the MSIE browsers.
		For Opera type browsers a small window is opened. For these Focus, Blur, Close and
		setWindowname are used to manage the window and the targeting of further pub pages.
		A more complex capability is available for mutiple areas of display/hide and can be 
		found in '/www/developments/collapsable page code.txt'
		
*/
//
function toggleMap(pubBlock) { 
	browserIsIE = isItOpera();
//	window.alert ("browserIsIE: " + browserIsIE);
	if (browserIsIE == 'msie') {
    var pubBlock;
    eval('pubBlock=document.all.pubBlock');
		if (pubBlock.style.display == 'none') {
				pubBlock.style.display = 'block';
		} else {
				pubBlock.style.display = 'none';
		}
		return(true);
	} else {
		openPubWin();
	}
/*
	Because of problems in Firefox, Chrome and Safari browsers, it is necessary to handle 
	overlaid layers (in the pub pages and the CCR logo/link top right of all pages) map in 
	a different way for these browsers. In the pub pages a small window is opened rather than 
	a layer, as we do for MSIE. The isItOpera function identifies which browser type and is 
	called from a	number of places where this information is required. 
	NOTE: this function also appears in general.js which is not (must not be) loaded for 
	pub pages
*/
}
function isItOpera() {
	var browserIsIE = "";
	browserIsIE = navigator.userAgent.toLowerCase();
	browserIsIE = browserIsIE.substring(25,29);
	return (browserIsIE);
}
/*
	 Pubs, Open window
	 This function is called from the pub pages and creates the small pubmap window (Firefox,
	 Chrome and Opera browsers only).
*/
function openPubWin() {
	var menuWindow = "";
	var strMenustring = "menubar=0,toolbar=0,status=0,width=349,height=564,left=50,top=144,resize=0,scrollbars=0,location=0,titlebar=0";
	menuWindow = window.open("pubmap.htm","pubmap",strMenustring);
	menuWindow.focus();
}
/*
		loadAccommodation is called from the Sleeping item, Bed & Breakfast list. The objective 
		is to load aa_business.htm to display the business categories, open accommodation.htm 
		in the small business window, and focus on this.
*/
function loadAccommodation() {
	parent.location='../business/aa_business.htm#aa';
	openWin('../business/accommodation.htm');
	return false;
}
//-->