_height = 0;
scrolled = false;

function setHeight()
{
    if (window.location.href.substring(window.location.href.length - 1) == '#')
    {
        if ($.browser.mozilla)
            history.go(-1);
        //else
        //    window.location.href = window.location.href.substring(0, window.location.href.length - 1);
        if (!scrolled)
        {
            scrolled = true;
            window.scrollTo(0,0);
        }
    }
    else 
    {
        scrolled = false;
        if (window.location.hash.length > 1)
        {
            var frameHeight = parseInt(window.location.hash.substring(1));
            if (!isNaN(frameHeight) && _height != frameHeight)
            {
                $('#frmFrame').css('overflow', 'hidden');
                setTimeout(function(){
                    $('#frmFrame').css('height', frameHeight + 25).css('overflow', 'auto');
                },300);
                _height = frameHeight;
                if ($.browser.mozilla)
                    history.go(-1);
                //else
                //    window.location.hash = '';
                //window.location = window.location.href.substring(0,window.location.href.length-3);
            }
        }
    }
}
$(function(){
    window.setInterval(setHeight, 500);
});