function popupClose() {
	var popup = document.getElementById('popupInner');
	var popupDiv = document.getElementById('popupInnerDiv');
	//alert("click");
	popup.style.display = "none";
	popupDiv.style.display = "none";
}
function popupInner() {
	var body = document.getElementsByTagName('body')[0];
	
	var overlay = document.createElement('div');
	//zoomIconImg.src = 'fileadmin/bilder/zoom.png';
	overlay.setAttribute('id', 'popupInner');
	overlay.setAttribute('style', 'position: absolute; left: 0px; top: 0px; width: 100%; height: 100%; z-index: 110;');
	//overlay.setAttribute('onClick', 'popupClose();');
	overlay.innerHTML = '<div style="position: absolute; left: 0px; top: 0px; width: 100%; height: 100%;"><a href="javascript:;" style="cursor: default;" onClick="popupClose();"><img src="fileadmin/bilder/popup/overlay.png" style="width: 100%; height: 100%" /></div>';
	
	var inner = document.createElement('div');
	inner.setAttribute('id', 'popupInnerDiv');
	inner.setAttribute('style', 'position: absolute; left: 0px; top: 0px; width: 100%; background: #ff0000; z-index: 111;');
	inner.innerHTML = '<div style="position: absolute; left: 30%; top: 42px;"><a href="http://www.hotel-neubergerhof.at/pages/aktuelles/"><img style="border: 1px solid #ffffff;" src="fileadmin/bilder/popup/2010-06-07/popup-familien-sommer-hit2.jpg" width="329" height="500" border="0" alt="HIER KLICKEN" usemap="#Map" /></a><a href="javascript:;" onClick="popupClose();" style="position: absolute; left: 0px; top: 478px; z-index: 112;"><img src="fileadmin/bilder/blank.gif" style="width: 329px; height: 21px;" alt="schließen" /></a></div><!--<map name="Map" id="Map"><area shape="rect" coords="192,428,325,453" href="#" /></map>-->';
	
	//var zoomIcon = document.createElement('div');
	//zoomIcon.setAttribute('style', 'position: relative; height: 1px; text-align: right;');
	//zoomIcon.appendChild(zoomIconImg);
	//zoomIcon.className = "zoomIcon";
	//zoomIcon.innerHTML = '<img src="fileadmin/bilder/zoom.png" style="position: absolute; right: -8px; bottom: 0px; border: none;" />';
	
	
	body.appendChild(overlay);
	body.appendChild(inner);
}
if(location.search.indexOf("popup=0")<0){
	// W3C standard
	if (window.addEventListener){
	  window.addEventListener('load', popupInner, false); // NB **not** 'onload'
	}
	// Microsoft
	else if (window.attachEvent){
	  window.attachEvent('onload', popupInner);
	}
}