function setPointer(theRow, thePointerColor)
{
    if (thePointerColor == '' || typeof(theRow.style) == 'undefined') {
        return false;
    }
    if (typeof(document.getElementsByTagName) != 'undefined') {
        var theCells = theRow.getElementsByTagName('td');
    }
    else if (typeof(theRow.cells) != 'undefined') {
        var theCells = theRow.cells;
    }
    else {
        return false;
    }

    var rowCellsCnt  = theCells.length;
    for (var c = 0; c < rowCellsCnt; c++) {
        theCells[c].style.backgroundColor = thePointerColor;
    }
    return true;
} // end of the 'setPointer()' function 
function opravdu(co)
{   
 if(!confirm("Opravdu chcete "+co+" ?")) return false;
 return true
}

function changeOptColor(selectik,paletka) 
{
  var optColor = '';
  var i = selectik.selectedIndex;
  if (i > 0){
    optColor = selectik[i].value;
    optColor = '#'+optColor;
    document.getElementById(paletka).style.backgroundColor = optColor;
  }
  else{document.getElementById(paletka).style.backgroundColor = 'transparent';}
}


function smazat(pole)
{   
pole.value="";
return true
}

function open_win()
{
window.open("", "pravidla", "location=no,status=no,toolbar=no,menubar=no,width=650,height=550,resizable=1,scrollbars=yes")
}


function open_rez()
{
window.open("pravidla.html", "rezervace", "location=no,status=no,toolbar=no,menubar=no,width=650,height=550,resizable=0,scrollbars=yes")

}
function open_foto(id,w,h)
{
window.open("", "foto"+id, "location=no,status=no,toolbar=no,menubar=no,width="+w+",height="+h+",resizable=0")
}


function nastavVelikosti(obj)
{
var pani = document.getElementById("vel-p"); 
var damy = document.getElementById("vel-d");
if(obj.value=="2")
 {
 damy.style.display="block";
 pani.style.display="none";
 } 
 else
 {
 damy.style.display="none";
 pani.style.display="block";
 
 }


}

function velShow()
{   
 alert("Nejprve prosím zvolte velikost.") ;
 return true;
}


function zpracujNakup()
{

if  (document.getElementById('velsel').value=="-1")
  {
  velShow();
  }
else {
    document.getElementById('frmToCart').submit();
     }
return false;
}




