var gb = (((navigator.appName == "Netscape") && 
	 (parseInt(navigator.appVersion) >= 3 )) || 
	 ((navigator.appName == "Microsoft Internet Explorer") && 
	 (parseInt(navigator.appVersion) >= 4 ))); 
var layers=new Array('Countries', 'Tours', 'Info', 'Services', 'cBeach', 'cSki', 'cInfo', 'cServices');
var sh=0;
var Timer;

function preload(img) {
	var a = new Image();
	a.src = img;
	return (a);
}

if (gb) {
	li = preload("img/li.gif");
	lion = preload("img/lion.gif");
}

function fix() { if (gb) {clearTimeout(Timer);}}
function set() {if (gb) {Timer=setTimeout('if (sh==1) HideLayers()', 500);}}

function HideLayers() {
	if (gb) {
		for (i=0; i<8; i++) 
			if (document.all[layers[i]])
				document.all[layers[i]].style.visibility='hidden';
		sh=0;
	}
}

function Show(LayerName) {
	if (gb) {
		clearTimeout(Timer);
		HideLayers();
		document.all[LayerName].style.visibility='visible';
		sh=1;
	}
}

var MapWin;
function OpenMap(url, width, height) {
	var win_params;
	var win_width;
	if (MapWin) { MapWin.close(); }
	if (height > 600) {
		win_width = width+20;
		win_params = "width="+win_width+",height=600,resizable=0,scrollbars=1";
	} else {
		win_params = "width="+width+",height="+height+",resizable=0";
	}
	MapWin=window.open ("", "Map", win_params);
	MapWin.document.open();
    MapWin.document.writeln("<HTML><head><title>Фото отеля</title></head><BODY leftmargin=0 topmargin=0 oncontextmenu='return false' ondragstart='return false'><img src="+url+" width="+width+" height="+height+" border=0></BODY></HTML>");
	MapWin.document.close();
	MapWin.focus();
}

var BookWin;
function OpenWin(url, width, height) {
	if (BookWin) { BookWin.close(); }
	BookWin=window.open (url, "Book", "width="+width+",height="+height+",resizable=1");
	BookWin.focus();
}

