function newin(filename,winname,winwidth,winheight) {
  window.open(filename,winname,'width='+winwidth+',height='+winheight+',menubar=no,directories=no,toolbar=no,location=no,status=yes,scrollbar=yes,resizeble=yes');
}

function fActivate(ffield) {
  ffield.style.border="3px solid #C0C0C0";
}

function fDeactivate(ffield) {
  ffield.style.border="1px solid #C0C0C0";
}

function rozmery(mistnost) {
  var z=mistnost.sluzba.options[mistnost.sluzba.selectedIndex].value 
  var x=parseFloat(mistnost.Delka.value)
  var y=parseFloat(mistnost.Sirka.value)
  var v=parseFloat(mistnost.Vyska.value)
  vysledekn=((y*v*2)+(x*v*2))*z;

  if (mistnost.strop.checked) vysledekn=vysledekn+(y*x*z);
  mistnost.Vysledek.value=vysledekn;
}

function zmen(nazevobrazku, obrazekvelky,sirka,vyska) {
/*  eval("document."+nazevobrazku+".src=\"img/nacitam.gif\";");
  eval("document."+nazevobrazku+".width=\"400\";");
  eval("document."+nazevobrazku+".height=\"300\";");
*/
  eval("document."+nazevobrazku+".src=\""+obrazekvelky+"\";");
  eval("document."+nazevobrazku+".width=\""+sirka+"\";");
  eval("document."+nazevobrazku+".height=\""+vyska+"\";");
}

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

