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 : "" ) + ( ( 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; 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) { document.getElementById(target_div).innerHTML+=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+"
"; return true; } else { if (yan_c_try>=yan_try) { yan_c_try=0; banner_url="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 _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=" "; 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='\
Идёт загрузка изображения...

\
'; //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\ \ '; 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