Advertisement
Guest User

Untitled

a guest
Jun 30th, 2015
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!--[if lt IE 7]>
  2. <p>
  3.     You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.
  4. </p> <![endif]-->
  5. <div id="DIV_24">
  6.     <!-- Header -->
  7.  
  8.     <header id="HEADER_25">
  9.         <div id="DIV_26">
  10.         </div>
  11.         <div id="DIV_27">
  12.         </div>
  13.     </header>
  14.     <!-- Middle image and address input -->
  15.  
  16.     <div id="DIV_28">
  17.         <div id="DIV_29">
  18.             <h1 id="H1_30">
  19.                 What's Your Home Worth?
  20.             </h1>
  21.             <h2 id="H2_31">
  22.                 <span id="SPAN_32"></span> <span id="SPAN_33">Home Prices are Up 19%</span><span id="SPAN_34"></span>
  23.             </h2>
  24.             <form id="FORM_35" action="index.asp">
  25.                 <input type="hidden" name="PageAction" value="MapPage" id="INPUT_36" />
  26.                 <input type="hidden" name="lat" id="INPUT_37" value="44.1643713" />
  27.                 <input type="hidden" name="lng" id="INPUT_38" value="-80.03692619999998" />
  28.                 <input type="hidden" name="street_number" id="INPUT_39" />
  29.                 <input type="hidden" name="route" id="INPUT_40" value="Airport Rd" />
  30.                 <input type="hidden" name="locality" id="INPUT_41" value="Mansfield" />
  31.                 <input type="hidden" name="administrative_area_level_1" id="INPUT_42" value="ON" />
  32.                 <input type="hidden" name="country" id="INPUT_43" value="Canada" />
  33.                 <input type="hidden" name="postal_code" id="INPUT_44" value="L0N 1M0" />
  34.                 <input id="INPUT_45" type="text" placeholder="Type your address..." />
  35.                 <button type="submit" id="BUTTON_46">
  36.                     Submit
  37.                 </button>
  38.             </form>
  39.         </div>
  40.     </div>
  41.     <!-- footer -->
  42.  
  43.     <footer id="FOOTER_47">
  44.         <p id="P_48">
  45.             We respect your privacy, we will never sell or share your information with anyone.<br id="BR_49" /><span id="SPAN_50"></span><br id="BR_51" /> <a href="index.asp?PageAction=PrivacyPolicy" id="A_52">Privacy Policy</a> | <a href="index.asp?PageAction=TermsOfService" id="A_53">Terms of Service</a>
  46.         </p>
  47.         <p id="P_54">
  48.              <a href="http://www.agentlocator.ca/" id="A_55"><img src="http://www.agentlocator.ca/agentlocator.png" alt="agentlocator" id="IMG_56" /></a>
  49.         </p>
  50.     </footer>
  51. </div>
  52.  
  53. <script id="SCRIPT_58">window.jQuery || document.write('
  54.     </script><\/script>')
  55.  
  56.  
  57. <script type="text/javascript" id="SCRIPT_61">function initialize() {
  58.         var input = /** @type {HTMLInputElement} */(
  59.         document.getElementById('search-term'));
  60.    
  61.         var autoCompleteOptions = {componentRestrictions: {country: "ca"}};
  62.         autocomplete = new google.maps.places.Autocomplete(input,autoCompleteOptions);
  63.        
  64.         google.maps.event.addListener(autocomplete, 'place_changed', function() {
  65.             var place = autocomplete.getPlace();
  66.             var address = '';
  67.             if (place.address_components) {
  68.            
  69.                  if (place.address_components) {
  70.                           var component_form = {
  71.                             'street_number': 'short_name',
  72.                             'route': 'long_name',
  73.                             'locality': 'long_name',
  74.                             'administrative_area_level_1': 'short_name',
  75.                             'country': 'long_name',
  76.                             'postal_code': 'short_name'
  77.                           };
  78.                         for (var component in component_form) {
  79.                           document.getElementById(component).value = "";
  80.                           document.getElementById(component).disabled = false;
  81.                         }
  82.                          for (var j = 0; j < place.address_components.length; j++) {
  83.                               var att = place.address_components[j].types[0];
  84.                               if (component_form[att]) {
  85.                                 var val = place.address_components[j][component_form[att]];
  86.                                 document.getElementById(att).value = val;
  87.                               }
  88.                             }
  89.                     }
  90.  
  91.            
  92.               address = [
  93.                 (place.address_components[0] && place.address_components[0].short_name || ''),
  94.                 (place.address_components[1] && place.address_components[1].short_name || ''),
  95.                 (place.address_components[2] && place.address_components[2].short_name || ''),
  96.                 (place.address_components[3] && place.address_components[3].short_name || ''),
  97.                 (place.address_components[4] && place.address_components[4].short_name || '')
  98.               ].join(' ');
  99.             }
  100.            
  101.             var geocoder = new google.maps.Geocoder();
  102.               geocoder.geocode( { 'address': address}, function(results, status) {
  103.                 if (status == google.maps.GeocoderStatus.OK) {
  104.                     var lat = results[0].geometry.location.lat();
  105.                     var lng = results[0].geometry.location.lng();
  106.                                    
  107.                     $('#glat').val(lat);
  108.                     $('#glng').val(lng);
  109.  
  110.                     $('#header-addre-form').submit();      
  111.                 } else {
  112.                   //do something here
  113.                 }
  114.               });
  115.        
  116.                
  117.                
  118.           });
  119.         }
  120.    
  121.     google.maps.event.addDomListener(window, 'load', initialize);
  122.    
  123.    
  124.     $(document).ready(function(){
  125.    
  126.         $('#addre-submit').on("click",function() {
  127.                 var firstResult = $(".pac-container .pac-item:first").text();
  128.                    
  129.                     var geocoder = new google.maps.Geocoder();
  130.                     geocoder.geocode({"address":firstResult }, function(results, status) {
  131.                    
  132.                         if (status == google.maps.GeocoderStatus.OK) {
  133.                            
  134.                             var lat = results[0].geometry.location.lat();
  135.                             var lng = results[0].geometry.location.lng();
  136.                                            
  137.                             $('#glat').val(lat);
  138.                             $('#glng').val(lng);
  139.        
  140.                             $('#header-addre-form').submit();
  141.                            
  142.                         }
  143.                     });
  144.                     return false;
  145.         });
  146.        
  147.         $("#search-term").focusin(function () {
  148.             $(document).keypress(function (e) {
  149.                 if (e.which == 13) {
  150.                     var firstResult = $(".pac-container .pac-item:first").text();
  151.                    
  152.                     var geocoder = new google.maps.Geocoder();
  153.                     geocoder.geocode({"address":firstResult }, function(results, status) {
  154.                    
  155.                         if (status == google.maps.GeocoderStatus.OK) {
  156.                            
  157.                             var lat = results[0].geometry.location.lat();
  158.                             var lng = results[0].geometry.location.lng();
  159.                                            
  160.                             $('#glat').val(lat);
  161.                             $('#glng').val(lng);
  162.                            
  163.                             var component_form = {
  164.                                 'street_number': 'long_name',
  165.                                 'route': 'long_name',
  166.                                 'locality': 'long_name',
  167.                                 'administrative_area_level_1': 'short_name',
  168.                                 'country': 'long_name',
  169.                                 'postal_code': 'short_name'
  170.                               };
  171.                             for (var component in component_form) {
  172.                               document.getElementById(component).value = "";
  173.                               document.getElementById(component).disabled = false;
  174.                             }
  175.                              for (var j = 0; j < results[0].address_components.length; j++) {
  176.                                   var att = results[0].address_components[j].types[0];
  177.                                   if (component_form[att]) {
  178.                                     var val = results[0].address_components[j][component_form[att]];
  179.                                     document.getElementById(att).value = val;
  180.                                   }
  181.                                 }
  182.                            
  183.  
  184.                            
  185.                             $('#header-addre-form').submit();
  186.                            
  187.                         }
  188.                     });
  189.                     return false;
  190.                 } else {
  191.                    
  192.                     $(".pac-container").css("visibility","visible");
  193.                 }
  194.        
  195.             });
  196.         });
  197.     });
  198.                 </script>
  199.  
  200. <script id="SCRIPT_63">try{for(var lastpass_iter=0; lastpass_iter < document.forms.length; lastpass_iter++){ var lastpass_f = document.forms[lastpass_iter]; if(typeof(lastpass_f.lpsubmitorig2)=="undefined"){ lastpass_f.lpsubmitorig2 = lastpass_f.submit; if (typeof(lastpass_f.lpsubmitorig2)=='object'){ continue;}lastpass_f.submit = function(){ var form=this; var customEvent = document.createEvent("Event"); customEvent.initEvent("lpCustomEvent", true, true); var d = document.getElementById("hiddenlpsubmitdiv"); if (d) {for(var i = 0; i < document.forms.length; i++){ if(document.forms[i]==form){ if (typeof(d.innerText) != 'undefined') { d.innerText=i.toString(); } else { d.textContent=i.toString(); } } } d.dispatchEvent(customEvent); }form.lpsubmitorig2(); } } }}catch(e){}
  201.                         </script>
  202. <div id="DIV_64">
  203.                             </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement