function setPointer(theRow, thePointerColor) {
    if(thePointerColor == '' || typeof(theRow.style) == 'undefined') {
        return false;
    }
    if(typeof(document.getElementsByTagName) != 'undefined') {
        var theCells = theRow.getElementsByTagName('td');
    } else if(typeof(theRow.cells) != 'undefined') {
        var theCells = theRow.cells;
    } else {
    return false;
	}
	var rowCellsCnt  = theCells.length;
    for(var c = 0; c < rowCellsCnt; c++) {
        theCells[c].style.backgroundColor = thePointerColor;
    }
    return true;
}
function CheckLen(Target) {
    StrLen = Target.value.length
    if (StrLen == 1 && Target.value.substring(0,1) == " ") {
            Target.value = ""
            StrLen = 0}
    if (StrLen > 1234 ) {
    	Target.value = Target.value.substring(0,1200)
    	alert("Schluss! \nDas wird mir sonst zuviel. \nSchreibt jetzt noch zu Ende, \nmit restlich [ 33 ] Zeichen.");
    	CharsLeft = 0}
    else {
    CharsLeft = 1234 - StrLen}
    document.kuerbispost.Anzahl.value = CharsLeft
}

function CheckLen2(Target) {
    StrLen = Target.value.length
    if (StrLen == 1 && Target.value.substring(0,1) == " ") {
            Target.value = ""
            StrLen = 0}
    if (StrLen > 334 ) {
    	Target.value = Target.value.substring(0,300)
    	alert("Schluss! \nDas wird mir sonst zuviel. \nSchreibt jetzt noch zu Ende, \nmit restlich [ 33 ] Zeichen.");
    	CharsLeft = 0}
    else {
    CharsLeft = 334 - StrLen}
    document.gast.Anzahl.value = CharsLeft
}

function kuerbispostcheck() {

	var zu = document.forms.kuerbispost;

	if ((zu.email.value == "") || (zu.email.value == "") || (zu.email.value.indexOf('@', 0) == -1) || (zu.email.value.indexOf('.', 0) == -1)) {
		zu.email.focus();
		return;
	}
	
	document.forms.kuerbispost.submit();
}

function gasteintragcheck() {

	var zu = document.forms.gast;

	if (zu.text.value == "") {
      $check = confirm("Arno's Gaestebuch\nŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ\n\nI\nN\tMoechtest Du keinen Eintrag \nF\tin meinem Gaestebuch vornehmen?\nO");
     	if($check == true) 
		{
			zu.text.focus(); return;
		}
			else
		{

		history.go( -1 );
		return ; }
	}

	if ((zu.name.value == "") || (zu.name.value == "Name, Vorname")) {
        alert("Arno's Gaestebuch\nŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ\n\nI\nN\tBitte Deinen Namen \nF\tin das Feld eingeben!\nO");
		zu.name.focus();
		return;
	}

	if ((zu.city.value == "") || (zu.city.value == "Wohnort")) {
        alert("Arno's Gaestebuch\nŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ\n\nI\nN\tBitte Deinen Wohnort \nF\tin das Feld eingeben!\nO");
		zu.city.focus();
		return;
	}

	if ((zu.mail.value == "") || (zu.mail.value == "") || (zu.mail.value.indexOf('@', 0) == -1) || (zu.mail.value.indexOf('.', 0) == -1)) {
        alert("Arno's Gaestebuch\nŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ\n\nI\nN\tBitte Deine E-Mail \nF\tin das Feld eingeben!\nO");
		zu.mail.focus();
		return;
	}

    
	if ((zu.site.value.indexOf('//', 0) == -1) || (zu.site.value.indexOf('.', 0) == -1)) {
      $check2 = confirm("Arno's Gaestebuch\nŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ\n\nI\nN\tBitte Deine korrekte Internetadresse eingeben, \nF\toder das Feld einfach ganz leer lassen!\nO");
     	if($check2 == true) 
		{
			zu.site.focus(); return;
		}
		else {
        	(zu.site.value == "http://www.");
		}


	

	}

	document.forms.gast.submit();
}