function setHash(hash) {
	location.hash = '#' + hash;
}

function cssmenuhover()
{
        if(!document.getElementById("cssmenu"))
                return;
        var lis = document.getElementById("cssmenu").getElementsByTagName("LI");
        for (var i=0;i<lis.length;i++)
        {
                lis[i].onmouseover=function(){this.className+=" iehover";}
                lis[i].onmouseout=function() {this.className=this.className.replace(new RegExp(" iehover\\b"), "");}
        }
	}
	if (window.attachEvent) {
		window.attachEvent("onload", cssmenuhover);
	}
	
	navHover = function() {
        var lis = document.getElementById("navmenu-v").getElementsByTagName("LI");
        for (var i=0; i<lis.length; i++) {
                lis[i].onmouseover=function() {
                        this.className+=" iehover";
                }
                lis[i].onmouseout=function() {
                        this.className=this.className.replace(new RegExp(" iehover\\b"), "");
                }
        }
	}
	if (window.attachEvent) {window.attachEvent("onload", navHover)};
	
	function Inint_AJAX() {
	   try { return new ActiveXObject("Msxml2.XMLHTTP");  } catch(e) {} //IE
	   try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) {} //IE
	   try { return new XMLHttpRequest();          } catch(e) {} //Native Javascript
	   alert("XMLHttpRequest not supported");
	   return null;
	};
	
	function dochange(src, val, type) {
		switch(type) {
			case "c":
				var req = Inint_AJAX();
				 req.onreadystatechange = function () { 
					  if (req.readyState==4) {
						   if (req.status==200) {
								document.getElementById(src).innerHTML=req.responseText;
						  } 
					  }
				 };
				req.open("GET", "/index.php?type=getcountries&id="+val);
				req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=windows-1251"); 
				req.send(null);
				all_region = val;
				all_country = 0;
			break;
			case "t":
				all_country = val;
			break;
		 }
		 
		 document.getElementById('search_link').href = "/667_search_query_" + all_region + "_" + all_country + "_0_0_0_0-0-0_0-0-0_0_0_1.html";
	}