// JavaScript Document

function resize_me(n)
{
     d=0;ifObj=document.getElementsByName(n)[0];p=(document.all)?'scroll':'offset';
     eval("ifObj.style.width=window.frames[n].document.getElementsByTagName('body')[0]."+p+"Width+"+d);
     eval("ifObj.style.height=window.frames[n].document.getElementsByTagName('body')[0]."+p+"Height+"+d);
	 window.scrollTo(0, 0);
}

// Example: obj = findObj("image1");

function findObj(theObj, theDoc)

{

  var p, i, foundObj;

  if(!theDoc) theDoc = document;

  if( (p = theObj.indexOf("?")) > 0 && parent.frames.length)
  {

    theDoc = parent.frames[theObj.substring(p+1)].document;

    theObj = theObj.substring(0,p);

  }

  if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj];

  for (i=0; !foundObj && i < theDoc.forms.length; i++) 

    foundObj = theDoc.forms[i][theObj];

  for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++) 

    foundObj = findObj(theObj,theDoc.layers[i].document);

  if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj);

  return foundObj;

}


function resize_me2(frame_name) {
  //find the height of the internal page
  var the_height=document.getElementById(frame_name).contentWindow.document.body.scrollHeight;
  //change the height of the iframe
  document.getElementById('cGal').height=the_height+22;
  // wider nach oben
  window.scrollTo(0, 0);
}
// in iFrame einfügen: onload="resize_me2('Frame_Name')"