
//---------------------------------------------------|
//---------------------------------------------------|
// ©2008 NEORION INTERNET LTDA. - www.neorion.com.br |
//---------------------------------------------------|
//---------------------------------------------------|


var idFechar = 1;

function FlashPlayer(x,y,arquivo)
	{
	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="'+x+'" height="'+y+'">')
	document.write('<param name="movie" value="'+arquivo+'">')
	document.write('<param name="quality" value="high">')
	document.write('<param name="menu" value="false">')	
	document.write('<param name="scale" value="noscale" />')
	document.write('<param name="allowScriptAccess" value="sameDomain" />')
	document.write('<embed src="'+arquivo+'"  scale="noscale" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"  width="'+x+'" height="'+y+'" name="flash" align="middle" allowScriptAccess="sameDomain"></embed>')
	document.write('</object>')
	}




function Fale(){

	if (document.form1.nome.value == ""){
		alert("DIGITE SEU NOME");
		document.form1.nome.focus();
		return (false);
	}	
	
	if (document.form1.email.value == ""){
		alert("DIGITE SEU E-MAIL");
		document.form1.email.focus();
		return (false);
	}		
	
	if (document.form1.mensagem.value == ""){
		alert("DIGITE A MENSAGEM");
		document.form1.mensagem.focus();
		return (false);
	}			

document.getElementById("BotSubmit").innerHTML = "<strong>ENVIANDO...</strong><br />";
return (true);	
}



/* INICIA AJAX 
*****************************/

function IniciaAjax(){
	var ajax;
	if(window.XMLHttpRequest){	  // Mozilla, Safari,...
		ajax = new XMLHttpRequest();
	} else if (window.ActiveXObject){	// IE
		ajax = new ActiveXObject("Msxml2.XMLHTTP");
		if (!ajax) {
			ajax = new ActiveXObject("Microsoft.XMLHTTP");
		}
    } 
	else {
        alert("Seu navegador não possui suporte a essa aplicação!");
	}
	return ajax;
}


/* ABRE FICHA PALESTRANTES
*****************************/
function PalestranteFicha(id)
{
	
		document.getElementById(idFechar).style.display = 'none';
		document.getElementById(id).style.display = 'inline';		
	
	ajax = IniciaAjax();
	if(ajax)
	{
			ajax.open("GET","palestrantes_ficha.php?id="+id+"",true);
			ajax.onreadystatechange = PalestranteFicha2;
			ajax.send(null);
	}                      
		function PalestranteFicha2() {   
			if (ajax.readyState == 1) {
			document.getElementById(id).innerHTML = "<br><strong>PROCESSANDO...</strong>";
			}		
			if (ajax.readyState == 4) {
			document.getElementById(id).innerHTML = ajax.responseText; 	
									
			} 
		}
		
idFechar = id;	
}



