function number_format(elem) {
    num = elem.toString();
   num = num.split(".");
   if (num.length==1) num = num[0]+".00";
   else if (num[1].length==0) num = num[0]+".00";
   else if(num[1].length==1) num = num[0]+"."+num[1]+"0";
   else if(num[1].length>2) {
        num = Math.ceil(Number(num[0]+"."+num[1])*100)/100;
       num = num.toString();
   }
    else num = num[0] + "." +num[1];
   num = num.replace(",",".")+" EUR";
   return num;
   }

function berechnestocka() {
  preis = 0;
    if (document.shop01.stock01_a.value!="") preis+= parseInt(document.shop01.stock01_a.value) * 10 ;
    if (document.shop01.stock01_b.value!="") preis+= parseInt(document.shop01.stock01_b.value) * 10 ;
    if (document.shop01.stock01_c.value!="") preis+= parseInt(document.shop01.stock01_c.value) * 10 ;
    if (document.shop01.stock01_d.value!="") preis+= parseInt(document.shop01.stock01_d.value) * 10 ;
    if (document.shop01.stock01_e.value!="") preis+= parseInt(document.shop01.stock01_e.value) * 10 ;
    if (document.shop01.stock01_f.value!="") preis+= parseInt(document.shop01.stock01_f.value) * 10 ;
    if (document.shop01.stock02_a.value!="") preis+= parseInt(document.shop01.stock02_a.value) * 10 ;
    if (document.shop01.stock02_b.value!="") preis+= parseInt(document.shop01.stock02_b.value) * 10 ;
    if (document.shop01.stock02_c.value!="") preis+= parseInt(document.shop01.stock02_c.value) * 10 ;
    if (document.shop01.stock02_d.value!="") preis+= parseInt(document.shop01.stock02_d.value) * 10 ;
    if (document.shop01.stock02_e.value!="") preis+= parseInt(document.shop01.stock02_e.value) * 10 ;
    if (document.shop01.stock02_f.value!="") preis+= parseInt(document.shop01.stock02_f.value) * 10 ;
    document.shop01.stock01_gesamt.value=number_format(preis);
  }
  
function berechneshirta() {
  preis = 0;
    if (document.shop01.shirt01_128.value!="") preis= parseInt(document.shop01.shirt01_128.value) * 10
	if (document.shop01.shirt01_140.value!="") preis+= parseInt(document.shop01.shirt01_140.value) * 12
	if (document.shop01.shirt01_152.value!="") preis+= parseInt(document.shop01.shirt01_152.value) * 12
	if (document.shop01.shirt01_s.value!="") preis+= parseInt(document.shop01.shirt01_s.value) * 15
	if (document.shop01.shirt01_m.value!="") preis+= parseInt(document.shop01.shirt01_m.value) * 15
	if (document.shop01.shirt01_l.value!="") preis+= parseInt(document.shop01.shirt01_l.value) * 15
	if (document.shop01.shirt01_xl.value!="") preis+= parseInt(document.shop01.shirt01_xl.value) * 15
	if (document.shop01.shirt01_xxl.value!="") preis+= parseInt(document.shop01.shirt01_xxl.value) * 18
	if (document.shop01.shirt01_xxxl.value!="") preis+= parseInt(document.shop01.shirt01_xxxl.value) * 20
    document.shop01.shirt01_gesamt.value=number_format(preis);
  }
    
function berechneshirtb() {
  preis = 0;
    if (document.shop01.shirt02_l.value!="") preis= parseInt(document.shop01.shirt02_l.value) * 25
	if (document.shop01.shirt02_xl.value!="") preis+= parseInt(document.shop01.shirt02_xl.value) * 25
	if (document.shop01.shirt02_xxl.value!="") preis+= parseInt(document.shop01.shirt02_xxl.value) * 25
    document.shop01.shirt02_gesamt.value=number_format(preis);
  }
  
function berechnehosea() {
  preis = 0;
    if (document.shop01.hose01_140.value!="") preis= parseInt(document.shop01.hose01_140.value) * 25
	if (document.shop01.hose01_150.value!="") preis+= parseInt(document.shop01.hose01_150.value) * 27
	if (document.shop01.hose01_160.value!="") preis+= parseInt(document.shop01.hose01_160.value) * 30
	if (document.shop01.hose01_170.value!="") preis+= parseInt(document.shop01.hose01_170.value) * 30
	if (document.shop01.hose01_180.value!="") preis+= parseInt(document.shop01.hose01_180.value) * 30
	if (document.shop01.hose01_190.value!="") preis+= parseInt(document.shop01.hose01_190.value) * 33
	if (document.shop01.hose01_200.value!="") preis+= parseInt(document.shop01.hose01_200.value) * 35
    document.shop01.hose01_gesamt.value=number_format(preis);
  }
  
function berechnetaschea() {
  preis = 0;
    if (document.shop01.tasche01.value!="") preis= parseInt(document.shop01.tasche01.value) * 20
    document.shop01.tasche01_gesamt.value=number_format(preis);
  }
    
