var timer
var speed=300

function stop_time(){
	clearTimeout(timer)
}
function show_div(layer_number){
	clearTimeout(timer)
	Show_layer(layer_number)
}

function Show_layer(layer_number) {
	timer = setTimeout(function() {
		for (var i=0; i <8; i++) {
			if (document.getElementById('vlayer'+i)) document.getElementById('vlayer'+i).style.display = 'none';
			if (document.getElementById('vtab'+i)) document.getElementById('vtab'+i).className='bookmark';
		}
		document.getElementById('vtab7').className='bookmarkend'; 
		if (document.getElementById('vlayer'+layer_number)) document.getElementById('vlayer'+layer_number).style.display = 'block';
		if (document.getElementById('vtab'+layer_number)) document.getElementById('vtab'+layer_number).className='bookmark active';
		if (layer_number==7) { document.getElementById('vtab7').className='bookmarkend active'; }
	}, 300)
}

	var wnd; var wndMap; var wndMap1; 
	var tm1 = new Image(); tm1.src = 'im/bot1a.gif'; 
	var tm2 = new Image(); tm2.src = 'im/bot2a.gif'; 
	var tm3 = new Image(); tm3.src = 'im/bot3a.gif'; 
	var tm4 = new Image(); tm4.src = 'im/bot4a.gif'; 
	var tm5 = new Image(); tm5.src = 'im/bot5a.gif'; 



	function showMap()
		{href="http://incom.eatlas.ru/index_short.asp?showlay=msk_cotteges_p&vis=3";href='/app_gmap2.asp';	
	 	if (wndMap && !wndMap.closed) wndMap.close(); wndMap = window.open(href,"","resizable=no,location=no,status=no,scrollbars=no,menubar=no,width=1020,height=765"); }



	function showImage(url)
		{if (wnd && !wnd.closed) wnd.close(); wnd = window.open(url,"","resizable=yes,status=no,width=400,height=300");}


	
	function printMap(href)
		{if (wndMap1 && !wndMap1.closed) wndMap1.close(); wndMap = window.open(href,"","resizable=yes,location=no,scrollbars=yes,status=no,width=550,height=580");}


	
	function show3Dpanorama(url)
		{if (wnd && !wnd.closed) wnd.close(); wnd = window.open(url,"","resizable=yes,status=no,width=350,height=300");}


	
	function showVideo(url)
		{if (wnd && !wnd.closed) wnd.close(); wnd = window.open(url,"","resizable=yes,status=no,width=380,height=340");}


	
	function showPlan(url)
		{if (wnd && !wnd.closed) wnd.close(); wnd = window.open(url,"","scrollbars=yes,resizable=yes,status=yes,width=500,height=500");}


	
	function showMapID(id)
		{href="http://incom.eatlas.ru/index_short.asp?map=msk_incom&zoom=10000&id=" + id + "&lay=Msk_cotteges_p&mapw=544&maph=425&vis=3&act=show_obj"
	 	if (wndMap && !wndMap.closed) wndMap.close(); wndMap = window.open(href,"","resizable=no,location=no,status=no,width=578,height=550");}