/* Set frame height to match frame contents */
function iFrameHeightX(iFrameId) {
	var h = 0;
	if ( !document.all ) {				// Firefox & Safari
		h = document.getElementById(iFrameId).contentDocument.height;
		h = (h < 200) ? h+100 : h;
		document.getElementById(iFrameId).style.height = h + 'px';
	} else if( document.all ) {			// IE6, IE7
		h = document.frames(iFrameId).document.body.scrollHeight;
		h = (h < 200) ? h+100 : h;
		document.all[iFrameId].style.height = h + 'px';
	}
}

/* update the page title */
function pageTitleUpdate(iFrameId) {
	var oldTitle = document.title;
	var frameInfo = document.getElementById(iFrameId);
	
	var doc2 = frameInfo.contentWindow ? frameInfo.contentWindow.document : frameInfo.contentDocument;
	
	if(!doc2 && window.frames[iFrameId]) {
		doc2 = window.frames[iFrameId].window.document;
	}
	
	var newTitle = doc2.title;
	
	document.title = newTitle;
}

/* This function calls any others that are needed */
function ZenCartLoaded(iFrameId) {
	iFrameHeightX(iFrameId);
	pageTitleUpdate(iFrameId);
}
