		
			//Funções JS para rotinas em Strings			
		
			function LTrim( value ) 
			// Remove espaços a esquerda da string
			{
				
				var re = /\s*((\S+\s*)*)/;
				return value.replace(re, "$1");
				
			}
			
			// Remove espaços a direita da string
			function RTrim( value ) 
			{
				
				var re = /((\s*\S+)*)\s*/;
				return value.replace(re, "$1");
				
			}
			
			// Remove espaços em ambos os lados da string da string
			function trim( value ) 
			{
				
				return LTrim(RTrim(value));
				
			}
		
						
			//Só permite escrita de números 
			function OnlyNumbers(e)
			{
				var tecla=(window.event)?event.keyCode:e.which;			    
				if((tecla > 47 && tecla < 58) || ( tecla == 0 )) 
			    {
			    	return true;	
			    }
			    else
			    {
			    	if (tecla != 8)
			    	{
			    		return false;
			    	}
			    	else
			    	{
			    		return true;
			    	}
			    }
			}
			 
			//Só permite escrita de valores monetários
			function OnlyMoney(e)
			{
			    var tecla=(window.event)?event.keyCode:e.which;			    
			    if((tecla > 47 && tecla < 58) || ( tecla == 44 ) || ( tecla == 0 )) 
			    {
			    	return true;	
			    }
			    else
			    {
			    	if (tecla != 8)
			    	{
			    		return false;
			    	}
			    	else
			    	{
			    		return true;
			    	}
			    }
			}			 
			
			
			// Pega os valores de variáveis GET
			function getURLParam(strParamName)
			{
			  var strReturn = "";
			  var strHref = window.location.href;

			  if ( strHref.indexOf("&") > -1 )
			  {
			    var strQueryString = strHref.substr(strHref.indexOf("&")).toLowerCase();
			    var aQueryString = strQueryString.split("&");

			    for ( var iParam = 0; iParam < aQueryString.length; iParam++ )
			    {
			      if ( aQueryString[iParam].indexOf(strParamName + "=") > -1 )
			      {
			        var aParam = aQueryString[iParam].split("=");
			        strReturn = aParam[1];
			        break;
			      }
			    }
			  }
			 
			  return strReturn;
			}			