
function mapa_warstwa(url)
{


//var Y1=document.body.scrollTop; 
var Y1=document.documentElement.scrollTop;

var X2=document.body.scrollWidth;
var Y2=document.body.scrollHeight;


//alert(X2);
//alert(Y2); 
//alert(Y1);



//alert(S_width);
//alert(S_height); 
document.getElementById('odp').style.display='block';
document.getElementById('odp_white').style.display='block';

document.getElementById('odp').style.width=X2 +'px';
document.getElementById('odp').style.height=Y2 + 'px';
document.getElementById('odp_white').style.top=Y1 + 'px';




makeRequest(url, 'odp_white', this);



//var W1=(X2-700)/2;
//alert (W1);
///document.getElementById('odp_white').style.left=W1 + 'px';

}


function warstwa_on(war)
{
document.getElementById(war).style.display="block";
}

function warstwa_off(war)
{
document.getElementById(war).style.display="none";
}


  
function popup(url){
var Win = window.open(url, 'displayWindow_popup' ,'width=100,height=100,top=100,left=250,resizable=no,scrollbars=yes,menubar=no');
}

  
function popup2(url){
var Win = window.open(url, 'displayWindow_kontakt' ,'width=670,height=390,top=200,left=250,resizable=no,scrollbars=yes,menubar=no');
}

function window_size()
{
var W=document.getElementById('tab1').offsetWidth;
var H=document.getElementById('tab1').offsetHeight;
H=H+30;
W=W+50;
var H1=H+50;
var W1=W+30;

if(screen.width<W1)
{
W=screen.width-30;
}

if(screen.height<H1)
{
H=screen.height-30;
}


window.resizeTo(W,H);
}



    var http_request = false;

    function makeRequest(url, div, e1) {
	 


        http_request = false;

        if (window.XMLHttpRequest) { // Mozilla, Safari,...
            http_request = new XMLHttpRequest();
            if (http_request.overrideMimeType) {
                http_request.overrideMimeType('text/xml');
                // Przeczytaj o tym wierszu poniżej
            }
        } else if (window.ActiveXObject) { // IE
            try {
                http_request = new ActiveXObject("Msxml2.XMLHTTP");
            } catch (e) {
                try {
                    http_request = new ActiveXObject("Microsoft.XMLHTTP");
                } catch (e) {}
            }
        }

        if (!http_request) {
           document.getElementById(div).innerHTML="Poddaję się :( Nie mogę stworzyć instancji obiektu XMLHTTP')";
            return false;
        }
        http_request.onreadystatechange = function() { wymiana2(http_request, div); };
        http_request.open('GET', url, true);
        http_request.send(null);

    }

	 
	  function wymiana2(req, div)	
{

        if (http_request.readyState == 4) {
            if (http_request.status == 200) {
document.getElementById(div).innerHTML=req.responseText;
            } else {
                document.getElementById(div).innerHTML="Wystąpił problem z zapytaniem.";
            }


}
}
	 
    function alertContents(http_request) {

        if (http_request.readyState == 4) {
            if (http_request.status == 200) {
                alert(http_request.responseText);
            } else {
                alert('Wystąpił problem z zapytaniem.');
            }
        }

			
	
    }
	 


function wymiana(div)	
{
document.getElementById(div).innerHTML="a teraz już jest";
}	


function close_div()
{
document.getElementById('odp_white').innerHTML="";

//document.getElementById('odp').innerHTML="";
//document.getElementById('odp').style.width='0';
//document.getElementById('odp').style.height='0';
document.getElementById('odp_white').style.display='none';
document.getElementById('odp').style.display='none';
}
