    var sendInquiryForm  = null;
    var sendInquiryButton = 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()
    {
      sendInquiryForm   = document.getElementById('sendinquiryform');
      sendInquiryButton = document.getElementById('sendinquirybutton');

      inputArray = new Array();
      textArray  = new Array();
      helpArray  = new Array();

      inputArray[0] = document.getElementById('customer');
      inputArray[1] = document.getElementById('email');
      inputArray[2] = document.getElementById('select_space');
      inputArray[3] = document.getElementById('select_length');

      textArray[0] = document.getElementById('textcustomer');
      textArray[1] = document.getElementById('textemail');
      textArray[2] = document.getElementById('textspace');
      textArray[3] = document.getElementById('textlength');

      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;

      sendInquiryForm.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(/(\w+\.?)*\w+@(\w+\.?)*\w+\.\w{1,4}$/);
             break;
           case 2:
             if(inputArray[2].value == 0)
               pos = 1;
             else
               pos = 0;
             break;
           case 3:
             if(inputArray[3].value == 0)
               pos = 1;
             else
               pos = 0;
             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";
           inputArray[i].focus();

           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;
         }
       }

       sendInquiryButton.disabled = true;
       return true;
    }

    window.onload = initialize;