
function katch(e){
	if (document.all) {
		keys+=event.keyCode;
	} else {
		keys+=e.keyCode;
	}
	
	if(keys.indexOf(key)!=-1){
		keys="";
		window.setTimeout("newslineLoginLogout()", "50");
	}
}

function turnon (id) {
  var element;
  element=document.getElementById(id);
  if (element.style.display == "block") element.style.display = "none";
  else if (element.style.display == "none") element.style.display = "block";
}

function setFormularfeldDisableState(formularfeldName, state) {
	var feld=eval("document.form1.formularfeld_"+formularfeldName+"_0");
	
	feld.disabled=!state;
	feld.readonly=state;		
}

function disableFormularfeld(formularfeldName) {
	setFormularfeldDisableState(formularfeldName, false);
}

function enableFormularfeld(formularfeldName) {
	setFormularfeldDisableState(formularfeldName, true);
}	

function decodeMailto(s){
	var n=0;
	var r="";
	for(var i=0; i < s.length; i++) {
		n=s.charCodeAt(i);
		if (n>=8364) {n = 128;}
		r += String.fromCharCode(n-(3));
	}
	return r;
}
function openMailto(s){
	location.href=decodeMailto(s);
}


var keys="";
var key="272727";

if (document.all) {
	// IE und Opera
	document.onkeypress=katch;
} else {
	// Firefox und Mozilla
	window.onkeypress=katch;
}

