function createHTTPXMLRequest() {
	var xmlhttp=false;
	/*@cc_on @*/
	/*@if (@_jscript_version >= 5)
	// JScript gives us Conditional compilation, we can cope with old IE versions.
	// and security blocked creation of the objects.
	 try {
	  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	 } catch (e) {
	  try {
	   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	  } catch (E) {
	   xmlhttp = false;
	  }
	 }
	@end @*/
	if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
	  xmlhttp = new XMLHttpRequest();
	}

	return xmlhttp;
}



function showhide(elementName) {
	el = document.getElementById(elementName);
	if(el.style.display=='none') {
		el.style.display = 'block';
	} else {
		el.style.display = 'none';	
	}
}


function showhideAndSend(elementName, url) {
	vis = '0';
	el = document.getElementById(elementName);
	if(el.style.display=='none') {
		el.style.display = 'block';
		vis = '1';
	} else {
		el.style.display = 'none';
		vis = '0';
	}
	
	xmlhttp = createHTTPXMLRequest();
	if (xmlhttp != undefined) {
		xmlhttp.open("GET", url+vis,true);
 		xmlhttp.onreadystatechange=function() {
  			if (xmlhttp.readyState==4) {
   				 ; //alert(xmlhttp.responseText);
  			}
 		}
 		xmlhttp.send(null);
 	}
}
 	

function confirmLink(theLink, themsg)
{

    var is_confirmed = confirm('Wollen Sie dieses wirklich loeschen:\n'+themsg);
    if (is_confirmed) {
        theLink.href += '&is_js_confirmed=1';
    }

    return is_confirmed;
}