<!--
//----------------------------------------------------------------
function ProduktGewaehlt()
{
	idx=document.formular_preisanfrage.produktwahl.selectedIndex;
	wert=document.formular_preisanfrage.produktwahl.value;
	ProduktNr=wert;
	UpdateUmfang();
	//UpdatePapiersorte();
	UpdateFormat();
	UpdateUmschlag();
	document.images[0].src = "../images/Format"+wert+".jpg";
}

//----------------------------------------------------------------
function UmfangGewaehlt()
{
	idx=document.formular_preisanfrage.umfang.selectedIndex;
	wert=document.formular_preisanfrage.umfang.value;
	Umfang=wert;
	UpdatePapiersorte();
}

//----------------------------------------------------------------
function UpdateUmfang()
{
	anz=document.formular_preisanfrage.umfang.length;
	for( i=1; i<=anz; i++)
		document.formular_preisanfrage.umfang.options[document.formular_preisanfrage.umfang.length-1] = null;
	// Hinweis
	InsertSeitenzahl("--- Bitte wählen Sie den gewünschten Umfang ---","0");
	// 4 Seiten
	if( ProduktNr==1 )
		InsertSeitenzahl("4 Seiten", "4");
	if( ProduktNr==1 )
		InsertSeitenzahl("6 Seiten", "6");
	if( ProduktNr==1 || ProduktNr==2 || ProduktNr==3 )
		InsertSeitenzahl("8 Seiten", "8");
	if( ProduktNr==1 )
		InsertSeitenzahl("10 Seiten", "10");
	if( ProduktNr==1 || ProduktNr==2 || ProduktNr==3 || ProduktNr==4 || ProduktNr==5)
		InsertSeitenzahl("12 Seiten", "12");
	if( ProduktNr==1 )
		InsertSeitenzahl("14 Seiten", "14");
	if( ProduktNr==1 || ProduktNr==2 || ProduktNr==3 || ProduktNr==4 || ProduktNr==5)
		InsertSeitenzahl("16 Seiten", "16");
	if( ProduktNr==1  )
		InsertSeitenzahl("18 Seiten", "18");
	if( ProduktNr==1 || ProduktNr==2 || ProduktNr==3 || ProduktNr==4 || ProduktNr==5)
		InsertSeitenzahl("20 Seiten", "20");
	if( ProduktNr==1 || ProduktNr==2 || ProduktNr==3 || ProduktNr==4 || ProduktNr==5)
		InsertSeitenzahl("24 Seiten", "24");
	if( ProduktNr==1 || ProduktNr==2 || ProduktNr==3 || ProduktNr==4 || ProduktNr==5)
		InsertSeitenzahl("28 Seiten", "28");
	if( ProduktNr==1 || ProduktNr==2 || ProduktNr==3 || ProduktNr==4 || ProduktNr==5)
		InsertSeitenzahl("32 Seiten", "32");
	if( ProduktNr==1 || ProduktNr==2 || ProduktNr==3 || ProduktNr==4 || ProduktNr==5)
		InsertSeitenzahl("36 Seiten", "36");
	if( ProduktNr==1 || ProduktNr==2 || ProduktNr==3 || ProduktNr==4 || ProduktNr==5)
		InsertSeitenzahl("40 Seiten", "40");
	if( ProduktNr==1 )
		InsertSeitenzahl("44 Seiten", "44");
	if( ProduktNr==1 || ProduktNr==2 || ProduktNr==3 || ProduktNr==4 || ProduktNr==5)
		InsertSeitenzahl("48 Seiten", "48");
	if( ProduktNr==2 || ProduktNr==3 || ProduktNr==4 || ProduktNr==5)
		InsertSeitenzahl("56 Seiten", "56");
	if( ProduktNr==2 || ProduktNr==3 || ProduktNr==4 || ProduktNr==5)
		InsertSeitenzahl("64 Seiten", "64");
	if( ProduktNr==2 || ProduktNr==3 || ProduktNr==4 || ProduktNr==5)
		InsertSeitenzahl("72 Seiten", "72");
	if( ProduktNr==2 || ProduktNr==3 || ProduktNr==4 || ProduktNr==5)
		InsertSeitenzahl("80 Seiten", "80");
	if( ProduktNr==2 || ProduktNr==3 || ProduktNr==4 || ProduktNr==5)
		InsertSeitenzahl("88 Seiten", "88");
	if( ProduktNr==2 || ProduktNr==3 || ProduktNr==4 || ProduktNr==5)
		InsertSeitenzahl("96 Seiten", "96");
	if( ProduktNr==2 || ProduktNr==3 || ProduktNr==4 ||  ProduktNr==5)
		InsertSeitenzahl("104 Seiten", "104");
	if( ProduktNr==2 || ProduktNr==3 || ProduktNr==4 ||  ProduktNr==5)
		InsertSeitenzahl("112 Seiten", "112");
	if( ProduktNr==2 || ProduktNr==3 || ProduktNr==4 ||  ProduktNr==5)
		InsertSeitenzahl("120 Seiten", "120");
	if( ProduktNr==2 || ProduktNr==3 || ProduktNr==4 || ProduktNr==5)
		InsertSeitenzahl("128 Seiten", "128");

}

