﻿var ep="<table cellspacing='0' cellpadding='4' style='width:100%;border:solid 1px black; background-color:yellow;'><tr><td style='width:100%;color:white;background-color:black' align='center'>"+"<b>Phonebook Search</b>"+"</td></tr></table>"+"<br />"+"Find<br />"+"<input id='localText' type='textbox' style='width:95%' /> "+"<br /><br />"+"Search Type<br /><select id='searchType' title='Select Search Type' style='font-size:12px; font-family:Arial'>"+"<option value='0'>Any</option>"+"<option value='1'>Business</option>"+"<option value='2'>Residential (US/Can Only)</option>"+"</select>"+"<br /><br />"+"Search Radius<br /><input id='radiusText' type='textbox' style='width:50px' value='0' />  "+"<select id='radiusUnits' title='Select Search Distance Units' style='font-size:12px; font-family:Arial'><option value='0'>Miles</option><option value='1'>KM</option></select>"+"<br /><br />"+"Quick Searches :<br />"+"&#8226; <a href='javascript:mc_find(\"restaurant\")'>Restaurant</a> "+"&#8226; <a href='javascript:mc_find(\"takeaway\")'>Takeaway</a> "+"&#8226; <a href='javascript:mc_find(\"takeaway\")'>Cafe</a> "+"&#8226; <a href='javascript:mc_find(\"cinema\")'>Cinema</a> "+"&#8226; <a href='javascript:mc_find(\"theatre\")'>Theatre</a> "+"&#8226; <a href='javascript:mc_find(\"bar\")'>Bar</a> "+"&#8226; <a href='javascript:mc_find(\"taxi\")'>Taxi</a> "+"&#8226; <a href='javascript:mc_find(\"car hire\")'>Car Hire</a> "+"&#8226; <a href='javascript:mc_find(\"internet cafe\")'>Internet Cafe</a> "+"<br /><br />"+"<table style='width:100%'><tr><td style='width:100%' align='center'>"+"<input onclick='mc_find()' id='searchbutton' type='button' style='width:50px' value='Find' />"+"</tr></tr></table>"+"<br /><br /><br />"+"<b>Local Search supports the following countries:</b><br />"+"United States, United Kingdom, Canada, Australia, France, Italy"+"<br /><br />"+"<table style='width:100%'><tr><td style='width:100%' align='center'>"+"Search powered by <b>Microsoft Live</b><br /><br />"+"</tr></tr></table>";function dD(){this.I=null;this.F="";this.bn=99;this.cc="";this.iH="";this.I=null;this.ai=0.0;};dD.prototype.df=function(a){var bI=false;this.I=new GLatLng(a.y,a.x);if(a.n){this.F=a.n;}if(a.a){this.cc=a.a;}if(a.t){this.iH=a.t;}var aw=this.I.distanceFrom(Q)+99;var bc=parseInt(aw/100);this.ai=bc/10;if(aE==0||this.ai<=aE){bI=true;}return bI;};dD.prototype.cf=function(ac,i){var ix=i+1;var gg=((i%2)==0)?"yellow":"ivory";var g="<div style='padding:4px;color:black;background-color:"+gg+"' onmouseover='showSearchTip("+i+")' onmouseout='hideSearchTip("+i+")' >";if(ac){g+="<font style='color:white;background-color:black'>&nbsp;"+ix+"&nbsp;</font> ";}if(ac){g+="<a href='javascript:viewResult("+i+")' style='text-decoration:underline;color:black' title=\"view "+this.F+" on map\" >"+this.F+"</a>";}else{g+="<b>"+this.F+"</b>";}g+="<br /><div style='padding-left:24px'>"+this.cc+"<br />"+"<font style='color:green'>Tel: "+this.iH+"</font>";g+="<br /><font style='color:red'><b>Distance:</b> "+cw(this.ai)+"</font>";if(!ac){g+=bb("");}g+="</div></div>";return g;};dD.prototype.M=function(){hideSearchTip();var g="<div style='width:240px' > "+this.cf(false,0)+""+"</div><br />";this.K.openInfoWindowHtml(g);};dD.prototype.ay=function(){var cZ=6;var cR=20;var aH=12;var az=20;var bD=6;var bB=0;this.T=mcX.markerPath+"purple.png";var aa=mcX.markerPath+"shadow.png";var C=new GIcon();C.image=this.T;C.iconSize=new GSize(aH,az);C.shadow=aa;C.shadowSize=new GSize(22,20);C.printImage=this.T;C.mozPrintImage=this.T;C.iconAnchor=new GPoint(cZ,cR);C.infoWindowAnchor=new GPoint(bD,bB);C.infoShadowAnchor=new GPoint(bD,bB);var H=new GMarker(this.I,{icon:C});this.K=H;map.addOverlay(H);var o=this;GEvent.addListener(H,'click',function(){o.M();});GEvent.addListener(H,"mouseover",function(){bx(o);});GEvent.addListener(H,"mouseout",function(){aZ(o);});};function cbLS(a){var be=[];var bK=eval(a);if(bK.items){be=bK.items;}for(var i=0;i<be.length;i++){var o=new dD();if(o.df(be[i])){A.push(o);o.ay();}}var au=mcX.displaySideWidth-16;var s=A.length==1?"":"s";var g="<table cellspacing=0 cellpadding=2 style='width:"+au+"px'><tr><td><a href='javascript:vuASR()' title='View All'>"+A.length+" listing"+s+"</td></tr></table>";e("resultHeaderDiv").innerHTML=ad(g,0);vuASR();L++;e("resultProgressDiv").style.display="none";as=1;ao();};function gf(cr,ee){var gK=gK=e("localText").value;if(ee&&ee.length>0){gK=ee;}var cI=e("radiusText");var aG=parseFloat(cI.value);if(aG>0){}else{aG=0;}var by=map.getCenter();if(e("radiusUnits").selectedIndex==0){aG*=1.6093;}aE=parseFloat(aG);var kI=e("searchType").selectedIndex;A=[];var aF=eG+"searchlivej"+hR+"?x="+by.x+"&y="+by.y+"&s="+gK+"&t="+kI+"&c=cbLS";if(aG>0){aF+="&r="+aG;}var ak=new ap(aF);ak.bz();ak.bY();}