
function potvrd(str){
        if(str== undefined) str = "Are you sure you want to delete this item?";
        var dotaz = confirm(str);
        if (!dotaz) return false;
        return true;
}
function formSubm() {
 document.forms.kateg.strojNavrat.value=1;
 document.forms.kateg.submit();
}

function EditPrd(ID) {
 if(ID==-7) {
  if(document.forms.prodejci.novyprodejce.value=='') {
   alert('název prodejce musí být vyplněn');
   return;
  }
 }
 document.forms.prodejci.IdPrd.value=ID;
 document.forms.prodejci.submit();
}
function SavePrd() {
 document.forms.Prd1.zmen.value=1;
 document.forms.Prd1.submit();
}

function ZrusPrd(ID) {
 document.forms.prodejci.IdPrd.value=ID;
 document.forms.prodejci.akce.value='DelPrd';
 document.forms.prodejci.submit();
}
function ZrusZn(ID) {
 document.forms.znacky.IdZn.value=ID;
 document.forms.znacky.akce.value='DelZn';
 document.forms.znacky.submit();
}
function strojDetail(IDstr) {
// alert(IDstr);
document.forms.kateg.vypisStroj.value=IDstr;
document.forms.kateg.id_stroj.value=IDstr;
document.forms.kateg.submit();
}

function strojDetailPoro() {
 document.forms.kateg.submit();
 return false;
 var poroTx='ee';
 var poroN=0;
 var namef;
 var fo=document.forms.kateg;  //.poro
   alert('Typ '+typeof(fo));
  Enumerat(fo);
//  Enumerat(document.forms.kateg);
 for (var i in fo.poro) {
  Enumerat(fo.poro[i]);

  if(fo[i]!=null) {
  if(fo[i].name!=undefined) {
//   namef=fo[i].name.toString();
   namef=fo[i].toString();
//    alert('1- FoI '+fo[i].name);
//  Enumerat(fo[i]);
//   alert('2-Typ '+typeof(fo[i].name));
//   namef=fo[i].name.toString();
//   alert('Name '+namef);

   if (namef.substr(0,4)=='poro') { // && i.checked
    poroTx=poroTx+', '+namef.substr(4)
   }
  }
  }
 }
 alert(poroTx);
}


function Enumerat(co) {  // jen pro DIAGNOSTIKU, vyhodit
  var tx
  var doc=co
//  doc=document.body.all.MapaTop
     tx=""
   for (var i in doc) {
//     if (doc[i]==null) {}// {tx=tx+"???"}
//     if (i.substr(0,6)=="xxborder") {}// {tx=tx+"???"}
     if (typeof(doc[i])=="function") {}// {tx=tx+"???"}
      else {
       tx=tx+i+'('+typeof (doc[i])+') -> '
//       tx=tx+doc[i]+String.fromCharCode(13)
       tx=tx+doc[i]+';    ';
     }
     if (tx.length<500) {}//{tx=tx+String.fromCharCode(13)}
     else {
     alert (tx)
     tx=""
     }
   }
alert (tx)
alert ('HOTOVO')
}