function berechneprogramma() {
  preis = 0;
    if (document.shop01.programm01.value!="") preis= parseInt(document.shop01.programm01.value) * 7
    document.shop01.programm01_gesamt.value=number_format(preis);
  }
      
function berechneprogrammb() {
  preis = 0;
    if (document.shop01.programm02.value!="") preis= parseInt(document.shop01.programm02.value) * 7
    document.shop01.programm02_gesamt.value=number_format(preis);
  }
        
function berechnebucha() {
  preis = 0;
    if (document.shop01.buch001.value!="") preis= parseInt(document.shop01.buch001.value) * 20
    document.shop01.buch001_gesamt.value=number_format(preis);
  }
          
function berechnebuchb() {
  preis = 0;
    if (document.shop01.buch002.value!="") preis= parseInt(document.shop01.buch002.value) * 18
    document.shop01.buch002_gesamt.value=number_format(preis);
  }
          
function berechnebuchc() {
  preis = 0;
    if (document.shop01.buch003.value!="") preis= parseInt(document.shop01.buch003.value) * 18
    document.shop01.buch003_gesamt.value=number_format(preis);
  }
          
function berechnebuchd() {
  preis = 0;
    if (document.shop01.buch004.value!="") preis= parseInt(document.shop01.buch004.value) * 18
    document.shop01.buch004_gesamt.value=number_format(preis);
  }
          
function berechnebuche() {
  preis = 0;
    if (document.shop01.buch005.value!="") preis= parseInt(document.shop01.buch005.value) * 18
    document.shop01.buch005_gesamt.value=number_format(preis);
  }
          
function berechnebuchf() {
  preis = 0;
    if (document.shop01.buch006.value!="") preis= parseInt(document.shop01.buch006.value) * 18
    document.shop01.buch006_gesamt.value=number_format(preis);
  }
       
function berechnewaffena() {
  preis = 0;
    if (document.shop01.waffen001.value!="") preis= parseInt(document.shop01.waffen001.value) * 5
    document.shop01.waffen001_gesamt.value=number_format(preis);
  }

function berechnewaffenb() {
  preis = 0;
    if (document.shop01.waffen002.value!="") preis= parseInt(document.shop01.waffen002.value) * 8
    document.shop01.waffen002_gesamt.value=number_format(preis);
  }
      
function berechnewaffenc() {
  preis = 0;
    if (document.shop01.waffen003.value!="") preis= parseInt(document.shop01.waffen003.value) * 20
    document.shop01.waffen003_gesamt.value=number_format(preis);
  }
         
function berechnewaffend() {
  preis = 0;
    if (document.shop01.waffen004.value!="") preis= parseInt(document.shop01.waffen004.value) * 5.50
    document.shop01.waffen004_gesamt.value=number_format(preis);
  }
         
function berechnewaffene() {
  preis = 0;
    if (document.shop01.waffen005.value!="") preis= parseInt(document.shop01.waffen005.value) * 20
    document.shop01.waffen005_gesamt.value=number_format(preis);
  }
             
function berechnewaffenf() {
  preis = 0;
    if (document.shop01.waffen006.value!="") preis= parseInt(document.shop01.waffen006.value) * 18
    document.shop01.waffen006_gesamt.value=number_format(preis);
  }
           

function berechnewaffeng() {
  preis = 0;
    if (document.shop01.waffen007.value!="") preis= parseInt(document.shop01.waffen007.value) * 22
    document.shop01.waffen007_gesamt.value=number_format(preis);
  }
             
function berechnewaffenh() {
  preis = 0;
    if (document.shop01.waffen008.value!="") preis= parseInt(document.shop01.waffen008.value) * 45
    document.shop01.waffen008_gesamt.value=number_format(preis);
  }
             
function berechnewaffeni() {
  preis = 0;
    if (document.shop01.waffen009.value!="") preis= parseInt(document.shop01.waffen009.value) * 58
    document.shop01.waffen009_gesamt.value=number_format(preis);
  }
               
function berechnewaffenj() {
  preis = 0;
    if (document.shop01.waffen010.value!="") preis= parseInt(document.shop01.waffen010.value) * 25
    document.shop01.waffen010_gesamt.value=number_format(preis);
  }
               
function berechnewaffenk() {
  preis = 0;
    if (document.shop01.waffen011a.value!="") preis= parseInt(document.shop01.waffen011a.value) * 15
	if (document.shop01.waffen011b.value!="") preis+= parseInt(document.shop01.waffen011b.value) * 20
	if (document.shop01.waffen011c.value!="") preis+= parseInt(document.shop01.waffen011c.value) * 25
	if (document.shop01.waffen011d.value!="") preis+= parseInt(document.shop01.waffen011d.value) * 30
	if (document.shop01.waffen011e.value!="") preis+= parseInt(document.shop01.waffen011e.value) * 35
   document.shop01.waffen011_gesamt.value=number_format(preis);
  }
               
function berechnewaffenl() {
  preis = 0;
    if (document.shop01.waffen012.value!="") preis= parseInt(document.shop01.waffen012.value) * 70
    document.shop01.waffen012_gesamt.value=number_format(preis);
  }
               
