martin_____: offsetHeight im Firefox = Problem

Beitrag lesen

Das macht Sinn. Doch wie müsste das ausssehen?
mit einem

function pos(bild2) {
document.getElementById("galct").style.margin = "-" + bild2.offsetHeight/2 + "px 0px 0px " + "-" + bild2.offsetWidth/2 + "px";
alert("-" + bild2.offsetHeight/2 + "px 0px 0px " + "-" + bild2.offsetWidth/2 + "px");
}
function showgal(file,count,type) {
document.getElementById("gal").style.visibility = "visible";
document.getElementById("galimg").src =bild = "content/img/" + file + "." + type;
bild = document.getElementById("galimg");
document.getElementById("galimg").onload = pos(bild); // <---HIER
}

funktioniert es nicht...
Wäre toll, wenn ihr mir helfen könntet.