
    function init(){
          var iBase = TextResizeDetector.addEventListener(onFontResize,null );
          setHeightByClass("div", "blogpostbody", iBase);        
                    }
function onFontResize( e, args ){
          setHeightByClass("div", "blogpostbody", args[0].iSize);
                            }                               
function setHeightByClass(tag, s, height) {                 
    var h = height*4+10+"px";
    var v=document.getElementsByTagName(tag);  // tag selector like "tag"
    for(i=0;i<v.length;i++){                                
        c=v[i].className.split(" ");                        
        for(j=0;j<c.length;j++){                            
            if(c[j]==s) v[i].style.height=h;
        }
    }
//   var e = document.getElementById("sample");
//   alert(height+" "+e.style.height);
}

                              /* id of element to check for
                 and insert test SPAN into */

                     TextResizeDetector.TARGET_ELEMENT_ID = 'PageContent';
                         /* function to call once TextResizeDetector
                                was initialized */
                                    TextResizeDetector.USER_INIT_FUNC = init;


