// Now set the iframe height to the same as the content height	
function setIframeHeight()
{
	/*alert(window.frames.contentFrame.document.getElementById('iframeContent').clientHeight);
	alert(window.frames.contentFrame.document.getElementById('iframeContent').offsetHeight);
	
	var iframeHeight = window.frames.contentFrame.document.getElementById('iframeContent').offsetHeight;
	if (iframeHeight != 0)
	{
		document.getElementById('contentFrame').style.height = iframeHeight+10;
	}*/
	
	var iframeWin = window.frames['contentFrame'];
	var iframe = document.getElementById('contentFrame');
	
	if (iframeWin.document.body.scrollHeight) height = scrollHeight = iframeWin.document.body.scrollHeight;
    	if (iframeWin.document.body.offsetHeight) height = offsetHeight = iframeWin.document.body.offsetHeight;
    	if (scrollHeight && offsetHeight) height = Math.max(scrollHeight, offsetHeight);
		
 			if(iframe.style) {
	    	iframe.style.height = "auto";
	    	iframe.style.height = height + 5 + 'px';
		} else {
	    	iframe.height = height + 5;
		}
}


function checkFrame() {
	// check if we are in the iFrame.  If not, redirect to parent with querystring
	if(window.name != "contentFrame") {


		var articleID = String(document.location.href);
		articleID = articleID.substring(articleID.lastIndexOf('/')+1, articleID.indexOf('.shtml'));
		document.location.href = "/arts/romantics/timeline.shtml?" + articleID;

	} else {
		// Now set the iframe height to the same as the content height	
		window.parent.setIframeHeight();
		}
}