function reKlassic(o)
{ f = getFline(o.value);
  i = document.fm.elements["pOption[]"][f].selectedIndex;
  c = document.fm.elements["pOption3[]"][f].selectedIndex;
  if (i>0)
  { --i;
    if (c==1)
    { document.fm.elements["pNum[]"][f].value = pNums[i];
	document.fm.elements["pName[]"][f].value = pNames[i];
	document.fm.elements["pPrice[]"][f].value = pPrices[i]; }
    else
    { document.fm.elements["pNum[]"][f].value = dNums[i];
	document.fm.elements["pName[]"][f].value = dNames[i];
	document.fm.elements["pPrice[]"][f].value = dPrices[i]; } } }
function reKolor(o)
{ i = o.selectedIndex;
  f = getFline(o.value);
  if (f==1) {ns="";} else {ns="|"+f;}
  var op = document.fm.elements["pOption2[]"][f];
  var ox = document.fm.elements["pOption3[]"][f];
  op.length = 1; var c = 0;
  var ac = colors[i];
  for (i=0; i < (ac.length); i++)
  { if (ac[i].indexOf(".") == -1)
    { c = op.length; op.length = (c+1);
	var nOpt = new Option(ac[i]);
	op.options[c] = nOpt;
	op.options[c].value = ac[i]+ns; } }
  if (i>0)
  { --i;
    if (ox.selectedIndex==1)
    { document.fm.elements["pNum[]"][f].value = pNums[i];
	document.fm.elements["pName[]"][f].value = pNames[i];
	document.fm.elements["pPrice[]"][f].value = pPrices[i]; }
    else if (ox.selectedIndex>1)
    { document.fm.elements["pNum[]"][f].value = dNums[i];
	document.fm.elements["pName[]"][f].value = dNames[i];
	document.fm.elements["pPrice[]"][f].value = dPrices[i]; } }
  document.fm.elements["pOption2[]"][f].selectedIndex = 0;
  document.fm.elements["pOption3[]"][f].selectedIndex = 0; }

