﻿        function CheckNumericKeyInfo($char, $mozChar) 
        {
            if($mozChar != null) 
            { // Look for a Mozilla-compatible browser
                if(($mozChar >= 48 && $mozChar <= 57) || $mozChar == 0 || $char == 8 || $mozChar == 13) 
                    $RetVal = true;
                else    
                {
                    $RetVal = false;
                    //alert('Please enter a numeric value.');
                }
            }
            else 
            { 
                // Must be an IE-compatible Browser
                if(($char >= 48 && $char <= 57) || $char == 13) 
                    $RetVal = true;
                else 
                {
                    $RetVal = false;
                    //alert('Please enter a numeric value.');
                }
            }
            return $RetVal;
        }
        
        function removePonto(campo)
        {
            var tmp = campo.value;
            tmp = tmp.replace(".","");
            tmp = tmp.replace(".","");
            tmp = tmp.replace(".","");
            tmp = tmp.replace("/","");
            tmp = tmp.replace("/","");
            tmp = tmp.replace("-","");
            campo.value = tmp;
        }
        
    function stAba(menu,conteudo,href)
	{
		this.menu = menu;
		this.conteudo = conteudo;
		this.href = href;
	}

	var arAbas = new Array();
	arAbas[0] = new stAba('li_alunos','div_alunos','h_alunos');
	arAbas[1] = new stAba('li_pais','div_pais','h_pais');
	arAbas[2] = new stAba('li_professores','div_professores','h_professores');
	

	function AlternarAbasAR(menu,conteudo,href)
	{
	    //seta valor padrao pra tudo
		for (i=0;i<arAbas.length;i++)
		{
			c = document.getElementById(arAbas[i].conteudo)
			c.style.display = 'none';
			h = document.getElementById(arAbas[i].href)
			h.className = 'menu0' + (i+1) + 'box';
		}
		
        //mostro a area de login correspondente
		c = document.getElementById(conteudo)
		c.style.display = '';
		
		//seto a classe da ultima aba
        if(menu=='li_professores')
		{
		    m = document.getElementById('li_professores');
			m.className = 'ultimoitenbox';
		}
		
		//seto a classe correspondente
		if(href=='h_alunos')
		{
		    h = document.getElementById('h_alunos');
			h.className = 'menu01box_act';
			//tmp = document.getElementById('hidAbaAtiva');
			//tmp.Value = 'h_alunos';
		}
		else
		if(href=='h_pais')
		{
		    h = document.getElementById('h_pais');
			h.className = 'menu02box_act';
			//tmp = document.getElementById('hidAbaAtiva');
			//tmp.Value = 'h_pais';
		}
		else
		if(href=='h_professores')
		{
		    h = document.getElementById('h_professores');
			h.className = 'menu03box_act';
			//tmp = document.getElementById('hidAbaAtiva');
			//tmp.Value = 'h_professores';
		}
	}
	
	


