        jQuery(function($){
            $(document).ready(function(){                
                $("select").click(function () {
                                        //alert("dfgdfgh");
                                        });
                $("select").change(function () {
                    Whence=($("select[name=whence] option:selected").val())*1;
                    Where=($("select[name=where] option:selected").val())*1;
                    if((Whence!=0) && (Where!=0) && (Whence!=Where)){
                            str="Whence="+Whence;//+"&Where="+Where;
                            alert(str);   
                             $.ajax({
                                   type:"POST",
                                   url:"autocomplete.php",
                                   data:str,
                                      success: function(msg){
                                       alert(msg);
                                     //$(".msg").html(msg);
                                   }
                             });  
                    }
                });
            });
        });
