function IsEmailValid(FormName,ElemName)
{
var EmailOk  = true
var Temp     = document.forms[FormName].elements[ElemName]
var AtSym    = Temp.value.indexOf('@')
var Period   = Temp.value.lastIndexOf('.')
var Space    = Temp.value.indexOf(' ')
var Length   = Temp.value.length - 1   

if ((AtSym < 1) ||                    
    (Period <= AtSym+1) ||            
    (Period == Length ) ||            
    (Space  != -1))                  
   {  
      EmailOk = false
      alert('Please enter a valid e-mail address! eg yourname@domain.com ')
      Temp.focus()
   }
return EmailOk
}
			
function valid_form()
{

  if (document.frmRegisterOtherWebSiteUsers.txtFirstName.value == "")
  {
    alert("Please enter a value for the \"First Name\" field.");
    document.frmRegisterOtherWebSiteUsers.txtFirstName.focus();
    return (false);
  }

    
 
  if (document.frmRegisterOtherWebSiteUsers.txtLastName.value == "")
  {
    alert("Please enter a value for the \"Last Name\" field.");
    document.frmRegisterOtherWebSiteUsers.txtLastName.focus();
    return (false);
  }

 
  if (document.frmRegisterOtherWebSiteUsers.txtEmail.value == "")
  {
    alert("Please enter a value for the \"Email\" field.");
    document.frmRegisterOtherWebSiteUsers.txtEmail.focus();
    return (false);
  }


var EmailOk  = true
var Temp     = document.frmRegisterOtherWebSiteUsers.txtEmail
var AtSym    = Temp.value.indexOf('@')
var Period   = Temp.value.lastIndexOf('.')
var Space    = Temp.value.indexOf(' ')
var Length   = Temp.value.length - 1   

if ((AtSym < 1) ||                    
    (Period <= AtSym+1) ||            
    (Period == Length ) ||            
    (Space  != -1))                  
   {  
      EmailOk = false
      alert('Please enter a valid e-mail address! eg yourname@domain.com ')
      Temp.focus()
   }
return EmailOk


    return (true);
}	


function contactus_valid_form()
{
 if (document.ContactUs.Yourname.value == "")
  {
    alert("Please enter a value for the \"Name\" field.");
    document.ContactUs.Yourname.focus();
    return (false);
  }

if (document.ContactUs.CompanyName.value == "")
  {
    alert("Please enter a value for the \"Company Name\" field.");
    document.ContactUs.CompanyName.focus();
    return (false);
  }

if (document.ContactUs.Address1.value == "")
  {
    alert("Please enter a value for the \"Address1\" field.");
    document.ContactUs.Address1.focus();
    return (false);
  }


if (document.ContactUs.City.value == "")
  {
    alert("Please enter a value for the \"City\" field.");
    document.ContactUs.City.focus();
    return (false);
  }

if (document.ContactUs.State.value == "")
  {
    alert("Please enter a value for the \"State\" field.");
    document.ContactUs.State.focus();
    return (false);
  }

if (document.ContactUs.Country.value == "")
  {
    alert("Please enter a value for the \"Country\" field.");
    document.ContactUs.Country.focus();
    return (false);
  }

if (document.ContactUs.PostalCode.value == "")
  {
    alert("Please enter a value for the \"Postal Code\" field.");
    document.ContactUs.PostalCode.focus();
    return (false);
  }

if (document.ContactUs.Email.value == "")
  {
    alert("Please enter a value for the \"Email\" field.");
    document.ContactUs.Email.focus();
    return (false);
  }


var EmailOk  = true
var Temp     = document.ContactUs.Email
var AtSym    = Temp.value.indexOf('@')
var Period   = Temp.value.lastIndexOf('.')
var Space    = Temp.value.indexOf(' ')
var Length   = Temp.value.length - 1   

if ((AtSym < 1) ||                    
    (Period <= AtSym+1) ||            
    (Period == Length ) ||            
    (Space  != -1))                  
   {  
      EmailOk = false
      alert('Please enter a valid e-mail address! eg yourname@domain.com ')
      Temp.focus()
   }
return EmailOk

if (document.ContactUs.PostalCode.value == "")
  {
    alert("Please enter a value for the \"Address2\" field.");
    document.ContactUs.PostalCode.focus();
    return (false);
  }



     return (true);
}	
		

		
function affiliate_valid_form()

{
 if (document.affiliate.company.value == "")
  {
    alert("Please enter a value for the \"company\" field.");
    document.affiliate.company.focus();
    return (false);
  }

if (document.affiliate.checkPayable.value == "")
  {
    alert("Please enter a value for the \"check Payable\" field.");
    document.affiliate.checkPayable.focus();
    return (false);
  }

if (document.affiliate.contact.value == "")
  {
    alert("Please enter a value for the \"contact\" field.");
    document.affiliate.contact.focus();
    return (false);
  }


if (document.affiliate.email.value == "")
  {
    alert("Please enter a value for the \"email\" field.");
    document.affiliate.email.focus();
    return (false);
  }


if (document.affiliate.affLogin.value == "")
  {
    alert("Please enter a value for the \"User Name\" field.");
    document.affiliate.affLogin.focus();
    return (false);
  }

if (document.affiliate.affPassword.value == "")
  {
    alert("Please enter a value for the \"Password\" field.");
    document.affiliate.affPassword.focus();
    return (false);
  }

if (document.affiliate.password2.value == "")
  {
    alert("Please enter a value for the \"password again\" field.");
    document.affiliate.password2.focus();
    return (false);
  }

if (document.affiliate.affPassword.value != document.affiliate.password2.value)
{
    alert("Please same value for \"Passwords\" field.");
    document.affiliate.affPassword.value="";
	document.affiliate.password2.value="";
	document.affiliate.affPassword.focus();
   return (false);
  }


if (document.affiliate.passwordQuestion.value == "")
  {
    alert("Please enter a value for the \"Password Question\" field.");
    document.affiliate.passwordQuestion.focus();
    return (false);
  }



if (document.affiliate.passwordAnswer.value == "")
  {
    alert("Please enter a value for the \"Password Answer\" field.");
    document.affiliate.passwordAnswer.focus();
    return (false);
  }

if (document.affiliate.name.value == "")
  {
    alert("Please enter a value for the \"Site Name\" field.");
    document.affiliate.name.focus();
    return (false);
  }

if (document.affiliate.homeURL.value == "")
  {
    alert("Please enter a value for the \"URL\" field.");
    document.affiliate.homeURL.focus();
    return (false);
  }



var EmailOk  = true
var Temp     = document.affiliate.email
var AtSym    = Temp.value.indexOf('@')
var Period   = Temp.value.lastIndexOf('.')
var Space    = Temp.value.indexOf(' ')
var Length   = Temp.value.length - 1   

if ((AtSym < 1) ||                    
    (Period <= AtSym+1) ||            
    (Period == Length ) ||            
    (Space  != -1))                  
   {  
      EmailOk = false
      alert('Please enter a valid e-mail address! eg yourname@domain.com ')
      Temp.focus()
   }
return EmailOk

     return (true);
}	
		

		
function openRegisterUserWindow(width,height)
			{
				window.open('htm/RegisterUsers.htm','RegisterUsers','width=' + width + ',height=' + height + ',left=10,top=10,status=yes,resizable=yes,scrollbars=yes');
				document.frmRegisterOtherWebSiteUsers.target = 'RegisterUsers';
				return true;
			}
		
			
function MM_jumpMenu(targ,selObj,restore){
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}



