



var d = document; 
var gal_active_page = 1;








function getElement(i)
{
 var ob = d.all?d.all[i]:d.layers?d.layers[i]:d.getElementById(i);
 
 return ob; 
}








function ntd()
{
}








function galShowPage(id)
{
 if (gal_active_page!='') getElement('dgp'+gal_active_page).style.display = 'none'; 
 
 getElement('dgp'+id).style.display = 'block';
 
 gal_active_page = id;
}








function jsBack()
{
 history.back(-1);
}








function ResFlat(id,j)
{
 var czas  = new Date();
 
 width = 702;
 height = 630;
 
 url = 'resflat.php?id='+id+'&nlang='+j;
 
 rok   = czas.getYear();
 mies  = ( ( czas.getMonth() < 10 ) ? "0": "" ) + ( czas.getMonth() + 1 );
 dzien = ( ( czas.getDate()  < 10 ) ? "0": "" ) + ( czas.getDate() );
 godz  = ( ( czas.getHours() < 10 ) ? "0": "" ) + ( czas.getHours() );
 min   = ( ( czas.getMinutes() < 10 ) ? "0": "" ) + ( czas.getMinutes() );
 sek   = ( ( czas.getSeconds() < 10 ) ? "0": "" ) + ( czas.getSeconds() );

 aktdata=dzien+"_"+mies+"_"+rok+"_"+godz+"_"+min+"_"+sek;

 maxszer=window.screen.width;
 maxwys=window.screen.height;
 polx=Math.round( (maxszer-width)/2);
 poly=Math.round( (maxwys-height)/2);
 
 window.open(url,aktdata,"toolbar=no,scrollbars=auto,directories=no,top="+poly+",left="+polx+",menubar=no,width="+ width +",height="+ height +",resizable=no, statusbar=no");
}








function showFlat(id,j)
{
 var czas  = new Date();
 
 width = 920;
 height = 600;
 
 url = 'show_flat.php?flat_id='+id+'&nlang='+j;
 
 rok   = czas.getYear();
 mies  = ( ( czas.getMonth() < 10 ) ? "0": "" ) + ( czas.getMonth() + 1 );
 dzien = ( ( czas.getDate()  < 10 ) ? "0": "" ) + ( czas.getDate() );
 godz  = ( ( czas.getHours() < 10 ) ? "0": "" ) + ( czas.getHours() );
 min   = ( ( czas.getMinutes() < 10 ) ? "0": "" ) + ( czas.getMinutes() );
 sek   = ( ( czas.getSeconds() < 10 ) ? "0": "" ) + ( czas.getSeconds() );

 aktdata=dzien+"_"+mies+"_"+rok+"_"+godz+"_"+min+"_"+sek;

 maxszer=window.screen.width;
 maxwys=window.screen.height;
 polx=Math.round( (maxszer-width)/2);
 poly=Math.round( (maxwys-height)/2);
 
 window.open(url,aktdata,"toolbar=no,scrollbars=auto,directories=no,top="+poly+",left="+polx+",menubar=no,width="+ width +",height="+ height +",resizable=no, statusbar=no");
}








function showBuild(id)
{
 var czas  = new Date();
 
 width = 920;
 height = 600;
 
 url = 'show_build.php?build_id='+id;
 
 rok   = czas.getYear();
 mies  = ( ( czas.getMonth() < 10 ) ? "0": "" ) + ( czas.getMonth() + 1 );
 dzien = ( ( czas.getDate()  < 10 ) ? "0": "" ) + ( czas.getDate() );
 godz  = ( ( czas.getHours() < 10 ) ? "0": "" ) + ( czas.getHours() );
 min   = ( ( czas.getMinutes() < 10 ) ? "0": "" ) + ( czas.getMinutes() );
 sek   = ( ( czas.getSeconds() < 10 ) ? "0": "" ) + ( czas.getSeconds() );

 aktdata=dzien+"_"+mies+"_"+rok+"_"+godz+"_"+min+"_"+sek;

 maxszer=window.screen.width;
 maxwys=window.screen.height;
 polx=Math.round( (maxszer-width)/2);
 poly=Math.round( (maxwys-height)/2);
 
 window.open(url,aktdata,"toolbar=no,scrollbars=no,directories=no,top="+poly+",left="+polx+",menubar=no,width="+ width +",height="+ height +",resizable=no, statusbar=no");
}








function changeDIVcontent(div_id, content, doc)
{
 if (doc=='') doc=document;
 
 if(doc.layers)
 with(doc.layers[div_id+""].document)
  {
   write(content);
   close();
  }
 else
  {
   if(doc.getElementById)
    doc.getElementById(div_id+"").innerHTML=content;
   
   else
    if(doc.all)
     doc.all[div_id+""].innerHTML=content;
  }

}





function ShowS2F()
{
 getElement('s2fcont').style.display = 'block';
}



