//
try{
 	 scrollheight= document.body.scrollHeight;
 	 if (navigator.userAgent.indexOf("Opera")!=-1) scrollheight=document.getElementById("content").offsetHeight; 

     if (scrollheight < getClientHeight())
     	document.write('<style type="text/css">#main { height:100% }</style>');
   } catch(e) {}

function getClientHeight()
{
   if (self.innerHeight) // all except Explorer
	return self.innerHeight;
   else if (document.documentElement && document.documentElement.clientHeight)	// Explorer 6 Strict Mode
	return document.documentElement.clientHeight;
   else if (document.body) // other Explorers
        return document.body.clientHeight;
   return 0;	
}
