var search_type_selected = 1; if (readCookie("geoip") == null || (readCookie("last_selected") == null && readCookie("last_selected_city") != "")) { $(function() { var GeoIP_UC = 2; $( "#dialog-region-confirm" ).dialog({ resizable: false, width:500, height:200, close: function(event, ui) { $.ajax({url: "/lib/set_city.php?geoip_city_selected="+GeoIP_UC}); }, buttons: { "показывать цены моего города": function() { GeoIP_UC = 1; createCookie("geoip","you_thank_you","365"); $( this ).dialog( "close" ); document.location.href='?geoip_city_selected='+GeoIP_UC; }, "показывать московские цены": function() { createCookie("geoip","no_thanks","365"); createCookie("last_selected","no_thanks","365"); $( this ).dialog( "close" ); } } }); }); } else $("#dialog-region-confirm").css("display","none"); var OriginalText = document.getElementById('textfield').value; OriginalText.replace(/'|"/i, ""); document.getElementById('textfield').value = OriginalText; var options = { script:"/scripts/autocomplete.php?json=true&limit=7&", varname:"input", json:true, shownoresults:false, maxresults:7, delay: 700, timeout: 10000, callback: function (obj) { if (typeof(SearchTypeSelect) == "function") SearchTypeSelect(1); } }; var as_json = new bsn.AutoSuggest('textfield', options); runOnLoad("ajax_request(4)"); $('#ur_count_cell').html($('#ur_str').val()); if (Tooltip_Init) Tooltip_Init(); if ($('.ads_container')) $( document ).ready(function() { LoadAds(); }); if ($('#spelling').length == 1 ) { var isDOM=document.getElementById; var isOpera=isOpera5=window.opera && isDOM; var isMSIE=typeof(document.all && document.all.item && !isOpera); objlink=document.getElementById("hk"); if ( isMSIE ) document.onkeydown = function(objlink) { return sendmsg(objlink) }; else document.onkeypress = function(objlink) { return sendmsg(objlink) }; }