

/* beginonline_rechner */

Stellenanzahl=2; 

PG=new Array();
PG[0]=new Array("Digital-Print");
PG[1]=new Array("Poster");
PG[2]=new Array("Panorama");
PG[3]=new Array("Scan-Service");
Produkt1=new Array();
Produkt1[0]=new Array("9 x 13","0.15")
Produkt1[1]=new Array("10 x 14","0.20")
Produkt1[2]=new Array("10 x 15","0.20")
Produkt1[3]=new Array("13 x 18","0.29")
Produkt1[4]=new Array("15 x 20","0.59")
Produkt1[5]=new Array("20 x 30","0.99")
Produkt1[6]=new Array("9 x 13 PREMIUM","0.20")
Produkt1[7]=new Array("10 x 14 PREMIUM","0.25")
Produkt1[8]=new Array("10 x 15 PREMIUM","0.25")
Produkt1[9]=new Array("13 x 18 PREMIUM","0.35")
Produkt1[10]=new Array("15 x 20 PREMIUM","0.80")
Produkt1[11]=new Array("20 x 30 PREMIUM","1.90")
Produkt2=new Array();
Produkt2[0]=new Array("30 x 40","3.90")
Produkt2[1]=new Array("30 x 45","3.90")
Produkt2[2]=new Array("40 x 60","6.90")
Produkt2[3]=new Array("50 x 70","9.90")
Produkt2[4]=new Array("60 x 90","14.90")
Produkt2[5]=new Array("40 x 60 CANVAS","27.90")
Produkt2[6]=new Array("50 x 70 CANVAS","34.90")
Produkt2[7]=new Array("60 x 90 CANVAS","44.90")
Produkt2[8]=new Array("30 x 40 PREMIUM","6.90")
Produkt2[9]=new Array("30 x 45 PREMIUM","6.90")
Produkt2[10]=new Array("40 x 60 PREMIUM","9.90")
Produkt2[11]=new Array("50 x 70 PREMIUM","14.90")
Produkt2[12]=new Array("60 x 90 PREMIUM","19.90")
Produkt2[13]=new Array("40 x 60 CANVAS PREMIUM","35.90")
Produkt2[14]=new Array("50 x 70 CANVAS PREMIUM","41.90")
Produkt2[15]=new Array("60 x 90 CANVAS PREMIUM","59.90")
Produkt3=new Array();
Produkt3[0]=new Array("20 x 80","6.90")
Produkt3[1]=new Array("25 x 100","7.90")
Produkt3[2]=new Array("30 x 90","7.90")
Produkt3[3]=new Array("30 x 120","13.90")
Produkt3[4]=new Array("20 x 80 PREMIUM","10.90")
Produkt3[5]=new Array("25 x 100 PREMIUM","12.90")
Produkt3[6]=new Array("30 x 90 PREMIUM","12.90")
Produkt3[7]=new Array("30 x 120 PREMIUM","17.90")
Produkt4=new Array();
Produkt4[0]=new Array("KB/APS-Film 1536x1024 pix. (4 Base)","4.00")
Produkt4[1]=new Array("KB/APS-Film 3072x2048 pix. (16 Base)","6.00")
Produkt4[2]=new Array("KB/APS-Einzelscan (4 Base)","0.30")
Produkt4[3]=new Array("KB/APS-Einzelscan (16 Base)","1.00")
Produkt4[4]=new Array("Bild","1.00")
Produkt4[5]=new Array("Mittel-Einzelscan (16 Base)","5.00")


function wechsel()
{
Auswahl=document.forms[0].elements[0].selectedIndex; //Bestimmen welcher Eintrag markiert ist
while (document.forms[0].elements[1].length>1) //Alle Eintr&auml;ge(ausser der Kopfzeile[index0])l&ouml;schen
{
document.forms[0].elements[1].options[document.forms[0].elements[1].length-1]=null;
}
if (Auswahl>0) //Nur wenn die Auswahl im Steuerungsfeld gr&ouml;&szlig;er als 0(0=kopfzeile),werden werte in 2.Feld eingetragen
{
x=eval("Produkt"+Auswahl); //x erh&auml;lt das entsprechende Produktarray zugewiesen

for (i=0;i<=x.length-1;i++) //Werte des Produktarrays abfragen
{
Eintrag= new Option(x[i][0],x[i][1]) //Werte des Produktarrays zuweisen

document.forms[0].elements[1].options[document.forms[0].elements[1].length]=Eintrag; //option einf&uuml;gen

} 
}
document.forms[0].elements[1].selectedIndex=0;
Preis ()
}
/* beginonline_rechner2 ****************************************/


