var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; };
if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } }
{
  let window = _____WB$wombat$assign$function_____("window");
  let self = _____WB$wombat$assign$function_____("self");
  let document = _____WB$wombat$assign$function_____("document");
  let location = _____WB$wombat$assign$function_____("location");
  let top = _____WB$wombat$assign$function_____("top");
  let parent = _____WB$wombat$assign$function_____("parent");
  let frames = _____WB$wombat$assign$function_____("frames");
  let opener = _____WB$wombat$assign$function_____("opener");

var target_data_tmp="";
var target_div="";

function Get_Cookie( check_name ) {
	// first we will split this cookie up into name/value pairs
	// note: document.cookie only returns name=value, not the other components
	var a_all_cookies = document.cookie.split( ";" );
	var a_temp_cookie = "";
	var cookie_name = "";
	var cookie_value = "";
	var b_cookie_found = false; // set boolean t/f default f
	
	for ( i = 0; i < a_all_cookies.length; i++ )
	{
		// now we will split apart each name=value pair
		a_temp_cookie = a_all_cookies[i].split( "=" );
		
		
		// and trim left/right whitespace while we are at it
		cookie_name = a_temp_cookie[0].replace(/^\s+|\s+$/g, "");
	
		// if the extracted name matches passed check_name
		if ( cookie_name == check_name )
		{
			b_cookie_found = true;
			// we need to handle case where cookie has no value but exists (no = sign, that is):
			if ( a_temp_cookie.length > 1 )
			{
				cookie_value = unescape( a_temp_cookie[1].replace(/^\s+|\s+$/g, "") );
			}
			// note that in cases where cookie is initialized but no value, null is returned
			return cookie_value;
			break;
		}
		a_temp_cookie = null;
		cookie_name = "";
	}
	if ( !b_cookie_found )
	{
		return null;
	}
}	

function setCookie( name, value, expires, path, domain, secure ) 
{
// set time, it is in milliseconds
var today = new Date();
today.setTime( today.getTime() );

var curCookie = name + "=" +escape( value ) +
( ( expires ) ? ";expires=" + expires : "" ) + 
( ( path ) ? ";path=" + path : "" ) + 
";sameSite=Lax"
( ( domain ) ? ";domain=" + domain : "" ) +
( ( secure ) ? ";secure" : "" );
document.cookie = curCookie;
}

function CheckSearchWord()
{
 obj=document.getElementById("search_expr");
 if (!obj) return;
 if ((obj.value==" Поиск города") || (obj.value==""))
  {
   alert ("Вы не указали город для поиска"); 
   return false;
  }
 return true;
}

//Восстанавливает сохранённую функцию document.write после загрузки рекламы
function NewAdLoaded()
{
 // restore function which is redifined in RefreshAd()
 document.write = document.__write;
 document.getElementById(target_div).innerHTML=target_data_tmp;
 target_data_tmp="";
 target_div="";
}


//Обновляет рекламный блок в div с id=target, если в данный момент
//не обновляется другой блок. Переопределяет document.write на время
//загрузки этого блока, чтобы писать вывод в нужный id, восстановление
//дефолтной функции производится в NewAdLoaded() после загрузки блока

function RefreshAd(target)
{
 if (target_div!="" || target=="") return;
 //Set target div
 target_div=target;
 // save default document.write
 document.__write = document.write;
 // override
 document.write = function (value)
  {
   target_data_tmp+=value;
  }
 var new_ad=banner_url+"&crs="+Math.random();
 var ban_h_place=document.getElementById("hidden_ban");
 var ban_s_place=document.getElementById(target_div);
 ban_s_place.innerHTML="";
 ban_h_place.innerHTML="";
 var ad_script = document.createElement("script"); 
 if (isIE())
 {
  ad_script.onreadystatechange = function () {
        if (ad_script.readyState == 'complete' || ad_script.readyState == 'loaded') {
            NewAdLoaded();
        }
    }
 }
 else ad_script.onload=function() { NewAdLoaded() };
 ad_script.type='text/javascript';
 ad_script.src=new_ad;
 ban_h_place.appendChild(ad_script);  

 // restore in NewAdLoaded() !!!
 //document.write = document.__write;
}	

var yan_timeout_state=null;
var yan_timeout=600;
var yan_try=10;
var yan_c_try=0;
var yan_id=null;
function yan_ad_check(block_id)
{
 if (!yan_id)
  {
   yan_id=document.getElementById(block_id);
   if (!yan_id) return false;
  }
 if (yan_id.innerHTML.length>20) 
  {
   //yan_id.className="adv240";
   yan_c_try=0;
   yan_id.innerHTML=yan_id.innerHTML+"<br>";
   return true;
  }
  else
   {
    if (yan_c_try>=yan_try)
     {
      yan_c_try=0;
      //banner_url="https://webcf.waybackmachine.org/web/20201125104810/http://advbroker.ru/code/?p=187&c=hmn.ru&btype=ctimage";
      //target_div="";
      //RefreshAd(block_id);
      return false;
     }
     else
      {
       yan_c_try++;
       yan_timeout_state = setTimeout("yan_ad_check('"+block_id+"')", yan_timeout);
      }
   }
}

var kav_timeout_state=null;
var kav_timeout=300;
var kav_try=7;
var kav_c_try=0;
var kav_id=null;
var kav_show=true;
function kav_ad_check(block_id,banner_url)
{
 if (!kav_id)
  {
   kav_id=document.getElementById(block_id);
   if (!kav_id) return false;
  }
 if (kav_id.innerHTML.length>20) 
  {
   kav_c_try=0;
   kav_id.innerHTML=kav_id.innerHTML+"<br>";
   return true;
  }
  else
   {
    if (kav_c_try>=kav_try)
     {
      if (kav_show)
       {
        kav_show=false;
        kav_try=10;
        kav_c_try=0;
        var ban_h_place=document.getElementById("hidden_ban_top");
        if (!ban_h_place) return false;
        //banner_url="https://webcf.waybackmachine.org/web/20201125104810/http://ww.hmn.ru/viewb.js?g=meteonews_top_main_def&num=1&nb=1/1&s=1";
        //banner_url="https://webcf.waybackmachine.org/web/20201125104810/http://ww.hmn.ru/viewb.js?g=meteonews_top_secondary_def&num=1&nb=1/1&s=1";
        target_div="";
        RefreshAd(block_id);
        kav_timeout_state = setTimeout("kav_ad_check('"+block_id+"','"+banner_url+"')", kav_timeout);
        return false;
       }
     }
     else
      {
       kav_c_try++;
       kav_timeout_state = setTimeout("kav_ad_check('"+block_id+"','"+banner_url+"')", kav_timeout);
      }
   }
}

var content_length=355;
var w_try=100;
function ad_check(w_id,c_id)
{
 if (w_try<1) return false;
 var obj_w=document.getElementById(w_id);
 var obj_c=document.getElementById(c_id);
 if (!obj_w || !obj_c)
  {
   w_timeout = setTimeout("ad_check(\'"+w_id+"\',\'"+c_id+"\')", kav_timeout);
   return false;
  }
 if (obj_w.innerHTML.length>content_length)
  {
   obj_c.innerHTML=obj_w.innerHTML;
   obj_w.innerHTML="";
   return true;
  }
  else
   {
    w_try--;
    w_timeout = setTimeout("ad_check(\'"+w_id+"\',\'"+c_id+"\')", kav_timeout);
   }
}
      

var _isIE = -1; //Если 1, то IE, если 0 - то не IE по window.event
function isIE()
{
 if (_isIE != -1) {return _isIE;}
  else
  {
   if (window.event) _isIE = 1;
    else _isIE = 0;
  }
 return _isIE;
}

var menu_timeout=600;
var menu_timeout2=800;
var menu_obj=null;
var mm_timeout_state=null;
var mmh_timeout_state=null;
var menu_show=0;
var in_menu=0;
var in_logo=0;
var is_clicked=0;
function show_menu(show)
 {
  if (show && menu_show) return false;
  menu_obj=document.getElementById("top_menu");
  if (!menu_obj) return false;
  if (show)
   {
    if (show==2) mm_timeout_state = setTimeout("show_real_menu()", menu_timeout2);
     else mm_timeout_state = setTimeout("show_real_menu()", menu_timeout);
   }
   else
    {
     mmh_timeout_state = setTimeout("hide_real_menu()", menu_timeout);
    }
 }


function show_real_menu()
{
 if (!in_logo || is_clicked) return false;
 menu_obj=document.getElementById("top_menu");
 menu_obj.style.display="block";
 menu_show=1;
}

function hide_real_menu()
{
 if (in_menu || in_logo) return false;
 menu_obj=document.getElementById("top_menu");
 menu_obj.style.display="none";
 clearTimeout(mmh_timeout_state);
 clearTimeout(mm_timeout_state);
 menu_obj.style.display="none";
 menu_show=0;
}

function SetCSS(css_number)
{
 var expireDate = new Date();
 var today = new Date();
 expireDate.setDate(365 + today.getDate());
 setCookie("css_n",css_number,expireDate,"/");
 return true;
}

function show_full_pic(pic_path,scale_path)
{
 scale_pic=scale_path;
 var html = document.documentElement, body = document.body;
 var scroll = html.scrollTop || document.body.scrollTop;
 on_off_forms("none");
 var back_div = document.createElement('div');
 back_div.id = 'zp_bg';
 back_div.style.zIndex="999";
 back_div.style.display="block";
 back_div.style.position="absolute";
 back_div.style.left="0px";
 back_div.style.top="0px";
 back_div.style.backgroundColor="gray";
 back_div.className="alpha85";
 back_div.innerHTML="&nbsp;";
 if (html.scrollHeight > html.offsetHeight) back_div.style.height = (html.scrollHeight) + 'px';
  else back_div.style.height = (html.offsetHeight) + 'px';
 back_div.style.width = (html.scrollWidth) + 'px';

 var el = document.createElement('div');
 el.id="zp";
 el.style.zIndex="1000";
 el.style.display="block";
 el.style.left="20px";
 el.style.position="absolute";
 el.style.top="100px";
 el.style.width="800px";
 el.style.height="600px";
 el.align="center";
 el.style.backgroundColor="white";
 el.innerHTML='<table width="100%"><tr><td align="right"><img src="img/close_map.png" style="cursor:pointer;" width="86" height="23" onclick="full_pic_close();"></td></tr>\
 <tr><td align="center"><div class="m90" style="margin-top:25%">Идёт загрузка изображения...</div><br><img id="z_pic" src="img/rotor2.gif" onclick="full_pic_close();">\
 </td></tr></table>';
 //el.style.top = scroll + 250 + 'px';
 //el.style.left = Math.floor(html.scrollWidth / 2) - 200 + 'px';

 document.body.appendChild(back_div);
//alert("test");
 document.body.appendChild(el);
 pic_obj=document.getElementById("z_pic");
 div_bg=document.getElementById("zp_bg");
 div_p=document.getElementById("zp");

 pic_tmp = new Image();
 pic_tmp.onload=pic_on_load;
 pic_tmp.src=pic_path;
}

function pic_on_load()
{
 //pic_obj.src=pic_tmp.src;
 var width=pic_tmp.width;
 var height=pic_tmp.height;
 var html=document.documentElement;
 var left=20;
 var top=100;
 var scroll = html.scrollTop || document.body.scrollTop;
 var bg_height=html.scrollHeight;
 var bg_width=html.scrollWidth;
 if (width<html.scrollWidth) left=(html.scrollWidth/2)-(width/2);
 //if (height<html.scrollHeight) top=(html.scrollHeight/2)-(height/2);
 if (height<html.scrollHeight) top=scroll + 50;
 if (bg_height<height) bg_height=height+60;
 if (bg_width<width) bg_width=width+40;
//alert(width+" "+height);
//alert(html.scrollWidth+" "+html.scrollHeight);
//alert(left+" "+top);
 div_p.innerHTML='<table width="100%"><tr><td align="left"><img src="'+scale_pic+'" width="500" height="50"></td><td align="right" valign="top"><img src="img/close_map.png" style="cursor:pointer;" width="86" height="23" onclick="full_pic_close();"></td></tr>\
 <tr><td align="center" colspan="2"><img align="middle" id="z_pic" src="'+pic_tmp.src+'" onclick="full_pic_close();">\
 </td></tr></table>';
 pic_obj=document.getElementById("z_pic");
 div_p.style.width=(width+10)+"px";
 div_p.style.height=(height+62)+"px";
 div_p.style.left=left+"px";
 div_p.style.top=top+"px";
}

function full_pic_close()
{
 document.body.removeChild(div_p);
 div_p=null;
 document.body.removeChild(div_bg);
 div_bg=null;
 on_off_forms("block");
}

function on_off_forms(action)
{
 var i;
 for (i=0; i<document.forms.length; i++)
  document.forms[i].style.display=action;
}

function SetVis(name)
{
 var fav=document.getElementById(name);
 if (fav.style.display=='none') fav.style.display='block';
  else fav.style.display='none';
}

//HTML5 web sorage support
function supports_html5_storage() {
	return ('localStorage' in window) && window['localStorage'] !== null;
}
//key - required key; st_ar - the search array
function get_int_index(key,st_ar)
{
 for (var i=0; i<st_ar.length; i++)
  {
   if (st_ar[i] && st_ar[i]==key)
    {
     return i;
    }
  }
 return null;
}
//key - index of any type; value - value of any type
function save_t(key,value)
{
 var storage_name="mn_storage";
 var storage_index=storage_name+"_index";
 if (!supports_html5_storage()) return null;
 var in_st=localStorage.getItem(storage_name);
 if (in_st==null) var in_st_ar=new Array();
  else var in_st_ar=in_st.split(",");
 var in_st_idx=localStorage.getItem(storage_index);
 if (in_st_idx==null) var in_st_idx_ar=new Array();
  else var in_st_idx_ar=in_st_idx.split(",");
 var cur_val_idx=get_int_index(key,in_st_idx_ar);
 if (cur_val_idx==null) cur_val_idx=in_st_ar.length;
 in_st_idx_ar[cur_val_idx]=key;
 in_st_ar[cur_val_idx]=value;
 var in_st_s=in_st_ar.join(",");
 var in_st_idx_s=in_st_idx_ar.join(",");
 if (in_st!=in_st_s || in_st_idx!=in_st_idx_s)
  {
   localStorage.setItem(storage_name,in_st_s);
   localStorage.setItem(storage_index,in_st_idx_s);
 }
}
//if "key" is absent, return whole storage, else return only "key" value
function get_from_st(storage_name,key)
{
 if (!supports_html5_storage()) return null;
 var in_st=localStorage.getItem(storage_name);
 if (key==null) return in_st;
 var storage_index=storage_name+"_index";
 var in_st_idx=localStorage.getItem(storage_index);
 if (in_st_idx==null || in_st==null) return null;
 var in_st_idx_ar=in_st_idx.split(",");
 var cur_val_idx=get_int_index(key,in_st_idx_ar);
 if (cur_val_idx==null) return null;
  else
   {
    var in_st_ar=in_st.split(",");
    return in_st_ar[cur_val_idx];
   }
}


}
/*
     FILE ARCHIVED ON 10:48:10 Nov 25, 2020 AND RETRIEVED FROM THE
     INTERNET ARCHIVE ON 22:51:26 Nov 16, 2024.
     JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE.

     ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C.
     SECTION 108(a)(3)).
*/
/*
playback timings (ms):
  captures_list: 0.48
  exclusion.robots: 0.025
  exclusion.robots.policy: 0.014
  esindex: 0.009
  cdx.remote: 6.194
  LoadShardBlock: 76.784 (3)
  PetaboxLoader3.datanode: 123.384 (5)
  load_resource: 247.851 (2)
  PetaboxLoader3.resolve: 136.678 (2)
*/