var MM_contentVersion = 6; var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0; if ( plugin ) { var words = navigator.plugins["Shockwave Flash"].description.split(" "); for (var i = 0; i < words.length; ++i) { if (isNaN(parseInt(words[i]))) continue; var MM_PluginVersion = words[i]; } var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion; } else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.appVersion.indexOf("Win") != -1)) { document.write(' \n'); //FS hide this from IE4.5 Mac by splitting the tag document.write('on error resume next \n'); document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n'); document.write(' \n'); } //--> browserVerOK = false;/** * SWFObject v1.4.2: Flash Player detection and embed - http://blog.deconcept.com/swfobject/ * * SWFObject is (c) 2006 Geoff Stearns and is released under the MIT License: * http://www.opensource.org/licenses/mit-license.php * * **SWFObject is the SWF embed script formerly known as FlashObject. The name was changed for * legal reasons. */ if(typeof deconcept=="undefined"){var deconcept=new Object();} if(typeof deconcept.util=="undefined"){deconcept.util=new Object();} if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();} deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){ if(!document.getElementById){return;} this.DETECT_KEY=_b?_b:"detectflash"; this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY); this.params=new Object(); this.variables=new Object(); this.attributes=new Array(); if(_1){this.setAttribute("swf",_1);} if(id){this.setAttribute("id",id);} if(w){this.setAttribute("width",w);} if(h){this.setAttribute("height",h);} if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));} this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion(); if(c){this.addParam("bgcolor",c);} var q=_8?_8:"high"; this.addParam("quality",q); this.setAttribute("useExpressInstall",_7); this.setAttribute("doExpressInstall",false); var _d=(_9)?_9:window.location; this.setAttribute("xiRedirectUrl",_d); this.setAttribute("redirectUrl",""); if(_a){this.setAttribute("redirectUrl",_a);}}; deconcept.SWFObject.prototype={setAttribute:function(_e,_f){ this.attributes[_e]=_f; },getAttribute:function(_10){ return this.attributes[_10]; },addParam:function(_11,_12){ this.params[_11]=_12; },getParams:function(){ return this.params; },addVariable:function(_13,_14){ this.variables[_13]=_14; },getVariable:function(_15){ return this.variables[_15]; },getVariables:function(){ return this.variables; },getVariablePairs:function(){ var _16=new Array(); var key; var _18=this.getVariables(); for(key in _18){_16.push(key+"="+_18[key]);} return _16; },getSWFHTML:function(){ var _19=""; if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){ if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");} _19="0){_19+="flashvars=\""+_1c+"\"";} _19+="/>"; }else{if(this.getAttribute("doExpressInstall")){ this.addVariable("MMplayerType","ActiveX");} _19=""; _19+=""; var _1d=this.getParams(); for(var key in _1d){_19+="";} var _1f=this.getVariablePairs().join("&"); if(_1f.length>0){_19+="";} _19+="";} return _19; },write:function(_20){ if(this.getAttribute("useExpressInstall")){ var _21=new deconcept.PlayerVersion([6,0,65]); if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){ this.setAttribute("doExpressInstall",true); this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl"))); document.title=document.title.slice(0,47)+" - Flash Player Installation"; this.addVariable("MMdoctitle",document.title);}} if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){ var n=(typeof _20=="string")?document.getElementById(_20):_20; n.innerHTML=this.getSWFHTML(); return true; }else{ if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}} return false;}}; deconcept.SWFObjectUtil.getPlayerVersion=function(){ var _23=new deconcept.PlayerVersion([0,0,0]); if(navigator.plugins&&navigator.mimeTypes.length){ var x=navigator.plugins["Shockwave Flash"]; if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));} }else{ try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");} catch(e){try{ var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"); _23=new deconcept.PlayerVersion([6,0,21]); axo.AllowScriptAccess="always";} catch(e){ if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");} catch(e){}} if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}} return _23;}; deconcept.PlayerVersion=function(_27){ this.major=_27[0]!=null?parseInt(_27[0]):0; this.minor=_27[1]!=null?parseInt(_27[1]):0; this.rev=_27[2]!=null?parseInt(_27[2]):0; }; deconcept.PlayerVersion.prototype.versionIsValid=function(fv){ if(this.majorfv.major){return true;} if(this.minorfv.minor){return true;} if(this.rev<\/script>'); var debug = false; var wait_interval = undefined; var oldX = 0; var oldY = 0; var movieName = "FMapa"; data_initiated = false; listeners_initiated = false; var startPopup = false; var groupClicked = false; var agentid="ianrevell"; var version = deconcept.SWFObjectUtil.getPlayerVersion(); if (document.getElementById && (version['major'] > 0)) { flashVer = version['major']; } data =escape ('
'); data+=escape ('
'); data+=escape('');data+=escape ('
'); try { var fmapholder = document.getElementById("mapholder"); fmapholder.innerHTML = unescape(data); } catch (e) { alert('Failed to find the mapholder'); } String.prototype.pad = function(l, s, t){ //v1.0 return s || (s = " "), (l -= this.length) > 0 ? (s = new Array(Math.ceil(l / s.length) + 1).join(s)).substr(0, t = !t ? l : t == 1 ? 0 : Math.ceil(l / 2)) + this + s.substr(0, l - t) : this; }; function thisMovie(movieName) { // IE and Netscape refer to the movie object differently. // This function returns the appropriate syntax depending on the browser. return document.getElementById(movieName); if (navigator.appName.indexOf ("Microsoft") !=-1) { return window[movieName]; } else { return document[movieName]; } } function getFlashMovieObject(movieName) { if (window.document[movieName]) { return window.document[movieName]; } if (navigator.appName.indexOf("Microsoft Internet")==-1) { if (document.embeds && document.embeds[movieName]) return document.embeds[movieName]; } else // if (navigator.appName.indexOf("Microsoft Internet")!=-1) { return document.getElementById(movieName); } } // Checks if movie is completely loaded. // Returns true if yes, false if no. function movieIsLoaded (theMovie) { // First make sure the movie's defined. if (typeof(theMovie) != "undefined") { // If it is, check how much of it is loaded. return theMovie.PercentLoaded() == 100; } else { // If the movie isn't defined, it's not loaded. return false; } } function doPassVar(args){ if (movieIsLoaded(thisMovie(movieName))) { thisMovie('FMapa').SetVariable("/mtarget:caption", args); } } function setListeners() { if (!listeners_initiated) { listeners_initiated = true; GEvent.addListener(map, "move", move); GEvent.addListener(map, "zoom", zoom); GEvent.addListener(map, "moveend", onMoveEnd); GEvent.addListener(map, "movestart", onMoveStart); } } function init() { initWhami(); } function initMap() { if (!(typeof wait_interval=='undefined')) { if ((typeof map!='undefined')) { clearInterval(wait_interval); InitFlash(); } } else { if (GBrowserIsCompatible()) { map = new GMap2(document.getElementById("mapdiv")); //map.centerAndZoom(new GPoint(52.647122015152,0.683318151515), 10); map.setCenter(new GLatLng(52.647122015152,0.683318151515), 10); var pCenter=map.getCurrentMapType().getProjection().fromLatLngToPixel(map.getCenter(),map.getZoom()); oldX = pCenter.x; oldY = pCenter.y; var view = map.getBounds(); wait_interval = setInterval('initMap()', 1000); } } } //load google script and wait for it function initWhami() { g_intervalID = setInterval('a()', 3000); if (typeof GLog=='undefined') { if (typeof g_intervalID=='undefined') g_intervalID = setInterval('a()', 3000); } else { initMap(); try { clearInterval(g_intervalID); } catch(e) { } } } function InitFlash(args) { //check if map is loaded if (typeof map=='undefined') return; //check if it hasn't been called already by js when flash is calling it //if (data_initiated) return; //check if flash is loaded isFLoaded = true; thisMovie('FMapa').TCurrentFrame("/mtarget"); try { var aFrameNo = thisMovie('FMapa').TCurrentFrame("/mtarget"); isFLoaded = (aFrameNo==1); } catch(e) { isFLoaded = false; } // map initialised, flash is loaded but it has not reached frame 2 (first frame is the preloader animation) if (!isFLoaded) { //g_intervalID = setInterval('initMap()', 1000); return; } else { try { clearInterval(g_intervalID); } catch(e) { } } setListeners(); var pCenter=map.getCurrentMapType().getProjection().fromLatLngToPixel(map.getCenter(),map.getZoom()); //var view = map.getBoundsLatLng(); //minX = view.minX; //minY = view.minY; //maxX = view.maxX;; //maxY = view.maxY;; // pece, probably wrong - to be checked var bounds = map.getBounds(); var min = bounds.getSouthWest(); var max = bounds.getNorthEast(); minX = min.lng(); minY = min.lat(); maxX = max.lng(); maxY = max.lat(); var mapSize = map.getSize(); px = mapSize.width/(maxX-minX); if (thisMovie('FMapa')===null) return; thisMovie('FMapa').SetVariable("/mtarget:minX", minX); thisMovie('FMapa').SetVariable("/mtarget:minY", minY); thisMovie('FMapa').SetVariable("/mtarget:maxX", maxX); thisMovie('FMapa').SetVariable("/mtarget:maxY", maxY); //px = map.getCurrentMapType().pixelsPerLonDegree[map.getZoom()]; thisMovie('FMapa').SetVariable("/mtarget:px", px); thisMovie('FMapa').SetVariable("/mtarget:currentzoom", map.getZoom()); thisMovie('FMapa').SetVariable("/mtarget:gmapax", pCenter.x); thisMovie('FMapa').SetVariable("/mtarget:gmapay", pCenter.y); if (!data_initiated) { //try { if (thisMovie('FMapa')) { thisMovie('FMapa').TCallFrame("/mtarget/functions",2); } data_initiated = true; trace('initflash2 flash'); //} catch (e) { //} } } function doZoom(level) { map.setZoom(parseInt(level)); //data_initiated = false; InitFlash(); thisMovie('FMapa').TCallFrame("/mtarget/functions",3); } function zoom(oldZoomLevel, newZoomLevel) { thisMovie('FMapa').SetVariable("/mtarget:currentzoom", newZoomLevel); // InitFlash(); } function onGroupClick(lat,lng) { level = map.getZoom()+1; if (level>17) return; //map.centerAndZoom(new GPoint(lng, lat), level); map.setCenter(new GLatLng(lat,lng), level); //data_initiated = false; InitFlash(); thisMovie('FMapa').TCallFrame("/mtarget/functions",3); } function onGroupClickCallBack() { level = map.getZoom()-1; //alert(level); map.centerAndZoom(map.getCenterLatLng(), level) window.setTimeout(function() { map.centerAndZoom(map.getCenterLatLng(), level) data_initiated = false; InitFlash(); thisMovie('FMapa').TCallFrame("/mtarget/functions",3); }, 2000); } function MoveMap(dx,dy) { //p = map.getCenterLatLng(); //p.x+=parseFloat(dx); //p.y+=parseFloat(dy); //map.recenterOrPanToLatLng(p); trace('pan'+dx+':'+dy); map.panBy(new GSize(dx,dy)); } function move() { var pCenter=map.getCurrentMapType().getProjection().fromLatLngToPixel(map.getCenter(),map.getZoom()); var deltaX = oldX - pCenter.x; oldX = pCenter.x; var deltaY = oldY - pCenter.y; oldY = pCenter.y; thisMovie('FMapa').SetVariable("/mtarget:deltaX", deltaX); thisMovie('FMapa').SetVariable("/mtarget:deltaY", deltaY); thisMovie('FMapa').SetVariable("/mtarget:gmapax", pCenter.x); thisMovie('FMapa').SetVariable("/mtarget:gmapay", pCenter.y); FMove(deltaX,deltaY); } function FMove(x,y) { thisMovie('FMapa').TCallFrame("/mtarget/functions",1); } function onMoveEnd() { trace('onMoveEnd'); if (startPopup) { startPopup = false; thisMovie('FMapa').TCallFrame("/mtarget/functions",4); } if (groupClicked) { groupClicked = false; onGroupClickCallBack(); } thisMovie('FMapa').TCallFrame("/mtarget/functions",6); } function onMoveStart() { trace('onMoveStart'); thisMovie('FMapa').TCallFrame("/mtarget/functions",5); } var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1; function FMapa_DoFSCommand(command, args) { var FMapaObj = thisMovie('FMapa'); switch (command) { case 'InitFlash':InitFlash(args);break; case 'zoom':doZoom(args);break; case 'GroupClick': arr = args.split(","); lat = parseFloat(arr[0]); lng = parseFloat(arr[1]); onGroupClick(lat,lng); break; case 'Popup': startPopup = true; var arr = args.split(","); x = parseFloat(arr[0]); y = parseFloat(arr[1]); MoveMap(x,y); break; case 'MoveMap': var arr = args.split(","); x = parseFloat(arr[0]); y = parseFloat(arr[1]); MoveMap(x,y); break; case 'Test': alert(args); break; case 'popEbrochure': popEbrochure(args); break; case 'popDetails': popDetails(args); break; case 'setMapType': setMapType(args); break; case 'trace': trace(args); break; } } function setMapType(type) { switch (type) { case '1': map.setMapType(G_NORMAL_MAP); break; case '2': map.setMapType(G_SATELLITE_MAP); break; case '3': map.setMapType(G_HYBRID_MAP); break; } } function popEbrochure(houseref) { MM_openBrWindow('http://ver2.whami.co.uk/ebrochure/get.php?agent=ianrevell&houseref='+houseref,'','width=400,height=250') } function popDetails(houseref) { MM_openBrWindow('details.php?id='+houseref,'details','location=yes,status=yes,scrollbars=yes,resizable=yes,width=900,height=600'); return false;} if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) { document.write('