
function BurgFensterPopup(pTarget, pMenue, pWidth, pHeight) {
	if (pMenue == '') { pMenue = 'menubar=no,location=no,status=yes,toolbar=no,directories=no,resizable=yes,scrollbars=yes'; }
	
	if ((pWidth == '') && (pHeight == '')) return;
			
	win = window.open('', pTarget , pMenue + ',width=' + pWidth + ',height=' + pHeight); 
	if (!document.all) pHeight = parseInt(pHeight)+4;
	win.resizeTo(pWidth, pHeight);
	win.moveTo(0, 0);
}

function BurgDruckPopup(pTarget, pMenue, pWidth, pHeight) {
	if (pMenue == '') { pMenue = 'top=0,left=0,menubar=yes,location=no,status=yes,toolbar=no,directories=no,resizable=yes,scrollbars=yes'; }
	
	if ((pWidth == '') && (pHeight == '')) return;
	if (pHeight == '') {
		pHeight = screen.availHeight - 10;
		if (document.all) pHeight = pHeight - 20;
	}
	
	winDruck = window.open('', pTarget , pMenue + ',width=' + pWidth + ',height=' + pHeight); 
	winDruck.resizeTo(pWidth, pHeight);
}

function BurgFensterPopupUrl(pUrl, pTarget, pMenue, pWidth, pHeight) {
	if (pMenue == '') { pMenue = 'menubar=no,location=no,status=yes,toolbar=no,directories=no,resizable=yes,scrollbars=yes'; }
	
	if ((pWidth == '') && (pHeight == '')) return;
			
	win = window.open(pUrl, pTarget , pMenue + ',width=' + pWidth + ',height=' + pHeight); 
	if (!document.all) pHeight = parseInt(pHeight)+4;
	win.resizeTo(pWidth, pHeight);
	win.moveTo(0, 0);
}

function standortAjax(pHref) {
	if (!pHref) return;
	loadAjaxReq(pHref.replace(/#karte/,'')+'&vorlage=ajax','einrichtung');
	window.scrollTo(0,370);
	return false;
}

function loadAjaxReq(url,elementId) {
	if (!ajax) return true;
	ajax.onreadystatechange = function() {
		doAjaxAction(elementId);
	}
	ajax.open("get", url, true);
	ajax.setRequestHeader('Content-Type','text/xml; charset=ISO-8859-1');
	if (ajax.overrideMimeType) {
		ajax.overrideMimeType('text/xml; charset=ISO-8859-1');
	}
	ajax.send(null);
	return true;
}

function doAjaxAction(elementId) {
	if (ajax.readyState != 4) return;
	if (ajax.status ==200) document.getElementById(elementId).innerHTML = ajax.responseText;
	ajax = getHTTPObject();
}

function getHTTPObject() {
	try {
		var ajaxhttp = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
		try {
			var ajaxhttp = new ActiveXObject("Microsoft.XMLHTTP");
		} catch (e) {
			try {
				var ajaxhttp = new XMLHttpRequest();
			} catch (e) {
				var ajaxhttp = false;
			}
		}
	}
	return ajaxhttp;
}

var ajax = getHTTPObject();
