function iframeResizer(id){
  var obj = document.getElementById(id);
  var the_height= obj.contentWindow.document.body.scrollHeight;
  document.getElementById(id).height=the_height;
}

function AbreJanela(link,nomejan,x,y,janscroll,janstatus){
	var janela;
	janela=window.open(link,nomejan,"width="+x+",height="+y+",scrollbars="+janscroll+",resize=no,tollbars=no,status="+janstatus);
	scrX=(screen.width-x)/2;
	scrY=(screen.height-y)/2;
	janela.focus();
	janela.moveTo(scrX,scrY);
	
	janela = null;
}
function showdiv(objdiv){
	var divref = window.document.getElementById(objdiv);
	if (divref.style.display == "block" || divref.style.display == '' ) {
		divref.style.display = "none";
	} else  divref.style.display = "block";
} 
//Chama flash no site (correção do IE)
function exibeFash(swf, width, height, wmode, cache) {
	noCache = cache || cache == undefined ? "" : "?" + new Date();
	wmode = wmode || wmode == undefined ? "opaque" : "transparent";
	
	monta_swf = "";
	monta_swf += "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\" width=\""+ width +"\" height=\""+ height +"\" title=\"\">";
	monta_swf += "<param name=\"movie\" value=\""+ swf + noCache +"\" />";
	monta_swf += "<param name=\"quality\" value=\"high\" />";
	monta_swf += "<param name=\"menu\" value=\"0\" />";
	monta_swf += "<param name=\"wmode\" value=\""+ wmode +"\" />";
	monta_swf += "<embed src=\""+ swf + noCache +"\" quality=\"high\" wmode=\""+ wmode +"\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\""+ width +"\" height=\""+ height +"\"></embed>";
	monta_swf += "</object>";
	
	document.write(monta_swf);
}

