
function rotate1() {
 crossfade(document.getElementById('banner'), 'images/Banner2.gif', '2', 'Banner2');
}

function rotate2() {
  crossfade(document.getElementById('banner'), 'images/newBanner.gif', '2', 'Banner3');
  crossfade(document.getElementById('quote'), 'images/QuoteCyn.jpg', '10', 'quote2');
}

function rotate3() {
 crosswipe(document.getElementById('banner'), 'images/Banner2.gif', '1', 'lr', 'Banner2');
}

function rotateq() {
  // swapfade(document.getElementById('quote'), 'images/QuoteCyn.jpg', '20', 'quote2');
}




// form validations //////////////////////////////////////////////////////////////////////////


      // general regular expression checking
     function validateRegEx(regex, input, helpText, helpMessage) {
        // See if the input data validates OK
        if (!regex.test(input)) {
          // The data is invalid, so set the help message and return false
          if (helpText != null)
            helpText.innerHTML = helpMessage;
          return false;
        }
        else {
          // The data is OK, so clear the help message and return true
          if (helpText != null)
            helpText.innerHTML = "";
          return true;
        }
      }

      function validateNotEmpty(inputField, helpText) {
        // See if the input value contains any text
        return validateRegEx(/.+/,
          inputField.value, helpText,
          "No data found, Please enter a value.");
      }

      // validate a zip code
      function validateZipCode(inputField, helpText) {
        // First see if the input value contains data
        if (!validateNotEmpty(inputField, helpText))
          return false;

        // Then see if the input value is a ZIP code
        return validateRegEx(/^\d{5}$/,
          inputField.value, helpText,
          "Please enter a 5-digit ZIP code.");
      }

      // validate complete web page form
      function checkForm1(f) {
         OKstatus=true;
         // check name not empty
         if (!validateNotEmpty(f.cname,document.getElementById('nc'))) {
             OKstatus=false;
         }

         // check valid email
         if (!validateRegEx(/^[\w\.-_\+]+@[\w-]+(\.\w{2,4})+$/, document.getElementById('cemail').value, document.getElementById('ec'), "Please enter valid email address.")) {
             OKstatus=false;
         }


         // check phone for valid number with area code
         if (!validateRegEx(/^[ ]*[(]{0,1}[ ]*[0-9]{3,3}[ ]*[)]{0,1}[-]{0,1}[ ]*[0-9]{3,3}[ ]*[-]{0,1}[ ]*[0-9]{4,4}[ ]*$/, document.getElementById('cphone').value, document.getElementById('pc'), "Please enter valid phone # with area code.")) {
             OKstatus=false;
         }

         return OKstatus;
      }
