function isValidPrice(price)
{
	var numberRegExp = /(^\d+$)|(^\d+\.\d+$)/;

	if (numberRegExp.test(price) && price != 0)
		return true;
	else
		return false;
}

function isValidEmail(email)
{
	var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	
	if (!filter.test(email))
		return false;

	return true;
}

function trim(s)
{
  while (s.substring(0,1) == ' ')
	{
    s = s.substring(1,s.length);
  }
  while (s.substring(s.length-1,s.length) == ' ')
	{
    s = s.substring(0,s.length-1);
  }
  return s;
}