nicht explizit festgelegt ist
else if (document.getElementById) { return document.getElementsByTagName("div")[zahl].offsetHeight; }
}
// Für positionierte
s:
function divLinksObj(obj)
{
if (isOpera) { return obj.style.pixelLeft; }
else if (document.all) { return obj.style.posLeft; }
else if (document.layers) { return obj.left; }
else if (document.getElementById) { return parseInt(obj.style.left); }
}
function divObenObj(obj)
{
if (isOpera) { return obj.style.pixelTop; }
else if (document.all) { return obj.style.posTop; }
else if (document.layers) { return obj.top; }
else if (document.getElementById) { return parseInt(obj.style.top); }
}
function divBreiteObj(obj)
{
if (isOpera) { return obj.style.pixelWidth; }
else if (document.all) { return obj.style.posWidth; }
else if (document.layers) { return obj.clip.width; }
else if (document.getElementById) { return parseInt(obj.style.width); }
}
function divHoeheObj(obj)
{
if (isOpera) { return obj.style.pixelHeight; }
else if (document.all) { return obj.style.posHeight; }
else if (document.layers) { return obj.clip.height; }
else if (document.getElementById) { return parseInt(obj.style.height); }
}
// -----------------------------------------------------------------------------------------------------
// DIV-EIGENSCHAFTEN ÄNDERN:
function setDiv(objname,xKoord,yKoord) // setzt x- und y-Koordinate des linken oberen Eckpunkts
{
var obj = eleMent(objname);
if (isOpera) { obj.pixelLeft = xKoord; obj.pixelTop = yKoord; }
else if (document.all) { obj.posLeft = xKoord; obj.posTop = yKoord; }
else if (document.layers || document.getElementById) { obj.left = xKoord; obj.top = yKoord; }
}
function moveDiv(objname,delta_xKoord,delta_yKoord) // verschiebt x- und y-Koordinate des linken oberen Eckpunkts
{
var obj = eleMent(objname);
if (isOpera) { obj.pixelLeft += delta_xKoord; obj.pixelTop += delta_yKoord; }
else if (document.all) { obj.posLeft += delta_xKoord; obj.posTop += delta_yKoord; }
else if (document.layers || document.getElementById) { obj.left = parseInt(obj.left) + delta_xKoord; obj.top = parseInt(obj.top) + delta_yKoord; }
}
function visibleDiv(objname,modus) // macht das Element sichtbar (modus=1) bzw. unsichtbar (modus=0)
{
var obj = eleMent(objname);
var txt;
if (document.all || document.getElementById) { if (modus == 1) { txt = "visible"; } else if (modus == 0) { txt = "hidden"; } }
else if (document.layers) { if (modus == 1) { txt = "show"; } else if (modus == 0) { txt = "hide"; } }
obj.visibility = txt;
}
function zIndexDiv(objname,zind) // setzt z-Index des Elements
{
var obj = eleMent(objname);
obj.zIndex = zind;
}
function setDivNr(zahl,xKoord,yKoord) // setzt x- und y-Koordinate des linken oberen Eckpunkts
{
var obj = eleMentNr(zahl);
if (isOpera) { obj.pixelLeft = xKoord; obj.pixelTop = yKoord; }
else if (document.all) { obj.posLeft = xKoord; obj.posTop += yKoord; }
else if (document.layers || document.getElementById) { obj.left = xKoord; obj.top = yKoord; }
}
function moveDivNr(zahl,delta_xKoord,delta_yKoord) // verschiebt x- und y-Koordinate des linken oberen Eckpunkts
{
var obj = eleMentNr(zahl);
if (isOpera) { obj.pixelLeft += delta_xKoord; obj.pixelTop += delta_yKoord; }
else if (document.all) { obj.posLeft += delta_xKoord; obj.posTop += delta_yKoord; }
else if (document.layers || document.getElementById) { obj.left = parseInt(obj.left) + delta_xKoord; obj.top = parseInt(obj.top) + delta_yKoord; }
}
function visibleDivNr(zahl,modus) // macht das Element sichtbar (modus=1) bzw. unsichtbar (modus=0)
{
var obj = eleMentNr(zahl);
var txt;
if (document.all || document.getElementById) { if (modus == 1) { txt = "visible"; } else if (modus == 0) { txt = "hidden"; } }
else if (document.layers) { if (modus == 1) { txt = "show"; } else if (modus == 0) { txt = "hide"; } }
obj.visibility = txt;
}
function zIndexDivNr(zahl,zind) // setzt z-Index des Elements
{
var obj = eleMentNr(zahl);
obj.zIndex = zind;
}
// Für positionierte
s:
function setDivObj(obj,xKoord,yKoord)
{
if (isOpera) { obj.style.pixelLeft = xKoord; obj.style.pixelTop = yKoord; }
else if (document.all) { obj.style.posLeft = xKoord; obj.style.posTop = yKoord; }
else if (document.layers) { obj.left = xKoord; obj.top = yKoord; }
else if (document.getElementById) { obj.style.left = xKoord; obj.style.top = yKoord; }
}
function moveDivObj(obj,delta_xKoord,delta_yKoord)
{
if (isOpera) { obj.style.pixelLeft += delta_xKoord; obj.style.pixelTop += delta_yKoord; }
if (document.all) { obj.style.posLeft += delta_xKoord; obj.style.posTop += delta_yKoord; }
else if (document.layers) { obj.left += delta_xKoord; obj.top += delta_yKoord; }
else if (document.getElementById) { obj.style.left = parseInt(obj.style.left) + delta_xKoord + "px"; obj.style.top = parseInt(obj.style.top) + delta_yKoord + "px"; }
}
function visibleDivObj(obj,modus)
{
if (document.all || document.getElementById)
{
if (modus == 1) { obj.style.visibility = "visible"; }
else if (modus == 0) { obj.style.visibility = "hidden"; }
}
else if (document.layers)
{
if (modus == 1) { obj.visibility = "show"; }
else if (modus == 0) { obj.visibility = "hide"; }
}
}
function zIndexDivObj(obj,zind)
{
if (document.all || document.getElementById) { obj.style.zIndex = zind; }
else if (document.layers) { obj.zIndex = zind; }
}
// -----------------------------------------------------------------------------------------------------
// EVENT-KOORDINATEN: ABSTAND ZUM LINKEN/OBEREN RAND DES DOKUMENTS
function eX(e)
{
if (isOpera) { return window.event.clientX; }
else if (document.all) { return window.event.clientX + window.document.body.scrollLeft; }
else if (document.layers || document.getElementById) { return e.pageX; }
}
function eY(e)
{
if (isOpera) { return window.event.clientY; }
else if (document.all) { return window.event.clientY + window.document.body.scrollTop; }
else if (document.layers || document.getElementById) { return e.pageY; }
}
// -----------------------------------------------------------------------------------------------------
// DEFINITION VON
s (im NN4:
s)
function createDivSimple(iD,inhaltTxt)
{
if (document.all)
{
document.write('' + inhaltTxt + '
\n');
}
else if (document.layers)
{
document.write('' + inhaltTxt + '\n');
}
else if (document.getElementById) //xxx weil's in Netscape 6/Mozzilla ansonsten sehr langsam geht
// ansonsten selber Code wie für (document.all)
{
var tabAnf = '';
inhaltTxt = tabAnf + inhaltTxt + tabEnd;
document.write('' + inhaltTxt + '
\n');
}
}
function createDivNr(inhaltTxt,linKS,obEN,breiTE,hoeHE)
{
if (document.all || document.getElementById)
{
document.write('' + inhaltTxt + '
');
}
else if (document.layers)
{
document.write('' + inhaltTxt + '');
}
}
function createDivNrBlank(inhaltTxt,linKS,obEN,breiTE,hoeHE,farBE)
{
if (document.all) // wegen eines IE-Bugs mit Tabelle überdecken
{
document.write('');
}
else if (document.getElementById) // funktioniert mit Tabelle in Netscape 6 und Mozilla nicht
{
document.write('' + inhaltTxt + '
');
}
else if (document.layers)
{
document.write('' + inhaltTxt + '');
}
}
function createDivNrInvisible(inhaltTxt,linKS,obEN,breiTE,hoeHE)
{
if (document.all || document.getElementById)
{
document.write('' + inhaltTxt + '
');
}
else if (document.layers)
{
document.write('' + inhaltTxt + '');
}
}
function createDivTop(iD,inhaltTxt,obEN)
{
if (document.all)
{
document.write('' + inhaltTxt + '
');
}
else if (document.layers)
{
document.write('' + inhaltTxt + '');
}
else if (document.getElementById) //xxx weil's in Netscape 6/Mozzilla ansonsten sehr langsam geht
// ansonsten selber Code wie für (document.all)
{
var tabAnf = '';
inhaltTxt = tabAnf + inhaltTxt + tabEnd;
document.write('' + inhaltTxt + '
');
}
}
// ---------------------------- CODE END ----------------------------