// <!-- 

  
  function CheckLogin( )
  {
    if (document.loginform.strUser.value == "") 
    {
      alert("You must enter your e-mail address.");
      return false;
    }
    if (document.loginform.strPass.value == "")
    {
      alert("You must enter a password.");
      return false;
    }
    return true;
  } 


  function CheckAdminLogin( )
  {
    if (document.loginform.strUser.value == "") 
    {
      alert("You must enter your username.");
      return false;
    }
    if (document.loginform.strPass.value == "")
    {
      alert("You must enter a password.");
      return false;
    }
    return true;
  } 



  function CheckAccount( )
  {
    if( document.myaccount.strCompany.value == "" )
    {
      alert("You must enter your company's name.");
      return false;
    }
    if( document.myaccount.strFirstName.value == "" )
    {
      alert("You must enter your first name.");
      return false;
    }
    if( document.myaccount.strLastName.value == "" )
    {
      alert("You must enter your last name.");
      return false;
    }

    if( document.myaccount.strNewEmail1.value != ""  &&  document.myaccount.strNewEmail2.value == "" )
    {
      alert("You must confirm your new email address.");
      return false;
    }
    if( document.myaccount.strNewEmail1.value != ""  &&  (document.myaccount.strNewEmail1.value != document.myaccount.strNewEmail2.value) )
    {
      alert("Your new email addresses do not match.");
      return false;
    }    

    if( document.myaccount.strNewPass1.value != ""  &&  document.myaccount.strNewPass2.value == "" )
    {
      alert("You must confirm your new password.");
      return false;
    }
    if( document.myaccount.strNewPass1.value != ""  &&  (document.myaccount.strNewPass1.value != document.myaccount.strNewPass2.value) )
    {
      alert("Your new passwords do not match.");
      return false;
    }    
    return true;
  }


  function CheckNewTopic( )
  {
    if( document.newtopic.strSubject.value == "" ) 
    {
      alert("You must enter a subject for the new topic.");
      return false;
    }
    if( document.newtopic.txtMessage.value == "" ) 
    {
      alert("You must enter a message for the new topic.");
      return false;
    }
    return true;
  }


  function CheckNewMessage( )
  {
    if( document.newmessage.txtMessage.value == "" ) 
    {
      alert("You must enter a message for the new topic.");
      return false;
    }
    return true;
  }


  function CheckNewComment( )
  {
    if( document.newmessage.txtComment.value == "" ) 
    {
      alert("You must enter complete comment for the vendor.");
      return false;
    }
    return true;
  }


  function ConfirmDelete( )
  {
    if( confirm("Are you sure that you wish to delete this entry?") ) 
      return true;
    else
      return false;
  }
  
  
  function ConfirmDeleteSponsor( )
  {
    if( confirm("You are about to Delete a Sponsor.  That means the associated Sponsor Login Account will also be deleted automatically, as well as any related Sponsor Comments.\n\nAre you sure you wish to proceed?") ) 
      return true;
    else
      return false;
  }


  function getRadioValue( radio )
  {
   for (var i = 0; i < radio.length; i++)
    {   
      if (radio[i].checked) { break }
    }
    if( i == radio.length )
      return -1;
    else
      return radio[i].value;
  }
  
  
  
  function CheckCreditWatch( )
  {
    if( document.contact.strCompany.value == "" )
    {
      alert("You must enter your company's name.");
      return false;
    }
    if( document.contact.strAddress1.value == "" )
    {
      alert("You must enter a street address.");
      return false;
    }
    if( document.contact.strCity.value == "" )
    {
      alert("You must enter a city.");
      return false;
    }
    if( document.contact.strState.value == "" )
    {
      alert("You must enter a state.");
      return false;
    }
    if( document.contact.strZip.value == "" )
    {
      alert("You must enter a ZIP/Postal code.");
      return false;
    }
    if( document.contact.strContact.value == "" )
    {
      alert("You must enter a contact name.");
      return false;
    }        
    if( getRadioValue( document.contact.intReason ) == -1 )
    {
      alert("You must select a reason for the credit watch.");
      return false;
    }
   
    return true;
  }  
  
  
  
  function CheckMinutes( )
  {
    if( document.contact.strName.value == "" ) 
    {
      alert("You must enter a name for the minutes.");
      return false;
    } 
    
    if( document.contact.strPath.value == ""  && document.contact.bFile.value == 0 ) 
    {
      alert("You must choose a file to upload.  Use the 'Browse' button.");
      return false;
    }     

    var strPath   = document.contact.strPath.value;
    document.contact.strFile1.value = strPath;
    
    return true;
  }
  
  
  
  function CheckTreport( )
  {
    if( document.contact.strName.value == "" ) 
    {
      alert("You must enter a name for the report.");
      return false;
    } 
    
    if( document.contact.strPath.value == ""  && document.contact.bFile.value == 0 ) 
    {
      alert("You must choose a file to upload.  Use the 'Browse' button.");
      return false;
    }     

    var strPath   = document.contact.strPath.value;
    document.contact.strFile1.value = strPath;
    
    return true;
  }  
  
  
  function CheckEquipment( )
  {
    if( document.contact.strEquipName.value == "" ) 
    {
      alert("You must enter a name for the equipment item.");
      return false;
    }   
    if( document.contact.txtDescription.value == "" ) 
    {
      alert("You must enter a description for the equipment item.");
      return false;
    }       
    if( document.contact.strContactName.value == "" ) 
    {
      alert("You must enter a contact name for the equipment item.");
      return false;
    } 
    var strPath   = document.contact.strImage.value;
    document.contact.strFile1.value = strPath;  
  }


  function CheckVendor() 
  {
    if (document.contact.strName.value == "") 
    {
      alert("You must enter a vendor name.");
      return false;
    }
  }


  function CheckVendorFile() {
    if (document.contact.strTitle.value == "") {
      alert("You must enter a title for the file.");
      return false;
    }

    if (document.contact.strPath.value == "" && document.contact.bFile.value == 0) {
      alert("You must choose a file to upload.  Use the 'Browse' button.");
      return false;
    }

    var strPath = document.contact.strPath.value;
    document.contact.strFile1.value = strPath;

    return true;
  }


  function CheckSponsor() {
    if (document.contact.strName.value == "") {
      alert("You must enter a sponsor name.");
      return false;
    }
    var strPath = document.contact.strImage.value;
    document.contact.strFile1.value = strPath;      
  }


  function CheckSponsorFile() {
    if (document.contact.strTitle.value == "") {
      alert("You must enter a title for the file.");
      return false;
    }

    if (document.contact.strPath.value == "" && document.contact.bFile.value == 0) {
      alert("You must choose a file to upload.  Use the 'Browse' button.");
      return false;
    }

    var strPath = document.contact.strPath.value;
    document.contact.strFile1.value = strPath;

    return true;
  }


  function ConfirmAnnouncement() {
    if (confirm("Are you sure that you wish to send this announcement?\n\nAll current members will receive an email."))
      return true;
    else
      return false;
  }
      
  
// -->
