
   function resizeFrame(id)
   {
        var frame = document.getElementById(id);
        var newHeight = '100%'; 
   	var mimeType;
	try
  	{
  		mimeType = document.mimeType;	
  	}
	catch(err)
  	{
  		mimeType = 'ie';
  	}
	
     
        if (!window.opera && !mimeType && document.all && document.getElementById)
        {
            newHeight = this.document.body.offsetHeight+"px";
        }
        else if(document.getElementById) 
        {        
            if (frame.contentWindow.document.body.offsetHeight && frame.contentWindow.document.body.offsetHeight > 0)
            {
                newHeight = (frame.contentWindow.document.body.offsetHeight+40)+"px";
            }    
            else if (document.body.scrollHeight && document.body.scrollHeight != 0)
            {
                newHeight = this.document.body.scrollHeight+"px";
            }
            else if (frame.contentDocument.height && frame.contentDocument.height != 0)
            {
                newHeight = (frame.contentDocument.height+40)+"px"; //Add 40px for Firefox
            }
        }
        
        frame.style.height = newHeight;
        frame.height = newHeight;        
   }
