function check_Email(oEmail) 
{
   var supported = 0;
   var str = oEmail.value
   if (str.indexOf(";") > 0 )
   {
	splitstr = str.split(";");		
   }
   else
   {
	splitstr = new Array (str);
   }

	for(i=0;i<splitstr.length;++i)
	{
	   if (window.RegExp) 
	   {
		  var tempStr = "a";
		  var tempReg = new RegExp(tempStr);
		  
		  if (tempReg.test(tempStr))
			 supported = 1;
	   }
	   if (!supported) 
		  return (splitstr[i].indexOf(".") > 2) && (splitstr[i].indexOf("@") > 0);

	   var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)|(\\s)|(~)|(`)|(\\*)|(\\?)|(#)|(=)|(/)|(\")|(\\\\)|(\\s)|(,)|(\\\()|(\\\))");
	   var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$");  

		
	   if ( (!r1.test(splitstr[i]) && r2.test(splitstr[i])))
	   { 
		 if  ( i == splitstr.length-1)
		 {
			//alert ('true');
			return true;
		 }	  	 
 
	   }
	   else
	   {
		  if(splitstr[i] == "")
			 alert("Please enter a valid e-mail address.");
		  else
			 alert(splitstr[i] + " is not a valid e-mail address.  Please enter a valid e-mail address.");
		  oEmail.focus();		
		 return false;
	   }
	}
}

function check_Profanity(strTestVal)
{
	var badWords = new Array("asshole", "crap", "cunt", "damn", "fuck", "piss", "shit", "suck", "tits", "upyours");

	var i = 0
	var valid
	var strTest
	for(i = 0; i < badWords.length; i++)
	{
		strTest = badWords[i];

		r0 = new RegExp(strTest)
		//if(strEmail == badWords[i])
		if(r0.test(strTestVal))
		{
		   valid = false;
		   return valid;
		}
		else
		{
		   valid = true;
		}
		strTest = "";
	}
	return valid;
}

function check_Password(oPassword)
{
   var supported = 0;
   var str = oPassword.value

   if (window.RegExp) 
   {
      var tempStr = "a";
      var tempReg = new RegExp(tempStr);
	  
      if (tempReg.test(tempStr))
	     supported = 1;
   }

   if(!supported)
      return (str.indexOf("'") == -1);

   var r1 = new RegExp("[']");

   if(str == "")
   {
      alert("Please enter a password.");
	  oPassword.focus();
	  return false;
   }
   else
   {
      if(!r1.test(str))
      {
	     //if(!check_Profanity(str))
	     //{	     
		    //oPassword.focus();
			//alert("Please enter a password without profanity.");
		    //return false;
	     //}
		 //else
	        return true;
      }
      else
      {
         alert("The ' symbol is not allowed, please re-enter your password.");
	     oPassword.focus();
	     return false;
	  }
   }
}