
	
var newWin;
var xPath = "http://www.weinhaus-neuerburg.de/scripts/x/x_core.js";

function imgPopUp(cont,text, winname,w,h,scroll) {
	var width1 = (w)? (w) : 700;
	var height1 = (h)? (h) : 500;
	var width = 10;
	var height = 10;
	var left = parseInt((screen.availWidth/2) - (width1/2));
	var top = parseInt((screen.availHeight/2) - (height1/2));
	var scrolling = (scroll == 1)? ',scrollbars=yes, resizable=yes, menubar=no' : ',scrollbars=no, resizable=yes, menubar=no'
	var param = "width=" + width + ", height=" + height + ", left=" + left + ", top=" + top; 
	newWin = window.open("", winname, param + scrolling);
	newWin.resizeTo(10, 10);
		setTimeout("putInWindow('" + cont + "', '" + text + "')", 50);
		newWin.focus();
	return false;
}


function putInWindow(cont, text) {
	var newCont = "<html><head><title>Preview</title>";
	newCont += "<script type='text/javascript' src=" + xPath + "><\/script>\n";
	newCont += "<script>\n";
	newCont += "window.onload=function(){\n";
	newCont += "if(xGetElementById('textBox').innerHTML != ''){\n";
	newCont += "var ih = document.getElementById('img').height;\n";
	newCont += "var th = xHeight('textBox')+10;\n";
	newCont += "var bh = xHeight('body');\n";
	newCont += "var h = ih+th;\n";
	newCont += "var dh = h-bh;\n";
	newCont += "var w = document.getElementById('img').width;\n";
	newCont += "var bw = xWidth('body');\n";
	newCont += "var dw = w-bw;\n";
	//newCont += "alert(ih + ' - ' + th + ' - ' + h);\n";
	newCont += "window.resizeTo(w+8, 0);\n";
	newCont += "window.resizeBy(0, dh);\n";
	//newCont += "window.moveBy(-dw/2, -dh/2);\n";
	newCont += "xTop('textBox', ih);";
	newCont += "xShow('textBox');";
	newCont += "window.focus();";
	newCont += "}\n";
	newCont += "}\n";
	newCont += "\n<\/script>";
	newCont += "</head>";
	newCont += "<body id='body' style='margin: 0; padding: 0; height: 100%'>"
	newCont += "<div style='position: relative; z-index: 1; font: 11px Verdana, sans-serif; color:#8A8A8A; margin-top: 30%; text-align: center;'>Bild wird geladen...</div>";
	newCont += "<div id='imageBox' style='position: absolute; z-index: 100; top: 0'><img id='img' src='"+ cont + "' onclick='window.close();' style='cursor: pointer;' title='Fenster schließen'></div>";
	newCont += "<div id='textBox' style='position: absolute;visibility: hidden; z-index: 100; top: 0;padding: 5px 20px; font: 11px Arial, sans-serif; color:#8A8A8A;'>" + text + "</div>";
	newCont += "</body></html>";
	newWin.document.write(newCont);
	newWin.document.close();
}



var activMenuItem = "";
function enableDropdownMenu(){
  //  if (document.all){
        var uls = document.getElementsByTagName('UL');
        for(var i = 0; i < uls.length; i++){
            if (uls[i].className == 'dropdown'){
                var lis = uls[i].getElementsByTagName('li');
                for (var j = 0; j < lis.length; j++){
                    if(lis[j].lastChild.tagName == 'UL'){
						if (lis[j].className != "activ") {
                       		lis[j].onmouseover = function() { show(this); }
                       		lis[j].onmouseout = function() { hide(this); }
                    	} else {
							activMenuItem = lis[j].lastChild;
						}
					}
                }
            }
        }
   // }
}


function show(obj) {
	obj.lastChild.style.display = 'block';
	obj.lastChild.style.backgroundColor = "#C0234F";
	obj.firstChild.style.backgroundColor = "#C0234F"
	obj.firstChild.style.color = "#F9DAAC"
	//obj.style.position = "relative";
	if (activMenuItem.style) activMenuItem.style.display = 'none';
}
function hide(obj) {
	obj.lastChild.style.display = 'none';
	if (activMenuItem.style) activMenuItem.style.display = 'block';
	obj.firstChild.style.backgroundColor = "transparent"
	obj.firstChild.style.color = "#C0234F"
}
