//////////////////////////////start String /////////////////
function removeLeadingAndTrailingChar (inputString, removeChar) {
	var returnString = inputString;
	if (removeChar.length){
	  while(''+returnString.charAt(0)==removeChar) {
	    returnString=returnString.substring(1,returnString.length);
	  }
	  while(''+returnString.charAt(returnString.length-1)==removeChar) {
	    returnString=returnString.substring(0,returnString.length-1);
	  }
	}
	return returnString;
}
// The function will verify if the value passed as a parameter is numeric or not
function isNumeric(inputString){
	var pattern = /^[0-9][0-9]*\.?[0-9]*$/;
	if(pattern.test(inputString) == false){	
		return false;
	}
	return true;
}
/**
*The function will validate the entered email address.
*/
function echeck (checkThisEmail){
	var pattern=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
	return (pattern.test(checkThisEmail))? true : false;
}

function isURLValid(URL){
	var pattern=/^(http:\/\/){1}(w){3}[0-9]{0,1}[.]{1}[a-zA-Z0-1]{1,}(\-){0,1}[a-zA-Z0-1]{1,}[.]{1}[a-zA-Z]{1,}/
	return (pattern.test(URL))? true : false;
}
