/* --->>> JavaScript für Hilfe-Dokumente <<<--- */
/* --->>> onLoad <<<--- */
function initHilfe()
{
/*Zurück bzw. Schließen-Link anzeigen*/
e = document.getElementById('linkoben');
if (e)
{ e.className='links';
}
//document.getElementById('linkunten').className='links';
/*Inhaltsverzeichnis ausblenden*/
e = document.getElementById('inhalt');
if (e)
{ e.className='hide_screen_only';
}
/*Wenn ein QandA-DIV vorhanden ist -> initQandA*/
e = document.getElementById('qanda');
if (e)
{ initQandA();
}
}
function initQandA()
{
h4 = document.getElementsByTagName('h4')
for (var i = 0; i < h4.length; i++)
{ t = h4[i].getAttribute('id');
/*Attribute und Klassen setzen*/
t = t.substring(0, t.indexOf('_title')); /*t = ID des Elements*/
titel = document.getElementById(t+'_title');
text = document.getElementById(t+'_text');
bild = document.getElementById(t+'_pic');
if (text)
{ text.className='hide_screen_only';
}
if (titel)
{ titel.className='closed';
titel.onclick = function() {ShowOrHide(this.getAttribute('id'));};
titel.onmouseover = function() {MouseOver(this.getAttribute('id'), '1');};
titel.onmouseout = function() {MouseOver(this.getAttribute('id'), '0');};
titel.title = 'Hier klicken um Text anzuzeigen';
}
if (bild)
{ bild.innerHTML=' ';
}
/*Für alle Links auf der Seite wird automatisch das onClick Event gesetzt*/
links = document.getElementsByName(t+'_link');
for (var j = 0; j < links.length; j++)
{ links[j].onclick = function() {Show(this.getAttribute('name'));};
}
}
/*Wenn URL ein #... enthält, wird dieser Bereich wieder geöffnet*/
index = document.URL.indexOf('#');
if (index > 0)
{ t = document.URL.substring(index+1, document.URL.length);
Show(t);
}
}
function ShowOrHide(t)
{
t = t.substring(0, t.indexOf('_')); /*t = ID des Elements*/
titel = document.getElementById(t+'_title');
text = document.getElementById(t+'_text');
bild = document.getElementById(t+'_pic');
if(titel.className == 'opened' || titel.className == 'opened mouseover')
{ /*Offen -> schließen*/
text.className = 'hide_screen_only';
titel.className = 'closed mouseover';
bild.innerHTML=' ';
titel.title = 'Hier klicken um Text anzuzeigen';
}
else
{ /*Geschlossen -> öffnen*/
text.className = 'show';
titel.className = 'opened mouseover';
bild.innerHTML=' ';
titel.title = 'Hier klicken um Text zu verbergen';
}
}
function Show(t)
{
t = t.substring(0, t.indexOf('_')); /*t = ID des Elements*/
titel = document.getElementById(t+'_title');
text = document.getElementById(t+'_text');
bild = document.getElementById(t+'_pic');
text.className = 'show';
titel.className = 'opened';
bild.innerHTML=' ';
}
function MouseOver(t, h)
{
t = t.substring(0, t.indexOf('_')); /*t = ID des Elements*/
titel = document.getElementById(t+'_title');
if (h == '1')
{ titel.className = titel.className.replace(' mouseover', '') + ' mouseover';
}
else
{ titel.className = titel.className.replace(' mouseover', '');
}
}