function roll_over(img_name, img_src)
  		 {
  		 	document[img_name].src = img_src;
 		  }
function isEmailAddress(email)
	{
	  var result = false
	  var theStr = new String(email)
	  var index = theStr.indexOf("@");
	  if (index > 0)
		  {
		    var pindex = theStr.indexOf(".",index);
	    	if ((pindex > index+1) && (theStr.length > pindex+1))
			result = true;
		  }
		  return result;
	}


function trimAll(sString)
{
	while (sString.substring(0,1) == ' ')
	{
	sString = sString.substring(1, sString.length);
	}
	while (sString.substring(sString.length-1, sString.length) == ' ')
	{
	sString = sString.substring(0,sString.length-1);
	}
	return sString;
}

function isPhoneNumber(s) 
{

     // Check for correct phone number
     rePhoneNumber = new RegExp(/^\([1-9]\d{2}\)\s?\d{3}\-\d{4}$/);

     if (!rePhoneNumber.test(s)) {
          alert("Phone Number Must Be Entered As: (555) 555-1234");
          return false;
     }

return true;
}
function IsNumeric(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 callback_check_user(frm)
	{
		with(frm)
		{
			if((trimAll(name.value))=="")
			{
				alert("Please enter your name");
				name.focus();
				return false;
			}
			if(!isEmailAddress(email.value))
			{
				alert('Please enter a valid email address');
				email.focus();
				return false;
			}
  
			if((trimAll(phone.value))=="")
		
			{
				alert("Please enter your phone number");
				phone.focus();
				return false;
			}
			if((trimAll(company.value))=="")
			{
				alert("Please enter your company name");
				company.focus();
				return false;
			}
			if((trimAll(message.value))=="")
			{
				alert("Please enter your question");
				message.focus();
				return false;
			}
			
			return true;			
			
		}
	}
function contact_check_user(frm)
	{
		with(frm)
		{
			if((trimAll(name.value))=="")
			{
				alert("Please enter your name");
				name.focus();
				return false;
			}
			if(!isEmailAddress(email.value))
			{
				alert('Please enter a valid email address');
				email.focus();
				return false;
			}
			if((trimAll(company.value))=="")
			{
				alert("Please enter your company name");
				company.focus();
				return false;
			}
			if((trimAll(subject.value))=="")
			{
				alert("Please enter your subject");
				subject.focus();
				return false;
			}
			if((trimAll(message.value))=="")
			{
				alert("Please enter your question");
				message.focus();
				return false;
			}
			
			return true;			
			
		}
	}
function freetrial_validate_form(thisform)
	{
		with (thisform)
		{
			if((trimAll(name.value))=="")
			{
				alert("Please enter your name");
				name.focus();
				return false;
			}
			if(!isEmailAddress(email.value))
			{
				alert('Please enter a valid email address');
				email.focus();
				return false;
			}
		
			if((trimAll(company.value))=="")
			{
				alert("Please enter your company");
				company.focus();
				return false;
			}

			if((trimAll(phone.value))=="")
			{
				alert("Please enter your Phone number");
				phone.focus();
				return false;
			}
			
			return true;			
				
		}
	}


