// JavaScript Document

function activeInput (input) {
	
	input.className = 'active';
	
	input.select();
	
}

function inactiveInput (input) {
	
	input.className = '';
	
}


function clearfield(field,defaultvalue) {	

	try {

		var testfield = document.getElementById(field);

		if (testfield.value == defaultvalue) {

			testfield.value = "";

		}

	} catch (e) {}

}



var countdown = "31"; 

function count() {
	
	if (countdown > 1){
    	countdown--
	}
	else{
		document.getElementById('countdown').style.display = "none";
		document.getElementById('countdownInfo').style.display = "block";
	}
	
	var s = countdown;
	var h = Math.floor(s/3600);
	var m = Math.floor((s - (h * 3600))/60);
	s = (s-(h*3600))%60
	
	
	window.setTimeout('count()',1000)
	
	var anzeige = document.getElementById('sec');
	
	if (anzeige != null) {
		anzeige.value = s;
	}
		
	
	
}

//disable the countdown
//count();

