function AbreJanelaChamados() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth  = document.body.clientWidth;
    myHeight = document.body.clientHeight;	
  }
  //window.alert( 'Width = ' + myWidth );
  //window.alert( 'Height = ' + myHeight );
  
  myWidth  = myWidth	+ 10; //largura
  myHeight = myHeight + 110; //altura

  window.open("http://uricer.edu.br/chamados/login.php", "nova_janela" ,"menubar=no,scrollbars=no,resizable=yes,top=0,left=0,right=0,status=no,height="+myHeight+",width="+myWidth+"");
   
}

function JanelaFull()
{
	if (screen.width>0)	lWidth=screen.width; else lWidth=800;
	if (screen.height>0) iHeight=screen.height; else iHeight=600;
 remote = window.open('https://mundo.uricer.edu.br/siescii/login.php','Siesc',"height="+iHeight+",width="+lWidth+",toolbar=0,menubar=0,titlebar=0,location=0,directories=0,resizable=1,scrollbars=0,status=0,left=0,top=0");
}

function JanelaFull_SIG()
{
	if (screen.width>0)	lWidth=screen.width; else lWidth=800;
	if (screen.height>0) iHeight=screen.height; else iHeight=600;
 remote = window.open('https://sig.uricer.edu.br/sig/login.php','SIG',"height="+iHeight+",width="+lWidth+",toolbar=0,menubar=0,titlebar=0,location=0,directories=0,resizable=1,scrollbars=1,status=0,left=0,top=0");
}


function ApagaLayer(){
		Propaganda.style.display = 'none';
}

//ELEMENTOS COM FONTES

	var inicio_elementos_texto = new Array();
	var inicio_fonte_inicial   = 12;
	var inicio_fonte_minima    = 7;
	var inicio_fonte_maxima    = 21;

	inicio_elementos_texto[0] = '.titulo_adminsitrativa';
	inicio_elementos_texto[1] = '.texto_administrativa';
	inicio_elementos_texto[2] = '.nomes_adminsitrativa';
	inicio_elementos_texto[3] = '.texto';
	inicio_elementos_texto[4] = '.titulo';

	inicio_elementos_texto[5] = '.titulo_mostrar_noticia';
	inicio_elementos_texto[6] = '.data_mostrar_noticia';
	inicio_elementos_texto[7] = '.texto_padrao';

	inicio_elementos_texto[8] = '.titulo_cursos';


	function texto_aumentar()
	{
		var i;
		if(inicio_fonte_inicial<inicio_fonte_maxima) inicio_fonte_inicial = inicio_fonte_inicial + 2;

		for(i=0;i<inicio_elementos_texto.length;i++)
		{	
			if(jQuery(inicio_elementos_texto[i])) jQuery(inicio_elementos_texto[i]).css("fontSize", inicio_fonte_inicial+"px");
		}
	}

	function texto_diminuir()
	{
		var i;
		if(inicio_fonte_inicial>inicio_fonte_minima) inicio_fonte_inicial = inicio_fonte_inicial - 2;

		for(i=0;i<inicio_elementos_texto.length;i++)
		{	
			if(jQuery(inicio_elementos_texto[i])) jQuery(inicio_elementos_texto[i]).css("fontSize", inicio_fonte_inicial+"px");
		}
	}

//fim elementos com fontes

//VALIDAR CPF

	function ClearStr(str, char)
	{
	  while((cx=str.indexOf(char))!=-1)
	  {		
	    str = str.substring(0,cx)+str.substring(cx+1);
	  }
	  return(str);
	}

	function ParseNumb(c)
	{
	  c=ClearStr(c,'-');
	  c=ClearStr(c,'/');
	  c=ClearStr(c,',');
	  c=ClearStr(c,'.');
	  c=ClearStr(c,'(');
	  c=ClearStr(c,')');
	  c=ClearStr(c,' ');
	  if((parseFloat(c) / c != 1))
	  {
	    if(parseFloat(c) * c == 0)
	    {
	      return(c);
	    }
	    else
	    {
	      return(0);
	    }
	  }
	  else
	  {
	    return(c);
	  }
	}

	function Verify_CPF(CNUMB,CTYPE)
	{
		
		if(CNUMB=="00000000000") return(false);
		if(CNUMB=="11111111111") return(false);
		if(CNUMB=="22222222222") return(false);
		if(CNUMB=="33333333333") return(false);
		if(CNUMB=="44444444444") return(false);
		if(CNUMB=="55555555555") return(false);
		if(CNUMB=="66666666666") return(false);
		if(CNUMB=="77777777777") return(false);
		if(CNUMB=="88888888888") return(false);
		if(CNUMB=="99999999999") return(false);


	  CNUMB=ParseNumb(CNUMB)
	  if(CNUMB == 0)
	  {
	    return(false);
	  }
	  else
	  {
	    g=CNUMB.length-2;
	    if(TestDigit(CNUMB,CTYPE,g))
	    {
	      g=CNUMB.length-1;
	      if(TestDigit(CNUMB,CTYPE,g))
	      {	
		return(true);
	      }
	      else
	      {
		return(false);
	      }
	    }
	    else
	    {
	      return(false);
	    }
	  }
	}

	function TestDigit(CNUMB,CTYPE,g)
	{
	  var dig=0;
	  var ind=2;
	  for(f=g;f>0;f--)
	  {
	    dig+=parseInt(CNUMB.charAt(f-1))*ind;
	    if (CTYPE=='CNPJ')
	    { if(ind>8) {ind=2} else {ind++} }
	    else
	    { ind++ }
	  }
	  dig%=11;
	  if(dig<2)
	  {
	    dig=0;
	  }
	  else
	  {
	    dig=11-dig;
	  }
	  if(dig!=parseInt(CNUMB.charAt(g)))
	  {
	    return(false);
	  }
	  else
	  {
	    return(true);
	  }
	}

//FIM VALIDAR CPF

