/*-----------------------------------------------------------------------------+
| Funções Gerais JavaScript                                                    |
+-----------------------------------------------------------------------------*/

function popup(url,w,h){
	window.open(url,"","toobar=no,location=no,directories=no,maximize=no,menubar=no,scrollbars=yes,status=no,resizable=no,WIDTH="+w+",HEIGHT="+h+",top=0,left=50");
}

function roundNumber(preco) {
	var numberField = preco;
	var rlength = 2; // The number of decimal places to round to
	var newnumber = Math.round(numberField*Math.pow(10,rlength))/Math.pow(10,rlength);
	return newnumber;
}
function IsNumeric(sText) {
   var ValidChars = "123456789 ";
   var IsNumber=true;
   var Char;


   for (i = 0; i < sText.length && IsNumber == true; i++)
      {
      Char = sText.charAt(i);
      if (ValidChars.indexOf(Char) == -1)
         {
         IsNumber = false;
         }
      }
   return IsNumber;
}

$(document).ready(function() {
	$('div.pesquisaTopo a.btHelp').hover(function() {
		$('div.pesquisaTopo div.helpPesquisa').show();
	}, function() {
		$('div.pesquisaTopo div.helpPesquisa').hide();
	});

	$("a.btnMoreGal.assoc").fancybox({
		'type'			: 	'ajax',
		'speedIn'		:	600, 
		'speedOut'		:	200, 
		'overlayShow'	:	true,
		'padding'		:	0
	});
});