function berechnewaffenm() {
  preis = 0;
    if (document.shop01.waffen013.value!="") preis= parseInt(document.shop01.waffen013.value) * 105
    document.shop01.waffen013_gesamt.value=number_format(preis);
  }
                 
function berechnewaffenn() {
  preis = 0;
    if (document.shop01.waffen014.value!="") preis= parseInt(document.shop01.waffen014.value) * 63
    document.shop01.waffen014_gesamt.value=number_format(preis);
  }
    
function berechnewaffeno() {
  preis = 0;
    if (document.shop01.waffen015.value!="") preis= parseInt(document.shop01.waffen015.value) * 112
    document.shop01.waffen015_gesamt.value=number_format(preis);
  }
                 
function berechnepassa() {
  preis = 0;
    if (document.shop01.pass01.value!="") preis= parseInt(document.shop01.pass01.value) * 5
    document.shop01.pass01_gesamt.value=number_format(preis);
  }

function berechnejugprog() {
  preis = 0;
    if (document.shop01.programm03.value!="") preis= parseInt(document.shop01.programm03.value) * 5
    document.shop01.programm03_gesamt.value=number_format(preis);
  }
           
function berechneaufnahera() {
  preis = 0;
    if (document.shop01.aufnaher001.value!="") preis= parseInt(document.shop01.aufnaher001.value) * 8
    document.shop01.aufnaher001_gesamt.value=number_format(preis);
  }
  
function berechneaufnaherb() {
  preis = 0;
    if (document.shop01.aufnaher002.value!="") preis= parseInt(document.shop01.aufnaher002.value) * 5
    document.shop01.aufnaher002_gesamt.value=number_format(preis);
  }
             
function berechneaufnaherc() {
  preis = 0;
    if (document.shop01.aufnaher003.value!="") preis= parseInt(document.shop01.aufnaher003.value) * 5
    document.shop01.aufnaher003_gesamt.value=number_format(preis);
  }
             
function berechneaufnaherd() {
  preis = 0;
    if (document.shop01.aufnaher004.value!="") preis= parseInt(document.shop01.aufnaher004.value) * 5
    document.shop01.aufnaher004_gesamt.value=number_format(preis);
  }
             
function berechneaufnahere() {
  preis = 0;
    if (document.shop01.aufnaher005.value!="") preis= parseInt(document.shop01.aufnaher005.value) * 8
    document.shop01.aufnaher005_gesamt.value=number_format(preis);
  }
             
function berechneaufnaherf() {
  preis = 0;
    if (document.shop01.aufnaher006a.value!="") preis= parseInt(document.shop01.aufnaher006a.value) * 10
	if (document.shop01.aufnaher006b.value!="") preis+= parseInt(document.shop01.aufnaher006b.value) * 15
    document.shop01.aufnaher006_gesamt.value=number_format(preis);
  }
             
function berechneaufnaherg() {
  preis = 0;
    if (document.shop01.aufnaher007.value!="") preis= parseInt(document.shop01.aufnaher007.value) * 5
    document.shop01.aufnaher007_gesamt.value=number_format(preis);
  }
             
function berechneaufnaherh() {
  preis = 0;
    if (document.shop01.aufnaher008.value!="") preis= parseInt(document.shop01.aufnaher008.value) * 5
    document.shop01.aufnaher008_gesamt.value=number_format(preis);
  }
  
 function berechneaufnaheri() {
  preis = 0;
    if (document.shop01.aufnaher009.value!="") preis= parseInt(document.shop01.aufnaher009.value) * 5
    document.shop01.aufnaher009_gesamt.value=number_format(preis);
  }
  
 function berechneaufnaherj() {
  preis = 0;
    if (document.shop01.aufnaher010.value!="") preis= parseInt(document.shop01.aufnaher010.value) * 5
    document.shop01.aufnaher010_gesamt.value=number_format(preis);
  }
  
function load_kleidung() {
  berechneshirta();
  berechneshirtb();
  berechnehosea();
  berechneaufnahera();
  berechneaufnaherb();
  berechneaufnaherc();
  berechneaufnaherd();
  berechneaufnahere();
  berechneaufnaherf();
  berechneaufnaherg();
  berechneaufnaherh();
  berechneaufnaheri();
  berechneaufnaherj();
}

function load_waffen() {
  berechnestocka();
  berechnetaschea();
  berechnewaffena();
  berechnewaffenb();
  berechnewaffenc();
  berechnewaffend();
  berechnewaffene();
  berechnewaffenf();
  berechnewaffeng();
  berechnewaffenh();
  berechnewaffeni();
  berechnewaffenj();
  berechnewaffenk();
  berechnewaffenl();
  berechnewaffenm();
  berechnewaffenn();
  berechnewaffeno();
}

function load_buecher() {
  berechneprogramma();
  berechneprogrammb();
  berechnebucha();
  berechnebuchb();
  berechnebuchc();
  berechnebuchd();
  berechnebuche();
  berechnebuchf();
  berechnepassa();
  berechnejugprog();
}

