// JavaScript Document // Anfang Funktion für onLoad-Event function onLoadPage (){ // centerWrite(); // zentriert den Content // preloadImages(); // läd top button Image // popup('../dev.php', 'dev', 50, 50, "status=yes"); } // Ende unktion für onLoad-Event // Anfange Netscape resize fix function MM_reloadPage(init) { //reloads the window if Nav4 resized if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }} else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload(); } MM_reloadPage(true); // Ende Netscape resize fix // Formularüberprüfung function check(object, exclude, toggle_to_title){ var i = 0; if(!toggle_to_title) var toggle_to_title = false; else var toggle_to_title = true; if(!exclude) var exclude = ""; while(i != object.length){ if( ( (!object[i].value && object[i].type=='text') || (object[i].value == 0) ) && exclude.search(object[i].name)==-1){ if(toggle_to_title) alert("'"+object[i].titel+"' darf nicht leer sein"); else alert("'"+object[i].name+"' darf nicht leer sein"); object[i].focus(); return false; } i++; } } // Ende Formularüberprüfung // prüfung ob http:// am anfang eines strings steht function complete_url(obj){ var http_str = "http://"; if(obj.value.substring(0,7) != http_str){ obj.value = http_str + obj.value; } } // ende prüfung ob http:// am anfang eines strings steht // feld value löschen function clear_field(obj, pretext){ if(obj.value == pretext){ obj.value = ''; } } // ende feld value löschen // popup fenster function popup(file,name,breite,hoehe,option){ if ((hoehe+20)>=screen.height){hoehe=screen.height-100;option=option+',scrollbars=yes';} var left = (screen.width/2)-(breite/2) var top = (screen.height/2)-(hoehe/2) window.open(file,name,'width='+breite+',height='+hoehe+',left='+left+',top='+top+', resizable=yes, location=no,'+option); } // ende popup fenster // repositioniert das MainDiv auf der Startseite mittig function centerWrite(){ if(navigator.appName.indexOf ("Netscape") != -1){ if(navigator.appVersion.substring(0,1) == "4") { // alert ('NS4'); // window.location.href = "ns.html"; } else { // alert ('NS anders'); var winWidth = document.width; var docleft = (winWidth - 770) / 2; var strdl = docleft + "px"; document.getElementById("divmain").style.left=strdl; } swapclass(document.all.divmain, 'show','',''); } else { var iewinWidth = document.all.docbody.offsetWidth; var iedocleft = (iewinWidth - 770) / 2; var iestrdl = iedocleft + "px"; document.all.divmain.style.left = iestrdl; swapclass(document.all.divmain, 'show','',''); // alert ('IE'); } } // repositioniert das MainDiv auf der Startseite mittig // wechslet die CSS-Klasse eines Objektes function swapclass(obj, toggle, classA, classB){ var nodeObj = obj; var attrMax = nodeObj.attributes.length for(var j = 0; j < attrMax; j++) { // Attribut class suchen if(nodeObj.attributes.item(j).nodeName == 'class'){ // vorhandene Klasse abfragen if(toggle == 'toggle'){ if(nodeObj.attributes.item(j).nodeValue == classA){ // erfordert die CSS Klassen show und hide! nodeObj.attributes.item(j).nodeValue = classB; } else { nodeObj.attributes.item(j).nodeValue = classA; } } else { nodeObj.attributes.item(j).nodeValue= toggle; } } } } // Ende wechslet die CSS-Klasse eines Objektes // Funktionen für Rollover Buttons function newImage(arg) { if (document.images) { rslt = new Image(); rslt.src = arg; return rslt; } } function changeImage(obj, srcfile) { if (document.images && (preloadFlag == true)) { obj.src = srcfile; } } var preloadFlag = false; function preloadImages() { if (document.images) { top_over = newImage("../images/button/top/top-over.gif"); preloadFlag = true; } } // Ende Funktionen für Rollover Buttons //////////////////////////////////////////////////////////////////////////////////////// // popup ////////////////////// function popup(file,name,breite,hoehe,option){ if (( hoehe + 20 ) >= screen.height){ hoehe = screen.height-100; option = option + ',scrollbars=yes'; } var left = (screen.width/2)-(breite/2) var top = (screen.height/2)-(hoehe/2) window.open(file ,name ,'width=' + breite + ',height=' + hoehe + ',left=' + left + ',top=' + top + ', resizable=no, location=no,' + option); }