function newWindow(mypage, title, myname, w, h, scroll, menu, resize, status, toolbar, location) {
	var winl = (screen.width-w)/2;
	var wint = ((screen.height-h)/2);
	h += 40;
	var winprops = 'width='+w+',height='+h+',';
	winprops += 'top='+wint+',left='+winl+',';
	winprops += 'scrollbars='+scroll+',';
	winprops += 'menubar='+menu+',';
	winprops += 'resizable='+resize+',';
	winprops += 'status='+status+',';
	winprops += 'toolbar='+toolbar+',';
	winprops += 'location='+location;
	win = window.open(mypage, myname, winprops);
	win.document.write('<head>');
	win.document.write('<title>' + title + '</title>');
	win.document.write('</head>');
	win.document.write('<body "style=background:#fff">');
	win.document.write('<div style="font-family:Verdana; font-size:11px; color:#666; font-weight:bold; margin:15px 0 10px 0; text-align:center">' + title + '</div>');
	win.document.write('<a href="#" title="Klepnutím lze obrázek zavřít." onclick="window.close()"><img src="' + mypage + '" style="border:0px" ></img></a>');
	win.document.write('</body>');
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

//var ajaxRequest;


                          var company_request;
                          var station_request;

function initAJAX1(request) {

  // Opera 8.0+, Firefox, Safari  
  try {
    station_request = new XMLHttpRequest();
  } catch (e) {
    // Internet Explorer Browsers
    try {
      station_request = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        station_request = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (e){
        // Something went wrong
        alert("Your browser broke!");
      }
    }
  }

}

function initAJAX2(request) {

  // Opera 8.0+, Firefox, Safari  
  try {
    company_request = new XMLHttpRequest();
  } catch (e) {
    // Internet Explorer Browsers
    try {
      company_request = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        company_request = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (e){
        // Something went wrong
        alert("Your browser broke!");
      }
    }
  }

}

function executeAJAX(request, script, params) {
  request.open("GET", script + params, true);
  request.send(null);
}