HomePhotos=["gint/IMG_1374.jpg","gint/IMG_1375.jpg","gint/IMG_1376.jpg","gint/IMG_1377.jpg","gint/IMG_1378.jpg","gint/IMG_1379.jpg","gint/IMG_1380.jpg","gint/IMG_1381.jpg","gint/IMG_1382.jpg","gint/IMG_1383.jpg","gint/IMG_1384.jpg","gint/IMG_1385.jpg","gint/IMG_1386.jpg","gint/IMG_1387.jpg","gint/IMG_1388.jpg","gint/IMG_1389.jpg","gint/IMG_1390.jpg","gint/IMG_1391.jpg","gint/IMG_1392.jpg","gint/IMG_1393.jpg","gint/IMG_1394.jpg","gint/IMG_1395.jpg","gint/IMG_1396.jpg","gint/IMG_1397.jpg","gint/IMG_1398.jpg","gint/IMG_1399.jpg","gint/IMG_1400.jpg","gint/IMG_1401.jpg","gint/IMG_1402.jpg","gint/IMG_1403.jpg","gint/IMG_3444.jpg","gint/IMG_3447.jpg","gint/IMG_3449.jpg","gint/IMG_3454.jpg","gint/IMG_3455.jpg","gint/IMG_3457.jpg","gint/IMG_3461.jpg","gint/IMG_3462.jpg","gint/IMG_3463.jpg","gint/IMG_3464.jpg","gint/IMG_3465.jpg","gint/IMG_3466.jpg","gint/IMG_3467.jpg","gint/IMG_3468.jpg","gint/IMG_3469.jpg","gint/IMG_3477.jpg","gint/IMG_3486.jpg","gint/IMG_3487.jpg","gint/IMG_3488.jpg","gint/IMG_3489.jpg","gint/IMG_3490.jpg","gint/IMG_3491.jpg","gint/IMG_3492.jpg","gint/IMG_3493.jpg","gint/IMG_3495.jpg","gint/IMG_3502.jpg","gint/IMG_3504.jpg","gint/IMG_3505.jpg","gint/IMG_3506.jpg","gint/IMG_3507.jpg","gint/IMG_3508.jpg","gint/IMG_3509.jpg","gint/IMG_3510.jpg","gint/IMG_3511.jpg","gint/IMG_3512.jpg","gint/IMG_3514.jpg","gint/IMG_3515.jpg","gint/IMG_3516.jpg","gint/IMG_3517.jpg","gint/IMG_3518.jpg","gint/IMG_3519.jpg","gint/IMG_3520.jpg","gint/Exterior-Yard (1).jpg","gint/Exterior-Yard (10).jpg","gint/Exterior-Yard (11).jpg","gint/Exterior-Yard (12).jpg","gint/Exterior-Yard (13).jpg","gint/Exterior-Yard (14).jpg","gint/Exterior-Yard (15).jpg","gint/Exterior-Yard (2).jpg","gint/Exterior-Yard (3).jpg","gint/Exterior-Yard (4).jpg","gint/Exterior-Yard (5).jpg","gint/Exterior-Yard (6).jpg","gint/Exterior-Yard (7).jpg","gint/Exterior-Yard (8).jpg","gint/Exterior-Yard (9).jpg","gint/Interior (1).jpg","gint/Interior (10).jpg","gint/Interior (11).jpg","gint/Interior (12).jpg","gint/Interior (13).jpg","gint/Interior (14).jpg","gint/Interior (15).jpg","gint/Interior (16).jpg","gint/Interior (17).jpg","gint/Interior (18).jpg","gint/Interior (19).jpg","gint/Interior (2).jpg","gint/Interior (20).jpg","gint/Interior (21).jpg","gint/Interior (22).jpg","gint/Interior (23).jpg","gint/Interior (24).jpg","gint/Interior (25).jpg","gint/Interior (26).jpg","gint/Interior (27).jpg","gint/Interior (28).jpg","gint/Interior (29).jpg","gint/Interior (3).jpg","gint/Interior (30).jpg","gint/Interior (31).jpg","gint/Interior (32).jpg","gint/Interior (33).jpg","gint/Interior (34).jpg","gint/Interior (35).jpg","gint/Interior (36).jpg","gint/Interior (37).jpg","gint/Interior (38).jpg","gint/Interior (39).jpg","gint/Interior (4).jpg","gint/Interior (40).jpg","gint/Interior (41).jpg","gint/Interior (42).jpg","gint/Interior (43).jpg","gint/Interior (44).jpg","gint/Interior (45).jpg","gint/Interior (5).jpg","gint/Interior (6).jpg","gint/Interior (7).jpg","gint/Interior (8).jpg","gint/Interior (9).jpg"];ExteriorPhotos=["gint/Exterior-Front (1).jpg","gint/Exterior-Front (10).jpg","gint/Exterior-Front (11).jpg","gint/Exterior-Front (12).jpg","gint/Exterior-Front (13).jpg","gint/Exterior-Front (14).jpg","gint/Exterior-Front (15).jpg","gint/Exterior-Front (16).jpg","gint/Exterior-Front (17).jpg","gint/Exterior-Front (18).jpg","gint/Exterior-Front (19).jpg","gint/Exterior-Front (2).jpg","gint/Exterior-Front (20).jpg","gint/Exterior-Front (3).jpg","gint/Exterior-Front (4).jpg","gint/Exterior-Front (5).jpg","gint/Exterior-Front (6).jpg","gint/Exterior-Front (7).jpg","gint/Exterior-Front (8).jpg","gint/Exterior-Front (9).jpg"];Steps={CurrentTask:0,ProcessTasks:[{Text:"Google Interior View",Images:["gint/IMG_3447.jpg","gint/IMG_3455.jpg","gint/IMG_3461.jpg","gint/IMG_3489.jpg","gint/IMG_3514.jpg","gint/IMG_3517.jpg"]},{Text:"Cross Referencing Historical Data",Images:["historical-documents.jpg"]},{Text:"Accessing Home Photos Database",Images:HomePhotos},{Text:"Analyzing Listing Information",Images:["listing-information.jpg"]},{Text:"Accessing Satellite Imagery",Images:["satellite-1.jpg","satellite-2.jpg","satellite-3.jpg"]},{Text:"Calling the Neighbors",Images:["two-telephones.jpg"]},{Text:"Reticulating Splines",Images:["reticulating-splines.jpg"]},{Text:"Accessing Tax Records",Images:["tax-records.jpg"]},{Text:"Measuring Zillow Authoritative Metrics",Images:["magic-8-ball.jpg"]},{Text:"Determining Lingo for Target Demographic",Images:["demographic.jpg"]}],ListingPriceRetries:1,Init:function(){},GoStep1:function(){pageTracker._trackPageview("/Step1");$("#Step0").hide();$("#Step1").show();setTimeout(this.ShowAutoFeatures,30000);$("#FirstName").css("color","#000000").val("Joe");$("#LastName").css("color","#000000").val("Agent");$("#ListingAddress").css("color","#000000").val("1600 Pennsylvania Ave");$("#ListingCity").css("color","#000000").val("Washington");$("#ListingState").css("color","#000000").val("DC");$("#ListingZipcode").css("color","#000000").val("20500");$("#ListingPrice").css("color","#000000").val("$300,000");var D=new YAHOO.widget.Tooltip("HelpGoogleStreetViewTT",{context:"HelpGoogleStreetView",width:"300px",showDelay:100,autodismissdelay:30000});var A=new YAHOO.widget.Tooltip("HelpGoogleInteriorViewTT",{context:"HelpGoogleInteriorView",width:"300px",showDelay:100,autodismissdelay:30000});var B=new YAHOO.widget.Tooltip("HelpGoogleListingInfoTT",{context:"HelpGoogleListingInfo",width:"300px",showDelay:100,autodismissdelay:30000});var E=new YAHOO.widget.Tooltip("HelpGoogleDescriptionTT",{context:"HelpGoogleDescription",width:"300px",showDelay:100,autodismissdelay:30000});var C=new YAHOO.widget.Tooltip("HelpCommuteScoreTT",{context:"HelpCommuteScore",width:"300px",showDelay:100,autodismissdelay:30000})},CheckInput:function(A){if(A.value.substring(0,4)=="ex: "){A.value="";$(A).css("color","#000000")}},FormatPrice:function(D){var B=D+"";var C="";B=B.replace(/[^\d]/g,"");for(var A=0;A<B.length;A++){if((B.length-A)%3==0&&A>0){C+=","}C+=B.charAt(A)}return C},GoNext:function(){var A="";if($("#FirstName").val()==""||$("#FirstName").val().substring(0,4)=="ex: "){A+="You must fill in your First Name<br />"}if($("#LastName").val()==""||$("#LastName").val().substring(0,4)=="ex: "){A+="You must fill in your Last Name<br />"}if($("#ListingAddress").val()==""||$("#ListingAddress").val().substring(0,4)=="ex: "){A+="You must fill in the Listing Address<br />"}if($("#ListingPrice").val()==""||$("#ListingPrice").val().substring(0,4)=="ex: "){A+="You must fill in the Listing Price<br />"}if(A!=""){$("#ErrorMessage").css("display","block");if(typeof this.ErrorMessageDialog=="undefined"){this.ErrorMessageDialog=new YAHOO.widget.SimpleDialog("ErrorMessage",{width:"300px",modal:true,fixedcenter:true,visible:true,draggable:false});var B=new YAHOO.util.KeyListener(document,{keys:27},{fn:this.ErrorMessageDialog.hide,scope:this.ErrorMessageDialog,correctScope:true});this.ErrorMessageDialog.cfg.setProperty("keylisteners",B);this.ErrorMessageDialog.render()}this.ErrorMessageDialog.setBody(A);this.ErrorMessageDialog.show()}else{if(this.ListingPriceRetries>0){$("#ListingPriceAlert").css("display","block");if(typeof this.ListingPriceAlertDialog=="undefined"){this.ListingPriceAlertDialog=new YAHOO.widget.SimpleDialog("ListingPriceAlert",{width:"300px",modal:false,visible:true,draggable:false,context:["ListingPrice","tl","tr"]});this.ListingPriceAlertDialog.setHeader("Zillow Alert! This listing may not sell!");this.ListingPriceAlertDialog.cfg.setProperty("icon",YAHOO.widget.SimpleDialog.ICON_WARN);var B=new YAHOO.util.KeyListener(document,{keys:27},{fn:this.ListingPriceAlertDialog.hide,scope:this.ListingPriceAlertDialog,correctScope:true});this.ListingPriceAlertDialog.cfg.setProperty("keylisteners",B);this.ListingPriceAlertDialog.render();this.ListingPriceAlertDialog.show();$("#ListingPriceAlertText").text("");this.AnimateText($("#ListingPriceAlertText"),"Hey! The listing price you entered is super far from the Zillow Zestimate! We suggest you try adjusting the price!")}else{this.ListingPriceAlertDialog.show();$("#ListingPriceAlertText").text("");this.AnimateText($("#ListingPriceAlertText"),"ACK! You didn't get it right that time either, whatever, do what you want!")}this.ListingPriceRetries--}else{if($(".FeaturesTable input:checked").length==0){Steps.ShowAutoFeatures()}else{this.SavedFeatures=$(".FeaturesTable input:checked");$("#Step1").hide();$("#Step2").show();pageTracker._trackPageview("/Step2");this.StartProcessing()}}}},AnimateText:function(A,B,C){if(A!=null&&A.length>0){if(B.length>0&&this.ListingPriceAlertDialog.cfg.getProperty("visible")){A.text(A.text()+B.substring(0,1));A.css("zoom",1);B=B.substring(1,B.length);setTimeout(function(){Steps.AnimateText(A,B)},100*Math.random())}else{if(typeof C=="function"){C()}}}},AnimateTextProcess:function(A,B,C){if(typeof B!="undefined"&&B!=null&&B.length>0){A.html(A.html()+B.substring(0,1));A.css("zoom",1);B=B.substring(1,B.length);setTimeout(function(){Steps.AnimateTextProcess(A,B,C)},25)}else{if(typeof C=="function"){A.html(A.html()+" Done!");C()}}},ShowAutoFeatures:function(){var B=$(".FeaturesTable input:checked");if(B.length==0){$("#AutoFeatures").css("display","block");if(typeof Steps.AutoFeaturesDialog=="undefined"){Steps.AutoFeaturesDialog=new YAHOO.widget.SimpleDialog("AutoFeatures",{width:"300px",modal:true,fixedcenter:true,visible:true,draggable:false});var A=new YAHOO.util.KeyListener(document,{keys:27},{fn:Steps.AutoFeaturesDialog.hide,scope:Steps.AutoFeaturesDialog,correctScope:true});Steps.AutoFeaturesDialog.cfg.setProperty("keylisteners",A);Steps.AutoFeaturesDialog.render()}Steps.AutoFeaturesDialog.show()}},AutoFeatures:function(){Steps.AutoFeaturesDialog.hide();var B=$(".FeaturesTable input");for(var A=0;A<B.length;A++){B.get(A).checked=Math.round(Math.random()*3)==1?true:false}},StartProcessing:function(){if(Steps.CurrentTask==0){window.scrollTo(0,171)}else{var E=$("#ProcessingTask_"+(Steps.CurrentTask-1));E.html("<b>"+Steps.ProcessTasks[Steps.CurrentTask-1].Text+"</b>");E.css("text-decoration","line-through")}if(Steps.CurrentTask==Steps.ProcessTasks.length){Steps.Generate()}else{var B=$("#Processing");B.append("<div class='ProcessingTask' id='ProcessingTask_"+Steps.CurrentTask+"'></div>");var D=$("#ProcessingTask_"+Steps.CurrentTask);D.html("<b>"+Steps.ProcessTasks[Steps.CurrentTask].Text+"</b>");var F="",A=10+Math.random()*10;for(var C=0;C<A;C++){F+=" ."}$("#ProcessPhoto").html("<img src='/images/Processing/"+Steps.ProcessTasks[Steps.CurrentTask].Images[Math.floor(Steps.ProcessTasks[Steps.CurrentTask].Images.length*Math.random())]+"' />");Steps.AnimateTextProcess(D,F,function(){Steps.StartProcessing()});Steps.CurrentTask++}},PropertyTypes:["Single Family Home","Multi-Family","Townhouse","Condo"],Generate:function(){$("#Step2").hide();$("#Step3").show();pageTracker._trackPageview("/Step3");$("#ListingPriceDisplay").text(this.FormatPrice($("#ListingPrice").val()));$("#ListingAddressDisplay").text($("#ListingAddress").val()+" | "+$("#ListingCity").val()+" "+$("#ListingState").val()+" | "+$("#ListingZipcode").val());$("#ListingBeds").text(Math.ceil(5*Math.random()));$("#ListingBaths").text(Math.ceil(4*Math.random()));$("#ListingSqft").text(Math.ceil(12000*Math.random())+" sqft");$("#ListingLotSize").text(Math.ceil(46800*Math.random())+" sqft");$("#ListingYearBuilt").text(1920+Math.ceil(89*Math.random()));$("#ListingPropertyType").text(this.PropertyTypes[Math.floor(this.PropertyTypes.length*Math.random())]);$("#AgentName").text($("#FirstName").val()+" "+$("#LastName").val());$("#AgentPhoto").get(0).src="/images/agents/"+(Math.ceil(Math.random()*8))+".jpg";$("#CommuteScoreNumber").text(Math.ceil(99*Math.random()));var G=$("#ListingAdditionalPhotos");var F="/images/Processing/"+HomePhotos[Math.floor(HomePhotos.length*Math.random())],E="/images/Processing/"+HomePhotos[Math.floor(HomePhotos.length*Math.random())],D="/images/Processing/"+HomePhotos[Math.floor(HomePhotos.length*Math.random())],C="/images/Processing/"+HomePhotos[Math.floor(HomePhotos.length*Math.random())],B="/images/Processing/"+HomePhotos[Math.floor(HomePhotos.length*Math.random())],A="/images/Processing/"+HomePhotos[Math.floor(HomePhotos.length*Math.random())];G.append('<a href="'+F+'"><img class="ListingAdditionalPhoto" src="'+F+'" /></a>');G.append('<a href="'+E+'"><img class="ListingAdditionalPhoto" src="'+E+'" /></a>');G.append('<a href="'+D+'"><img class="ListingAdditionalPhoto" src="'+D+'" /></a>');G.append('<a href="'+C+'"><img class="ListingAdditionalPhoto" src="'+C+'" /></a>');G.append('<a href="'+B+'"><img class="ListingAdditionalPhoto" src="'+B+'" /></a>');G.append('<a href="'+A+'"><img class="ListingAdditionalPhoto" src="'+A+'" /></a>');$("#ListingAdditionalPhotos a").lightBox();var N=$("#ListingFeatures");var P="";for(var L=0;L<Steps.SavedFeatures.length;L++){var J=parseInt(Steps.SavedFeatures[L].id.replace(/[^\d]/g,""));var R=new Array();N.append("<div class='ListingFeature'>"+Steps.SavedFeatures[L].nextSibling.innerHTML+"</div>");for(var K=0;K<FeatureDescriptions.length;K++){if(FeatureDescriptions[K].FeatureID==J){R[R.length]=FeatureDescriptions[K].Description}}if(R.length>0){P+=" "+R[Math.floor(R.length*Math.random())]}}$("#ListingDescription").text(P);var I=$("#ListingState").val();var Q=$("#ListingCity").val();$("#ZillowWidget").html('<div class="zillow-widget regional-home-values" style="width:146px;height:338px;border:1px solid #adcfff;background:url(http://www.zillow.com/static/images/zmm_widget_logos.gif) 0 -629px repeat-x;padding:0 6px;"> <div style="width:146px;padding:6px 0;background-color:#eff3ff;text-align:center;"> <a href="http://www.zillow.com/local-info/'+I+"-"+Q+'-home-value?scid=gen-wid-home&scrnnm=diversesolutions" class="widget-header" style="display:block;font-weight:bold;font-size:12px;color:#36b;text-decoration:none;line-height:1.2"> <span class="region">'+Q+'</span><br />Home Values</a> </div> <div style="position:relative;width:144px;height:225px;text-align:center;font-family:verdana,arial,sans-serif;font-size:10px;background:white;border:1px solid #adcfff;"> <iframe frameborder="0" height="225" scrolling="no" width="144" src="http://www.zillow.com/widgets/geo/GeoTrendsWidget.htm?rid=16037&size=geo-small"></iframe> </div> <ul style="width:142px;float:left;list-style-type:none;margin:0 auto;padding:2px 0 0 2px;"> <li style="width:142px;height:26px;float:right;font-size:11px;text-align:center;margin:2px 0;padding:0;line-height:1.2;"> <div style="width:142px;height:26px;display:table;#position:relative;"><div style="#position:absolute;#top:50%;display:table-cell;vertical-align:middle;"><div style="#position:relative;#top:-50%;#left:-50%;"> <a href="http://www.zillow.com/homes/for_sale/'+Q+"-"+I+'?scid=gen-wid-home&scrnnm=diversesolutions" style="color:#36b;">More <span class="region">'+Q+'</span> real estate</a> </div></div></div> </li> <li style="width:142px;float:left;font-size:10px;text-align:center;margin:2px 0;padding:0;line-height:1.2;"> <a href="http://www.zillow.com/" style="display:block;height:17px;width:92px;margin:0 auto"><img src="http://www.zillow.com/static/images/logo_zillow_small.gif" width="92" height="17" alt="Zillow.com real estate" style="border:none;" /></a> <a href="http://www.zillow.com/webtools/widgets/RegionalHomeValues.htm?scid=gen-wid-home&scrnnm=diversesolutions" style="text-align:center;color:gray;text-decoration:none;">Get this widget</a> </li> </ul> </div>');var O=new GMap2(document.getElementById("ListingLocalSearchMap"));O.setUIToDefault();O.enableGoogleBar();O.setCenter(new GLatLng(33.956461,-118.396225),13);var H=new GClientGeocoder();try{if(H){H.getLatLng($("#ListingAddress").val()+", "+$("#ListingCity").val()+", "+$("#ListingState").val()+", "+$("#ListingZipcode").val(),function(S){O.setCenter(S!=null?S:new GLatLng(33.956461,-118.396225),13);O.addOverlay(new GMarker(S!=null?S:new GLatLng(33.956461,-118.396225)));if(S==null){$("#ListingPhoto").get(0).src="/images/Processing/"+HomePhotos[Math.floor(HomePhotos.length*Math.random())]}else{var T=new GStreetviewPanorama(document.getElementById("ListingPhotoContainer"));T.setLocationAndPOV(S);GEvent.addListener(T,"error",function(U){$("#ListingPhoto").get(0).src="/images/Processing/"+ExteriorPhotos[Math.floor(ExteriorPhotos.length*Math.random())]})}})}else{$("#ListingPhoto").get(0).src="/images/Processing/"+ExteriorPhotos[Math.floor(ExteriorPhotos.length*Math.random())]}}catch(M){$("#ListingPhoto").get(0).src="/images/Processing/"+ExteriorPhotos[Math.floor(ExteriorPhotos.length*Math.random())]}},ShowVirtualTour:function(){$("#VirtualTour").css("display","block");if(typeof this.VirtualTourDialog=="undefined"){this.VirtualTourDialog=new YAHOO.widget.SimpleDialog("VirtualTour",{width:"320px",modal:true,fixedcenter:true,visible:true,draggable:false});var A=new YAHOO.util.KeyListener(document,{keys:27},{fn:this.VirtualTourDialog.hide,scope:this.VirtualTourDialog,correctScope:true});this.VirtualTourDialog.cfg.setProperty("keylisteners",A);this.VirtualTourDialog.beforeHideEvent.subscribe(function(){$("#VirtualTour").css("display","none")},this,true);this.VirtualTourDialog.render()}this.VirtualTourDialog.show()},ShowDisclaimer:function(){if(typeof this.DisclaimerDialog=="undefined"){$("#DisclaimerDialog").css("display","block");this.DisclaimerDialog=new YAHOO.widget.SimpleDialog("DisclaimerDialog",{width:"320px",modal:true,fixedcenter:true,visible:true,draggable:false});var A=new YAHOO.util.KeyListener(document,{keys:27},{fn:this.DisclaimerDialog.hide,scope:this.DisclaimerDialog,correctScope:true});this.DisclaimerDialog.cfg.setProperty("keylisteners",A);this.DisclaimerDialog.render()}this.DisclaimerDialog.show()}};