function sendForm(formName, requiredData){
	
	var Errors	= 0; //Zählt die Fehler
	
	for(var i = 0; i < requiredData.length; i = i+1){
		
		//document.getElementById(requiredData[i][1]).className	= "";
		var fieldName = requiredData[i][1];
		document.forms[formName][fieldName].className = "";
		
		switch(requiredData[i][0]){
			case "email":
			var data = document.forms[formName][fieldName].value;
			if(!data.match('^([a-zA-Z0-9\\-\\.\\_]+)'+'(\\@)([a-zA-Z0-9\\-\\.]+)'+'(\\.)([a-zA-Z]{2,4})$')){
				document.forms[formName][fieldName].className	= "error";
				Errors++;
			}
			break;
			/*************************************/
			default:
			if(document.forms[formName][fieldName].value == ""){
				document.forms[formName][fieldName].className	= "error";
				Errors++;
			}
			break;
		}
	}
	
	if(Errors==0){
		document.forms[formName].Submit.disabled = "disabled";
		document.forms[formName].submit();
	}
}

function addOption(formName, fieldName){
	var Source = document.forms[formName][fieldName+"_source"];
	var Destination = document.forms[formName][fieldName];
	if(Source.selectedIndex != -1){
		var newOption = new Option(Source.options[Source.selectedIndex].text, Source.options[Source.selectedIndex].value);
		Destination.options[Destination.options.length] = newOption;
		Source.options[Source.selectedIndex] = null;
	}
}

function removeOption(formName, fieldName){
	var Source = document.forms[formName][fieldName+"_source"];
	var Destination = document.forms[formName][fieldName];
	if(Destination.selectedIndex != -1){
		var newOption = new Option(Destination.options[Destination.selectedIndex].text, Destination.options[Destination.selectedIndex].value);
		Source.options[Source.options.length] = newOption;
		Destination.options[Destination.selectedIndex] = null;
	}
}

function upperOption(formName, fieldName){
	var Source = document.forms[formName][fieldName];
	if(Source.selectedIndex != -1 && Source.selectedIndex!= 0 && Source.options.length>1){
		//Options werden gesichert und gelöscht
		var SelectedIndex = Source.selectedIndex;
		var Lower		= new Array();
		var Upper		= new Array();
		Lower["text"] 	= Source.options[SelectedIndex-1].text;
		Lower["value"]	= Source.options[SelectedIndex-1].value;
		Upper["text"] 	= Source.options[SelectedIndex].text;
		Upper["value"] 	= Source.options[SelectedIndex].value;
		
		Source.options[SelectedIndex].text 	= Lower["text"];
		Source.options[SelectedIndex].value	= Lower["value"];
		Source.options[SelectedIndex-1].text	= Upper["text"];
		Source.options[SelectedIndex-1].value	= Upper["value"];
		
		Source.selectedIndex = SelectedIndex-1;
	}
}

function lowerOption(formName, fieldName){
	var Source = document.forms[formName][fieldName];
	if(Source.selectedIndex != -1 && Source.selectedIndex!= Source.options.length-1 && Source.options.length>1){
		//Options werden gesichert und gelöscht
		var SelectedIndex = Source.selectedIndex;
		var Lower		= new Array();
		var Upper		= new Array();
		Lower["text"] 	= Source.options[SelectedIndex+1].text;
		Lower["value"]	= Source.options[SelectedIndex+1].value;
		Upper["text"] 	= Source.options[SelectedIndex].text;
		Upper["value"] 	= Source.options[SelectedIndex].value;
		
		Source.options[SelectedIndex].text 	= Lower["text"];
		Source.options[SelectedIndex].value	= Lower["value"];
		Source.options[SelectedIndex+1].text	= Upper["text"];
		Source.options[SelectedIndex+1].value	= Upper["value"];
		
		Source.selectedIndex = SelectedIndex+1;
	}
}