 /* Resizing a Iframe so the Page fits.
	See www.fsi-mechatronik.de/forum/ for an example
	The code is under the GPL as the onload-part is from http://www.brothercake.com/
	GPL: http://www.gnu.org/copyleft/gpl.html
	For an example have a look at http://www.fsi-mechatronik.de/forum/
	
	2006-02-17 Initial release by Morty (morty@gmx.net)
	*/
	
 
 
 
 
 //Idea from http://www.eeb-welt.de/index.php?content=Webdesign
 // You have to change if_forum to whatever ID your Iframe has in your parent document (The one with the iframe in it).
 function iframeSize() {
	if(parent.document.getElementById("if_forum")){
		if (document.layers) {
			parent.document.getElementById("if_forum").height = document.getElementsByTagName('body')[0].offsetHeight + 15;
		} else {
			parent.document.getElementById("if_forum").height = document.body.scrollHeight + 30;
		}
	}
	
	//I need this because of the T3 layout - you may delete it.
	if(parent.document.getElementById("content")){
		parent.document.getElementById("content").style.padding=0;
	}
 } 
 
 

// GO1.1 iframeSize onload by Brothercake 
// http://www.brothercake.com/

//setup onload function
if(typeof window.addEventListener != 'undefined')
{
  //.. gecko, safari, konqueror and standard
  window.addEventListener('load', iframeSize, false);
}
else if(typeof document.addEventListener != 'undefined')
{
  //.. opera 7
  document.addEventListener('load', iframeSize, false);
}
else if(typeof window.attachEvent != 'undefined')
{
  //.. win/ie
  window.attachEvent('onload', iframeSize);
}
//** remove this condition to degrade older browsers
else
{
  //.. mac/ie5 and anything else that gets this far
  //if there's an existing onload function
  if(typeof window.onload == 'function')
  {
    //store it
    var existing = onload;
    //add new onload handler
    window.onload = function()
    {
      //call existing onload function
      existing();
      //call iframeSize onload function
      iframeSize();
    };
  }
  else
  {
    //setup onload function
    window.onload = iframeSize;
  }
}