/* Создание нового объекта XMLHttpRequest для общения с Web-сервером */
var xmlHttp = false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
try {
  xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
  try {
    xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (e2) {
    xmlHttp = false;
  }
}
@end @*/

if (!xmlHttp && typeof XMLHttpRequest != 'undefined') {
  xmlHttp = new XMLHttpRequest();
}




function callServer1() {
  var city1 = document.getElementById("city1").value;
  var url1 = "lib/getrazdel.php?city1=" + escape(city1);
  xmlHttp.open("GET", url1, true);
  xmlHttp.onreadystatechange = updatePage1;
  xmlHttp.send(null);
}

function updatePage1() {
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") {
    var response1 = xmlHttp.responseText;
document.getElementById('razdel').innerHTML = response1;
  }
}



function openIt() {
  currEl = event.srcElement;
  if (currEl.className == "subhead") {
    newId = currEl.id + "vis" 
     imgId = currEl.id
      showIt = document.all(newId) ;
     if (showIt.style.display == "none") {
       showIt.style.display = "" ;
        document.images(imgId).src = 'img/minus.gif' 
       } else {
       showIt.style.display = "none" ;
        document.images(imgId).src = 'img/plus.gif' 
      }
   }
}
function OvrCellNav0(src)
{ 
src.style.cursor = 'hand';
src.style.backgroundColor = '#F0F0F0';
if(event.srcElement.tagName=='TD') {window.status=src.children.tags('A')[0];
}
	return true;
}
function OutCellNav0(src)
{ 
src.style.cursor = 'default';
src.style.backgroundColor = '';
window.status='';
	return true;
}
function OCN(src)
{
src.style.cursor = 'hand';
src.style.backgroundColor = '#F0F0F0';
window.status='';
if(event.srcElement.tagName=='TD') {window.status=src.children.tags('A')[0];}
	return true;
}
function OCN1(src)
{ 
src.style.cursor = 'hand';
src.style.backgroundColor = '';
window.status='';
	return true;
if(event.srcElement.tagName=='TD') {window.status=src.children.tags('A')[0];}
}

function o_w(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable)
{
  toolbar_str = toolbar ? 'yes' : 'no';
  menubar_str = menubar ? 'yes' : 'no';
  statusbar_str = statusbar ? 'yes' : 'no';
  scrollbar_str = scrollbar ? 'yes' : 'no';
  resizable_str = resizable ? 'yes' : 'no';
  window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
}
