function setLang(idx) // Aufruf aus "lang.cnt"
{
switch(idx)
{
case 1: // deutsch wurde gewählt
document.forms.lang_cnt.elements[0].value = "de";
break;
default:
document.forms.lang_cnt.elements[0].value = "en";
}
document.forms[0].submit();
}
function auto_locate(filename, seconds)
{
seconds = 1000 * seconds;
window.setTimeout("location.href = '" + filename + "';", seconds);
}
function die(lang) // Aufruf aus "index.php"
{
var text = "";
if(confirm(text))
{
document.forms.index_php.elements[0].value = "0";
document.forms.index_php.submit();
}
}
function openrequest()
{
window.open('request/request.php', 'request', 'width=1000, height=650');
}
function openglossar(lang, anchor)
{
window.open('glossar/glossar_' + lang + '.php#' + anchor, 'glossar', 'width=480, height=620, scrollbars=yes');
}
function openRanges()
{
window.open('cnt/ranges.php', 'ranges', 'width=1000,height=650,scrollbars=yes');
}
var tooltip = null;
function updateTooltip(e)
{
if(e)
{
var x_coord = e.pageX;
var y_coord = e.pageY;
}
else
{
var x_coord = window.event.x;
var y_coord = window.event.y;
}
if(tooltip != null)
{
if(navigator.appName == "Microsoft Internet Explorer")
{
var h = document.body.clientHeight;
}
else
{
var h = window.innerHeight;
}
if(h > 690)
{
document.getElementById("tooltip").style.left = (x_coord - 100) + "px";
document.getElementById("tooltip").style.top = (y_coord + 38) + "px";
}
else
{
var w = document.getElementById("tooltip").offsetWidth + 32;
document.getElementById("tooltip").style.left = (x_coord - w) + "px";
document.getElementById("tooltip").style.top = (y_coord - 28) + "px";
}
}
}
function showTooltip(text)
{
var tip = "";
switch(text)
{
case 1: // Anfrage
tip = "
";
break;
case 2: // Daten speichern und Zwischenergebnis aktualisieren
tip = "
";
break;
case 3: // Schritt löschen
tip = "
";
break;
case 4: // Alle Daten löschen
tip = "
";
break;
case 5: // Impressum
tip = "
";
break;
case 6: // Glossar
tip = "
";
break;
case 7: // Hinweis: Betriebstemperatur als Berechnungsgrundlage für Messbereich
tip = "
";
break;
default:
tip = text;
}
tooltip = 1;
document.getElementById("tooltip").innerHTML = tip;
document.getElementById("tooltip").style.display = "block";
}
function hideTooltip()
{
tooltip = null;
document.getElementById("tooltip").style.display = "none";
}