if (self!=top) top.location=self.document.location;

menu=false;
over=false;
var glob;



function change_pic_nieruchomosc(id,pic,opis,global,xl)
	{
	document.getElementById(id).src=pic;
	document.getElementById('opis').innerHTML=opis;
	return glob=global;
	}
	

function showXL(glob,once)

{

if (glob==null) { glob=once; }

var loader = '<div style=\"opacity: .7; filter: alpha(opacity=70); width:100%; height:100%; position:absolute;z-index:1; background-color:black; \"><div style=\"position:relative;\"></div></div><div style=\"background-color : transparent; z-index: 20; width:100%; height:100%; position:absolute; text-align: center;\"><img onclick="hideXL();" style=\" border: 2px solid orange; margin-top:5%; cursor:pointer;\" id=\"zdjecie_xl\" src="/thumbnails/xl_'+glob+'.jpg"?></div></div>';
	document.getElementById('loader').innerHTML = loader;	

	}

function hideXL()
{
	document.getElementById('loader').innerHTML = '';
}

function change_pic(id,pic)
{
   document.getElementById(id).src=pic;
}


function m_over(div)
{
 //   document.getElementById('zzz').style.zIndex='0';
for(var i=0;i<divy_m.length;i++)
    document.getElementById(divy_m[i]).style.visibility='hidden';

for(var i=0;i<divy.length;i++)
    document.getElementById(divy[i]).style.visibility='hidden';

if(!eval(document.getElementById(div))) 
return;
if(eval(document.getElementById(div)))
    document.getElementById(div).style.visibility='visible';
//alert(div);
    menu=true;
    return;
}


function mm_over(div)
{
 //   document.getElementById('zzz').style.zIndex='0';
for(var i=0;i<divy_m.length;i++)
    document.getElementById(divy_m[i]).style.visibility='hidden';

if(!eval(document.getElementById(div)))
return;
if(eval(document.getElementById(div)))
    document.getElementById(div).style.visibility='visible';
//alert(div);
//    menu=true;
    return;
}



function out(div)
{

if(!eval(document.getElementById(div)))
return;

        if (menu==false && over==false)
        {
    
 document.getElementById(div).style.visibility='hidden';
        //document.getElementById('zzz').style.zIndex='3';
        }
}


function mapka()
{
//document.getElementById('zzz').style.zIndex='2';
}
function kupiem_out()
{

        
        menu=false;
        setTimeout('out(\'kupie_over_div\')',1000);
        return;
}

function sprzedamm_out()
{
 
        menu=false;
        setTimeout('out(\'sprzedam_over_div\')',1000);
        return;
}

function kontaktm_out()
{
 
        menu=false;
        setTimeout('out(\'kontakt_over_div\')',1000);
        return;
}

function kupie_out()
{

    over=false;
    setTimeout('out(\'kupie_over_div\')',1000);
    return;
}


function kontakt_out()
{

    over=false;
    setTimeout('out(\'kontakt_over_div\')',1000);
    return;
}

function o_out(div)
{
    over=false;
    setTimeout('out(' +'\'' +div +'\'' +')',1000);
    return;
}

function mo_out(div)
{
    over=false;
    setTimeout('out(' +'\'' +div +'\'' +')',1000);
    return;
}

function m_out(div)
{
    menu=false;

    setTimeout('out(' +'\'' +div +'\'' +')',1000);
    return;
}

function sprzedam_out()
{

    over=false;
    setTimeout('out(\'sprzedam_over_div\')',1000);
    return;
}


function pm_over(div)
{
    over=true;
    for(i=0;i<divy.length;i++)
        document.getElementById(divy[i]).style.visibility='hidden';
        document.getElementById(div).style.visibility='visible';
    return;
}

function pmm_over(div)
{
    over=true;
        document.getElementById(div).style.visibility='visible';
    return;
}


function sleep( seconds)
 { 
      if( seconds <= 0)
          return; 
 
     var ms      = seconds;
      var now     = new Date().getTime(); 
      var before  = now; 
 
     while( (now - before) < ms) 
          now = new Date().getTime(); 
 
}
function go()
{
    document.location.href='/mapa/index.php';
}


function openCenter(url,Wname,Wheight,Wwidth,features)
{
 Wleft=Math.floor((screen.width-Wwidth)/2);
 Wtop=Math.floor((screen.height-Wheight)/2);
 window.open(url,'_blank',"left="+Wleft+",top="+Wtop+",height="+Wheight+",width="+Wwidth+","+features);
return;
}