// usage in Iframe
//  mainframe is the name of the iframe
//  main is the name of the div that is around all shown data in the frame
//  <script language="JavaScript" type="text/javascript">parent.resizeIframe('mainframe', 'main');</script>


/**
 * resizeIframe
 *
 * @param	string	nameFrame	is the name of the frame which should be resized
 * @param	string	nameDiv		is the name of the div that has all data which should be displayed (reason of resizing) inside
 */
function resizeIframe(nameFrame, nameDiv) {
    obj			= document.getElementsByName(nameFrame)[0];
    obj.width	= window.frames[nameFrame].document.getElementById(nameDiv).scrollWidth;
	obj.height	= window.frames[nameFrame].document.getElementById(nameDiv).scrollHeight;
	return true;
}