	// JavaScript Document
/* INICIO COR DO MENU */

function OverMenu(qObject)
{
	qObject.style.backgroundColor='#2B6EB5';
	qObject.style.cursor = 'hand';
}

function OutMenu(qObject)
{
	qObject.style.backgroundColor='#FBFBFB';
	qObject.style.cursor = '';
}
 
/* FIM COR DO MENU */ 
 



function AbreUm(){
	document.getElementById('Um').style.display = 'inline';	
	document.getElementById('Dois').style.display = 'none';
	document.getElementById('Tres').style.display = 'none';
	document.getElementById('Quatro').style.display = 'none';
	
}

function AbreDois(){
	document.getElementById('Um').style.display = 'none';	
	document.getElementById('Dois').style.display = 'inline';
	document.getElementById('Tres').style.display = 'none';
	document.getElementById('Quatro').style.display = 'none';
	
}

function AbreTres(){
	document.getElementById('Um').style.display = 'none';	
	document.getElementById('Dois').style.display = 'none';
	document.getElementById('Tres').style.display = 'inline';
	document.getElementById('Quatro').style.display = 'none';
	
}

function AbreQuatro(){
	document.getElementById('Um').style.display = 'none';
	document.getElementById('Dois').style.display = 'none';
	document.getElementById('Tres').style.display = 'none';
	document.getElementById('Quatro').style.display = 'inline';
	
}


/* INICIO DATA */


function MakeArray(n) {

	this.length = n

	return this

}
monthNames = new MakeArray(12)

monthNames[1] = "Janeiro"

monthNames[2] = "Fevereiro"

monthNames[3] = "Março"

monthNames[4] = "Abril"

monthNames[5] = "Maio"

monthNames[6] = "Junho"

monthNames[7] = "Julho"

monthNames[8] = "Agosto"

monthNames[9] = "Setembro"

monthNames[10] = "Outubro"

monthNames[11] = "Novembro"

monthNames[12] = "Dezembro"



dayNames = new MakeArray(7)

dayNames[1] = "Domingo,"

dayNames[2] = "Segunda-feira,"

dayNames[3] = "Terça-feira,"

dayNames[4] = "Quarta-feira,"

dayNames[5] = "Quinta-feira,"

dayNames[6] = "Sexta-feira,"

dayNames[7] = "Sábado,"



function DateString(oneDate) {

	var theDay = dayNames[oneDate.getDay() + 1]

	var theMonth = monthNames[oneDate.getMonth() + 1]
 
	return theDay + " " + oneDate.getDate() + " de " + theMonth + " de " + 2010 + "&nbsp"



}

/* FIM DATA */



/* INICIO MENU ESQUERDA */

	function AbreMenu(){
		if(document.getElementById('SubCapitulo').style.display == 'inline'){
			document.getElementById('SubCapitulo').style.display = 'none';
			
		}else{
			document.getElementById('SubCapitulo').style.display = 'inline';
		}
	}
	function AbreMenu1(){
		if(document.getElementById('SubCapitulo1').style.display == 'none'){
			document.getElementById('SubCapitulo1').style.display = 'inline';
			
		}else{
			document.getElementById('SubCapitulo1').style.display = 'none';
		}
	}	
/* FIM MENU ESQUERDA */


/* INICIO VERIFICA FORM */

	function verifica(){
					if(form1.txtNome.value == ""){
						envia = 0;
						alert("Digite o Nome");
						form1.txtNome.focus();
						return false; 	
					 }else{
						envia = 1;
					 }
					 				 
					 
					if(form1.txtEmpresa.value == ""){
						alert("Digite o Empresa");
						envia = 0;
						form1.txtEmpresa.focus();
						return false; 	
					 }else{
						envia = 1;
					 }
	
					if(form1.txtTel.value == ""){
						alert("Digite o Telefone");
						envia = 0;
						form1.txtTel.focus();
						return false; 	
					 }else{
						envia = 1;
					 }
	
			
					if(form1.txtEmail.value == ""){
						alert("Digite o Email");
						envia = 0;
						form1.txtEmail.focus();
						return false; 	
					}else{
						envia = 1;
					}
					
	
					   parte1 = form1.txtEmail.value.indexOf("@");
	  				   parte2 = form1.txtEmail.value.indexOf(".");
	     			   parte3 = form1.txtEmail.value.length;
	       			   if (!(parte1 >= 3 && parte2 >= 6 && parte3 >= 9)) {
	                        form1.txtEmail.focus();
						alert("Digite o Email Correto");
						    envia = 0;
	                        return false;
	                   }else{
						    envia = 1;
					   }
					
					
					
					
					 if(envia == 1){
						
					     return true;
					 }else{
					 	 
						 return false; 	
					 }
					 
					 
	}		


/* FIM VERIFICA FORM */


/* INICIO IMG RAND*/

function CriaArray(n)
{
  this.length = n;
}

function rand()
{
  var now=new Date();
  var num=(now.getSeconds())%4;
  var num=num+1;
  return(num);
}

function mostra_banner()
{
  var num = rand();
  banner = new CriaArray(4);
  b_link = new CriaArray(4);
   banner[1] = "img/banner/Mensagem1.gif";
   banner[2] = "img/banner/Mensagem2.gif";
   banner[3] = "img/banner/Mensagem3.gif";
   banner[4] = "img/banner/Mensagem4.gif";


  b_link[1] = "http://www.secovi.com.br/portal/hotsite/postoreceita/";  
  b_link[2] = "http://www.secovi.com.br/portal/hotsite/postoreceita/";  
  b_link[3] = "http://www.secovi.com.br/portal/hotsite/postoreceita/";  
  b_link[4] = "http://www.secovi.com.br/portal/hotsite/postoreceita/";  
  
  
  if(num==1||num==2||num==3||num==4)
  {
    //document.write('<a href="' + b_link[num] + '" target="_blank" >');
    document.write('<img src="' + banner[num] + '" border="0">');
            
  }
  else
  {
    document.write('<a href="' + b_link[num] + '" target="_blank" ><img src="' + banner[num] + '" border=0 width="468" height="60"></a>');
  }

}



