function ZobraziOkno($SCRIPT_ID,$TypNemov,$OBR1,$OBR2,$OBR3,$OBR4,$WH1,$WH2,$WH3,$WH4,$COUNT,$CENA) {

   switch ($TypNemov) {
    case "Prodej":
      $nameFile = "logofirmy_prodej.gif";
      break;
    case "Pronájem":
      $nameFile = "logofirmy_pronajem.gif";
      break;
    case "Rezervováno":
      $nameFile = "logofirmy_rezervovano.gif";
      break;
    case "Koupě":
      $nameFile = "logofirmy_koupe.gif";
      break;
    case "Nájem":
      $nameFile = "logofirmy_najem.gif";
      break;
    case "Prodáno":
      $nameFile = "logofirmy_prodano.gif";
      break;
    case "Pronajato":
      $nameFile = "logofirmy_pronajato.gif";
      break;
  }

  $DATA=$SCRIPT_ID+"|"+$nameFile+"|"+$OBR1+"|"+$OBR2+"|"+$OBR3+"|"+$OBR4+"|"+$WH1+"|"+$WH2+"|"+$WH3+"|"+$WH4+"|"+$COUNT+"|"+$CENA;

  window.open('./loadokno.php?DATA='+$DATA,'','width=610,height=375,top=100,left=20,scrollbars=yes,resizable=yes,toolbar=yes');
}

function moveSaturn(which, start, finish, step, speed){  
  if (ie4 || ns4){
    if (start < finish){ 
      eval(layerRef + '["' + which +'"]' + styleRef + '.top = start+20');
      eval(layerRef + '["' + which +'"]' + styleRef + '.left = start');
      start=start+step; 
      setTimeout("moveSaturn('"+which+"',"+start+","+finish+","+step+","+speed+")",speed);
    }     
  }
}

function on(iname){
	if (flg)
	 document [iname].src = eval(iname + "b.src");
}

function off(iname){
	if (flg)
	 document [iname].src = eval(iname + ".src");
}

function cas(){
    var now = new Date()
    var hours = now.getHours()
    var minutes = now.getMinutes()
    var seconds = now.getSeconds()
    var timeValue = "" + ((hours > 12) ? hours - 12 : hours)
    timeValue  += ((minutes < 10) ? ":0" : ":") + minutes
    timeValue  += ((seconds < 10) ? ":0" : ":") + seconds
    timeValue  += (hours >= 12) ? " P.M." : " A.M."
    
  popis.innerHTML = timeValue
  timerID = setTimeout("cas()",1000)
  timerRunning = true
}

