want to insert css value for a selected element?

want to insert css value for a selected element?

 Hi,

I have a function to calculate dynamic height of a div element

   
  1.  function getComputedHeight(theElt){
    var browserName=navigator.appName;
    if (browserName=="Microsoft Internet Explorer"){
    var is_ie=true;
    } else {
    var is_ie=false;
    }
    if(is_ie){
    tmphght = document.getElementById(theElt).offsetHeight;
    }
    else{
    docObj = document.getElementById(theElt);
    var tmphght1 = document.defaultView.getComputedStyle(docObj, "").getPropertyValue("height");
    tmphght = tmphght1.split('px');
    tmphght = tmphght[0];
    }
    return tmphght;
    }
















This function correctly return height of dynamic div element.

My div element is

    
  1.  <div id="content_area"></div>
If I wanted to set static height of #content_area, I would have done this

     
  1. $(document).ready(function(){
    $("#content_area").css("height","600px");
    })

But I want to set height returned by getComputedHeight() function along with "px" value. How can I do This?

I tried this

   
  1.   $(document).ready(function(){
    $("#content_area").css("height",getComputedHeight('right')px);
    });

but its not working


Thanks

Regards