function ContainsNumeric(str)
{
   var CheckForChars = " 0123456789";
   var ContainsNumber = false;
   var Char;
 
   for (i = 0; i < str.length && ContainsNumber == false; i++) 
      { 
      Char = str.charAt(i); 
      if (CheckForChars.indexOf(Char) > 0) 
         {
         ContainsNumber = true;
         }
      }
   return ContainsNumber;
}

function Trim(str)
{
return( (""+str).replace(/^\s*([\s\S]*\S+)\s*$|^\s*$/,'$1') );
}

function checkSearch()
{
search = Trim(document.form1.search.value);
words = search.split(" ");
if ((search == "") || (words.length > 1) || (ContainsNumeric(search) == true))
	{
	alert("IMPORTANT >>> If you watch the full 'eBay Tips & Strategies \nOnline Video', you'll understand why you'll always get better \nresults searching ONE word at a time. \n\nTry again, but this time enter ONE word (no numbers), and \nalways try to search in the singular form (i.e. search for \nwallet, not wallets).");
	return false;
	}
else
	return true;
}

function checkForm()
{
missinginfo = "";
name = Trim(document.form2.name.value);
from = Trim(document.form2.from.value);
if ((name == "") || (name == "My First Name"))
{
missinginfo += "\n- First Name";
}

if ((from == "") || (from == "please check!") || (from.indexOf('@') == -1) || (from.indexOf('.') == -1))
{
missinginfo += "\n- Email Address";
}

if (missinginfo != "")
{
	missinginfo = "You failed to correctly fill in your:\n" +
	missinginfo + "\n\nPlease re-enter and submit again";
	alert(missinginfo);
	return false;
}
else
	return true;
}