You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
375 lines
14 KiB
JavaScript
375 lines
14 KiB
JavaScript
var adresse = window.location.href;
|
|
/********************************
|
|
/* Browser bestimmen
|
|
/* gibt Browsernamen in kurzer Form zurück
|
|
*******************************************/
|
|
function getBrowser(){
|
|
|
|
var a = document.all;
|
|
var b = document.layers;
|
|
var c = document.getElementById;
|
|
var d = navigator.userAgent.search(/Firefox/);
|
|
var e = navigator.userAgent.search(/Opera/);
|
|
// var f = navigator.userAgent.search(/Netscape/);
|
|
|
|
if ( (a) && (c) && (e = -1) ) {
|
|
// return ('IE_ab_5');
|
|
return ('IE');
|
|
}
|
|
else if ( (a) && !(c) && (e = -1) ) {
|
|
// return ('IE_bis_4');
|
|
return ('IE');
|
|
}
|
|
else if (d != -1) {
|
|
return ('FF');
|
|
}
|
|
else if (b) {
|
|
// return('NS_bis_4');
|
|
return ('NS');
|
|
}
|
|
else if ( !(b) && (c) ) {
|
|
// return('NS_ab_6');
|
|
return ('NS');
|
|
}
|
|
else if (e != -1) {
|
|
return ('OP');
|
|
}
|
|
|
|
}
|
|
|
|
VERARBEITUNG_STOP = false;
|
|
IO_TYP_FILE = false;
|
|
|
|
/********************************
|
|
/* name - name of the desired cookie
|
|
/* return string containing value of specified cookie or null
|
|
/* if cookie does not exist
|
|
********************************/
|
|
function getCookie(name) {
|
|
|
|
var dc = document.cookie;
|
|
var prefix = name + "=";
|
|
var begin = dc.indexOf("; " + prefix);
|
|
if (begin == -1) {
|
|
begin = dc.indexOf(prefix);
|
|
if (begin != 0) return null;
|
|
} else
|
|
begin += 2;
|
|
var end = document.cookie.indexOf(";", begin);
|
|
if (end == -1)
|
|
end = dc.length;
|
|
return unescape(dc.substring(begin + prefix.length, end));
|
|
|
|
}
|
|
|
|
/********************************
|
|
/*
|
|
/*
|
|
/* Überprüfe die Standardbedingungen
|
|
/*
|
|
/*
|
|
********************************/
|
|
|
|
if (adresse.search(/file/) != -1){
|
|
if (!navigator.javaEnabled()){
|
|
alert('Please enable Java - install the Java runtime');
|
|
VERARBEITUNG_STOP = true;
|
|
}else{
|
|
IO_TYP_FILE = true;
|
|
}
|
|
}
|
|
|
|
if (!navigator.cookieEnabled){
|
|
alert('Please enable Cookies');
|
|
VERARBEITUNG_STOP = true;
|
|
}
|
|
|
|
/**********************************
|
|
/* name - name of the cookie
|
|
/* value - Value of the cookie
|
|
/* expDays - number of day to expire, if assigned null or omitted one day is assumed
|
|
/* [path] - path of the cookie (must be same as path used to create cookie)
|
|
/* [domain] - domain of the cookie (must be same as domain used to
|
|
/* create cookie)
|
|
/* path, domain and securedefault if assigned null or omitted if no explicit
|
|
/* argument proceeds
|
|
***********************************/
|
|
|
|
function setCookie(name, value, expDays, path, domain, secure) {
|
|
|
|
var today = new Date();
|
|
var expires = new Date();
|
|
|
|
if (value==null){
|
|
value = 'aktiv';
|
|
}
|
|
|
|
if (expDays==null || expDays==0) expDays=MAX_TAGE;
|
|
|
|
expires.setTime(today.getTime() + 3600000*24*expDays);
|
|
|
|
var curCookie = name + "=" + escape(value) +
|
|
";expires=" + expires.toGMTString() +
|
|
((path) ? "; path=" + path : "") +
|
|
((domain) ? "; domain=" + domain : "") +
|
|
((secure) ? "; secure" : "");
|
|
document.cookie = curCookie;
|
|
|
|
}
|
|
|
|
//
|
|
// Holt ein Cookie und überprüfe ob es in einem array ist,
|
|
// wenn nicht, wird das default gesetzt
|
|
// u_typ ist der name des Cookies
|
|
//
|
|
function getCookieInit(u_name,u_array,u_def){
|
|
|
|
var lcookie = getCookie(u_name);
|
|
for(var i=0;i<u_array.length;i++){
|
|
if (lcookie == u_array[i]){
|
|
break;
|
|
}
|
|
}
|
|
if (i == u_array.length){
|
|
lcookie = u_def;
|
|
setCookie(u_name,lcookie);
|
|
}
|
|
return lcookie;
|
|
|
|
}
|
|
|
|
document.writeln('<link rel="stylesheet" href="css/default.css" type="text/css">');
|
|
|
|
// STATISCHE INITS
|
|
|
|
Cookie_Menueebene = CookieBasisName+'menue-';
|
|
Cookie_Sprache = CookieBasisName+'sprache-';
|
|
Cookie_letzteSeite = CookieBasisName+'letzteSeite-';
|
|
Cookie_Anker = CookieBasisName+'anker';
|
|
Cookie_Css = CookieBasisName+'css-';
|
|
Cookie_Closeall = CookieBasisName+'close';
|
|
Cookie_Leiste = CookieBasisName+'leiste-';
|
|
Cookie_Leiste_Offen = CookieBasisName+'leisteOffen-';
|
|
Cookie_Leiste_Daten = CookieBasisName+'leisteDaten-';
|
|
Cookie_Leiste_Fixieren = CookieBasisName+'leisteFixieren-';
|
|
// Achtung auch im php/setadmin berichtigen, damit das Adminbit richtig gesetzt wird (auch Cookiebasisname)
|
|
// Wird dann aufgerufen mit http://localhost/html-doku/adminindex.php?aktion=admin
|
|
Cookie_Admin = CookieBasisName+'AdMiN';
|
|
|
|
ADMIN = false;
|
|
|
|
// Ajax (online laden)
|
|
xmlHttpMax = 20; // Maximale gleichzeiteige Ladevorgänge
|
|
xmlHttp = new Array(); // Ajax Handler
|
|
|
|
// Maximale Tage, die ein Cookie gültig ist
|
|
MAX_TAGE = 999;
|
|
|
|
|
|
// Menue Array
|
|
navKnoten = null; // Menue
|
|
htmlKnoten = null; // Html
|
|
menueKnoten = null; // MenueKnoten
|
|
infoKnoten = null; // Info
|
|
suchKnoten = null // SuchKnoten
|
|
|
|
// Adminbit
|
|
Admin = false; // Ob Admin oder Normaler Benutzer
|
|
|
|
// Files laden - Asynchron
|
|
RECURSIVETIMEOUT = 300; // Recursives Timeout auf 0.3 sekunde setzten (300 ms)
|
|
// Wiederaufruf für asynchrones lesen
|
|
RECURSIVEMAXZEIT = 10; // Maximal 10 Sekunden wird das ganze versucht
|
|
RECURSIVEMAXZAEHLER = RECURSIVEMAXZEIT*(1/(RECURSIVETIMEOUT/1000)); // Zaehler für aufrufversuche
|
|
|
|
// Sprache
|
|
SPRACHE = null; // Globale Konstante für Sprache
|
|
|
|
// Menueeditor aktivieren
|
|
EDITMENUE = false;
|
|
|
|
ERRORSEITE = true; // Errorseite Anzeigen bei File lesen not found
|
|
NOERRORSEITE = false; // Errorseite nicht Anzeigen bei File lesen not found
|
|
|
|
ERRORPAGE = '<center><br><br>'+ // Errorpage
|
|
'<img title="Under construction" src="images/defaults/under_constructionXXX.gif"></img>'+
|
|
'<br><br>YYY'+
|
|
'</center><br><br>';
|
|
ErrorzMax = 39; // Maximale Bildanzahl 0-39
|
|
|
|
|
|
//<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>
|
|
objekteSprache = new Array(); // Für Menueeditor
|
|
//<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>
|
|
|
|
Fertig_holeDatenhtml = true; // Daten holen
|
|
Fertig_holeDateninfo = true; // Daten holen
|
|
Fertig_holeDatenz = 0; // Timeoutzähler
|
|
Fertig_holeAnker = false; // Ankerdaten holen
|
|
Fertig_holeAnkerz = 0; // Timeoutzähler
|
|
Fertig_holeWinleiste = false; // Winleiste holen
|
|
Fertig_holeSuchleiste = false; // Suchleiste holen
|
|
Fertig_holePopupleiste = false; // Popupleiste holen
|
|
Fertig_initLeiste = true; // Fenster öffnen
|
|
Fertig_holeWiederH = 0; // Wiederherstellung muss Datenaden abwarten
|
|
Fertig_holeSuche = false; // Files holen und darin suchen
|
|
Fertig_holeSuchesperr = false; // Files holen und darin suchen
|
|
Fertig_holeSuchez = 0; // Files holen und darin suchen
|
|
Fertig_holePopupsperr = false; // Files für Popup
|
|
|
|
// Leiste HTML
|
|
WINLEISTE = null;
|
|
SUCHLEISTE = null;
|
|
HILFELEISTE = null;
|
|
POPUPLEISTE = null;
|
|
|
|
// Untermenue
|
|
UNTERMENUE = new Array();
|
|
UNTERMENUEZ = 0;
|
|
|
|
// Andere Menues einblenden
|
|
MENUESTATE = null;
|
|
|
|
// Verschieben von objekte
|
|
MOBJEKT = null;
|
|
Maus_X = 0;
|
|
Maus_Y = 0;
|
|
Maus_X_diff = 0;
|
|
Maus_Y_diff = 0;
|
|
|
|
|
|
// InitState
|
|
INIT_STATE = true;
|
|
INIT_STATE_LOAD = true;
|
|
|
|
// Leistenzähler
|
|
MAX_LEISTE = 10; // Maximale Leisten pro Windowstyp
|
|
|
|
HTML_LEER = '<div></div>';
|
|
HTML_NIX = '<!---->';
|
|
|
|
SUCHSTRING = '';
|
|
SUCHSTRAKT = '<span style="background-color: rgb(252, 228, 199); color: black; text-decoration:overline underline blink;">';
|
|
SUCHSTRDEAKT = '</span>';
|
|
// a = close aktuelles fenster schliessen
|
|
// b = allclose alle Fenster schliessen
|
|
// c = closeMenueListe aktuelle Menueliste schliessen
|
|
// d = closeAllMenueListe alle Menuelistenfenster schliessen
|
|
// e = defaultposLeiste Defaultposition definieren
|
|
// f = totop zum Seitenanfang
|
|
// g = suche Suchfenster öffnen
|
|
// h = Leiste_zu Fenster zumachen
|
|
// i = Leiste_auf Fenster aufmachen
|
|
// j = unfixiereLeiste Leiste nicht fixieren
|
|
// k = fixiereLeiste Leiste fixieren
|
|
// l = closeFavoriten Favoriten schliessen
|
|
// m = openFavoriten Favoriten öffnen
|
|
// n = aktionsbuttons aktivieren
|
|
// o = aktionsbuttons deaktivieren
|
|
// p = Menueleisteinhalt neu laden
|
|
// q = Menueleiste neu laden
|
|
// r = Suche resetten Suche neu laden
|
|
// y = closeHilfe Hilfefenster schliessen
|
|
// z = initHilfe HIlfefenster öffnen
|
|
// Menueleiste
|
|
Window_Typ = new Object();
|
|
Window_Button = new Object();
|
|
Window_Max = new Object();
|
|
Window_Farbe = new Object();
|
|
Window_LBreite = new Object();
|
|
Window_RBreite = new Object();
|
|
Window_Wrap = new Object();
|
|
Window_Hoehe = new Object();
|
|
Window_MinBreite = new Object();
|
|
|
|
Window_Typ['MenueListe'] = 'ML';
|
|
Window_Button['MenueListe'] = 'cdekhfgmnqpz'; // Achtung reload (p) immer bei z lassen (wird vom Programm gewartet !!!!
|
|
Window_Max[Window_Typ['MenueListe']] = 6; // Maximale Fensteranzahl
|
|
Window_Farbe['MenueListe'] = 'blau'; // Farbe: blau,gelb,gruen,turquoise,grau
|
|
Window_LBreite['MenueListe'] = 150; // Defaultbreite des gesammten Fensters
|
|
Window_RBreite['MenueListe'] = 250; // Defaultbreite des linken Teil des Fensters
|
|
Window_Hoehe['MenueListe'] = 100; // Defaulthöhe des Windows
|
|
Window_Wrap['MenueListe'] = 'nowrap'; // Wie mit dem Überhang umgegangen wird
|
|
Window_MinBreite['MenueListe'] = Window_Button['MenueListe'].length*35;// (Buttons mal 35) Minimale Breite des Fensters, da sonst dieButtons springen
|
|
|
|
Window_Typ['Suche'] = 'SU';
|
|
Window_Button['Suche'] = 'abehfmnrz';
|
|
Window_Max[Window_Typ['Suche']] = 4; // Maximale Fensteranzahl
|
|
Window_Farbe['Suche'] = 'gruen'; // Farbe: blau,gelb,gruen,turquoise,grau
|
|
Window_LBreite['Suche'] = Window_LBreite['MenueListe']; // Defaultbreite des gesammten Fensters
|
|
Window_RBreite['Suche'] = Window_RBreite['MenueListe']; // Defaultbreite des linken Teil des Fensters
|
|
Window_Hoehe['Suche'] = 50; // Defaulthöhe des Windows
|
|
Window_Wrap['Suche'] = 'nowrap'; // Wie mit dem Überhang umgegangen wird
|
|
Window_MinBreite['Suche'] = Window_Button['Suche'].length*35; // Minimale Breite des Fensters, da sonst dieButtons springen
|
|
|
|
Window_Typ['Favoriten'] = 'FA';
|
|
Window_Button['Favoriten'] = 'lhfgnz';
|
|
Window_Max[Window_Typ['Favoriten']] = 1; // Maximale Fensteranzahl
|
|
Window_Farbe['Favoriten'] = 'gelb'; // Farbe: blau,gelb,gruen,turquoise,grau
|
|
Window_LBreite['Favoriten'] = Window_LBreite['MenueListe']; // Defaultbreite des gesammten Fensters
|
|
Window_RBreite['Favoriten'] = Window_RBreite['MenueListe']; // Defaultbreite des linken Teil des Fensters
|
|
Window_Hoehe['Favoriten'] = 50; // Defaulthöhe des Windows
|
|
Window_Wrap['Favoriten'] = 'nowrap'; // Wie mit dem Überhang umgegangen wird
|
|
Window_MinBreite['Favoriten'] = Window_Button['Favoriten'].length*35; // Minimale Breite des Fensters, da sonst dieButtons springen
|
|
|
|
Window_Typ['Hilfe'] = 'HI';
|
|
Window_Button['Hilfe'] = 'yh';
|
|
Window_Max[Window_Typ['Hilfe']] = 1; // Maximale Fensteranzahl
|
|
Window_Farbe['Hilfe'] = 'turquoise'; // Farbe: blau,gelb,gruen,turquoise,grau
|
|
Window_LBreite['Hilfe'] = 50; // Defaultbreite des gesammten Fensters
|
|
Window_RBreite['Hilfe'] = 500; // Defaultbreite des linken Teil des Fensters
|
|
Window_Hoehe['Hilfe'] = 500; // Defaulthöhe des Windows
|
|
Window_Wrap['Hilfe'] = 'normal'; // Wie mit dem Überhang umgegangen wird
|
|
Window_MinBreite['Hilfe'] = 550; // Minimale Breite des Fensters, da sonst dieButtons springen
|
|
|
|
Window_Typ['Info'] = 'IF';
|
|
Window_Button['Info'] = '';
|
|
Window_Max[Window_Typ['Info']] = 1; // Maximale Fensteranzahl
|
|
Window_Farbe['Info'] = 'grau'; // Farbe: blau,gelb,gruen,turquoise,grau
|
|
Window_LBreite['Info'] = 50; // Defaultbreite des gesammten Fensters
|
|
Window_RBreite['Info'] = 50; // Defaultbreite des linken Teil des Fensters (Für Info nicht relevant)
|
|
Window_Hoehe['Info'] = 50; // Defaulthöhe des Windows
|
|
Window_Wrap['Info'] = 'normal'; // Wie mit dem Überhang umgegangen wird
|
|
Window_MinBreite['Info'] = 100; // Minimale Breite des Fensters, da sonst dieButtons springen
|
|
|
|
|
|
Window_Typ['Popup'] = 'PO';
|
|
Window_Button['Popup'] = 'ahgq';
|
|
Window_Max[Window_Typ['Popup']] = 1; // Maximale Fensteranzahl
|
|
Window_Farbe['Popup'] = 'blau'; // Farbe: blau,gelb,gruen,turquoise,grau
|
|
Window_LBreite['Popup'] = 0; // Defaultbreite des gesammten Fensters
|
|
Window_RBreite['Popup'] = 500; // Defaultbreite des linken Teil des Fensters
|
|
Window_Hoehe['Popup'] = 100; // Defaulthöhe des Windows
|
|
Window_Wrap['Popup'] = 'normal'; // Wie mit dem Überhang umgegangen wird
|
|
Window_MinBreite['Popup'] = 501; // Minimale Breite des Fensters, da sonst dieButtons springen
|
|
|
|
// Bei neuer Farbe auch im CSS anpassen !!!!!!!!
|
|
|
|
|
|
ZINDEX = 1; // Ebene für Fenster
|
|
|
|
//******************************************************************
|
|
//
|
|
//
|
|
// Hier beginnt der Code
|
|
//
|
|
//
|
|
//******************************************************************
|
|
BROWSER = getBrowser();
|
|
|
|
browser_css = getCookieInit(Cookie_Css,Css_Auswahl,Css_Default);
|
|
SPRACHE = getCookieInit(Cookie_Sprache,Sprache_Auswahl,Sprache_Default);
|
|
if (!VERARBEITUNG_STOP){
|
|
document.writeln('<link rel="stylesheet" href="css/'+browser_css+'" type="text/css">');
|
|
if (BROWSER == 'FF'){
|
|
document.writeln('<link rel="stylesheet" href="css_ffox/'+browser_css+'" type="text/css">');
|
|
}else{
|
|
document.writeln('<link rel="stylesheet" href="css_msie/'+browser_css+'" type="text/css">');
|
|
}
|
|
// Buttons und Rtf zum Schluss
|
|
document.writeln('<link rel="stylesheet" href="css/buttons.css" type="text/css">');
|
|
document.writeln('<link rel="stylesheet" href="css/rtf.css" type="text/css">');
|
|
|
|
document.writeln('<script language="Javascript" type="text/javascript" src="js/funktionen.js"></script>');
|
|
document.writeln('<script language="Javascript" type="text/javascript" src="js/basis-'+SPRACHE+'.js"></script>');
|
|
} |