function toSt2(n) {
  s = '';
  if (n < 10) s += '0';
  return (s + n).toString();
}
function toSt3(n) {
  s = '';
  if (n < 10) s += '00';
  else if (n < 100) s += '0';
  return (s + n).toString();
}
function countdown() {
  d = new Date();
  count = Math.floor(end.getTime() - d.getTime());
  if(count > 0) {
    miliseconds = toSt3(count%1000); count = Math.floor(count/1000);
    seconds = toSt2(count%60); count = Math.floor(count/60);
    minutes = toSt2(count%60); count = Math.floor(count/60);
    hours = toSt2(count%24); count = Math.floor(count/24);
    days = count;
    document.getElementById('tage').innerHTML = days + ' TAGE';
    document.getElementById('stunden').innerHTML = hours + ':' + minutes + ':' + seconds
    setTimeout('countdown()', 100);
  }
}


function changeBody(fontSize){
 Schrift = fontSize;
 switch (fontSize){
   case "normal":
     document.getElementById("zoom_normal").className = "toolon";
     document.getElementById("zoom_gross").className = "text_switch";
     document.getElementById("zoom_groesser").className = "text_switch";
     document.getElementsByTagName("body")[0].style.fontSize = "100.1%";
     break;
   case "gross":
     document.getElementById("zoom_normal").className = "text_switch";
     document.getElementById("zoom_gross").className = "toolon";
     document.getElementById("zoom_groesser").className = "text_switch";
     document.getElementsByTagName("body")[0].style.fontSize = "125.1%";
     break;
   case "groesser":
     document.getElementById("zoom_normal").className = "text_switch";
     document.getElementById("zoom_gross").className = "text_switch";
     document.getElementById("zoom_groesser").className = "toolon";
     document.getElementsByTagName("body")[0].style.fontSize = "150.1%";
          break;
   }
}

function awopenwin(url, width, height)
	{
	if (width > screen.width - 120)
		{
		width = screen.width - 140;
		}

	if (height > screen.height - 160)
		{
		height = screen.height - 160;
		}

	awpopwin=window.open(url,"awopenwin","toolbar=0,location=1,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,copyhistory=0,height=" + height + ",width=" + width);
	awpopwin.focus();
	}



function awfotowin(url, width, height)
	{
	if (width > screen.width - 120)
		{
		width = screen.width - 140;
		}

	if (height > screen.height - 160)
		{
		height = screen.height - 160;
		}

	awpopfotowin=window.open(url,"awopenfotowin","toolbar=0,location=1,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,copyhistory=0,height=" + height + ",width=" + width);
	awpopfotowin.focus();
	}

function awgoto(optionObj) 
	{
	window.location.href = optionObj.options[optionObj.selectedIndex].value;
	}

