function sleep(a){var b=new Date;b.setTime(b.getTime()+a);while((new Date).getTime()';document.getElementById("newgstreetdiv").style.backgroundImage="url('http://maps.googleapis.com/maps/api/streetview?size=500x500&location="+currentselectedlocation.lat()+","+currentselectedlocation.lng()+"&heading="+compass_angle+"&fov=90&pitch="+1*satellite_elevation+"&sensor=false')"}if(b>a){document.getElementById("mapcell").style.borderWidth="thick";document.getElementById("mapcell").style.borderColor="red"}else{document.getElementById("mapcell").style.borderWidth="thick";document.getElementById("mapcell").style.borderColor="green"}}function setsatelliteposition(){satelliteposition=new google.maps.LatLng(0,document.getElementById("satellite_longitude").value);if(1*document.getElementById("satellite_longitude").value<0)SatLon=360+1*document.getElementById("satellite_longitude").value;else SatLon=1*document.getElementById("satellite_longitude").value;if(1*document.getElementById("satellite_longitude").value<0)document.getElementById("sat_pos").innerHTML=formatvalue(Math.abs(1*document.getElementById("satellite_longitude").value),2)+"W";else document.getElementById("sat_pos").innerHTML=formatvalue(1*document.getElementById("satellite_longitude").value,2)+"E";document.getElementById("azimuth").innerHTML=formatvalue(calculateBearing(currentselectedlocation,satelliteposition),3)+"";SelectSatellite();satellite_elevation=Elevation2(SatLon,currentselectedlocation.lat(),currentselectedlocation.lng(),0*CurrentAltitude,1*SatLatitude,1*r_sat)}function Radians(a){var b;b=a*Math.PI/180;return b}function setinfowindowinitialize(){infowindow.setPosition(currentselectedlocation);var a=infowindow.getPosition();infowindow.setContent("Position is "+a.lat()+" "+a.lng());infowindow.open(map)}function compensate_altitude_for_two_locations(a,b){var c,d,e,f,g,h,i,j,k,l;var m,n,o,p,q,r,s,t,u;var v=a.lng();var w=a.lat();var x=b.lng();var y=b.lat();earth_omkrets=4e4*1e3;earth_radius=4e4*1e3/(2*Math.PI);c=1/298.257;d=42164.57;e=6378.14*1e3;m=Math.sin(Radians(w))*earth_radius;o=Math.sin(Radians(y))*earth_radius;n=m-o;p=Math.cos(Radians(y))*earth_radius;r=Math.cos(Radians(w))*earth_radius;q=p-r;s=Math.sqrt(q*q+n*n);copy_pointtopointdistance=s;u=Math.sqrt(earth_radius*earth_radius-s/2*(s/2));t=u-earth_radius;j=e*Math.sin(Radians(w));l="x="+j;k=e*Math.sin(Radians(y));return 1*t}function ShowCookie(){var a,b,c,d,e,f,g,h;var i=new Array;var j=new Array;var k,l,m,n;h=40;f=document.cookie;if(f!==""){i=f.split(":");n="COOKIE CONTENT:";n=n+"\nSite Latitude:"+i[0]+" "+i[1];n=n+"\r\nSite Latitude:"+i[2]+" "+i[3];n=n+"\r\nSite Position List Index:"+i[4];n=n+"\r\nSat Position List Index:"+i[5];n=n+"\r\nSet Location:"+i[6];n=n+"\r\nCalibrate pulsevalue:"+i[7];n=n+"\r\nCalibrate puls per HA degree:"+i[8];n=n+"\r\nPulse counter increasing in direction:"+i[9];n=n+"\r\nHourangle for calibrated position:"+i[10];n=n+"\r\nHight above ocean:"+i[11];n=n+"\r\nAntenna Size:"+1*i[12];n=n+"\r\nRx Frequency:"+1*i[13];n=n+"\r\nCookie14:"+i[14];n=n+"\r\nSite name:"+i[15];n=n+"\r\nGoogle Map Zoom:"+i[16];n=n+"\r\nAntenna hight above ground:"+1*i[17];n=n+"\r\nCookie18:"+i[18];n=n+"\r\nCookie19:"+i[19];n=n+"\r\nCookie20:"+i[19];alert(n)}else alert("Cookie is empty")}function initialize(){ReadCookie();currentselectedlocation=new google.maps.LatLng(Lat,Lon);zoom=1*zoomlevel;detect_browser();var a={scrollwheel:true,disableDoubleClickZoom:true,panControl:true,streetViewControl:false,zoom:zoom,center:currentselectedlocation,scaleControl:true,draggable:true,mapTypeId:"terrain"};map=new google.maps.Map(document.getElementById("map_canvas"),a);var b=document.createElement("div");var c={format:google.maps.adsense.AdFormat.BANNER,position:google.maps.ControlPosition.TOP_CENTER,backgroundColor:"grey",borderColor:"black",titleColor:"red",textColor:"black",urlColor:"blue",map:map,visible:true,publisherId:"ca-pub-1045325887862292"};adUnit=new google.maps.adsense.AdUnit(b,c);var d=document.createElement("div");var e={format:google.maps.adsense.AdFormat.BANNER,position:google.maps.ControlPosition.BOTTOM_CENTER,backgroundColor:"#C0BBB7",borderColor:"#C0BBB7",titleColor:"#222222",textColor:"#000000",urlColor:"#222222",map:map,visible:true,publisherId:"ca-pub-1045325887862292"};adUnit2=new google.maps.adsense.AdUnit(d,e);elevator1=new google.maps.ElevationService;elevator2=new google.maps.ElevationService;elevator3=new google.maps.ElevationService;elevator4=new google.maps.ElevationService;elevatordrawRoadPath2=new google.maps.ElevationService;if(SatLon<180)document.getElementById("sat_pos").innerHTML=formatvalue(SatLon,3)+"E";else document.getElementById("sat_pos").innerHTML=formatvalue(360-SatLon,3)+"W";currentselectedlocation=new google.maps.LatLng(Lat,Lon);setsatelliteposition();setElevationInfoScreen();reverseGeocode(currentselectedlocation);document.getElementById("el_info").innerHTML="";document.getElementById("terrain_elevation").innerHTML="";document.getElementById("el_limit").innerHTML="";document.getElementById("sat_el").innerHTML=formatvalue(satellite_elevation,3)+"";document.getElementById("azimuth").innerHTML=formatvalue(calculateBearing(currentselectedlocation,satelliteposition),3)+"";loadlistners()}function setposition(){drawPath()}function loadlistners(){google.maps.event.addListener(map,"mousemove",function(b){var c=[];var d=b.latLng;c.push(d);var e=infowindow.getPosition();document.getElementById("lngspan").innerHTML=formatvalue(e.lng(),3)+"";document.getElementById("latspan").innerHTML=formatvalue(e.lat(),3)+"";document.getElementById("azimuth").innerHTML=formatvalue(calculateBearing(currentselectedlocation,satelliteposition),3)+""});google.maps.event.addListener(map,"zoom_changed",function(){SetGoogleMapZoomCookie()});google.maps.event.addListener(map,"click",function(b){var c=[];setToRed();count_down=10;setsatelliteposition();document.getElementById("el_info").innerHTML="";document.getElementById("terrain_elevation").innerHTML="";document.getElementById("el_limit").innerHTML="";document.getElementById("sat_el").innerHTML=formatvalue(satellite_elevation,3)+"";document.getElementById("azimuth").innerHTML=formatvalue(calculateBearing(currentselectedlocation,satelliteposition),3)+"";var d=b.latLng;currentselectedlocation=d;Lat=currentselectedlocation.lat();Lon=currentselectedlocation.lng();SetGoogleMapCookie();reverseGeocode(currentselectedlocation);c.push(d);document.getElementById("azimuth").innerHTML=formatvalue(calculateBearing(currentselectedlocation,satelliteposition),3)+"";var e={locations:c};elevator1.getElevationForLocations(e,function(a,b){if(b==google.maps.ElevationStatus.OK){if(a[0]){infowindow.setPosition(d);var c=infowindow.getPosition();if(a[0].elevation<0)document.getElementById("altitude").innerHTML=formatvalue(0,3)+" meters";else document.getElementById("altitude").innerHTML=formatvalue(a[0].elevation,3)+" meters";CurrentAltitude=1*a[0].elevation;if(a[0].elevation>0)infowindow.setContent("Address:"+currentAddressResponse+"
Position is "+formatvalue(c.lat(),6)+" "+formatvalue(c.lng(),6)+"
The altitude at this point
is "+formatvalue(a[0].elevation,3)+" meters.");else infowindow.setContent("Address:"+currentAddressResponse+"
Position is "+formatvalue(c.lat(),3)+" "+formatvalue(c.lng(),3)+"
The altitude at this point
is 0 meters (sea depth="+formatvalue(-1*a[0].elevation,3)+" meters)");infowindow.open(map)}else{alert("No results found")}}else{alert("Elevation service failed due to: "+b)}});polyline1.setMap(null);drawPath();setToRed();polyline3.setMap(null);elevationPath3.setMap(null);setToRed();drawPath3(endlocation);setToRed()})}function setElevationInfoScreen(){var a=[];reverseGeocode(currentselectedlocation);a.push(currentselectedlocation);var b={locations:a};elevator4.getElevationForLocations(b,function(a,b){if(b==google.maps.ElevationStatus.OK){if(a[0]){infowindow.setPosition(currentselectedlocation);map.setCenter(currentselectedlocation);var c=currentselectedlocation;document.getElementById("lngspan").innerHTML=formatvalue(c.lng(),3)+"";document.getElementById("latspan").innerHTML=formatvalue(c.lat(),3)+"";if(a[0].elevation<0)document.getElementById("altitude").innerHTML=formatvalue(0,3)+" meters";else document.getElementById("altitude").innerHTML=formatvalue(a[0].elevation,3)+" meters";CurrentAltitude=1*a[0].elevation;if(a[0].elevation>0)infowindow.setContent("Address:"+currentAddressResponse+"
Position is "+formatvalue(c.lat(),3)+" "+formatvalue(c.lng(),3)+"
The altitude at this point
is "+formatvalue(a[0].elevation,3)+" meters.");else infowindow.setContent("Address:"+currentAddressResponse+"
Position is "+formatvalue(c.lat(),3)+" "+formatvalue(c.lng(),3)+"
The altitude at this point
is 0 meters (sea depth="+formatvalue(-1*a[0].elevation,3)+" meters)");infowindow.open(map)}else{alert("No results found")}}else{alert("Elevation service failed due to: "+b)}})}function open_single_satellite_view(){var a;var b;var c=new Array;b=document.Position.SelectList.value;c=b.split(":");satcatid=c[3];window.open("Catalog/"+satcatid+".htm",satcatid,"")}function open_170h_predictions(){var a;var b;var c=new Array;b=document.Position.SelectList.value;c=b.split(":");satcatid=c[3];window.open("170HourListings/170h_listing_"+satcatid+".htm","170h_predictions_"+satcatid,"")}function writetestout(){document.Position.SelectList.disabled=true;document.getElementById("misc").innerHTML=Date();document.getElementById("waitinfotext").style.color="red";document.getElementById("waitinfotext").innerHTML="Wait 10 seconds before next action !";doubleclickdisabled="True"}function enable_mouseevents(){countdown="False";int=window.clearInterval(int);document.Position.SelectList.disabled=false;document.getElementById("waitinfotext").style.color="blue";document.getElementById("waitinfotext").innerHTML="Ready for next action !";google.maps.event.clearListeners(map,"click");doubleclickdisabled="False";google.maps.event.clearListeners(map,"mousemove");google.maps.event.clearListeners(map,"drag");loadlistners();var a={draggable:true};map.setOptions({options:a})}function function_count_down(){if(countdown=="True"){countdownvalue=countdownvalue-1;if(countdownvalue>0)document.getElementById("waitinfotext").innerHTML="Wait "+countdownvalue+" seconds before next action !";else{document.getElementById("waitinfotext").style.color="blue";document.getElementById("waitinfotext").innerHTML="Ready for next action !";int=window.clearInterval(int);document.Position.SelectList.disabled=false}}}function drawPath(){SelectSatellite();satellite_elevation=Elevation2(SatLon,currentselectedlocation.lat(),currentselectedlocation.lng(),0*CurrentAltitude,1*SatLatitude,1*r_sat);var a=[currentselectedlocation,satelliteposition];var b={path:a,samples:512};elevator1.getElevationAlongPath(b,plotElevation);drawpath1finished="True";compass_angle=calculateBearing(currentselectedlocation,satelliteposition);var c={draggable:false};map.setOptions({options:c});map.setOptions(c);google.maps.event.clearListeners(map,"click");google.maps.event.clearListeners(map,"mousemove");google.maps.event.addListener(map,"drag",do_nothing());google.maps.event.addListener(map,"click",do_nothing());google.maps.event.addListener(map,"mousemove",do_nothing());countdown="True";countdownvalue=10;int=self.setInterval("function_count_down()",1e3);writetestout();window.setTimeout("enable_mouseevents()",1e4)}function drawPath2(a){var b=[currentselectedlocation,a];var c={path:b,samples:100};elevator2.getElevationAlongPath(c,plotElevation2);drawpath2finished="True"}function drawRoadPath2(a){var b=[currentselectedlocation,a];var c={path:b,samples:Math.floor(sample_resolution)};elevatordrawRoadPath2.getElevationAlongPath(c,plotElevationRoadpath2)}function drawPath3(a){var b=[currentselectedlocation,a];var c={path:b,samples:512};elevator3.getElevationAlongPath(c,plotElevation3);drawpath3finished="True"}function barMouseOver(a){}function barMouseOut(a){}function plotElevation(a,b){if(b==google.maps.ElevationStatus.OK){elevations=a;var c=0;var d;var e="False";var f;var g;var h="False";var i="False";var j="blue";document.getElementById("firstloc").innerHTML="";document.getElementById("firstlocdist").innerHTML="";var k=[];CurrentAltitude=1*elevations[0].elevation;for(var l=0;lMont_Everest)e="True";else e="False";if(l>0&&(fsatellite_elevation)i="True";if(thiselevation>last_elevation&&thiselevation>horizon_elevation_angle)horizon_elevation_angle=thiselevation;last_elevation=thiselevation;endlocation=elevations[l].location;h="True";document.getElementById("firstloc").innerHTML=formatvalue(thiselevation,3)+"( "+formatvalue(satellite_elevation,3)+" ) index="+l+" "+Date();document.getElementById("firstlocdist").innerHTML=formatvalue(d,3)+"m index="+l+" "+Date()+endlocation}if(i=="True")j="red"}if(h=="True")endlocation=elevations[1].location;var p={path:k,strokeColor:j,opacity:1,strokeWeight:2,map:map};polyline1=new google.maps.Polyline(p);var q=new google.visualization.DataTable;q.addColumn("string","Sample");q.addColumn("number","Elevation");for(var l=0;lMont_Everest)use_first_point="True";else use_first_point="False";if(i>0&&(hsatellite_elevation)e="True";if(thiselevation>last_elevation&&thiselevation>horizon_elevation_angle)horizon_elevation_angle=thiselevation;last_elevation=thiselevation;m=l;endlocation=elevations[i].location}if(e=="True")f="red"}var n={path:d,strokeColor:f,opacity:1,strokeWeight:4,map:map};polyline2=new google.maps.Polyline(n);var o=new google.visualization.DataTable;o.addColumn("string","Sample");o.addColumn("number","Elevation");for(var i=0;ielevations[p].elevation)o=elevations[p].elevation;if(p>0){height_offset_corrected_for_earth_sfere=0;d=height_offset_corrected_for_earth_sfere;if(elevations[p].elevation<0)elevations[p].elevation=0;else elevations[p].elevation=elevations[p].elevation+height_offset_corrected_for_earth_sfere;thiselevation=calculate_elevation_angle(s,1*(elevations[p].elevation-elevations[0].elevation-AntennaHightAboveGround));if(thiselevation>last_elevation&&thiselevation>horizon_elevation_angle){horizon_elevation_angle=thiselevation;i=thiselevation;j=s;k=elevations[p].elevation;l=calculate_height_from_elevation_and_distance(j,satellite_elevation);terrain_clearance_in_meters=1*l+1*elevations[0].elevation+1*AntennaHightAboveGround-1*k}last_elevation=thiselevation;t=s;endlocation=elevations[p].location;if(thiselevation>satellite_elevation&&g=="False"){g="True";f=p;h="red";document.getElementById("secondrunfirstloc").innerHTML=formatvalue(thiselevation,3)+"( "+formatvalue(satellite_elevation,3)+" ) index="+p+" "+Date();document.getElementById("secondrunfirstlocdist").innerHTML="First obstruction at "+formatvalue(t,3)+"m "+formatvalue(thiselevation,3)+" abindex="+f+"("+a.length+")"+" "+Date()}}}document.getElementById("sat_el").innerHTML=formatvalue(satellite_elevation,3)+" ";if(satellite_elevation"}else document.getElementById("el_limit").innerHTML="Satellite is "+formatvalue(satellite_elevation-horizon_elevation_angle,3)+" below terrain";if(satellite_elevation==-99)document.getElementById("sat_el").innerHTML="Below horizon "}else{document.getElementById("el_limit").style.color="green";document.getElementById("el_limit").innerHTML="Satellite is "+formatvalue(satellite_elevation-horizon_elevation_angle,3)+" above terrain";document.getElementById("sat_el").innerHTML=formatvalue(satellite_elevation,3)+" "}sample_resolution=s/512;document.getElementById("el_info").innerHTML="Terrain elevation: "+formatvalue(horizon_elevation_angle,3)+"
Earth sphere altitude correction="+formatvalue(height_offset_corrected_for_earth_sfere,3)+"m
Distance= "+formatvalue(s,3)+"m
point to point distance="+formatvalue(copy_pointtopointdistance,3)+"m"+"
Resolution:"+formatvalue(s/512,3)+" meters per sample";document.getElementById("terrain_elevation").innerHTML="Max Terrain elevation: "+formatvalue(horizon_elevation_angle,3)+" at distance "+Math.floor(j)+" meters";document.getElementById("sample_info").innerHTML="Resolution:"+formatvalue(s/512,3)+" meters per sample";ifbelowhorison(satellite_elevation,horizon_elevation_angle);document.getElementById("terrain_clearance").innerHTML=Math.floor(terrain_clearance_in_meters)+" meters at distance "+Math.floor(j)+" meters";CurrentAltitude=1*elevations[0].elevation;drawRoadPath2(elevations[1].location);var u={path:c,strokeColor:h,opacity:1,strokeWeight:4,map:map};polyline3=new google.maps.Polyline(u);var v=new google.visualization.DataTable;var w=new google.visualization.DataTable;var x;var y,z,A;w.addColumn("string","Distance[m]");w.addColumn("number","Terrain Altitude[m]");var q=currentselectedlocation;var r;var s;for(var p=0;p0){document.getElementById("elevation_chart13").style.display="block";chart13.draw(v,{width:1600,height:300,backgroundColor:{stroke:"black",fill:"#C0BBB7",strokeSize:2},colors:["red","blue"],isStacked:true,legend:{position:"top"},vAxis:{title:"Altitude [m]",viewWindowMode:"explicit",viewWindow:{max:n+100,min:o}}})}}}function testoutput(){return 20}function Elevation2(a,b,c,d,e,f){var g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;var v,w,e;var x,y,z,A,B,C;var D;var E=new Array;y=.58804392;z=-.17941557;A=.029906946;B=-.00251874;C=82622101e-12;h=0;j=42164.57;i=6378.14;j=f;g=i/Math.sqrt(1-h*(2-h)*Math.sin(Radians(b))*Math.sin(Radians(b)));k=(g+d)*Math.cos(Radians(b));l=(g*(1-h)*(1-h)+d)*Math.sin(Radians(b));m=j-g;n=j*Math.cos(Radians(e))*Math.cos(Radians(a-c))-k;o=j*Math.cos(Radians(e))*Math.sin(Radians(a-c));q=j*Math.sin(Radians(e))-l;r=-n*Math.sin(Radians(b))+q*Math.cos(Radians(b));s=n*Math.cos(Radians(b))+q*Math.sin(Radians(b));t=Deg(Math.atan2(s,Math.sqrt(r*r+o*o)));h=1/298.257;j=42164.57;i=6378.14;j=f;g=i/Math.sqrt(1-h*(2-h)*Math.sin(Radians(b))*Math.sin(Radians(b)));k=(g+d)*Math.cos(Radians(b));l=(g*(1-h)*(1-h)+d)*Math.sin(Radians(b));m=j-g;n=j*Math.cos(Radians(e))*Math.cos(Radians(a-c))-k;o=j*Math.cos(Radians(e))*Math.sin(Radians(a-c));q=j*Math.sin(Radians(e))-l;r=-n*Math.sin(Radians(b))+q*Math.cos(Radians(b));s=n*Math.cos(Radians(b))+q*Math.sin(Radians(b));t=Deg(Math.atan2(s,Math.sqrt(r*r+o*o)));x=Math.abs(t+.589);p=Math.abs(y+z*x+A*x*x+B*x*x*x+C*x*x*x*x);if(t>10.2){v=t+.01617*(Math.cos(Radians(Math.abs(t)))/Math.sin(Radians(Math.abs(t))))}else{v=t+p}if(s<-3e3)v=-99;return v}function Deg(a){var b;b=a*180/Math.PI;return b}function infomessage(){}function checkifdblclickdisabled(){if(doubleclickdisabled=="True")alert("Map not ready.. try again in a few seconds ")}function calculateonsatchange(){if(doubleclickdisabled=="False"){setsatelliteposition();setElevationInfoScreen();SetGoogleMapCookie();polyline1.setMap(null);drawPath();setToRed();polyline3.setMap(null);elevationPath3.setMap(null);setToRed();drawPath3(endlocation);setToRed()}else alert("Map not ready.. try again in a few seconds(doubleclick on selected satellite)")}function setToRed(){}function setToBlack(){}function do_nothing(){}function formatvalue(a,b){var c,d,e,f,g,h,i;var j=new Array;i=a;var k=Math.pow(10,Math.abs(b)==b?b:2);c=String(Math.round(a*k)/k).replace(/^(\d)/," $1");if(a<0)c=" "+c;j=c.split(".");if(a!==0&&j.length>1){e=j[1];g=j[0];if(e.length=0)c=" "+c;return c}function getgeolocation(){if(navigator.geolocation){navigator.geolocation.getCurrentPosition(function(a){var b=new google.maps.LatLng(a.coords.latitude,a.coords.longitude);currentselectedlocation=b;reverseGeocode(currentselectedlocation);map.setCenter.pos;setsatelliteposition();map.setCenter(b);setElevationInfoScreen();map.setZoom(18);Lat=currentselectedlocation.lat();Lon=currentselectedlocation.lng();SetGoogleMapCookie();polyline1.setMap(null);drawPath();setToRed();polyline3.setMap(null);elevationPath3.setMap(null);setToRed();drawPath3(endlocation);setToRed();SetGoogleMapCookie()},function(){handleNoGeolocation(true)})}else{handleNoGeolocation(false)}}function handleNoGeolocation(a){if(a){var b="Error: The Geolocation service failed."}else{var b="Error: Your browser doesn't support geolocation."}}function geocoderequest(){var a=document.getElementById("address").value;geocoder.geocode({address:a,partialmatch:true},geocodeResult)}function geocodeResult(a,b){if(b=="OK"&&a.length>0){map.fitBounds(a[0].geometry.viewport);currentselectedlocation=map.getCenter();reverseGeocode(currentselectedlocation);map.setZoom(18);setsatelliteposition();setElevationInfoScreen();Lat=currentselectedlocation.lat();Lon=currentselectedlocation.lng();SetGoogleMapCookie();polyline1.setMap(null);drawPath();setToRed();polyline3.setMap(null);elevationPath3.setMap(null);setToRed();drawPath3(endlocation);setToRed()}else{alert("Geocode was not successful for the following reason: "+b)}}function reverseGeocode(a){var b;var c=new Date;geocoder.geocode({latLng:a},reverseGeocodeResult)}function reverseGeocodeResult(a,b){currentReverseGeocodeResponse=a;if(b=="OK"){if(a.length==0){currentAddressResponse="None"}else{currentAddressResponse=a[0].formatted_address}}else{currentAddressResponse="Error"}}function ReadCookie(){var a,b,c,d,e,f;var g=new Array;var h=new Array;SatNameCurrentIndex=40;b=document.cookie;if(b!==""){g=b.split(":");Lat=g[0];LatDir=g[1];Lon=g[2];LonDir=g[3];if(LonDir=="West")Lon=-Lon;if(LatDir=="South")Lat=-Lat;if(isNaN(g[11])||g[11]=="undefined")CurrentAltitude=0;else CurrentAltitude=g[11];SatNameCurrentIndex=g[5];if(isNaN(g[17])||g[17]=="undefined"){document.getElementById("antenna_height").value=2;AntennaHightAboveGround=2}else{document.getElementById("antenna_height").value=1*g[17];AntennaHightAboveGround=1*g[17]}if(isNaN(g[16])||g[16]=="undefined")zoomlevel=2;else zoomlevel=1*g[16];zoom=zoomlevel}else{Lat=3777/100;Lon=(36e3-12242)/100;zoom=2;CurrentAltitude=0;zoomlevel=2;SatNameCurrentIndex=359;document.getElementById("antenna_height").value=2;AntennaHightAboveGround=2;alert("Missing cookies- Using default cookie setting!")}document.Position.SelectList.selectedIndex=SatNameCurrentIndex;document.earth.this_site_longitude.value=Lon;document.earth.this_site_latitude.value=Lat}function SelectSatellite(){var a;var b=new Array;a=document.Position.SelectList.value;b=a.split(":");document.getElementById("satellite_latitude").value=b[1];if(b[0]>180)document.getElementById("satellite_longitude").value=1*b[0]-360;else document.getElementById("satellite_longitude").value=1*b[0];r_sat=1*b[2];SatLatitude=1*b[1]}function SetGoogleMapCookie(){var a,b,c;var d;var e,f,g,h;var i,j,k,l,m,n,o,p,q,r;var s=new Array;var t=new Array;MyCookieVal=document.cookie;if(MyCookieVal!==""){s=MyCookieVal.split(":");j=s[12];k=s[13];l=s[14];n=map.getZoom();o=s[17];p=s[18];q=s[19];r=s[20]}zoomlevel=map.getZoom();if(Lat<0)a="South";else a="North";if(Lon<0)b="West";else b="East";Lat=1*Math.abs(Lat);Lon=1*Math.abs(Lon);s[5]=document.Position.SelectList.selectedIndex;o=1*document.getElementById("antenna_height").value;s[11]=CurrentAltitude;c=Lat+":"+a+":"+Lon+":"+b+":"+s[4]+":"+s[5]+":"+s[6]+":"+s[7]+":"+s[8]+":"+s[9]+":"+s[10]+":"+s[11]+":"+j+":"+k+":"+l+":"+m+":"+n+":"+o+":"+q+":"+r+";expires=Tue, 10 Jul 2040 23:59:59 UTC;";deleteAllCookies();document.cookie=c}function SetGoogleMapZoomCookie(){var a;var b,c,d,e,f,g,h,i,j,k;var l=new Array;var m=new Array;MyCookieVal=document.cookie;if(MyCookieVal!==""){l=MyCookieVal.split(":");c=l[12];d=l[13];e=l[14];f=l[15];g=map.getZoom();h=l[17];i=l[18];j=l[19];k=l[20]}a=l[0]+":"+l[1]+":"+l[2]+":"+l[3]+":"+l[4]+":"+l[5]+":"+l[6]+":"+l[7]+":"+l[8]+":"+l[9]+":"+l[10]+":"+l[11]+":"+c+":"+d+":"+e+":"+f+":"+g+":"+h+":"+j+":"+k+";expires=Tue, 10 Jul 2040 23:59:59 UTC;";deleteAllCookies();document.cookie=a}function deleteAllCookies(){var a=document.cookie.split(";");for(var b=0;b-1?c.substr(0,d):c;document.cookie=e+"=;expires=Thu, 01 Jan 1970 00:00:00 GMT"}}var elevator1,elevator2,elevator3,elevator,elevator4;var map;var chart1,chart2,chart3;var infowindow=new google.maps.InfoWindow;var polyline1,polyline2,polyline3;var horizon_elevation_angle=0;var last_elevation=0;var endlocation;var height_offset_corrected_for_earth_sfere;var copy_pointtopointdistance;var satellite_elevation=20484/1e3;var SatLon=359;var r_sat=4216864/100;var Mont_Everest=3e3;var compass_angle;var drawpath1finished="False";var drawpath2finished="False";var drawpath3finished="False";var zoom;var count_down=10;var doubleclickdisabled="False";var first_elevation,first_distance,elevation_site,first_elevation_angle;var sample_resolution;var currentAddressResponse;var thissitelocation,currentsitelocation;var selectedsitelon,selectedsitelat,Lat,Lon,zoomlevel;var SatLatitude,CurrentAltitude,AntennaHightAboveGround,currentselectedlocation,SatNameCurrentIndex;var chart13,countdown,countdownvalue,Int,satelliteposition;var Browser={Version:function(){var a=999;if(navigator.appVersion.indexOf("MSIE")!=-1)a=parseFloat(navigator.appVersion.split("MSIE")[1]);a=99;return a}};Lat=3777/100;Lon=(36e3-12242)/100;zoomlevel=2;currentselectedlocation=new google.maps.LatLng(Lat,Lon);SatNameCurrentIndex=359;AntennaHightAboveGround=0;var geocoder=new google.maps.Geocoder;CurrentAltitude=0;countdown="False";countdownvalue=10;google.maps.LatLng.prototype.distanceFrom=function(a){var b=[this.lat(),a.lat()];var c=[this.lng(),a.lng()];var d=6378137;var e=(b[1]-b[0])*Math.PI/180;var f=(c[1]-c[0])*Math.PI/180;var g=Math.sin(e/2)*Math.sin(e/2)+Math.cos(b[0]*Math.PI/180)*Math.cos(b[1]*Math.PI/180)*Math.sin(f/2)*Math.sin(f/2);var h=2*Math.atan2(Math.sqrt(g),Math.sqrt(1-g));var i=d*h;return Math.round(i)};if(Browser.Version()<9)google.load("visualization","1",{packages:["columnchart"]});else google.load("visualization","1",{packages:["corechart"]})