salve

ti ringrazio per il suggerimento

però come sospettavo var altezza = document.documentElement.scrollHeight non funziona con explorer!!!