function AddFavorite(linkObj,addUrl,addTitle)
{
  if (document.all && !window.opera)
  {
    window.external.AddFavorite(addUrl,addTitle);
    return false;
  }
  else if (window.opera && window.print)
  {
    linkObj.title = addTitle;
    return true;
  }
  else if ((typeof window.sidebar == 'object') && (typeof window.sidebar.addPanel == 'function'))
  {
    if (window.confirm('Přidat oblíbenou stránku jako nový panel?'))
    {
      window.sidebar.addPanel(addTitle,addUrl,'');
      return false;
    }
  }
  window.alert('Po potvrzení stiskněte CTRL-D,\nstránka bude přidána k vašim oblíbeným odkazům.');
  return false;
}

lepenka_v_kyblu_seda_3kg = 359.04
lepenka_v_kyblu_seda_7kg = 577.15
lepenka_v_kyblu_seda_15kg = 1211.81
lepenka_v_kyblu_seda_25kg = 2005.33
lepenka_v_kyblu_seda_pytel_25kg = 1891.27
tesnici_pas_120mm_5m = 410.00
tesnici_pas_120mm_10m = 760.00
tesnici_pas_120mm_50m = 3500.00
tesnici_pas_150mm_50m = 4745.00
tesnici_pas_250mm_5m = 760.00
tesnici_pas_250mm_25m = 3500.00
roh_140mm_vnitrni = 145.00
roh_140mm_vnejsi = 145.00
pruzny_pruchod_120mm = 92.00
pruzny_pruchod_425mm = 445.00
vodotes_5kg = 132.27
vodotes_25kg = 557.20
strechusprav_7kg = 927.50
strechusprav_14kg = 1847.57
strechusprav_25kg = 3131.89
strechotex_0_2_50 = 191.53
strechotex_1_10 = 189.74
strechotex_1_50 = 845.00
sprchova_sada = 747.93
stavlep_1l = 165.83
stavlep_5l = 802.87
stavlep_10l = 1507.56
spravbeton_5kg = 118.84
spravbeton_25kg = 500.70
spravbetonTH_5kg = 118.84
spravbetonTH_25kg = 500.70
fofrbeton_5kg = 140.93
fofrbeton_25kg = 623.70
stenusprav_1_8kg = 56.23
stenusprav_9kg = 232.82
stenusprav_18kg = 366.11
drztofest_2kg = 79.70
drztofest_5kg = 156.17
drztofest_25kg = 704.70
drztofestTH_2kg = 79.70
drztofestTH_5kg = 156.17
drztofestTH_25kg = 704.70
ochrana_1kg = 272.20
ochrana_5kg = 1327.10
ochrana_20kg = 5263.10
odstran_1kg = 434.30
odstran_5kg = 2117.60
odstran_20kg = 8398.60
deska_6_1300 = 339.49
deska_10_1300 = 355.35
deska_10_2600 = 710.70
deska_20_1300 = 389.55
deska_20_2600 = 779.10
deska_30_1300 = 435.18
deska_30_2600 = 870.37
deska_40_1300 = 476.39
deska_40_2600 = 952.77
deska_50_1300 = 529.04
deska_50_2600 = 1058.09
spojka_20mm = 25.75
spojka_30mm = 29.70
spojka_40mm = 31.67
spojka_50mm = 33.64
zakryt_150x150_1300 = 321.78
zakryt_150x150_2600 = 643.57
zakryt_200x200_1300 = 460.80
zakryt_200x200_2600 = 921.59
zakryt_200x400_1300 = 562.61
zakryt_200x400_2600 = 1125.21
zakryt_300x300_1300 = 562.61
zakryt_300x300_2600 = 1125.21
univerzal_silikon = 79.10
akrylovy_tmel = 35.60
bila_barva = 308.46
koupelizo_4kg = 392.29
koupelizo_8kg = 763.82
nenasavej_1l = 168.20
nenasavej_5l = 818.23
pustohned = 94.48
pustohnedpet = 83.20
pustohned_5l = 427.14
dlazbulep_5kg = 101.32
dlazbulep_25kg = 314.90
vysuszed = 390.89
hassanspric = 248.44
hassanjadro = 485.25
hassanstuk = 369.59
deska = 2100.00
deska120 = 3024.40
deskasifon = 3360.50
deska120sifon = 4201.00
profil = 254.68
profil_L = 259.53
profilm = 773.57
profilm_L = 787.39
balkonspojka = 8.66
balkonspojkam = 18.48
balkonkoncovka = 37.67
balkonkoncovkam = 60.27
barvanabeton4kg = 666.00
barvanabeton8kg = 1212.00
barvic = 65.00
ttmelkartuse = 167.00
ttmel1kg = 385.00
ttmel5kg = 1900.00
tmrizka = 29.00
tzasyp5kg = 37.45
tzasyp25kg = 143.99
tpaska10_15 = 784.00
tpaska150_2 = 284.00
tpaska150_20 = 2580.00
tpaska20_15 = 735.00
tpaska20_25 = 1127.85
tpaska23_18 = 990.00
nabazeny_sada15kg = 1453.51
nabazeny_sada25kg = 2354.90
sparovacka5kg = 104.00
sparovacka5kgbahama = 110.75
sparovacka5kgjasmin = 146.30
sparovacka5kgkaramel = 146.30
sparovacka20kg = 332.20
sparovacka20kgbahama = 341.26
benatskystuk3kg = 999.00
stpas50 = 550.00
stpas100 = 1100.00
sanacnikoncentrat = 839.50
tekutadlazba = 2412.89
vsyp = 263.50
tesnicifolie10 = 895.12
tesnicifolie50 = 4125.00
namazse = 22.60
namazsek = 791.00
obkladolep1_5 = 105.00
obkladolep4_5 = 299.00
sparovacka_na_balkony = 149.00
semtes = 99
lepenka_v_prasku3kg = 348
lepenka_v_prasku18kg = 2099

