function m(nr,zustand) {
        if (zustand=="0" && sel!=nr) {document.images['menu'+nr].src = "grafik/m"+nr+".gif";}
        if (zustand=="1" && sel!=nr) {document.images['menu'+nr].src = "grafik/m"+nr+"b.gif";}
}
function klickzumg(zustand) {
        if (zustand=="0") {document.images['klickzum'].src = "grafik/bklickzumglueck.gif";}
        if (zustand=="1") {document.images['klickzum'].src = "grafik/bklickzumglueckb.gif";}
}

function suche(e,v) {
	var k;
	if (window.event) k = window.event.keyCode;
	else if (e) k = e.which;

	if(k == 13) {
		location.href="index.php?id=3&suche="+v;	
	}

}

function sucheinarbeit(e,v) {
	var k;
	if (window.event) k = window.event.keyCode;
	else if (e) k = e.which;

	if(k == 13) {
		location.href="inarbeit.php?id=3&suche="+v;	
	}

}

function isTouchDevice(){
	try{
		document.createEvent("TouchEvent");

		return true;
	}catch(e){

		return false;
	}
}

function touchScroll(id){
	if(isTouchDevice()){ 
		var el=document.getElementById(id);
		var scrollStartPos=0;

		document.getElementById(id).addEventListener("touchstart", function(event) {
			scrollStartPos=this.scrollTop+event.touches[0].pageY;
		},false);

		document.getElementById(id).addEventListener("touchmove", function(event) {
			this.scrollTop=scrollStartPos-event.touches[0].pageY;
						event.preventDefault();
		},false);
	}
}



