function getHTTPObject() { 
  var xmlhttp; /*@cc_on 
  @if (@_jscript_version >= 5)
	try { 
	  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); 
	} catch (e) { 
	  try { 
		xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); 
	  } catch (E) { 
		xmlhttp = false; 
	  } 
	} 
  @else 
	xmlhttp = false; 
  @end @*/  
  if (!xmlhttp && typeof XMLHttpRequest != 'undefined') { 
	try { 
	  xmlhttp = new XMLHttpRequest(); 
	} catch (e) { 
	  xmlhttp = false; 
	} 
  } 
  return xmlhttp; 
} 


var map=null;
var geocoder=null;
var mgr=null;
function load(_1,_2,_3){
if(GBrowserIsCompatible()){
map=new GMap2(document.getElementById("map"));
map.addMapType(G_PHYSICAL_MAP);
geocoder=new GClientGeocoder();
map.addControl(new mmZoomControl(),new GControlPosition(G_ANCHOR_TOP_LEFT,new GSize(17,58)));
map.addControl(new DragZoomControl({opacity:0.2,border:"2px solid red"},{buttonHTML:"<img src='http://image1.mapmuse.com/images/all/zb_inactive.gif' height='46' width='58' />",buttonZoomingHTML:"<img src='http://image1.mapmuse.com/images/all/zb_active.gif' height='46' width='58' />",buttonStartingStyle:{width:"58px",height:"46px",border:"0px"},overlayRemoveTime:0,stickyZoomEnabled:false},{}),new GControlPosition(G_ANCHOR_TOP_LEFT,new GSize(6,6)));
map.addControl(new GMapTypeControl());
map.addControl(new GScaleControl());
map.addControl(new GOverviewMapControl());
map.enableDoubleClickZoom();
if(splat!=""){
if(spzm==""){
spzm=15;
}
map.setCenter(new GLatLng(parseFloat(splat),parseFloat(splng)),parseInt(spzm));
}else{
if(init!=""){
init=init.split(",");
map.setCenter(new GLatLng(parseFloat(init[0]),parseFloat(init[1])),parseInt(init[2]));
}else{
map.setCenter(new GLatLng(38.358,-96.855),4);
}
}
if(_3=="G_SATELLITE_MAP"){
map.setMapType(G_SATELLITE_MAP);
}
if(_3=="G_HYBRID_MAP"){
map.setMapType(G_HYBRID_MAP);
}
var _4=map.getCenter();
document.getElementById("center").value=_4.toString();
var _5=map.getZoom();
document.getElementById("zlevel").value=_5.toString();
var _6=map.getCurrentMapType();
if(_6==G_NORMAL_MAP){
document.getElementById("maptyp").value="G_NORMAL_MAP";
}
if(_6==G_SATELLITE_MAP){
document.getElementById("maptyp").value="G_SATELLITE_MAP";
}
if(_6==G_HYBRID_MAP){
document.getElementById("maptyp").value="G_HYBRID_MAP";
}
mgr=new MarkerManager(map);
var _7,_8;
function getMousePos(e){
if(!e){
var e=window.event||window.Event;
}
if("undefined"!=typeof e.pageX){
_7=e.pageX;
_8=e.pageY;
}else{
_7=e.clientX+document.body.scrollLeft;
_8=e.clientY+document.body.scrollTop;
}
}
if(window.Event&&document.captureEvents){
document.captureEvents(Event.MOUSEMOVE);
}
document.onmousemove=getMousePos;
GEvent.addListener(map,"click",function(_a,_b){
if(_a){
if(isSwitch){
}else{
try{
tpc="";
idf="";
tpc=_a.getTitle().split("[")[1].split("]")[0];
idf=_a.getTitle().split("[")[2].split("]")[0];
window.open("http://find.mapmuse.com/re1/mm2launch.php?tpc="+tpc+"&idf="+idf);
}
catch(err){
}
}
}else{
if(document.getElementById("pano")){
if(panoOn){
checkPanoClick(_b.lat(),_b.lng());
}
}
}
});
GEvent.addListener(map,"drag",function(){
forceFade();
hidePano();
});
GEvent.addListener(map,"moveend",function(){
var _c=map.getCenter();
var _d=map.getZoom();
var _e=map.getCurrentMapType();
document.getElementById("center").value=_c.toString();
document.getElementById("zlevel").value=_d.toString();
if(_e==G_NORMAL_MAP){
document.getElementById("maptyp").value="G_NORMAL_MAP";
}
if(_e==G_SATELLITE_MAP){
document.getElementById("maptyp").value="G_SATELLITE_MAP";
}
if(_e==G_HYBRID_MAP){
document.getElementById("maptyp").value="G_HYBRID_MAP";
}
center_write();
forceFade();
makeSearchString();
hidePano();
});
}
}
function addAddressToMap(_f){
if(!_f||_f.Status.code!=200){
if(document.getElementById("address").value!=""){
if(document.getElementById("address").value!="Enter a location and click go"){
alert("We're sorry!\n'"+document.getElementById("address").value+"' couldn't be located.\nPlease try entering another location.");
}else{
alert("We're sorry!\nThe location you provided could not be found.\nPlease try entering another location.");
}
}else{
if(document.getElementById("address2").value!="Enter a location and click go"){
alert("We're sorry!\n'"+document.getElementById("address2").value+"' couldn't be located.\nPlease try entering another location.");
}else{
alert("We're sorry!\nThe location you provided could not be found.\nPlease try entering another location.");
}
}
}else{
place=_f.Placemark[0];
point=new GLatLng(place.Point.coordinates[1],place.Point.coordinates[0]);
map.setCenter(point,11);
marker=new GMarker(point);
map.addOverlay(marker);
marker.openInfoWindowHtml("<span class='mdHeader'><br>"+place.address+"</span>");
}
}
function showAddress(_10){
geocoder.getLocations(_10,addAddressToMap);
}
var http=getHTTPObject();
var http2=getHTTPObject();
var http3=getHTTPObject();
var http4=getHTTPObject();
var http5=getHTTPObject();
var searchHttp0=getHTTPObject();
var searchHttp1=getHTTPObject();
var searchHttp2=getHTTPObject();
var searchHttp3=getHTTPObject();
var searchHttp4=getHTTPObject();
whereHold="";
topicHold="";
redoOnce=true;
function doAjax(_11,_12){
try{
if(typeof (_12)=="undefined"){
_12="";
}
document.getElementById("loading").style.visibility="visible";
if(document.getElementById("tlist").value!=mainTopic+","){
document.getElementById("mapstatus").innerHTML="<span class='regbold' style='padding:4px;background-color:red;color:#FFFFFF'><b>Loading places...</b></span>";
}else{
document.getElementById("mapstatus").innerHTML="<span class='regbold' style='padding:4px;background-color:red;color:#FFFFFF'><b>Loading places...</b></span>";
}
var _13=map.getBounds();
var _14=_13.getSouthWest().lat();
var _15=_13.getNorthEast().lat();
var _16=_13.getSouthWest().lng();
var _17=_13.getNorthEast().lng();
if(showColors){
http.open("GET","mm2ajax.php?topicVal="+_12+"&showColors="+mainTopic+"&whereFor="+mainTopic+"&whereVal="+_11+"&bounds="+_14+","+_15+","+_16+","+_17+"&maxpoints="+maxpoints,true);
document.getElementById("maplist").src="mm2list.php?topicVal="+_12+"&showColors="+mainTopic+"&whereFor="+mainTopic+"&whereVal="+_11+"&bounds="+_14+","+_15+","+_16+","+_17+"&spid="+spid+"&sptp="+sptp+"&maxpoints="+maxpoints+"&showBasket="+showBasket+"&showDirections="+showDirections;
}else{
http.open("GET","mm2ajax.php?topicVal="+_12+"&whereFor="+mainTopic+"&whereVal="+_11+"&bounds="+_14+","+_15+","+_16+","+_17+"&maxpoints="+maxpoints,true);
document.getElementById("maplist").src="mm2list.php?topicVal="+_12+"&whereFor="+mainTopic+"&whereVal="+_11+"&bounds="+_14+","+_15+","+_16+","+_17+"&spid="+spid+"&sptp="+sptp+"&maxpoints="+maxpoints+"&showBasket="+showBasket+"&showDirections="+showDirections;
}
http.onreadystatechange=handleHttpResponse;
http.send(null);
}
catch(err){
if(redoOnce){
whereHold=_11;
topicHold=_12;
window.setTimeout("doAjax(whereHold,topicHold)",50);
redoOnce=false;
}
}
}
function doPropSearch(_18,_19){
cursorNum=0;
doAjax(_18,_19);
}
var http3_isBusy=false;
var http5_isBusy=false;
function doAjaxProp(idf,tpc,swb){
try{
if(idf!=""){
http3.open("GET","mm2ajax.php?topicVal="+document.getElementById("tlist").value+"&lvl="+map.getZoom().toString()+"&idf="+idf+"&tpc="+tpc+"&swb="+swb+"&whereFor="+mainTopic+"&whereVal="+document.getElementById("sqlstr").value,true);
http3_isBusy=true;
http3.onreadystatechange=handleHttpResponseProp;
http3.send(null);
}
}
catch(err){
http3.onreadystatechange=function(){
};
http3.abort();
idfHold=idf;
tpcHold=tpc;
swbHold=swb;
window.setTimeout("doAjaxProp(idfHold, tpcHold, swbHold)",500);
}
}
function doAjaxPropSwitch(idf,tpc,swb){
try{
if(idf!=""){
http5.open("GET","mm2ajax.php?topicVal="+document.getElementById("tlist").value+"&lvl="+map.getZoom().toString()+"&idg="+idf+"&tpc="+tpc+"&swb="+swb+"&whereFor="+mainTopic+"&whereVal="+document.getElementById("sqlstr").value,true);
http5_isBusy=true;
http5.onreadystatechange=handleHttpResponsePropSwitch;
http5.send(null);
}
}
catch(err){
http5.onreadystatechange=function(){
};
http5.abort();
idfHold=idf;
tpcHold=tpc;
swbHold=swb;
window.setTimeout("doAjaxPropSwitch(idfHold, tpcHold, swbHold)",500);
}
}
function debugPrint(_20){
document.getElementById("address").value=document.getElementById("address").value+_20;
}
function doAjaxWriteSearch(_21,_22){
if((_21==mainTopic)&&(initSearch!="")){
_22.open("GET","mm2ajax.php?searchtpc="+_21+"&initSearch="+initSearch,true);
}else{
_22.open("GET","mm2ajax.php?searchtpc="+_21,true);
}
_22.onreadystatechange=function(){
if(_22.readyState==4){
var rsp=_22.responseText.split("|");
var sId="srch_"+rsp[0];
var _25=document.createElement("div");
var _26=document.createElement("div");
var sDv=document.createElement("div");
_25.id=sId+"_hdr";
_25.style.fontWeight="bold";
_25.style.width="100px";
_25.style.fontFamily="arial";
_25.style.borderTop="1px solid #A5CFE9";
_25.style.borderLeft="1px solid #A5CFE9";
_25.style.borderRight="1px solid #A5CFE9";
_25.style.padding="1px";
_25.style.fontSize="9pt";
_25.style.color="#FFFFFF";
_25.style.background="#0000FF";
_25.style.filter="alpha(opacity=100)";
_25.style.opacity="1.0";
_26.id=sId+"_bdy";
_26.style.border="1px solid #A5CFE9";
_26.style.width="234px";
_26.style.fontFamily="arial";
_26.style.fontSize="10pt";
_26.style.padding="3px";
_26.style.color="#1B4966";
_26.style.background="#FFFFFF";
_26.style.filter="alpha(opacity=100)";
_26.style.opacity="1.0";
_26.innerHTML=rsp[1];
sDv.id=sId;
sDv.style.position="relative";
sDv.style.visibility="visible";
sDv.style.width="auto";
sDv.style.zIndex="499";
if((rsp[0]==mainTopic)&&(initSearch!="")){
sDv.style.height="240px";
_26.style.visibility="visible";
_26.style.height="200px";
_26.style.overflow="auto";
_25.innerHTML="<div style='width:100px;cursor:pointer;text-align:center;' onclick='srchTog(\""+sId+"\", this);'>Hide Search</div>";
}else{
sDv.style.height="30px";
_26.style.height="10px";
_26.style.overflow="auto";
_26.style.visibility="hidden";
_25.innerHTML="<div style='width:100px;cursor:pointer;text-align:center;' onclick='srchTog(\""+sId+"\", this);'>Show Search</div>";
}
sDv.appendChild(_25);
sDv.appendChild(_26);
var _28=sId+"_holder";
document.getElementById(_28).appendChild(sDv);
}
};
_22.send(null);
}
function srchTog(_29,_2a){
togBdy=_29+"_bdy";
togBdy=document.getElementById(togBdy);
togHdr=_29+"_hdr";
togHdr=document.getElementById(togHdr);
togDiv=document.getElementById(_29);
if(togBdy.style.visibility=="hidden"){
togBdy.style.visibility="visible";
togDiv.style.height="240px";
togBdy.style.height="200px";
togBdy.style.overflow="auto";
_2a.innerHTML="Hide Search";
}else{
togBdy.style.visibility="hidden";
togDiv.style.height="30px";
togBdy.style.height="10px";
togBdy.style.overflow="auto";
_2a.innerHTML="Show Search";
}
}
var wsstore=new Array();
var idfHold="";
var tpcHold="";
var swbHold="";
var isSwitch=false;
function handleHttpResponseProp(){
if(http3.readyState==4){
if(http3.responseText!=""){
http3_isBusy=false;
results=http3.responseText.split("|");
swbdwel=results[14];
if(swbdwel==1){
dbuild="";
dbuild+="<div style='line-height:15px;'><b>"+results[1]+"</b></div>";
if(results[15]=="HOTELS"){
if(results[4]!=""){
dbuild+="<span class='regbold' style='line-height:14px;padding:0px;margin-bottom:2px;'><a href='http://find.mapmuse.com/details/"+prepBrandId(results[15])+"/"+results[0]+"/"+prepPlaceName(results[1])+"' target='_blank' style='text-decoration:underline'>"+results[4].replace(": "," $")+"</a></span><br>";
}
if(results[11]!=""){
dbuild+="<span class='smalltext' style='line-height:14px;padding:0px;margin-bottom:6px;'>"+results[11]+"</span><br>";
}
if(trim(results[2])!=""){
dbuild+=results[2]+"<br>";
}
if(results[3]!=""){
dbuild+=results[3]+"<br>";
}
if(results[5]!=""){
dbuild+=results[5]+"<br>";
}
if(results[6]!=""){
dbuild+=results[6]+"<br>";
}
if(results[7]!=""){
dbuild+=results[7]+"<br>";
}
}else{
if(results[11]!=""){
dbuild+="<span class='plainsmalltext' style='line-height:14px;'>"+results[11]+"</span><br>";
}
if(trim(results[2])!=""){
dbuild+=results[2]+"<br>";
}
if(results[3]!=""){
dbuild+=results[3]+"<br>";
}
if(results[4]!=""){
dbuild+=results[4]+"<br>";
}
if(results[5]!=""){
dbuild+=results[5]+"<br>";
}
if(results[6]!=""){
dbuild+=results[6]+"<br>";
}
if(results[7]!=""){
dbuild+=results[7]+"<br>";
}
}
dbuild+="<span class='reg' style='line-height:10px;font-size:11px;'>";
dbuild+="&nbsp;<img src='http://image1.mapmuse.com/images/all/dweller_bullet.png'><a href='http://find.mapmuse.com/details/"+prepBrandId(results[15])+"/"+results[0]+"/"+prepPlaceName(results[1])+"' target='_blank' style='text-decoration:underline'>More Details</a><br />";
if(showDirections){
dbuild+="&nbsp;<img src='http://image1.mapmuse.com/images/all/dweller_bullet.png'><a href='http://directions.mapmuse.com/re1/mm2directions.php?destId="+results[0]+"&destTable="+results[15]+"' target='_blank' style='text-decoration:underline;'>Get Driving Directions</a><br />";
}
if(showBasket){
dbuild+="&nbsp;<img src='http://image1.mapmuse.com/images/all/dweller_bullet.png'><a href='javascript:addToBasket(\""+results[15]+"~"+results[0]+"\",\""+results[1].replace("'","")+"\");' style='text-decoration:underline'>Add to Basket</a><br />";
}
if(document.getElementById("panoDweller")){
if(results[10]==1){
checkPano(results[17],results[18],"panoLink"+results[15]+results[0]);
dbuild+="<span id='panoLink"+results[15]+results[0]+"'></span>";
}
}
dbuild+="</span>";
if(results[10]!="1"){
dbuild+="<div class='smalltext' style='color:red;line-height:12px;margin-top:8px;'>"+getGeotext(results[10])+"</div>";
}
if(results[9]!=""){
dbuild+="<img src='"+results[9]+"' width='180' height='135' style='margin:10px;margin-bottom:0px;' onerror=\"this.src='http://image1.mapmuse.com/images/all/blank.gif';this.height='1px';fixBlocker();\" onload='fixPifr();'>";
}
if(results[16]!=""){
dbuild+="<div class='plainsmalltext' style='line-height:12px;padding:4px;'>"+results[16]+"</div>";
}
document.getElementById("pdiv").innerHTML=dbuild;
fixPifr();
}else{
pdivDn();
isSwitch=false;
document.getElementById("actvhdr").innerHTML="<table width='100%'><tr><td style='line-height:15px;'>"+results[1]+"</td><td align='right'><img src='http://image1.mapmuse.com/images/all/forceFade.gif' border='0' style='cursor:pointer;' onclick='forceFade();' alt='Close'></td></tr></table><span style='visibility:hidden;position:absolute;left:0px;top:0px;'>"+results[0]+"</span>";
dbuild="";
if(results[15]=="HOTELS"){
if(results[4]!=""){
dbuild+="<span class='regbold' style='line-height:14px;padding:0px;margin-bottom:2px;margin-top:8px;'><a href='http://find.mapmuse.com/details/"+prepBrandId(results[15])+"/"+results[0]+"/"+prepPlaceName(results[1])+"' target='_blank' style='text-decoration:underline'>"+results[4].replace(": "," $")+"</a></span><br>";
}
if(results[11]!=""){
dbuild+="<span class='smalltext' style='line-height:14px;padding:0px;margin-bottom:6px;'>"+results[11]+"</span><br>";
}
if(results[3]!=""){
dbuild+=results[3]+"<br>";
}
if(results[5]!=""){
dbuild+=results[5]+"<br>";
}
if(results[6]!=""){
dbuild+=results[6]+"<br>";
}
if(results[7]!=""){
dbuild+=results[7]+"<br>";
}
}else{
if(results[11]!=""){
dbuild+="<span class='plainsmalltext' style='line-height:14px;'>"+results[11]+"</span><br>";
}
if(trim(results[2])!=""){
dbuild+=results[2]+"<br>";
}
if(results[3]!=""){
dbuild+=results[3]+"<br>";
}
if(results[4]!=""){
dbuild+=results[4]+"<br>";
}
if(results[5]!=""){
dbuild+=results[5]+"<br>";
}
if(results[6]!=""){
dbuild+=results[6]+"<br>";
}
if(results[7]!=""){
dbuild+=results[7]+"<br>";
}
}
dbuild+="<span class='reg' style='line-height:10px;font-size:11px;'>";
dbuild+="&nbsp;<img src='http://image1.mapmuse.com/images/all/dweller_bullet.png'><a href='http://find.mapmuse.com/details/"+prepBrandId(results[15])+"/"+results[0]+"/"+prepPlaceName(results[1])+"' target='popwin' style='text-decoration:underline'>More Details</a><br />";
if(showDirections){
dbuild+="&nbsp;<img src='http://image1.mapmuse.com/images/all/dweller_bullet.png'><a href='http://directions.mapmuse.com/re1/mm2directions.php?destId="+results[0]+"&destTable="+results[15]+"' target='_blank' style='text-decoration:underline;'>Get Driving Directions</a><br />";
}
if(showBasket){
dbuild+="&nbsp;<img src='http://image1.mapmuse.com/images/all/dweller_bullet.png'><a href='javascript:addToBasket(\""+results[15]+"~"+results[0]+"\",\""+results[1].replace("'","")+"\");' style='text-decoration:underline'>Add to Basket</a><br />";
}
if(document.getElementById("panoDweller")){
if(results[10]==1){
checkPano(results[17],results[18],"panoLink"+results[15]+results[0]);
dbuild+="<span id='panoLink"+results[15]+results[0]+"'></span>";
}
}
dbuild+="</span>";
dbuild+="<span id='swbmsg' class='plainsmalltext' style='line-height:18px;'>Checking for other places here...</span><br>";
if(results[10]!="1"){
dbuild+="<div class='smalltext' style='color:red;line-height:12px;'>"+getGeotext(results[10])+"</div>";
}
if(results[9]!=""){
dbuild+="<img src='"+results[9]+"' width='180' height='135' style='margin:10px;margin-bottom:0px;' onerror=\"this.src='http://image1.mapmuse.com/images/all/blank.gif';this.height='1px';fixBlocker();\" onload='fixPifr();'>";
}
if(results[16]!=""){
dbuild+="<div class='plainsmalltext' style='line-height:12px;padding:4px;'>"+results[16]+"</div>";
}
document.getElementById("actvbdy").innerHTML=dbuild;
oIf.style.height=oDv.offsetHeight+"px";
oIf.style.width=oDv.offsetWidth+"px";
doAjaxPropSwitch(results[0],results[15],swbdwel);
}
}else{
}
}
}
function handleHttpResponsePropSwitch(){
if(http5.readyState==4){
if(http5.responseText!=""){
http5_isBusy=false;
results=http5.responseText.split("|");
swbdwel=results[14];
if(document.getElementById("swbmsg")){
document.getElementById("swbmsg").innerHTML="&nbsp;";
}
if(trim(results[13])!=""){
if(document.getElementById("actvhdr").innerHTML.indexOf(results[0])>-1){
if(swbdwel==0){
pdivDn();
isSwitch=true;
document.getElementById("actvhdr").innerHTML="<table width='100%'><tr><td>"+(results[13].split("##").length-1)+" places here</td><td align='right'><a href='javascript:forceFade();'><img src='http://image1.mapmuse.com/images/all/forceFade.gif' border='0'></a></td></tr></table>";
swa=results[13].split("##");
swo="";
for(i=0,max=swa.length-1;i<max;i++){
var _2b=swa[i].split("~")[0];
var _2c=swa[i].split("~")[1];
if(spid==""){
swo+="<a href='http://find.mapmuse.com/re1/mm2launch.php?tpc="+_2c+"&idf="+_2b+"' target='popwin' onmouseover=\"pdivUp(event, '"+_2b+"', '"+_2c+"');\" >"+swa[i].split("~")[2]+"</a><br />";
}else{
if((spid!=_2b)||(sptp!=_2c)){
swo+="<a href='http://find.mapmuse.com/re1/mm2launch.php?tpc="+_2c+"&idf="+_2b+"' target='popwin' onmouseover=\"pdivUp(event, '"+_2b+"', '"+_2c+"');\" >"+swa[i].split("~")[2]+"</a><br />";
}else{
swo="<a href='http://find.mapmuse.com/re1/mm2launch.php?tpc="+_2c+"&idf="+_2b+"' target='popwin' onmouseover=\"pdivUp(event, '"+_2b+"', '"+_2c+"');\" >Featured Place</a><br />"+swo;
}
}
}
swo="<a href='' id='flink' style='color:white;'></a>"+swo;
document.getElementById("actvbdy").innerHTML=swo;
oIf.style.height=oDv.offsetHeight+"px";
oIf.style.width=oDv.offsetWidth+"px";
document.getElementById("flink").focus();
}
}
}
}else{
}
}
}
function getGeotext(gcd){
var _2e="";
if(gcd=="0"){
_2e="Couldn't find address;<br>Location may be inaccurate";
}
if(gcd=="3"){
_2e="Couldn't find address;<br>Centered on zip code";
}
if(gcd=="7"){
_2e="Couldn't find address;<br>Centered on city";
}
if(gcd=="9"){
_2e="Address in newly developed area<br>street data not yet available";
}
if(gcd=="2"){
_2e="Couldn't find address;<br>Located in general area";
}
if(gcd=="4"){
_2e="Located by a secondary source";
}
if(gcd=="5"){
_2e="Location coordinates provided<br>by the U.S. Geological Survey";
}
return _2e;
}
function pdivUp(e,idf,tpc){
document.getElementById("pdiv").innerHTML="Loading...";
doAjaxProp(idf,tpc,1);
var ox,oy;
if(self.pageYOffset){
ox=self.pageXOffset;
oy=self.pageYOffset;
}else{
if(document.documentElement&&document.documentElement.scrollTop){
ox=document.documentElement.scrollLeft;
oy=document.documentElement.scrollTop;
}else{
if(document.body){
ox=document.body.scrollLeft;
oy=document.body.scrollTop;
}
}
}
ox=parseInt(ox);
oy=parseInt(oy);
var _34=document.getElementById("pdiv");
_34.style.left=(e.clientX+25+ox)+"px";
_34.style.top=(e.clientY-20+oy)+"px";
_34.style.zIndex="2000";
_34.style.visibility="visible";
var _35=document.getElementById("pifr");
_35.style.left=(e.clientX+25+ox)+"px";
_35.style.top=(e.clientY-20+oy)+"px";
_35.style.height=(_34.offsetHeight-10)+"px";
_35.style.width=(_34.offsetWidth-10)+"px";
_35.style.zIndex="1999";
_35.style.visibility="visible";
}
function pdivDn(){
if((document.getElementById("pdiv"))&&(document.getElementById("pifr"))){
document.getElementById("pdiv").style.visibility="hidden";
document.getElementById("pifr").style.visibility="hidden";
document.getElementById("pdiv").style.zIndex="0";
document.getElementById("pifr").style.zIndex="0";
}
}
function fixPifr(){
if((document.getElementById("pdiv"))&&(document.getElementById("pifr"))){
var _36=document.getElementById("pdiv");
var _37=document.getElementById("pifr");
_37.style.height=(_36.offsetHeight-10)+"px";
_37.style.width=(_36.offsetWidth-10)+"px";
}
}
function fixBlocker(){
document.getElementById("ifBlocker").style.height=(parseInt(document.getElementById("pdiv").offsetHeight)-10)+"px";
}
var drawCount=0;
function pickIcon(tid){
if(tIcons[tid]){
return getIconObject(tIcons[tid]);
}
var _39=document.getElementById("selMoreTopsIntr");
var _3a=_39.options.length;
var _3b="";
for(d=0;d<_3a;d++){
_3b=_39.options[d].value.split(",")[0];
if(_3b==tid){
return getIconObject(_39.options[d].value.split(",")[1]);
}
}
_39=document.getElementById("selMoreTopsBrnd");
_3a=_39.options.length;
_3b="";
for(d=0;d<_3a;d++){
_3b=_39.options[d].value.split(",")[0];
if(_3b==tid){
return getIconObject(_39.options[d].value.split(",")[1]);
}
}
_39=document.getElementById("selMoreTopsAccm");
_3a=_39.options.length;
_3b="";
for(d=0;d<_3a;d++){
_3b=_39.options[d].value.split(",")[0];
if(_3b==tid){
return getIconObject(_39.options[d].value.split(",")[1]);
}
}
}
function pickIconSm(tid){
if(tIcons[tid]){
return getIcoSmallObject(tIcons[tid]);
}
var _3d=document.getElementById("selMoreTopsIntr");
var _3e=_3d.options.length;
var _3f="";
for(d=0;d<_3e;d++){
_3f=_3d.options[d].value.split(",")[0];
if(_3f==tid){
return getIcoSmallObject(_3d.options[d].value.split(",")[1]);
}
}
_3d=document.getElementById("selMoreTopsBrnd");
_3e=_3d.options.length;
_3f="";
for(d=0;d<_3e;d++){
_3f=_3d.options[d].value.split(",")[0];
if(_3f==tid){
return getIcoSmallObject(_3d.options[d].value.split(",")[1]);
}
}
_3d=document.getElementById("selMoreTopsAccm");
_3e=_3d.options.length;
_3f="";
for(d=0;d<_3e;d++){
_3f=_3d.options[d].value.split(",")[0];
if(_3f==tid){
return getIcoSmallObject(_3d.options[d].value.split(",")[1]);
}
}
}
function handleHttpResponse(){
if(http.readyState==4){
if(trim(http.responseText)!=""){
redoOnce=true;
wording="laces";
wording_sing="lace";
if(document.getElementById("tlist").value!=mainTopic+","){
wording="laces";
wording_sing="lace";
}
mgr.clearMarkers();
rs=http.responseText.split("^");
ct=rs[0];
if(spid!=""){
var _40=[];
useIco=icon_star;
_40.push(new GMarker(new GLatLng(parseFloat(splat),parseFloat(splng)),{title:"header=["+sptp+"] body=["+spid+"]",icon:useIco}));
mgr.addMarkers(_40,1);
if((ct==0)||(ct>maxpoints)){
ct++;
}
}
if((ct>0)&&(ct<=maxpoints)){
for(i=1;i<rs.length-1;i++){
pt=rs[i].split("::");
if(ct>200){
useIco=pickIconSm(pt[0]);
}else{
useIco=pickIcon(pt[0]);
}
if((pt[1]!="")&&(typeof (pt[1])!="undefined")){
var _40=[];
rsx=pt[1].split("~");
for(j=0,max=rsx.length;j<max;j++){
if(trim(rsx[j])!=""){
result=rsx[j].split("|");
useIcoTemp=useIco;
if((ct<=200)&&(result[3]==1)){
useIcoTemp=icon_star;
}
_40.push(new GMarker(new GLatLng(result[1],result[2]),{title:"header=["+pt[0]+"] body=["+result[0]+"]",icon:useIcoTemp}));
}
}
mgr.addMarkers(_40,1);
}
}
}
mgr.refresh();
document.getElementById("loading").style.visibility="hidden";
if(ct>maxpoints){
document.getElementById("mapstatus").innerHTML="<span class='regbold' style='padding:4px;background-color:#000000;color:#FFFFFF'><b>"+ct+" p"+wording+" on this map.</b></span>";
document.getElementById("mapstatus2").innerHTML="P"+wording+" appear when fewer than "+maxpoints+" are on the map.<br>Zoom in or refine your search.";
}else{
if(ct==0){
document.getElementById("mapstatus").innerHTML="<span class='regbold' style='padding:4px;background-color:#000000;color:#FFFFFF'><b>0 p"+wording+" on this map.</b></span>";
document.getElementById("mapstatus2").innerHTML="<div style='height:8px;'>&nbsp;</div>Zoom out or change your search to view p"+wording+".";
}else{
if(ct==1){
document.getElementById("mapstatus").innerHTML="<span class='regbold' style='padding:4px;background-color:#000000;color:#FFFFFF'><b>Done loading 1 p"+wording_sing+".</b></span>";
document.getElementById("mapstatus2").innerHTML="";
}else{
document.getElementById("mapstatus").innerHTML="<span class='regbold' style='padding:4px;background-color:#000000;color:#FFFFFF'><b>Done loading "+ct+" p"+wording+".</b></span>";
document.getElementById("mapstatus2").innerHTML="";
}
}
}
}
}
}
function trim(_41){
return _41.replace(/^\s+|\s+$/g,"");
}
function center_write(){
var _42=document.getElementById("centerMark");
var _43=document.getElementById("centerDisp");
var _44=document.getElementById("centerDisp2");
var _45=map.getCenter();
if(_42.style.visibility=="visible"){
_43.innerHTML="<a href='javascript:center_toggle();'><u>Hide map center marker</u></a>";
}else{
_43.innerHTML="<a href='javascript:center_toggle();'><u>Mark the map's center</u></a>";
}
_44.innerHTML="Map center coordinates: "+round(_45.lat(),5)+", "+round(_45.lng(),5);
var SW=map.getBounds().getSouthWest();
var NE=map.getBounds().getNorthEast();
var NW=new GLatLng(NE.lat(),SW.lng());
var _49=NE.distanceFrom(NW);
var _4a=_49/1600;
if(_4a>1){
_4a=_4a.toFixed(0);
}else{
_4a=_4a.toFixed(1);
}
if(map.getZoom()>2){
document.getElementById("widthDisp").innerHTML="Map Width = "+_4a+" mi.";
}else{
document.getElementById("widthDisp").innerHTML="";
}
mmZC(map.getZoom());
}
function round(_4b,X){
X=(!X?2:X);
return Math.round(_4b*Math.pow(10,X))/Math.pow(10,X);
}
function center_toggle(){
var _4d=document.getElementById("centerMark");
var _4e=document.getElementById("centerDisp");
if(_4d.style.visibility=="visible"){
_4d.style.visibility="hidden";
center_write();
}else{
_4d.style.visibility="visible";
center_write();
}
}
function addCommas(_4f){
_4f+="";
x=_4f.split(".");
x1=x[0];
x2=x.length>1?"."+x[1]:"";
var rgx=/(\d+)(\d{3})/;
while(rgx.test(x1)){
x1=x1.replace(rgx,"$1"+","+"$2");
}
return x1+x2;
}
function changeInstruction(_51){
}
function do_goto(_52){
if(_52!="null"){
_52=_52.split(",");
zmto=14;
if(_52[2]<3){
zmto=14;
}else{
if(_52[2]<7){
zmto=13;
}else{
if(_52[2]<13){
zmto=12;
}else{
if(_52[2]<26){
zmto=11;
}else{
if(_52[2]<52){
zmto=10;
}else{
if(_52[2]<104){
zmto=9;
}else{
if(_52[2]<205){
zmto=8;
}else{
if(_52[2]<405){
zmto=7;
}else{
if(_52[2]<784){
zmto=6;
}else{
if(_52[2]<1463){
zmto=5;
}else{
if(_52[2]<2475){
zmto=4;
}else{
if(_52[2]<3132){
zmto=3;
}else{
zmto=2;
}
}
}
}
}
}
}
}
}
}
}
}
map.setCenter(new GLatLng(_52[0],_52[1]),zmto);
}
}
function searchGoogle(_53){
var str=_53;
str=trim(str);
var _55=str.substr(str.lastIndexOf(" "));
var _56=_55.replace("-","");
if(isNumeric(trim(_56))){
str=str.replace(_55,"");
}
document.getElementById("googleQ").value=str;
document.googleS.submit();
}
function isNumeric(_57){
var _58="0123456789.";
var _59=true;
var _5a;
for(i=0;i<_57.length&&_59==true;i++){
_5a=_57.charAt(i);
if(_58.indexOf(_5a)==-1){
_59=false;
}
}
return _59;
}
function addToBasket(_5b,_5c){
var _5d=getCookieValue("basket");
if(_5d==null){
_5d=",";
}
if(_5d.search(","+_5b+",")>-1){
alert("This place is already in your basket.");
}else{
setCookieValue("basket",_5d+_5b+",");
writeBasket();
forceFade();
document.getElementById("bsktMSG").innerHTML="<b>"+_5c+"</b><br />has been added to your basket.<br />Scroll down to view the contents of your basket.";
document.getElementById("bsktMSG").style.visibility="visible";
window.setTimeout("document.getElementById('bsktMSG').style.visibility='hidden';",2000);
}
}
function emptyBasket(){
var okD=confirm("Are you sure you want to empty the basket?");
if(okD){
destroyCookie("basket");
writeBasket();
}
}
function removeFromBasket(_5f){
var okD=confirm("Are you sure you want to remove this place from your basket?");
if(okD){
var _61=getCookieValue("basket");
if(_61==null){
_61=",";
}
if(_61.search(","+_5f+",")>-1){
_61=_61.replace(","+_5f+",",",");
setCookieValue("basket",_61);
writeBasket();
}
}
}
function writeBasket(){
var _62=getCookieValue("basket");
if(_62==null){
_62=",";
}
if(_62!=","){
http4.open("GET","mm2ajax.php?bskt="+_62+"&thm="+themeId,true);
http4.onreadystatechange=writeBasketResponse;
http4.send(null);
}else{
document.getElementById("basketDisplay").innerHTML="<div style='padding-bottom:12px;color:#666666;' class='reg'>Your basket is empty.</div>";
}
}
function writeBasketResponse(){
if(http4.readyState==4){
if(http4.responseText!=""){
var _63=http4.responseText;
_63=_63.split("~#~");
var _64="";
var _65=0;
for(bi=0,max=_63.length-1;bi<max;bi++){
var _66=_63[bi];
if(trim(_66)!=""){
_66=_66.split("|");
_64+="<div style='background-color:white;border:1px solid silver;margin-bottom:4px;line-height:12px;padding:2px;padding-bottom:4px;'>";
_64+="<a href='http://find.mapmuse.com/re1/mm2launch.php?idf="+_66[0]+"&tpc="+_66[15]+"&thm="+themeId+"&agt="+agt+"' target='popwin'>"+_66[16]+":<br />";
_64+="<b>"+_66[1]+"</a></b><br />";
if(_66[2]!=""){
_64+=_66[2]+"<br />";
}
if(_66[3]!=""){
_64+=_66[3]+"<br />";
}
_64+="<span class='microtext'>";
_64+="<a style='text-decoration:underline;' href='javascript:zoomToBasket("+_66[13]+","+_66[14]+",\""+_66[15]+"\",\""+_66[16]+"\",\""+_66[17]+"\");'>Zoom To</a> | ";
_64+="<a style='text-decoration:underline;' href='http://directions.mapmuse.com/re1/mm2directions.php?destId="+_66[0]+"&destTable="+_66[15]+"' target='_blank'>Directions</a> | ";
_64+="<a style='text-decoration:underline;' href='javascript:removeFromBasket(\""+_66[15]+"~"+_66[0]+"\");'>Remove</a>";
_64+="</span><br />";
_64+="</div>";
_65++;
}
}
if(_65==1){
_64="<div style='padding-bottom:12px;color:#666666;' class='reg'>There is 1 place in your basket:</div>"+_64;
}else{
_64="<div style='padding-bottom:12px;color:#666666;' class='reg'>There are "+_65+" places in your basket:</div>"+_64;
}
document.getElementById("basketDisplay").innerHTML=_64;
}
}
}
function zoomToBasket(_67,_68,_69,_6a,_6b){
topicIsOn=false;
if(document.forms.frmLegend.chkTopic){
chks=document.forms.frmLegend.chkTopic;
for(s=0;s<chks.length;s++){
if(chks[s].value==_69){
if(chks[s].checked){
topicIsOn=true;
}else{
chks[s].checked=true;
topicIsOn=true;
makeSearchString();
}
}
}
}
if(topicIsOn==false){
cTopics_add(_69+","+_6b,_6a);
}
map.setCenter(new GLatLng(parseFloat(_67),parseFloat(_68)),parseInt(16));
window.scrollTo(0,400);
}
function directionsToBasket(){
var _6c=document.getElementById("bsktStartAddr").value;
if((_6c=="")||(_6c=="Get Directions: Starting Address")){
alert("Please enter a starting address to get directions to the places in your basket.");
}else{
var _6d=getCookieValue("basket");
if(_6d==null){
_6d=",";
}
if(_6d!=","){
var _6e="http://directions.mapmuse.com/re1/mm2routePlanner.php?basket="+_6d+"&theme="+themeId+"&point0="+_6c;
window.open(_6e);
}else{
alert("Your basket is empty.");
}
}
}
function Cookie(_6f){
this.neverExpire=Cookie.arguments.length>0?(testBoolean=new Boolean(_6f)?_6f:false):false;
this.hasCookie=hasCookie;
this.getNeverExpire=getNeverExpire;
this.setNeverExpire=setNeverExpire;
this.getCookieNames=getCookieNames;
this.destroyCookie=destroyCookie;
this.destroyAllCookie=destroyAllCookie;
this.setCookieValue=setCookieValue;
this.getCookieValue=getCookieValue;
this.getAllCookieValue=getAllCookieValue;
}
function getNeverExpire(){
return this.neverExpire;
}
function setNeverExpire(_70){
this.neverExpire=Cookie.arguments.length>0?(testBoolean=new Boolean(_70)?_70:false):false;
}
function hasCookie(_71){
if(hasCookie.arguments.length==0){
return document.cookie.length>0;
}else{
return (document.cookie.length>0&&document.cookie.indexOf(_71+"=")>=0);
}
}
function getCookieNames(){
if(hasCookie()){
var _72=document.cookie.toString().split(";");
}
for(i=0;i<_72.length;i++){
_72[i]=_72[i].substring(0,(_72[i].indexOf("=")>=0?_72[i].indexOf("="):_72.length));
}
return _72;
}
function destroyCookie(_73){
expDate=new Date();
expDate.setTime(expDate.getTime()-1);
document.cookie=_73+"=null; expires="+expDate.toGMTString();
}
function destroyAllCookie(){
if(hasCookie()){
var _74=getCookieNames();
for(i=0;i<_74.length;i++){
destroyCookie(_74[i]);
}
}
}
function setCookieValue(_75,_76){
expDate=new Date();
expDate.setTime(expDate.getTime()+(365*24*60*60*1000));
document.cookie=_75+" = "+escape(_76)+" ;expires="+expDate.toGMTString();
}
function getCookieValue(_77){
if(hasCookie(_77)){
var _78=document.cookie.indexOf(_77+"=")+_77.length+1;
var end=document.cookie.indexOf(";",_78)>0?(document.cookie.indexOf(";",_78)):document.cookie.length;
if(this.neverExpire){
setCookieValue(_77,unescape(document.cookie.substring(_78,end)));
}
return unescape(document.cookie.substring(_78,end));
}else{
return null;
}
}
function getAllCookieValue(){
var _7a;
if(hasCookie()){
_7a=new Array();
var _7b=getCookieNames();
for(i=0;i<_7b.length;i++){
_7a[i]=new Array(_7b[i],getCookieValue(_7b[i]));
}
}
return _7a;
}
function prepBrandId(bid){
bid=bid.replace(/_/g,"-");
bid=bid.toLowerCase();
return bid;
}
function prepPlaceName(pn){
pn=pn.replace(/ /g,"-");
pn=pn.replace(/'/g,"");
pn=pn.toLowerCase();
return pn;
}
var myPano;
var panoClient;
function initPano(){
myPano=new GStreetviewPanorama(document.getElementById("pano"));
panoClient=new GStreetviewClient();
GEvent.addListener(myPano,"error",handleNoFlash);
}
function showPano(_7e,_7f){
var _80=new GLatLng(parseFloat(_7e),parseFloat(_7f));
myPano.setLocationAndPOV(_80);
document.getElementById("pwrp").style.visibility="visible";
}
function hidePano(){
if(document.getElementById("pano")){
document.getElementById("pwrp").style.visibility="hidden";
document.getElementById("pano").innerHTML="";
}
}
function checkPano(_81,_82,_83){
panoClient.getNearestPanorama(new GLatLng(parseFloat(_81),parseFloat(_82)),function(_84){
if(_84.code!=200){
return;
}else{
if(document.getElementById(_83)){
document.getElementById(_83).innerHTML="&nbsp;<img src='http://image1.mapmuse.com/images/all/dweller_bullet.png'><a href='javascript:showPano("+_81+","+_82+");' style='text-decoration:underline'>See Street View</a><br />";
}
}
});
}
function checkPanoClick(_85,_86){
panoClient.getNearestPanorama(new GLatLng(parseFloat(_85),parseFloat(_86)),function(_87){
if(_87.code!=200){
return;
}else{
showPano(_85,_86);
}
});
}
var panoOn=false;
var svOverlay=new GStreetviewOverlay();
function togglePano(){
pt=document.getElementById("panoToggler");
if(panoOn){
map.removeOverlay(svOverlay);
pt.style.backgroundColor="#FFFFFF";
pt.style.color="#000000";
pt.innerHTML="Show<br>Street<br>View";
panoOn=false;
}else{
map.addOverlay(svOverlay);
pt.style.backgroundColor="#0000FF";
pt.style.color="#FFFFFF";
pt.innerHTML="Hide<br>Street<br>View";
panoOn=true;
}
}
function handleNoFlash(_88){
if(_88==603){
alert("Error: Street View requires latest Flash plug-in for your browser.");
hidePano();
return;
}else{
if(_88==600){
alert("Street View data is unavailable in this area.");
hidePano();
return;
}else{
alert("Error: Street View is unavailable.");
hidePano();
return;
}
}
}


