function carregaFlashInvisivel(caminho,largura,altura,float) {
	document.write('<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="'+largura+'" height="'+altura+'" style="float:'+float+';">');
	document.write('<param name="movie" value="'+caminho+'">');
	document.write('<param name="quality" value="high">');
	document.write('<param name="wmode" value="transparent">');
	document.write('<param name="menu" value="false">');
	document.write('<embed src="'+caminho+'" wmode="transparent" quality="high"  menu="false" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+largura+'" height="'+altura+'"></embed>');
	document.write('</object>');
}

function carregaFlashInvisivel2(caminho,largura,altura,float,style) {
	document.write('<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="'+largura+'" height="'+altura+'" style="float:'+float+'; '+style+'">');
	document.write('<param name="movie" value="'+caminho+'">');
	document.write('<param name="quality" value="high">');
	document.write('<param name="wmode" value="transparent">');
	document.write('<param name="menu" value="false">');
	document.write('<embed src="'+caminho+'" wmode="transparent" quality="high"  menu="false" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+largura+'" height="'+altura+'"></embed>');
	document.write('</object>');
}

var xmlHttp
function loadXMLDoc(url)
{ 
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)
	{
		alert ("Seu browser não suporta AJAX!");
		return;
	} 
    xmlHttp.onreadystatechange = SetaInfo;
	xmlHttp.open("GET", url, true);
    xmlHttp.send(null);
}

function SetaInfo() {
	if (xmlHttp.readyState==1) 
	{
  		document.getElementById("loadingPage").style.display="block";
		document.getElementById('centro').innerHTML="Carregando!";
		document.getElementById('centro').style.background="black";
	}
	if (xmlHttp.readyState==4) {
		var texto = xmlHttp.responseText;
        texto = texto.replace(/\+/g," ");
        texto = unescape(texto);	  
	    document.getElementById('centro').innerHTML=texto;
	    document.getElementById("loadingPage").style.display="none";  
	}
}

function loadFoto(caminho,desc) {
	foto1= new Image();
	foto1.src=(caminho);
	largh=foto1.width;
	altez=foto1.height;
	
	if (altez > largh) {
		document.getElementById('C3').style.width = 450;
		document.getElementById('C3').style.height = 480;
		var caminho = '<a href="'+caminho+'" target="_blank"><img style="margin: 2px;" src="'+caminho+'" width="343" height="420" border="0"></a><br><span style="text-decoration: none;color: #FFF;">'+desc+'</span>';
	}
	else {
		document.getElementById('C3').style.width = 520;
		document.getElementById('C3').style.height = 450;
		var caminho = '<a href="'+caminho+'" target="_blank"><img style="margin: 2px;" src="'+caminho+'" width="515" height="390" border="0"></a><br><div style="border: 1px solid #fff; width: 100%; float: left; text-decoration: none; color: #FFF;">'+desc+'</div>';
	}

	document.getElementById('C3').innerHTML=caminho ;
}

function Fechamsn(url) {
    document.getElementById("msn").style.display="none"; 
}


var xmlHttp
function loadXMLDoc2(url)
{ 
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)
	{
		alert ("Seu browser não suporta AJAX!");
		return;
	} 
    xmlHttp.onreadystatechange = SetaInfo2;
	xmlHttp.open("GET", url, true);
    xmlHttp.send(null);
}

function SetaInfo2() {
	if (xmlHttp.readyState==1) 
	{
  		document.getElementById("loadingPage").style.display="block";
		document.getElementById('boxabanda2').innerHTML="Carregando!";
	}
	if (xmlHttp.readyState==4) {
		var texto = xmlHttp.responseText;
        texto = texto.replace(/\+/g," ");
        texto = unescape(texto);	  
	    document.getElementById('boxabanda2').innerHTML=texto;
	    document.getElementById("loadingPage").style.display="none";   
	}
}

var xmlHttp
function EnviaFaclube()
{ 
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)
	{
		alert ("Seu browser não suporta AJAX!");
		return;
	} 
	var url="faclubeenvia.php";
	var variaveis = "?nome="+document.getElementById("fanome").value+
					"&cidade="+document.getElementById("facidade").value+
					"&uf="+document.getElementById("fauf").value+					
    	            "&email="+document.getElementById("faemail").value+
					"&site="+document.getElementById("fasite").value+
					"&surgiu="+document.getElementById("fasurgiu").value+
	                "&frase="+document.getElementById("fafrase").value;

	if ((document.getElementById("fanome").value != "") && 
		(document.getElementById("facidade").value != "") && 
		(document.getElementById("fauf").value != "") && 
		(document.getElementById("faemail").value != "") && 
		(document.getElementById("fasurgiu").value != "") && 
		(document.getElementById("fafrase").value != ""))
	{
		xmlHttp.onreadystatechange=MandaResposta;
		xmlHttp.open("POST",url+variaveis,true);
		xmlHttp.send(variaveis);
	
//		document.getElementById("WFACLUBE").reset();	
	}
}

var xmlHttp
function EnviaRecado()
{ 
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)
	{
		alert ("Seu browser não suporta AJAX!");
		return;
	} 
	var url="recadoenvia.php";
	var variaveis = "?nome="+document.getElementById("rnome").value+
    	            "&email="+document.getElementById("remail").value+
	                "&cidade="+document.getElementById("rcidade").value+
	                "&recado="+document.getElementById("rrecado").value;

	if ((document.getElementById("rnome").value != "") && 
		(document.getElementById("remail").value != "") && 
		(document.getElementById("rcidade").value != "") && 
		(document.getElementById("rrecado").value != ""))
	{
		xmlHttp.onreadystatechange=MandaResposta;
		xmlHttp.open("POST",url+variaveis,true);
		xmlHttp.send(variaveis);
	
		document.getElementById("WRECADO").reset();	
	}
}

var xmlHttp
function EnviaMsg()
{ 
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)
	{
		alert ("Seu browser não suporta AJAX!");
		return;
	} 
	var url="contatoenvia.php";
	var variaveis = "?nome="+document.getElementById("cnome").value+
    	            "&email="+document.getElementById("cemail").value+
	                "&cidade="+document.getElementById("ccidade").value+
	                "&telefone="+document.getElementById("ctelefone").value+
	                "&mensagem="+document.getElementById("cmensagem").value;
	if ((document.getElementById("cnome").value != "") && 
		(document.getElementById("cemail").value != "") && 
		(document.getElementById("ccidade").value != "") && 
		(document.getElementById("cmensagem").value != ""))
	{
		xmlHttp.onreadystatechange=MandaResposta;
		xmlHttp.open("POST",url+variaveis,true);
		xmlHttp.send(variaveis);
	
		document.getElementById("WCONTATO").reset();		
	}
}

function MandaResposta()
{ 
	if (xmlHttp.readyState==1)
	{ 
		document.getElementById("MENSAGEM").innerHTML='Enviando...';
	}
	if (xmlHttp.readyState==4)
	{ 
		document.getElementById("MENSAGEM").innerHTML=xmlHttp.responseText;
	}
}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}