function nullen(stellen,wert) 
{
nullstring="";
faktor=eval("1e"+stellen); 
for (xi=1;xi<=stellen;xi++) 
{
nullstring=nullstring+"0"
}
wert=Math.round(wert*faktor)/faktor
wert+="";
if (wert.lastIndexOf(".")==-1)
wert=wert+"."+nullstring;
else
{
y=wert.substring(wert.lastIndexOf(".")+1,wert.length) 
z=nullstring.length-y.length 
nullstring=nullstring.substr(0,z)
wert=wert+nullstring 
}
return wert 
}


function Preis()
{
var x,y
x = parseInt(document.forms[0].Menge.value);
document.forms[0].EPreis.value = document.forms[0].Format.value;
document.forms[0].Menge1.value = x;
document.forms[0].Menge.value = x;
if (document.forms[0].C1[0].checked) document.forms[0].versand.value = "2.50"
			else document.forms[0].versand.value = "4.50";

y = parseInt(document.forms[0].Format.value * document.forms[0].Menge.value * 100) / 100;
document.forms[0].brutto.value = nullen(Stellenanzahl,y);
y = parseInt(document.forms[0].brutto.value * 100/ 1.19) / 100;
document.forms[0].netto.value = nullen(Stellenanzahl,y);
y = parseInt(100 * (document.forms[0].brutto.value - document.forms[0].netto.value)) / 100;
document.forms[0].mwst.value = nullen(Stellenanzahl,y);
y = (parseInt(100 * document.forms[0].brutto.value) + parseInt(100 * document.forms[0].versand.value) + 0) / 100;
if (document.forms[0].brutto.value != "0.00") document.forms[0].gesamtpreis.value = nullen(Stellenanzahl,y)
else document.forms[0].gesamtpreis.value = "0.00"
}

/* END  ****************************************/
function fenster_show() 
{
  neu = open('meldung1.php', '', 'width=320 height=322');
  neu.moveTo(50,50);
}

function fenster_show1() 
{
  neu = open('meldung3.php', '', 'width=320 height=280');
  neu.moveTo(50,50);
}
function fenster_show4() 
{
  neu = open('meldung4.php', '', 'width=420 height=326');
  neu.moveTo(50,50);
}

function NeuesFenster(adresse)
  {
   MeinFenster = window.open(adresse, "Fotos24.net","width=600, height=460, scrollbars=yes, locationbar=no, menubar=no, status=no, resizable=no, toolbar=no");
   MeinFenster.focus();
  }

  function BildFenster(adresse,f_width,f_height)
  {
	f_width +=50;
	f_height +=50;
   MeinFenster = window.open(adresse, "Bild","width="+f_width+", height="+f_height+", scrollbars=no, locationbar=no, menubar=no, status=no, resizable=no, toolbar=no");
   //MeinFenster.
   //MeinFenster.resizeTo(f_width,f_height);
   MeinFenster.window.document.write("<HTML><HEAD><TITLE>Bild</TITLE></HEAD><BODY leftmargin=\"0\" topmargin=\"0\" marginheight=\"-1\" marginwidth=\"-1\" bgcolor=\"#ffffff\">");
   MeinFenster.window.document.write("<img src=\""+adresse+"\" width="+f_width+" height="+f_height+" border=0>");
   MeinFenster.window.document.write("</BODY></HTML>");
   MeinFenster.focus();
  }

  function FaxFenster(adresse,f_width,f_height)
{
	MeinFenster = window.open(adresse, "Fax","width="+f_width+",height="+f_height+",scrollbars=yes, locationbar=no; menubar=no, status=no, resizable=no, toolbar=no");
	//MeinFenster:window.print();
	MeinFenster.focus();
}