function openwindow(titel,bild,w,h) {
    var wt = w + 40;
    var ht = h + 160;
    var typo3path = "";
    var serverurl = "http://" + window.location.host + typo3path;
    var nav = (navigator.appName.indexOf ("Netscape") >= 0) ? true : false;
    if (nav) {
        var fB = window.innerWidth;
        if (fB < wt) {
            var features = "innerWidth=" + fB + ",innerHeight=" + ht;
        } else {
            var features = "innerWidth=" + wt + ",innerHeight=" + ht;
        }
    } else {
        var fB = document.body.clientWidth;
        if (fB < wt) {
            var features = "width=" + fB + ",height=" + ht;
        } else {
            var features = "width=" + wt + ",height=" + ht;
        }
    }
    features += ",top=0,left=0,scrollbars=no,toolbar=no,directories=no,status=no,resizable=yes,menubar=no";
    var kdgimg = window.open(serverurl + "/kdg_pic.php?Titel=" + titel + "&Langbild=" + bild,"kdg",features);
    kdgimg.focus();
}
function fenster(url,name,weite,hoehe){ window.open(url, name, 'width='+weite+',height='+hoehe+',scrollbars=0,status=0,menubar=0,resizable=0,location=0,toolbar=0') }






/* objekte ------------------------------------------ */

CF = {};

CF.fkt = {};
CF.fkt.cancelEvent = function (event) {
	event.cancelBubble = true;
	if (event.stopPropagation)
		event.stopPropagation();
	return true;
}


function cfMouseOverInfoBoxManager () {
	this.items = [];
	this.visibleBox = null;
	this.timer = null;
}


p = cfMouseOverInfoBoxManager.prototype;

p.hideAll = function () {
	this.StopClearTimer();
	for (var i in this.items) 
		if (this.items[i].owner == this)
			this.items[i].hide();
}


p.init = function (event,sender,boxID) {
	this.hideAll();
	if (!this.items[boxID]) {
		var popupLyr = document.getElementById(boxID); 
		var item = new cfMouseOverInfoBox(this,boxID,sender,popupLyr);
		this.items[boxID] = item;
	}
	var pos = this.getPos(event);
	if (this.items[boxID]) 
		this.items[boxID].show(pos.x,pos.y);
}

p.getPos = function (e) {
	var event = (e)?e:window.event;
	if (!event)
		return ;
	var result = [];
	if (document.	documentElement) {
		result['x'] = (event.pageX)?event.pageX:event.clientX+document.documentElement.scrollLeft;
		result['y'] = (event.pageY)?event.pageY:event.clientY+document.documentElement.scrollTop;
	} else {
		result['x'] = (event.pageX)?event.pageX:event.clientX+document.body.scrollLeft;
		result['y'] = (event.pageY)?event.pageY:event.clientY+document.body.scrollTop;
	}
	return result;
}


p.setVisibleBox = function (box,x,y) {
	this.StopClearTimer();
	this.hideAll();
	this.visibleBox = box;
	if (this.visibleBox)
		this.visibleBox.show(x,y);
}


p.StartClearTimer = function () {
	this.StopClearTimer();
	var self = "CF.moibm.HandleClearTimer();"; 
	this.timer = window.setInterval(self, 600);
}

p.StopClearTimer = function () {
	if (this.timer)
		window.clearInterval(this.timer);
	this.timer = null;
}



p.HandleClearTimer = function () {
	this.StopClearTimer();
	this.setVisibleBox();
}

	
	
	


CF.moibm = new cfMouseOverInfoBoxManager();


function cfMouseOverInfoBox (owner,boxID,elementLyr,popupLyr) {
	this.owner = owner;
	this.boxID = boxID;
	this.elementLyr = elementLyr;
	this.popupLyr = popupLyr;
	this.visible = false;
	
	this.connectEvents();
	this.offsetX = 15;
	this.offsetY = -10;
}

p = cfMouseOverInfoBox.prototype;


p.connectEvents = function () {
	var self = this;
	this.elementLyr.onmouseover = function (event) {self.elemMouseOver(event); }
	this.elementLyr.onmouseout = function (event) {self.elemMouseOut(event); }

	this.popupLyr.onmouseover = function (event) {self.popupMouseOver(event); }
	this.popupLyr.onmouseout = function (event) {self.popupMouseOut(event); }
	this.visible = false;
}


p.hide = function () {
	this.popupLyr.style['display'] = 'none';
	this.visible = false;
}



p.show = function (x,y) {
	this.popupLyr.style['position'] = 'absolute';
	this.popupLyr.style['left'] = (x+this.offsetX)+'px';
	this.popupLyr.style['top'] = (y+this.offsetY)+'px';
	this.popupLyr.style['display'] = 'block';
	this.visible = true;
}


p.elemMouseOver = function (e) {
	if (e) CF.fkt.cancelEvent(e);
	if (!this.visible) {
		var pos = this.owner.getPos(e);
		this.owner.setVisibleBox(this,pos.x,pos.y);
	}
	this.owner.StopClearTimer();
}

p.elemMouseOut = function (e) {
	if (e) CF.fkt.cancelEvent(e);
	this.owner.StartClearTimer();
}

p.popupMouseOver = function (e) {
	if (e) CF.fkt.cancelEvent(e);
	this.owner.StopClearTimer();
}

p.popupMouseOut = function (e) {
	if (e) CF.fkt.cancelEvent(e);
	this.owner.StartClearTimer();
}