function soucet(){
dohromady = Math.round(100*(
              (document.form1.id_1.value * lepenka_v_kyblu_seda_3kg) +
              (document.form1.id_2.value * lepenka_v_kyblu_seda_7kg) +
              (document.form1.id_3.value * lepenka_v_kyblu_seda_15kg) +
              (document.form1.id_4.value * lepenka_v_kyblu_seda_25kg) +
              (document.form1.id_5.value * lepenka_v_kyblu_seda_pytel_25kg) +
              (document.form1.id_65.value * tesnici_pas_120mm_5m) +
              (document.form1.id_6.value * tesnici_pas_120mm_10m) +
              (document.form1.id_7.value * tesnici_pas_120mm_50m) +
              (document.form1.id_8.value * tesnici_pas_150mm_50m) +
              (document.form1.id_9.value * tesnici_pas_250mm_5m) +
              (document.form1.id_10.value * tesnici_pas_250mm_25m) +
              (document.form1.id_11.value * roh_140mm_vnitrni) +
              (document.form1.id_12.value * roh_140mm_vnejsi) +
              (document.form1.id_13.value * pruzny_pruchod_120mm) +
              (document.form1.id_14.value * pruzny_pruchod_425mm) +
              (document.form1.id_15.value * vodotes_5kg) +
              (document.form1.id_16.value * vodotes_25kg) +
              (document.form1.id_17.value * strechusprav_7kg) +
              (document.form1.id_18.value * strechusprav_14kg) +
              (document.form1.id_20.value * strechotex_0_2_50) +
              (document.form1.id_21.value * strechotex_1_10) +
              (document.form1.id_22.value * strechotex_1_50) +
              (document.form1.id_23.value * sprchova_sada) +
              (document.form1.id_4005.value * stavlep_1l) +
              (document.form1.id_4043.value * stavlep_5l) +
              (document.form1.id_4067.value * stavlep_10l) +
              (document.form1.id_4524.value * spravbeton_5kg) +
              (document.form1.id_4562.value * spravbeton_25kg) +
              (document.form1.id_4623.value * spravbetonTH_5kg) +
              (document.form1.id_4661.value * spravbetonTH_25kg) +
              (document.form1.id_4920.value * fofrbeton_5kg) +
              (document.form1.id_4320.value * stenusprav_1_8kg) +
              (document.form1.id_4340.value * stenusprav_9kg) +
              (document.form1.id_4364.value * stenusprav_18kg) +
              (document.form1.id_5019.value * drztofest_2kg) +
              (document.form1.id_5002.value * drztofest_5kg) +
              (document.form1.id_5026.value * drztofest_25kg) +
              (document.form1.id_5057.value * drztofestTH_2kg) +
              (document.form1.id_5040.value * drztofestTH_5kg) +
              (document.form1.id_5064.value * drztofestTH_25kg) +
              (document.form1.id_3503.value * ochrana_1kg) +
              (document.form1.id_3527.value * ochrana_5kg) +
              (document.form1.id_3602.value * odstran_1kg) +
              (document.form1.id_3626.value * odstran_5kg) +
              (document.form1.d_6_1300.value * deska_6_1300) +
              (document.form1.d_10_1300.value * deska_10_1300) +
              (document.form1.d_10_2600.value * deska_10_2600) +
              (document.form1.d_20_1300.value * deska_20_1300) +
              (document.form1.d_20_2600.value * deska_20_2600) +
              (document.form1.d_30_1300.value * deska_30_1300) +
              (document.form1.d_30_2600.value * deska_30_2600) +
              (document.form1.d_40_1300.value * deska_40_1300) +
              (document.form1.d_40_2600.value * deska_40_2600) +
              (document.form1.d_50_1300.value * deska_50_1300) +
              (document.form1.d_50_2600.value * deska_50_2600) +
              (document.form1.s_20mm.value * spojka_20mm) +
              (document.form1.s_30mm.value * spojka_30mm) +
              (document.form1.s_40mm.value * spojka_40mm) +
              (document.form1.s_50mm.value * spojka_50mm) +
              (document.form1.id_7709.value * zakryt_150x150_1300) +
              (document.form1.id_7600.value * zakryt_150x150_2600) +
              (document.form1.id_7723.value * zakryt_200x200_1300) +
              (document.form1.id_7624.value * zakryt_200x200_2600) +
              (document.form1.id_7761.value * zakryt_200x400_1300) +
              (document.form1.id_7662.value * zakryt_200x400_2600) +
              (document.form1.id_7747.value * zakryt_300x300_1300) +
              (document.form1.id_7648.value * zakryt_300x300_2600) +
              (document.form1.id_4708.value * bila_barva) +
              (document.form1.id_24.value * koupelizo_4kg) +
              (document.form1.id_25.value * koupelizo_8kg) +
              (document.form1.id_26.value * nenasavej_1l) +
              (document.form1.id_27.value * nenasavej_5l) +
              (document.form1.id_3701.value * pustohned) +
              (document.form1.id_10006.value * dlazbulep_5kg) +
              (document.form1.id_10020.value * dlazbulep_25kg) +
              (document.form1.id_28.value * vysuszed) +
              (document.form1.id_3091.value * hassanspric) +
              (document.form1.id_3145.value * hassanjadro) +
              (document.form1.id_3190.value * hassanstuk) +
              (document.form1.id_7808.value * deska) +
              (document.form1.id_7860.value * deskasifon) +
              (document.form1.id_7822.value * deska120) +
              (document.form1.id_7884.value * deska120sifon) +
              (document.form1.id_7907.value * profil) +
              (document.form1.id_7952.value * profil_L) +
              (document.form1.id_7921.value * profil) +
              (document.form1.id_7976.value * profil_L) +
              (document.form1.id_7914.value * profil) +
              (document.form1.id_7969.value * profil_L) +
              (document.form1.id_7938.value * profilm) +
              (document.form1.id_7983.value * profilm_L) +
              (document.form1.id_8003.value * balkonspojka) +
              (document.form1.id_8010.value * balkonspojka) +
              (document.form1.id_8027.value * balkonspojka) +
              (document.form1.id_8034.value * balkonspojkam) +
              (document.form1.id_8058.value * balkonkoncovka) +
              (document.form1.id_8065.value * balkonkoncovka) +
              (document.form1.id_8072.value * balkonkoncovka) +
              (document.form1.id_8089.value * balkonkoncovkam)+
              (document.form1.id_3787.value * pustohnedpet) +
              (document.form1.id_3725.value * pustohned_5l) +
              (document.form1.id_4760.value * barvanabeton4kg) +
              (document.form1.id_4784.value * barvanabeton8kg) +
              (document.form1.id_4876.value * barvic) +
              (document.form1.id_4807.value * barvic) +
              (document.form1.id_4845.value * barvic) +
              (document.form1.id_4814.value * barvic) +
              (document.form1.id_4852.value * barvic) +
              (document.form1.id_4838.value * barvic) +
              (document.form1.id_4821.value * barvic) +
              (document.form1.id_4869.value * barvic) +
              (document.form1.id_4883.value * barvic) +
              (document.form1.id_29.value * ttmelkartuse) +
              (document.form1.id_38.value * tmrizka) +
              (document.form1.id_32.value * tpaska10_15) +
              (document.form1.id_33.value * tpaska150_2) +
              (document.form1.id_34.value * tpaska150_20) +
              (document.form1.id_35.value * tpaska20_15) +
              (document.form1.id_36.value * tpaska20_25) +
              (document.form1.id_37.value * tpaska23_18) +
              (document.form1.id_41.value * nabazeny_sada15kg) +
              (document.form1.id_10129.value * sparovacka5kg) +
              (document.form1.id_10143.value * sparovacka20kg) +
              (document.form1.id_10181.value * sparovacka5kg) +
              (document.form1.id_10204.value * sparovacka20kg)+
              (document.form1.id_10242.value * sparovacka5kgbahama) +
              (document.form1.id_10327.value * sparovacka5kgkaramel) +
              (document.form1.id_10297.value * sparovacka5kgjasmin) +
              (document.form1.id_10266.value * sparovacka20kgbahama)+
              (document.form1.id_4739.value * benatskystuk3kg) +
              (document.form1.id_42.value * stpas50) +
              (document.form1.id_43.value * stpas100) +
              (document.form1.id_3206.value * sanacnikoncentrat) +
              (document.form1.id_44.value * tekutadlazba) +
              (document.form1.id_45.value * vsyp) +
              (document.form1.id_656.value * tesnicifolie10) +
              (document.form1.id_663.value * tesnicifolie50) +
              (document.form1.id_99999.value * namazsek) +
              (document.form1.id_88888.value * semtes) +
              (document.form1.id_150.value * sparovacka_na_balkony) +
              (document.form1.id_151.value * obkladolep1_5) +
              (document.form1.id_1512.value * obkladolep4_5) +
              (document.form1.id_153.value * lepenka_v_prasku3kg) +
              (document.form1.id_1532.value * lepenka_v_prasku18kg)))/100

/* čárka a mezera za tisíce */
cislice = String(dohromady).split(".");

/*desatina cisla*/
if (cislice[1]>0)
if (cislice[0].length>3)
if (cislice[0].length>4)
if (cislice[0].length>5)
if (cislice[0].length>6)
{
hromada=(cislice[0].slice(0,1) + " " + cislice[0].slice(1,4) + " " + cislice[0].slice(4) + "," + cislice[1] + "0")
}
else
{
hromada=(cislice[0].slice(0,3) + " " + cislice[0].slice(3) + "," + cislice[1] + "0")
}
else
{
hromada=(cislice[0].slice(0,2) + " " + cislice[0].slice(2) + "," + cislice[1] + "0")
}
else
{
hromada=(cislice[0].slice(0,1) + " " + cislice[0].slice(1) + "," + cislice[1] + "0")
}
else
{
hromada=(cislice[0] + "," + cislice[1] + "0")
}
else

/*cela cisla*/
if (cislice[0].length>3)
if (cislice[0].length>4)
if (cislice[0].length>5)
if (cislice[0].length>6)
{
cislice[1]="0"
hromada=(cislice[0].slice(0,1) + " " + cislice[0].slice(1,4) + " " + cislice[0].slice(4) + "," + cislice[1] + "0")
}
else
{
cislice[1]="0"
hromada=(cislice[0].slice(0,3) + " " + cislice[0].slice(3) + "," + cislice[1] + "0")
}
else
{
cislice[1]="0"
hromada=(cislice[0].slice(0,2) + " " + cislice[0].slice(2) + "," + cislice[1] + "0")
}
else
{
cislice[1]="0"
hromada=(cislice[0].slice(0,1) + " " + cislice[0].slice(1) + "," + cislice[1] + "0")
}
else
{
cislice[1]="0"
hromada=(cislice[0] + "," + cislice[1] + "0")
}

document.form1.suma.value=String(hromada)
}



