 $(document).ready(function(){

   $("dt img").autoMouseOver({ outStr: "_on", overStr: "_over" });


   $("input").keypress(function(event){
         if (event.keyCode==13){return false;}
   });

   $("input").change(function(event){
        $(this).val(trim($(this).val()));
   });

   resetCSS("input:text");
   resetCSS("select");

   $("input").keyup(function(event){
        if($(this).val().length>0){
          resetCSS(this);
          $(this).next(".formerror").remove();
        }
   });

   $("select").change(function(event){
          $("select").next(".formerror").remove();
          resetCSS("select");
   });



   $("#btnsubmit").click(function(event){

       var proceedon="0";

       $("input[reqtext]").each(function(){
         if($(this).val().length<1){
           var errormsg= "<span class='formerror'>" + $(this).attr("reqtext") + "</span>";
           $(this).next(".formerror").remove();
           $(this).after(errormsg);
           warnCSS(this);
           proceedon="1";
         }
       });
 

     $(".formerror").prepend("<img src='images/exclamation.gif' style='vertical-align:middle' /> ");

     if(proceedon=="0"){
        $("#form1").attr("action","thanks.php");
        $("#form1").submit();
     }

     event.preventDefault();
   });


 });

