    var contactForm  = null;
    var submitButton = null;

    var inputArray = null;
    var textArray  = null;
    var helpArray  = null;

    var color   = null;
    var bg      = null;
    var border  = null;
    var style   = null;
    var width   = null;
    var padding = null;

    function initialize()
    {
      contactForm  = document.getElementById('contactformjs');
      submitButton = document.getElementById('submitbutton');

      inputArray = new Array();
      textArray  = new Array();
      helpArray  = new Array();

      inputArray[0] = document.getElementById('customer');
      inputArray[1] = document.getElementById('phone');
      inputArray[2] = document.getElementById('email');

      textArray[0] = document.getElementById('textcustomer');
      textArray[1] = document.getElementById('textphone');
      textArray[2] = document.getElementById('textemail');

      color   = inputArray[0].style.color;
      bg      = inputArray[0].style.backgroundColor;
      border  = inputArray[0].style.borderColor;
      style   = inputArray[0].style.borderStyle;
      width   = inputArray[0].style.borderWidth;
      padding = inputArray[0].style.padding;

      contactForm.onsubmit = checkFeedback;
    }

    function checkFeedback ()
    {
       var pos = null;

       for(var i = 0; i < inputArray.length; i++)
       {
         switch(i)
         {
           case 0:
             pos = inputArray[0].value.search(/\w+ ?\w?.? ?\w+/);
             break;
           case 1:
             pos = inputArray[1].value.search(/\d?(-| )?((\(\d{3}\))|(\d{3}))(-| )?\d{3}(-| )?\d{4}$/);
             break;
           case 2:
             pos = inputArray[2].value.search(/(\w+\.?)*\w+@(\w+\.?)*\w+\.\w{1,4}$/);
             break;
           default:
             pos = inputArray[i].value.search(/\w+/);
         }

         if(pos != 0)
         {
            textArray[i].style.color           = "#F00";
           inputArray[i].style.backgroundColor = "#FFEDE5";
           inputArray[i].style.borderColor     = "#F99";
           inputArray[i].style.borderStyle     = "solid";
           inputArray[i].style.borderWidth     = "1px";
           inputArray[i].style.padding         = "2px";

           return false;
         }
         else
         {
            textArray[i].style.color           = color;
           inputArray[i].style.backgroundColor = bg;
           inputArray[i].style.borderColor     = border;
           inputArray[i].style.borderStyle     = style;
           inputArray[i].style.borderWidth     = width;
           inputArray[i].style.padding         = padding;
         }
       }

       submitButton.disabled = true;
       return true;
    }

    window.onload = initialize;