function tx(text)
{
	self.status=text;
}

self.defaultStatus="PPU BUWMAT Sp. z o.o."

var zak_akt='zh1';

function bgc_zak(w,stan)
{
  var a = document.all.item(w).style;
  if(document.all.item(w).className=="zaklna")	
  {	
	if(stan)
	{
	 a.color='#ff0000';
	} 
	else
	{
	 a.color='#ffffff';
	}
  }	 
}

function change_z(w,poz,il)
{
	
for(i=1;i<il;i++)
	{
	 document.all.item('zakh'+i).style.zIndex=18;
	 document.all.item('zh'+i).className='zaklna';
	 document.all.item('w'+i).style.visibility='hidden';
	}

 document.all.item('zakh'+w.substr(2)).style.zIndex=20;
 document.all.item('zakh_c').style.posLeft=poz;
 document.all.item('w'+w.substr(2)).style.zIndex=30;
 document.all.item('w'+w.substr(2)).style.visibility='visible';
 document.all.item(w).className='zakl';
 document.all.item(zak_akt).style.backgroundColor='#656499';
 document.all.item(zak_akt).style.color='#ffffff';
 document.all.item(w).style.backgroundColor='#ff0000';
 document.all.item(w).style.color='#ffffff';
 zak_akt=w;
 sozak.loop = 1
 sozak.volume=-1000
 sozak.src = sozak.src
}


function chmenu(m,st)
{
 if((m=='m1')||(m=='m2')||(m=='m3'))
 {
  if(st)
  {
   document.all.item(m).className="menuupa"  
       
   som.loop = 1
   som.volume=-1000
   som.src = som.src
  }
  else
  {
   document.all.item(m).className="menua"
  }
 }
 else
 {
  if(st)
  {
   document.all.item(m).className="menuup"
   sosm.loop = 1
   sosm.volume=-1000
   sosm.src = sosm.src
  }
  else
  {
   document.all.item(m).className="menu"
  }
 }

}

function chsmenu(m,st)
{
 if(st)
 {
  document.all.item(m).className="smup"
  sosm.loop = 1
  sosm.volume=-1000
  sosm.src = sosm.src
 }
 else
 {
  document.all.item(m).className="smenu"
 }

}

function sms(m,z)
{
 
 if( (((m=='m1')||(m=='m2')||(m=='m3'))&&(document.all.item('s'+m).style.visibility!='visible'))||((m=='m4')||(m=='m5')||(m=='m6')) )
 {
  for(i=1;i<7;i++)
  {
   chmenu('m'+i,0)
   if(i<4) smh('sm'+i)
  }
  chmenu(m,1)
    
  if(z)
  {
   document.all.item('s'+m+'_h').style.visibility='visible'
   //document.all.item('s'+m+'_al').style.visibility='visible'
   document.all.item('s'+m).style.visibility='visible'
  }
 }
 
}

function smh(m)
{
 document.all.item(m).style.visibility='hidden'
 document.all.item(m+'_h').style.visibility='hidden'
 //document.all.item(m+'_al').style.visibility='hidden'
}

function hideall()
{
  for(i=1;i<7;i++)
  {
   chmenu('m'+i,0)
   if(i<4) smh('sm'+i)
  }
  
}

function czas() 
{
  var today;
  var cz;
  today = new Date();
  cz=today.toLocaleString();
  zegar.innerHTML =cz.substr(cz.length-8);
  dmy.innerHTML = cz.substring(0,cz.length-9); 
  
  setTimeout("czas()", 1000) 
}

var nowe
function opW(source, name, tl, w, h)
{
	//nowe=window.open(source,name,'location=no,resizable=no,status=no'+'titlebar=no,toolbar=no,width='+w+',pageXOffset=0,height='+h+',pageYOffset=0');
	//nowe.document.title=tl;
	var params="location=no,resizable=no,status=no,width="+w+",height="+h
	nowe=window.open("",name,params)
	nowe.document.write("<HTML><HEAD><TITLE>"+tl+"</TITLE></HEAD><BODY bgcolor=#F2F0CD topmargin=0 leftmargin=0 background=images/loadimg.gif style='background-repeat: no-repeat; background-position: center bottom;'>")
	nowe.document.write("<table border=0 cellspacing=0 cellpadding=0><tr><td width=100%>")
	nowe.document.write("<img border=0 src="+source+">");
	nowe.document.write("</td></tr></table></BODY></HTML>")
	nowe.document.close()
}


var nowe2
function opWscroll(source, name, tl, w, h)
{
	
	var params="location=no,resizable=no,status=no,width="+w+",height="+h+",scrollbars=yes"
	nowe2=window.open("",name,params)
	nowe2.document.write("<HTML><HEAD><TITLE>"+tl+"</TITLE></HEAD><BODY bgcolor=#F2F0CD topmargin=0 leftmargin=0 background=galeria/loadimg.gif style='background-repeat: no-repeat; background-position: center bottom;'>")
	nowe2.document.write("<table border=0 cellspacing=0 cellpadding=0><tr><td width=100%>")
	nowe2.document.write("<img border=0 src="+source+">");
	nowe2.document.write("</td></tr></table></BODY></HTML>")
	nowe2.document.close()
}


function tzoom()
{
	self.status='Kliknij zdjęcie aby zobaczyć powiększenie';
}

function blank()
{
	self.status='';
}

function mapo(t,o)
{
 if(t==0)
 {
 document.all.item(o).src="images/punkt.gif"
 mapopis.className="f11c"
 mapopis.innerText='Wskaż czerwony punkt na mapie aby zobaczyć nazwę inwestycji\nlub\nkliknij punkt aby przejść do szczegółów'
 } 
 else
 {
 document.all.item(o).src="images/punkt2.gif"
 mapopis.className="f13c"
 mapopis.innerText=t
 }
}
