function SkyObserver(){var s,d,ut,g,kt,ft,c,et,dt,v,gt,ni,ti,ii,ri,ui,fi,y,l,ei,oi,si,hi,n,h,ci,li,ot,r,st,ai,p,vi,ht,ct,yi,pi,wi,bi,lt,w,at,ki,vt,yt,e,er=0,di=1,gi=2,nr=1.5707915,pt=1.5707866,or=.005775518328,sr=149597870.691,nt=0,tr=1,nu=2,hr=3,tu=4,iu=5,ru=6,uu=7,cr=8,fu=9,a=10,wt=-2,i=0,o=1,tt=2451545,ir=6378.14,bt=.99664714164317492,lr=.5833,ar=.25,vr=-6,yr=205,pr=206,wr=200,br=201,kr=202,dr=203,rr=[{fD:0,fM:0,fM1:1,fF:0,cs:6288774,cc:-20905355},{fD:2,fM:0,fM1:-1,fF:0,cs:1274027,cc:-3699111},{fD:2,fM:0,fM1:0,fF:0,cs:658314,cc:-2955968},{fD:0,fM:0,fM1:2,fF:0,cs:213618,cc:-569925},{fD:0,fM:1,fM1:0,fF:0,cs:-185116,cc:48888},{fD:0,fM:0,fM1:0,fF:2,cs:-114332,cc:-3149},{fD:2,fM:0,fM1:-2,fF:0,cs:58793,cc:246158},{fD:2,fM:-1,fM1:-1,fF:0,cs:57066,cc:-152138},{fD:2,fM:0,fM1:1,fF:0,cs:53322,cc:-170733},{fD:2,fM:-1,fM1:0,fF:0,cs:45758,cc:-204586},{fD:0,fM:1,fM1:-1,fF:0,cs:-40923,cc:-129620},{fD:1,fM:0,fM1:0,fF:0,cs:-34720,cc:108743},{fD:0,fM:1,fM1:1,fF:0,cs:-30383,cc:104755},{fD:2,fM:0,fM1:0,fF:-2,cs:15327,cc:10321},{fD:0,fM:0,fM1:1,fF:2,cs:-12528,cc:0},{fD:0,fM:0,fM1:1,fF:-2,cs:10980,cc:79661},{fD:4,fM:0,fM1:-1,fF:0,cs:10675,cc:-34782},{fD:0,fM:0,fM1:3,fF:0,cs:10034,cc:-23210},{fD:4,fM:0,fM1:-2,fF:0,cs:8548,cc:-21636},{fD:2,fM:1,fM1:-1,fF:0,cs:-7888,cc:24208},{fD:2,fM:1,fM1:0,fF:0,cs:-6766,cc:30824},{fD:1,fM:0,fM1:-1,fF:0,cs:-5163,cc:-8379},{fD:1,fM:1,fM1:0,fF:0,cs:4987,cc:-16675},{fD:2,fM:-1,fM1:1,fF:0,cs:4036,cc:-12831},{fD:2,fM:0,fM1:2,fF:0,cs:3994,cc:-10445},{fD:4,fM:0,fM1:0,fF:0,cs:3861,cc:-11650},{fD:2,fM:0,fM1:-3,fF:0,cs:3665,cc:14403},{fD:0,fM:1,fM1:-2,fF:0,cs:-2689,cc:-7003},{fD:2,fM:0,fM1:-1,fF:2,cs:-2602,cc:0},{fD:2,fM:-1,fM1:-2,fF:0,cs:2390,cc:10056},{fD:1,fM:0,fM1:1,fF:0,cs:-2348,cc:6322},{fD:2,fM:-2,fM1:0,fF:0,cs:2236,cc:-9884},{fD:0,fM:1,fM1:2,fF:0,cs:-2120,cc:5751},{fD:0,fM:2,fM1:0,fF:0,cs:-2069,cc:0},{fD:2,fM:-2,fM1:-1,fF:0,cs:2048,cc:-4950},{fD:2,fM:0,fM1:1,fF:-2,cs:-1773,cc:4130},{fD:2,fM:0,fM1:0,fF:2,cs:-1595,cc:0},{fD:4,fM:-1,fM1:-1,fF:0,cs:1215,cc:-3958},{fD:0,fM:0,fM1:2,fF:2,cs:-1110,cc:0},{fD:3,fM:0,fM1:-1,fF:0,cs:-892,cc:3258},{fD:2,fM:1,fM1:1,fF:0,cs:-810,cc:2616},{fD:4,fM:-1,fM1:-2,fF:0,cs:759,cc:-1897},{fD:0,fM:2,fM1:-1,fF:0,cs:-713,cc:-2117},{fD:2,fM:2,fM1:-1,fF:0,cs:-700,cc:2354},{fD:2,fM:1,fM1:-2,fF:0,cs:691,cc:0},{fD:2,fM:-1,fM1:0,fF:-2,cs:596,cc:0},{fD:4,fM:0,fM1:1,fF:0,cs:549,cc:-1423},{fD:0,fM:0,fM1:4,fF:0,cs:537,cc:-1117},{fD:4,fM:-1,fM1:0,fF:0,cs:520,cc:-1571},{fD:1,fM:0,fM1:-2,fF:0,cs:-487,cc:-1739},{fD:2,fM:1,fM1:0,fF:-2,cs:-399,cc:0},{fD:0,fM:0,fM1:2,fF:-2,cs:-381,cc:-4421},{fD:1,fM:1,fM1:1,fF:0,cs:351,cc:0},{fD:3,fM:0,fM1:-2,fF:0,cs:-340,cc:0},{fD:4,fM:0,fM1:-3,fF:0,cs:330,cc:0},{fD:2,fM:-1,fM1:2,fF:0,cs:327,cc:0},{fD:0,fM:2,fM1:1,fF:0,cs:-323,cc:1165},{fD:1,fM:1,fM1:-1,fF:0,cs:299,cc:0},{fD:2,fM:0,fM1:3,fF:0,cs:294,cc:0},{fD:2,fM:0,fM1:-1,fF:-2,cs:0,cc:8752}],ur=[{fD:0,fM:0,fM1:0,fF:1,cs:5128122},{fD:0,fM:0,fM1:1,fF:1,cs:280602},{fD:0,fM:0,fM1:1,fF:-1,cs:277693},{fD:2,fM:0,fM1:0,fF:-1,cs:173237},{fD:2,fM:0,fM1:-1,fF:1,cs:55413},{fD:2,fM:0,fM1:-1,fF:-1,cs:46271},{fD:2,fM:0,fM1:0,fF:1,cs:32573},{fD:0,fM:0,fM1:2,fF:1,cs:17198},{fD:2,fM:0,fM1:1,fF:-1,cs:9266},{fD:0,fM:0,fM1:2,fF:-1,cs:8822},{fD:2,fM:-1,fM1:0,fF:-1,cs:8216},{fD:2,fM:0,fM1:-2,fF:-1,cs:4324},{fD:2,fM:0,fM1:1,fF:1,cs:4200},{fD:2,fM:1,fM1:0,fF:-1,cs:-3359},{fD:2,fM:-1,fM1:-1,fF:1,cs:2463},{fD:2,fM:-1,fM1:0,fF:1,cs:2211},{fD:2,fM:-1,fM1:-1,fF:-1,cs:2065},{fD:0,fM:1,fM1:-1,fF:-1,cs:-1870},{fD:4,fM:0,fM1:-1,fF:-1,cs:1828},{fD:0,fM:1,fM1:0,fF:1,cs:-1794},{fD:0,fM:0,fM1:0,fF:3,cs:-1749},{fD:0,fM:1,fM1:-1,fF:1,cs:-1565},{fD:1,fM:0,fM1:0,fF:1,cs:-1491},{fD:0,fM:1,fM1:1,fF:1,cs:-1475},{fD:0,fM:1,fM1:1,fF:-1,cs:-1410},{fD:0,fM:1,fM1:0,fF:-1,cs:-1344},{fD:1,fM:0,fM1:0,fF:-1,cs:-1335},{fD:0,fM:0,fM1:3,fF:1,cs:1107},{fD:4,fM:0,fM1:0,fF:-1,cs:1021},{fD:4,fM:0,fM1:-1,fF:1,cs:833},{fD:0,fM:0,fM1:1,fF:-3,cs:777},{fD:4,fM:0,fM1:-2,fF:1,cs:671},{fD:2,fM:0,fM1:0,fF:-3,cs:607},{fD:2,fM:0,fM1:2,fF:-1,cs:596},{fD:2,fM:-1,fM1:1,fF:-1,cs:491},{fD:2,fM:0,fM1:-2,fF:1,cs:-451},{fD:0,fM:0,fM1:3,fF:-1,cs:439},{fD:2,fM:0,fM1:2,fF:1,cs:422},{fD:2,fM:0,fM1:-3,fF:-1,cs:421},{fD:2,fM:1,fM1:-1,fF:1,cs:-366},{fD:2,fM:1,fM1:0,fF:1,cs:-351},{fD:4,fM:0,fM1:0,fF:1,cs:331},{fD:2,fM:-1,fM1:1,fF:1,cs:315},{fD:2,fM:-2,fM1:0,fF:-1,cs:302},{fD:0,fM:0,fM1:1,fF:3,cs:-283},{fD:2,fM:1,fM1:1,fF:-1,cs:-229},{fD:1,fM:1,fM1:0,fF:-1,cs:223},{fD:1,fM:1,fM1:0,fF:1,cs:223},{fD:0,fM:1,fM1:-2,fF:-1,cs:-220},{fD:2,fM:1,fM1:-1,fF:-1,cs:-220},{fD:1,fM:0,fM1:1,fF:1,cs:-185},{fD:2,fM:-1,fM1:-2,fF:-1,cs:181},{fD:0,fM:1,fM1:2,fF:1,cs:-177},{fD:4,fM:0,fM1:-2,fF:-1,cs:176},{fD:4,fM:-1,fM1:-1,fF:-1,cs:166},{fD:1,fM:0,fM1:1,fF:-1,cs:-164},{fD:4,fM:0,fM1:1,fF:-1,cs:132},{fD:1,fM:0,fM1:-1,fF:-1,cs:-119},{fD:4,fM:-1,fM1:0,fF:-1,cs:115},{fD:2,fM:-2,fM1:0,fF:1,cs:107}],gr=[[[252.250906,149474.0722491,.0003035,18e-9],[.38709831,0,0,0],[.20563175,20407e-9,-283e-10,-18e-11],[7.004986,.0018215,-181e-7,56e-9],[48.330893,1.1861883,.00017542,215e-9],[77.456119,1.5564776,.00029544,9e-9]],[[181.979801,58519.2130302,.00031014,15e-9],[.72332982,0,0,0],[.00677192,-47765e-9,981e-10,46e-11],[3.394662,.0010037,-88e-8,-7e-9],[76.67992,.9011206,.00040618,-93e-9],[131.563703,1.4022288,-.00107618,-5678e-9]],[[100.466457,36000.7698278,.00030322,2e-8],[1.000001018,0,0,0],[.01670863,-42037e-9,-1267e-10,14e-11],[0,0,0,0],[0,0,0,0],[102.937348,1.7195366,.00045688,-18e-9]],[[355.433,19141.6964471,.00031052,16e-9],[1.523679342,0,0,0],[.09340065,90484e-9,-806e-10,-25e-11],[1.849726,-.0006011,1276e-8,-7e-9],[49.558093,.7720959,1557e-8,2267e-9],[336.060234,1.8410449,.00013477,536e-9]],[[34.351519,3036.3027748,.0002233,37e-9],[5.202603209,1913e-10,0,0],[.04849793,.000163225,-4714e-10,-201e-11],[1.303267,-.0054965,466e-8,-2e-9],[100.464407,1.0209774,.00040315,404e-9],[14.331207,1.6126352,.00103042,-4464e-9]],[[50.077444,1223.5110686,.00051908,-3e-8],[9.554909192,-2139e-9,4e-9,0],[.05554814,-.000346641,-6436e-10,34e-10],[2.488879,-.0037362,-1519e-8,87e-9],[113.665503,.877088,-.00012176,-2249e-9],[93.057237,1.9637613,.00083753,4928e-9]],[[314.055005,429.8640561,.0003039,26e-9],[19.218446062,-372e-10,98e-11,0],[.04638122,-27293e-9,789e-10,24e-11],[.773197,.0007744,3749e-8,-92e-9],[74.005957,.5211278,.00133947,18484e-9],[173.005291,1.486379,.00021406,434e-9]],[[304.348665,219.8833092,.00030882,18e-9],[30.110386869,-1663e-10,69e-11,0],[.00945575,6033e-9,0,-5e-11],[1.769953,-.0093082,-708e-8,27e-9],[131.784057,1.1022039,.00025952,-637e-9],[48.120276,1.4262957,.00038434,2e-8]]],it,u,b,f,k,fr,rt,eu,t;fi=function(){return k},this.getName=fi,ui=function(n){var r=34,e=parseInt(n.substring(1,4),10),h=parseInt(n.substring(5,7),10),c=parseInt(n.substring(8,10),10),t=e+h/60+c/3600,l,a,i;t<0||t>180||(n.substring(11,12)=="W"&&(t*=-1),it=new s(t,o),e=parseInt(n.substring(12,14),10),h=parseInt(n.substring(15,17),10),c=parseInt(n.substring(18,20),10),t=e+h/60+c/3600,t<0||t>90)||(n.substring(21,22)=="S"&&(t*=-1),u=new s(t,o),b=n.substring(22,27),n.substring(27,28)=="N"&&(b*=-1),n=n.substring(0,22)+n.substring(28),r-=6,l=n.substring(22,25),l=="XXX"?f=-getTimezoneOffset():(f=parseInt(l,10),n.substring(25,26)=="N"&&(f*=-1)),a=n.substring(26,27).charCodeAt()-"0".charCodeAt(),i=n.substring(27,28).charCodeAt(),i-=i>"9".charCodeAt()?"A".charCodeAt()-10:"0".charCodeAt(),k=n.length==r?null:n.substring(r),yt(),vt(a,i))},this.parseLocation=ui,ri=function(n){var u=34,i,f=parseInt(n.substring(12,14),10),o=parseInt(n.substring(15,17),10),s=n.substring(21,22),h,t,r,c,l;return i=e(f,2)+"°"+e(o,2)+"'"+s+" ",f=parseInt(n.substring(1,4),10),o=parseInt(n.substring(5,7),10),s=n.substring(11,12),i+=e(f,3)+"°"+e(o,2)+"'"+s+" ",n=n.substring(0,22)+n.substring(28),u-=6,h=n.substring(22,25),h=="XXX"?t=-getTimezoneOffset():(t=parseInt(h,10),n.substring(25,26)=="N"&&(t*=-1)),t/=60,r=Math.floor(t),c=t-r,i+="UT",t>0?i+="+"+r:t<0&&(i+=r),c!=0&&(i+=":"+60*c),l=n.length==u?null:n.substring(u),l+"--"+i},this.parseLocationToString=ri,oi=function(){var n="C",r=it.getDegrees(),h,c,p,i,l,a,w,v,y,o,s;return r>=0?h="E":(r*=-1,h="W"),c=Math.floor(r),p=Math.floor(60*(r-c)),n+=e(c,3)+"d"+e(p,2)+"m00s"+h,i=u.getDegrees(),i>=0?l="N":(i*=-1,l="S"),a=Math.floor(i),w=Math.floor(60*(i-a)),n+=e(a,2)+"d"+e(w,2)+"m00s"+l,n+="00000P",f<0?(v=-f,y="N"):(v=f,y="P"),n+=e(v,3)+y,t instanceof ft?(o=gi,s=t.getSubType()):t instanceof et?(o=di,s=0):(o=er,s=0),n+=o,n+=s,n+=k},this.toString=oi,dt=function(n,t,i,r,e,h,c){it=new s(n,o),u=new s(t,o),b=i,f=r,k=c,yt(),vt(e,h)},this.setLocation=dt,gt=function(n,t,i,r){var u=-lr;return(n==nt||n==a)&&(u-=ar),ki(n,t,i,r,u)},this.getRiseAndSetTimes=gt,ni=function(n,i,r){var p=f+lt(n,i,r),w=t.getMinutesInDay(n,i,r),e=l(n,i,r,0,-p,-30),o=l(n,i,r,0,w-p,-30),b=new g,d,y;e=b.UT_to_TDB(e),o=b.UT_to_TDB(o);var s=v(e),h=v(o),u,k=0,a=!1,c=-1;s>315&&(s-=360),h>315&&(h-=360),d=function(n){return ot(v(n)-u,360)};do c++,u=c*90,s<=u&&u<h&&(a=!0,y=new ut(.0001,e,s-u,o,h-u),y.zeroSeekingFunction=d,k=(y.getXAtZero()-e)*24);while(c<3&&!a);return a?at(n,i,r,w,k,c,0):null},this.getLunarPhaseEvent=ni,v=function(n){var t=p(a,n),i=p(nt,n);return r(t.longitude.getDegrees()-i.longitude.getDegrees(),360)},this.getLunarPhase=v,ii=function(n,i,r,u,e,o){var s=f;return t.isDuringDST(n,i,r,0,0,!1)&&(s+=t.getDSTChangeInMinutes(n,i)),l(n,i,r,u,e-s,o)},this.getUTFromLocalTime=ii,ti=function(n){return(1-h(v(n)))/2},this.getLunarIlluminatedFraction=ti,ei=function(n){return n/864e5+2440587.5},this.julianDayFromMillis=ei,l=function(n,t,i,r,u,f){r==null&&(r=0),u==null&&(u=0),f==null&&(f=0);var e=y(n,t,i);return e+(r+(u+f/60)/60)/24-.5},this.julianDay=l,y=function(n,t,i){while(t<1)t+=12,--n;while(t>12)t-=12,++n;var r;return r=n>1582||n==1582&&(t>10||t==10&&i>=15)?367*n-Math.floor(7*(n+Math.floor((t+9)/12))/4)-3*Math.floor((Math.floor((n+Math.floor((t-9)/7))/100)+1)/4)+Math.floor(275*t/9)+i+1721029:367*n-7*(n+(t+9)/12)/4+275*t/9+i+1721027,Math.floor(r)},this.julianDayInt=y,s=function(n,t,u){var f;this.getRadians=function(){return f},this.getDegrees=function(){return this.convertFromRadians(f,o)},this.convertToRadians=function(n,t){switch(t){case i:return n;case o:return n/180*Math.PI}},this.convertFromRadians=function(n,t){switch(t){case i:return n;case o:return n*180/Math.PI}},this.tan=function(){return f==0?0:Math.tan(f)},this.sin=function(){return Math.sin(f)},this.cos=function(){return Math.cos(f)},this.add_nonneg=function(n){return new s(f+n.getRadians(),i,wt)},u==null&&t<0&&(u=t,t=i),n==null&&(n=0),f=u==wt?r(this.convertToRadians(n,t),Math.PI*2):this.convertToRadians(n,t)},c=function(n,t,u,f,e){this.longitude=new s(n,t,wt),this.latitude=new s(u,f),this.radius=e,this.translate=function(n){var l=n.longitude,f=n.latitude,e=n.radius,a=this.longitude,o=this.latitude,s=this.radius,t=s*o.cos()*a.cos()-e*f.cos()*l.cos(),u=s*o.cos()*a.sin()-e*f.cos()*l.sin(),h=s*o.sin()-e*f.sin(),v=r(Math.atan2(u,t),Math.PI*2),y=Math.atan2(h,Math.sqrt(t*t+u*u));return new c(v,i,y,i,Math.sqrt(t*t+u*u+h*h))}},ft=function(n,t){var f=0,nt=1,l=2,tt=3,it=4,rt=5,ut=6,ft=7,et=8,ot=9,st=10,ht=11,ct=12,a=13,lt=14,at=15,vt=16,yt=17,v=18,p=[5,5,1,1,1,0,5,5,1,1,0,1,1,2,1,1,1,1,1],e=[0,0,0,0,0,-1,5,0,0,0,-1,0,0,0,0,6,5,5,0],w=[10,10,10,10,10,4,4,3,9,11,4,9,10,3,10,10,4,4,4],o=[1,1,1,1,9,1,1,1,8,1,1,1,1,1,1,1,1,5,1],b=[2,2,2,2,2,2,2,-1,2,2,2,2,2,2,2,2,2,2,2],k=[5,5,5,5,1,5,5,5,1,5,0,1,1,1,5,1,1,1,5],s=[0,0,0,0,0,0,4,0,0,0,-1,0,0,0,6,6,5,5,0],d=[3,3,3,2,3,10,9,10,4,2,10,4,3,11,2,4,9,10,10],h=[1,1,1,1,9,1,1,1,6,1,1,1,5,1,1,15,1,5,1],g=[3,3,3,3,3,3,3,-1,3,3,3,3,3,2,3,3,2,2,2],r,u,c=n,i=t;this.getSubType=function(){return i},this.isDuringDST=function(n,t,c,y,nt,tt){var it,rt,ut,ft,et,ot,st;if(n<1900)return!1;if(n<2007&&i==a&&(i=v),it=w[i],e[i]<0)rt=o[i];else for(rt=r(n,it,e[i],p[i]);rt<o[i];)rt+=7;if(n==2e3&&(i==f||i==l)&&(it=8,rt=27),ut=d[i],s[i]<0)ft=h[i];else for(ft=r(n,ut,s[i],k[i]);ft<h[i];)ft+=7;if(it<ut){if(t<it||t>ut)return!1;if(t>it&&t<ut)return!0}else{if(t>ut&&t<it)return!1;if(t<ut||t>it)return!0}return(et=this.getDSTChangeInMinutes(),t==it)?(ot=u(b[i]),tt&&(nt-=et,nt<0&&(nt+=60,--y)),c<rt||c==rt&&y<ot?!1:!0):(st=u(g[i]),tt||(nt+=et,nt>=60&&(nt-=60,++y)),c>ft||c==ft&&y>=st?!1:!0)},this.getDSTChangeInMinutes=function(){return c==630&&i==f?30:60},this.getMinutesInDay=function(n,t,i){var r=this.isDuringDST(n,t,i,0,0,!1),u=this.isDuringDST(n,t,i+1,0,0,!1);return r==u?1440:r?1440+this.getDSTChangeInMinutes(n,t):1440-this.getDSTChangeInMinutes(n,t)},r=function(n,t,i,r){function e(n,t){if(n==1582&&t==10)return 21;switch(t){case 9:case 4:case 6:case 11:return 30;case 2:return y(n,3,1)-y(n,2,1);default:return 31}}function f(n,t){var i=n%t;return i<0&&t>0||i>0&&t<0?t+i:i}function o(n,t,i){return f(y(n,t,i)+1,7)}for(var u=f(i-o(n,t,1)+7,7)+r*7-6;u>e(n,t);)u-=7;return n==1582&&t==10&&u>4&&(u+=10),u},u=function(n){return n>0?n:(n=c/60-n,n<1?n=1:n>3&&(n=3),n)}},et=function(){this.isDuringDST=function(n,t,i,r,u){var e=new Date,o;return e.setDate(1),e.setMonth(0),o=new Date(n,t,i,r,u),e.getTimezoneOffset()!=o.getTimezoneOffset()},this.getMinutesInDay=function(n,t,i){var r=this.isDuringDST(n,t,i,0,0),u=this.isDuringDST(n,t,i+1,0,0);return r==u?1440:r?1440-this.getDSTChangeInMinutes():1440+this.getDSTChangeInMinutes()},this.getDSTChangeInMinutes=function(){return 0}},kt=function(){this.isDuringDST=function(){return!1},this.getMinutesInDay=function(){return 1440}},g=function(){function t(t){var u=(t-tt)/365.25+2e3,i=Math.floor(u),s=n(i-1),r=n(i),h=n(i+1),f=r-s,e=h-r,c=e-f,o=u-i;return r+o*(f+e+o*c)/2}function n(n){var r,t;return n<-500?(t=(n-1820)/100,-20+32*t*t):n<500?(t=n/100,10583.6-1014.41*t+33.78311*t*t-5.952053*t*t*t-.1798452*t*t*t*t+.022174192*t*t*t*t*t+.0090316521*t*t*t*t*t*t):n<1600?(t=(n-1e3)/100,1574.2-556.01*t+71.23472*t*t+.319781*t*t*t-.8503463*t*t*t*t-.005050998*t*t*t*t*t+.0083572073*t*t*t*t*t*t):n<2015?i[n-1600]:n<2050?(r=n-2e3,69.92+.32217*r+.005589*r*r):n<2150?-20+32*Math.pow((n-1820)/100,2)-.5628*(2150-n):(t=(n-1820)/100,-20+32*t*t)}var i=[120.3,120.3,120.5,120.6,120.7,120.9,121,121.1,121.3,121.5,121.6,121.9,122,122.2,122.5,122.7,122.9,123.2,123.4,123.7,124,119,115,110,106,102,98,95,91,88,85,82,79,77,74,72,70,67,65,63,62,60,58,57,55,54,53,51,50,49,48,47,46,45,44,43,42,41,40,38,37,36,35,34,33,32,31,30,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,14,13,12,12,11,11,10,10,10,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,13,13,13,13,13,13,13,14,14,14,14,14,14,14,15,15,15,15,15,15,15,16,16,16,16,16,16,16,16,16,16,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,16,16,16,16,15,15,14,14,13.7,13.4,13.1,12.9,12.7,12.6,12.5,12.5,12.5,12.5,12.5,12.5,12.5,12.5,12.5,12.5,12.5,12.4,12.3,12.2,12,11.7,11.4,11.1,10.6,10.2,9.6,9.8,8.6,8,7.5,7,6.6,6.3,6,5.8,5.7,5.6,5.6,5.6,5.7,5.8,5.9,6.1,6.2,6.3,6.5,6.6,6.8,6.9,7.1,7.2,7.3,7.4,7.5,7.6,7.7,7.7,7.8,7.8,7.88,7.82,7.54,6.97,6.4,6.02,5.41,4.1,2.92,1.82,1.61,.1,-1.02,-1.28,-2.69,-3.24,-3.64,-4.54,-4.71,-5.11,-5.4,-5.42,-5.2,-5.46,-5.46,-5.79,-5.63,-5.64,-5.8,-5.66,-5.87,-6.01,-6.19,-6.64,-6.44,-6.47,-6.09,-5.76,-4.66,-3.74,-2.72,-1.54,-.02,1.24,2.64,3.86,5.37,6.14,7.75,9.13,10.46,11.53,13.36,14.65,16.01,17.2,18.24,19.06,20.25,20.95,21.16,22.25,22.41,23.03,23.49,23.62,23.68,24.49,24.34,24.08,24.02,24,23.87,23.95,23.86,23.93,23.73,23.92,23.96,24.02,24.33,24.83,25.3,25.7,26.24,26.77,27.28,27.78,28.25,28.71,29.15,29.57,29.97,30.36,30.72,31.07,31.35,31.68,32.18,32.68,33.15,33.59,34,34.47,35.03,35.73,36.54,37.43,38.29,39.2,40.18,41.17,42.23,43.37,44.49,45.48,46.46,47.52,48.53,49.59,50.54,51.38,52.17,52.96,53.79,54.34,54.87,55.32,55.82,56.3,56.86,57.57,58.31,59.12,59.98,60.79,61.63,62.3,62.97,63.47,63.82,64.09,64.3,64.47,64.57,64.68,64.85,65.15,66.5,67.9,69.2,70.6,71.9,73.3,74.7];this.UT_to_TDB=function(n){for(var i=n,r=0;r<5;r++)i=n+t(i)/86400;return i},this.TDB_to_UT=function(n){return n-t(n)/86400}},ut=function(n,t,i,r,u){var h=n,o=t,f=i,s=r,e=u;this.getXAtZero=function(){for(var i=0,t,n;++i<=8;){if(t=o-f/(e-f)*(s-o),n=this.zeroSeekingFunction(t),Math.abs(n)<=h)break;f<e&&n<0||f>e&&n>0?(o=t,f=n):(s=t,e=n)}return t}},d=function(n,i,r,u,o,s,h){this.format=function(n){if(n){var t=this.hour==0?12:this.hour>12?this.hour-12:this.hour;return t+":"+e(this.minute,2)+" "+(this.hour<12?"AM":"PM")}return"TODO: Dates"},this.getUT=function(){return l(this.year,this.month,this.day,this.hour,this.minute-f-this.dstOffset,0)},this.year=n,this.month=i,this.day=r,this.hour=u,this.minute=o,this.type=s,this.value=h,this.dstOffset=0;var c=t.getMinutesInDay(n,i,r);c<1440?t.isDuringDST(n,i,r,u,o,!1)&&(this.dstOffset=1440-c,this.minute+=this.dstOffset,this.minute>=60?(this.minute-=60,this.hour++):this.dstOffset=0):c>1440?t.isDuringDST(n,i,r,u,o,!0)?this.dstOffset=c-1440:(this.dstOffset=0,this.minute-=c-1440,this.minute<0&&(this.minute+=60,this.hour--)):this.dstOffset=t.isDuringDST(n,i,r,12,0,!1)?t.getDSTChangeInMinutes(n,i):0},yt=function(){var n=u.getRadians(),t,i;Math.abs(n)>nr?t=n:Math.abs(n)>pt?(i=hi(n),t=si(i*nr,n,i*pt,n,Math.atan(bt*Math.tan(pt)))):t=Math.atan(bt*u.tan()),fr=bt*Math.sin(t)+b/ir/1e3*u.sin(),rt=Math.cos(t)+b/ir/1e3*u.cos()},vt=function(n,i){t=n==gi?new ft(f,i):n==di?new et:new kt},ki=function(n,i,r,e,o){var b=[],tt=n==nt&&o<=vr,k=l(i,r,e,0,-f-lt(i,r,e),-30),st=t.getMinutesInDay(i,r,e),it=st/1440,y=6,p,v,g,ot,vt;(n==a||Math.abs(u.getDegrees())>60)&&(y*=2);var rt=k,h=w(n,rt).latitude.getDegrees(),c,s,ht,ct=-90,ft,et,yt=function(t){return w(n,t).latitude.getDegrees()-o};for(v=1;v<=y;v++)for(v==y/2&&(ct=h),c=k+v/y*it,s=w(n,c).latitude.getDegrees(),ht=s,p=(Math.abs(h-o)<1||Math.abs(s-o)<1)&&Math.abs(h-s)<2?10:1,g=1;g<=p;g++)p>1&&(g<p?(c=k+(v-1+g/p)/y*it,s=w(n,c).latitude.getDegrees()):(c=k+v/y*it,s=ht)),(h<=o&&o<s||s<o&&o<=h)&&(et=h<s?tt?yr:wr:tt?pr:br,ot=new ut(.001,rt,h-o,c,s-o),ot.zeroSeekingFunction=yt,ft=ot.getXAtZero(),vt=(ft-k)*24,b.push(at(i,r,e,st,vt,et,ft))),rt=c,h=s;return tt||b.length!=0||(ct>o?b.push(new d(i,r,e,0,0,kr,0)):b.push(new d(i,r,e,0,0,dr,0))),b},at=function(n,t,i,r,u,f,e){var o,s;return u<0?u=0:u>=r/60&&(u=r/60-.01),o=Math.floor(u),s=Math.floor((u-o)*60),new d(n,t,i,o,s,f,e)},e=function(n,t){for(var i=""+n;i.length<t;)i="0"+i;return i},w=function(n,t){var i=new g,r=bi(n,i.UT_to_TDB(t),n==a);return pi(r,t)},lt=function(n,i,r){return t.isDuringDST(n,i,r,0,0,!1)?t.getDSTChangeInMinutes(n,i):0},bi=function(n,t,i){var u=p(n,t,!0),r=wi(u,t);return i&&(r=yi(r,t)),r},wi=function(n){var u=n.longitude,f=n.latitude,e=.9174932300180596,o=.39775139581279662,s=r(Math.atan2(u.sin()*e-f.tan()*o,u.cos()),Math.PI*2),h=Math.asin(ct(f.sin()*e+f.cos()*o*u.sin()));return new c(s,i,h,i,n.radius)},pi=function(n,t){var e=n.radius,o=ht(t).getRadians(),s=n.longitude.getRadians(),r=n.latitude.getRadians(),f=o-s,h=Math.atan2(Math.sin(f),Math.cos(f)*u.sin()-Math.tan(r)*u.cos()),l=Math.asin(ct(u.sin()*Math.sin(r)+u.cos()*Math.cos(r)*Math.cos(f)));return new c(h,i,l,i,e)},yi=function(n,t){var h=new g,l=h.TDB_to_UT(t),a=ht(l).getRadians(),e=n.radius,r=Math.sin(8.79412/648e3*Math.PI)/e,o=n.longitude.getRadians(),u=n.latitude.getRadians(),f=a-o,s=Math.atan2(-rt*r*Math.sin(f),Math.cos(u)-rt*r*Math.cos(f)),v=Math.atan2((Math.sin(u)-fr*r)*Math.cos(s),Math.cos(u)-rt*r*Math.cos(f));return new c(o+s,i,v,i,e)},ct=function(n){return n<-1?-1:n>1?1:n},ht=function(n){var i=n-tt,t=i/36525,u=r(280.46061837+360.98564736629*i+.000387933*t*t-t*t*t/3871e4,360);return new s(u,o).add_nonneg(it)},vi=function(t){for(var r=(t-tt)/36525,e=r*r,l=e*r,b=l*r,y=218.3164477+481267.88123421*r-.0015786*e+l/538841-b/65194e3+.0001944,nt=297.8501921+445267.1114034*r-.0018819*e+l/545868-b/113065e3,it=357.5291092+35999.0502909*r-.0001536*e+l/24490000357,k=134.9633964+477198.8675055*r+.0087414*e+l/69699-b/14712e3,p=93.272095+483202.0175233*r-.0036539*e-l/3526e3+b/86331e4,d=119.75+131.849*r,rt=53.09+479264.29*r,ut=313.45+481266.484*r,w=1-.002516*r-74e-7*e,g=w*w,s=0,a=0,v=0,u,i,f=0;f<rr.length;f++)i=rr[f],u=i.fD*nt+i.fM*it+i.fM1*k+i.fF*p,i.fM==-2||i.fM==2?(s+=i.cs*g*n(u),v+=i.cc*g*h(u)):i.fM==-1||i.fM==1?(s+=i.cs*w*n(u),v+=i.cc*w*h(u)):(s+=i.cs*n(u),v+=i.cc*h(u));for(s+=3958*n(d)+1962*n(y-p)+318*n(rt),s=y+s/1e6,v=385000.56+v/1e3,f=0;f<ur.length;f++)i=ur[f],u=i.fD*nt+i.fM*it+i.fM1*k+i.fF*p,a+=i.fM==-2||i.fM==2?i.cs*g*n(u):i.fM==-1||i.fM==1?i.cs*w*n(u):i.cs*n(u);return a+=-2235*n(y)+382*n(ut)+175*n(d-p)+175*n(d+p)+127*n(y-k)-115*n(y+k),a/=1e6,new c(s,o,a,o,v/sr)},p=function(n,t,i){var r,s,u,f,e,o,h;if(n==a)r=vi(t);else{if(s=st(hr,t),u=st(n,t),u==null)return null;r=u.translate(s)}if(i){for(f=r.radius,o=0;o<(n==a?1:3);o++)h=t-or*f,e=p(n,h,!1),f=e.radius;r=e}return r},ai=function(n,t){for(var a=n-tr,i={},v=(t-tt)/36525,l=1,u=[0,0,0,0,0,0],f,c,e=0;e<4;e++){for(f=0;f<6;f++)u[f]+=gr[a][f][e]*l;l*=v}i.L=r(u[0],360),i.a=u[1],i.e=u[2],i.i=u[3],i.OMEGA=r(u[4],360),i.pi=r(u[5],360),i.omega=r(i.pi-i.OMEGA,360),i.M=r(i.L-i.pi,360);var s=li(i.M),h=s,o=s;for(c=0;c<100;c++){if(o=s+i.e*Math.sin(h),Math.abs(ot(o-h,Math.PI*2))<1e-6)break;h=o}return i.v=r(2*ci(Math.sqrt((1+i.e)/(1-i.e))*Math.tan(o/2)),360),i.C=r(i.v-i.M,360),i},st=function(t,u){var o;if(tr<=t&&t<=cr){var f=ai(t,u),y=h(f.i),d=n(f.i),p=h(f.OMEGA),w=n(f.OMEGA),e=f.a*(1-f.e*f.e)/(1+f.e*h(f.v)),b=f.v+f.pi-f.OMEGA,k=h(b),s=n(b),l=e*(p*k-w*s*y),v=e*(w*k+p*s*y),g=e*s*d,tt=r(Math.atan2(v,l),Math.PI*2),it=Math.atan2(g,Math.sqrt(l*l+v*v));o=new c(tt,i,it,i,e)}else{if(t==nt)return new c(0,i,0,i,0);t==a&&(o=null)}return o},r=function(n,t){return n-Math.floor(n/t)*t},ot=function(n,t){var i=n-Math.floor(n/t)*t;return i>=t/2&&(i-=t),i},li=function(n){return n*Math.PI/180},ci=function(n){return Math.atan(n)/Math.PI*180},h=function(n){return Math.cos(n/180*Math.PI)},n=function(n){return Math.sin(n/180*Math.PI)},hi=function(n){return n<0?-1:n>0?1:0},si=function(n,t,i,r,u){return n==i?r:r+(t-n)*(u-r)/(i-n)}}function startEventMessages(){var n=$("#almcFooterMessage");if(events.length==0){n.text("");return}events.length==1?(eventsInterval!=null&&(window.clearInterval(eventsInterval),eventsInterval=null),n.text(events[0])):(eventIndex=-1,showNextMessage(),window.clearInterval(eventsInterval),eventsInterval=window.setInterval(showNextMessage,5e3))}function showNextMessage(){eventIndex++,eventIndex>=events.length&&(eventIndex=0),$("#almcFooterMessage").text(events[eventIndex])}function setEventMessages(){var n="";$.each(events,function(){n+="<p>"+this+"<\/p>"}),$(".tskyEvents").html(n)}function loadEvents(n){function t(n){if(n==null||n.length<7||n.length>8)return 0;n.length==7&&(n="0"+n);var t=parseInt(n.substring(0,2),10),i=parseInt(n.substring(2,4),10),r=parseInt(n.substring(4),10);return observer.julianDayInt(r,t,i)}function i(i){events=[];var r=i.split(/\r\n|\r|\n/);$.each(r,function(i,r){var u,f,e;r.substring(0,1)!="#"&&(u=r.split("\t"),u.length==3&&(f=t(u[0]),e=t(u[1]),f<=n&&n<=e&&events.push(u[2])))}),almcPrefix=="almc"?startEventMessages():setEventMessages()}$.when(eventData).then(i)}function update(n){var k=["January","February","March","April","May","June","July","August","September","October","November","December"],s=1/48,y=1/24,f=new Date,b;f.setDate(f.getDate()+bias);var t=f.getFullYear(),i=f.getMonth()+1,r=f.getDate(),p=observer.julianDayFromMillis(f.getTime()),w=observer.julianDayInt(t,i,r),d=observer.getLunarPhase(p),a=observer.getLunarIlluminatedFraction(p);if(a=Math.round(a*100),updatePhase(d,a,t,i,r),$(".almcLocation").text(observer.getName()),w!=lastUpdate||n){loadEvents(w),b=k[i-1]+" "+r+", "+t,$(".almcDay").val(b);var h=observer.getUTFromLocalTime(t,i,r,0,0,0),c=observer.getUTFromLocalTime(t,i,r+1,0,0,0),g=c-h,e=c,o=h,l=!1,v=!1;function u(n,t){var w=!0,i=Number.NaN,r=Number.NaN,a=$("#"+t+"Rise"),p=$("#"+t+"Set"),f,b,u;a.text("—"),p.text("—"),f=t==almcPrefix+"Sun",b=t==almcPrefix+"Moon",$.each(n,function(n,t){var u=t.format(!0);t.type==200?(a.text(u),i=t.getUT(),f&&i-s>=h&&(o=i-s)):t.type==201?(p.text(u),r=t.getUT(),f&&i-s<=c&&(e=r+s)):f&&t.type==202?l=!0:t.type==203&&(w=!1,f&&(v=!0))}),a.text()=="—"?a.css("text-align","center"):a.css("text-align",""),p.text()=="—"?p.css("text-align","center"):p.css("text-align",""),f?isNaN(i)||isNaN(r)||(r-i<y?v=!0:r-i>g-y&&(l=!0)):b||(u="not visible",w&&(!isNaN(r)&&isNaN(i)?i=h:!isNaN(i)&&isNaN(r)&&(r=c),v?u="visible":!l&&i<r?(i>e&&(u="visible"),i<o?u="morning":r>e&&(u="evening")):isNaN(i)&&isNaN(r)?u="all night":!l&&i>r&&(i<o?u="visible":i>e&&r<o?u="midnight":i<e&&r>o?u="all night":i>e?u="morning":r<o&&(u="evening"))),$("#"+t+"Visibility").text(u))}u(observer.getRiseAndSetTimes(0,t,i,r),almcPrefix+"Sun"),u(observer.getRiseAndSetTimes(10,t,i,r),almcPrefix+"Moon"),u(observer.getRiseAndSetTimes(1,t,i,r),almcPrefix+"Mercury"),u(observer.getRiseAndSetTimes(2,t,i,r),almcPrefix+"Venus"),u(observer.getRiseAndSetTimes(4,t,i,r),almcPrefix+"Mars"),u(observer.getRiseAndSetTimes(5,t,i,r),almcPrefix+"Jupiter"),u(observer.getRiseAndSetTimes(6,t,i,r),almcPrefix+"Saturn")}lastUpdate=observer.julianDayInt(t,i,r),bias==0&&intervalID==null?intervalID=window.setInterval(update,6e5):intervalID!=null&&(window.clearInterval(intervalID),intervalID=null)}function redrawMoonPhase(){var o=.55228474983079345,s=$("#"+almcPrefix+"PhaseOverlay"),h=s[0],f=s.width(),c=moonPhase>180,e=moonPercent,t;c||(e=100-e);var i=f,n=f/2,r=n*o,u=e*f/100,l=(u-n)*o;typeof FlashCanvas!="undefined"&&FlashCanvas.initElement(h),t=h.getContext("2d"),t.clearRect(0,0,i,i),t.fillStyle="rgba(0,0,0,0.5)",t.beginPath(),t.moveTo(n,0),c?(t.bezierCurveTo(n+r,0,i,n-r,i,n),t.bezierCurveTo(i,n+r,n+r,i,n,i)):(t.bezierCurveTo(n-r,0,0,n-r,0,n),t.bezierCurveTo(0,n+r,n-r,i,n,i)),t.bezierCurveTo(n+l,i,u,n+r,u,n),t.bezierCurveTo(u,n-r,n+l,0,n,0),t.fill()}function updatePhase(n,t,i,r,u){var e,f,o;if(moonPhase=n,moonPercent=t,e=n>180,e||(t=100-t),o=observer.getLunarPhaseEvent(i,r,u),o!=null)switch(o.type){case 0:f="New";break;case 1:f="First quarter";break;case 2:f="Full";break;case 3:f="Last quarter"}else n>=0&&n<90?f="Waxing crescent":n>=90&&n<180?f="Waxing gibbous":n>=180&&n<270?f="Waning gibbous":n>=270&&n<=360&&(f="Waning crescent");redrawMoonPhase(),$("#"+almcPrefix+"MoonPhase").text(f),e||(t=100-t),$("#"+almcPrefix+"MoonDisk").text(t+"%")}function remoteDBSearch(n){$.get(atlasQueryUrl,{city:n,version:"6",locale:"en-US"},function(n){try{var t=n.split(/\r\n|\r|\n/),i;if(t.length==0||t.length==1&&t[0]=="[END-OF-LIST]"){openSearch(!0,"No matching cities found. Check spelling and try again.");return}$.each(t,function(n,t){if(t!="[END-OF-LIST]"){var r=decodeURIComponent(t);i+="<option value='"+r+"'>"+observer.parseLocationToString(r)+"<\/option>"}}),$("#almcResultsList").html(i),endSearch()}catch(r){openSearch(!0,"An error occurred in the application. Try again later.")}},"text").error(function(n,t){var r;t=="error"?r="An error occurred while searching. Try again later.":t=="timeout"&&(r="Timed out while searching. Try again later."),openSearch(!0,r)})}function buildList(n,t){var i="<ul>",r=$("option",n);r.each(function(){var n=$(this),t=n.text().split("--");i+="<li><div>"+t[0]+"<\/div><div class='almcLocPart'>"+t[1]+'<\/div><span class="almcValue">'+n.val()+"<\/span><\/li>"}),i+="<\/ul>",t.html(i);t.on("click","li",function(){var i=$(this);$("li.listSelected",t).removeClass("listSelected"),i.addClass("listSelected"),n.val(i.find("span.almcValue").html())})}function openSearch(n,t){var f=$("#almcLocationDialog"),i=f.find(".almcError"),r,u,e;t!=null?(i.text(t),i.show()):(i.text(""),i.hide()),r=$("#almcCityName"),u=$("#almcStateName"),r.removeClass("almcErrorField"),n||(r.val(""),u.val("")),e=getDialogCSS(400),$.blockUI({message:f,css:e,onBlock:function(){u.chosen({allow_single_deselect:!0})}})}function validateSearch(){var i=$("#almcCityName"),r=$("#almcZipCode"),n=r.val(),t;return i.val()!=""||n!=""?!0:n!=""&&n.length==5?!0:(t=$("#almcLocationDialog .almcError"),t.text("City or 5-digit ZIP is required"),t.show(),i.addClass("almcErrorField"),r.addClass("almcErrorField"),!1)}function doSearch(){var t,n,i,r;validateSearch()&&(t=$("#almcCityName").val(),t!=null&&t!=""?(t=$("#almcCityName").val(),n=$("#almcStateName").val(),$.trim(n)=="---"&&(n=null),n!=null&&n!=""?(n.indexOf(" - ")!=-1&&(n=n.split(" - ")[1]),i=t+", "+n):i=t):i=$("#almcZipCode").val(),$("#almcSpinnerMessage").text("Searching..."),r=getDialogCSS(400),$.blockUI({message:$("#almcSearchSpinner"),css:r}),remoteDBSearch(i))}function endSearch(){var t=$("#almcResultsList"),i=$("#almcResultsCustomList"),n;buildList(t,i),n=getDialogCSS(500),$.blockUI({message:$("#almcSearchResults"),css:n})}function selectLocation(){var n=$("#almcResultsList option:selected").val();localStorage.setItem("almcLoc",n),observer.parseLocation(n),clearWatcher(),update(!0),$.unblockUI()}function setLocation(n){var i;if(supportLocation){var t=n.coords,r=t.latitude,u=t.longitude,f=(new Date).getTimezoneOffset();observer.setLocation(u,r,0,-f,1,0,"Current location"),i=observer.toString(),localStorage.setItem("almcLoc",i),localStorage.setItem("almcLastLocUpdate",+new Date),update(!0),gettingLocation&&($.unblockUI(),gettingLocation=!1)}}function setLocationError(n){if(gettingLocation){switch(n.code){case n.PERMISSION_DENIED:openSearch(!0,"Access to geolocation has been denied. Grant access and try again, or search by location below.");break;case n.POSITION_UNAVAILABLE:openSearch(!0,"Geolocation is currently unavailable. Try again later, or search by location below.");break;case n.TIMEOUT:openSearch(!0,"Timed out trying to get location. Try again later, or search by location below.")}clearWatcher()}}function clearWatcher(){supportLocation&&(startWatcherId!=null&&(window.clearTimeout(startWatcherId),startWatcherId=null),watcherId!=null&&(navigator.geolocation.clearWatch(watcherId),watcherId=null),localStorage.setItem("almcCurrentLoc",!1))}function openEnterCoordinates(){var n=$("#almcEnterCoordinates"),t=n.find(".almcError"),i;t.html(""),t.hide(),$("#almcLatDegree").val(""),$("#almcLatMinute").val(""),$("#almcLongDegree").val(""),$("#almcLongMinute").val(""),$("#almcLatDir").val("N"),$("#almcLongDir").val("W"),$("#almcOffset").val(""),i=getDialogCSS(400),$.blockUI({message:n,css:i})}function endEnterCoordinates(){var u=$("#almcEnterCoordinates .almcError"),n,o,f,s,e,t,i,r,h;if(u.html(""),u.hide(),n="",o=parseInt($("#almcLatDegree").val()),isNaN(o)&&(n+="Latitude must be a number."),f=parseInt($("#almcLatMinute").val()),isNaN(f)&&(f=0),s=parseInt($("#almcLongDegree").val()),isNaN(s)&&(n+=(n==""?"":"<br>")+"Longitude must be a number."),e=parseInt($("#almcLongMinute").val()),isNaN(e)&&(e=0),t=o+f/60,i=s+e/60,(t<0||t>90)&&(n+=(n==""?"":"<br>")+"Latitude must be between 0 and 90 degrees."),(i<0||i>180)&&(n+=(n==""?"":"<br>")+"Longitude must be between 0 and 180 degrees."),r=parseFloat($("#almcOffset").val()),(isNaN(r)||r<-12||r>14)&&(n+=(n==""?"":"<br>")+"UTC Offset must be a number between -12 and 14 hours."),n!=""){u.html(n),u.show();return}$("#almcLatDir option:selected").val()=="S"&&(t*=-1),$("#almcLongDir option:selected").val()=="W"&&(i*=-1),observer.setLocation(i,t,0,r*60,0,0,"Entered location"),h=observer.toString(),localStorage.setItem("almcLoc",h),clearWatcher(),update(!0),$.unblockUI()}function loadAlmanac(){var h=new Pikaday({field:$("#"+almcPrefix+"Day")[0],minDate:new Date(1900,0,1),maxDate:new Date(2099,11,31),onSelect:function(){var t=this.getDate(),r=new Date(t.getFullYear(),t.getMonth(),t.getDate()),n=new Date,i;n=new Date(n.getFullYear(),n.getMonth(),n.getDate()),i=(r-n)/864e5,bias=i,update()}}),t="",i,n,r,u;if($.each(countries,function(){t+="<option>"+this+"<\/option>"}),i=$("#almcStateName"),i.html(t),$(".almcChange").click(function(){return $(".almcMenu").hide(),openSearch(),!1}),$(".almcSearchAgain").click(function(){openSearch(!0)}),$("#almcBackToSearch").click(function(){return openSearch(),!1}),$("#almcSearch").click(function(){return doSearch(),!1}),$(".almcCoordinates").click(function(){return $(".almcMenu").hide(),openEnterCoordinates(),!1}),$("#almcCoordOK").click(function(){return endEnterCoordinates(),!1}),$('#almcLocationDialog input[type="text"]').keyup(function(n){if(n.keyCode==13)return doSearch(),!1}),$('#almcEnterCoordinates input[type="text"]').keyup(function(n){if(n.keyCode==13)return endEnterCoordinates(),!1}),$("#almcSelectLocation").click(function(){selectLocation()}),$(".almcCancel").click(function(){return $.unblockUI(),!1}),observer=new SkyObserver,n=localStorage.getItem("almcLoc"),n?observer.parseLocation(n):observer.parseLocation("C088d14m00sW43d02m00sN00000P360N2DWaukesha, WI"),supportLocation){if($(".almcCurrentLocation").click(function(){$(".almcMenu").hide(),$("#almcSpinnerMessage").text("Getting location...");var n=getDialogCSS(400);return $.blockUI({message:$("#almcSearchSpinner"),css:n}),gettingLocation=!0,localStorage.setItem("almcCurrentLoc",!0),watcherId!=null&&(navigator.geolocation.clearWatch(watcherId),watcherId=null),watcherId=navigator.geolocation.watchPosition(setLocation,setLocationError,{timeout:1e4,maxAge:18e5}),!1}),r=localStorage.getItem("almcCurrentLoc"),u=localStorage.getItem("almcLastLocUpdate"),r=="true"){var o=+new Date,s=o-u,f=6e5-s,e=function(){watcherId=navigator.geolocation.watchPosition(setLocation,setLocationError,{timeout:1e4,maxAge:18e5}),startWatcherId=null};f<=0?e():startWatcherId=window.setTimeout(e,f)}}else $(".almcCurrentLocation").hide();update(),$(".almcLocation").click(function(){return $(".almcMenu").toggle(),!1}),$(document).click(function(){$(".almcMenu").hide()}),$(".almcBackDay").click(function(){return bias--,update(),!1}),$(".almcForwardDay").click(function(){return bias++,update(),!1}),almcPrefix=="almc"&&($(".almcTabs button").click(function(){var n=$(this),t=n.data("tab");return t=="almcSunMoon"&&redrawMoonPhase(),$(".almcTabs button").removeClass("selected"),n.addClass("selected"),$(".tab").hide(),$("#"+t).show(),!1}),$("#almanac").show(),redrawMoonPhase()),almcLoaded=!0}var moonPhase,moonPercent,almcLoaded;(function(n,t,i){"use strict";typeof t=="function"&&t.amd?t(function(t){var r="moment",u=t.defined&&t.defined(r)?t(r):undefined;return i(u||n.moment)}):n.Pikaday=i(n.moment)})(window,window.define,function(n){"use strict";var e=typeof n=="function",c=!!window.addEventListener,i=window.document,s=window.setTimeout,u=function(n,t,i,r){c?n.addEventListener(t,i,!!r):n.attachEvent("on"+t,i)},f=function(n,t,i,r){c?n.removeEventListener(t,i,!!r):n.detachEvent("on"+t,i)},w=function(n,t,r){var u;i.createEvent?(u=i.createEvent("HTMLEvents"),u.initEvent(t,!0,!1),u=o(u,r),n.dispatchEvent(u)):i.createEventObject&&(u=i.createEventObject(),u=o(u,r),n.fireEvent("on"+t,u))},b=function(n){return n.trim?n.trim():n.replace(/^\s+|\s+$/g,"")},r=function(n,t){return(" "+n.className+" ").indexOf(" "+t+" ")!==-1},k=function(n,t){r(n,t)||(n.className=n.className===""?t:n.className+" "+t)},d=function(n,t){n.className=b((" "+n.className+" ").replace(" "+t+" "," "))},l=function(n){return/Array/.test(Object.prototype.toString.call(n))},t=function(n){return/Date/.test(Object.prototype.toString.call(n))&&!isNaN(n.getTime())},g=function(n){return n%4==0&&n%100!=0||n%400==0},nt=function(n,t){return[31,g(n)?29:28,31,30,31,30,31,31,30,31,30,31][t]},h=function(n){t(n)&&n.setHours(0,0,0,0)},a=function(n,t){return n.getTime()===t.getTime()},o=function(n,i,r){var u,f;for(u in i)f=n[u]!==undefined,f&&typeof i[u]=="object"&&i[u].nodeName===undefined?t(i[u])?r&&(n[u]=new Date(i[u].getTime())):l(i[u])?r&&(n[u]=i[u].slice(0)):n[u]=o({},i[u],r):(r||!f)&&(n[u]=i[u]);return n},v={field:null,bound:undefined,format:"YYYY-MM-DD",defaultDate:null,setDefaultDate:!1,firstDay:0,minDate:null,maxDate:null,yearRange:10,minYear:0,maxYear:9999,minMonth:undefined,maxMonth:undefined,isRTL:!1,yearSuffix:"",showMonthAfterYear:!1,numberOfMonths:1,i18n:{previousMonth:"Previous Month",nextMonth:"Next Month",months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},onSelect:null,onOpen:null,onClose:null,onDraw:null},y=function(n,t,i){for(t+=n.firstDay;t>=7;)t-=7;return i?n.i18n.weekdaysShort[t]:n.i18n.weekdays[t]},tt=function(n,t,i,r,u){if(u)return'<td class="is-empty"><\/td>';var f=[];return r&&f.push("is-disabled"),i&&f.push("is-today"),t&&f.push("is-selected"),'<td data-day="'+n+'" class="'+f.join(" ")+'"><button class="pika-button" type="button">'+n+"<\/button><\/td>"},it=function(n,t){return"<tr>"+(t?n.reverse():n).join("")+"<\/tr>"},rt=function(n){return"<tbody>"+n.join("")+"<\/tbody>"},ut=function(n){for(var i=[],t=0;t<7;t++)i.push('<th scope="col"><abbr title="'+y(n,t)+'">'+y(n,t,!0)+"<\/abbr><\/th>");return"<thead>"+(n.isRTL?i.reverse():i).join("")+"<\/thead>"},ft=function(n){for(var o,t=n._o,r=n._m,u=n._y,c=u===t.minYear,a=u===t.maxYear,e='<div class="pika-title">',s,h,v=!0,y=!0,f=[],i=0;i<12;i++)f.push('<option value="'+i+'"'+(i===r?" selected":"")+(c&&i<t.minMonth||a&&i>t.maxMonth?"disabled":"")+">"+t.i18n.months[i]+"<\/option>");for(s='<div class="pika-label">'+t.i18n.months[r]+'<select class="pika-select pika-select-month">'+f.join("")+"<\/select><\/div>",l(t.yearRange)?(i=t.yearRange[0],o=t.yearRange[1]+1):(i=u-t.yearRange,o=1+u+t.yearRange),f=[];i<o&&i<=t.maxYear;i++)i>=t.minYear&&f.push('<option value="'+i+'"'+(i===u?" selected":"")+">"+i+"<\/option>");return h='<div class="pika-label">'+u+t.yearSuffix+'<select class="pika-select pika-select-year">'+f.join("")+"<\/select><\/div>",e+=t.showMonthAfterYear?h+s:s+h,c&&(r===0||t.minMonth>=r)&&(v=!1),a&&(r===11||t.maxMonth<=r)&&(y=!1),e+='<button class="pika-prev'+(v?"":" is-disabled")+'" type="button">'+t.i18n.previousMonth+"<\/button>",e+='<button class="pika-next'+(y?"":" is-disabled")+'" type="button">'+t.i18n.nextMonth+"<\/button>",e+="<\/div>"},et=function(n,t){return'<table cellpadding="0" cellspacing="0" class="pika-table">'+ut(n)+rt(t)+"<\/table>"},p=function(f){var o=this,h=o.config(f),l;o._onMouseDown=function(n){if(o._v){n=n||window.event;var t=n.target||n.srcElement;if(t){if(!r(t,"is-disabled")){if(r(t,"pika-button")&&!r(t,"is-empty")){o.setDate(new Date(o._y,o._m,parseInt(t.innerHTML,10))),h.bound&&s(function(){o.hide()},100);return}r(t,"pika-prev")?o.prevMonth():r(t,"pika-next")&&o.nextMonth()}if(r(t,"pika-select"))o._c=!0;else if(n.preventDefault)n.preventDefault();else return n.returnValue=!1,!1}}},o._onChange=function(n){n=n||window.event;var t=n.target||n.srcElement;t&&(r(t,"pika-select-month")?o.gotoMonth(t.value):r(t,"pika-select-year")&&o.gotoYear(t.value))},o._onInputChange=function(i){var r;i.firedBy!==o&&(e?(r=n(h.field.value,h.format),r=r&&r.isValid()?r.toDate():null):r=new Date(Date.parse(h.field.value)),o.setDate(t(r)?r:null),o._v||o.show())},o._onInputFocus=function(){o.show()},o._onInputClick=function(){o.show()},o._onInputBlur=function(){o._c||(o._b=s(function(){o.hide()},50)),o._c=!1},o._onClick=function(n){n=n||window.event;var t=n.target||n.srcElement,i=t;if(t){!c&&r(t,"pika-select")&&(t.onchange||(t.setAttribute("onchange","return;"),u(t,"change",o._onChange)));do if(r(i,"pika-single"))return;while(i=i.parentNode);o._v&&t!==h.trigger&&o.hide()}},o.el=i.createElement("div"),o.el.className="pika-single"+(h.isRTL?" is-rtl":""),u(o.el,"mousedown",o._onMouseDown,!0),u(o.el,"change",o._onChange),h.field&&(h.bound?i.body.appendChild(o.el):h.field.parentNode.insertBefore(o.el,h.field.nextSibling),u(h.field,"change",o._onInputChange),h.defaultDate||(h.defaultDate=e&&h.field.value?n(h.field.value,h.format).toDate():new Date(Date.parse(h.field.value)),h.setDefaultDate=!0)),l=h.defaultDate,t(l)?h.setDefaultDate?o.setDate(l,!0):o.gotoDate(l):o.gotoDate(new Date),h.bound?(this.hide(),o.el.className+=" is-bound",u(h.trigger,"click",o._onInputClick),u(h.trigger,"focus",o._onInputFocus),u(h.trigger,"blur",o._onInputBlur)):this.show()};return p.prototype={config:function(n){var i,r,u;return this._o||(this._o=o({},v,!0)),i=o(this._o,n,!0),i.isRTL=!!i.isRTL,i.field=i.field&&i.field.nodeName?i.field:null,i.bound=!!(i.bound!==undefined?i.field&&i.bound:i.field),i.trigger=i.trigger&&i.trigger.nodeName?i.trigger:i.field,r=parseInt(i.numberOfMonths,10)||1,i.numberOfMonths=r>4?4:r,t(i.minDate)||(i.minDate=!1),t(i.maxDate)||(i.maxDate=!1),i.minDate&&i.maxDate&&i.maxDate<i.minDate&&(i.maxDate=i.minDate=!1),i.minDate&&(h(i.minDate),i.minYear=i.minDate.getFullYear(),i.minMonth=i.minDate.getMonth()),i.maxDate&&(h(i.maxDate),i.maxYear=i.maxDate.getFullYear(),i.maxMonth=i.maxDate.getMonth()),l(i.yearRange)?(u=(new Date).getFullYear()-10,i.yearRange[0]=parseInt(i.yearRange[0],10)||u,i.yearRange[1]=parseInt(i.yearRange[1],10)||u):(i.yearRange=Math.abs(parseInt(i.yearRange,10))||v.yearRange,i.yearRange>100&&(i.yearRange=100)),i},toString:function(i){return t(this._d)?e?n(this._d).format(i||this._o.format):this._d.toDateString():""},getMoment:function(){return e?n(this._d):null},setMoment:function(t){e&&n.isMoment(t)&&this.setDate(t.toDate())},getDate:function(){return t(this._d)?new Date(this._d.getTime()):null},setDate:function(n,i){if(!n)return this._d=null,this.draw();if(typeof n=="string"&&(n=new Date(Date.parse(n))),t(n)){var r=this._o.minDate,u=this._o.maxDate;t(r)&&n<r?n=r:t(u)&&n>u&&(n=u),this._d=new Date(n.getTime()),h(this._d),this.gotoDate(this._d),this._o.field&&(this._o.field.value=this.toString(),w(this._o.field,"change",{firedBy:this})),i||typeof this._o.onSelect!="function"||this._o.onSelect.call(this,this.getDate())}},gotoDate:function(n){t(n)&&(this._y=n.getFullYear(),this._m=n.getMonth(),this.draw())},gotoToday:function(){this.gotoDate(new Date)},gotoMonth:function(n){isNaN(n=parseInt(n,10))||(this._m=n<0?0:n>11?11:n,this.draw())},nextMonth:function(){++this._m>11&&(this._m=0,this._y++),this.draw()},prevMonth:function(){--this._m<0&&(this._m=11,this._y--),this.draw()},gotoYear:function(n){isNaN(n)||(this._y=parseInt(n,10),this.draw())},setMinDate:function(n){this._o.minDate=n},setMaxDate:function(n){this._o.maxDate=n},draw:function(n){var u;if(this._v||n){var t=this._o,f=t.minYear,e=t.maxYear,i=t.minMonth,r=t.maxMonth;this._y<=f&&(this._y=f,!isNaN(i)&&this._m<i&&(this._m=i)),this._y>=e&&(this._y=e,!isNaN(r)&&this._m>r&&(this._m=r)),this.el.innerHTML=ft(this)+this.render(this._y,this._m),t.bound&&(this.adjustPosition(),t.field.type!=="hidden"&&s(function(){t.trigger.focus()},1)),typeof this._o.onDraw=="function"&&(u=this,s(function(){u._o.onDraw.call(u)},0))}},adjustPosition:function(){var u=this._o.trigger,n=u,e=this.el.offsetWidth,o=this.el.offsetHeight,s=window.innerWidth||i.documentElement.clientWidth,h=window.innerHeight||i.documentElement.clientHeight,c=window.pageYOffset||i.body.scrollTop||i.documentElement.scrollTop,t,r,f;if(typeof u.getBoundingClientRect=="function")f=u.getBoundingClientRect(),t=f.left+window.pageXOffset,r=f.bottom+window.pageYOffset;else for(t=n.offsetLeft,r=n.offsetTop+n.offsetHeight;n=n.offsetParent;)t+=n.offsetLeft,r+=n.offsetTop;t+e>s&&(t=t-e+u.offsetWidth),r+o>h+c&&(r=r-o-u.offsetHeight),this.el.style.cssText="position:absolute;left:"+t+"px;top:"+r+"px;"},render:function(n,i){var r=this._o,v=new Date,y=nt(n,i),u=new Date(n,i,1).getDay(),p=[],c=[],e,o,f,l;for(h(v),r.firstDay>0&&(u-=r.firstDay,u<0&&(u+=7)),e=y+u,o=e;o>7;)o-=7;for(e+=7-o,f=0,l=0;f<e;f++){var s=new Date(n,i,1+(f-u)),w=r.minDate&&s<r.minDate||r.maxDate&&s>r.maxDate,b=t(this._d)?a(s,this._d):!1,k=a(s,v),d=f<u||f>=y+u;c.push(tt(1+(f-u),b,k,w,d)),++l==7&&(p.push(it(c,r.isRTL)),c=[],l=0)}return et(r,p)},isVisible:function(){return this._v},show:function(){this._v||(this._o.bound&&u(i,"click",this._onClick),d(this.el,"is-hidden"),this._v=!0,this.draw(),typeof this._o.onOpen=="function"&&this._o.onOpen.call(this))},hide:function(){var n=this._v;n!==!1&&(this._o.bound&&f(i,"click",this._onClick),this.el.style.cssText="",k(this.el,"is-hidden"),this._v=!1,n!==undefined&&typeof this._o.onClose=="function"&&this._o.onClose.call(this))},destroy:function(){this.hide(),f(this.el,"mousedown",this._onMouseDown,!0),f(this.el,"change",this._onChange),this._o.field&&(f(this._o.field,"change",this._onInputChange),this._o.bound&&(f(this._o.trigger,"click",this._onInputClick),f(this._o.trigger,"focus",this._onInputFocus),f(this._o.trigger,"blur",this._onInputBlur))),this.el.parentNode&&this.el.parentNode.removeChild(this.el)}},p}),function(){var n,i,r,t,u,f={}.hasOwnProperty,e=function(n,t){function r(){this.constructor=n}for(var i in t)f.call(t,i)&&(n[i]=t[i]);return r.prototype=t.prototype,n.prototype=new r,n.__super__=t.prototype,n};t=function(){function n(){this.options_index=0,this.parsed=[]}return n.prototype.add_node=function(n){return n.nodeName.toUpperCase()==="OPTGROUP"?this.add_group(n):this.add_option(n)},n.prototype.add_group=function(n){var i,f,t,e,r,u;for(i=this.parsed.length,this.parsed.push({array_index:i,group:!0,label:this.escapeExpression(n.label),children:0,disabled:n.disabled}),r=n.childNodes,u=[],t=0,e=r.length;t<e;t++)f=r[t],u.push(this.add_option(f,i,n.disabled));return u},n.prototype.add_option=function(n,t,i){if(n.nodeName.toUpperCase()==="OPTION")return n.text!==""?(t!=null&&(this.parsed[t].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:n.value,text:n.text,html:n.innerHTML,selected:n.selected,disabled:i===!0?i:n.disabled,group_array_index:t,classes:n.className,style:n.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1},n.prototype.escapeExpression=function(n){var t,i;return n==null||n===!1?"":/[\&\<\>\"\'\`]/.test(n)?(t={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},i=/&(?!\w+;)|[\<\>\"\'\`]/g,n.replace(i,function(n){return t[n]||"&amp;"})):n},n}(),t.select_to_array=function(n){var f,r,i,e,u;for(r=new t,u=n.childNodes,i=0,e=u.length;i<e;i++)f=u[i],r.add_node(f);return r.parsed},i=function(){function n(t,i){(this.form_field=t,this.options=i!=null?i:{},n.browser_is_supported())&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers())}return n.prototype.set_default_values=function(){var n=this;return this.click_test_action=function(t){return n.test_active_click(t)},this.activate_action=function(t){return n.activate_field(t)},this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.result_single_selected=null,this.allow_single_deselect=this.options.allow_single_deselect!=null&&this.form_field.options[0]!=null&&this.form_field.options[0].text===""?this.options.allow_single_deselect:!1,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=this.options.enable_split_word_search!=null?this.options.enable_split_word_search:!0,this.group_search=this.options.group_search!=null?this.options.group_search:!0,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=this.options.single_backstroke_delete!=null?this.options.single_backstroke_delete:!0,this.max_selected_options=this.options.max_selected_options||Infinity,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=this.options.display_selected_options!=null?this.options.display_selected_options:!0,this.display_disabled_options=this.options.display_disabled_options!=null?this.options.display_disabled_options:!0},n.prototype.set_default_text=function(){return this.default_text=this.form_field.getAttribute("data-placeholder")?this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.options.placeholder_text_multiple||this.options.placeholder_text||n.default_multiple_text:this.options.placeholder_text_single||this.options.placeholder_text||n.default_single_text,this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||n.default_no_result_text},n.prototype.mouse_enter=function(){return this.mouse_on_container=!0},n.prototype.mouse_leave=function(){return this.mouse_on_container=!1},n.prototype.input_focus=function(){var t=this;if(this.is_multiple){if(!this.active_field)return setTimeout(function(){return t.container_mousedown()},50)}else if(!this.active_field)return this.activate_field()},n.prototype.input_blur=function(){var t=this;if(!this.mouse_on_container)return this.active_field=!1,setTimeout(function(){return t.blur_test()},100)},n.prototype.results_option_build=function(n){var i,t,r,f,u;for(i="",u=this.results_data,r=0,f=u.length;r<f;r++)t=u[r],i+=t.group?this.result_add_group(t):this.result_add_option(t),(n!=null?n.first:void 0)&&(t.selected&&this.is_multiple?this.choice_build(t):t.selected&&!this.is_multiple&&this.single_set_selected_text(t.text));return i},n.prototype.result_add_option=function(n){var t,i;return n.search_match?this.include_option_in_results(n)?(t=[],n.disabled||n.selected&&this.is_multiple||t.push("active-result"),!n.disabled||n.selected&&this.is_multiple||t.push("disabled-result"),n.selected&&t.push("result-selected"),n.group_array_index!=null&&t.push("group-option"),n.classes!==""&&t.push(n.classes),i=n.style.cssText!==""?' style="'+n.style+'"':"",'<li class="'+t.join(" ")+'"'+i+' data-option-array-index="'+n.array_index+'">'+n.search_text+"<\/li>"):"":""},n.prototype.result_add_group=function(n){return n.search_match||n.group_match?n.active_options>0?'<li class="group-result">'+n.search_text+"<\/li>":"":""},n.prototype.results_update_field=function(){return this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.result_single_selected=null,this.results_build(),this.results_showing?this.winnow_results():void 0},n.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},n.prototype.results_search=function(){return this.results_showing?this.winnow_results():this.results_show()},n.prototype.winnow_results=function(){var e,n,h,c,u,t,i,r,o,l,f,a,s;for(this.no_results_clear(),u=0,i=this.get_search_text(),e=i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),c=this.search_contains?"":"^",h=new RegExp(c+e,"i"),l=new RegExp(e,"i"),s=this.results_data,f=0,a=s.length;f<a;f++)n=s[f],n.search_match=!1,t=null,this.include_option_in_results(n)&&(n.group&&(n.group_match=!1,n.active_options=0),n.group_array_index!=null&&this.results_data[n.group_array_index]&&(t=this.results_data[n.group_array_index],t.active_options===0&&t.search_match&&(u+=1),t.active_options+=1),n.group&&!this.group_search||(n.search_text=n.group?n.label:n.html,n.search_match=this.search_string_match(n.search_text,h),n.search_match&&!n.group&&(u+=1),n.search_match?(i.length&&(r=n.search_text.search(l),o=n.search_text.substr(0,r+i.length)+"<\/em>"+n.search_text.substr(r+i.length),n.search_text=o.substr(0,r)+"<em>"+o.substr(r)),t!=null&&(t.group_match=!0)):n.group_array_index!=null&&this.results_data[n.group_array_index].search_match&&(n.search_match=!0)));return this.result_clear_highlight(),u<1&&i.length?(this.update_results_content(""),this.no_results(i)):(this.update_results_content(this.results_option_build()),this.winnow_results_set_highlight())},n.prototype.search_string_match=function(n,t){var u,i,r,f;if(t.test(n))return!0;if(this.enable_split_word_search&&(n.indexOf(" ")>=0||n.indexOf("[")===0)&&(i=n.replace(/\[|\]/g,"").split(" "),i.length))for(r=0,f=i.length;r<f;r++)if(u=i[r],t.test(u))return!0},n.prototype.choices_count=function(){var i,n,r,t;if(this.selected_option_count!=null)return this.selected_option_count;for(this.selected_option_count=0,t=this.form_field.options,n=0,r=t.length;n<r;n++)i=t[n],i.selected&&(this.selected_option_count+=1);return this.selected_option_count},n.prototype.choices_click=function(n){return n.preventDefault(),this.results_showing||this.is_disabled?void 0:this.results_show()},n.prototype.keyup_checker=function(n){var t,i;t=(i=n.which)!=null?i:n.keyCode,this.search_field_scale();switch(t){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:if(n.preventDefault(),this.results_showing)return this.result_select(n);break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:break;default:return this.results_search()}},n.prototype.container_width=function(){return this.options.width!=null?this.options.width:""+this.form_field.offsetWidth+"px"},n.prototype.include_option_in_results=function(n){return this.is_multiple&&!this.display_selected_options&&n.selected?!1:!this.display_disabled_options&&n.disabled?!1:n.empty?!1:!0},n.browser_is_supported=function(){return window.navigator.appName==="Microsoft Internet Explorer"?document.documentMode>=8:/iP(od|hone)/i.test(window.navigator.userAgent)?!1:/Android/i.test(window.navigator.userAgent)&&/Mobile/i.test(window.navigator.userAgent)?!1:!0},n.default_multiple_text="Select Some Options",n.default_single_text="Select an Option",n.default_no_result_text="No results match",n}(),n=jQuery,n.fn.extend({chosen:function(t){return i.browser_is_supported()?this.each(function(){var f,u;f=n(this),u=f.data("chosen"),t==="destroy"&&u?u.destroy():u||f.data("chosen",new r(this,t))}):this}}),r=function(i){function r(){return u=r.__super__.constructor.apply(this,arguments)}return e(r,i),r.prototype.setup=function(){return this.form_field_jq=n(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex,this.is_rtl=this.form_field_jq.hasClass("chosen-rtl")},r.prototype.set_up_html=function(){var t,i;return t=["chosen-container"],t.push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&t.push(this.form_field.className),this.is_rtl&&t.push("chosen-rtl"),i={"class":t.join(" "),style:"width: "+this.container_width()+";",title:this.form_field.title},this.form_field.id.length&&(i.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=n("<div />",i),this.is_multiple?this.container.html('<ul class="chosen-choices"><li class="search-field"><input type="text" value="'+this.default_text+'" class="default" autocomplete="off" style="width:25px;" /><\/li><\/ul><div class="chosen-drop"><ul class="chosen-results"><\/ul><\/div>'):this.container.html('<a class="chosen-single chosen-default" tabindex="-1"><span>'+this.default_text+'<\/span><div><b><\/b><\/div><\/a><div class="chosen-drop"><div class="chosen-search"><input type="text" autocomplete="off" /><\/div><ul class="chosen-results"><\/ul><\/div>'),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior(),this.form_field_jq.trigger("chosen:ready",{chosen:this})},r.prototype.register_observers=function(){var n=this;return this.container.bind("mousedown.chosen",function(t){n.container_mousedown(t)}),this.container.bind("mouseup.chosen",function(t){n.container_mouseup(t)}),this.container.bind("mouseenter.chosen",function(t){n.mouse_enter(t)}),this.container.bind("mouseleave.chosen",function(t){n.mouse_leave(t)}),this.search_results.bind("mouseup.chosen",function(t){n.search_results_mouseup(t)}),this.search_results.bind("mouseover.chosen",function(t){n.search_results_mouseover(t)}),this.search_results.bind("mouseout.chosen",function(t){n.search_results_mouseout(t)}),this.search_results.bind("mousewheel.chosen DOMMouseScroll.chosen",function(t){n.search_results_mousewheel(t)}),this.form_field_jq.bind("chosen:updated.chosen",function(t){n.results_update_field(t)}),this.form_field_jq.bind("chosen:activate.chosen",function(t){n.activate_field(t)}),this.form_field_jq.bind("chosen:open.chosen",function(t){n.container_mousedown(t)}),this.search_field.bind("blur.chosen",function(t){n.input_blur(t)}),this.search_field.bind("keyup.chosen",function(t){n.keyup_checker(t)}),this.search_field.bind("keydown.chosen",function(t){n.keydown_checker(t)}),this.search_field.bind("focus.chosen",function(t){n.input_focus(t)}),this.is_multiple?this.search_choices.bind("click.chosen",function(t){n.choices_click(t)}):this.container.bind("click.chosen",function(n){n.preventDefault()})},r.prototype.destroy=function(){return n(document).unbind("click.chosen",this.click_test_action),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},r.prototype.search_field_disabled=function(){return(this.is_disabled=this.form_field_jq[0].disabled,this.is_disabled)?(this.container.addClass("chosen-disabled"),this.search_field[0].disabled=!0,this.is_multiple||this.selected_item.unbind("focus.chosen",this.activate_action),this.close_field()):(this.container.removeClass("chosen-disabled"),this.search_field[0].disabled=!1,!this.is_multiple)?this.selected_item.bind("focus.chosen",this.activate_action):void 0},r.prototype.container_mousedown=function(t){if(!this.is_disabled&&(t&&t.type==="mousedown"&&!this.results_showing&&t.preventDefault(),!(t!=null&&n(t.target).hasClass("search-choice-close"))))return this.active_field?!this.is_multiple&&t&&(n(t.target)[0]===this.selected_item[0]||n(t.target).parents("a.chosen-single").length)&&(t.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),n(document).bind("click.chosen",this.click_test_action),this.results_show()),this.activate_field()},r.prototype.container_mouseup=function(n){if(n.target.nodeName==="ABBR"&&!this.is_disabled)return this.results_reset(n)},r.prototype.search_results_mousewheel=function(n){var t,i,r;return t=-((i=n.originalEvent)!=null?i.wheelDelta:void 0)||((r=n.originialEvent)!=null?r.detail:void 0),t!=null?(n.preventDefault(),n.type==="DOMMouseScroll"&&(t=t*40),this.search_results.scrollTop(t+this.search_results.scrollTop())):void 0},r.prototype.blur_test=function(){if(!this.active_field&&this.container.hasClass("chosen-container-active"))return this.close_field()},r.prototype.close_field=function(){return n(document).unbind("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},r.prototype.activate_field=function(){return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},r.prototype.test_active_click=function(t){return this.container.is(n(t.target).closest(".chosen-container"))?this.active_field=!0:this.close_field()},r.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=t.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():this.is_multiple||(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},r.prototype.result_do_highlight=function(n){var t,i,r,f,u;if(n.length){if(this.result_clear_highlight(),this.result_highlight=n,this.result_highlight.addClass("highlighted"),r=parseInt(this.search_results.css("maxHeight"),10),u=this.search_results.scrollTop(),f=r+u,i=this.result_highlight.position().top+this.search_results.scrollTop(),t=i+this.result_highlight.outerHeight(),t>=f)return this.search_results.scrollTop(t-r>0?t-r:0);if(i<u)return this.search_results.scrollTop(i)}},r.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},r.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.container.addClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.search_field.val()),this.winnow_results())},r.prototype.update_results_content=function(n){return this.search_results.html(n)},r.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},r.prototype.set_tab_index=function(){var t;if(this.form_field.tabIndex)return t=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=t},r.prototype.set_label_behavior=function(){var t=this;return this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=n("label[for='"+this.form_field.id+"']")),this.form_field_label.length>0?this.form_field_label.bind("click.chosen",function(n){return t.is_multiple?t.container_mousedown(n):t.activate_field()}):void 0},r.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},r.prototype.search_results_mouseup=function(t){var i;return i=n(t.target).hasClass("active-result")?n(t.target):n(t.target).parents(".active-result").first(),i.length?(this.result_highlight=i,this.result_select(t),this.search_field.focus()):void 0},r.prototype.search_results_mouseover=function(t){var i;return i=n(t.target).hasClass("active-result")?n(t.target):n(t.target).parents(".active-result").first(),i?this.result_do_highlight(i):void 0},r.prototype.search_results_mouseout=function(t){if(n(t.target).hasClass("active-result"||n(t.target).parents(".active-result").first()))return this.result_clear_highlight()},r.prototype.choice_build=function(t){var i,r,u=this;return i=n("<li />",{"class":"search-choice"}).html("<span>"+t.html+"<\/span>"),t.disabled?i.addClass("search-choice-disabled"):(r=n("<a />",{"class":"search-choice-close","data-option-array-index":t.array_index}),r.bind("click.chosen",function(n){return u.choice_destroy_link_click(n)}),i.append(r)),this.search_container.before(i)},r.prototype.choice_destroy_link_click=function(t){return t.preventDefault(),t.stopPropagation(),this.is_disabled?void 0:this.choice_destroy(n(t.target))},r.prototype.choice_destroy=function(n){if(this.result_deselect(n[0].getAttribute("data-option-array-index")))return this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.search_field.val().length<1&&this.results_hide(),n.parents("li").first().remove(),this.search_field_scale()},r.prototype.results_reset=function(){return this.form_field.options[0].selected=!0,this.selected_option_count=null,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.form_field_jq.trigger("change"),this.active_field?this.results_hide():void 0},r.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},r.prototype.result_select=function(n){var i,t,r;if(this.result_highlight)return(i=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count())?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?i.removeClass("active-result"):(this.result_single_selected&&(this.result_single_selected.removeClass("result-selected"),r=this.result_single_selected[0].getAttribute("data-option-array-index"),this.results_data[r].selected=!1),this.result_single_selected=i),i.addClass("result-selected"),t=this.results_data[i[0].getAttribute("data-option-array-index")],t.selected=!0,this.form_field.options[t.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(t):this.single_set_selected_text(t.text),(n.metaKey||n.ctrlKey)&&this.is_multiple||this.results_hide(),this.search_field.val(""),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.form_field_jq.trigger("change",{selected:this.form_field.options[t.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,this.search_field_scale())},r.prototype.single_set_selected_text=function(n){return n==null&&(n=this.default_text),n===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").text(n)},r.prototype.result_deselect=function(n){var t;return t=this.results_data[n],this.form_field.options[t.options_index].disabled?!1:(t.selected=!1,this.form_field.options[t.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.form_field_jq.trigger("change",{deselected:this.form_field.options[t.options_index].value}),this.search_field_scale(),!0)},r.prototype.single_deselect_control_build=function(){if(this.allow_single_deselect)return this.selected_item.find("abbr").length||this.selected_item.find("span").first().after('<abbr class="search-choice-close"><\/abbr>'),this.selected_item.addClass("chosen-single-with-deselect")},r.prototype.get_search_text=function(){return this.search_field.val()===this.default_text?"":n("<div/>").text(n.trim(this.search_field.val())).html()},r.prototype.winnow_results_set_highlight=function(){var n,t;return t=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),n=t.length?t.first():this.search_results.find(".active-result").first(),n!=null?this.result_do_highlight(n):void 0},r.prototype.no_results=function(t){var i;return i=n('<li class="no-results">'+this.results_none_found+' "<span><\/span>"<\/li>'),i.find("span").first().html(t),this.search_results.append(i)},r.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},r.prototype.keydown_arrow=function(){var n;if(this.results_showing&&this.result_highlight){if(n=this.result_highlight.nextAll("li.active-result").first(),n)return this.result_do_highlight(n)}else return this.results_show()},r.prototype.keyup_arrow=function(){var n;if(this.results_showing||this.is_multiple){if(this.result_highlight)return n=this.result_highlight.prevAll("li.active-result"),n.length?this.result_do_highlight(n.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight())}else return this.results_show()},r.prototype.keydown_backstroke=function(){var n;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(n=this.search_container.siblings("li.search-choice").last(),n.length&&!n.hasClass("search-choice-disabled"))?(this.pending_backstroke=n,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0},r.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},r.prototype.keydown_checker=function(n){var t,i;t=(i=n.which)!=null?i:n.keyCode,this.search_field_scale(),t!==8&&this.pending_backstroke&&this.clear_backstroke();switch(t){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(n),this.mouse_on_container=!1;break;case 13:n.preventDefault();break;case 38:n.preventDefault(),this.keyup_arrow();break;case 40:n.preventDefault(),this.keydown_arrow()}},r.prototype.search_field_scale=function(){var t,u,h,f,e,o,i,r,s;if(this.is_multiple){for(h=0,i=0,e="position:absolute; left: -1000px; top: -1000px; display:none;",o=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"],r=0,s=o.length;r<s;r++)f=o[r],e+=f+":"+this.search_field.css(f)+";";return t=n("<div />",{style:e}),t.text(this.search_field.val()),n("body").append(t),i=t.width()+25,t.remove(),u=this.container.outerWidth(),i>u-10&&(i=u-10),this.search_field.css({width:i+"px"})}},r}(i)}.call(this);var almcPrefix,countries=["","Alabama - AL","Alaska - AK","Arizona - AZ","Arkansas - AR","California - CA","Colorado - CO","Connecticut - CT","Delaware - DE","District of Columbia - DC","Florida - FL","Georgia - GA","Hawaii - HI","Idaho - ID","Illinois - IL","Indiana - IN","Iowa - IA","Kansas - KS","Kentucky - KY","Louisiana - LA","Maine - ME","Maryland - MD","Massachusetts - MA","Michigan - MI","Minnesota - MN","Mississippi - MS","Missouri - MO","Montana - MT","Nebraska - NE","Nevada - NV","New Hampshire - NH","New Jersey - NJ","New Mexico - NM","New York - NY","North Carolina - NC","North Dakota - ND","Ohio - OH","Oklahoma - OK","Oregon - OR","Pennsylvania - PA","Puerto Rico - PR","Rhode Island - RI","South Carolina - SC","South Dakota - SD","Tennessee - TN","Texas - TX","Utah - UT","Vermont - VT","Virginia - VA","Washington - WA","West Virginia - WV","Wisconsin - WI","Wyoming - WY","   ---","Alberta - AB","British Columbia - BC","Manitoba - MB","New Brunswick - NB","Newfoundland - NF","Northwest Territories - NT","Nova Scotia - NS","Nunavut - NU","Ontario - ON","Prince Edward Island - PE","Quebec - QC","Saskatchewan - SK","Yukon - YT","   ---","Afghanistan - AFG","Albania - ALB","Algeria - DZA","American Samoa - ASM","Andorra - AND","Angola - AGO","Anguilla - AIA","Antarctica - ATA","Antigua and Barbuda - ATG","Argentina - ARG","Armenia - ARM","Aruba - ABW","Australia - AUS","Austria - AUT","Azerbaijan - AZE","Bahamas - BHS","Bahrain - BHR","Bangladesh - BGD","Barbados - BRB","Belarus - BLR","Belgium - BEL","Belize - BLZ","Benin - BEN","Bermuda - BMU","Bhutan - BTN","Bolivia - BOL","Bosnia and Herzegovina - BIH","Botswana - BWA","Bouvet Island - BVT","Brazil - BRA","British Indian Ocean Territory - IOT","Brunei Darussalam - BRN","Bulgaria - BGR","Burkina Faso - BFA","Burundi - BDI","Cambodia - KHM","Cameroon - CMR","Canada - CAN","Cape Verde - CPV","Cayman Islands - CYM","Central African Republic - CAF","Chad - TCD","Chile - CHL","China - CHN","Christmas Island - CXR","Cocos Islands - CCK","Colombia - COL","Comoros - COM","Cook Islands - COK","Costa Rica - CRI","Cote d'Ivoire - CIV","Croatia - HRV","Cuba - CUB","Cyprus - CYP","Czech Republic - CZE","Democratic Republic of the Congo - COD","Denmark - DNK","Djibouti - DJI","Dominica - DMA","Dominican Republic - DOM","East Timor - TMP","Ecuador - ECU","Egypt - EGY","El Salvador - SLV","Equatorial Guinea - GNQ","Eritrea - ERI","Estonia - EST","Ethiopia - ETH","Falkland Islands - FLK","Faroe Islands - FRO","Fiji - FJI","Finland - FIN","France - FRA","France, Metropolitan - FXX","French Guiana - GUF","French Polynesia - PYF","French Southern Territories - ATF","Gabon - GAB","Gambia - GMB","Georgia - GEO","Germany - DEU","Ghana - GHA","Gibraltar - GIB","Greece - GRC","Greenland - GRL","Grenada - GRD","Guadeloupe - GLP","Guam - GUM","Guatemala - GTM","Guinea - GIN","Guinea-Bissau - GNB","Guyana - GUY","Haiti - HTI","Heard and McDonald Islands - HMD","Honduras - HND","Hong Kong - HKG","Hungary - HUN","Iceland - ISL","India - IND","Indonesia - IDN","Iran - IRN","Iraq - IRQ","Ireland - IRL","Isle of Man - IOM","Israel - ISR","Italy - ITA","Jamaica - JAM","Japan - JPN","Jordan - JOR","Kazakhstan - KAZ","Kenya - KEN","Kiribati - KIR","Kuwait - KWT","Kyrgyzstan - KGZ","Lao - LAO","Latvia - LVA","Lebanon - LBN","Lesotho - LSO","Liberia - LBR","Libya - LBY","Liechtenstein - LIE","Lithuania - LTU","Luxembourg - LUX","Macau - MAC","Macedonia - MKD","Madagascar - MDG","Malawi - MWI","Malaysia - MYS","Maldives - MDV","Mali - MLI","Malta - MLT","Marshall Islands - MHL","Martinique - MTQ","Mauritania - MRT","Mauritius - MUS","Mayotte - MYT","Mexico - MEX","Micronesia - FSM","Moldova - MDA","Monaco - MCO","Mongolia - MNG","Montserrat - MSR","Morocco - MAR","Mozambique - MOZ","Myanmar - MMR","Namibia - NAM","Nauru - NRU","Nepal - NPL","Netherlands - NLD","Netherlands Antilles - ANT","New Caledonia - NCL","New Zealand - NZL","Nicaragua - NIC","Niger - NER","Nigeria - NGA","Niue - NIU","Norfolk Island - NFK","North Korea - PRK","Northern Mariana Islands - MNP","Norway - NOR","Oman - OMN","Pakistan - PAK","Palau - PLW","Panama - PAN","Papua New Guinea - PNG","Paraguay - PRY","Peru - PER","Philippines - PHL","Pitcairn - PCN","Poland - POL","Portugal - PRT","Puerto Rico - PRI","Qatar - QAT","Republic of the Congo - COG","Reunion - REU","Romania - ROM","Russia - RUS","Rwanda - RWA","Saint Kitts and Nevis - KNA","Saint Lucia - LCA","Saint Vincent and the Grenadines - VCT","Samoa - WSM","San Marino - SMR","Sao Tome and Principe - STP","Saudi Arabia - SAU","Senegal - SEN","Seychelles - SYC","Sierra Leone - SLE","Singapore - SGP","Slovakia - SVK","Slovenia - SVN","Solomon Islands - SLB","Somalia - SOM","South Africa - ZAF","South Georgia and the South Sandwich Islands - SGS","South Korea - KOR","Spain - ESP","Sri Lanka - LKA","Saint Helena - SHN","St. Pierre and Miquelon - SPM","Sudan - SDN","Suriname - SUR","Svalbard - SJM","Swaziland - SWZ","Sweden - SWE","Switzerland - CHE","Syrian Arab Republic - SYR","Taiwan - TWN","Tajikistan - TJK","Tanzania - TZA","Thailand - THA","Togo - TGO","Tokelau - TKL","Tonga - TON","Trinidad and Tobago - TTO","Tunisia - TUN","Turkey - TUR","Turkmenistan - TKM","Turks and Caicos Islands - TCA","Tuvalu - TUV","Uganda - UGA","Ukraine - UKR","United Arab Emirates - ARE","United Kingdom - GBR","United States - USA","United States Minor Outlying Islands - UMI","Uruguay - URY","Uzbekistan - UZB","Vanuatu - VUT","Vatican City State - VAT","Venezuela - VEN","Viet Nam - VNM","Virgin Islands (British) - VGB","Virgin Islands (U.S.) - VIR","Wallis and Futuna Islands - WLF","Western Sahara - ESH","Yemen - YEM","Yugoslavia - YUG","Zambia - ZMB","Zimbabwe - ZWE"],atlasQueryUrl="http://"+window.location.host+"/SiteFiles/StarDome/GeoLookup.aspx",eventsUrl="http://"+window.location.host+"/SiteFiles/StarDome/events/events.txt",lastUpdate,intervalID,bias=0,supportLocation="geolocation"in navigator,supportCanvas=function(){var n=document.createElement("canvas");return!!(n.getContext&&n.getContext("2d"))}(),observer,events=[],eventIndex,eventsInterval,eventData=$.ajax({url:eventsUrl,dataType:"text"});var gettingLocation=!1,watcherId=null,startWatcherId=null;almcLoaded=!1,$(document).ready(function(){$("#tsky").length==0?(almcPrefix="almc",almcLoaded||$(".almanac").css("display")=="none"?$(window).resize(function(){almcLoaded||$(".almanac").css("display")=="none"||loadAlmanac()}):loadAlmanac()):(almcPrefix="tsky",loadAlmanac())})