// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 5000;
// Duration of crossfade (seconds)
var crossFadeDuration = 5;
// Specify the image files
var Pic = new Array();

// to add more images, just continue
// the pattern, adding to the array below

Pic[0] = 'images/home1.jpg'
Pic[1] = 'images/home2.jpg'
Pic[2] = 'images/home3.jpg'
Pic[3] = 'images/home4.jpg'


// do not edit anything below this line
var t;
var j = 0;
var p = Pic.length;
var preLoad = new Array();

for (i = 0; i < p; i++) {
preLoad[i] = new Image();
preLoad[i].src = Pic[i];
}

function runSlideShow() {
if (document.all) {
document.images.SlideShow.style.filter="blendTrans(duration=2)";
document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)";
document.images.SlideShow.filters.blendTrans.Apply();
}

document.images.SlideShow.src = preLoad[j].src;

if (document.all) {
document.images.SlideShow.filters.blendTrans.Play();

}
j = j + 1;
if (j > (p - 1)) j = 0;
t = setTimeout('runSlideShow()', slideShowSpeed);
}

function Form_Validate(theForm)
{

  if (theForm.Name.value == "")
  {
    alert("Please enter a value in the \"Your Name\" field.");
    theForm.Name.focus();
    return (false);
  }
  if (theForm.email.value == "")
  {
    alert("Please enter a value in the \"E-Mail Address\" field.");
    theForm.email.focus();
    return (false);
  }

  if (theForm.Email2.value == "")
    {
      alert("Please enter a value in the \"Confirm E-Mail Address\" field.");
      theForm.Email2.focus();
      return (false);
  }

  if (theForm.email.value != theForm.Email2.value)
    {
      alert("Your Email Addresses do not match. Please re-enter your Email Address in both fields.");
      theForm.email.focus();
      return (false);
  }

 if (!(theForm.Hotel[0].checked || theForm.Hotel[1].checked || theForm.Hotel[2].checked || theForm.Hotel[3].checked))
 {
      alert("Please select the hotel you stayed at in Question 1.");
      theForm.Hotel[0].focus();
      return (false);
  }
  return (true);
}

function Form_Validate_RFP(theForm)
{

  if (theForm.Name.value == "")
  {
    alert("Please enter a value in the \"Your Name\" field.");
    theForm.Name.focus();
    return (false);
  }
  if (theForm.Phone.value == "")
  {
    alert("Please enter a value in the \"Phone Number\" field.");
    theForm.Phone.focus();
    return (false);
  }  
  if (theForm.email.value == "")
  {
    alert("Please enter a value in the \"E-Mail Address\" field.");
    theForm.email.focus();
    return (false);
  }

  if (theForm.Email2.value == "")
    {
      alert("Please enter a value in the \"Confirm E-Mail Address\" field.");
      theForm.Email2.focus();
      return (false);
  }

  if (theForm.email.value != theForm.Email2.value)
    {
      alert("Your Email Addresses do not match. Please re-enter your Email Address in both fields.");
      theForm.email.focus();
      return (false);
  }

  return (true);
}
