function checkForm(fields) {
	fields_splitted = fields.split(",");
	
	sendForm = true;
	for(i=0;i<fields_splitted.length;i++) {
		if(document.getElementById(fields_splitted[i]).value == '') {
			document.getElementById(fields_splitted[i]).style.backgroundColor = '#ffe3bd';
			sendForm = false;
		} else {
			document.getElementById(fields_splitted[i]).style.backgroundColor = '#ffffff';
		}
	}
	
	if(!sendForm) {
		alert('Du hast nicht alle benötigten Felder ausgefüllt. Die fehlenden Eingaben wurden markiert.');
	}
	
	return sendForm;
}

function addDefaultText(id,text) {
	$('textarea#'+id).val(text);
	$('textarea#'+id).addClass('inactive');
	
	// focus action
	$('textarea#'+id).focus(function(){
		if($('textarea#'+id).val() == text) {
			$('textarea#'+id).val('');
			$('textarea#'+id).removeClass('inactive');
		}
	});
	
	// blur action
	$('textarea#'+id).blur(function(){
		if($('textarea#'+id).val() == '') {
			$('textarea#'+id).val(text);
			$('textarea#'+id).addClass('inactive');
		}
	});
}