//----------------------------------------------------------------
function InsertSeitenzahl(text,wert) {
	NeuerEintrag = new Option(text, wert, false, false);
 	document.formular_preisanfrage.umfang.options[document.formular_preisanfrage.umfang.length] = NeuerEintrag;
}

//----------------------------------------------------------------
function UpdatePapiersorte()
{
	anz=document.formular_preisanfrage.papiersorte.length;
	for( i=1; i<=anz; i++)
		document.formular_preisanfrage.papiersorte.options[document.formular_preisanfrage.papiersorte.length-1] = null;
	InsertPapiersorte("--- Bitte wählen Sie die Papiersorte ---","0");
	if( ProduktNr==1 ) {
		if( Umfang>=14 ) {
			InsertPapiersorte("45g/m² Standard Zeitungsdruck", "45");
			InsertPapiersorte("52g/m² Standard Zeitungsdruck", "52");
			InsertPapiersorte("55g/m² aufgebessert Zeitungsdruck, ISO-Weißgrad 76 C", "55");
			InsertPapiersorte("60g/m² aufgebessert Zeitungsdruck, ISO-Weißgrad 69 C", "60");
		}
		if( Umfang>=4 && Umfang<=12 ) {
			InsertPapiersorte("52g/m² Standard Zeitungsdruck", "52");
			InsertPapiersorte("55g/m² aufgebessert Zeitungsdruck, ISO-Weißgrad 76 C", "55");
			InsertPapiersorte("60g/m² aufgebessert Zeitungsdruck, ISO-Weißgrad 69 C", "60");
		}
	}
	if( ProduktNr==2 ) {
		if( Umfang>=28 ) {
			InsertPapiersorte("45g/m² Standard Zeitungsdruck", "45");
			InsertPapiersorte("52g/m² Standard Zeitungsdruck", "52");
			InsertPapiersorte("55g/m² aufgebessert Zeitungsdruck, ISO-Weißgrad 76 C", "55");
			InsertPapiersorte("60g/m² aufgebessert Zeitungsdruck, ISO-Weißgrad 69 C", "60");
		}
		if( Umfang>=4 && Umfang<=24 ) {
			InsertPapiersorte("52g/m² Standard Zeitungsdruck", "52");
			InsertPapiersorte("55g/m² aufgebessert Zeitungsdruck, ISO-Weißgrad 76 C", "55");
			InsertPapiersorte("60g/m² aufgebessert Zeitungsdruck, ISO-Weißgrad 69 C", "60");
		}
	}
	if( ProduktNr==3 ) {
		if( Umfang>=28 ) {
			InsertPapiersorte("45g/m² Standard Zeitungsdruck", "45");
			InsertPapiersorte("52g/m² Standard Zeitungsdruck", "52");
			InsertPapiersorte("55g/m² aufgebessert Zeitungsdruck, ISO-Weißgrad 76 C", "55");
			InsertPapiersorte("60g/m² aufgebessert Zeitungsdruck, ISO-Weißgrad 69 C", "60");
		}
		if( Umfang>=4 && Umfang<=24 ) {
			InsertPapiersorte("52g/m² Standard Zeitungsdruck", "52");
			InsertPapiersorte("55g/m² aufgebessert Zeitungsdruck, ISO-Weißgrad 76 C", "55");
			InsertPapiersorte("60g/m² aufgebessert Zeitungsdruck, ISO-Weißgrad 69 C", "60");
		}
	}
	if( ProduktNr==4 ) {
		if( Umfang>=28 ) {
			InsertPapiersorte("45g/m² Standard Zeitungsdruck", "45");
			InsertPapiersorte("52g/m² Standard Zeitungsdruck", "52");
			InsertPapiersorte("55g/m² aufgebessert Zeitungsdruck, ISO-Weißgrad 76 C", "55");
			InsertPapiersorte("60g/m² aufgebessert Zeitungsdruck, ISO-Weißgrad 69 C", "60");
		}
		if( Umfang>=4 && Umfang<=24 ) {
			InsertPapiersorte("52g/m² Standard Zeitungsdruck", "52");
			InsertPapiersorte("55g/m² aufgebessert Zeitungsdruck, ISO-Weißgrad 76 C", "55");
			InsertPapiersorte("60g/m² aufgebessert Zeitungsdruck, ISO-Weißgrad 69 C", "60");
		}
	}
	if( ProduktNr==5 ) {
		if( Umfang>=28 ) {
			InsertPapiersorte("45g/m² Standard Zeitungsdruck", "45");
			InsertPapiersorte("52g/m² Standard Zeitungsdruck", "52");
			InsertPapiersorte("55g/m² aufgebessert Zeitungsdruck, ISO-Weißgrad 76 C", "55");
			InsertPapiersorte("60g/m² aufgebessert Zeitungsdruck, ISO-Weißgrad 69 C", "60");
		}
		if( Umfang>=4 && Umfang<=24 ) {
			InsertPapiersorte("52g/m² Standard Zeitungsdruck", "52");
			InsertPapiersorte("55g/m² aufgebessert Zeitungsdruck, ISO-Weißgrad 76 C", "55");
			InsertPapiersorte("60g/m² aufgebessert Zeitungsdruck, ISO-Weißgrad 69 C", "60");
		}
	}

}

