// JavaScript Document
function enable_menues_for_ie()
{
	if (document.all)
	{
        uls = document.getElementsByTagName('UL');

        for(i = 0; i < uls.length; i++)
        {
            if (uls[i].id == 'hnavi')
            {
                var lis = uls[i].getElementsByTagName('LI');

                for (i = 0; i < lis.length; i++)
                {
                    if(lis[i].lastChild.tagName == 'UL')
                    {
                        lis[i].onmouseover = function() { this.lastChild.style.display = 'block'; }
                        lis[i].onmouseout = function() { this.lastChild.style.display = 'none'; }
                    }
                }
            }
        }
    }
}
function pic(bild,width,height) {
        MeinFenster = window.open("oeffner.php?bildpos=" + bild, "oeffner", "scrollbars=0,toolbar=0,location=0,directories=0,status=0,resizable=0,width="+width+",height="+height);
		MeinFenster.focus();
}
$(document).ready(function(){
	base_url = document.location.href.substring(0, document.location.href.indexOf('index.php'), 0);	
	$(".lightbox").lightbox({
		fitToScreen: true,
		imageClickClose: false
	});
});
/*
-----------------------
Pop Up Fenster mit Angaben zur Position
-----------------------
*/
var win=null;
function NewWindow(mypage,myname,w,h,pos){
if(pos=="random"){LeftPosition=(screen.availWidth)?Math.floor(Math.random()*(screen.availWidth-w)):50;TopPosition=(screen.availHeight)?Math.floor(Math.random()*((screen.availHeight-h)-75)):50;}
if(pos=="center"){LeftPosition=(screen.availWidth)?(screen.availWidth-w)/2:50;TopPosition=(screen.availHeight)?(screen.availHeight-h)/2:50;}
if(pos=="default"){LeftPosition=200;TopPosition=200}
else if((pos!="center" && pos!="random" && pos!="default") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes';
win=window.open(mypage,myname,settings);
if(win.focus){win.focus();}}
