Tach, hier die Lösung falls das einer mal braucht und/oder falls einer es wissen möchte.
function getMsgPosition()
{
var msgShowPosition = 0, topPix = 0;
var GroesseX = 380; // Meldungs-Div (höhe)
var iFrameHeight = 750; // iFrame (höhe)
// Ermittlung des obersten sichtbaren pixel
if(window.pageYOffset)
{
topPix = window.pageYOffset;
}
else if(document.body && document.body.scrollTop)
{
topPix = document.body.scrollTop;
}
// Oberstes Pixel + 375 = mitte des Sichtbaren Bereiches eines Frames
// Oberstes Pixel + 375 - 190 = meldung.style.top;
msgShowPosition = topPix + (iFrameHeight/2) - (GroesseX / 2);
document.getElementById("setTopPix").value = msgShowPosition; // <iput type="hidden" ...
}
Es muss nur noch die neue Höhe (msgShowPosition) aus dem hidden-feld (setTopPix) an das Div übergeben werden.