function FensterOeffnen (Adresse) {
	MeinFenster = window.open(Adresse, "Zweitfenster", "width=600,height=450,left=100,top=200");
	MeinFenster.focus();
}


// Gebrauchtwagen Suche
function select_hersteller() {

	// Ausgewählten Hersteller und Anzahl der Hersteller-Typen holen
	var hersteller_id = document.getElementById("hersteller_select").options[document.getElementById("hersteller_select").options.selectedIndex].value;

	var anz_typen = document.form.elements["anz_typen["+hersteller_id+"]"].value;

	// Bestehende Select-Felder löschen
	removeOptions ();
	// Select-Feld wieder füllen
	for (i=0; i < anz_typen; i++) {
		var txt = document.form.elements["hersteller["+hersteller_id+"]["+i+"][type]"].value;
		var val = document.form.elements["hersteller["+hersteller_id+"]["+i+"][type_id]"].value;
		addOption (i, txt, val);
	}

}

// Select-Felder füllen
function addOption (position, txt, val) {
	ne = new Option(txt, val, false, false);
	document.getElementById("typen_select").options[position] = ne;
}

// Select-Feld löschen
function removeOptions () {
	for (i = 100; i >= 0; i--) {
		document.getElementById("typen_select").options[i] = null;
	}
}