function show(id) {
	if (document.getElementById(id)) {
     if (document.getElementById(id).style.display == 'none')
     {
          document.getElementById(id).style.display = '';
     }
	}
}

function hide(id) {
	document.getElementById(id).style.display = 'none';
}

function uploadFile(URL) {
	window.open(URL, 'Upload', 'width=520,height=120,top=300,left=300,scrollbars=no,resizable=no');
}

function createRequestObject() {
	var ro;
	var browser = navigator.appName;
	if(browser == "Microsoft Internet Explorer"){
		ro = new ActiveXObject("Microsoft.XMLHTTP");
	}else{
		ro = new XMLHttpRequest();
	}
	return ro;
}

var http = createRequestObject();

function sendRequest(action,id) {
	http.open('get', '/include/ajax.asp?action='+action+'&id='+id);
	if (action == 'Ausgaben') {
		http.onreadystatechange = handleResponse;
	} else {
		http.onreadystatechange = handleResponse2;		
	}
	http.send(null);
}

var supportsKeys = false;
var Signature = '';

function calcCharLeft(f,Feld,Chars,Counter) {
 clipped = false;
 maxLength = Chars;
 if (Feld.value.length > maxLength) { 
  Feld.value = Feld.value.substring(0,maxLength);
  charleft = 0;
  clipped = true;
 } else {
  charleft = maxLength - Feld.value.length;
 }
 Counter.value = charleft;
 return clipped;
}

function textKey(f,Feld,Chars,Counter) {
 supportsKeys = true;
 calcCharLeft(f,Feld,Chars,Counter);
}

