<!--
	var dostop = 0;
	var Start = new Date();
	function timer_start() { 
		dostop = 0;
  		for (var i = 1; i <= 100; i++ ) {
			if ( document.getElementById( "timer"+i )) {
	     			var params = document.getElementById( "timer"+i ).title.split( "_" );
	      			var time = parseInt( params[1] );
	      			var type = params[3];
	      			timer( "timer"+i, time, type );
    			}
  		}
	}
                                                                                                                                                            
	function timer( timer, time, type ) {
  		var Now = new Date();
  		var t = time - Math.floor( ( Now.getTime() - Start.getTime() ) / 1000 );
  		if ( t > 0 ) {
    			var h = Math.floor( t / 3600 );
    			var m = Math.floor( ( t - h * 3600 ) / 60 );
    			var s = t - h * 3600 - m * 60;
    			if ( type == 1 || type == 3) {
      				if ( h == 0 ) h = "";
      				else h = h + ":";
      				if ( m == 0 && h == 0 ) m = "";
      				else m = m + ":";
      				if ( s == 0 && m == 0 && h == 0 ) s = "00";
      				else s = s + "";
        			if ( s < 10 ) s = "0" + s;
      				document.getElementById( timer ).firstChild.nodeValue = h + m + s;
      			}
        		else if ( type == 2 ) {
      				if ( m < 10 ) m = "0" + m;
      				if ( s < 10 ) s = "0" + s;
      				document.getElementById( timer ).firstChild.nodeValue = h + ":" + m + ":" + s;
      			}
        		if(dostop != 1) window.setTimeout( 'timer( "'+timer+'", "'+time+'", "'+type+'" )', 100 );
        	}
  		else {
    			if ( type == 1 )
    			{
        			document.getElementById( timer ).firstChild.nodeValue= "00";
        			document.location.reload();
    			}
    			else if ( type == 2 ) document.getElementById( timer ).firstChild.nodeValue= "Angekommen";
    			else if ( type == 3 ) document.getElementById( timer ).firstChild.nodeValue= "jetzt";
    		}
	}
	
	if (window && window.innerWidth)
	{
		fensterbreite = window.innerWidth;
	} 
	else if (document && document.body && document.body.offsetWidth)
	{
		fensterbreite = document.body.offsetWidth;
	}
	
	function createRequestObject() {
	var ro;
	if (window.XMLHttpRequest) { // Mozilla, Safari, ...
	ro = new XMLHttpRequest();
	} else if (window.ActiveXObject) { // IE
	ro = new ActiveXObject("Microsoft.XMLHTTP");
	}

	return ro;
	}
	
	var http = createRequestObject();
	
	function sndReq(url) {
	http.open('get', url);
	http.onreadystatechange = handleResponse;
	http.send(null);
	}
	
	function handleResponse() {
		if(http.readyState == 4){
			var response = http.responseText;
			if(response.indexOf('|' != -1)) {
				update = response.split('|@|');
				if(update[0] == "cats")
				{
					document.getElementById(update[1]).innerHTML = update[2];
					document.getElementById(update[3]).style.visibility = update[4];
					document.getElementById(update[5]).href = "javascript:" + update[6] + "cat('" + update[1] + "');";
					document.getElementById(update[7]).src = "images/"+update[8]+".gif";
				}
				if(update[0] == "truppen")
				{
					dostop = 1;
					document.getElementById('showtruppen').innerHTML = update[1];
					document.getElementById('truppen').style.visibility = 'visible';
					Start = new Date();
					Now = new Date();
					window.setTimeout('timer_start()', 300);
				}
			}
		}
	}
	
	function showcat(cat)
	{
		sndReq('cats.php?action=showcat&asyn=1&cat='+cat);
	}
	function hidecat(cat)
	{
		sndReq('cats.php?action=hidecat&asyn=1&cat='+cat);
	}
	function openlink(url)
	{
		sndReq(url);
	}
	
	function fbuild()
	{
		if(document.getElementById('fbuild').checked == 0)
		{
			sndReq('fbuild.php?action=disable');
			alert("deaktiviert");
		}
		else
		{
			sndReq('fbuild.php?action=enable');
			alert("aktiviert");
		}
	}
	
	function shownotes()
	{
		document.getElementById('notes').style.visibility = 'visible';
	}
	function hidenotes()
	{
		document.getElementById('notes').style.visibility = 'hidden';
	}
	function updatenotes()
	{
		var notes = document.getElementById('notestext').value;

		//notes.replace(/\n/, "%0A");
		
		out = "\n"; 
		add = "%0a"; 
		temp = "" + notes; 
		while (temp.indexOf(out)>-1) 
		{ 
			pos= temp.indexOf(out); 
			temp = "" + (temp.substring(0, pos) + add + temp.substring((pos + out.length), temp.length)); 
		} 
		
		
		sndReq('notes.php?text='+temp);
	}
	
	function showtruppen(show)
	{
		sndReq('truppen.php?pa=1&show='+show);
	}
	function hidetruppen()
	{
		document.getElementById('truppen').style.visibility = 'hidden';
	}
	
	function init()
	{
		timer_start();
	}
	//-->