//----------------------------------------------------------------
function InsertPapiersorte(text,wert)
{
	NeuerEintrag = new Option(text, wert, false, false);
 	document.formular_preisanfrage.papiersorte.options[document.formular_preisanfrage.papiersorte.length] = NeuerEintrag;
}


//----------------------------------------------------------------
function UpdateFormat()
{
	anz=document.formular_preisanfrage.format.length;
	for( i=1; i<=anz; i++)
		document.formular_preisanfrage.format.options[document.formular_preisanfrage.format.length-1] = null;
	if( ProduktNr==1 ) {
		InsertFormat("350x510mm", "350x510mm");
	}
	if( ProduktNr==2 ) {
		InsertFormat("255x350mm", "255x350mm");
	}
	if( ProduktNr==3 ) {
		InsertFormat("255x350mm", "255x350mm");
	}
	if( ProduktNr==4 ) {
		InsertFormat("236x317mm", "236x317mm");
	}
	if( ProduktNr==5 ) {
		InsertFormat("236x317mm", "236x317mm");
	}
}

//----------------------------------------------------------------
function InsertFormat(text,wert)
{
	NeuerEintrag = new Option(text, wert, false, false);
 	document.formular_preisanfrage.format.options[document.formular_preisanfrage.format.length] = NeuerEintrag;
}

//----------------------------------------------------------------
function UpdateUmschlag()
{
	anz=document.formular_preisanfrage.umschlag.length;
	for( i=1; i<=anz; i++)
		document.formular_preisanfrage.umschlag.options[document.formular_preisanfrage.umschlag.length-1] = null;
	if( ProduktNr==1 || ProduktNr==2 || ProduktNr==3 || ProduktNr==4 ) {
		InsertUmschlag("--- Nur möglich bei Produkt mit Umschlag ---", "0");
	}
	if( ProduktNr==5 ) {
		InsertUmschlag("--- Bitte wählen sie das Umschlagpapier ---", "0");
		InsertUmschlag("120g/m² holzfrei glänzend Bilderdruck", "120g");
		InsertUmschlag("135g/m² Offsetpapier, ISO-Weißgrad 84 C", "135g");
	}
}

//----------------------------------------------------------------
function InsertUmschlag(text,wert) {
	NeuerEintrag = new Option(text, wert, false, false);
 	document.formular_preisanfrage.umschlag.options[document.formular_preisanfrage.umschlag.length] = NeuerEintrag;
}




//----------------------------------------------------------------
function selectDropdownOption(element,wert)
{
	for (var i=0; i<element.options.length; i++) {
		if (element.options[i].value == wert) {
			element.options[i].selected = true;		
		}
		else {
			element.options[i].selected = false;	
		}
	}
}
-->
