//////////////////////////////////////////////////////////


function showMessage(string,nazwa) {
	document.getElementById(nazwa).innerHTML = string;
}

/******************************************************************/


function handleHttpResponseMapa() {

if (http.readyState == 1) {
    showMessage('Please wait...','mapa_kontakt');
  }

  else if (http.readyState == 4) {
 
 results = http.responseText;  
     document.getElementById('mapa_kontakt').innerHTML = results;
  isWorking = false;

 }

}


function UpdateMapa(link)
{

if (!isWorking && http) {

http.open("GET", link, true);
    http.onreadystatechange = handleHttpResponseMapa;

isWorking = true;
    http.send(null);
}
}


//////////////////////////////////////////// WSPOLNE/////////////////////////////////////////////
function getHTTPObject() {

  var xmlhttp;

  /*@cc_on

  @if (@_jscript_version >= 5)

    try {

      xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");

    } catch (e) {

      try {

        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");

      } catch (E) {

        xmlhttp = false;

      }

    }

  @else

  xmlhttp = false;

  @end @*/

  if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {

    try {

      xmlhttp = new XMLHttpRequest();

    } catch (e) {

      xmlhttp = false;

    }

  }

  return xmlhttp;

}

var http = getHTTPObject(); // We create the HTTP Object
var isWorking = false;


