/*
 *
 * Some JS-Stuff for the OLH-sites
 *
 * (c) Daniel Burckhardt
 *
 * Version: 2004-04-21
 *
 */

function iframe_resize(id) {
	var iframe = null;
	if (document.getElementById){ //begin resizing iframe procedure
		iframe = document.getElementById(id);
		if (iframe && !window.opera) {
			iframe.style.display="block";
			try {
				if (iframe.contentDocument && iframe.contentDocument.body.offsetWidth) { //ns6 syntax
					var w1 = iframe.contentDocument.body.offsetWidth;
					var w2 = iframe.contentDocument.body.scrollWidth;
					iframe.width = w2 != null && w2 > w1 ? w2 : w1; 
				}
				else if (iframe.Document && iframe.Document.body.scrollWidth) { //ie5+ syntax
					iframe.width = iframe.Document.body.scrollWidth;
				}
			}
			catch (e) {
			}

		}
	}
}

