var menu_aktiv = "";
var resObjekt;
resObjekt = createXMLHttpRequest();
//Portable Funktion zum Erzeugen eines XMLHttpRequest-Objekts
function createXMLHttpRequest() {
var req = null;
try {
req = new ActiveXObject("MSXML2.XMLHTTP");
}
catch (err_MSXML2) {
try {
req = new ActiveXObject("Microsoft.XMLHTTP");
}
catch (err_Microsoft) {
if (typeof XMLHttpRequest != "undefined")
req = new XMLHttpRequest;
}
}
return req;
}
function handleResponse(){
if(resObjekt.readyState == 4){
if(resObjekt.responseText == "refresh") location.replace('./');
else document.getElementById("kopfpic").innerHTML = resObjekt.responseText;
}
}
function loadKopfpicbg(bildpfad){
document.getElementById("kopfpicbg").style.backgroundImage = "url(" + bildpfad + ")";
setTimeout("switchKopfpic()", 5000);
}
function switchKopfpicbg(zufall){
var bildpfad = "bilder/layout/kopfpic/" + zufall + ".jpg";
document.getElementById("kopfpicbg").style.backgroundImage = "url(" + bildpfad + ")";
}
function switchKopfpic(){
document.getElementById("kopfpic").style.display = "none";
var bildpfad = "bilder/layout/kopfpic/";
var zufall = Math.round(Math.random()*9+1);
resObjekt.open('get', 'include/switchkopfpic.php?do=switch&bild='+bildpfad+zufall,true);
resObjekt.onreadystatechange = handleResponse;
resObjekt.send(null);
setTimeout("appearKopfpic(" + zufall + ")", 5000);
}
function appearKopfpic(zufall){
//Überprüfen ob Ajax-Objekt fertig geladen ist.
if(!(resObjekt.readyState == "4")) setTimeout("appearKopfpic()", 0);
else{
new Effect.Appear(document.getElementById("kopfpic"), 1000);
setTimeout("switchKopfpicbg(" + zufall + ")", 1000);
setTimeout("switchKopfpic()", 1000);
}
}
function setLayout(){
var head = document.getElementById("head");
var content = document.getElementById("content");
var foot = document.getElementById("foot");
content.style.height = (screen.availHeight - head.offsetHeight - foot.offsetHeight - 100) + "px";
setInterval("showScrollHeight()", 1);
}
function showScrollHeight(){
var foot = document.getElementById("foot");
foot.style.bottom = -document.body.scrollTop;
//alert(document.body.scrollTop);
}
function NaviBGOver(navi){
var nv = document.getElementById(navi);
nv.style.backgroundColor = "#666666";
nv.style.color = "#ffffff";
}
function NaviBGOut(navi){
var nv = document.getElementById(navi);
nv.style.backgroundColor = "";
nv.style.color = "#ffffff";
}
function NaviLeftPointShow(site){
var s = document.getElementById(site);
s.src = "bilder/punktgelb.gif";
}
function NaviLeftPointHide(site){
var s = document.getElementById(site);
s.src = "bilder/punkttrans.gif";
}
function Menu(label, mw, mh, fnt, fs, fclr, fhclr, bg, bgh, halgn, valgn, pad, space, to, sx, sy, srel, opq, vert, idt, aw, ah)
{
this.version = "020320 [Menu; mm_menu.js]";
this.type = "Menu";
this.menuWidth = mw;
this.menuItemHeight = mh;
this.fontSize = fs;
this.fontWeight = "plain";
this.fontFamily = fnt;
this.fontColor = fclr;
this.fontColorHilite = fhclr;
this.bgColor = "#555555";
this.menuBorder = 1;
this.menuBgOpaque=opq;
this.menuItemBorder = 1;
this.menuItemIndent = idt;
this.menuItemBgColor = bg;
this.menuItemVAlign = valgn;
this.menuItemHAlign = halgn;
this.menuItemPadding = pad;
this.menuItemSpacing = space;
this.menuLiteBgColor = "#ffffff";
this.menuBorderBgColor = "#777777";
this.menuHiliteBgColor = bgh;
this.menuContainerBgColor = "#cccccc";
this.childMenuIcon = "arrows.gif";
this.submenuXOffset = sx;
this.submenuYOffset = sy;
this.submenuRelativeToItem = srel;
this.vertical = vert;
this.items = new Array();
this.actions = new Array();
this.childMenus = new Array();
this.hideOnMouseOut = true;
this.hideTimeout = to;
this.addMenuItem = addMenuItem;
this.writeMenus = writeMenus;
this.MM_showMenu = MM_showMenu;
this.onMenuItemOver = onMenuItemOver;
this.onMenuItemAction = onMenuItemAction;
this.hideMenu = hideMenu;
this.hideChildMenu = hideChildMenu;
if (!window.menus) window.menus = new Array();
this.label = " " + label;
window.menus[this.label] = this;
window.menus[window.menus.length] = this;
if (!window.activeMenus) window.activeMenus = new Array();
}
function addMenuItem(label, action) {
this.items[this.items.length] = label;
this.actions[this.actions.length] = action;
}
function FIND(item) {
if( window.mmIsOpera ) return(document.getElementById(item));
if (document.all) return(document.all[item]);
if (document.getElementById) return(document.getElementById(item));
return(false);
}
function writeMenus(container) {
if (window.triedToWriteMenus) return;
var agt = navigator.userAgent.toLowerCase();
window.mmIsOpera = agt.indexOf("opera") != -1;
if (!container && document.layers) {
window.delayWriteMenus = this.writeMenus;
var timer = setTimeout('delayWriteMenus()', 500);
container = new Layer(100);
clearTimeout(timer);
} else if (document.all || document.hasChildNodes || window.mmIsOpera) {
document.writeln('');
container = FIND("menuContainer");
}
window.mmHideMenuTimer = null;
if (!container) return;
window.triedToWriteMenus = true;
container.isContainer = true;
container.menus = new Array();
for (var i=0; i