	function ShowPhoto(url) {
		var scroll = "yes";
		if(screen.width < 1000)	{scroll = "yes";}
		window.open(url, '_blank', 'width=0, height=0, menubar=no, scrollbars=' + scroll + ', status=no, top=0, left=0');
	}
	
	function GetObj(objId) {
		if (navigator.appName.substring(0,2) !="Mi")
			return document.getElementById(objId);
		else
			return document.all[objId];
	}
			
	function GetAbsoluteTop(obj_id) {
	   var obj;
	   var result = 0;
	   obj = GetObj(obj_id);
	   while( obj.tagName != 'BODY' ) {
	     result += obj.offsetTop;
	     obj = obj.offsetParent;
	   }
	   return result;
	}
	
	function GetAbsoluteLeft(obj_id) {
	   var obj;
	   var result = 0;
	   obj = GetObj(obj_id);
	   while( obj.tagName != 'BODY' ) {
	     result += obj.offsetLeft;
	     obj = obj.offsetParent;
	   }
	   return result;
	}
	
			
	function SetFavorites() {
		window.external.AddFavorite('http://www.vmb-service.ru', 'úáï "VMB-óÅÒ×ÉÓ"')
	}
	
	var timerID=0;
	var OldName=-1;

	var version = 0;
	
    var isIE4 = (typeof(document.all) != 'undefined' && parseInt(navigator.appVersion) >= 4) ? 1 : 0;
    
	if (isIE4) {
		
		version = navigator.appVersion;
		
		if (version.search('MSIE') != -1) {
			version = parseFloat(version.substr(version.search('MSIE') + 5, 4));
		} else {
			version = 0;
		}
		
	}

	function Show(obj_name, state)
	{
		if (timerID) {
			clearTimeout(timerID);
		}
		
		if (OldName != obj_name) {
			if (OldName != -1 ) {
				GetObj('div' + OldName).style.display = 'none';
				Button(OldName, 0);
			}
			OldName = obj_name;
		}

		if (obj_name > -1) {
			Button(obj_name, state);
			GetObj('div' + obj_name).style.display = (state) ? 'Block' : 'none'
			var x = GetAbsoluteLeft("menu1");
			x = x - 242;
			GetObj('div' + obj_name).style.left = x + 'px';
		}
	}
	
	function Button(id, type){
		if (type) {
			GetObj("menu_img" + id).src = "images/menu_on.gif";
		} else {
			GetObj("menu_img" + id).src = "images/menu_off.gif";
		}
	}
