function campoNumerico(evt,campo) 
{
		evt = (evt) ? evt : window.event
		var digito = campo.value
		if (isNaN (digito))
		{
			var mainString = campo.value
			var param1 = 0
			var param2 = -1
			campo.value = mainString.slice(param1, param2)
			alert ("Este campo só aceita números.")
			campo.focus()
		}
}



// COMANDOS DE JANELAS POPUP
function abreJanela(url, nome, caracteristicas)
{ 
	window.open(url, nome, caracteristicas);
}

function OuvirMensagem(URL) {

   var width = 310;
   var height = 320;

   var left = 99;
   var top = 99;

   window.open(URL,'OuvirMensagem', 'width='+width+', height='+height+', top='+top+', left='+left+', scrollbars=no, status=yes, toolbar=no, location=no, directories=no, menubar=no, resizable=no, fullscreen=no');

}

function Mapa(URL) {

   var width = 831;
   var height = 520;

   var left = 99;
   var top = 99;

   window.open(URL,'Mapa', 'width='+width+', height='+height+', top='+top+', left='+left+', scrollbars=no, status=yes, toolbar=no, location=no, directories=no, menubar=yes, resizable=no, fullscreen=no');

}


function FaleCom(URL) {

   var width = 400;
   var height = 250;

   var left = 99;
   var top = 99;

   window.open(URL,'FaleCom', 'width='+width+', height='+height+', top='+top+', left='+left+', scrollbars=no, status=yes, toolbar=no, location=no, directories=no, menubar=no, resizable=no, fullscreen=no');

}

function PopUp(URL) {

   var width = 890;
   var height = 650;

   var left = 99;
   var top = 2;

   window.open(URL,'PopUp', 'width='+width+', height='+height+', top='+top+', left='+left+', scrollbars=yes, status=yes, toolbar=no, location=no, directories=no, menubar=no, resizable=yes, fullscreen=no');

}


function Radio(URL) {

   var width = 282;
   var height = 360;

   var left = 99;
   var top = 99;

   window.open(URL,'FaleCom', 'width='+width+', height='+height+', top='+top+', left='+left+', scrollbars=no, status=yes, toolbar=no, location=no, directories=no, menubar=no, resizable=no, fullscreen=no');

}


function Album(URL) {

   var width = 650;
   var height = 400;

   var left = 99;
   var top = 99;

   window.open(URL,'Album', 'width='+width+', height='+height+', top='+top+', left='+left+', scrollbars=no, status=yes, toolbar=no, location=no, directories=no, menubar=no, resizable=no, fullscreen=no');

}
//FIM COMANDOS DE JANELAS POPUP
function validarExclusao(URL, textoconfirm)
{
	if(confirm(textoconfirm))
	{
		document.location.href = URL;
	}
	else
	{
    	return false;
	}
}

function escreveData() 
{ 
  day = new Date() 
  num_dia = day.getDate() 
  dia = day.getDay() 
  mes = day.getMonth() 
  ano = day.getYear() 

  diaSemana = new Array("Domingo","Segunda-feira","Terça-feira","Quarta-feira","Quinta-feira","Sexta-feira","Sábado") 
  nomeMes = new Array("janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro") 
  dataext = diaSemana[dia] + ", " + num_dia + " de " + nomeMes[mes] + " de " + ano 

  return dataext; 
} 

function escreveDataSem() 
{ 
  day = new Date() 
  num_dia = day.getDate() 
  dia = day.getDay() 
  mes = day.getMonth() 
  ano = day.getYear() 

  nomeMes = new Array("janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro") 
  dataext = num_dia + " de " + nomeMes[mes] + " de " + ano 

  return dataext; 
} 


function limpa_espaco(campoV){
	for (var i = 0; i < campoV.length; i++){
		campoV[i].value = Trim(campoV[i].value)
	} 
}

function ativoIG1(src) {
if (!src.contains(event.fromElement))
 {
    src.bgColor = '#336699';
	src.style.color = '#FFFFFF';
	src.style.cursor = "hand";
 }
}
function inativoIG1(src) {
if (!src.contains(event.toElement))
 {
	  src.bgColor = '#F0F0F0';
	  src.style.color = '#666666';
	  src.style.cursor = "default";
 }
}



//function disableRightClick(e)
//{
//  var message = "Igreja Geração Eleita © 2006 Copyright. Todos os Direitos Reservados.";
  
//  if(!document.rightClickDisabled) // initialize
//  {
//    if(document.layers) 
//    {
//      document.captureEvents(Event.MOUSEDOWN);
//      document.onmousedown = disableRightClick;
//    }
//    else document.oncontextmenu = disableRightClick;
//    return document.rightClickDisabled = true;
//  }
//  if(document.layers || (document.getElementById && !document.all))
//  {
//    if (e.which==2||e.which==3)
//    {
//      alert(message);
//      return false;
//    }
//  }
//  else
//  {
//    alert(message);
//    return false;
//  }
//}
//disableRightClick();



//if (document.all)
//document.
//onselectstart=
//function () {return false;}; 

