function mkFlash(nom,arq,wid,hei){
//document.write('<p>');
//document.write('<object id="'+nom+'" name="'+nom+'" type="application/x-shockwave-flash" data="'+arq+'" width="'+wid+'" height="'+hei+'">');
//document.write('<param name="movie" value="'+arq+'">');
//document.write('<param name="menu" value="false">');
//document.write('<param name="wmode" value="transparent">');
//document.write('</object>');
//document.write('</p>');
	var escreveFlash = new String();
	var flashvars = "";
	if (navigator.appName.indexOf("Microsoft") != -1){
		escreveFlash += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
		escreveFlash += 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=version=8,0,0,0" ';
		escreveFlash += 'width="' + wid + '" height="' + hei + '" name="' + nom + '"id = '+ nom +'">';
		escreveFlash += '<param name="movie" value="' + arq + '"/>';
		if(flashvars != null) {escreveFlash += '<param name="flashvars" value="' + flashvars + '"/>'};
		escreveFlash += '<param name="menu" value="false"/>';
		//escreveFlash += '<param name="salign" value="LT"/>';
		escreveFlash += '<param name="scale" value="noscale"/>';
		escreveFlash += '<param name="wmode" value="transparent"/>';
		escreveFlash += '<param name="allowScriptAccess" value="sameDomain"/>';
		escreveFlash += '</object>';
	} else{
		escreveFlash += '<embed src="' + arq + '" ';
		escreveFlash += 'width="' + wid + '" ';
		escreveFlash += 'height="' + hei + '" ';
		escreveFlash += 'id="' + nom + '" ';
		escreveFlash += 'name="' + nom + '" ';
		escreveFlash += 'menu="false" ';
		escreveFlash += 'scale="noscale" ';
		//escreveFlash += 'salign="LT" ';
		escreveFlash += 'wmode="transparent" ';
		escreveFlash += 'allowScriptAccess="sameDomain" ';
		if(flashvars != null) {escreveFlash += 'flashvars="' + flashvars + '" '};
		escreveFlash += 'type="application/x-shockwave-flash" ';
		escreveFlash += 'pluginspage="http://www.macromedia.com/go/getflashplayer">';
		escreveFlash += '</embed>';
	}
	document.write(escreveFlash);
}

function topo(act){
if(act=="over"){
document.getElementById('toposwf').SetVariable("_root.fora", "nao");
}
if(act=="out"){
document.getElementById('toposwf').SetVariable("_root.fora", "sim");
}
}

function menuFlash(pg,gp){
parent.document.getElementById('toposwf').SetVariable("_root.pg", ""+pg+"");
parent.document.getElementById('toposwf').SetVariable("_root.gp", ""+gp+"");
parent.document.getElementById('toposwf').TGotoLabel("/","pula");
}

function troca_filme(){
document.getElementById('home_extra').style.display = "none";
document.getElementById('home_original').style.display = "block";
}

function chkPagina(pg){
if(pg!='index'&&pg!='main'){
if(window.name!='frm'){
window.location.href = 'main.asp?ref='+pg+'';
}
}
}

function setConteudoAltura(){
int_alt = document.getElementById('interna').offsetHeight;
if(int_alt<240){
parent.document.getElementById('frm').style.height = '250px';
parent.document.getElementById('frm').style.overflow = 'hidden';
document.getElementById('interna').style.height = '250px';
} else {
int_alt = int_alt;
parent.document.getElementById('frm').style.height = ''+ int_alt +'px';
parent.document.getElementById('frm').style.overflow = 'hidden';
}
parent.scrollTo(0,0);
}

function Flash(swf, width, height, flashvars, id){
	var escreveFlash = new String();
	if (navigator.appName.indexOf("Microsoft") != -1){
		escreveFlash += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
		escreveFlash += 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=version=8,0,0,0" ';
		escreveFlash += 'width="' + width + '" height="' + height + '" name="' + id + '"id = '+ id +'">';
		escreveFlash += '<param name="movie" value="' + swf + '"/>';
		if(flashvars != null) {escreveFlash += '<param name="flashvars" value="' + flashvars + '"/>'};
		escreveFlash += '<param name="menu" value="false"/>';
		//escreveFlash += '<param name="salign" value="LT"/>';
		escreveFlash += '<param name="scale" value="noscale"/>';
		escreveFlash += '<param name="wmode" value="transparent"/>';
		escreveFlash += '<param name="allowScriptAccess" value="sameDomain"/>';
		escreveFlash += '</object>';
	} else{
		escreveFlash += '<embed src="' + swf + '" ';
		escreveFlash += 'width="' + width + '" ';
		escreveFlash += 'height="' + height + '" ';
		escreveFlash += 'id="' + id + '" ';
		escreveFlash += 'name="' + id + '" ';
		escreveFlash += 'menu="false" ';
		escreveFlash += 'scale="noscale" ';
		//escreveFlash += 'salign="LT" ';
		escreveFlash += 'wmode="transparent" ';
		escreveFlash += 'allowScriptAccess="sameDomain" ';
		if(flashvars != null) {escreveFlash += 'flashvars="' + flashvars + '" '};
		escreveFlash += 'type="application/x-shockwave-flash" ';
		escreveFlash += 'pluginspage="http://www.macromedia.com/go/getflashplayer">';
		escreveFlash += '</embed>';
	}
	document.write(escreveFlash);
}
