// JavaScript Document

if (top.location != self.location 	){

		top.location = self.location;

}



data = new Date();

mes = data.getMonth();

ano = data.getYear();



function info(ur){

		largura = 410;

		altura = 350;

		

		distop= (screen.height / 2) - (altura / 2);

		disleft= (screen.width / 2) - (largura / 2); 

		//alert(distop + " | " + disleft);

		nome= "ajuda";

		propriedades = "width=" + largura + ",height=" + altura + ",top=" + distop + ",left="+ disleft + ",toolbar=no,directories=no,status=no,scrollbars=yes,resize=no,menubar=no";

		janela = window.open(ur,nome,propriedades);

		setTimeout("janela.focus()", 200);

}

/////////////////////////////

//Validações de inputs



function onlyNumbers(inputString, field, nome){

var checkOK = "0123456789";

var checkStr = inputString;

var allValid = true;

var allNum = "";

for (i = 0;  i < checkStr.length;  i++)

{

ch = checkStr.charAt(i);

for (j = 0;  j < checkOK.length;  j++)

if (ch == checkOK.charAt(j))

break;

if (j == checkOK.length)

{

allValid = false;

break;

}

if (ch != ",")

allNum += ch;

}

	if (!allValid)

	{

		alert("Please enter only digit characters in " + nome + " field.");

		eval(field).value=0;

		eval(field).focus();

	}



} 





function onlyNumbersposneg(inputString, field, nome){

var checkOK = "-0123456789";

var checkStr = inputString;

var allValid = true;

var sinal = false;

var allNum = "";

for (i = 0;  i < checkStr.length;  i++)

{

ch = checkStr.charAt(i);

for (j = 0;  j < checkOK.length;  j++)

if (ch == checkOK.charAt(j))

{

	if (ch == "-")

	{

		if (sinal)

		{

			allvalid = false;

		}

		if (!sinal)

		{

			sinal = true;

		}

	}

	break;

}

if (j == checkOK.length)

{

allValid = false;

break;

}

if (ch != ",")

allNum += ch;

}

	if (!allValid)

	{

		alert("Please enter only digit characters in " + nome + " field.");

		eval(field).value=0;

		eval(field).focus();

	}



}





function vazio(valor)

		{

		if (valor == "" ){

			

			}	 

}

function mostraDica(e, msg) {

  if ( typeof Tooltip == "undefined" || !Tooltip.ready ) return;

  Tooltip.show(e, msg);

}



function hideTip() {

  if ( typeof Tooltip == "undefined" || !Tooltip.ready ) return;

  Tooltip.hide();

}

