/* Common JavaScript library.  Copyright 2008, MapQuest, INC.  All rights reserved.
   Copying, reverse engineering or modifying is strictly prohibited.
   Generated for Profile=classic-ambiguity, Locale=en_US
*/
m2.util.Bubble={_cdnPrefix:null,_locale:null,init:function(B,A){this._cdnPrefix=B;this._locale=(A)?A:"en_US"},formatRolloverContent:function(G,D){var A=[];var F=false;var B=(G.country&&(G.country.toUpperCase()!="US"&&G.country.toUpperCase()!="CA"))?true:false;A.push('<div class="rolloverContent">');if(G.locationType==3){A.push(G.count+" Results for "+D.name+'&nbsp;&nbsp;<a class="arrows" href="javascript:void();">&raquo;</a>')}else{if(G.title){A.push(G.name+'&nbsp;&nbsp;<a class="arrows" href="javascript:void();">&raquo;</a><br/>');A.push("<span>"+G.title+"</span>")}else{if(G.name){A.push(G.name+'&nbsp;&nbsp;<a class="arrows" href="javascript:void();">&raquo;</a><br/>');if(G.addressLine1){A.push("<span>"+G.addressLine1+"</span>")}else{if(G.address){A.push("<span>"+G.address+"</span>")}}}else{if(G.geocodeQuality=="LATLNG"&&!G.city&&!G.state){A.push("Latitude:&nbsp;"+G.latitude+"&nbsp;&nbsp;Longitude:&nbsp;"+G.longitude+'&nbsp;&nbsp;<a class="arrows" href="javascript:void();">&raquo;</a>')}else{if(G.addressLine1){A.push(G.addressLine1+'</span>&nbsp;&nbsp;<a class="arrows" href="javascript:void();">&raquo;</a><br/>');A.push("<span>");if(G.city){A.push(G.city)}if(G.state){A.push(",&nbsp;"+G.state)}if(G.postalCode){if(B&&(G.city||G.state)){A.push(",&nbsp;")}else{A.push("&nbsp;")}A.push(G.postalCode)}A.push("</span>")}else{if((G.geocodeQuality=="ZIP"||G.geocodeQuality=="LATLNG")&&G.city&&G.state){if(G.postalCode){A.push("Center&nbsp;of&nbsp;"+G.city+",&nbsp;"+G.state);if(B){A.push(",&nbsp;")}else{A.push("&nbsp;")}A.push(G.postalCode+'&nbsp;&nbsp;<a class="arrows" href="javascript:void();">&raquo;</a>')}else{A.push("Center&nbsp;of&nbsp;"+G.city+",&nbsp;"+G.state+'&nbsp;&nbsp;<a class="arrows" href="javascript:void();">&raquo;</a>')}}else{if(G.city){A.push("Center&nbsp;of&nbsp;"+G.city);if(G.state){A.push(",&nbsp;"+G.state)}A.push('&nbsp;&nbsp;<a class="arrows" href="javascript:void();">&raquo;</a>')}else{if(G.postalCode){A.push("Center&nbsp;of&nbsp;"+G.postalCode+'&nbsp;&nbsp;<a class="arrows" href="javascript:void();">&raquo;</a>')}else{if(G.state){A.push("Center&nbsp;of&nbsp;"+G.state+'&nbsp;&nbsp;<a class="arrows" href="javascript:void();">&raquo;</a>')}else{if(G.country){F=true;if(G.countryLong&&G.countryLong!=""){A.push("Center&nbsp;of&nbsp;"+G.countryLong+'&nbsp;&nbsp;<a class="arrows" href="javascript:void();">&raquo;</a>')}else{if(G.country){var E=m2.widget.Countries.lookupCountryNameInMaps(G.country);if(typeof (E)!="undefined"&&E!=null&&E!=""){A.push("Center&nbsp;of&nbsp;"+E+'&nbsp;&nbsp;<a class="arrows" href="javascript:void();">&raquo;</a>')}else{A.push("Center&nbsp;of&nbsp;"+G.country+'&nbsp;&nbsp;<a class="arrows" href="javascript:void();">&raquo;</a>')}}else{A.push("Center&nbsp;of&nbsp;"+G.country+'&nbsp;&nbsp;<a class="arrows" href="javascript:void();">&raquo;</a>')}}}else{A.push("United States Map")}}}}}}}}}if(B&&!F){if(G.countryLong&&G.countryLong!=""){A.push("<br/><span>"+G.countryLong+"</span>")}else{var E=m2.widget.Countries.lookupCountryNameInMaps(G.country);if(typeof (E)!="undefined"&&E!=null&&E!=""){A.push("<br/><span>"+E+"</span>")}else{A.push("<br/><span>"+G.country+"</span>")}}}}A.push("</div>");var C=A.join("");return C},searchMapWindowContent:function(G,C,I){var E=[];if(G.locationType==3){E.push("<a style=\"padding-top: 3px;\" href=\"javascript:$pv('MQ08BLZoomInDetails','"+G.omnitureKey+"');m2.widget.SmallMap.zoomToRect({lat:"+G.upperLeft.latitude+",lng:"+G.upperLeft.longitude+"}, {lat:"+G.lowerRight.latitude+",lng:"+G.lowerRight.longitude+'});">Zoom In</a> for Details')}else{var A;if(G.website){if(C.poiBubblePrefixUrl){A=C.poiBubblePrefixUrl+encodeURIComponent(G.website)}else{A=G.website}}else{if(C.redirectUrl){if(C.poiBubblePrefixUrl){A=C.poiBubblePrefixUrl+C.redirectUrl}else{A=C.redirectUrl}}}var D=(MQA.browser.name=="msie"&&MQA.browser.version<7)?true:false;var J=(D)?"width:250px;":"";E.push('<div style="padding-top:3px;font-size: 1.1em;height:1%;position:relative;'+J+'">');if(C.rectangleImage){if(A){E.push("<a target=\"MQPlaces\" onclick=\"javascript:$a('MQ08BLIcon','MQ08BL"+G.omnitureKey+'\');" href="'+A+'" target="_blank">')}E.push('<img align="right" style="padding-left:10px;" height="'+C.rectangleImage.height+'" width="'+C.rectangleImage.width+'" src="'+C.rectangleImage.url+'"/>');if(C.poiBubbleTracking){for(var F=0;F<C.poiBubbleTracking.length;F++){E.push('<img src="'+C.poiBubbleTracking[F]+'" width="1" height="1" border="0"/>')}}if(A!=""){E.push("</a>")}}E.push(G.addressLine1+"<br/>");E.push(G.city+", "+G.state+"  "+G.postalCode+"<br/>");if(A){E.push("<a target=\"MQPlaces\" onclick=\"$a('MQ08BLWebsite','MQ08BL"+G.omnitureKey+'\');" href="'+A+'">');if(C.websiteLinkText&&C.websiteLinkText.length>1){E.push(C.websiteLinkText);var B=(C.websiteLinkText.length>9?true:false)}else{E.push("Website")}E.push("</a>")}if(G.phoneNumber&&A&&!B){E.push(" | ")}else{if(B){E.push("<br/>")}}if(G.phoneNumber){E.push(G.phoneNumber)}E.push("</div>");E.push('<div class="clearb"></div>');if(C.infowindowContentText[0]){E.push("<br/>");E.push('<div style="width:100%;height:31px;">');if(G.website&&G.website.length>0){var K=C.infowindowContentText[0].replace(/#encodedLocURL#/gi,encodeURIComponent(G.website));E.push(K.replace(/#locURL#/gi,G.website))}else{if(C.redirectUrl&&C.redirectUrl.length>0){E.push(C.infowindowContentText[0].replace(/#locURL#|#encodedLocURL#/gi,C.redirectUrl))}else{E.push(C.infowindowContentText[0].replace(/#locURL#|#encodedLocURL#/gi,""))}}E.push("</div>")}E.push("<br/>");E.push('<div class="actions" style=white-space:nowrap;color:#389344;">');E.push('<a style="color:#389344;" href="javascript:void(0);" onclick="$pv(\'MQ08BUBZoomStreetLevel\',\'MQ08BL'+G.omnitureKey+"','r');m2.widget.SmallMap.zoomToStreet(null,{latitude:"+G.latitude+", longitude:"+G.longitude+'}, 14);return false;">Zoom to Street</a> | ');E.push('<a style="color:#389344;" href="javascript:void(0);" onclick="$a(\'MQ08BUBBLS2C\',\'MQ08BL'+G.omnitureKey+"');m2.widget.SmallMap.somShowSTC(this,'"+C.query+"',"+G.id+",'"+I+"');return false;\">Send to Cell</a> | ");E.push('<a style="color:#389344;" href="javascript:void(0);" onclick="$a(\'MQ08BUBBLS2O\',\'MQ08BL'+G.omnitureKey+"','e');m2.widget.SmallMap.somShowOnStar(this,'"+C.query+"',"+G.id+",'"+I+"');return false;\">Send to OnStar</a><br/>");E.push("</div");E.push('<div style="clear: both"></div>');E.push('<div style="text-align:left; margin-top: 8px;">');E.push("<a href=\"javascript:void(0);\" onclick=\"$a('MQ08BUBBLMap','MQ08BL"+G.omnitureKey+"','e');m2.widget.SmallMap.somMap('"+C.query+"',"+G.id+');return false;"><span>Map</span></a> | ');E.push("<a href=\"javascript:void(0);\" onclick=\"$a('MQ08BUBBLDirections','MQ08BL"+G.omnitureKey+"','e');m2.widget.SmallMap.somDirectionsTo('"+C.query+"',"+G.id+');return false;"><span>Get Directions To Here</span></a>');E.push("</div>");E.push("</div>")}var H=E.join("");return H},_getContentSize:function(D){var B={};var G=document.createElement("table");G.id="TmpPopupContentTable";var F=document.createElement("tbody");var H=document.createElement("tr"),A=document.createElement("td");var C=((D.nodeType==1)?D.innerHTML:D);A.innerHTML=C;H.appendChild(A);F.appendChild(H);G.appendChild(F);document.body.appendChild(G);B.width=G.offsetWidth;B.height=G.offsetHeight;try{G.innerHTML=""}catch(E){}document.body.removeChild(G);return B},getSearchLocation:function(B,A,D){var C=B.searchManager.getLocation(A,D);return C}};