function popup(width, height, adres, noscroll){
if (parseInt (navigator.appVersion) >= 4 ){
  X=(screen.width  - width)/2;
  Y=(screen.height - height)/2;
  }
else {
  X=250;
  Y=100;
  }
if(noscroll) m_scroll='no';
else m_scroll='yes';
popupWin = window.open(adres, 'no1', 'location=0,resizable=yes,scrollbars='+m_scroll+',width='+width+',height='+height+',top='+Y+',left='+X);
}

function fl_popup(width, height, adres){
if (parseInt (navigator.appVersion) >= 4 ){
  X=(screen.width  - width)/2;
  Y=(screen.height - height)/2;
  }
else {
  X=250;
  Y=100;
  }
popupWin = window.open(adres, 'flash', 'location=0,resizable=0,scrollbars=0,toolbar=0,width='+width+',height='+height+',top='+Y+',left='+X);
}

function switch_div(d_id){
obj=document.getElementById(d_id);
if(obj){
 if(obj.style.display=='none'||!obj.style.display)
  obj.style.display='block';
 else
  obj.style.display='none';
 }
}

function change_metro(city,lang){               
        url = "http://"+document.location.hostname+"/netcat/modules/default/change_metro.php";	
	 http_request = false;
        if (window.XMLHttpRequest) { 
            http_request = new XMLHttpRequest();            
        } else if (window.ActiveXObject) { 
            try {
                http_request = new ActiveXObject("Msxml2.XMLHTTP");
            } catch (e) {
                try {
                    http_request = new ActiveXObject("Microsoft.XMLHTTP");
                } catch (e) {}
            }
        }
        if (!http_request) {
            alert('Cannot create an XMLHTTP instance');
            return false;
        }
             
        httpstr = "city=" + city + "&lang=" + lang;
	        
        http_request.open('POST', url, false);
		http_request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
        http_request.send(httpstr);
        document.getElementById('metro').innerHTML = http_request.responseText;
return 1;
}  
