if (window != window.parent) {
    // Change the src base for the inner iframe to the most suitable size handler script.
    function setupHiddenIframe(size) {
            var src_base = 'http://www.edgwc.com/iframe/setsize.php';
            var iframe = document.createElement('iframe');

            iframe.setAttribute('style', 'display: none; visibility: hidden;');
            iframe.setAttribute('height', '0');
            iframe.setAttribute('width', '0');
            iframe.setAttribute('src', src_base +
                    '?width=' + escape(size.width) +
                    '&height=' + escape(size.height));

            document.getElementsByTagName('body')[0].appendChild(iframe);
    }

    function resizeLoad() {
            // Get new dimensions.
            var size = new Object();

            size.width = 0;
            size.height = 0;            

            if (!document.all) { // FF or compliant browsers.
                    size.width = document.body.offsetWidth + 25;
                    size.height = document.body.offsetHeight + 25;
            } else if (document.all) { // IE browsers.                
                    size.width = document.body.scrollWidth;
                    size.height = document.body.scrollHeight;
            }
            
            setupHiddenIframe(size);
	}
   
    var oldLoad = window.onload;
	var oldClick;

    window.onload = function() {
            if (oldLoad) { oldLoad(); } // Fire any old onload functionality.

			oldClick = document.body.onclick;
			document.body.onclick = function() {
					if (oldClick) { oldClick(); } // Fire any old onclick functionality.
			
					setTimeout('resizeLoad();', 0);
			};
            
            setTimeout('resizeLoad();', 0);
	}
};
