// counter bis zur wahl
var end = new Date('September 28, 2008 17:00:00');
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('counter').innerHTML = days;
    setTimeout('countdown()', 100);
  }
}

// submit new statement
function FillIn (partei) {
	var typ
	if (partei == "spoe") {typ = "Werner Faymann"}
	else if (partei == "oevp") {typ = "Wilhelm Molterer"}
	else if (partei == "gruene") {typ = "Alexander Van der Bellen"}
	else if (partei == "fpoe") {typ = "Heinz Christian Strache"}
	else if (partei == "bzoe") {typ = "J&ouml;rg Haider"}
	else if (partei == "lif") {typ = "Heide Schmidt"}
	else if (partei == "lfd") {typ = "Fritz Dinkhauser"}
	else if (partei == "kpoe") {typ = "Mirko Messner"}
	else {typ = ""}
	
	document.newstatement.typ.value = typ ;
}