// javascript DHMTL - funktionen
// author: alexander stier, cuti & stier gbr
// datum: 09.08.2004

function UnCryptMailto( s ){
		var n = 0;
		var r = "";
		for( var i = 0; i < s.length; i++){
				n = s.charCodeAt( i );
				if( n >= 8364 ){
						n = 128;
				}
				r += String.fromCharCode( n - 1 );
		}
		return r;
}

function linkTo_UnCryptMailto( s ){
		location.href=UnCryptMailto( s );
}

function rollover(Bild)
{
	with (document.images[Bild])
	src = (src.indexOf("0") != -1) ? src.replace(/0/, "1") : src.replace(/1/, "0");
}

function openPopUp(url,name,top,left,width,height,scrollbars,toolbar,status,location)
{
	thirdParameter = 'top=' + top + ',left=' + left + ',width=' + width + ',height=' + height + ',scrollbars=' + scrollbars + ',toolbar=' + toolbar + ',status=' + status + ',location=' + location + ',resizable=1,menubar=no';
	openpUpObj = window.open(url,name,thirdParameter);
	openpUpObj.focus();
}

function validateAnfrage(form)
{
	if (form.name.value == "")
	{ alert("Bitte geben Sie Ihren Namen an !"); form.name.focus(); return false; }
	if (form.anschrift.value == "")
	{ alert("Bitte geben Sie Ihre Anschrift an !"); form.anschrift.focus(); return false; }
	if (form.plz.value == "")
	{ alert("Bitte geben Sie Ihre Postleitzahl an !"); form.plz.focus(); return false; }
	if (form.ort.value == "")
	{ alert("Bitte geben Sie Ihren Wohnort an !"); form.ort.focus(); return false; }
	if (form.telefon.value == "")
	{ alert("Bitte geben Sie Ihre Telefonnummer an !"); form.telefon.focus(); return false; }

	if (form.email.value == "")
	{ alert("Bitte geben Sie Ihre e-mail-Adresse an !"); form.email.focus(); return false; }
	if (form.email.value.indexOf('@', 0) == -1 ||	form.email.value.indexOf('.', 0) == -1)
	{ alert("Bitte geben Sie ein g&uuml;ltige E-Mail-Adresse an !"); form.email.focus(); return false; }

	if (form.tag.value == "00" || form.monat.value == "00" || form.jahr.value == "0000")
	{ alert("Bitte geben Sie Ihr vollst&auml;ndiges Geburtsdatum an !"); form.tag.focus(); return false; }

	return true;
}

