<!-- 
var subMenuTimeout;
var subMenuLastOpened = '';

function back() {
	history.back();
}

function findObj(n, d) {
	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 = findObj(n,d.layers[i].document);

	if (!x && d.getElementById) x = d.getElementById(n);

	return x;
}

function goTo(strURL) {
	window.location = strURL;
}

function hideObj (strObj) {
	obj = findObj(strObj);
	obj.style.display = 'none';
}

function hoverLineOff (obj, strBgColor) {
	obj.style.background = strBgColor;
	obj.style.cursor = 'auto';
}

function hoverLineOn (obj, strBgColor) {
	obj.style.background = strBgColor;
	obj.style.cursor = 'hand';
}

function isNumeric(value) {
	return stringValidation(value, "1234567890");
}

function openWindow(Pagina, Largura, Altura, scrollbars, status) {
	window.open(Pagina, '', 'width=' + Largura + ',height=' + Altura + ',scrollbars=' + scrollbars + ',status=' + status + ',toolbar=no,location=no,directories=no,menubar=no,resizable=no,copyhistory=no');
}

function openInParent(url) {
	top.opener.window.location = url;
}

function resizeWindow(intW, intH) {
	window.resizeTo(intW, intH);
}

function stringValidation(value, validChars) {
	var rt = true;

	for (i = 0; i < value.length && rt == true; i++) {
		Char = value.charAt(i); 
		if (validChars.indexOf(Char) == -1) {
			rt = false;
		}
	}

	return rt;
}

function stripNonNumeric(value) {
	return value.replace(/[^0-9]/g ,'');
}

function showObj (strObj) {
	var obj = findObj(strObj);
	obj.style.display = 'block';
}

function showSubMenu(strMenu) {
	clearTimeout(subMenuTimeout);
	
	if (subMenuLastOpened != '') {
		_hideSubMenu(subMenuLastOpened);
	}

	var obj = findObj(strMenu);
	obj.style.visibility = 'visible';
	subMenuLastOpened = strMenu;
}

function hideSubMenu(strMenu) {
	subMenuTimeout = setTimeout('_hideSubMenu("' + strMenu + '")', 2000);
}

function _hideSubMenu(strMenu) {
	var obj = findObj(strMenu);
	obj.style.visibility = 'hidden';
	subMenuLastOpened = '';
}

function StringChunk (strTexto, intTamanho, strSeparador) {
	var Retorna, i;

	Retorna = '';

	for (i = 0; i <= strTexto.length; i++) {
		Retorna += strTexto.substr(i, 1);
		if ((i + 1) % intTamanho == 0 && i < strTexto.length - 1) {
			Retorna += strSeparador;
		}
	}

	return Retorna;
}

function StringRevert (strTexto) {
	var Retorna, i;

	Retorna = '';

	for (i = strTexto.length - 1; i >= 0; i--) {
		Retorna += strTexto.substr(i, 1);
	}

	return Retorna;
}

function getBrowserWidth() {
  var myWidth = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
  } else {
    if( document.documentElement &&
        ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
      //IE 6+ in 'standards compliant mode'
      myWidth = document.documentElement.clientWidth;
    } else {
      if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
        //IE 4 compatible
        myWidth = document.body.clientWidth;
      }
    }
  }
  return myWidth;
}

function getBrowserHeight() {
  var myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myHeight = window.innerHeight;
  } else {
    if( document.documentElement &&
        ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
      //IE 6+ in 'standards compliant mode'
      myHeight = document.documentElement.clientHeight;
    } else {
      if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
        //IE 4 compatible
        myHeight = document.body.clientHeight;
      }
    }
  }
  return myHeight;
}

function numeros(event)
{
	
	var tecla
	
	// façade do pressionamento de tecla
	if (!event) var event = window.event;
    if (event.keyCode) tecla = event.keyCode;      
    else if (event.which) tecla = event.which; // Netscape 4.?
    else if (event.charCode) tecla = event.charCode; // Mozilla
	
	// tecla < 20 - teclas do sistema.
	// ( tecla == 46 ) - tecla DELETE.
	// ( tecla >= 33 && tecla <= 36 ) - teclas de home, end, page up, page down.
	// ( tecla >= 37 && tecla <= 40 ) - setas
	// ( tecla >= 48 && tecla <= 57 ) - teclas numéricas do teclado normal.
	// ( tecla >= 96 && tecla <= 105 ) - teclas numéricas do teclado numérico.
	
	if ( tecla < 20 || tecla == 46 || ( tecla >= 33 && tecla <= 36 ) || ( tecla >= 37 && tecla <= 40 ) || ( tecla >= 48 && tecla <= 57 ) || ( tecla >= 96 && tecla <= 105 ) ){
		
		return true;
		
	} else {
		
		return false;	
		
	}
	

}
function cpf(event){

	var v		= this.value;
	
	v=v.replace(/\D/g,"")                    //Remove tudo o que não é dígito
    v=v.replace(/(\d{3})(\d)/,"$1.$2")       //Coloca um ponto entre o terceiro e o quarto dígitos
    v=v.replace(/(\d{3})(\d)/,"$1.$2")       //Coloca um ponto entre o terceiro e o quarto dígitos
                                             //de novo (para o segundo bloco de números)
    v=v.replace(/(\d{3})(\d{1,2})$/,"$1-$2") //Coloca um hífen entre o terceiro e o quarto dígitos
	
	this.value	= v;
	
}
-->
