var ctz=0,k,cb=0,lon,lat,map,ballon,iconballon,titleballon,txtballon,ballonground,clsballon,waiting,maplayer,vionimg,velmarc,altumarc,txtprogress,fuelmarc,timemarc,moveplanemarc,moveplanemarcletra,fle,leve,botonhelp,botonpause,botononoff,fle1,fle2,fle0,menuair,cajabusinput,traveltxt,txt1,txt2,wizard,nifty,TimeToFade=1000,RADIAN_PER_DEGREE=0.017453,DEGREE_PER_RADIAN=57.2957795,geocoder=null,isie=document.all?true:false,aeropuertosvisitados=new Array(),aeropuertosextends=new Array(),marker1,marker2,ruta=new Array(),timed=0,latdest=0,angulo=0,sumay=0,sumax=0,londest=0,airdest=-1,latori=0,lonori=0,airori=-1,topemax=0.00026,zoom=0,valorzoom=17,dir=0,point,time=70,vel=0,velaalcanzar,fuel=1,level=1,truelevel=level,tiempo=2700,loadstring="",acabodecargar=false,loadori=0,loaddest=0,run=false,motor=false,azul=true,pause=false,estrellado=false,fading=true,contadormoveplane=0,timeconmsg=45000,timesinmsg=15000,ticktodespegar=21,ticktoaterrizar=21,blkcaparuta=false,level2="&nbsp;<b style='color:#ff4500;font-size:8px'>(2)</b>",level3="&nbsp;<b style='color:#ff0000;font-size:8px'>(3)</b>",acti=false,especmsgs=9,msgn=0,msgnumber=0,indice=-1,maract=null,aersel=null,contfalses=0,shadow_icon=new GIcon(),shadow_marker,wheellock=false,contgeo=0,continf=0,aeropuertos=new Array(new Array("Atlanta",33.631577,-84.448665,0.033,0.0005,"00f0f0",0),new Array("Chicago",41.96881,-87.920861,0.037,0.0004,"f04000",0),new Array("London",51.464584,-0.482306,0.0475,0.00042,"ff2220",0.1),new Array("Tokyo",35.548502,139.761209,0.0262,0.00068,"00f700",49),new Array("Los Angeles",33.946552,-118.435131,0.035,0.0004,"003090",6),new Array("Dallas",32.878168,-97.050669,0.0006,0.0392,"500050",90),new Array("Paris",49.020403,2.513013,0.052,0.00045,"98fb98",3),new Array("Frankfurt",49.998112,8.526571,0.00052,0.035,"880088",90),new Array("Beijing",40.054999,116.600529,0.0357,0.00064,"f71010",99),new Array("Denver",39.827498,-104.660279,0.0005,0.0353,"00f040",89.2),new Array("Las Vegas",36.076132,-115.163133,0.038,0.00044,"00a5a8",0.1),new Array("Amsterdam",52.305487,4.738026,0.00066,0.028,"00ccff",84.7),new Array("Madrid",40.494947,-3.57428,0.0007,0.037,"ffcc00",90.4),new Array("Hong Kong",22.296383,113.899341,0.00054,0.0345,"f03310",18),new Array("Bangkok",13.671112,100.735075,0.00055,0.0345,"43f745",76),new Array("Houston",29.977353,-95.334356,0.032,0.0005,"55f0f0",0),new Array("New York",40.621913,-73.78536,0.033,0.00054,"099090",52),new Array("Phoenix",33.430841,-112.027566,0.033,0.00044,"1122c2",0),new Array("Detroit",42.216759,-83.363485,0.032,0.0005,"eedd82",1),new Array("Minneapolis",44.875069,-93.234004,0.029,0.00046,"9090F0",35.5),new Array("Milan",45.616045,8.737864,0.0007,0.036,"5fc5f5",105.7),new Array("Sevilla",37.417635,-5.912275,0.034,0.00042,"fcfd50",0.5),new Array("Berlin",52.470541,13.391562,0.024,0.00044,"880033",1.1),new Array("Bilbao",43.306341,-2.925678,0.026,0.00046,"00fd50",-20),new Array("Oporto",41.232606,-8.676882,0.00054,0.033,"5f1115",105),new Array("Cannes",43.542786,6.952007,0.00053,0.0133,"0fcc00",99.5),new Array("Turin",45.188449,7.649209,0.0007,0.025,"cdb5cd",87),new Array("Zurich",47.458701,8.537203,0.00054,0.035,"fff700",-4),new Array("Athina",37.923402,23.921067,0.035,0.00054,"98fb98",47),new Array("Estambul",40.969222,28.807075,0.0005,0.027,"cd5c5c",92),new Array("Viena",48.122631,16.533222,0.00049,0.046,"00bfff",-18),new Array("Tanger",35.733219,-5.940465,0.044,0.00044,"fff700",-5.5),new Array("Moscu",55.587859,37.24641,0.0426,0.00061,"708090",12.5),new Array("Cracovia",50.075148,19.768111,0.033,0.0005,"43cd80",8),new Array("Riga",56.912224,23.969765,0.00084,0.023,"005599",80.5),new Array("Oran",35.618298,-0.636499,0.031,0.00044,"557700",18.5),new Array("La Meca",21.477022,40.52084,0.00043,0.04,"005599",14.5),new Array("Alexandria",31.177622,29.949109,0.00046,0.017,"0055ff",89.3),new Array("Tel Aviv",32.012688,34.86081,0.033,0.00044,"54ff9f",9),new Array("Minsk",53.900994,27.701801,0.00046,0.022,"4eee94",60.5),new Array("San Petersburgo",59.799728,30.217724,0.0585,0.00052,"003a3a",-8.5),new Array("Oslo",60.178132,11.109409,0.0009,0.028,"8a2be2",59.8),new Array("Dubai",25.264384,55.350087,0.0006,0.034,"5500cf",-29.6),new Array("Karachi",24.900198,67.141871,0.028,0.00048,"ff8c69",14.5),new Array("Mumbai",19.088177,72.847863,0.0335,0.0005,"550000",0.6),new Array("Tunisia",36.838948,10.223975,0.00056,0.028,"fa8072",74.2),new Array("Palermo",38.110094,13.314518,0.00048,0.011,"553333",98.5),new Array("Tripoli",32.662929,13.128909,0.0385,0.00046,"7400a3",0.75),new Array("Taranto",40.509696,17.405648,0.00058,0.0155,"4876ff",105),new Array("Zagreb",45.731715,16.05213,0.036,0.00047,"45ff00",33.3),new Array("Odessa",46.414702,30.681939,0.00065,0.027,"ff6a6a",113.5),new Array("Bagdag",33.242824,44.234846,0.0006,0.0305,"00f700",124.5),new Array("Kuwait",29.212729,47.976437,0.00042,0.0305,"ffb5c5",118),new Array("Dakar",14.726171,-17.476721,0.00046,0.032,"ff8c69",97.5),new Array("Agadir",30.382885,-9.561244,0.0315,0.00046,"773333",-6.5),new Array("Nouadhibou",20.922141,-17.03281,0.00046,0.023,"99f700",75),new Array("Katmandu",27.683818,85.353749,0.0278,0.00046,"c1ffc1",65.3),new Array("Taipei",25.069803,121.539538,0.0258,0.00048,"9b30ff",-2),new Array("Shangai",31.183554,121.337085,0.00058,0.028,"ffa500",93.1),new Array("Seul",37.568175,126.775199,0.0006,0.0325,"00f700",-38),new Array("Ulan Bator",47.852673,106.75326,0.00052,0.0315,"ccf700",-37),new Array("Vladivostok",43.203534,131.935501,0.0115,0.00042,"ff6a6a",46),new Array("Okhotsk",59.401883,143.052549,0.0007,0.0208,"00f700",64.5),new Array("Barcelona",41.294599,2.072039,0.00055,0.0295,"50f750",19),new Array("Anadyr",64.719667,177.733126,0.00105,0.033,"a1ffa1",57),new Array("Yakutsk",62.081597,129.756947,0.00075,0.031,"43cd80",32.7),new Array("Singapur",1.328722,103.984952,0.00054,0.034,"ffa54f",66.8),new Array("Medan",3.550569,98.664232,0.022,0.00046,"00f777",44),new Array("Manila",14.498332,121.001535,0.0005,0.03,"3a50cd",29.8),new Array("Jakarta",-6.142822,106.643761,0.029,0.00045,"836fff",22),new Array("Kupang",-10.174379,123.660066,0.027,0.0004,"20b2aa",13.5),new Array("Brussels",50.887313,4.491928,0.0269,0.00061,"20b200",68),new Array("Nueva Delhi",28.570323,77.088071,0.03,0.00044,"00bfff",-1.3),new Array("Chittagong",22.240658,91.80282,0.03,0.00052,"ffa07a",40),new Array("Dacca",23.854839,90.388346,0.00056,0.0285,"7a67ee",-52.3),new Array("Hyderabad",17.452735,78.458079,0.025,0.00042,"20b2aa",1),new Array("Darwin",-12.422639,130.870855,0.00044,0.0145,"f6f622",89.5),new Array("Perth",-31.95881,115.959918,0.0006,0.0285,"105705",73),new Array("Melbourne",-37.685782,144.841272,0.00057,0.0315,"ff69b4",100.5),new Array("Lisboa",38.766356,-9.143704,0.00047,0.0315,"f0b2a4",63),new Array("Canberra",-35.314841,149.194674,0.00058,0.028,"eedd82",89),new Array("Sydney",-33.943952,151.163667,0.00042,0.025,"87cefa",13),new Array("Christchurch",-43.497791,172.522382,0.00054,0.041,"b8464b",41),new Array("Magadan",59.911519,150.689646,0.062,0.0006,"8fbc8f",-1.5),new Array("Almaty",43.345459,76.879207,0.00048,0.016,"ba55d3",58.2),new Array("Lhasa",29.297557,90.891631,0.041,0.00044,"4876ff",1),new Array("Balqash",46.887211,74.991689,0.0315,0.0004,"ffc1c1",28.2),new Array("Karaganda",49.663281,73.314407,0.0385,0.00047,"8b2500",21.5),new Array("Teheran",35.694376,51.291491,0.042,0.00054,"551a8b",-16),new Array("Dushanbe",38.543538,68.806708,0.032,0.0004,"00f700",0),new Array("Urumqi",43.902384,87.452728,0.044,0.0004,"4eee94",12),new Array("Sitka",57.053277,-135.373165,0.00065,0.028,"ccff33",-29),new Array("Calgary",51.096684,-114.02107,0.00058,0.0285,"ff6a6a",90),new Array("Terrace",54.458938,-128.584832,0.0006,0.0188,"cd96cd",24.5),new Array("Vancouver",49.189613,-123.205844,0.042,0.00054,"00c7c0",-6.3),new Array("Lagos",6.572091,3.329206,0.00048,0.025,"db9a00",89.9),new Array("Abidjan",5.248663,-3.930852,0.025,0.00044,"0cf300",67.2),new Array("Bissau",11.881115,-15.658125,0.00045,0.029,"f70909",71),new Array("Palana",59.083949,159.877895,0.026,0.00055,"cc0f70",-9.4),new Array("Egvekinot",66.351892,-179.107189,0.0015,0.015,"009740",95.7),new Array("Evensk",61.913266,159.223942,0.00095,0.021,"22f722",56),new Array("Khabarovsk",48.516203,135.169913,0.0335,0.00052,"c52222",36.5),new Array("Komsomol'sk",50.594782,137.08155,0.00056,0.025,"dd3320",89),new Array("Xian",34.437854,108.740058,0.029,0.00052,"ff2722",36),new Array("Chongqing",29.706878,106.637528,0.0005,0.0295,"ff0000",70.5),new Array("Zhaotong",27.318859,103.748107,0.024,0.0005,"ff6a6a",45),new Array("Guiyang",26.52393,106.798675,0.00055,0.03,"f70909",79.7),new Array("Gansu",39.849963,98.350682,0.00055,0.029,"ffb5c5",140.9),new Array("Yinchuan",38.310114,106.384671,0.035,0.0006,"8b008b",55),new Array("Chelyabinsk",55.268169,61.283605,0.0008,0.029,"00ffff",-28),new Array("Perm",57.904312,56.002523,0.037,0.0007,"0bfbbf",27),new Array("Kotlas",61.241918,46.687217,0.00065,0.019,"ffafff",-30),new Array("Usinsk",65.994486,57.378652,0.00075,0.028,"0b0fff",135.2),new Array("Astana",51.011244,71.448973,0.04,0.00053,"00ff0c",32.2),new Array("Bydgoszcz",53.095016,17.95902,0.0345,0.00052,"fa1072",4.5),new Array("Osaka",34.631381,135.210376,0.027,0.0005,"fa8072",4.5),new Array("Nagasaki",32.907136,129.924198,0.00065,0.028,"cb00cb",136),new Array("Yamagata",38.402933,140.370201,0.0006,0.021,"fa8072",82.8),new Array("Pyongyang",39.227042,125.675976,0.0006,0.036,"7280fa",90.5),new Array("Tianjin",39.111419,117.354509,0.0007,0.0305,"dab022",121.3),new Array("Cape Town",-33.908022,18.498884,0.00044,0.0146,"ff8c00",94.4),new Array("Tennant Creek",-19.636105,134.169593,0.018,0.0004,"9400d3",15),new Array("Broome",-17.946074,122.216426,0.022,0.00044,"9400d3",-14.7),new Array("Ceduna",-32.128011,133.697755,0.018,0.00045,"5512d3",-18),new Array("Esperance",-33.680385,121.815704,0.016,0.00042,"9400d3",-17),new Array("Connellan",-23.80118,133.89324,0.023,0.00044,"00d3d3",-28),new Array("Moore",-29.506316,149.843162,0.00044,0.015,"0000d3",71.3),new Array("Illzi",26.4658,8.464268,0.015,0.0004,"00f040",9),new Array("Nyala",12.043077,24.94714,0.027,0.0005,"7000a0",48),new Array("Tamanrasset",22.796256,5.444632,0.0325,0.0005,"0040f0",66.3),new Array("Cairns",-16.892155,145.755857,0.0006,0.0288,"cc00d3",114.75),new Array("Luderitz",-26.691642,15.241701,0.00043,0.0168,"aa8c00",71.8),new Array("Windhoek",-22.613951,17.080656,0.00043,0.018,"24ac10",99.7),new Array("Upington",-28.419146,21.274467,0.0006,0.042,"538c00",119.5),new Array("Lubango",-14.927372,13.563378,0.0245,0.00044,"ff8c00",1.5),new Array("Rundu",-17.961353,19.704435,0.00045,0.032,"008c00",17.5),new Array("Malanje",-9.519677,16.303872,0.00045,0.018,"338cf0",-34),new Array("Ad Dakhla",23.705852,-15.937434,0.00045,0.029,"ff8c00",65.2),new Array("Madeira",32.689737,-16.783719,0.026,0.00045,"8cff00",40),new Array("Casablanca",33.351874,-7.582224,0.0005,0.031,"fa8ca0",109.4),new Array("Fuerteventura",28.435575,-13.866066,0.00045,0.029,"ff8c00",88),new Array("Bata",1.89863,9.799719,0.016,0.00045,"8c00ff",48),new Array("Malabo",3.745422,8.699884,0.027,0.00045,"8cff00",48),new Array("Ouagadougou",12.341616,-1.519884,0.026,0.00052,"ff8c00",56.8),new Array("Freetown",8.620478,-13.209499,0.028,0.00045,"ff8c00",-17),new Array("Zinder",13.773941,8.977107,0.017,0.0004,"ff7c50",37),new Array("Bangui",4.3881,18.522499,0.00052,0.023,"7cfc00",102.5),new Array("Kisangani",0.490677,25.324919,0.00042,0.03,"7cfc00",-35),new Array("Kananga",-5.897217,22.459563,0.021,0.00044,"7c0cdd",-17.6),new Array("Fungurume",-10.528093,26.318167,0.018,0.00042,"7cfc00",-18),new Array("Antananarivo",-18.79496,47.46406,0.0287,0.0005,"ff0000",-8.6),new Array("Nairobi",-1.327719,36.916487,0.0355,0.00046,"fff0f0",36),new Array("Liongwe",-13.779245,33.768014,0.031,0.00045,"7cfc7c",-38.7),new Array("Lusaka",-15.32934,28.434039,0.04,0.00044,"7cfc00",-5),new Array("Harare",-17.947069,31.077248,0.0395,0.00046,"fc007c",44),new Array("Atbara",17.70136,34.05457,0.021,0.00051,"770000",72),new Array("Sharm el Sheik",27.968365,34.382835,0.027,0.00045,"aa0000",44),new Array("Johanesburgo",-26.164808,28.248441,0.0006,0.031,"7cfc00",72.9),new Array("Maputo",-25.924813,32.570343,0.028,0.00042,"7cfc00",59.6),new Array("Mbabane",-26.53651,31.296707,0.0235,0.0005,"7c0016",34.2),new Array("Durban",-29.774403,31.05651,0.00042,0.01,"7cfc00",60),new Array("Bahrain",26.278731,50.619271,0.00054,0.032,"ff0000",-30),new Array("Bosaaso",11.275136,49.141298,0.03,0.0005,"0000ff",0),new Array("Port Elizabeth",-33.993211,25.601776,0.0215,0.00048,"7cfc00",28),new Array("Bloemfontein",-29.105119,26.302466,0.00047,0.022,"7cfc00",89),new Array("Arba Minch",6.028622,37.584207,0.0235,0.00042,"ff0000",57),new Array("Kimberley",-28.820133,24.765447,0.00048,0.027,"7cfc00",89.5),new Array("Ekaterimburgo",56.744566,60.781635,0.038,0.00046,"ff0050",0),new Array("Nizhniy Novgorod",56.217113,43.778012,0.0008,0.025,"664450",70.5),new Array("Novosibirsk",55.077127,82.997299,0.00105,0.03,"22ff50",64.7),new Array("Kasan",55.617261,49.256006,0.00058,0.05,"770050",-21.5),new Array("Seattle",47.431176,-122.307755,0.0006,0.029,"ff4500",89),new Array("Portland",45.582239,-122.616595,0.021,0.00051,"8968cd",36),new Array("Boston",42.357933,-71.014096,0.00055,0.0225,"00f0f0",64.4),new Array("Montreal",45.457504,-73.74113,0.029,0.00055,"00ccf0",38.2),new Array("Halifax",44.868553,-63.523936,0.023,0.0006,"cd5b45",46),new Array("Toronto",43.658108,-79.621675,0.0006,0.025,"ff6a6a",33.35),new Array("Quebec",46.782316,-71.406112,0.031,0.0004,"99f090",34.7),new Array("Dickinson",46.796049,-102.811577,0.021,0.00038,"f0f0f0",7),new Array("Milwaukee",42.931271,-87.897164,0.00062,0.025,"00cd00",81.5),new Array("St Louis",38.746519,-90.381137,0.0004,0.021,"f08080",21.2),new Array("Memphis",35.024031,-89.975297,0.0005,0.03,"dc0505",91),new Array("Tucson",32.118506,-110.957161,0.00045,0.0205,"20404f",41),new Array("San Antonio",29.523112,-98.469719,0.022,0.00044,"ffe4b5",45.1),new Array("Cincinnati",39.034503,-84.668482,0.00052,0.029,"000080",89),new Array("Washington",38.939092,-77.459536,0.0005,0.031,"4682b4",89),new Array("Philadelphia",39.8685,-75.25561,0.032,0.00044,"00bfff",11),new Array("El Paso",31.801406,-106.399707,0.033,0.00042,"8fbc8f",36.4),new Array("Orlando",28.415277,-81.32631,0.0006,0.033,"20b288",90.2),new Array("Miami",25.800432,-80.301433,0.031,0.00055,"98fb98",2.75),new Array("Cleveland",41.404461,-81.861346,0.00045,0.024,"6b8e23",32),new Array("Reno",39.486369,-119.769039,0.0005,0.0325,"eedd82",90.5),new Array("Fresno",36.783343,-119.72935,0.00042,0.028,"ff4500",-30),new Array("San Francisco",37.61005,-122.38114,0.0006,0.0199,"fa2be2",56.3),new Array("Bend",44.087945,-121.200418,0.0004,0.0143,"00f0f0",90.5),new Array("Salt Lake City",40.774988,-111.995203,0.00058,0.021,"9bcd9b",95.5),new Array("Charlotte",35.200006,-80.950573,0.00047,0.0245,"cdad00",95),new Array("Wilmington",34.261686,-77.910106,0.0235,0.00059,"2e8b57",36.3),new Array("Sto Domingo",18.41546,-69.663422,0.00056,0.031,"eedd82",110.1),new Array("Bridgetown",13.070731,-59.507017,0.029,0.00054,"eed2ee",13.5),new Array("La Habana",22.978367,-82.424744,0.0355,0.00052,"9b30ff",33.7),new Array("Kingston",17.940108,-76.799455,0.00047,0.024,"ffb5c5",-21),new Array("Cancun",21.045063,-86.89117,0.00055,0.035,"8b3e2f",-31),new Array("Guatemala",14.57036,-90.53148,0.0006,0.0245,"00aa33",71.6),new Array("Tegucigalpa",14.054599,-87.21915,0.00044,0.015,"473c8b",70),new Array("Kansas",39.281417,-94.708747,0.024,0.00054,"ffa54f",71.7),new Array("Guadalajara",20.528547,-103.327816,0.00051,0.036,"436eee",-22.4),new Array("Mexico City",19.429489,-99.086621,0.029,0.00045,"ff6a6a",29.9),new Array("Tampico",22.301897,-97.8743,0.00046,0.0235,"cdad00",-52.95),new Array("Xoxocotlán",16.987994,-96.728863,0.00046,0.0218,"28b929",72.7),new Array("Tierra Colorada",16.918429,-89.879649,0.028,0.00044,"436eee",-20),new Array("Ulaangom",49.961512,92.075354,0.0004,0.018,"00505f",59),new Array("Mimyy",62.527477,114.01695,0.046,0.00052,"1e90ff",17.5),new Array("Polyarny",66.38364,112.043424,0.002,0.041,"4eee94",124.8),new Array("Palmyra",5.885605,-162.084737,0.0158,0.00042,"ff00ff",23),new Array("Abemama",0.49146,173.824546,0.015,0.00046,"8b7b8b",-8.5),new Array("Tajima",35.507391,134.78707,0.0005,0.017,"B21212",87.2),new Array("Sapporo",42.761693,141.693206,0.00065,0.028,"00f53f",97.3),new Array("Lyon",45.711015,5.095049,0.00056,0.023,"00f0f0",95.4),new Array("Sofia",42.697549,23.395726,0.04,0.0005,"a020f0",-3.8),new Array("Bordeaux",44.818961,-0.728754,0.0325,0.00045,"ff8247",36),new Array("Roma",41.800351,12.236908,0.0005,0.033,"b4eeb4",15.6),new Array("Vigo",42.221284,-8.629396,0.00053,0.022,"00f0f0",75.8),new Array("Vicenza",45.56659,11.530055,0.0005,0.0135,"f08080",91),new Array("Lycksele",64.55672,18.700769,0.0007,0.029,"f21232",-30),new Array("Nar´yan Mar",67.638456,53.091162,0.06,0.0006,"ba55d3",2.8),new Array("Tiksi",71.684322,128.898039,0.0016,0.0275,"836fff",69.1),new Array("Menorca",39.851207,4.216561,0.00058,0.022,"ffff00",77.1),new Array("Katunayake",7.16885,79.874527,0.028,0.00045,"f000f0",50.7),new Array("Chetumal",18.507463,-88.336939,0.021,0.0005,"d02090",-16.5),new Array("San Jose del Cabo",23.138648,-109.718962,0.00052,0.029,"00f0f0",96),new Array("Reynosa",26.002053,-98.222022,0.0005,0.0195,"0000f0",132.5),new Array("Laredo",27.532472,-99.463515,0.0005,0.0215,"00f000",88),new Array("Torreon",25.568237,-103.413609,0.017,0.00044,"f00000",-0.5),new Array("Sept Iles",50.217166,-66.27871,0.0272,0.00046,"ffa54f",14),new Array("Shamattawa",55.856633,-92.082081,0.00082,0.015,"00f0f0",79),new Array("Leaf Rapids",56.507773,-99.986293,0.0009,0.0125,"97405b",79),new Array("Jamestown",46.924351,-98.686398,0.00048,0.0194,"2e8b57",35.15),new Array("Winnipeg",49.895595,-97.241396,0.00076,0.028,"ffc1c1",78),new Array("Hermosillo",29.087832,-111.062443,0.021,0.00048,"00f0f0",28.6),new Array("Lady Franklin",68.474864,-113.240494,0.032,0.00052,"0000c4",0.4),new Array("Eskimo Point",61.088965,-94.064544,0.001,0.016,"00fac0",140.8),new Array("Fort Nelson",58.831387,-122.61608,0.0275,0.00066,"B22222",18.5),new Array("Attawapiskat",52.923865,-82.438654,0.0165,0.00044,"ee82aa",27.5),new Array("Helmericks",70.428128,-150.403401,0.02,0.00055,"ba55d3",9.7),new Array("Point Lay Lrrs",69.730116,-163.024364,0.027,0.00058,"3a5fcd",7.5),new Array("Keperveem",67.846224,166.101919,0.076,0.0006,"43cd80",1.25),new Array("Huatulco",15.772839,-96.274776,0.027,0.00045,"8bb5cd",10),new Array("Panama",9.072645,-79.387164,0.00045,0.022,"cd4789",59),new Array("Bogota",4.713185,-74.152211,0.00044,0.0305,"1b3a5a",-36.5),new Array("Quito",-0.155064,-78.485883,0.0005,0.0275,"cdad00",98.3),new Array("Caracas",10.603641,-67.012696,0.0346,0.0005,"f08080",2),new Array("Georgetown",6.491732,-58.260595,0.022,0.00048,"3cb371",46.2),new Array("Boa Vista",2.84054,-60.700761,0.022,0.00044,"00bfff",28),new Array("Val de Caes",-1.390626,-48.476926,0.00044,0.017,"f0f000",85),new Array("Manaus",-3.038789,-60.061886,0.027,0.00052,"8968cd",-0.1),new Array("Tabatinga",-4.251814,-69.944705,0.00044,0.021,"330033",-24.6),new Array("Ushuaia",-54.844335,-68.317537,0.043,0.00035,"00cc50",2.4),new Array("Río Gallegos",-51.609982,-69.334073,0.043,0.00034,"80a016",2.95),new Array("C. Rivadavia",-45.787809,-67.483542,0.036,0.0005,"ff4500",7.2),new Array("Praha",50.101671,14.22648,0.045,0.00046,"f0f000",16.6),new Array("Nicosia",35.1596,33.487176,0.0005,0.029,"70f000",-18),new Array("Wynyard",-40.996958,145.723842,0.0237,0.00041,"2a20ba",-7),new Array("Tamworth",-31.071186,150.836749,0.0247,0.00041,"20baa2",-38.5),new Array("Okinawa",26.34609,127.751518,0.035,0.00055,"eedd82",36),new Array("Ho Chi Minh",10.814822,106.637249,0.031,0.00042,"ffa07a",20.8),new Array("Moron",49.66552,100.082821,0.0355,0.00038,"ff6940",-8),new Array("Kadala",52.028304,113.284911,0.039,0.00057,"4876ff",-6.7),new Array("Sabha",27.004346,14.451141,0.037,0.00045,"ff6a6a",-39.5),new Array("Azizbeyov",40.45756,50.063474,0.037,0.00056,"43cd80",90.5),new Array("Kerala",9.938216,76.274182,0.016,0.00044,"ff69b4",103),new Array("Madurai",9.83381,78.08493,0.016,0.0005,"c1ffc1",4.6),new Array("Chennai",12.983817,80.152913,0.035,0.00054,"436eee",20.7),new Array("Nagpur",21.108874,79.033982,0.03,0.00045,"9bcd9b",-51.8),new Array("Biratnagar",26.482213,87.255929,0.0157,0.0004,"db9370",-2.3),new Array("Jeju",33.500098,126.469395,0.03,0.00048,"93db70",27.3),new Array("Dandong",40.014008,124.286978,0.023,0.00062,"9370db",88.8),new Array("Changjiang",29.330435,117.168256,0.0225,0.0005,"00ff00",46.5),new Array("Meihancun",19.708092,109.716597,0.0255,0.0005,"008b00",-45.4),new Array("Jalan Kuching",1.480618,110.33653,0.021,0.00046,"ffc1c1",22),new Array("Hobart",-42.829208,147.501969,0.025,0.0005,"ff8247",-36.4),new Array("Irian Jaya Tengah",-3.926483,136.372738,0.0145,0.0004,"9370db",4),new Array("Port Moresby",-9.431001,147.213686,0.021,0.0005,"ff4500",-58.5),new Array("Merauke",-8.528085,140.421533,0.017,0.00048,"cd96cd",110),new Array("Namaka",-17.772984,177.429403,0.021,0.00046,"ff83fa",52),new Array("Hihifo",-13.238525,-176.209041,0.021,0.00046,"ff83fa",0),new Array("Lakeba",-18.194741,-178.820912,0.021,0.00046,"ff83fa",-45),new Array("Hali",27.424919,41.685723,0.025,0.00055,"ffa54f",86),new Array("Asgabat",38.000026,58.342777,0.039,0.00054,"eedd82",-23.8),new Array("Van Havaalani",38.458277,43.32289,0.026,0.0005,"9370db",47),new Array("Paphos",34.722197,32.470983,0.031,0.00048,"ffe4b5",-17),new Array("Simferopol",45.033964,33.968064,0.037,0.0006,"4682b4",71.9),new Array("Copenhague",55.60293,12.633301,0.038,0.00062,"00bfff",33),new Array("Volgograd",48.787909,44.330907,0.035,0.00056,"93000b",-21),new Array("Wau",7.725504,27.96455,0.022,0.0004,"0000db",0),new Array("Yambio",4.56311,28.421604,0.013,0.00046,"43cd80",57),new Array("Gaalkacayo",6.772187,47.444388,0.027,0.00041,"23fe60",39.95),new Array("Goiania",-16.626457,-49.231372,0.0263,0.00048,"23a270",-29.1),new Array("Gander",48.920709,-54.567236,0.028,0.00073,"40dff0",74.9),new Array("Stony Rapids",59.247639,-105.858507,0.031,0.0005,"37c770",8),new Array("Umiujaq",56.530714,-76.518981,0.018,0.0008,"43cdf0",81.5),new Array("Várzea Grande",-15.662059,-56.111518,0.021,0.0005,"43cd80",118),new Array("Puerto Montt",-41.450825,-73.094037,0.0005,0.023,"60f666",88),new Array("Miramar",-38.233663,-57.870628,0.0005,0.0167,"70f000",91.1),new Array("Buenos Aires",-34.832563,-58.525221,0.027,0.0005,"f08000",109.1),new Array("Cordoba",-31.323282,-64.207331,0.00047,0.0233,"a03340",41.5),new Array("Mendoza",-32.84435,-68.792583,0.00058,0.0275,"56f080",89.1),new Array("Santiago",-33.569219,-70.69288,0.00051,0.018,"f0f000",57),new Array("Corumba",-18.983115,-57.825615,0.0192,0.00041,"f0f000",56.7),new Array("Posadas",-27.395879,-55.97016,0.00045,0.021,"cc0c0c",90.8),new Array("New Orleans",29.984419,-90.251132,0.0195,0.00054,"4682b4",72.8),new Array("Nashville",36.103246,-86.687742,0.023,0.00051,"8fbc8f",68.2),new Array("Amarillo",35.204931,-101.732476,0.035,0.00055,"ffff00",38.6),new Array("Billings",45.812426,-108.555121,0.04,0.00044,"20b2aa",-15.3),new Array("Adrar",27.827156,-0.196076,0.028,0.00043,"ff8c00",47),new Array("Bordj Mokhtar",21.374634,0.911799,0.029,0.00045,"ff1493",10.45),new Array("Chinguetti",20.499329,-12.399393,0.016,0.00043,"ba55d3",73.5),new Array("In Salah",27.242166,2.500225,0.03,0.00045,"836fff",35),new Array("Billiluna",-19.562615,127.663103,0.024,0.0005,"c1ffc1",-17),new Array("Windarra",-28.339239,121.987159,0.029,0.0005,"aa4040",51.9),new Array("Tambov",52.814707,41.475159,0.027,0.0005,"43cd80",-51),new Array("Oryol",52.928396,35.989966,0.033,0.00045,"00cd00",26.5),new Array("Marsa Alam",25.568721,34.576099,0.029,0.00046,"cdad00",-57.7),new Array("Petrozavodsk",61.874898,34.145679,0.037,0.00065,"ff8247",49),new Array("Karavan",41.475644,71.721835,0.037,0.00046,"cd5b45",36),new Array("Baikonur",45.614101,63.193966,0.037,0.00045,"ff8c69",25.8),new Array("Visakhapatnam",17.715191,83.218494,0.017,0.00044,"8b008b",41.7),new Array("Jalgaon",20.962152,75.619808,0.017,0.00044,"ff83fa",1.2),new Array("Vijayawada",16.528589,80.788216,0.022,0.00044,"ab82ff",12),new Array("Kachin",25.33919,97.295381,0.031,0.00065,"cdb5cd",90.2),new Array("Mingaladon",16.897799,96.127086,0.037,0.00046,"8968cd",56.4),new Array("Keng Tung",21.307154,99.625535,0.037,0.00044,"cdad00",-28.3),new Array("Poso",-1.422111,120.65428,0.015,0.00046,"43cd80",57.5),new Array("Muscat",23.591425,58.266858,0.037,0.00042,"3a5fcd",5),new Array("Urgench",41.59267,60.63192,0.034,0.00057,"a05040",-41),new Array("Serakhs",36.48894,61.255773,0.022,0.0004,"4876ff",15),new Array("Staroselye",58.09924,38.916959,0.037,0.00042,"eedd82",21.5),new Array("Kajaani",64.283256,27.666789,0.046,0.00044,"20b2aa",4.8),new Array("Apatity",67.577641,33.565915,0.035,0.00065,"f08080",-7),new Array("Brasilia",-15.863816,-47.927564,0.0295,0.00052,"ccdd00",3.9),new Array("Rio de Janeiro",-22.916577,-43.162134,0.00045,0.0125,"8968cd",93.25),new Array("Salta",-24.872869,-65.489719,0.00042,0.025,"80f080",78.5),new Array("La Paz",-16.51298,-68.211027,0.034,0.00045,"c0f0c0",-2),new Array("Montevideo",-34.841898,-56.030499,0.0005,0.0216,"a0a0f0",90.5),new Array("Lima",-12.036031,-77.107131,0.0005,0.0315,"00f000",116),new Array("Cuzco",-13.534371,-71.95442,0.03,0.00042,"003dd3",-5.6),new Array("Chiclayo",-6.79871,-79.829246,0.00044,0.023,"a00104",82.9),new Array("Pucallpa",-8.389029,-74.578221,0.00044,0.023,"4876ff",70),new Array("Sao Luis",-2.597173,-44.243435,0.023,0.00044,"f0f000",51),new Array("Salvador",-12.911521,-38.336103,0.0005,0.0275,"68fb58",11.3),new Array("Tiska",24.273726,9.444315,0.0005,0.0215,"f0a000",67.8),new Array("El Golea",30.572404,2.861847,0.00044,0.027,"909009",90.5),new Array("Alicante",38.284294,-0.575066,0.00044,0.0372,"020177",-7.9),new Array("Khofra",24.16251,23.31059,0.0275,0.00044,"f01010",73.5),new Array("Al Fashir",13.606599,25.314233,0.028,0.00048,"f0f000",36),new Array("Saratov",51.559474,46.039125,0.013,0.0005,"f4f400",53),new Array("Arkalyk",50.318703,66.934896,0.0178,0.00042,"a0cc12",-1),new Array("Oral",51.144157,51.528695,0.016,0.0005,"00c44c",26),new Array("Atyrau",47.11159,51.831447,0.0005,0.021,"cc0c0c",130),new Array("Belfast",54.611902,-5.879542,0.0198,0.0005,"f04055",40),new Array("Rogachevo",71.606116,52.476851,0.0016,0.0224,"f10000",81.8),new Array("Edinburgh",55.944808,-3.387072,0.00054,0.0325,"00f0f0",18.5),new Array("Kyiv",50.400879,30.437053,0.0295,0.00044,"f0fac0",2.6),new Array("Ryan",14.655896,49.362822,0.031,0.0004,"8fbc8f",27.3),new Array("Chihuaua",28.691585,-105.965785,0.024,0.00046,"4682b4",78),new Array("Potiskum",11.706598,11.044334,0.012,0.00042,"20b2aa",47),new Array("Viang Chan",17.99782,102.55306,0.012,0.00048,"ff4500",-43.3),new Array("Kubin",-10.224644,142.215301,0.012,0.0004,"f0f000",-23.5),new Array("Bor",6.181793,31.598439,0.0163,0.0004,"f00000",78),new Array("Rennes",48.073348,-1.74527,0.022,0.0004,"ff8247",-7),new Array("Hamburg",53.618077,9.963816,0.029,0.00046,"cdad00",26.2),new Array("Yazd",31.91734,54.260439,0.037,0.00046,"00cd00",-38.5),new Array("Zahedan",29.45683,60.910537,0.035,0.00053,"ff4500",98),new Array("Ganjingzi",38.966758,121.521782,0.031,0.00043,"ff83fa",-4.6),new Array("Shandong",35.038232,118.412281,0.022,0.0006,"8b668b",89.35),new Array("Ouanda Djalle",8.915768,22.790279,0.016,0.0004,"4eee94",-48),new Array("Isiro",2.834753,27.579659,0.022,0.0004,"00f000",-39),new Array("Qardho",9.535707,49.112041,0.017,0.0004,"f0f000",52),new Array("Iskushuban",10.315394,50.196844,0.017,0.0004,"00f0f0",-2),new Array("Cheerigaabo",10.636789,47.381909,0.016,0.0004,"00f000",39),new Array("Kabri Dar",6.731711,44.232743,0.025,0.00046,"00f000",5.2),new Array("Wajir",1.743494,40.08424,0.0255,0.0005,"0000ee",-55.8),new Array("Rondonopolis",-16.594426,-54.724746,0.017,0.00046,"10f000",89),new Array("Savusavu",-16.799339,179.338707,0.012,0.0004,"f56a6a",-65.5),new Array("Komunimbaimbai",-9.866135,160.820494,0.011,0.00046,"fa331a",35),new Array("Luganville",-15.498979,167.212381,0.0185,0.0004,"1aff1a",-39),new Array("Taumako",-9.871959,167.170179,0.012,0.0004,"1aff1a",105),new Array("Oranjemund",-28.592002,16.446453,0.015,0.00044,"ff83fa",89.5),new Array("Tumbes",-3.543565,-80.388261,0.0234,0.00046,"83fffa",-51.6),new Array("Kikwit",-5.040411,18.780806,0.015,0.0004,"3f8aff",44),new Array("Mbandaka",0.011732,18.2903,0.021,0.00046,"a1331a",96.8),new Array("Batouri",4.474557,14.362344,0.012,0.0004,"ee83ea",69),new Array("Guadeloupe",16.26744,-61.544021,0.0255,0.00046,"ffff00",-10.5),new Array("Humacao",18.138175,-65.805423,0.0125,0.0004,"aa63a7",-3.5),new Array("Kasane",-17.836051,25.153531,0.0195,0.00042,"6495ed",19.05),new Array("Niuafo'ou",-15.57111,-175.637333,0.016,0.00046,"bdb76b",0),new Array("Havre-aux-Maisons",47.420382,-61.787812,0.0165,0.00042,"ff4500",27.7),new Array("Yucon",64.899599,-138.276179,0.01,0.00085,"4876ff",98.5),new Array("Jeh",7.560578,168.958923,0.00042,0.013,"ffa500",55),new Array("Pangkalanbuun",-2.700419,111.667791,0.0004,0.018,"9b30ff",-43.4),new Array("Zamboanga",6.922944,122.047881,0.00042,0.024,"ffa500",-3.8),new Array("Tawau",4.257142,117.887925,0.00042,0.014,"ff8247",96),new Array("Monteria",8.829912,-75.831961,0.00042,0.022,"008b00",-47.3),new Array("Cucuta",7.917714,-72.514358,0.00042,0.0175,"00ff00",72.6),new Array("San Jose",9.988885,-84.221545,0.00042,0.025,"4eee94",20.5),new Array("Cali",3.529784,-76.38382,0.00044,0.0255,"8a2be2",80),new Array("Medellin",6.148731,-75.422827,0.00044,0.0295,"ff0000",90.1),new Array("Maracaibo",10.545871,-71.733899,0.00045,0.0245,"4876ff",67),new Array("Canaima",6.222276,-62.853679,0.00042,0.02,"8968cd",96.8),new Array("Deline",65.211969,-123.450987,0.00045,0.028,"8b4789",-4.8),new Array("Mili",6.08154,171.726179,0.00044,0.0122,"80f080",32),new Array("Verkhoyansk",67.537863,133.389881,0.0011,0.018,"ffa54f",28),new Array("Petrolina",-9.357864,-40.583056,0.00042,0.0287,"00ee00",-19),new Array("Bonriki",1.382545,173.137965,0.0004,0.02,"d02090",-7),new Array("Gorno-Altaysk",51.967922,85.835527,0.00042,0.0162,"ffff00",54),new Array("Kiribati",1.986094,-157.359356,0.0004,0.018,"43cd80",0),new Array("Abakan",53.730803,91.3785,0.0005,0.025,"b4eeb4",51),new Array("Sambava",-14.273552,50.17148,0.00042,0.017,"3a5fcd",-60.5),new Array("Dzaoudzi",-12.803615,45.27851,0.00042,0.014,"7a67ee",-59.5),new Array("Maintirano",-18.055896,44.030982,0.00042,0.017,"a020f0",74),new Array("Vangaindrano",-23.354515,47.580339,0.00042,0.014,"ba55d3",66.5),new Array("Toliara",-23.391633,43.724497,0.00042,0.019,"d02090",63),new Array("Harbin",45.612326,126.237481,0.00044,0.032,"ff4500",40),new Array("Rockhampton",-23.382564,150.465258,0.00042,0.025,"eedd82",34),new Array("Agnew",-12.138669,142.144268,0.00042,0.019,"20b2aa",-54.9),new Array("Khomutovo",46.870145,142.717574,0.00055,0.025,"00bfff",88.3),new Array("Recife",-8.113923,-34.927608,0.00042,0.0265,"cd5c5c",-74),new Array("Fortaleza",-3.773551,-38.543751,0.00042,0.024,"4682b4",-16),new Array("Potosi",-19.550565,-65.735085,0.0004,0.025,"6495ed",32),new Array("Copiapo",-27.296216,-70.422245,0.00042,0.019,"3cb371",-5.2),new Array("Iquique",-20.550388,-70.181941,0.00047,0.0285,"a020f0",87.6),new Array("Pisco",-13.755413,-76.229196,0.00042,0.027,"3a5fcd",51),new Array("Foz Do Areia",-25.983836,-51.64851,0.015,0.0004,"ff8247",15.5),new Array("Sao Paulo",-23.621067,-46.660615,0.018,0.00044,"ffee22",-55.9),new Array("Tenkodogo",11.79616,-0.369646,0.019,0.0004,"cd5b45",105.2),new Array("Korhogo",9.406255,-5.624641,0.018,0.0004,"9b30ff",57),new Array("Newman",-23.424085,119.794418,0.019,0.0004,"8b0000",31.2),new Array("Uberaba",-19.758374,-47.969323,0.017,0.0005,"4876ff",-58.3),new Array("Geraldton",-28.804603,114.703563,0.019,0.00044,"ffff00",68),new Array("Les Cayes",18.269487,-73.793246,0.012,0.0004,"0ffff0",12.9),new Array("Couer D'Alene",47.77172,-116.837325,0.0275,0.0004,"3cb371",13.7),new Array("Eucla",-31.707879,128.863996,0.02,0.0004,"cd5c5c",3.5),new Array("Adelaide",-34.957833,138.518533,0.026,0.0004,"ff8c00",35.5),new Array("Lyndon",-23.134184,113.779457,0.021,0.0004,"0ffff0",75),new Array("Sao Tome",0.380265,6.70225,0.013,0.00046,"98fb98",-13),new Array("Atakora",10.371972,1.357391,0.014,0.00044,"ff69b4",56.2),new Array("Parakou",9.350666,2.604736,0.015,0.0005,"00bfff",50),new Array("Kaitaia",-35.078745,173.28377,0.013,0.0004,"0ff2f0",66.5),new Array("Invercargill",-46.4186,168.301889,0.026,0.00045,"8fbc8f",17.8),new Array("Southern Cross",-31.240901,119.352421,0.016,0.0005,"0ffff0",0),new Array("Daly Waters",-16.25748,133.376909,0.021,0.0004,"0f00f0",-47),new Array("Timber Creek",-15.619534,130.441307,0.021,0.0005,"0f6680",-9.4),new Array("Kimberly Downs",-17.404025,124.352059,0.018,0.0005,"ab82ff",55),new Array("Jolo",6.05346,121.004609,0.017,0.0004,"ff6a6a",0.9),new Array("Davao",7.116745,125.636044,0.0265,0.0004,"ba55d3",40.8),new Array("Silay",10.769547,123.015289,0.0175,0.00043,"8b4513",59.9),new Array("Basco",20.447713,121.974919,0.016,0.0004,"ffa500",32.3),new Array("Buton",-5.490952,122.565858,0.012,0.0004,"00ee00",49),new Array("Tambolaka",-9.40825,119.236867,0.018,0.0004,"6a5acd",-8.8),new Array("Panjgur",26.958994,64.126645,0.017,0.0004,"436eee",-39.3),new Array("Porbandar",21.649142,69.648267,0.016,0.00046,"4876ff",1.2),new Array("Dera Ghazi Khan",29.95222,70.485615,0.026,0.00044,"27408b",90),new Array("Merowe",18.425884,31.836265,0.026,0.00051,"00ee00",65.5),new Array("Udaipur",24.615731,73.884441,0.024,0.0004,"9370db",8.2),new Array("Dirkou",18.963086,12.863708,0.016,0.0004,"ff4500",47),new Array("Bokoro",12.380958,17.066145,0.017,0.0004,"483d8c",40),new Array("Luxor",25.658476,32.700929,0.027,0.0004,"8470ff",65.2),new Array("Faya",17.910663,19.100171,0.026,0.0005,"1e90ff",30.3),new Array("Wadi Halfa",21.80627,31.315139,0.012,0.0004,"6495ed",20),new Array("Matan As Sarra",21.674618,21.83037,0.028,0.00046,"7a67ee",80),new Array("Khashm al Qirbah",14.916982,35.871016,0.019,0.0004,"4eee94",48),new Array("Khartoum",15.576019,32.553788,0.026,0.0005,"ff69b4",90.6),new Array("Birn Sahara",22.569456,28.714539,0.026,0.0005,"87cefa",80.7),new Array("Jizan",16.912963,42.578378,0.027,0.0005,"ffc1c1",-59),new Array("Kawthoung",10.041426,98.535712,0.014,0.0005,"4eee94",73),new Array("Krabi",8.106323,98.979971,0.026,0.00043,"0000ff",-51),new Array("Arar",30.909939,41.122534,0.031,0.0005,"00bfff",-12.5),new Array("Haima",19.969164,56.278946,0.026,0.0005,"4876ff",64),new Array("Riyadh",24.970857,46.674578,0.026,0.0005,"9bcd9b",-59.8),new Array("Da Nang",16.030599,108.202495,0.026,0.0005,"2e8b57",96.2),new Array("Ban Lung",12.233494,104.660332,0.013,0.0005,"436eee",90),new Array("Rach Gia",9.956313,105.126178,0.026,0.0004,"6959cd",14),new Array("Bengkulu",-3.857125,102.331536,0.013,0.0004,"836fff",-43),new Array("Palembang",-2.895193,104.691875,0.015,0.00042,"9400d3",-22.1),new Array("Pekanbaru",0.450741,101.444369,0.026,0.0004,"836fff",90),new Array("Langkawi",6.315437,99.71922,0.029,0.0005,"3cb371",55),new Array("Narathiwat",6.511586,101.740045,0.019,0.0005,"7a67ee",67.5),new Array("Hat Yai",6.93074,100.380535,0.026,0.0004,"ff69b4",7),new Array("Battambang",13.092959,103.217792,0.026,0.0005,"ff8c00",23),new Array("Buffalo",42.931687,-78.740634,0.026,0.0004,"008b00",36.3),new Array("Mackinac",45.863641,-84.64395,0.015,0.0004,"8b6969",10),new Array("Changzhou",23.448596,111.248272,0.015,0.0005,"ffa500",90),new Array("Xinjiang",38.141953,85.531214,0.015,0.0005,"00ee00",73),new Array("Kuche",41.716669,82.976936,0.021,0.0005,"0ffff0",5.8),new Array("Kumul",42.845293,93.654681,0.027,0.0005,"8b5a00",-15.5),new Array("Halayugongxiang",41.606129,86.129851,0.028,0.0005,"ff0000",37),new Array("Dunhuang",40.160132,94.792786,0.026,0.00047,"8b008b",4),new Array("Kailashahar",24.304384,92.005445,0.021,0.0005,"8b668b",60),new Array("Tulihal",24.749399,93.889782,0.026,0.0005,"9b30ff",52),new Array("Silchar",24.90827,92.971206,0.019,0.0005,"00ee00",32),new Array("Ningbo",29.833776,121.449244,0.026,0.0005,"0ff150",-29.9),new Array("Kagawa",34.210445,134.002948,0.026,0.0005,"3a5fcd",15),new Array("Sakaiminato",35.488297,133.22706,0.022,0.0004,"b8860b",21),new Array("Miyazaki",31.875991,131.435301,0.026,0.00042,"9400d3",3),new Array("Misawa",40.70418,141.350484,0.032,0.00046,"ffb6c1",-3.5),new Array("Tochigi",36.507101,139.870613,0.017,0.00048,"ff69b4",85),new Array("Tokoname",34.843122,136.809461,0.026,0.0005,"ff4500",105),new Array("Toyoyama",35.24462,136.93163,0.026,0.0005,"cd5c5c",121),new Array("Niigata",37.956685,139.095604,0.026,0.00047,"ffff00",-2),new Array("Fukuoka",33.596766,130.442863,0.026,0.0005,"3cb371",-58),new Array("Fukui",36.137389,136.224332,0.014,0.0004,"8fbc8f",94.2),new Array("Burevestnik",44.926834,147.611264,0.026,0.00042,"006400",-36.8),new Array("Komatsu",36.387588,136.394545,0.026,0.0005,"0f00f0",29),new Array("Toyama",36.639576,137.185045,0.021,0.0005,"4682b4",74),new Array("Pasighat",28.074233,95.332285,0.014,0.0005,"87cefa",-65),new Array("Tezu",27.936759,96.130044,0.014,0.0005,"00bfff",47),new Array("Cangxian",38.392132,116.935773,0.024,0.0005,"2047a1",112.6),new Array("Wuhan",30.590563,114.236929,0.019,0.0005,"2e8b57",47.6),new Array("Kaifeng",34.744169,114.328912,0.0258,0.0005,"ff8c69",44.8),new Array("Hefei Luogang",31.789401,117.28748,0.0273,0.00047,"ff4500",-41),new Array("Longhu",23.418178,116.754563,0.024,0.00045,"ffb5c5",48.5),new Array("Chengdu",30.692794,103.944901,0.026,0.0005,"ab82ff",67),new Array("Hanoi",21.032566,105.882443,0.017,0.0005,"43cd80",64),new Array("Xining",36.531821,102.0268,0.032,0.00044,"5d478b",-15),new Array("Wanzhou",30.805893,108.420607,0.026,0.00048,"836fff",-19.7),new Array("Dalanzadgad",43.611059,104.353879,0.027,0.00038,"c1ffc1",-9.9),new Array("Golmud",36.39955,94.758813,0.046,0.00048,"ff8c00",0.6),new Array("Enshi",30.311496,109.483867,0.02,0.00048,"eedd82",80),new Array("Baotou",40.567106,109.985375,0.026,0.0005,"fa8072",-32),new Array("Marambio Base",-64.24134,-56.642911,0.022,0.0003,"f0f0ff",11.7),new Array("French Frigate",23.86813,-166.289138,0.0095,0.0004,"ffff00",15.3),new Array("Kanton Island",-2.7665,-171.7191,0.02,0.00044,"cd5c5c",-12),new Array("Jonhston Atoll",16.723543,-169.545996,0.023,0.00041,"2e8b57",24.1),new Array("Galapagos",-0.444995,-90.272614,0.00048,0.021,"4eee94",-54),new Array("Reykjavik",64.122686,-21.93591,0.00092,0.0145,"f0f000",100),new Array("Midway Atoll",28.197227,-177.392796,0.0233,0.00054,"ffe4b5",19.2),new Array("Cook Island",-21.202778,-159.816957,0.023,0.00043,"ffa07a",0),new Array("Nuku Hiva",-8.798639,-140.236053,0.00042,0.0165,"836fff",21.8),new Array("Bora Bora",-16.440597,-151.757138,0.00044,0.016,"2256cc",-34),new Array("Unalaska",53.902818,-166.551763,0.0005,0.0166,"f0f000",-31),new Array("Pohnpei",6.984911,158.200464,0.0169,0.00039,"ff1a1a",-0.05),new Array("Maldivas",4.1773,73.529595,0.0295,0.00044,"4876ff",90.9),new Array("Chagos",-7.304814,72.396834,0.0295,0.00055,"708090",-32),new Array("Graciosa",39.090721,-28.036932,0.016,0.00042,"87cefa",10),new Array("Seychelles",-4.666789,55.510526,0.0265,0.00049,"00bfff",-34.9),new Array("Bermuda",32.366478,-64.694281,0.032,0.00044,"ffa500",-9.8),new Array("Lord Howe",-31.53671,159.07104,0.011,0.0004,"0f5ff0",-20.5),new Array("Falkland Islands",-51.817947,-58.475289,0.037,0.0005,"f0aaca",-8.5),new Array("Anchorage",61.167583,-150.034318,0.048,0.00048,"ccf700",0.2),new Array("Kimmirut",62.852678,-69.891157,0.021,0.00055,"e9967a",-19.5),new Array("Cocos Island",-12.181933,96.827708,0.021,0.00044,"8b3a3a",-58.8),new Array("Honolulu",21.325038,-157.943305,0.0345,0.00042,"d02090",0),new Array("Tuamotu",-23.068519,-134.901659,0.016,0.00048,"6eab77",-47),new Array("Obyan",15.114164,145.717539,0.0267,0.0007,"20b2aa",21.4),new Array("Mataveri",-27.158214,-109.436746,0.00044,0.033,"f0fb00",-24.5)),txt92="At the right bottom of the screen you have a information panel of the departure and arrival and the distance in kilometers of your flight this panels contains too a random game button. The plane that you are flying in is a <a style='text-decoration:none;color:black;font-weight:bold' href='http://en.wikipedia.org/wiki/Cessna_180' target='otro'>Cessna 180</a>, which is prepared to fly around the world, making scales to refuel when necessary (Have a look at the dials).",txt82="The instrument panel is composed of five controls that are located at the left of the map, these controls are used to engine on the small plane, to pause the game, to clear these annoying messages of aid, to show game activity and to change the difficulty level respectively. The vertical bars of the top left corner in the map are the dials: <b style='color:#cc0000'>Altimeter</b>, <b style='color: #00cc00'>Speedometer</b>, and <b style='color: orange'>Fuel gauge</b>.",txt62="The plane that you fly in has a GPS incorporated which is used this way: when you press the left mouse button a yellow arrow appears that shows you the direction and the distance left to arrive at your destination. If you click the right mouse button blue arrows will be showed, these arrows indicate the same than the yellow one but with the nearest airports, use them as checkpoints and to refuel.",txt52="The more height you fly, the faster you go because when you reach more altitude, the air is much thinner and less turbulent allowing less resistance and a quick flight.",txt32="The system to refuel is the next: stop and engine off in any airport and begin to fill your fuel depot.When you fly between two aiports very far each other, the better way to save fuel is to glide, engine off flying and the plane will glide, pay attention to speedometer or you will begin to lose height, remember that the engine takes a few seconds to start. ",txt12="The airplane needs to keep enought speed to take off, until the dial speed starts flashing the airplane would not be able to land off with wheel mouse.<br>Onces landed press the red button (engine off) to refuel.<br>Be carefull when you land you have to keep inside the track or you will crash.",txt02="To start the aeroplane engine click in the map or press the red button in the top left corner.<b>wait a few seconds and situate the mouse cursor in front of the airplane</b> to increase the speed (The farder the cursor is front the plane the more speed you will reach), with enought speed move the mouse to take off (<a target='video' style='text-decoration:none;color:#990000;font-size:11px;font-weight:bold' href='http://www.youtube.com/watch?v=NqHc1qcmc7g'>Video example</a>). In the menu on the right you can choose any of <a href='http://en.wikipedia.org/wiki/World%27s_busiest_airports_by_international_passenger_traffic' target='otro' style='text-decoration:none;color:#000099;font-size:11px;font-weight:bold'>"+aeropuertos.length+"</a> airports and start playing.",mensajes=new Array(new Array("<b>Welcome to flight simulation with Google Maps.</b> <img class='iconhlp' src='plane/help.gif'>"),new Array("<b>Taking off and landing are not so complicated.</b> <img class='iconhlp' src='plane/help.gif'>"),new Array("<b>A tiny ads to pay the rent, click only if it seems interesting…</b>"),new Array("<b>Refuel and save gas.</b> <img class='iconhlp' src='plane/help.gif'>"),new Array("<b>The 3 browsers that better work.</b> <img class='iconhlp' src='plane/caution.gif'>"),new Array("<b>Height and Speed.</b> <img class='iconhlp' src='plane/help.gif'>"),new Array("<b>Global Positioning System.</b> <img class='iconhlp' src='plane/help.gif'>"),new Array("<b>A tiny ads to pay the phone line, click only if it seems you interesting…</b>"),new Array("<b>Instrument panel and Dials.</b> <img class='iconhlp' src='plane/help.gif'>"),new Array("<b>Order flight panel.</b>  <img class='iconhlp' src='plane/help.gif'>"),new Array("<b>The 3 browsers that are in testing.</b> <img class='iconhlp' src='plane/caution.gif'>"),new Array("<b>Continue Game.</b> <img class='iconhlp' src='plane/help.gif'>"),new Array("<b style='font-size:15px;color:red'>Congratulations, you pass the game.</b> <img class='iconhlp' src='plane/caution.gif'>"),new Array("<b style='font-size:15px;color:red'>Congratulations.</b> <img class='iconhlp' src='plane/caution.gif'>"),new Array("<b>Multiplatform. Fly with the browser that you prefer.</b> <img class='iconhlp' src='plane/caution.gif'>"),new Array("<b>Are you lost?.</b>  <img class='iconhlp' src='plane/info.gif'>"),new Array("<b>Game on Pause.</b> <img class='iconhlp' src='plane/caution.gif'>"),new Array("<b>Load game.</b> <img class='iconhlp' src='plane/caution.gif'>"),new Array("<b>Crash!.</b> <img class='iconhlp' src='plane/caution.gif'>"),new Array("<b>Flight information.</b> <img class='iconhlp' src='plane/info.gif'>")),segsingrabar=10000,graba100aer=true,grabaceraer=true,grabaaer=true,delaybm=2000,ballonoff=false,bools=new Array(),ballons=new Array(new Array("Engine on/off button","Click on this button or over the airport to engine on/off the gear. The status is on the text start on/off<br>Caution:Starting the engine takes a few seconds.","plane/help.gif",20,60,"balloon1.png"),new Array("Airports searcher","Find any airport by the city name, if the extended information is loaded you will also be able to search by country, region, or postal code.","plane/help.gif",500,315,"balloon2.png"),new Array("Google","This site is not affiliated with Google in any way,<br>whereas uses the great <a href='http://code.google.com/apis/maps/' style='font-weight:bold;color:black'>Google Maps API</a>.<br>&nbsp;","plane/info.gif",460,30,"balloon1.png"),new Array("Dials","Dials show you <span style='color:#cc0000'>Height</span>, <span style='color:#00cc00'>Speed</span> and <span style='color:#FF8C00'>Fuel</span> any time, they also advise you when you can take off, or if you are lack of fuel, by flashing.","plane/help.gif",75,136,"balloon1.png"),new Array("Switch on/off help","Once desactivated keeps out these annoying messages, it also activates the help text below the map.<br>Switch on whenever you need any advice.","plane/help.gif",20,280,"balloon1.png"),new Array("Your airplane","Allows you to fly between aiports at enought speed to travel around the world.<br>Pilot your airplane with the pointer and the wheel of the mouse.","plane/help.gif",365,200,"balloon1.png"),new Array("Pause button","Allows you to take a deserved break time and also to save the game managing the bookmarks or favorites of your browser.<br>&nbsp;","plane/help.gif",20,178,"balloon1.png"),new Array("Order flight panel","On this screen the target is showed and also the minimun distance that you will have to fly to arrive to your airport destination. It's also included a random button.","plane/help.gif",450,369,"balloon2.png"),new Array("Developer of the stuff","You can visit the personal page of the developer of this experiment, read his blog and/or leave some rewarding comment on something post: <a href='http://kharkoma.homelinux.com/blog' style='font-weight:bold;color:black'>Kharkoma's blog</a>","plane/info.gif",111,400,"balloon3.png"),new Array("Help","Whenever the help is activated,  in this area, there will appear advices about how to manage the game. Devote some time to reading it.","plane/info.gif",489,350,"balloon3.png"),new Array("Levelling wheel","By turning this regulator on one of the 7 levels predefined, you choose the difficulty level, which is based on the distance to fly between the airports.","plane/help.gif",25,330,"balloon3.png"),new Array("Information","Is the help isn't on, your current location will be informed on this gap.<br>.&nbsp;","plane/info.gif",489,350,"balloon3.png"),new Array("Activity indicator","If it continues turning all the time you know that everything's going fine.<br>Task are also informed in the background.","plane/help.gif",20,350,"balloon1.png"));function bing(){waiting=document.getElementById("waiting");msg_loading("<br>Loading, please wait.");ballon=document.getElementById("ballon");iconballon=document.getElementById("iconballon");titleballon=document.getElementById("titleballon");txtballon=document.getElementById("txtballon");ballonground=document.getElementById("ballonground");clsballon=document.getElementById("closeballon");maplayer=document.getElementById("maplayer");vionimg=document.getElementById("vionimg");velmarc=document.getElementById("velmarc");altumarc=document.getElementById("altumarc");txtprogress=document.getElementById("txtprogress");fuelmarc=document.getElementById("fuelmarc");timemarc=document.getElementById("timemarc");moveplanemarc=document.getElementById("moveplanemarc");moveplanemarcletra=document.getElementById("moveplanemarcletra");fle=document.getElementById("flecha");leve=document.getElementById("leve");botonhelp=document.getElementById("azulonoff");botonpause=document.getElementById("pauseonoff");botononoff=document.getElementById("botononoff");fle1=document.getElementById("flechar1");fle2=document.getElementById("flechar2");fle0=document.getElementById("flechar0");menuair=document.getElementById("airports");cajabusinput=document.getElementById("cajabusinput");traveltxt=document.getElementById("texto");txt1=document.getElementById("txt1");txt2=document.getElementById("txt2");wizard=document.getElementById("wizard");nifty=document.getElementById("nifty");fle.style.display="none";fle0.style.display="none";fle1.style.display="none";fle2.style.display="none";nifty.style.display="none";wizard.style.display="none";inic_marcadores();inic_events();msg_loading("<br><br>Events, Maps and Airports.");geocoder=new GClientGeocoder();if(GBrowserIsCompatible()){map=new GMap2(document.getElementById("map"));map.disableDragging();map.enableContinuousZoom();map.setMapType(G_SATELLITE_MAP);setAeropuertos();randomAirport()}msg_loading("<br>General scripts.");inicio()}function bang(){msg_loading("<br>Starting.");if(!NiftyCheck()){return}Rounded("div#nifty","all","#646875","#FFFFFF","smooth");ponerMsgs();waiting.style.display="none";cda();window.setTimeout(function(){put_ballons()},3000)}function caparuta(){tamantes=ruta.length;for(var a=ruta.length-1;a>=5;a--){if(a%2==0){ruta.splice(a,1)}}}function update_dir(a){if(run&&dir!=a){diranterior=dir;ante=dir-1;post=dir+1;anteante=dir-2;postpost=dir+2;if(post>15){post=0}if(ante<0){ante=15}if(postpost>15){postpost=0}if(anteante<0){anteante=15}if((a==ante||a==post)&&zoom>0){ruta[ruta.length]=new GPoint(point.x,point.y);if(ruta.length>100&&!blkcaparuta){blkcaparuta=true;caparuta();blkcaparuta=false}}if(a==ante||a==post||a==anteante||a==postpost){dir=a;update_icon()}}}function max_icon(){if(zoom>1){vionimg.style.width="40px";vionimg.style.height="40px"}}function normal_icon(){vionimg.style.width="35px";vionimg.style.height="35px"}function min_icon(){vionimg.style.width="30px";vionimg.style.height="30px"}function update_icon(){if(estrellado){return}if(zoom==0&&fuel<0){return}ponImagen()}function ponImagen(){switch(dir){case 0:vionimg.src="plane/plane0.gif";break;case 1:vionimg.src="plane/plane05.gif";break;case 2:vionimg.src="plane/plane1.gif";break;case 3:vionimg.src="plane/plane15.gif";break;case 4:vionimg.src="plane/plane2.gif";break;case 5:vionimg.src="plane/plane25.gif";break;case 6:vionimg.src="plane/plane3.gif";break;case 7:vionimg.src="plane/plane35.gif";break;case 8:vionimg.src="plane/plane4.gif";break;case 9:vionimg.src="plane/plane45.gif";break;case 10:vionimg.src="plane/plane5.gif";break;case 11:vionimg.src="plane/plane55.gif";break;case 12:vionimg.src="plane/plane6.gif";break;case 13:vionimg.src="plane/plane65.gif";break;case 14:vionimg.src="plane/plane7.gif";break;case 15:vionimg.src="plane/plane75.gif";break}}function estrellarse(){estrellado=true;msgEstatico();tiempo=0;fuel=1;vel=0;zoom=0;velaalcanzar=0;map.setCenter(new GLatLng(point.y,point.x),valorzoom-zoom);vionimg.src="plane/plof.gif";velmarc.style.height=vel*100000*2.5;fuelmarc.style.height=fuel/20;altumarc.style.height=zoom*13;timemarc.style.height=tiempo/40;if(motor){onoff()}move_plane()}function fill_fuel(){if(fuel<1400&&!motor){var a=Math.floor(Math.random()*15);fuel=fuel+a}if(!motor){poli=aeropuertos[airdest][aeropuertos[airdest].length-1];if(contiene(poli,aeropuertos[airdest][aeropuertos[airdest].length-3])&&fading){fading=false;tiempo=2700;msgEstatico()}}}function esdirdeangulo(b){switch(dir){case 12:if(b>=348.75||b<11.25){return(true)}break;case 13:if(b>=11.25&&b<33.75){return(true)}break;case 14:if(b>=33.75&&b<56.25){return(true)}break;case 15:if(b>=56.25&&b<78.75){return(true)}break;case 0:if(b>=78.75&&b<101.25){return(true)}break;case 1:if(b>=101.25&&b<123.75){return(true)}break;case 2:if(b>=123.75&&b<146.25){return(true)}break;case 3:if(b>=146.25&&b<168.75){return(true)}break;case 4:if(b>=168.75&&b<191.25){return(true)}break;case 5:if(b>=191.25&&b<213.75){return(true)}break;case 6:if(b>=213.75&&b<236.25){return(true)}break;case 7:if(b>=236.25&&b<258.75){return(true)}break;case 8:if(b>=258.75&&b<281.25){return(true)}break;case 9:if(b>=281.25&&b<303.75){return(true)}break;case 10:if(b>=303.75&&b<326.25){return(true)}break;case 11:if(b>=326.25&&b<348.75){return(true)}break}return(false)}function girarprogr(){if(indice>0){return}if((contadormoveplane%4)==0){progresson("\\")}else{if((contadormoveplane%3)==2){progresson("|")}else{if((contadormoveplane%4)==1){progresson("-")}else{progresson("/")}}}}shadow_icon.image="plane/shadow.png";shadow_icon.shadow="plane/shadow.png";shadow_icon.iconSize=new GSize(35,34);shadow_icon.shadowSize=new GSize(0,0);shadow_icon.iconAnchor=new GPoint(35,34);shadow_icon.infoWindowAnchor=new GPoint(0,0);function sombra(){if(point!=null){if(shadow_marker==null){shadow_marker=new GMarker(new GLatLng(point.y,point.x),shadow_icon);shadow_marker.setLatLng(new GLatLng(point.y,point.x));map.addOverlay(shadow_marker)}else{var a=zoom+1;shadow_icon.iconSize=new GSize(35*a,34*a);if(zoom>0){shadow_marker.show()}else{shadow_marker.hide()}shadow_marker.setLatLng(new GLatLng(point.y,point.x))}}}function update_velocidad(a){if(vel<0.00005&&motor){vel=0.00005;return}if(vel>topemax){vel=topemax;return}if(esdirdeangulo(angulo)){if(vel<velaalcanzar&&motor){vel=vel+0.000005}else{if(vel>velaalcanzar){vel=vel-0.000005}}var b=(angulo-90)*RADIAN_PER_DEGREE;b=Math.round(b*1000)/1000;sumay=(a*Math.cos(b));sumax=(a*Math.sin(b));sumay=sumay*2;sumax=sumax*2}if(zoom==0){sumay=sumay/1.1;sumax=sumax/1.1}}function move_plane(){girarprogr();debugs();if(!pause){if(ruta.length==0&&!estrellado){ruta[ruta.length]=new GPoint(point.x,point.y)}if(point.x>180){point.x=-180}if(point.x<-180){point.x=180}if(!estrellado){if(zoom>=0&&fuel>0){if(motor){fuel=fuel-(vel*500)}if(fuel<0){estrellarse();return}if(zoom==0&&!esta_en_aeropuerto()){estrellarse();return}if(!motor&&zoom>0){vel=vel-0.000001;if(vel<0.00002&&zoom<=1){estrellarse();return}else{if(vel<0.00002){vel=0.00005;zoom=zoom-1;map.setCenter(new GLatLng(point.y,point.x),valorzoom-zoom)}}}else{if(!motor){vel=vel-0.000001}if(vel<0){vel=0}}if(zoom==0&&vel*1000000<220){timed=0;velmarc.style.backgroundColor="#00cc00"}else{despegable()}if(fuel<500){sinfuel()}else{fuelmarc.style.backgroundColor="#FF8C00"}var a=(zoom*vel),b;if(zoom<=0){a=vel/2;if(a<=0.000025){a=0}if(zoom<=0&&esta_en_aeropuerto()&&a==0){fill_fuel();if(!motor){grabaaeropuerto()}}}update_velocidad(a);point.y=point.y+sumay;point.x=point.x+sumax;if(fading){b=valorzoom;actualizarzoomsegunpolos();if(b!=valorzoom){map.setZoom(valorzoom-zoom)}map.panTo(new GLatLng(point.y,point.x))}grabacercadeaeropuerto();graba100kmaeropuerto();update_marcadores();if(!wheellock){altumarc.style.height=zoom*13}else{altant=altumarc.style.height.substring(0,altumarc.style.height.length-2);if(altant>zoom*13){altumarc.style.height=(parseInt(altant)-4)}else{altumarc.style.height=(parseInt(altant)+4)}}}}}window.setTimeout(function(){contadormoveplane=contadormoveplane+1;if(contadormoveplane>65){contadormoveplane=0}move_plane()},time)}function despegable(){if(zoom==0){timed=timed+1;if(timed>ticktodespegar){if(contadormoveplane%2==0){velmarc.style.backgroundColor="#00ff00"}else{velmarc.style.backgroundColor="#00cc00"}}}else{velmarc.style.backgroundColor="#00cc00";timed=0}}function sinfuel(){if(contadormoveplane%2==0){fuelmarc.style.backgroundColor="#cc5a00"}else{fuelmarc.style.backgroundColor="#FF8C00"}}function inic_marcadores(){velmarc.style.height=vel*100000*2.5;fuelmarc.style.height=fuel/20;timemarc.style.height=tiempo/40;altumarc.style.height=0}function update_marcadores(){var a=Math.floor(Math.random()*2);velmarc.style.height=vel*100000*2.5+a;fuelmarc.style.height=fuel/20;timemarc.style.height=tiempo/40}function mover(h){if(pause){return}if(estrellado){return}var d,g,b,c,f;if(!isie){d=h.pageX;g=h.pageY}else{d=event.clientX;g=event.clientY}b=computeAngle2(378,198,d,g);angulo=b;if(motor){c=vel;f=velaalcanzar;if(b>30&&b<150){velaalcanzar=distancia(345,180,d,g)/500000}else{velaalcanzar=distancia(345,180,d,g)/750000}if(zoom==0&&velaalcanzar<0.00013){velaalcanzar=0}if(((b>=0&&b<11.25)||(b<=360&&b>348.75))&&dir!=12){velaalcanzar=f}if(b>=11.25&&b<33.75&&dir!=13){velaalcanzar=f}if(b>=33.75&&b<56.25&&dir!=14){velaalcanzar=f}if(b>=56.25&&b<78.75&&dir!=15){velaalcanzar=f}if(b>=78.75&&b<101.25&&dir!=0){velaalcanzar=f}if(b>=101.25&&b<123.75&&dir!=1){velaalcanzar=f}if(b>=123.75&&b<146.25&&dir!=2){velaalcanzar=f}if(b>=146.25&&b<168.75&&dir!=3){velaalcanzar=f}if(b>=168.75&&b<191.25&&dir!=4){velaalcanzar=f}if(b>=191.25&&b<213.75&&dir!=5){velaalcanzar=f}if(b>=213.75&&b<236.25&&dir!=6){velaalcanzar=f}if(b>=236.25&&b<258.75&&dir!=7){velaalcanzar=f}if(b>=258.75&&b<281.25&&dir!=8){velaalcanzar=f}if(b>=281.25&&b<303.75&&dir!=9){velaalcanzar=f}if(b>=303.75&&b<326.25&&dir!=10){velaalcanzar=f}if(b>=326.25&&b<348.75&&dir!=11){velaalcanzar=f}}if(b>=348.75||b<11.25){update_dir(12)}if(b>=11.25&&b<33.75){update_dir(13)}if(b>=33.75&&b<56.25){update_dir(14)}if(b>=56.25&&b<78.75){update_dir(15)}if(b>=78.75&&b<101.25){update_dir(0)}if(b>=101.25&&b<123.75){update_dir(1)}if(b>=123.75&&b<146.25){update_dir(2)}if(b>=146.25&&b<168.75){update_dir(3)}if(b>=168.75&&b<191.25){update_dir(4)}if(b>=191.25&&b<213.75){update_dir(5)}if(b>=213.75&&b<236.25){update_dir(6)}if(b>=236.25&&b<258.75){update_dir(7)}if(b>=258.75&&b<281.25){update_dir(8)}if(b>=281.25&&b<303.75){update_dir(9)}if(b>=303.75&&b<326.25){update_dir(10)}if(b>=326.25&&b<348.75){update_dir(11)}}function disparar(a){if(!pause){if(!isie){clickType=a.button}else{clickType=event.button}if(zoom>0){if(clickType==0||clickType==1){flechas_guia()}else{if(clickType==2){mascercano()}}}else{onoff()}}}function handle(b){if(!pause){var a=zoom;if(b<0){zoom=zoom+1}else{zoom=zoom-1}if(zoom<=0){zoom=0}else{if(zoom<1){zoom=1}else{if(zoom>5){zoom=5}}}if(a!=zoom){map.setZoom(valorzoom-zoom)}}}function wheel(a){if(estrellado){return}if((zoom==0&&vel*1000000<220)||(timed<=ticktodespegar&&zoom==0)){return}zoomant=zoom;if(wheellock){return}var b=0;if(!a){a=window.event}if(!a){a=window.event}if(a.wheelDelta){b=a.wheelDelta/120;if(window.opera){b=-b}}else{if(a.detail){b=-a.detail/3}}if(b){handle(b)}if(a.preventDefault){a.preventDefault()}a.returnValue=false;wheellock=true;if(zoomant<zoom){max_icon()}else{if(zoomant>zoom){min_icon();if(zoom==0){vel=topemax}}}window.setTimeout(function(){wheellock=false;normal_icon()},1000);return false}if(window.addEventListener){window.addEventListener("DOMMouseScroll",wheel,false)}function progresson(a){txtprogress.innerHTML=a}function addToMap(c){progresson(indice+" / "+aeropuertosextends.length);if(c.Status.code!=200||c.Placemark[0].address==""){aeropuertosextends[indice]=""}else{var b=quitarAcentos(c.Placemark[0].address),a=b.toLowerCase().indexOf(aeropuertos[indice][0].toLowerCase());while(a!=-1){b=b.substring(0,a-1)+b.substring(a+aeropuertos[indice][0].length,b.length);a=b.toLowerCase().indexOf(aeropuertos[indice][0].toLowerCase())}aeropuertosextends[indice]=""+b}cargarDatosAeropuerto(indice+1)}function callGeocoder(a){this.indice=a;if(aeropuertosextends[indice]==""){geocoder.getLocations(new GLatLng(aeropuertos[a][1],aeropuertos[a][2]),addToMap)}else{cargarDatosAeropuerto(indice+1)}}function cargarDatosAeropuerto(c){var a,b=0;if(aeropuertosextends.length==0){for(a=0;a<aeropuertos.length;a++){aeropuertosextends[aeropuertosextends.length]=""}}if(c<aeropuertos.length){callGeocoder(c)}else{for(a=0;a<aeropuertos.length;a++){if(aeropuertosextends[a]==""){b=b+1}}indice=-1;if(b>10){b=aeropuertos.length-b;if(b==0){b=1}window.setTimeout(function(){cargarDatosAeropuerto(0)},b*1000)}}}function quitarAcentos(a){var b=a;b=b.replace(/á/g,"a");b=b.replace(/à/g,"a");b=b.replace(/â/g,"a");b=b.replace(/ã/g,"a");b=b.replace(/ª/g,"a");b=b.replace(/Á/g,"A");b=b.replace(/À/g,"A");b=b.replace(/Â/g,"A");b=b.replace(/Ã/g,"A");b=b.replace(/Í/g,"I");b=b.replace(/Ì/g,"I");b=b.replace(/Î/g,"I");b=b.replace(/í/g,"i");b=b.replace(/ì/g,"i");b=b.replace(/î/g,"i");b=b.replace(/È/g,"E");b=b.replace(/Ê/g,"E");b=b.replace(/É/g,"E");b=b.replace(/é/g,"e");b=b.replace(/è/g,"e");b=b.replace(/ê/g,"e");b=b.replace(/ó/g,"o");b=b.replace(/ò/g,"o");b=b.replace(/ô/g,"o");b=b.replace(/õ/g,"o");b=b.replace(/º/g,"o");b=b.replace(/Ó/g,"O");b=b.replace(/Ò/g,"O");b=b.replace(/Ô/g,"O");b=b.replace(/Õ/g,"O");b=b.replace(/Ú/g,"U");b=b.replace(/Ù/g,"U");b=b.replace(/Û/g,"U");b=b.replace(/ú/g,"u");b=b.replace(/ù/g,"u");b=b.replace(/û/g,"u");b=b.replace(/ç/g,"c");b=b.replace(/Ç/g,"C");return(b)}function contiene(l,m){var h=l.getVertexCount(),d=false,e=h-1,f,n,g,p,o,c=0.0001,b=0.0001;for(f=0;f<h;f++){p=l.getVertex(f);o=l.getVertex(e);g=point.y;n=point.x;if(p.lng()<n&&o.lng()>=n||o.lng()<n&&p.lng()>=n){if(p.lat()+(n-p.lng())/(o.lng()-p.lng())*((o.lat()-c)-(p.lat()+b))<=g){d=!d}}e=f}return(d)}function esta_en_aeropuerto(){var a,b;if(aersel!=null){a=aeropuertos[aersel][aeropuertos[aersel].length-1];if(contiene(a,aeropuertos[aersel][aeropuertos[aersel].length-3])){return(true)}aersel==null}for(b=0;b<aeropuertos.length;b++){a=aeropuertos[b][aeropuertos[b].length-1];if(contiene(a,aeropuertos[b][aeropuertos[b].length-3])){contfalses=0;aersel=b;return(true)}}contfalses=contfalses+1;if(contfalses<5){return(true)}else{return(false)}}function mascercano(){var o=Number.MAX_VALUE,m=-1,r,q,s,l=new Array(),p=new Array(),f=false,e=false,c=false,b=false,x=false,w=false,v=false,u=false,h=0,n,t,g=true;for(r=0;r<aeropuertos.length;r++){s=lejaniaAir(r,point.y,point.x);if(s>3){if(s<o){m=r;o=s}}}p[p.length]=m;l[l.length]=o;for(q=0;q<4;q++){for(r=0;r<aeropuertos.length;r++){s=lejaniaAir(r,point.y,point.x);if(s>3){if(s>l[q]&&s<o){m=r;o=s}}}p[p.length]=m;l[l.length]=o;o=Number.MAX_VALUE;m=-1}for(r=0;r<p.length;r++){if(r>0){g=true;if(p[r-1]==p[r]){g=false}}if(p[r]!=-1&&g){n=true;t=computeAngle(new GLatLng(point.y,point.x),new GLatLng(aeropuertos[p[r]][1],aeropuertos[p[r]][2]));if((t>=0&&t<23)||(t<=360&&t>338)){if(!f){f=true}else{n=false}}if(t>=23&&t<68){if(!e){e=true}else{n=false}}if(t>=68&&t<113){if(!c){c=true}else{n=false}}if(t>=113&&t<158){if(!b){b=true}else{n=false}}if(t>=158&&t<203){if(!x){x=true}else{n=false}}if(t>=203&&t<248){if(!w){w=true}else{n=false}}if(t>=248&&t<293){if(!v){v=true}else{n=false}}if(t>=293&&t<338){if(!u){u=true}else{n=false}}if(n){if(h==0){flechas_guia_cercano(p[r],l[r],fle0)}else{if(h==1){flechas_guia_cercano(p[r],l[r],fle1)}else{if(h==2){flechas_guia_cercano(p[r],l[r],fle2)}else{}}}h=h+1}if(h>=3){break}}}}function mascercanos(){var f=Number.MAX_VALUE,g=-1,e,h,c,b=new Array(),a=new Array();for(e=0;e<aeropuertos.length;e++){h=lejaniaAir(e,point.y,point.x);if(h>3){if(h<f){g=e;f=h}}}a[a.length]=g;b[b.length]=f;f=Number.MAX_VALUE;g=-1;for(c=0;c<4;c++){for(e=0;e<aeropuertos.length;e++){h=lejaniaAir(e,point.y,point.x);if(h>3){if(h>b[c]&&h<f){g=e;f=h}}}a[a.length]=g;b[b.length]=f;f=Number.MAX_VALUE;g=-1}for(e=0;e<b.length;e++){b[e]=aeropuertos[a[e]][0]+(" "+b[e]).substring(0,7)}return(b)}function aeropuertoGrados(c,m,n,a,h,l){if(n<a){duaux=a;a=n;n=duaux}var o=Math.cos(l*RADIAN_PER_DEGREE),j=Math.sin(l*RADIAN_PER_DEGREE),g=o*n,f=j*n,e="#000000",r=a*j,b=a*o,q=new GLatLng(m,c),d=new GMarker(q),p=new GPolygon([new GPoint(c,m),new GPoint(c+g,m+f),new GPoint(c+g-r,m+f+b),new GPoint(c-r,m+b),new GPoint(c,m)],aeropuertos[h][5],5,1,e,0.6);map.addOverlay(p);aeropuertos[h][aeropuertos[h].length]=d;aeropuertos[h][aeropuertos[h].length]=p}function setAeropuerto(a){var f=aeropuertos[a][2],c=aeropuertos[a][1],e=aeropuertos[a][4],b=aeropuertos[a][3],d=0;if(aeropuertos[a][6]!=null){d=aeropuertos[a][6]}aeropuertoGrados(f,c,e,b,a,d)}function setAeropuertos(){for(var a=0;a<aeropuertos.length;a++){setAeropuerto(a)}setMenuAirports(0)}function aeropuertotipo3(a){if(aeropuertos[a][0]=="Mataveri"||aeropuertos[a][0]=="Obyan"||aeropuertos[a][0]=="Tuamotu"){return(true)}return(false)}function aeropuertotipo2(a){if(aeropuertos[a][0]=="Honolulu"||aeropuertos[a][0]=="Cocos Island"||aeropuertos[a][0]=="Kimmirut"||aeropuertos[a][0]=="Anchorage"||aeropuertos[a][0]=="Falkland Islands"||aeropuertos[a][0]=="Lord Howe"||aeropuertos[a][0]=="Seychelles"||aeropuertos[a][0]=="Bermuda"||aeropuertos[a][0]=="Graciosa"||aeropuertos[a][0]=="Chagos"||aeropuertos[a][0]=="Maldivas"||aeropuertos[a][0]=="Bora Bora"||aeropuertos[a][0]=="Nuku Hiva"||aeropuertos[a][0]=="Cook Island"||aeropuertos[a][0]=="Unalaska"||aeropuertos[a][0]=="Marambio Base"||aeropuertos[a][0]=="Pohnpei"||aeropuertos[a][0]=="Midway Atoll"||aeropuertos[a][0]=="Reykjavik"||aeropuertos[a][0]=="Galapagos"||aeropuertos[a][0]=="Jonhston Atoll"||aeropuertos[a][0]=="Kanton Island"||aeropuertos[a][0]=="French Frigate"){return(true)}return(false)}function randomAirport(){var a=Math.floor(Math.random()*aeropuertos.length);encon=false;while(!encon){if(level>=3){encon=true}else{if(level==1){if(!aeropuertotipo2(a)&&!aeropuertotipo3(a)){encon=true}else{a=Math.floor(Math.random()*aeropuertos.length)}}else{if(level==2){if(!aeropuertotipo3(a)){encon=true}else{a=Math.floor(Math.random()*aeropuertos.length)}}}}}ponOrigen(a)}function marcalevel2(b,a){if(aeropuertotipo2(a)){b=b+level2}else{if(aeropuertotipo3(a)){b=b+level3}}return(b)}function marcaconinfoexten(b,a){if(aeropuertosextends[a]!=null&&aeropuertosextends[a]!=""){b=b+"&nbsp;&nbsp;<b style='color:orange;font-size:11px'>*</b>"}return(b)}function marcaconangulo(b,a){if(aeropuertos[a].length>7){b=b+"&nbsp;&nbsp;<b style='color:#05ff05;font-size:11px'>*</b><span style='font-size:8px'>&nbsp;&nbsp;"+aeropuertos[a][6]+"º</span>"}return(b)}function marcacercadepolos(b,a){if(aeropuertos[a][1]>55){if(aeropuertos[a][1]>66){b=b+"&nbsp;&nbsp;<b style='color:#5555ff;font-size:11px'>*</b><span style='font-size:8px'>&nbsp;&nbsp;"+(aeropuertos[a][1]+"").substring(0,4)+"</span>"}else{b=b+"&nbsp;&nbsp;<b style='color:#3333bb;font-size:11px'>*</b><span style='font-size:8px'>&nbsp;&nbsp;"+(aeropuertos[a][1]+"").substring(0,4)+"</span>"}}else{if(aeropuertos[a][1]>45){b=b+"&nbsp;&nbsp;<b style='color:#995599;font-size:11px'>*</b><span style='font-size:8px'>&nbsp;&nbsp;"+(aeropuertos[a][1]+"").substring(0,4)+"</span>"}}if(aeropuertos[a][1]<-40){b=b+"&nbsp;&nbsp;<b style='color:#ff0000;font-size:11px'>*</b><span style='font-size:8px'>&nbsp;&nbsp;"+(aeropuertos[a][1]+"").substring(0,4)+"</span>"}return(b)}function setMenuAirportsbyAddress(g,e,b){var a=0,d=0,f=0,h="",c;if(e>8){a=e-8}if(g.length>10){g=g.substring(0,10)}while(d<e+1&&f<aeropuertos.length){if(aeropuertos[f]!=null){if(aeropuertosextends[f]!=null&&aeropuertosextends[f]!=""&&aeropuertosextends[f].toLowerCase().indexOf(g.toLowerCase())>=0){if(d>=a&&d!=e){h=aeropuertos[f][0];h=marcalevel2(h,f);c=aeropuertosextends[f].toLowerCase().indexOf(g.toLowerCase());if(h.length<9){topestr=10}else{if(h.length<13){topestr=7}else{if(h.length<15){topestr=3}else{topestr=1}}}tamlet="7px";auxstr="";selt="<b style='font-weight:bold;font-size:"+tamlet+";text-decoration:underline'>";if(c==0){auxstr="&nbsp;~&nbsp;<span style='border:0px solid red;color:#dddddd;font-size:"+tamlet+"'>";detras=aeropuertosextends[f].substring(c+g.length,c+g.length+topestr);auxstr=auxstr+selt+aeropuertosextends[f].substring(c,c+g.length)+"</b>"+detras}else{if(c+g.length+topestr<aeropuertosextends[f].length){auxstr="&nbsp;~&nbsp;<span style='border:0px solid red;color:#dddddd;font-size:"+tamlet+"'>";delante=aeropuertosextends[f].substring(c-topestr,c);detras=aeropuertosextends[f].substring(c+g.length,c+g.length+topestr);auxstr=auxstr+delante+selt+aeropuertosextends[f].substring(c,c+g.length)+"</b>"+detras}else{auxstr="&nbsp;~&nbsp;<span style='border:0px solid red;color:#dddddd;font-size:"+tamlet+"'>";delante=aeropuertosextends[f].substring(c-topestr,c);detras=aeropuertosextends[f].substring(c+g.length,aeropuertosextends[f].length);auxstr=auxstr+delante+selt+aeropuertosextends[f].substring(c,c+g.length)+"</b>"+detras}}h=h+auxstr+"</span>";menuair.innerHTML=menuair.innerHTML+"<div onclick='ponOrigen("+f+")' style='cursor:pointer;border:0px solid blue;height:30px;width:200;position:relative;top:20px;left:20px;'>"+h+"</div>"}d=d+1}}f=f+1}for(f=d;f<e;f++){if(d==0&&f==0&&e==8){menuair.innerHTML=menuair.innerHTML+"<div style='border:0px solid blue;height:30px;width:200;position:relative;top:20px;left:20px;'>No results</div>"}else{menuair.innerHTML=menuair.innerHTML+"<div style='border:0px solid blue;height:30px;width:200;position:relative;top:20px;left:20px;'>&nbsp;</div>"}}return(d+(8-e)+a)}function marcabusq(a,c){var b=a.toLowerCase().indexOf(c.toLowerCase()),e,d,f;if(b>=0){e=a.substring(0,b);d=a.substring(b,b+c.length);f=a.substring(b+c.length,a.length);a=e+"<span style='text-decoration:underline'>"+d+"</span>"+f}return(a)}function setMenuAirportsbyName(a,d){menuair.innerHTML="";if(a==0){menuair.innerHTML=menuair.innerHTML+"<div style='border:0px solid blue;height:30px;width:200;position:relative;top:20px;left:20px;'><img class='flechita' src='plane/upoff.jpg'><b style='position:relative;left:50px'>Searching...</b></div>"}else{menuair.innerHTML=menuair.innerHTML+"<div onclick='setMenuAirportsbyName("+(a-8)+',"'+d+"\")' style='cursor:pointer;border:0px solid blue;height:30px;width:200;position:relative;top:20px;left:20px;'><img class='flechita' src='plane/up.jpg'><b style='position:relative;left:50px'>Searching...</b></div>"}var b=0,c=0,f="",e;while(b<9&&c<aeropuertos.length){if(aeropuertos[c]!=null){if(aeropuertos[c][0].toLowerCase().indexOf(d.toLowerCase())>=0){if(b<a+8&&b>=a){f=marcabusq(aeropuertos[c][0],d);f=marcalevel2(f,c);menuair.innerHTML=menuair.innerHTML+"<div onclick='ponOrigen("+c+")' style='cursor:pointer;border:0px solid blue;height:30px;width:200;position:relative;top:20px;left:20px;'>"+f+"</div>"}b=b+1}}c=c+1}if(8-(b-a)>0){b=b+setMenuAirportsbyAddress(d,8-(b-a),a)}if((b-a)<9){menuair.innerHTML=menuair.innerHTML+"<div style='border:0px solid blue;height:30px;width:200;position:relative;top:20px;left:20px;'><img class='flechita'src='plane/downoff.jpg'></div>"}else{e="<div onclick='setMenuAirportsbyName("+(a+8)+',"'+d+"\")' style='cursor:pointer;border:0px solid blue;height:30px;width:200;position:relative;top:20px;left:20px;'><img  class='flechita' src='plane/down.jpg'></div>";menuair.innerHTML=menuair.innerHTML+e}}function setMenuAirports(a){menuair.innerHTML="";if(a==0){menuair.innerHTML=menuair.innerHTML+"<div style='height:30px;width:200;position:relative;top:20px;left:20px;'><img class='flechita' src='plane/upoff.jpg'><b style='position:relative;left:80px'>"+(a+1)+"/"+aeropuertos.length+"</b></div>"}else{menuair.innerHTML=menuair.innerHTML+"<div onclick='setMenuAirports("+(a-8)+")' style='cursor:pointer;border:0px solid blue;height:30px;width:200;position:relative;top:20px;left:20px;'><img class='flechita' src='plane/up.jpg'><b style='position:relative;left:80px'>"+(a+1)+"/"+aeropuertos.length+"</b></div>"}var b,c;for(b=a;b<a+8;b++){if(aeropuertos[b]!=null){c=aeropuertos[b][0];c=marcalevel2(c,b);menuair.innerHTML=menuair.innerHTML+"<div onclick='ponOrigen("+b+")' style='cursor:pointer;border:0px solid blue;height:30px;width:200;position:relative;top:20px;left:20px;'>"+c+"</div>"}else{menuair.innerHTML=menuair.innerHTML+"<div style='border:0px solid blue;height:30px;width:200;position:relative;top:20px;left:20px;'>&nbsp;</div>"}}if(a+8>=aeropuertos.length){menuair.innerHTML=menuair.innerHTML+"<div style='height:30px;width:200;position:relative;top:20px;left:20px;'><img class='flechita' src='plane/downoff.jpg'></div>"}else{menuair.innerHTML=menuair.innerHTML+"<div onclick='setMenuAirports("+(a+8)+")' style='cursor:pointer;border:0px solid blue;height:30px;width:200;position:relative;top:20px;left:20px;'><img class='flechita' src='plane/down.jpg'></div>"}}function panel_texto(f){var b=aeropuertos[airori][0],a=aeropuertos[airdest][0],e=8,g;if(b.length>e){if(a.length>e){b=b.substring(0,(e-1))}else{g=(e-1)+(e-a.length);if(g>b.length){g=b.length}b=b.substring(0,g)}}if(a.length>e){if(b.length>e){a=a.substring(0,(e-1))}else{g=(e-1)+(e-b.length);if(g>a.length){g=a.length}a=a.substring(0,g)}}air1="<a style='color:white;' href='http://maps.google.es/maps?q="+aeropuertos[airori][1]+","+aeropuertos[airori][2]+"' target='otro2'>"+b+"</a>";air2="<a style='color:white;' href='http://maps.google.es/maps?q="+aeropuertos[airdest][1]+","+aeropuertos[airdest][2]+"' target='otro1'>"+a+"</a>";traveltxt.innerHTML=(air1+" - "+air2)+"<br>"+(" "+f).substring(0,9)+" km&nbsp;&nbsp;&nbsp;<span style='color:#dddddd'>("+level+")</span>"}stold="";function buscaair(a){if(a.length!=""){setMenuAirportsbyName(0,a)}else{setMenuAirports(0)}}function cancelbus(){cajabusinput.value="search airport";setMenuAirports(0)}function focobus(a){a.focus();if(a.value=="search airport"){a.value=""}cajabusinput.value}function actualizarzoomsegunpolos(){valorzoom=17;if(point.y>66){valorzoom=15}else{if(point.y>55){valorzoom=16}}}function levelup(){if(leve.src.indexOf("lev1")!=-1){level=2;leve.src="plane/lev2.jpg"}else{if(leve.src.indexOf("lev2")!=-1){level=3;leve.src="plane/lev3.jpg"}else{if(leve.src.indexOf("lev3")!=-1){level=4;leve.src="plane/lev4.jpg"}else{if(leve.src.indexOf("lev4")!=-1){level=5;leve.src="plane/lev5.jpg"}else{if(leve.src.indexOf("lev5")!=-1){level=6;leve.src="plane/lev6.jpg"}else{if(leve.src.indexOf("lev6")!=-1){level=7;leve.src="plane/lev7.jpg"}else{if(leve.src.indexOf("lev7")!=-1){level=1;leve.src="plane/lev1.jpg"}else{}}}}}}}}function pausonoff(){if(!pause){pause=true;msgEstatico()}else{pause=false;acabodecargar=false;ponerMsgs()}if(botonpause.src.indexOf("pauseoff.jpg")!=-1){botonpause.src="plane/pauseon.jpg"}else{botonpause.src="plane/pauseoff.jpg"}}function azuonoff(){if(pause){return}if(azul){azul=false;quitaballons()}else{azul=true}if(botonhelp.src.indexOf("azuloff.jpg")!=-1){botonhelp.src="plane/azulon.jpg"}else{botonhelp.src="plane/azuloff.jpg"}}function onoff(){if(pause){return}if(!motor){if(loadstring!=""){loadstring="";ponerMsgs()}if(!fading){fade("wizard");ponerMsgs()}document.getElementById("botononoff").src="plane/on.jpg";window.setTimeout(function(){engine_on()},3000)}else{document.getElementById("botononoff").src="plane/off.jpg";engine_off()}}function menos(){map.setZoom(map.getZoom()-1);map.panTo(new GLatLng(point.y,point.x))}function mas(){map.setZoom(map.getZoom()+1);map.panTo(new GLatLng(point.y,point.x))}function engine_on(){if(!motor){window.setTimeout(function(){run=true;motor=true},time)}}function engine_off(){motor=false}function dirsegunang(b){if(b<0){b=360+b}if(((b>=0&&b<11.25)||(b<=360&&b>348.75))){return(4)}if(b>=11.25&&b<33.75){return(3)}if(b>=33.75&&b<56.25){return(2)}if(b>=56.25&&b<78.75){return(1)}if(b>=78.75&&b<101.25){return(0)}if(b>=101.25&&b<123.75){return(15)}if(b>=123.75&&b<146.25){return(14)}if(b>=146.25&&b<168.75){return(13)}if(b>=168.75&&b<191.25){return(12)}if(b>=191.25&&b<213.75){return(11)}if(b>=213.75&&b<236.25){return(10)}if(b>=236.25&&b<258.75){return(9)}if(b>=258.75&&b<281.25){return(8)}if(b>=281.25&&b<303.75){return(7)}if(b>=303.75&&b<326.25){return(6)}if(b>=326.25&&b<348.75){return(5)}return(0)}function situaencabecera(b,c,a){if(b>=50&&b<=120){c=aeropuertos[a][3];if(aeropuertos[a][4]<c){c=aeropuertos[a][4]}lat=lat-(c/2)}else{if(b<0&&b>-60){c=aeropuertos[a][3];if(aeropuertos[a][4]<c){c=aeropuertos[a][4]}lon=lon+(c/3);lat=lat-(c/3)}else{if(b>120){lon=lon-(c/3);lat=lat-(c)}else{if(b<=-60){c=aeropuertos[a][3];if(aeropuertos[a][4]<c){c=aeropuertos[a][4]}lon=lon;lat=lat+(c/2)}else{lat=lat-(c)}}}}}dificultad=1400;topeabj=0;topearr=0;function calctopeslevel(){switch(level){case 1:topeabj=300;topearr=700;break;case 2:topeabj=1000;topearr=1800;break;case 3:topeabj=2000;topearr=2800;break;case 4:topeabj=2900;topearr=3500;break;case 5:topeabj=4300;topearr=5000;break;case 6:topeabj=7000;topearr=7500;break;case 7:topeabj=10000;topearr=11000;break}}function ponOrigen(b){if(pause){return}if(!fading){return}if(zoom>0){return}if(estrellado){vel=0.00005;estrellado=false;ponerMsgs();zoom=0}var a=(zoom*vel),f=-1,e,c,h;if(zoom<=0){a=vel/2}if(a<=0.000025){a=0}if(zoom==0&&a==0){tiempo=2700;lon=aeropuertos[b][1];lat=aeropuertos[b][2];angulo=260;sumay=0;sumax=0;e=aeropuertos[b][6];dir=dirsegunang(e);ruta.splice(0,ruta.length);c=(e)*RADIAN_PER_DEGREE;c=Math.round(c*1000)/1000;h=aeropuertos[b][3];if(aeropuertos[b][4]<h){h=aeropuertos[b][4]}h=h/2;lasumay=(h*Math.cos(c));lasumax=(h*Math.sin(c));lasumay=lasumay*2;lasumax=lasumax*2;lon=aeropuertos[b][1]+lasumax;lat=aeropuertos[b][2]+lasumay;situaencabecera(e,h,b);lonori=aeropuertos[b][1];latori=aeropuertos[b][2];airori=b;h=0;if(aeropuertotipo2(b)&&level<2){level=2;leve.src="plane/lev2.jpg"}else{if(aeropuertotipo3(b)&&level<3){level=3;leve.src="plane/lev3.jpg"}}truelevel=level;condif=0;calctopeslevel();while((h<topeabj||h>topearr)&&condif<5000){document.getElementById("texto").innerHTML="Search<br>"+condif;condif=condif+1;f=Math.floor(Math.random()*aeropuertos.length);while(f==b){f=Math.floor(Math.random()*aeropuertos.length)}londest=aeropuertos[f][1];latdest=aeropuertos[f][2];airdest=f;h=aeropuertos[airdest][aeropuertos[airdest].length-2].getPoint().distanceFrom(aeropuertos[b][aeropuertos[b].length-2].getPoint())/1000}if(condif>=5000){alert("Desde este aeropuerto "+aeropuertos[b][0]+" no se ha podido seleccionar este nivel de dificultad.")}graba100aer=true;grabaceraer=true;grabaaer=true;point=new GPoint(lat,lon);actualizarzoomsegunpolos();update_icon();map.setCenter(new GLatLng(point.y,point.x),valorzoom-zoom);loadstring="";fading=true;panel_texto(h);aeropuertosvisitados.splice(0,aeropuertosvisitados.length);ruta.splice(0,ruta.length);ruta[ruta.length]=new GPoint(point.x,point.y);tiempoatras()}else{}}function flechas_guia_cercano(c,f,e){e.style.display="none";fle.style.display="none";e.childNodes[1].innerHTML=aeropuertos[c][0]+"<br>"+(""+f).substring(0,6)+" km";var b=computeAngle(new GLatLng(point.y,point.x),new GLatLng(aeropuertos[c][1],aeropuertos[c][2]));ponflecha(e,b,"flechar");e.style.display="";window.setTimeout(function(){e.style.display="none"},2500)}function ponflecha(g,b,f){var e=110,d=285,c=168;if((b>=0&&b<23)||(b<=360&&b>338)){g.style.top=(c+e)+"px";g.style.left=d+"px";g.childNodes[0].src="plane/"+f+"4.gif"}if(b>=23&&b<68){g.style.top=(c+e)+"px";g.style.left=(d-e)+"px";g.childNodes[0].src="plane/"+f+"5.gif"}if(b>=68&&b<113){g.style.top=c+"px";g.style.left=(d-e)+"px";g.childNodes[0].src="plane/"+f+"6.gif"}if(b>=113&&b<158){g.style.top=(c-e)+"px";g.style.left=(d-e)+"px";g.childNodes[0].src="plane/"+f+"7.gif"}if(b>=158&&b<203){g.style.top=(c-e)+"px";g.style.left=(d)+"px";g.childNodes[0].src="plane/"+f+"0.gif"}if(b>=203&&b<248){g.style.top=(c-e)+"px";g.style.left=(d+e)+"px";g.childNodes[0].src="plane/"+f+"1.gif"}if(b>=248&&b<293){g.style.top=(c)+"px";g.style.left=(d+e)+"px";g.childNodes[0].src="plane/"+f+"2.gif"}if(b>=293&&b<338){g.style.top=(c+e)+"px";g.style.left=(d+e)+"px";g.childNodes[0].src="plane/"+f+"3.gif"}}function flechas_guia(){fle.style.display="none";fle0.style.display="none";fle1.style.display="none";fle2.style.display="none";var c=lejaniaAir(airdest,point.y,point.x),b;fle.childNodes[1].innerHTML=aeropuertos[airdest][0]+"<br>"+(""+c).substring(0,6)+" km";valor=Math.abs(Math.abs(point.x-latdest)-Math.abs(point.y-londest));fle.style.display="";b=computeAngle(new GLatLng(point.y,point.x),new GLatLng(londest,latdest));ponflecha(fle,b,"flecha");fle.style.display="";window.setTimeout(function(){fle.style.display="none"},2500)}function esEspecial1(){if(pause||estrellado||loadstring!=""||!fading){return(true)}return(false)}function esEspecial2(){if(faded&&!pause&&!estrellado&&loadstring==""&&fading){return(true)}return(false)}function msgEstatico(){if(faded){fade("wizard");window.setTimeout(function(){startmsg(true)},1000)}else{startmsg(true)}}function msgespecial(){var a;a=msgn;if(estrellado){a=mensajes.length-2;return(a)}if(isie){if(msgn==0){a=mensajes.length-6;return(a)}}if(!fading){poli=aeropuertos[airdest][aeropuertos[airdest].length-1];if(contiene(poli,aeropuertos[airdest][aeropuertos[airdest].length-3])&&truelevel==7&&zoom==0&&!motor){a=mensajes.length-8}else{if(contiene(poli,aeropuertos[airdest][aeropuertos[airdest].length-3])&&zoom==0&&!motor){a=mensajes.length-7}}return(a)}if(pause){if(loadstring!=""){a=mensajes.length-3;acabodecargar=false}else{if(!acabodecargar){a=mensajes.length-4}else{a=mensajes.length-9}}return(a)}if(loadstring!=""){a=mensajes.length-3;acabodecargar=false;return(a)}if(!azul){a=mensajes.length-1}return(a)}function textoNavBad(){return("<table style='color:#646875;font-size:11px;border:0px' cellspacing='0' cellpadding='0'><tr><td valign='top'>Problems to play with <a style='color:black;text-decoration:none;font-weight:bold' href='http://www.microsoft.com/windows/internet-explorer/default.aspx'>Internet Explorer</a>, <a style='color:black;text-decoration:none;font-weight:bold' href='http://www.opera.com/'>Opera</a> and <a style='color:black;text-decoration:none;font-weight:bold' href='http://www.konqueror.org/'>Konqueror</a>, the game isn't 100% playable.</td><td valign='middle'><img width='300px' height='63px' src='plane/nav2.jpg'></td><td width='5%'></td></tr></table>")}function textoNavGood(){return("<table style='color:#646875;font-size:11px;border:0px' cellspacing='0' cellpadding='0'><tr><td valign='top'>With <a style='color:black;text-decoration:none;font-weight:bold' href='http://www.mozilla.com/firefox/'>Firefox</a>, <a style='color:black;text-decoration:none;font-weight:bold' href='http://www.google.com/chrome/index.htm'>Chrome</a> and <a style='color:black;text-decoration:none;font-weight:bold' href='http://www.apple.com/macosx/what-is-macosx/safari.html'>Safari</a> no problem to play.</td><td valign='middle'><img width='300px' height='63px' src='plane/nav1.jpg'></td><td width='5%'></td></tr></table>")}function textoIE(){return("This web page has been tested with all the browsers <a style='color:black;text-decoration:none;font-weight:bold' href='http://www.mozilla.com/firefox/'>Firefox</a>, <a style='color:black;text-decoration:none;font-weight:bold' href='http://www.google.com/chrome/index.htm'>Chrome</a>, <a style='color:black;text-decoration:none;font-weight:bold' href='http://www.apple.com/macosx/what-is-macosx/safari.html'>Safari</a>, <a style='color:black;text-decoration:none;font-weight:bold' href='http://www.opera.com/'>Opera</a>, <a style='color:black;text-decoration:none;font-weight:bold' href='http://www.konqueror.org/'>Konqueror</a>, e  <a style='color:black;text-decoration:none;font-weight:bold' href='http://www.microsoft.com/windows/internet-explorer/default.aspx'>Internet Explorer</a>, with all is posible play the game but the last 3 browser are still testing.<br>The ordered compability list are this: <img style='width:120px;height:21px' src='plane/navs.jpg'>.")}function textoWin(){aeropuertosvisitados.splice(0,aeropuertosvisitados.length);level=level+1;leve.src="plane/lev"+level+".jpg";ponMapaRuta(20000,1);return("<b>On the map you can see the route you have followed to arrive here.</b><br>Well done you are alive, you have reached the next level, in a few seconds the airplane will be situated at the head of the airport, when this happends have a look at the order flight panel to know your next destination.")}function textoSuperWin(){aeropuertosvisitados.splice(0,aeropuertosvisitados.length);ponMapaRuta(20000,1);return("<b style='font-size:15px;color:red'>Congratulations, you have completed the game.</b> <img class='iconhlp' src='plane/caution.gif'>")}function textoAcabodecargar(){return("Are you stuck?.<br>You don't know what to do. Do you?<br>Take the pause off and you will continue at the same place that you have left. If you prefer to continue later, save this web, as it stands, by managing your bookmarks or favorites.")}function textomesg(a){if(a==2||a==7){return(document.getElementById("publi1").innerHTML)}if(a==4){return(textoNavGood())}if(a==10){return(textoNavBad())}if(a==mensajes.length-4){return(textoPause())}if(a==mensajes.length-3){return(textoLoad())}if(a>=0&&a<=10){switch(a){case 0:return(txt02);break;case 1:return(txt12);break;case 3:return(txt32);break;case 5:return(txt52);break;case 6:return(txt62);break;case 8:return(txt82);break;case 9:return(txt92);break}}if(a==mensajes.length-2){return(textoPlof())}if(a==mensajes.length-9){return(textoAcabodecargar())}if(a==mensajes.length-8){return(textoSuperWin())}if(a==mensajes.length-7){return(textoWin())}if(a==mensajes.length-6){return(textoIE())}return("Probando un nuevo mensajes "+a)}function getInfoSobreVuelo(){latlng=new GLatLng(point.y,point.x);geocoder.getLocations(latlng,function(a){if(a.Status.code!=200||a.Placemark[0].address==""){textoInfo("")}else{address=a.Placemark[0].address;textoInfo(address)}})}function textoInfo(a){if(!esEspecial1()){if(a!=""){var b=lejaniaDest(point.y,point.x);veloc=vel*1000000;if(veloc<0){veloc=0}txt1.innerHTML=mensajes[mensajes.length-1];txt2.innerHTML="You are over <b>"+a+"</b> and at "+(""+b).substring(0,6)+" kilometers of your destination, your speed is "+(""+veloc).substring(0,6)+" km/h, and there are "+Math.round(fuel)+" liters of fuel in your depot."}else{txt1.innerHTML=mensajes[mensajes.length-5];txt2.innerHTML=textoLost()}wizard.style.display="";nifty.style.display="";fade("wizard");window.setTimeout(function(){if(esEspecial2()){fade("wizard")}window.setTimeout(function(){if(esEspecial1()){acti=false}else{startmsg(false)}},timesinmsg)},timeconmsg)}else{acti=false}}function textoLoad(){return("Welcome, the link that you have entered contains a saved game. If you want to load this game use the next button, or if you want to save it add it to your bookmarks <b>(Ctrl+D)</b> or favorites <b>(Ctrl+F)</b>, othewise you can start playing.<br><input type='button' value='Load game ("+aeropuertos[loadori][0]+" - "+aeropuertos[loaddest][0]+")' style='font-size:10px;' onclick='javascript:read_link_save(\""+getStfromLoadstring()+"\")'>")}function textoPause(){return("Tired of flying?, It is common, you can't enjoy living all the time.<br>You can save the game with the next button, <a style='font-weight:bold;color:green;' href='"+crear_link_save(false)+"'>From "+aeropuertos[airori][0]+" to "+aeropuertos[airdest][0]+"</a> saving the link on your bookmarks or favorites, otherwise you can open the link on other tab and save the link there.<br><input type='button' value='Save Game ("+aeropuertos[airori][0]+" - "+aeropuertos[airdest][0]+")' style='font-size:10px;' onclick='javascript:recargar(\""+aeropuertos[airori][0]+" a "+aeropuertos[airdest][0]+'","'+crear_link_save(true)+"\")'>")}function textoLost(){var e,c=lejaniaDest(point.y,point.x),b,a="It seems that you are nowhere perphaps finding out new worlds or performing an historical deed. I remind you that you are at "+(""+c).substring(0,6)+" kilometres of your destination, your approximate speed is "+(""+vel*1000000).substring(0,6)+" km/h, and there are "+Math.round(fuel)+" liters of fuel in your depot. Just in case, here you have a list with of the nearest airports: ";e=mascercanos();for(b=0;b<e.length;b++){a=a+e[b]+"&nbsp;km&nbsp;&nbsp;&nbsp;"}return(a)}function textoPlof(){var a,b="Lost control, next time visit the nearest airports to refuel and look at the dials of height and fuel.<br>Adjust the difficulty level and press any airport to begin the game again.";if(aeropuertosvisitados.length>0){b=b+"or you can retake the flight at any of the following places: <select style='font-size:10px;' onchange='retomavuelo(this.options[this.selectedIndex].value)'>";b=b+"<option value='-1' selected>Select...</option>";for(a=0;a<aeropuertosvisitados.length;a++){b=b+"<option value='"+a+"'>"+aeropuertosvisitados[a][2]+"</option>"}b=b+"</select>"}window.setTimeout(function(){if(ruta.length>10){fading=false;ponMapaRuta(10000,2)}},1000);return(b)}function showmsg(a){premsgnumber=msgnumber;msgnumber=msgespecial();if(msgnumber!=mensajes.length-1){if(msgnumber<especmsgs){if(continf<7){continf=continf+1;txt1.innerHTML=mensajes[msgnumber];txt2.innerHTML=textomesg(msgnumber);wizard.style.opacity="0";wizard.style.display="";nifty.style.display="";return(true)}else{continf=0;msgnumber=mensajes.length-1;if(a){}else{getInfoSobreVuelo()}return(false)}}else{continf=continf+1;txt1.innerHTML=mensajes[msgnumber];txt2.innerHTML=textomesg(msgnumber);wizard.style.opacity="0";wizard.style.display="";nifty.style.display="";return(true)}}else{if(contgeo<9){contgeo=contgeo+1;if(a){}else{getInfoSobreVuelo()}return(false)}else{contgeo=0;txt1.innerHTML=mensajes[2];txt2.innerHTML=textomesg(2);wizard.style.display="";nifty.style.display="";return(true)}}}function startmsg(a){if(showmsg(a)){if(!faded){fade("wizard")}else{}}else{return}if(!a){window.setTimeout(function(){if(esEspecial2()){fade("wizard")}window.setTimeout(function(){msgn=msgn+1;if(msgn>mensajes.length-(especmsgs+1)){msgn=0}if(esEspecial1()){acti=false}else{startmsg(false)}},timesinmsg)},timeconmsg)}else{}}function manageHilos(){hilos=hilos+1;if(hilos>100){hilos=0}}hilos=0;function ponerMsgs(){if(!acti){manageHilos();acti=true;if(faded){fade("wizard");window.setTimeout(function(){startmsg(false)},1000)}else{startmsg(false)}}else{if(faded){fade("wizard")}}}function ponMapaRuta(b,a){ruta[ruta.length]=new GPoint(point.x,point.y);vionimg.style.display="none";var c=new GPolyline(ruta,"#ff0000",3,1,{geodesic:true});map.clearOverlays();map.addOverlay(c);map.setZoom(map.getBoundsZoomLevel(c.getBounds()));map.panTo(c.getBounds().getCenter());ruta.splice(0,ruta.length);window.setTimeout(function(){quitaRuta(a)},b)}function quitaRuta(a){if(!fading){map.setZoom(new GLatLng(point.y,point.x),valorzoom-zoom);map.clearOverlays();for(var b=0;b<aeropuertos.length;b++){poli=aeropuertos[b][aeropuertos[b].length-1];map.addOverlay(poli)}vionimg.style.display="";map.setCenter(new GLatLng(point.y,point.x),valorzoom-zoom);fading=true;if(a==1){ponOrigen(airdest);ponerMsgs()}if(a==2){map.setCenter(new GLatLng(point.y,point.x),valorzoom-zoom)}}}function ta(){if(document.getElementById("debug6").style.display==""){document.getElementById("debug6").style.display="none"}else{document.getElementById("debug6").style.display=""}document.getElementById("debug6").scrollTop=document.getElementById("debug6").scrollHeight}function writetraza(a){if(document.getElementById("debugs")!=null){if(document.getElementById("debugs").style.display==""){if(ctz==0){document.getElementById("debug6").value=""}document.getElementById("debug6").value=document.getElementById("debug6").value+"-TR"+ctz+": "+a+"\n";ctz=ctz+1;document.getElementById("debug6").scrollTop=document.getElementById("debug6").scrollHeight}}}function debugs(){if(document.getElementById("debugs")!=null){if(document.getElementById("debugs").style.display==""){if(document.getElementById("debug3")!=null){document.getElementById("debug3").value="Dir="+dir+(" X="+point.x).substring(0,10)}if(document.getElementById("debug4")!=null){document.getElementById("debug4").value="Angulo="+(""+angulo).substring(0,4)+(" Y="+point.y).substring(0,10)}if(document.getElementById("debug5")!=null){document.getElementById("debug5").value=("V="+(vel/1000000)).substring(0,7)+" R="+ruta.length+" A="+aeropuertosvisitados.length}}}}function w3cValid(){window.location.href="http://validator.w3.org/check?uri="+document.URL+"&doctype=XHTML+1.0+Transitional&group=0"}function inic_events(){if(!isie){document.oncontextmenu=inhabilitar;document.onselectstart=inhabilitar;maplayer.onmousewheel=wheel;maplayer.onmousemove=mover;maplayer.onmousedown=disparar}else{document.onmousemove=mover;document.onmousedown=disparar;document.onmousewheel=wheel;document.oncontextmenu=inhabilitar;document.onselectstart=inhabilitar;maplayer.onmousewheel=wheel;maplayer.onmousemove=mover;maplayer.onmousedown=disparar}}function inicio(){if(document.URL.indexOf("?")){loadstring=document.URL.substring(document.URL.indexOf("?")+1,document.URL.length);var a=0,c,b;for(b=2;b<loadstring.length-5;b++){a=a+loadstring.charCodeAt(b)}c=""+a;if(c.length<=5){c=fillstr(c,5)}else{c=c.substring(0,5)}if(a==loadstring.substring(loadstring.length-5,loadstring.length)){c=loadstring.substring(2,5);c=deletezeroes(c);loadori=parseInt(c);c=loadstring.substring(5,8);c=deletezeroes(c);loaddest=parseInt(c);msg_loading("<br>Detected link with save game.")}else{loadstring=""}}else{loadstring=""}move_plane()}function getStfromLoadstring(){var a="",b;for(b=2;b<loadstring.length-5;b++){a=a+loadstring[b]}return(a)}function cda(){if(loadstring==""){window.setTimeout(function(){cargarDatosAeropuerto(0)},30000)}else{window.setTimeout(function(){cda()},10000)}}function loading(){if(waiting.style.display==""){var a=waiting.innerHTML;if(muchosptos()){if(a.substring(a.length-1,a.length)=="."||a.substring(a.length-1,a.length)=="-"){a=a.substring(0,a.length-1)+"\\"}else{if(a.substring(a.length-1,a.length)=="\\"){a=a.substring(0,a.length-1)+"/"}else{a=a.substring(0,a.length-1)+"-"}}}else{a=a+"."}waiting.innerHTML=a;window.setTimeout(function(){loading()},100)}}function muchosptos(){var a=waiting.innerHTML;if(a.substring(a.length-4,a.length-1)=="..."){return(true)}else{return(false)}}function msg_loading(a){if(waiting.innerHTML==""){waiting.innerHTML=a;loading()}else{if(muchosptos()){waiting.innerHTML=waiting.innerHTML.substring(0,waiting.innerHTML.length-1)+"."+a}else{waiting.innerHTML=waiting.innerHTML+a}}}function inhabilitar(a){return false}function degToRad(a){return((a*Math.PI)/180)}function distancia(d,c,f,e){var b=d-f,a=c-e;return(Math.sqrt((b*b)+(a*a)))}function computeAngle2(d,c,g,e){var b=d-g,a=c-e,f=Math.atan2(a*Math.cos(d*RADIAN_PER_DEGREE),b)*DEGREE_PER_RADIAN;return wrapAngle(f)}function computeAngle(b,e){var c=b.lat()-e.lat(),a=b.lng()-e.lng(),d=Math.atan2(a*Math.cos(b.lat()*RADIAN_PER_DEGREE),c)*DEGREE_PER_RADIAN;return wrapAngle(d)}function wrapAngle(a){if(a>=360){a-=360}else{if(a<0){a+=360}}return a}function lejaniaAir(c,a,b){var g=new GLatLng(a,b),f=new GMarker(g),e=aeropuertos[c][aeropuertos[c].length-2],d=e.getPoint().distanceFrom(f.getPoint())/1000;return(d)}function lejaniaDest(a,b){var f=new GLatLng(a,b),e=new GMarker(f),d=aeropuertos[airdest][aeropuertos[airdest].length-2],c=d.getPoint().distanceFrom(e.getPoint())/1000;return(c)}function fillstr(b,a){strret="";strret=b;while(strret.length<a){if(strret.substring(0,1)!="-"){strret="0"+strret}else{strret=strret.substring(0,1)+"0"+strret.substring(1,strret.length)}}return(strret)}function deletezeroes(a){strret="";strret=a;while(strret.substring(0,1)=="0"&&strret.length>1){strret=strret.substring(1,strret.length)}if(strret.substring(0,2)=="-0"){strret="-"+deletezeroes(strret.substring(1,strret.length))}return(strret)}faded=false;function fade(a){if(a=="wizard"){if(!faded){faded=true}else{faded=false}}var b=document.getElementById(a);if(b==null){return}if(b.FadeState==null){b.FadeState=-2}if(b.FadeState==1||b.FadeState==-1){b.FadeState=b.FadeState==1?-1:1;b.FadeTimeLeft=TimeToFade-b.FadeTimeLeft}else{b.FadeState=b.FadeState==2?-1:1;b.FadeTimeLeft=TimeToFade;setTimeout("animateFade("+new Date().getTime()+",'"+a+"')",33)}}function animateFade(d,a){var b=new Date().getTime(),f=b-d,c=document.getElementById(a),e;if(c.FadeTimeLeft<=f){c.style.opacity=c.FadeState==1?"1":"0";c.style.filter="alpha(opacity = "+(c.FadeState==1?"100":"0")+")";c.FadeState=c.FadeState==1?2:-2;return}c.FadeTimeLeft-=f;e=c.FadeTimeLeft/TimeToFade;if(c.FadeState==1){e=1-e}c.style.opacity=e;c.style.filter="alpha(opacity = "+(e*100)+")";setTimeout("animateFade("+b+",'"+a+"')",33)}function crear_link_save(a){var c="",e=""+airori,d,f="",b="";if(e.length<=3){e=fillstr(e,3)}else{e=e.substring(0,3)}c=c+e;e=""+airdest;if(e.length<=3){e=fillstr(e,3)}else{e=e.substring(0,3)}c=c+e;e=""+zoom;if(e.length<=2){e=fillstr(e,2)}else{e=e.substring(0,2)}c=c+e;e=""+valorzoom;if(e.length<=2){e=fillstr(e,2)}else{e=e.substring(0,2)}c=c+e;e=""+dir;if(e.length<=2){e=fillstr(e,2)}else{e=e.substring(0,2)}c=c+e;e=""+angulo;if(e.length<=3){e=fillstr(e,3)}else{e=e.substring(0,3)}c=c+e;e=""+point.x*1000000;if(e.length<10){e=fillstr(e,10)}else{e=e.substring(0,10)}c=c+e;e=""+point.y*1000000;if(e.length<10){e=fillstr(e,10)}else{e=e.substring(0,10)}c=c+e;e=""+vel*1000000;if(e.length<=3){e=fillstr(e,3)}else{e=e.substring(0,3)}c=c+e;e=""+fuel;if(e.length<=4){e=fillstr(e,4)}else{e=e.substring(0,4)}c=c+e;c=c+""+level;e=""+tiempo;if(e.length<=4){e=fillstr(e,4)}else{e=e.substring(0,4)}c=c+e;if(run){c=c+"1"}else{c=c+"0"}if(motor){c=c+"1"}else{c=c+"0"}if(azul){c=c+"1"}else{c=c+"0"}if(pause){c=c+"1"}else{c=c+"0"}if(estrellado){c=c+"1"}else{c=c+"0"}if(ruta.length<=16){for(d=0;d<ruta.length;d++){e=""+ruta[d].x*1000000;if(e.length<10){e=fillstr(e,10)}else{e=e.substring(0,10)}f=f+e;e=""+ruta[d].y*1000000;if(e.length<10){e=fillstr(e,10)}else{e=e.substring(0,10)}f=f+e}}else{for(d=0;d<8;d++){e=""+ruta[d].x*1000000;if(e.length<10){e=fillstr(e,10)}else{e=e.substring(0,10)}f=f+e;e=""+ruta[d].y*1000000;if(e.length<10){e=fillstr(e,10)}else{e=e.substring(0,10)}f=f+e}decuantoencuanto=(ruta.length-8)/8;for(d=0;d<8;d++){indic=7+Math.round(decuantoencuanto*(d+1));e=""+ruta[indic].x*1000000;if(e.length<10){e=fillstr(e,10)}else{e=e.substring(0,10)}f=f+e;e=""+ruta[indic].y*1000000;if(e.length<10){e=fillstr(e,10)}else{e=e.substring(0,10)}f=f+e}}c=c+f;suma=0;for(d=0;d<c.length;d++){suma=suma+c.charCodeAt(d)}e=""+suma;if(e.length<=5){e=fillstr(e,5)}else{e=e.substring(0,5)}c=c+e;c="?g="+c;if(document.URL.indexOf("?")>0){b=document.URL.substring(0,document.URL.indexOf("?"))+c}else{b=document.URL+c}if(a){return(b+"")}else{return(c+"")}}function read_link_save(a){aeropuertosvisitados.splice(0,aeropuertosvisitados.length);read_link_save_2(a);loadstring="";acabodecargar=true;msgEstatico()}function read_link_save_2(j){var l=deletezeroes(j.substring(0,3)),c,a,h,b,g,f,e;airori=parseInt(l);latori=aeropuertos[airori][2];lonori=aeropuertos[airori][1];l=deletezeroes(j.substring(3,6));airdest=parseInt(l);latdest=aeropuertos[airdest][2];londest=aeropuertos[airdest][1];l=deletezeroes(j.substring(6,8));zoom=parseInt(l);l=deletezeroes(j.substring(8,10));valorzoom=parseInt(l);dir=parseInt(j.substring(10,12));angulo=parseInt(j.substring(12,15));sumay=0;sumax=0;l=deletezeroes(j.substring(15,25));point.x=parseInt(l)/1000000;l=deletezeroes(j.substring(25,35));point.y=parseInt(l)/1000000;point=new GPoint(point.x,point.y);l=deletezeroes(j.substring(35,38));vel=parseInt(l)/1000000;velaalcanzar=vel;l=deletezeroes(j.substring(38,42));fuel=parseInt(l);l=deletezeroes(j.substring(42,43));level=parseInt(l);leve.src="plane/lev"+level+".jpg";l=deletezeroes(j.substring(43,47));tiempo=parseInt(l);if(j.substring(47,48)==1){run=true}else{run=false}if(j.substring(48,49)==1){motor=true;botononoff.src="plane/on.jpg"}else{motor=false;botononoff.src="plane/off.jpg"}if(j.substring(49,50)==1){azul=true;botonhelp.src="plane/azuloff.jpg"}else{azul=false;quitaballons();botonhelp.src="plane/azulon.jpg"}if(j.substring(50,51)==1){botonpause.src="plane/pauseon.jpg";pause=true}else{botonpause.src="plane/pauseoff.jpg";pause=false;acabodecargar=false}if(j.substring(51,52)==1){estrellado=true;vionimg.src="plane/plof.gif"}else{estrellado=false;ponImagen()}a=j.substring(52,j.length-5);ruta.splice(0,ruta.length);for(c=0;c<a.length/20;c=c+1){l=a.substring(10*(c*2),10*((c*2)+1));h=deletezeroes(l);b=parseInt(h)/1000000;l=a.substring(10*((c*2)+1),10*((c*2)+2));g=deletezeroes(l);f=parseInt(g)/1000000;ruta[ruta.length]=new GPoint(b,f)}ruta.splice(ruta.length-1,ruta.length);velmarc.style.height=vel*100000*2.5;fuelmarc.style.height=fuel/20;timemarc.style.height=tiempo/40;altumarc.style.height=zoom*13;e=aeropuertos[airdest][aeropuertos[airdest].length-2].getPoint().distanceFrom(aeropuertos[airori][aeropuertos[airori].length-2].getPoint())/1000;panel_texto(e);map.setCenter(new GLatLng(point.y,point.x),valorzoom-zoom);fade("wizard")}function recargar(b,a){window.location=a}function grabacercadeaeropuerto(){if(!grabaceraer){return}if(zoom==0){return}var e=lejaniaDest(point.y,point.x),c=new Array(),b,a=crear_link_save(false),f=false;if(e<105&&e>100){c[c.length]=airdest;grabaceraer=false;window.setTimeout(function(){grabaceraer=true},segsingrabar);a=a.substring(1,a.length);c[c.length]=a;c[c.length]="Near final in "+aeropuertos[airdest][0]+" ("+(e+"").substring(0,5)+"kms)";for(b=0;b<aeropuertosvisitados.length;b++){if(aeropuertosvisitados[b][0]==airdest){f=true;aeropuertosvisitados[b][1]=a}}if(!f){aeropuertosvisitados[aeropuertosvisitados.length]=c}}}function graba100kmaeropuerto(){if(!graba100aer){return}if(zoom==0){return}graba100aer=false;var a=Number.MAX_VALUE,p=new Array(),e=new Array(),c=-1,m,g,o,b=false,f=new Array(),l,n,h;for(m=0;m<aeropuertos.length;m++){o=lejaniaAir(m,point.y,point.x);if(o>3){if(o<a&&m!=airdest){c=m;a=o}}}e[e.length]=c;p[p.length]=a;a=Number.MAX_VALUE;c=-1;for(g=0;g<1;g++){for(m=0;m<aeropuertos.length;m++){o=lejaniaAir(m,point.y,point.x);if(o>3){if(o>p[g]&&o<a){c=m;a=o}}}if(c!=airdest){e[e.length]=c;p[p.length]=a}a=Number.MAX_VALUE;c=-1}for(m=0;m<e.length;m++){if(p[m]<105&&p[m]>100){f[f.length]=e[m];l=crear_link_save(false);l=l.substring(1,l.length);window.setTimeout(function(){graba100aer=true},segsingrabar);f[f.length]=l;f[f.length]="Near "+aeropuertos[e[m]][0]+"("+(p[m]+"").substring(0,5)+"kms)";actu=false;for(g=0;g<aeropuertosvisitados.length;g++){if(aeropuertosvisitados[g][0]==e[m]){if(!(g==0&&aeropuertosvisitados[g][aeropuertosvisitados[g].length-1].indexOf("Begin in")!=-1)){actu=true;aeropuertosvisitados[g][1]=l;aeropuertosvisitados[g][2]=f[f.length-1];b=true}}}if(!actu){aeropuertosvisitados[aeropuertosvisitados.length]=f;b=true}}}if(b){window.setTimeout(function(){graba100aer=true},segsingrabar/3)}else{n=Number.MAX_VALUE;for(m=0;m<p.length;m++){if(Math.abs(100-p[m])<n){n=Math.round(Math.abs(100-p[m]))}}h=n*90;if(h<1000){h=1000}window.setTimeout(function(){graba100aer=true},h)}}function grabaaeropuerto(){if(!grabaaer){return}if(zoom>0){return}var d=new Array(),b=-1,a,c;for(c=0;c<aeropuertos.length;c++){poli=aeropuertos[c][aeropuertos[c].length-1];if(contiene(poli,aeropuertos[c][aeropuertos[c].length-3])){b=c;break}}if(b==-1){return}d[d.length]=b;grabaaer=false;a=crear_link_save(false);window.setTimeout(function(){grabaaer=true},segsingrabar);a=a.substring(1,a.length);d[d.length]=a;if(b==airori){if(aeropuertosvisitados.length>0){d[d.length]="Refuel in "+aeropuertos[b][0]}else{d[d.length]="Begin in "+aeropuertos[b][0]}}else{d[d.length]="Refuel in "+aeropuertos[b][0]}actu=false;for(c=1;c<aeropuertosvisitados.length;c++){if(aeropuertosvisitados[c][0]==b){actu=true;aeropuertosvisitados[c][1]=a;aeropuertosvisitados[c][2]=d[d.length-1]}}if(!actu){aeropuertosvisitados[aeropuertosvisitados.length]=d}}function retomavuelo(b){if(b>=0&&aeropuertosvisitados[b]!=null){loadstring="";var a=aeropuertosvisitados[b][1].substring(2,aeropuertosvisitados[b][1].length);read_link_save_2(a);quitaRuta("map.setCenter(new GLatLng(point.y,point.x), valorzoom-zoom)");ponerMsgs()}}for(k=0;k<ballons.length;k++){bools[bools.length]=false}function sgte_ballons(){cb=cb+1;if(cb>ballons.length-1){cb=-1}}function sgte_ballons_aleat(){bools[cb]=true;var a=Math.floor(Math.random()*ballons.length),b=0;while(bools[a]&&b<5000){a=Math.floor(Math.random()*ballons.length);b=b+1}if(b>=5000){ballonoff=true}else{cb=a}}function put_ballons(){if(azul){if(cb>=0){fillballon(ballons[cb][0],ballons[cb][1],ballons[cb][2],ballons[cb][5]);openballon(ballons[cb][3],ballons[cb][4]);sgte_ballons_aleat()}}}function closeballon(){fade("ballon");muevefuera();clsballon.style.display="none";ballon.style.display="";var a=Math.floor(Math.random()*10);window.setTimeout(function(){put_ballons()},delaybm+(a*1000))}function fillballon(c,b,a,d){iconballon.src=a;titleballon.innerHTML=c;txtballon.innerHTML=b;ballonground.src="plane/"+d}function openballon(a,b){if(!ballonoff){ballon.style.left=a;ballon.style.top=b;clsballon.style.display="";if(ballon.style.display=="none"){ballon.style.opacity="0";ballon.style.display=""}fade("ballon")}}function quitaballons(){if(!ballonoff){ballonoff=true;if(parseFloat(ballon.style.opacity)>0.05){fade("ballon");muevefuera()}}}function muevefuera(){window.setTimeout(function(){ballon.style.left="-500px";ballon.style.top="-500px"},1100)}function tiempoatras(){};