
function switchContent(){

	var iframe = window.parent.document.getElementById('iframed');
	
	// this is set for FF2
	if (iframe) {
		window.parent.sizeFrame(iframe, 450);
	}

	//if (document.getElementById('realSidebar') && document.getElementById('sidebar') && document.getElementById('realContent') && document.getElementById('main')) {

	  document.getElementById('realSidebar').innerHTML = document.getElementById('sidebar').innerHTML;
		document.getElementById('sidebar').innerHTML = "";
	  document.getElementById('realContent').innerHTML = document.getElementById('main').innerHTML
		document.getElementById('main').innerHTML = "";

	//}
	
	winhit = getPageHeightWithScroll();
	//alert("winhit = " + getPageHeightWithScroll());

	if (window.parent.frames.length != 0) {
		//alert("parent...");
		if (iframe) {
			window.parent.sizeFrame(iframe, winhit);
		}
	} else {
		//alert("redirecting...");
		//alert("wloc = " + window.location);
		window.location = "/blog.asp"	;
	}
}

function getPageHeightWithScroll(){
	if (window.innerHeight && window.scrollMaxY) {// Firefox
		yWithScroll = window.innerHeight + window.scrollMaxY - 17;
	} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
		yWithScroll = document.body.scrollHeight;
	} else { // works in Explorer 6 Strict, Mozilla (not FF) and Safari
		yWithScroll = document.body.offsetHeight + document.body.offsetTop;
  }
	return yWithScroll;
}

