


var Airport=stack.length;stack.push({});stack[Airport].name="Airport";var CustomGetTileUrl=function(a,b){return "";};stack[Airport].m=function(){return "";};stack[Airport].am=10;stack[Airport].D=[];stack[Airport].F=1;stack[Airport].aT=function(){if(map.getZoom()<stack[Airport].am){return;}if(stack[Airport].Show==false){return;}var bounds=map.getBounds();var K=bounds.getSouthWest();var L=bounds.getNorthEast();var tall=Math.ceil(L.y-K.y);var wide=Math.ceil(L.x-K.x);var ab=[];stack[Airport].F=1;var bh=Math.floor(K.y);var be=Math.ceil(L.y);var bc=Math.floor(K.x);var bd=Math.ceil(L.x);for(var TT=bh;TT<be;TT+=stack[Airport].F){for(var WW=bc;WW<bd;WW+=stack[Airport].F){var ad=TT;var ac=WW;var ag=Math.floor(ad/stack[Airport].F);var ah=Math.floor(ac/stack[Airport].F);var bC="http://m1.hotelmapsearch.com/A/"+ag+"_"+ah+".txt";var H=false;for(var f=stack[Airport].D.length-1;f>=0;--f){if(bC==stack[Airport].D[f]){H=true;break;}}if(H==false){ab.push(bC);}}}for(var f=ab.length-1;f>=0;--f){var filelocation=ab[f];j(filelocation);stack[Airport].D.push(filelocation);}};stack[Airport].loadedPoints=[];stack[Airport].shortHtml=[];stack[Airport].M=[];stack[Airport].mm=new MarkerManager(map,{maxZoom:24});stack[Airport].IconMinZoom=11;stack[Airport].IconMaxZoom=20;stack[Airport].P=false;var aj=new GIcon();aj.image=StyleFolder+"Airport.png";aj.iconSize=new GSize(32,32);aj.iconAnchor=new GPoint(16,16);stack[Airport].Icon=aj;stack[Airport].Markers=[];stack[Airport].process_it=function(lines){var Zoom=map.getZoom();var ay=[];for(var i=0;i<lines.length;i++){if(lines[i].length>1){var parts=lines[i].split("|");var ID=(parts[0]);var lat=parseFloat(parts[1]);var lng=parseFloat(parts[2]);var bF=parts[4]+"";if(bF.length>1){bF="Annual Passengers:"+bF;}var ai=stack[Airport].M.length;var aZ='<div id = "'+ai+'"><img onClick="javascript:stack[Airport].ShowFavoriteBalloon(stack[Airport].loadedPoints,stack[Airport].M,'+"'"+ai+"'"+');" style="border: 0px none ; margin: 0px; padding: 0px; float: left; width: 53px; height: 15px; -moz-user-select: none; cursor: pointer; z-index: 10000;" src="'+StyleFolder+'MapIt.gif" alt = "Map It"/>';aZ+=parts[3]+'</div>';var mapit='<img onClick="javascript:stack[Airport].ShowFavoriteBalloon(stack[Airport].loadedPoints,stack[Airport].M,'+"'"+ai+"'"+');" style="border: 0px none ; margin: 0px; padding: 0px; float: left; width: 53px; height: 15px; -moz-user-select: none; cursor: pointer; z-index: 10000;" src="'+StyleFolder+'MapIt.gif" alt = "Map It"/>';var html1="<b> "+parts[3]+"</b><br/>"+mapit+bF;var html2="<b> "+parts[3]+"</b><br/>"+bF;var point=new GLatLng(lat,lng);var aV=stack[Airport].Icon;var marker=new GMarker(point,{icon:aV,clickable:false});ay.push(marker);stack[Airport].Markers.push(marker);stack[Airport].shortHtml.push(html1);stack[Airport].loadedPoints.push(ID+"|"+lat+"|"+lng);stack[Airport].M.push(html2);}}stack[Airport].mm.addMarkers(ay,stack[Airport].IconMinZoom,stack[Airport].IconMaxZoom);stack[Airport].mm.refresh();};stack[Airport].l=function l(DataValue){if(typeof DataValue=="undefined"){DataValue=0;}var aA=g.length-1;for(var i=0;i<aA;i++){if(DataValue<g[i]){return i;}}return aA;};stack[Airport].aI=0;stack[Airport].aJ=0;stack[Airport].upCurrentZoom=0;stack[Airport].ae=function(overlay,point){if(typeof point=="undefined"){return false;}var Q=parseFloat(point.y);var R=parseFloat(point.x);var CurrentZoom=map.getZoom();if(CurrentZoom<stack[Airport].am){return;}var C=stack[Airport].al(Q,R,CurrentZoom);if(C.length>1){map.openInfoWindowHtml(point,C);af=Airport;stack[Airport].P=false;return true;}};stack[Airport].aL=function(point){stack[Airport].P=true;stack[Airport].F=1;var ad=point.y;var ac=point.x;var ag=Math.floor(ad/stack[Airport].F);var ah=Math.floor(ac/stack[Airport].F);var bC="http://m1.hotelmapsearch.com/A/"+ag+"_"+ah+".txt";var H=false;for(var f=stack[Airport].D.length-1;f>=0;--f){if(bC==stack[Airport].D[f]){H=true;break;}}if(H==true){bC="";}if(bC!=""){j(bC);stack[Airport].D.push(bC);}};stack[Airport].bI=1;stack[Airport].bL=20;stack[Airport].T="";stack[Airport].al=function(aq,as,CurrentZoom){var iconH=10;var aU=10;var currentPPlon=ppLon[CurrentZoom];var lonBuffer=1/currentPPlon*aU;var currentPPlat=ppLon[CurrentZoom];var latBuffer=1/currentPPlat*iconH;for(var i=0;i<stack[Airport].loadedPoints.length;i++){var G=stack[Airport].loadedPoints[i];var o=G.split("|");var aB=o[0];var A=parseFloat(o[1]);var B=parseFloat(o[2]);if(aq<A+latBuffer&&aq>A-latBuffer&&as<B+lonBuffer&&as>B-lonBuffer){if(stack[Airport].T==""){return stack[Airport].M[i];}else{if(stack[Airport].T==aB){stack[Airport].T="";return stack[Airport].M[i];}}}}return " ";};stack[Airport].I=[];stack[Airport].V=[];stack[Airport].J=new MarkerManager(map,{maxZoom:24});stack[Airport].U=new GIcon();stack[Airport].U.image=StyleFolder+"favorite.png";stack[Airport].U.iconSize=new GSize(32,32);stack[Airport].U.iconAnchor=new GPoint(30,30);stack[Airport].AddFavorite=function(O){stack[Airport].I.push(stack[Airport].shortHtml[O]);document.getElementById('HotelList').innerHTML=stack[Airport].I.join(" ");var G=stack[Airport].loadedPoints[O];var o=G.split("|");var A=parseFloat(o[1]);var B=parseFloat(o[2]);var testpoint=new GLatLng(A,B);var marker=new GMarker(testpoint,{icon:stack[Airport].U,clickable:false});stack[Airport].V.push(marker);stack[Airport].J.clearMarkers();var tempArray=stack[Airport].V;stack[Airport].J.addMarkers(tempArray,2,20);stack[Airport].J.refresh();};stack[Airport].RemoveFavorite=function(ID,sender){var listLength=stack[Airport].I.length;for(var i=0;i<listLength;i++){var txt=stack[Airport].I[i];if(txt.indexOf(ID,0)>0){stack[Airport].I.splice(i,1);stack[Airport].V.splice(i,1);break;}}stack[Airport].J.clearMarkers();stack[Airport].J.addMarkers(stack[Airport].V,1,20);stack[Airport].J.refresh();document.getElementById('HotelList').innerHTML=stack[Airport].I.join(" ");};stack[Airport].ShowFavoriteBalloon=function(aQ,htmlArray,O){var C=htmlArray[O];var G=aQ[O];var o=G.split("|");var A=parseFloat(o[1]);var B=parseFloat(o[2]);var testpoint=new GLatLng(A,B);if(C.length>1){map.openInfoWindowHtml(testpoint,C);af=Airport;}};stack[Airport].List=new aa(200,200,null,null,true,null);stack[Airport].ListDataInView=function(){stack[Airport].List.bp('<div style="background:white">'+stack[Airport].GetDataInView(stack[Airport].loadedPoints,stack[Airport].shortHtml)+'</div>');stack[Airport].List.SetMainWidth(250);stack[Airport].List.SetHandleWidth(240);stack[Airport].List.bM(true);stack[Airport].List.bv(400);stack[Airport].List.bo("Airports in View");stack[Airport].List.Show();};stack[Airport].GetDataInView=function(myPoints,at){var bounds=map.getBounds();var K=bounds.getSouthWest();var L=bounds.getNorthEast();var ar=[];for(var i=0;i<at.length;i++){var G=myPoints[i];var o=G.split("|");var aB=o[0];var A=parseFloat(o[1]);var B=parseFloat(o[2]);if(A>K.y&&A<L.y&&B>K.x&&B<L.x){ar.push(at[i]);}}return ar.join("<br />");};stack[Airport].bz=function(aP,ao,an){stack[Airport].P=true;stack[Airport].T=aP;var Q=parseFloat(ao);var R=parseFloat(an);var CurrentZoom=map.getZoom();stack[Airport].aI=Q;stack[Airport].aJ=R;stack[Airport].upCurrentZoom=CurrentZoom;var aw=new GLatLng(ao,an);stack[Airport].aL(aw);var C=stack[Airport].al(Q,R,CurrentZoom);if(C.length>1){map.openInfoWindowHtml(aw,C);stack[Airport].P=false;af=Airport;}};stack[Airport].Show=false;stack[Airport].bm=function(caller){if(stack[Airport].Show==false){stack[Airport].Show=true;document.getElementById("AirportWrapper").style.backgroundColor="rgb(167,204,149)";document.getElementById("AirportCheckBox").checked=true;if(stack[Airport].Markers.length>0){stack[Airport].mm.addMarkers(stack[Airport].Markers,stack[Airport].IconMinZoom,stack[Airport].IconMaxZoom);stack[Airport].mm.refresh();}stack[Airport].aT();if(map.getZoom()<stack[Airport].IconMinZoom){alert("Zoom in to view Airports.");}}else{stack[Airport].mm.clearMarkers();stack[Airport].Show=false;document.getElementById("AirportWrapper").style.backgroundColor="White";document.getElementById("AirportCheckBox").checked=false;}};increaseWidth('startupProgress',20);