function addEvent( obj, type, fn ) {
	if (obj.addEventListener)
		obj.addEventListener( type, fn, false );
	else if (obj.attachEvent)
	{
		obj["e"+type+fn] = fn;
		obj[type+fn] = function() { obj["e"+type+fn]( window.event ); }
		obj.attachEvent( "on"+type, obj[type+fn] );
	}
}

function removeEvent( obj, type, fn )
{
	if (obj.removeEventListener)
		obj.removeEventListener( type, fn, false );
	else if (obj.detachEvent)
	{
		obj.detachEvent( "on"+type, obj[type+fn] );
		obj[type+fn] = null;
		obj["e"+type+fn] = null;
	}
}

function ChangeIFRSize (ifrobject) {
	d=20;
	if (ifrobject.type=='load') ifrobject=this   // Prüfe ob der Aufruf aus dem EventHandler oder durch Funktionsaufruf selbst kommt
	if (typeof ifrobject.contentDocument!='undefined') {  // Setzen der Höhe für Mozilla
		ifrobject.height=ifrobject.contentDocument.height+d;
	}
	else if (typeof ifrobject.contentWindow.document!='undefined') {
		ifrobject.height=ifrobject.contentWindow.document.body.scrollHeight+d; // Setzen der Höhe für IE
	}
}

onload=function(){
	Ifr_List=document.getElementsByTagName('iframe')
	for (var i = 0; i < Ifr_List.length ; i++) {
		currentfr=Ifr_List[i];
		if (currentfr.id != '') {
		addEvent(currentfr,'load',ChangeIFRSize)
		ChangeIFRSize(currentfr);
		}
	}
}
