//'****************************************************************************
//' File: validate_sendtofriend_request.js
//' Description: Houses validation script for the email to friend release request page
//' Author: Anthony J Biondo Jr. (Information Solutions - Web Team)
//' Date: 07-18-2005
//'****************************************************************************


// VALIDATE THE FORM
function ValidateEmailToFriendForm() {
    document.mySendToAFriend.YourName.style.backgroundColor = InputFormTextBoxInitialState
    document.mySendToAFriend.YourEmail.style.backgroundColor = InputFormTextBoxInitialState
    document.mySendToAFriend.RecipName.style.backgroundColor = InputFormTextBoxInitialState
    document.mySendToAFriend.RecipEmail.style.backgroundColor = InputFormTextBoxInitialState
    document.mySendToAFriend.Message.style.backgroundColor = InputFormTextBoxInitialState


// VALIDATE YOUR NAME
  if (isWhitespace(document.mySendToAFriend.YourName.value)==true) 
  {
    document.mySendToAFriend.YourName.style.backgroundColor = InputFormTextBoxHighight
    alert("Your Name can not be blank.  Please enter your name.")
    document.mySendToAFriend.YourName.focus()
    return false
  }


// VALIDATE EMAIL
  if (isWhitespace(document.mySendToAFriend.YourEmail.value)==true || isEmail(document.mySendToAFriend.YourEmail.value)==false) 
  {
    document.mySendToAFriend.YourEmail.style.backgroundColor = InputFormTextBoxHighight
    alert("Your Email Address can not be blank.  Please enter your Email Address.")
    document.mySendToAFriend.YourEmail.focus()
    return false
  }

// VALIDATE RECIP NAME
  if (isWhitespace(document.mySendToAFriend.RecipName.value)==true) 
  {
    document.mySendToAFriend.RecipName.style.backgroundColor = InputFormTextBoxHighight
    alert("The Recipient Name can not be blank.  Please enter a recipient name.")
    document.mySendToAFriend.RecipName.focus()
    return false
  }

// VALIDATE EMAIL
  if (isWhitespace(document.mySendToAFriend.RecipEmail.value)==true || isEmail(document.mySendToAFriend.RecipEmail.value)==false) 
  {
    document.mySendToAFriend.RecipEmail.style.backgroundColor = InputFormTextBoxHighight
    alert("The Recipient Email Address can not be blank.  Please enter the Recipient Email Address.")
    document.mySendToAFriend.RecipEmail.focus()
    return false
  }

}

