

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" wmode="transparent"></embed>')
	document.write('</object>')
	}

function FlashPlayerTransp(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="wmode" value="transparent">')	
	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" wmode="transparent"></embed>')
	document.write('</object>')
	}



function Fale(form1){

	if (form1.nome.value == ""){
	alert("DIGITE O NOME");
	form1.nome.focus();
	return (false);
	}
	if (form1.email.value == ""){
	alert("DIGITE O E-MAIL");
	form1.email.focus();
	return (false);
	}	

document.getElementById("BotSubmit").innerHTML = "<strong>ENVIANDO...</strong>";

}


function Ficha(){

	if (form1.nome.value == ""){
	alert("DIGITE O NOME");
	form1.nome.focus();
	return (false);
	}
	if (form1.email.value == ""){
	alert("DIGITE O E-MAIL");
	form1.email.focus();
	return (false);
	}	
	if (form1.data3.value == ""){
	alert("DIGITE O ANO DE NASCIMENTO");
	form1.data3.focus();
	return (false);
	}			

	return Verifica_CPF(form1.cpf.value);	
	
document.getElementById("BotSubmit").innerHTML = "<strong>ENVIANDO...</strong>";

return (true);	
}




function Verifica_CPF(CPF) {

	var CPF = CPF.replace('.', '');		
	var CPF = CPF.replace('.', '');			
	var CPF = CPF.replace('_', '');			
	var CPF = CPF.replace('-', '');	
	
	// Aqui começa a checagem do CPF
	var POSICAO, I, SOMA, DV, DV_INFORMADO;
	var DIGITO = new Array(10);
	DV_INFORMADO = CPF.substr(9, 2); // Retira os dois últimos dígitos do número informado
	
	// Desemembra o número do CPF na array DIGITO
	for (I=0; I<=8; I++) {
	  DIGITO[I] = CPF.substr( I, 1);
	}
	
	// Calcula o valor do 10º dígito da verificação
	POSICAO = 10;
	SOMA = 0;
	   for (I=0; I<=8; I++) {
		  SOMA = SOMA + DIGITO[I] * POSICAO;
		  POSICAO = POSICAO - 1;
	   }
	DIGITO[9] = SOMA % 11;
	   if (DIGITO[9] < 2) {
			DIGITO[9] = 0;
	}
	   else{
		   DIGITO[9] = 11 - DIGITO[9];
	}
	
	// Calcula o valor do 11º dígito da verificação
	POSICAO = 11;
	SOMA = 0;
	   for (I=0; I<=9; I++) {
		  SOMA = SOMA + DIGITO[I] * POSICAO;
		  POSICAO = POSICAO - 1;
	   }
	DIGITO[10] = SOMA % 11;
	   if (DIGITO[10] < 2) {
			DIGITO[10] = 0;
	   }
	   else {
			DIGITO[10] = 11 - DIGITO[10];
	   }
	
	// Verifica se os valores dos dígitos verificadores conferem
	DV = DIGITO[9] * 10 + DIGITO[10];
	   if (DV != DV_INFORMADO) {
		alert("CPF INCORRETO");
		  form1.cpf.focus();
		  return (false);
	   }
}





/***********************************************
* AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

// O CLUBE
var menu0=new Array()
menu0[0]='<a href="historia.php">História</a>'
menu0[1]='<a href="missao.php">Missão e Visão</a>'
//menu0[2]='<a href="diretoria.php">Diretoria</a>'
menu0[2]='<a href="juridica.php">Organização Jurídica</a>'
//menu0[4]='<a href="tecnica.php">Comissão Técnica</a>'
menu0[3]='<a href="camisas.php">Camisas</a>'
menu0[4]='<a href="mascote.php">Mascote</a>'
menu0[5]='<a href="bandeira.php">Bandeira</a>'
menu0[6]='<a href="construcao.php?id=Hino">Hino</a>'
menu0[7]='<a href="construcao.php?id=Estádio">Estádio</a>'


// ATLETAS
var menu2=new Array()
menu2[0]='<a href="atletas2010.php">2010</a>'
menu2[1]='<a href="atletas2009.php">2009</a>'
		
var menuwidth='165px' //default menu width
var menubgcolor='lightyellow'  //menu bgcolor
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top="-500px"
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}


function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)

dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu



/* FUNCAO PARA DIGITAR SOMENTE NUMEROS
*****************************/
function SomenteNumeros(e) {
if(window.event) {
key = e.keyCode;
}
else if(e.which) {
key = e.which;
}
if (key==8 || key==9 || key < 48 || key > 57) return (((key > 47) && (key < 58)) || (key==8));
{
    return true;
  }
}

