hoje = new Date();
mes_atual = hoje.getMonth();
mes_atual = mes_atual + 1;

function VerificaPlataforma(){
	plataforma = navigator.platform;
	teste = plataforma.indexOf('Win');
	//alert(teste);
	if (teste == -1){
		//alert('É Macintoch');
		document.write("<font color='#ffffff' face='verdana' size='2'>mac</font>");
	}
	else{
		//alert('É Windows');
		document.write("<font color='#ffffff' face='verdana' size='2'>win</font>");
	}
}

//Função para mostrar ou esconder os menus, primeiro parametro é o numero de menus a mostrar seguido dos respectivos menus, depois os menus a esconder
function MSH() {
for (i = 1; i <= MSH.arguments[0]; i++) {
    MM_showHideLayers('menu'+MSH.arguments[i],'','show');
}
for (i = MSH.arguments[0]+1; i < MSH.arguments.length; i++)
    MM_showHideLayers('menu'+MSH.arguments[i],'','hide');
}


function browserteste() {

	ns4 = (document.layers)? true:false
	ie4 = (document.all)? true:false

	plataforma = navigator.platform;
	teste = plataforma.indexOf('Win');
	if (teste == -1){
	//alert('É Macintosh');
	if (ie4) {
		
				secoes.style.left = "541px";
				secoes.style.top = "87px";
		
	}
	}
	else{
	//alert('É Windows');
	if (ie4) {
		
				secoes.style.left = "578px";
				secoes.style.top = "87px";
		
	}
	}
		
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function mostramenusecoesindex() {
  if (Vsecoes) {
    MM_showHideLayers('secoes','','hide');
    Vsecoes = false;
  } else {
    MM_showHideLayers('secoes','','show');
    Vsecoes = true;
  }
}

Vsecoes = true;
function mostramenusecoes() {
	if (Vsecoes) {
  MM_showHideLayers('secoes','','show');
    Vsecoes = false;
  } else {
    MM_showHideLayers('secoes','','hide');
	Vsecoes = true;
	}
}


function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}


function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

function mOvr(src,clrOver) {if (!src.contains(event.fromElement)) {src.style.cursor = 'hand';
src.bgColor = clrOver;
}
}
function mOut(src,clrIn) {if (!src.contains(event.toElement)) {src.style.cursor = 'default';
src.bgColor = clrIn;
}
}

function janela(pag) {
  win = window.open(pag, 'globojan','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=0,noresize,width=550,height=500')
}

function janelaglobon(pag) {
  win = window.open(pag, 'globojan','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=0,noresize,width=504,height=560')
}

function popupindex(pag,w,h) {
  win = window.open(pag,'globojan','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=0,noresize,width='+w+',height='+h)
}

function popupindexNewScroll(pag,w,h,s,nome) {
  win = window.open(pag,nome,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars='+s+',resizable=0,noresize,width='+w+',height='+h)
}

function validaMail(campo,texto)
{
	var num
	num = campo.value
	if (num==""){return;}
	if (!isEmail(num))
	{
		alert("O campo "+ texto + " não está preenchido com o formato correto.");
		campo.focus();
		campo.select();
		return;
	}
}

function validaNum(campo,texto)
{
	var num
	num = campo.value
	if (num==""){return;}
	if (!isInteger(num))
	{
		alert("O campo "+ texto + " é obrigatoriamente um campo numérico.");
		campo.focus();
		campo.select();
		return;
	}
}


function validaData(campo,texto)
{
	var data
	var mes
	var mes_t
	var dt
	data = campo.value
	if (data==""){return;}
	mes_t = data.substring(data.search("/")+1,10);
	mes = mes_t.substring(0,mes_t.search("/"));
	ano = mes_t.substring(mes_t.search("/")+1,mes_t.length);
		//alert(ano);

	if (!isInteger(data.substring(0,data.search("/"))) || parseInt(data.substring(0,data.search("/"))) > 31 || !isInteger(mes) || parseInt(mes) > 12)
	{
		alert("O campo "+ texto + " não está preenchido corretamente. Formato: dd/mm/aaaa");
		campo.focus();
		campo.select();
		return;
	}
	if (!isInteger(ano) || parseInt(ano) < 1900)
	{
		alert("O campo "+ texto + " não está com ano de 4 dígitos. Formato: dd/mm/aaaa");
		campo.focus();
		campo.select();
		return;
	}

}

function ShowOrHide(gLayer) {
ns4 = (document.layers)? true:false
ie4 = (document.all)? true:false
if (ns4){
		block = document.gLayer;
		if (block.visibility = "show"){
		block.visibility = "hide";
		}
		else{
		block.visibility = "show"
		}
	}

if (ie4){
		block = gLayer.style;
		if (block.visibility = "visible"){
		block.visibility = "hidden";
		}
		else{
		block.visibility = "visible"
		}
	}

}

function submete6 () {

    if (document.resp.txt_resposta.value == "") {
      alert("Entre com um texto de resposta.");
      document.resp.txt_resposta.focus();
	  return false;
    }

    if (document.resp.respondente.value == "") {
      alert("Entre com um nome de respondente válido.");
      document.resp.respondente.focus();
	  return false;
    }

	return true;

}


function submete9 () {

    if (document.respcliente.txt_resposta.value == "") {
      alert("Entre com um texto de resposta.");
      document.respcliente.txt_resposta.focus();
	  return false;
    }

    if (document.respcliente.respondente.value == "") {
      alert("Entre com um nome de respondente válido.");
      document.respcliente.respondente.focus();
	  return false;
    }

	return true;

}

function escolhe_cadastro () {

	  if ((!document.escolha.cadastro[0].checked) && (!document.escolha.cadastro[1].checked)) {
alert("Escolha um ramo para prosseguir com o cadastro.");
		return false;
}
		return true;
}

function agenda_search () {
    if (document.agenda.agenda_txt.value == "") {
      alert("Entre com um texto para pesquisa.");
      document.agenda.agenda_txt.focus();
	  return false;
    }
	return true;
}


//var popups//
if (document.all){
// explorer //
vh0 = 242
vh1 = 146
vh2 = 273
vh3 = 436
vh4 = 310
vh5 = 322
vh6 = 325
vh7 = 280
vh8 = 306
vh9 = 280
vh10 = 312
vh11 = 322
vh12 = 306
vh13 = 212
vh14 = 325
vh15 = 372
}
else{
// netscape //
vh0 = 453
vh1 = 327
vh2 = 450
vh3 = 436
vh4 = 311
vh5 = 311
vh6 = 394
vh7 = 285
vh8 = 312
vh9 = 300
vh10 = 262
vh11 = 322
vh12 = 310
vh13 = 212
vh14 = 372
vh15 = 372
}



<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
