String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g,""); }
function check(f,ed)
{
if (f.owname.value.trim().length == 0)
   {
   alert("Please enter the owner's name");
   return false;
   }

if (f.email.value.trim().length == 0)
   {
   alert("Please enter the owner's email address");
   return false;
   }

if (ed && f.cp.value.trim().length == 0)
   {
   alert("Please enter the current password");
   return false;
   }

if (!ed && f.p1.value.trim().length == 0)
   {
   alert("Please enter a password");
   return false;
   }

if (!ed && f.p2.value.trim().length == 0)
   {
   alert("Please confirm your password");
   return false;
   }
return true;
}

function checkcont(f)
{
if (f.name.value.trim().length == 0)
   {
   alert("Please enter your name");
   return false;
   }
else
if (f.email.value.trim().length == 0)
   {
   alert("Please enter your email address");
   return false;
   }
else
if (f.msg.value.trim().length == 0)
   {
   alert("Please enter your message");
   return false;
   }
return true;
}