function MM_findObj(n, d) {
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_validateForm() {
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') {
        if (isNaN(val)) errors+='zadejte prosím číslo';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (val<min || max<val) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
  } if (errors) alert('chyba - '+errors);
  document.MM_returnValue = (errors == '');
}

function prevod(typ)
{
cislice = String(typ).split(".");
  if (cislice[1]>0) {
      if (cislice[0].length>3) {
      document.write(cislice[0].slice(0,1) + "&nbsp;" + cislice[0].slice(1) + "," + cislice[1] + "")
      }
      else {
      document.write(cislice[0] + "," + cislice[1] + "")
      }
  }else{
      if (cislice[0].length>3) {
      cislice[1]="0"
      document.write(cislice[0].slice(0,1) + "&nbsp;" + cislice[0].slice(1) + "," + cislice[1] + "0")
      }
      else {
      cislice[1]="0"
      document.write(cislice[0] + "," + cislice[1] + "0")
      }
  }
}


function kontrola()
{
    if ((self.document.forms.form1.nazev_firmy.value == "") || (self.document.forms.form1.kontaktni_osoba.value == " ") || (self.document.forms.form1.telefon.value == " ")) {
      alert('Promiňte, ale musíte vypnit všechny povinné položky.');
    return false;
    }
    }
  function kontrola2()
{
    if ((self.document.forms.form2.nazev_firmy.value == "") || (self.document.forms.form2.kontaktni_osoba.value == " ") || (self.document.forms.form2.telefon.value == " ")) {
      alert('Promiňte, ale musíte vypnit všechny povinné položky.');
    return false;
    }
    }
