


////////////////////////////////////////////////// Galerie //////////////////////////////////////////////////////////////////////

/*
function slideLeft(id){
				var currPos = parseInt(document.getElementById(id).getAttribute('value'));
				
				if(parseInt(document.getElementById(id).style.width) > 750)  {
					if(currPos > 0) {
						if(parseInt(currPos-645) < 0) {
							currPos = 0;
							//document.getElementById(id).style.right = currPos+"px";
							left(currPos,parseInt(currPos-645),id);
							document.getElementById(id).setAttribute('value',currPos);
						}
						else {
							//document.getElementById(id).style.right = parseInt(currPos-654)+"px";
							left(currPos,parseInt(currPos-645),id);
							document.getElementById(id).setAttribute('value',parseInt(currPos-645));
						}
					}
				}
			}
			
			function slideRight(id) {
				var currPos = parseInt(document.getElementById(id).getAttribute('value'));
				var width = parseInt(document.getElementById(id).style.width);
				var imagesCount = parseInt(document.getElementById(id).getAttribute('title'));
				var mod = parseInt(imagesCount%5);
				//alert(mod);
				//alert(imagesCount);
				if(mod == 0 && imagesCount > 5) {
					var maxPos = parseInt(width-645);
					if(parseInt(currPos+645) > maxPos) {
						right(currPos,maxPos,id);
						//document.getElementById(id).style.right = maxPos+"px";
						document.getElementById(id).setAttribute('value',maxPos);
					}

					
					else if(parseInt(document.getElementById(id).style.width) > 750) {
						right(currPos,parseInt(currPos+645),id);
						//document.getElementById(id).style.right = parseInt(currPos+654)+"px";
						document.getElementById(id).setAttribute('value',parseInt(currPos+645));
					}
				}
				else if(mod > 0) {
					
					if(parseInt(width-currPos) > parseInt(mod*131+10)) {
						right(currPos,parseInt(currPos+645),id);
						//document.getElementById(id).style.right = parseInt(currPos+654)+"px";
						document.getElementById(id).setAttribute('value',parseInt(currPos+654));
					}
				}
			}


			function right(curr,stop,id) {
				if(curr == stop) {
				}
				else if(curr < stop) {

					if(parseInt(curr+20) > stop) {
						document.getElementById(id).style.right = stop+"px";
					}
					else {
						document.getElementById(id).style.right = parseInt(curr+20)+"px";
						setTimeout("right("+parseInt(curr+20)+","+stop+",'"+id+"');",1);
					}
				}
			}
			function left(curr,stop,id) {
				if(curr == stop) {
				}
				else if(curr > stop) {

					if(parseInt(curr-20) < stop) {
						document.getElementById(id).style.right = stop+"px";
					}
					else {
						document.getElementById(id).style.right = parseInt(curr-20)+"px";
						setTimeout("left("+parseInt(curr-20)+","+stop+",'"+id+"');",1);
					}
				}
			}
			
			
			
	*/		
			
////////////////////////////////////////////////// branchen box //////////////////////////////////////////////////////////////////////			
			
			function disabled_box(frm, status)
			{
				with (frm)
					for (var i = 0; i < elements.length; i++)
						if ((elements[i].type == 'checkbox') && (elements[i].checked == false))
							elements[i].disabled = (status > 5) ? true : false;
			}

			function test_box(frm)
			{
				var zaehler = 0;

				with (frm)
				{
					for (var i = 0; i < elements.length; i++)
					{
						if ((elements[i].type == 'checkbox') && (elements[i].checked == true))
							zaehler++;

						disabled_box(frm, zaehler);
					}
				}
			}
			
					
