Code update - sticky footer

Code update - sticky footer

Hi,

I have just basic knowledgement about JS.
There I hope you can help me to alter some JS for a sticky footer.

Code:
// compute left offset of footer
            // fetch left margins

            if (navigator.appName.indexOf("Explorer") != -1) {
                leftMargin = 0.0+document.all.mainContent.offsetLeft+document.all.Container2.offsetLeft+"px"
                document.all.footer.style.left = leftMargin;
            } else {
                leftMargin = document.getElementById('leftMainMenu').offsetLeft+165.0+"px";
                document.getElementById('footer').style.left = leftMargin;
            }
        }


This code places the footer via JS to the bottom of the page and recalculates
also the position. This works for all browsers.

Problem:
I'm using jqModal on this site. Actually this works fine in IE7 and FF.
In IE6 the footer JS is making trouble. Maybe you guys have an idea
to make the script above "jQuery" compatible

thanks indeed
T.C.