// ZMENA TLACITEK
function Tlacitko (zapnuty, vypnuty, sirka, vyska) 
{ 
    this.zapniObr     = new Image (sirka, vyska);
    this.zapniObr.src = zapnuty;
    this.vypniObr     = new Image (sirka, vyska);
    this.vypniObr.src = vypnuty; 
}

function Zmena (zapnuto, obrazek) 
{   
    if ( zapnuto )
      this.document[obrazek].src = Tlacitko[obrazek].zapniObr.src;
    else
      this.document[obrazek].src = Tlacitko[obrazek].vypniObr.src; 
}


Tlacitko["refleft"] = new Tlacitko ("images/reflist-left-over.gif", "images/reflist-left.gif", 12, 64 );
Tlacitko["refright"] = new Tlacitko ("images/reflist-right-over.gif", "images/reflist-right.gif", 12, 64 );



// popup obrazek
function PopUpImg(imgsrc,xx,yy){
  xxw=xx+40; yyh=yy+30;
  NewWin= new Array()
  wx=",width="+xxw+",height="+yyh  
  
  NewWin[i] = 
   window.open("","galery"+i,"left=15,top=15,scrollbars,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes"+wx)
  NewWin[i].document.open()
  imgsrc='"'+imgsrc+'"'
    NewWin[i].document.writeln(
  "<title>KONSIT.CZ - " +imgsrc+ " ("+xx+","+yy+")</title><body bgcolor='#DCE7EF'><div align='center' style='margin-top:15px; margin-bottom: 5px;'><a href='javascript: self.close()'><img src="+imgsrc+" width="+xx+" height="+yy+" border=0></a></div>")
  NewWin[i].document.close() 
  i++
}
i=0


// popup obrazek reference
function PopUpImgRef(id,rid,constr,path)
{
  url=path+"reference-img.php?id="+id+"&rid="+rid+"&constr="+constr;
  NewWin = window.open(url,"galery","left=40,top=40,scrollbars=no,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no,width=650,height=500")
  NewWin.focus(); 
}


 // overeni pred vykonanim nejake akce
function CheckAction(msg)
{ 
  if(!confirm(msg)) return false;
  else return true;  
}





function AddKontakt2()
{
  document.getElementById('block2').style.display='block'; 
  document.getElementById('p2').style.display='block'; 
  document.getElementById('p1').style.display='none'; 
}

function AddKontakt3()
{
  document.getElementById('block3').style.display='block'; 
  document.getElementById('p3').style.display='block';   
  document.getElementById('p2').style.display='none'; 
}

function AddKontakt4()
{
  document.getElementById('block4').style.display='block'; 
  document.getElementById('p4').style.display='block'; 
  document.getElementById('p3').style.display='none'; 
}

function AddKontakt5()
{
  document.getElementById('block5').style.display='block'; 
  document.getElementById('p4').style.display='none'; 
}


function ViewHelp()
{
  //window.moveTo(0,0);
  window.open("ref-help.php","help","left=40,top=40,scrollbars=no,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no,width=430,height=520");
  
}

function FixFlashInIE()
{
    // (c) David Grudl aka -dgx-
    //
    // more info: http://www.dgx.cz/knowhow/eolas-workaround/
    
    
    var objects = document.getElementsByTagName("object");
    
    for (var i=0; i<objects.length; i++)
        objects[i].outerHTML = objects[i].outerHTML;  
} 
