/*	ACA Javascripte */
/********************************************************************************/

function showImagePopup(imgsrc, width, height){
	
	width = parseInt(width)+20;
	height = parseInt(height)+10;
	
	var galerieClose = "schließen";
	document.getElementById("grau").innerHTML = "<div id='galerieContainer' class='galerieContainerSingle' style='width:"+width+"px; height:"+height+"px;'><div id='galerieCloser'><a href='javascript:;' onclick='closeGalerie();'><img src='/site_elements/gal/galerie_close.png' /></a></div><img id='galerieImage' src='"+imgsrc+"' /><br /></div>";
	document.getElementById("grau").style.display = "block";
}


function showLoadingPopup(imgsrc, width, height, text){
	
	
	document.getElementById("grauLoading").style.display = "block";
	document.getElementById("grauLoading").style.visibility = "visible";
}


function closeGalerie(){
	document.getElementById("grau").style.display = "none";
}

//** Und jetzt der eigentliche Ajax-Aufruf ***********************************************************//
function ACA_XMLHttpRequest(sUrl,sDiv) {

	var xmlHttp = null;
	
	// Mozilla, Opera, Safari sowie Internet Explorer (ab v7)
	if (typeof XMLHttpRequest != 'undefined') {
			xmlHttp = new XMLHttpRequest();
	}
	if (!xmlHttp) {
			// Internet Explorer 6 und lter
			try {
					xmlHttp  = new gbLayerTimeoutIsActiveXObject("Msxml2.XMLHTTP");
			} catch(e) {
					try {
							xmlHttp  = new gbLayerTimeoutIsActiveXObject("Microsoft.XMLHTTP");
					} catch(e) {
							xmlHttp  = null;
					}
			}
	}
	if (xmlHttp) {
			xmlHttp.open('GET', sUrl, true);

			xmlHttp.onreadystatechange = function () {
					if (xmlHttp.readyState == 4) {
						document.getElementById(sDiv).innerHTML = xmlHttp.responseText;
					}
			};
			xmlHttp.send(null);
	}

}
