﻿function update_auswahl()
{
	var branche1Auswahl = document.forms[0].branche1;
	var branche2Auswahl = document.forms[0].branche2;
	branche2Auswahl.options.length = 0;

	if (branche1Auswahl.options[branche1Auswahl.selectedIndex].value == "Schiffahrt")
	{
		branche2Auswahl.options[0] = new Option("Reedereien", "Reedereien");
		branche2Auswahl.options[1] = new Option("Häfen/Hafenbetriebe", "HaefenHafenbetriebe");
	}
	
	
	if (branche1Auswahl.options[branche1Auswahl.selectedIndex].value == "Shipping")
	{
		branche2Auswahl.options[0] = new Option("Shipping companies", "Shippingcompanies");
		branche2Auswahl.options[1] = new Option("Ports/port operations", "Ports_portoperations");
	}


	else if (branche1Auswahl.options[branche1Auswahl.selectedIndex].value == "maritimeTechnik")
	{
		branche2Auswahl.options[0] = new Option("Werften", "Werften");
		branche2Auswahl.options[1] = new Option("Schiffbau-Zulieferer", "Schiffbau-Zulieferer");
		branche2Auswahl.options[2] = new Option("Wasserstraßenbau", "Wasserstrassenbau");
		branche2Auswahl.options[3] = new Option("Ingenieurbüros", "Ingenieurbueros");
		branche2Auswahl.options[4] = new Option("Klassifikation", "Klassifikation");
		branche2Auswahl.options[5] = new Option("Dienstleistungen (z. B. Finanzierer)", "Dienstleistungen_z.B.Finanzierer");
	}
	
	
	else if (branche1Auswahl.options[branche1Auswahl.selectedIndex].value == "Maritimetechnology")
	{
		branche2Auswahl.options[0] = new Option("Shipyards", "Shipyards");
		branche2Auswahl.options[1] = new Option("Shipbuilding suppliers", "Shipbuilding_suppliers");
		branche2Auswahl.options[2] = new Option("Waterway construction ", "Waterway_construction ");
		branche2Auswahl.options[3] = new Option("Engineering companies", "Engineering_companies");
		branche2Auswahl.options[4] = new Option("Classification", "Classification");
		branche2Auswahl.options[5] = new Option("Services (e.g. financial)", "Services_e.g.financial");
	}


	else if (branche1Auswahl.options[branche1Auswahl.selectedIndex].value == "LagerundUmschlagtechnik")
	{
		branche2Auswahl.options[0] = new Option("Container", "Container");
		branche2Auswahl.options[1] = new Option("Lagertechnik", "Lagertechnik");
		branche2Auswahl.options[2] = new Option("Hallenbau", "Hallenbau");
	}
	
	
	else if (branche1Auswahl.options[branche1Auswahl.selectedIndex].value == "Storageandcargohandlingtechnology")
	{
		branche2Auswahl.options[0] = new Option("Containers", "Containers");
		branche2Auswahl.options[1] = new Option("Storage technology", "Storagetechnology");
		branche2Auswahl.options[2] = new Option("Warehouse construction", "Warehouseconstruction");
	}


	else if (branche1Auswahl.options[branche1Auswahl.selectedIndex].value == "Medien")
	{
		branche2Auswahl.options[0] = new Option("Fachpresse/Online-Portale", "FachpresseOnline-Portale");
		branche2Auswahl.options[1] = new Option("Buchverlage", "Buchverlage");
		branche2Auswahl.options[2] = new Option("Buchhändler", "Buchhaendler");
		branche2Auswahl.options[3] = new Option("Veranstalter -  Messen/Kongresse/Seminare", "Veranstalter_MessenKongresseSeminare");
	}
	
	
	else if (branche1Auswahl.options[branche1Auswahl.selectedIndex].value == "Media")
	{
		branche2Auswahl.options[0] = new Option("Trade press/online portals", "Trade pressonlineportals");
		branche2Auswahl.options[1] = new Option("Book publishers", "Bookpublishers");
		branche2Auswahl.options[2] = new Option("Bookstores", "Bookstores");
		branche2Auswahl.options[3] = new Option("Event organisers – trade fairs/congresses/seminars", "Eventorganisers-trade_fair_scongresses_seminars");
	}


	else if (branche1Auswahl.options[branche1Auswahl.selectedIndex].value == "IT")
	{
		branche2Auswahl.options[0] = new Option("Hardware", "Hardware");
		branche2Auswahl.options[1] = new Option("Software", "Software");
	}


	else if (branche1Auswahl.options[branche1Auswahl.selectedIndex].value == "WissenschaftForschung")
	{
		branche2Auswahl.options[0] = new Option("Hochschulen/Universitäten", "HochschulenUniversitaeten");
		branche2Auswahl.options[1] = new Option("Institute/Forschungseinrichtungen", "InstituteForschungseinrichtungen");
	}
	
	
	else if (branche1Auswahl.options[branche1Auswahl.selectedIndex].value == "Scienceandresearch")
	{
		branche2Auswahl.options[0] = new Option("Colleges/universities", "Collegesuniversities");
		branche2Auswahl.options[1] = new Option("Institutes/research institutions", "Institutesresearchinstitutions");
	}


	else if (branche1Auswahl.options[branche1Auswahl.selectedIndex].value == "VerbaendeOrganisationenInstitutionen")
	{
		branche2Auswahl.options[0] = new Option("Verbände, Organisationen", "Verbande_Organisationen");
	}
	
	
	else if (branche1Auswahl.options[branche1Auswahl.selectedIndex].value == "Associations/organisations/institutions")
	{
		branche2Auswahl.options[0] = new Option("Associations/organisations/institutions", "Associations_organisations_institutions");
	}


	else if (branche1Auswahl.options[branche1Auswahl.selectedIndex].value == "Private")
	{
		branche2Auswahl.options[0] = new Option("Private", "Private");
	}
}

$(document).ready(function() {
	$('#buyers_guide-orderentry').submit(function() {
		var laenge = $('#text').val().length;
		if(laenge >= 81) {
			alert("Der eingegebene Text ist zu lang (" + laenge + " Zeichen)\nBitte kürzen Sie ihn auf 80 Zeichen.");
		}
		return false;
	});
});
