

	function loginfocus(){
        if ( anmeldung.user.value == 'Ihre Emailadresse' ) {
    	    anmeldung.user.value='';
        }

        if ( anmeldung.pw.value == 'Passwort' ) {
    	    anmeldung.pw.value='';
        }
    }
    
	function FensterOeffnen (Adresse) {
		if (typeof popupWidth == 'undefined'){
			popupWidth = "600";
	    }
	    if (typeof popupHeight == 'undefined'){
	    	popupHeight = "400";
	    }
	    if (typeof popupTitle == 'undefined'){
	    	popupTitle = "";
	    }
		
		var MeinFenster = window.open(Adresse, popupTitle, "width=" + popupWidth + ",height=" + popupHeight + ",scrollbars=yes");
		MeinFenster.focus();
	}
	
	function inputin(element1, value1){
	
		if(element1.value == value1)
		{
			element1.value = "";
		}
		element1.style.backgroundColor="#ffffff";	
		element1.valueold = value1;
	}
	
	function inputout(element1, value1){
		
		if(element1.value == "")
		{
			element1.value = value1;
		}
		element1.style.backgroundColor="#ffffff";
	}
	
	function textBox_AddToIntValue(targetId,addToValue)
	{
	    var input = document.getElementById(targetId);
	    var textInt = parseInt(input.value);
	    if(isNaN(textInt))
	    {
	        textInt = 0;
	    }
	    if((textInt + addToValue) >= 0){
	    	input.value = textInt + addToValue;
	    }
	}

	//EDIT FUNCTIONS
	function inputIfSavedIn(element1, value1){
		
		//element1.style.backgroundColor = "";
		
	}
	function inputIfSavedOut(element1, value1){
	
		if(element1.value != value1){
			element1.style.backgroundColor = "#c2ffb5";
			element1.style.borderColor = "#000000";
			element1.style.borderWidth = "1px";
		} else {
			element1.style.backgroundColor = "";
		}
		if(element1.value == ""){
			element1.style.backgroundColor = "#ffb5b5";
			element1.style.borderColor = "#000000";
			element1.style.borderWidth = "1px";
		}
	}
	
	function onLinkClick(queryString){
	
		var http = null;
		if (window.XMLHttpRequest) {
			http = new XMLHttpRequest();
		} else if (window.ActiveXObject) {
			http = new ActiveXObject("Microsoft.XMLHTTP");
		}
		if (http != null) {
		   http.open("GET", "ajax.php?a=1&b=2&c=3&"+queryString, true);
		   http.onreadystatechange = ausgeben;
		   http.send(null);
		}

		function ausgeben() {
			if (http.readyState == 4) {
				document.getElementById("ajaxContent").innerHTML =
					http.responseText;
			}
		}
	}
	
	function changeAddRowCount(elementValue){
		
		var http = null;
		if (window.XMLHttpRequest) {
			http = new XMLHttpRequest();
		} else if (window.ActiveXObject) {
			http = new ActiveXObject("Microsoft.XMLHTTP");
		}
		
		if (http != null) {
		   http.open("POST", "sites/admin/adddata.inc.php", true);
		   http.onreadystatechange = ausgeben;
		   http.setRequestHeader(
			  "Content-Type",
			  "application/x-www-form-urlencoded");
		   http.send("ajax=true&addCount="+elementValue);
		}


		function ausgeben() {
			if (http.readyState == 4) {
				document.getElementById("addDataRows").innerHTML =
					http.responseText;
			}
		}
	}

