//Definir aqui a musica que será veiculada no site...
function setMusic(){
var n=n++;
	url="http://www.dominio.com.br/flash/musica.mp3";

		mm="<object classid='clsid:D27CDB6E-AE6D-11CF-96B8-444553540000' id='ShockwaveFlash1' width='85' height='14' name='player'>"
		mm=mm+"<param name='_cx' value='9790'>"
		mm=mm+"<param name='_cy' value='13229'>"
		mm=mm+"<param name='FlashVars' value=''>"
		mm=mm+"<param name='Movie' value='load1.swf'>"
		mm=mm+"<param name='Src' value='load1.swf'>"
		mm=mm+"<param name='WMode' value='Transparent'>"
		mm=mm+"<param name='Play' value='-1'>"
		mm=mm+"<param name='Loop' value='-1'>"
		mm=mm+"<param name='Quality' value='High'>"
		mm=mm+"<param name='Menu' value='0'>"
		mm=mm+"<param name='AllowScriptAccess' value='always'>"
		mm=mm+"<param name='Scale' value='ShowAll'>"
		mm=mm+"<param name='DeviceFont' value='0'>"
		mm=mm+"<param name='EmbedMovie' value='0'>"
		mm=mm+"</object>"		
		
		document.getElementById('trilha').innerHTML=mm;
		
		var flashMovie=window.document.player;
		flashMovie.SetVariable("_root.txtMusica", url);
		//alert('hi');
}

var i=1;
function Load_Page(){
	if(i>1){
		Conteudo=window.frames['iframetx'].document.body.innerHTML;
		//alert(pg);
		RetornaConteudo(Conteudo);
	}
		i++;
}
function RetornaConteudo(Conteudo){
	document.getElementById('tdBody').innerHTML=Conteudo;
	//document.getElementById('tdFlash').innerHTML=Conteudo;
	//document.getElementById('tdFlash').style.display='none';
	//---------Ocultando e mostrando o segundo banner------------------->
	if(pg!=3){
		document.getElementById('tdFlash').style.display='none';
		document.getElementById('corpo').style.height=600;
		//alert(pg);
	}
	if(pg==3){
		document.getElementById('tdFlash').style.display='block';
		document.getElementById('corpo').style.height=450;
		//alert(pg);
	}
	//------------------------------------------------------------------>
	document.getElementById("tdBody").style.cursor="default";
	window.scrollTo(0,0);
	//alert(pg);
}

function inLoad(){
	no=1;
	//document.getElementById('iframetx').src="getFrames.asp?id="+no;
	//document.getElementbyId('tdFlash').style.display='none';
}
function OpenPict(fto,larg,alt){

  objWindow = window.open("", "", "width="+larg+", height="+alt);
  
  objWindow.document.write("<html><title>"+fto+"</title><body>");
  objWindow.document.write("<style>");
  objWindow.document.write("body {");
  objWindow.document.write("background-image: url('"+fto+".jpg');");
  objWindow.document.write("background-repeat: no-repeat;");
  objWindow.document.write("background-position: center;");
  objWindow.document.write("}");
  objWindow.document.write("</style>");
  objWindow.document.write("</body></html>");
}
function OpenPictProd(fto,larg,alt,desc){

  objWindow = window.open("", "pop", "width="+larg+", height="+alt);
  
  objWindow.document.write("<html><title>"+fto+"</title>");
  //objWindow.document.write("<!--#Include file='conectar.asp'-->"); 	//funciona...
  objWindow.document.write("<body topmargin='0' leftmargin='0'><style>");
  objWindow.document.write("body {");
  objWindow.document.write("background-image: url('"+fto+".jpg');");
  objWindow.document.write("background-repeat: no-repeat;");
  objWindow.document.write("background-position: left;}");
  objWindow.document.write("*{ font-family: Verdana, Arial; font-size: 11px}");
  objWindow.document.write("</style>");

  objWindow.document.write("<Div style='position: relative; float: right; width: 140';>");
  objWindow.document.write("<table border='0' cellpadding='0' cellspacing='0' width='100%'>");
  objWindow.document.write("<br>"+desc);
  objWindow.document.write("</table></Div></body></html>");
}
//======================================Conferir Campos de email===============================
function Conferir(){

	if (document.form1.nome.value==""){
		alert("O campo nome está vazio");
		document.form1.nome.focus();
		return false;
	}
	if (document.form1.email.value==""){
		alert("O campo email está vazio");
		document.form1.email.focus();
		return false;
	}
	if (document.form1.assunto.value==""){
		alert("O campo assunto está vazio");
		document.form1.assunto.focus();
		return false;
	}
	if (document.form1.texto.value==""){
		alert("O campo mensagem está vazio");
		document.form1.texto.focus();
		return false;
	}
	
parte1 = document.form1.email.value.indexOf("@");
parte2 = document.form1.email.value.indexOf(".");
parte3 = document.form1.email.value.length;
if (!(parte1 >= 3 && parte2 >= 6 && parte3 >= 9)) {
	alert ("O campo " + document.form1.email.name + " deve conter um endereço eletrônico!");
document.form1.email.focus();
return false;
        }	
}