function resizeIFrame(f) {
	//f.style.height = f.contentWindow.document.body.scrollHeight + "px";
	if(f.contentDocument){
		f.style.height = (f.contentDocument.body.offsetHeight + 35) +'px';
	} else {
		f.style.height = f.contentWindow.document.body.scrollHeight+'px';
	}
}

function iframeOnLoad(cssClassBody, uri) {
	try {
			var iframe = window.parent.document.getElementById('corpoIFrame');
			if(iframe == null) {
				if(uri == null || uri=='') {
					location='home';
				} else {
					location='home?uri='+uri;
				}
			} else {
				if( window.parent.document.body.className.indexOf(cssClassBody) == -1 ) {
					window.parent.document.body.className = cssClassBody;
				}
			}
	} catch(err) {
	//	alert(err);
	}
}

function iframeLateralOnLoad(uri) {
	var iframeLateral = window.parent.document.getElementById('lateralIFrame');
	if(iframeLateral != null && 
	   		iframeLateral.src.indexOf(uri) == -1) {
		iframeLateral.src=uri;
	}
}

function iframeLateralOnLoad2(uri) {
	var iframeLateral = window.parent.document.getElementById('lateralIFrame');
	iframeLateral.src=uri;
}

function imagemDireita(arquivo) {
	if(arquivo != null && arquivo != '') {
		window.parent.document.getElementById('fotoValeriaCostaDiv').style.background = 'url(arquivos/'+arquivo+') no-repeat top';
	} else {
		window.parent.document.getElementById('fotoValeriaCostaDiv').style.background = 'url(images/foto_valeria1.jpg) no-repeat top';
	}
}