function fitIFrame(elid, height){
	document.getElementById(elid).style.height = height+"px";
}

function adjustParentFrame(){

	if ( window.parent == window ){
		var sPath = window.location.pathname;
		var sPage = sPath.substring(sPath.lastIndexOf('/') + 1);
		//alert(sPage);
		var eng_Page = sPage.substring(sPage.lastIndexOf('_'));
		//alert(eng_Page);
		//alert(eng_Page == "_en.jsp");
		if(eng_Page == "_en.jsp"){
			window.location.href= "index_en.jsp?page=" + sPage;
		}else{
			window.location.href= "index.jsp?page=" + sPage;
		}
	}
	
	var contentHeight = 0;
	if (!window.opera && !document.mimeType && document.all && document.getElementById){
		contentHeight = document.body.offsetHeight;
	}
	else if(document.getElementById) {
		contentHeight = this.document.body.scrollHeight;
	}
	//alert(contentHeight);
	if( parent && parent.fitIFrame ){
		//alert(contentHeight);
		parent.fitIFrame( 'content', contentHeight );
	}
}

