
var 
  FormName = 'MultiForm',
  InputName = new Array ('Lehrperson', 'Strasse', 'PLZ', 'Ort', 'Email'),
  InputValue = new Array ('Lehrperson', 'Strasse', 'PLZ', 'Ort', 'Email');

function CheckForm ()  {

	var Escape='';
	
	for (var i=0; i<InputName.length; i++) 
		if (document.getElementById(InputName[i]).value=='') Escape = Escape+InputValue[i]+', ';
	
	if (Escape == '') {
		return true;
	}
	else {
		if (Escape.match (/(.+)(, )(\w+),/)) Escape =  'Bitte '+ RegExp['$1'] +' und '+ RegExp['$3'] +' ausfüllen!';
		else if (Escape.match (/(.+),/)) Escape = 'Bitte '+ RegExp['$1'] +' ausfüllen!';
		
		alert (Escape);
		return false;
}	}

function SwapImage (action) {
	if (action=="show")
		document.getElementById('Abschicken').src = "media/Form/Send_active.gif";
	else
		document.getElementById('Abschicken').src = "media/Form/Send.gif";		
}
