function UrlQueryString(uri, parametro)
{
	//Si no existe el parametro en la uri, se retorna vacio
	var pos=uri.indexOf('&'+parametro+'=');
	if (pos==-1) return('');
			
	//Si el ultimo caracter es & se elimina...momentaneamente	
	var uritmp=(uri.slice(uri.length-1)=='&') ? uri : uri+'&';

	//Se rescata el parametro
	var posI=pos+parametro.length+2;
	var posF=uritmp.indexOf('&', posI+1);
	
	return(uritmp.substring(posI, posF));
}

//Eliminacion de los espacios en blanco de los extremos de un string
String.prototype.trim = function()
{
	return(this.replace(/^\s*|\s*$/g,""))
}

//Eliminacion de todos los espacios en blanco de los extremos de un string
String.prototype.trimAll = function()
{
	return(this.replace(/\s*/g,""))
}

//Cambia un SubString de un String
String.prototype.ReplaceSubstring = function(strFrom, strTo)
{
	return(this.replace(new RegExp(strFrom,'g'),strTo));
}

//La primera letra en mayuscula
String.prototype.toProperCase = function()
{
	return(this.charAt(0).toUpperCase() + this.substring(1).toLowerCase());
}

//Lo que esta a la izquierda de un string
String.prototype.strLeft = function(str)
{
	return(this.substring(0, this.indexOf(str)));
}

//Lo que esta a la derecha de un string
String.prototype.strRight = function(str)
{
	return(this.substring(str.length+this.indexOf(str)));
}

//Lo que esta entre dos string
String.prototype.strBetween  = function(strI, strT)
{
	/*
	var posI=this.indexOf(strI);
	if (posI==-1) return('');

	return(this.substring(posI,this.indexOf(strT, posI+1)).replace(new RegExp(strI,'g'),' '));
	*/

	var posI=this.indexOf(strI);	
	return(this.substring(posI,this.indexOf(strT, posI)));	
}
