
function checkForm()
{
	var status;
	
	//kategorie in die hochgeladen werden soll
	if (document.uploadForm.uploadtype.value == "...")
	{
		//falls feld leer
		alert(unescape("bitte kategorie ausw%E4hlen"));
		document.uploadForm.uploadtype.focus();
		document.uploadForm.uploadtype.style.backgroundColor = "#ebf2d7";
		status = false;
		return false;
	}
	
	if (document.uploadForm.uploadfile.value == "" && document.uploadForm.uploadtype.value != "texte")
	{
		//falls feld leer
		alert(unescape("bitte datei f%FCr upload ausw%E4hlen"));
		document.uploadForm.uploadfile.focus();
		document.uploadForm.uploadfile.style.backgroundColor = "#ebf2d7";
		status = false;
		return false;
	}
	
	if (document.uploadForm.textentry.value == "" && document.uploadForm.uploadtype.value == "texte")
	{
		//falls feld leer
		alert(unescape("bitte text eintippen oder reinkopieren"));
		document.uploadForm.textentry.focus();
		document.uploadForm.textentry.style.backgroundColor = "#ebf2d7";
		status = false;
		return false;
	}
	
	//name die die datei auf sequenz.net erhalten soll
	if (document.uploadForm.filetitle.value == "")
	{
		//falls leer
		alert("gib deinem werk bitte einen namen");
		document.uploadForm.filetitle.focus();
		document.uploadForm.filetitle.style.backgroundColor = "#ebf2d7";
		status = false;
		return false;
	}
	
	//benutzername
	if (document.uploadForm.name.value == "")
	{
		//falls leer
		alert("bitte einen benutzernamen angeben");
		document.uploadForm.name.focus();
		document.uploadForm.name.style.backgroundColor = "#ebf2d7";
		status = false;
		return false;
	}else
	{
		//falls ausgefuellt
		var name = document.uploadForm.name.value;
		var filter  = /^([a-zA-Z0-9_\-])+$/;
		if (filter.test(name))
		{
			status = true;
		}
		else 
		{
			alert(name + unescape(" enth%E4lt ung%FCltige zeichen %28erlaubt%3A a-z%2C 0-9%2C _%2C -%29"));
			document.uploadForm.name.value = name;
			document.uploadForm.name.focus();
			document.uploadForm.name.style.backgroundColor = "#ebf2d7";
			status = false;
			return false;
		}
	}
	

	if (document.uploadForm.electronicmail.value == "")
	{
		alert("bitte e-mail angeben (wird nicht angezeigt)");
		document.uploadForm.electronicmail.focus();
		document.uploadForm.electronicmail.style.backgroundColor = "#ebf2d7";
		status = false;
		return false;
	}else
	{
		var email = document.uploadForm.electronicmail.value;
		var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
		if (filter.test(email))
		{
			status = true;
		}
		else 
		{
			alert(email + unescape(" scheint keine g%FCltige email adresse zu sein"));
			document.uploadForm.electronicmail.value = "";
			document.uploadForm.electronicmail.focus();
			document.uploadForm.electronicmail.style.backgroundColor = "#ebf2d7";
			status = false;
			return false;
		}
	}
	
	if (status == true)
	{
		return;
	}
}

function blend(o, opOutParam, opInParam) {
	
	if (opInParam != null) {
		opIn = opInParam;
	}
	else {
		opIn = 100;
	}
	
	if (opOutParam != null) {
		opOut = opOutParam;
	}
	else {
		opOut = 80;
	}
	
	o.style.Opacity = (opOut / 100);
	o.style.MozOpacity = (opOut / 100);
	o.style.KhtmlOpacity = (opOut / 100);
	o.style.filter = "alpha(opacity=" + opOut + ")";
	
	o.onmouseout = function() {
		o.style.Opacity = (opIn / 100);
		o.style.MozOpacity = (opIn / 100);
		o.style.KhtmlOpacity = (opIn / 100);
		o.style.filter = "alpha(opacity=" + opIn + ")";
	}
}

function defeatSpam(user, host)
{
	self.location="mailto:" + user + "@" + host;
}