function trim(s) {
	while ((s.substring(0,1) == ' ') || (s.substring(0,1) == '\n') || (s.substring(0,1) == '\r'))
		{
			s = s.substring(1,s.length);
		}
	while ((s.substring(s.length-1,s.length) == ' ') || (s.substring(s.length-1,s.length) == '\n') || (s.substring(s.length-1,s.length) == '\r'))
		{
			s = s.substring(0,s.length-1);
		}
		return s;
}
function check_email(strEmail) {
	var filter=/^[A-Za-z0-9]+([_\.-][A-Za-z0-9]+)*@[A-Za-z0-9]+([_\.-][A-Za-z0-9]+)*\.([A-Za-z]){2,4}$/i;
	if (filter.test(strEmail))
		return true;
	else return false;
}
function check_numeric(strString) {
	var strValidChars = "0123456789.";
	var strChar;
	var blnResult = true;
	if (strString.length == 0) return false;
	for (i = 0; i < strString.length && blnResult == true; i++) {
		strChar = strString.charAt(i);
		if (strValidChars.indexOf(strChar) == -1) {
			blnResult = false;
		}
	}
	return blnResult;
}
function sure_logout(){
	return window.confirm ("Are you sure you want to log out?");
}
function sure_delete_product(){
	return window.confirm ("Are you sure you want to delete this product?");
}
function sure_delete_blog(){
	return window.confirm ("Are you sure you want to delete this blog?");
}
function sure_delete_banner(){
	return window.confirm ("Are you sure you want to delete this image?");
}
function sure_delete_team(){
	return window.confirm ("Are you sure you want to delete this team member?");
}
function sure_delete_comment(){
	return window.confirm ("Are you sure you want to delete this comment?");
}
