<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://wbex.ru/index.php?action=history&amp;feed=atom&amp;title=JavaScript_DHTML%2FPage_Components%2FRotating_globe</id>
		<title>JavaScript DHTML/Page Components/Rotating globe - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://wbex.ru/index.php?action=history&amp;feed=atom&amp;title=JavaScript_DHTML%2FPage_Components%2FRotating_globe"/>
		<link rel="alternate" type="text/html" href="http://wbex.ru/index.php?title=JavaScript_DHTML/Page_Components/Rotating_globe&amp;action=history"/>
		<updated>2026-04-04T21:31:32Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://wbex.ru/index.php?title=JavaScript_DHTML/Page_Components/Rotating_globe&amp;diff=3554&amp;oldid=prev</id>
		<title> в 10:00, 26 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://wbex.ru/index.php?title=JavaScript_DHTML/Page_Components/Rotating_globe&amp;diff=3554&amp;oldid=prev"/>
				<updated>2010-05-26T10:00:10Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 10:00, 26 мая 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
			</entry>

	<entry>
		<id>http://wbex.ru/index.php?title=JavaScript_DHTML/Page_Components/Rotating_globe&amp;diff=3555&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://wbex.ru/index.php?title=JavaScript_DHTML/Page_Components/Rotating_globe&amp;diff=3555&amp;oldid=prev"/>
				<updated>2010-05-26T07:26:24Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Rotating globe in JavaScript==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot;&lt;br /&gt;
                      &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;head&amp;gt;&lt;br /&gt;
&amp;lt;meta http-equiv=&amp;quot;Content-Type&amp;quot; content=&amp;quot;text/html; charset=utf-8&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;title&amp;gt;rotating globe&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;!-- misc.js --&amp;gt;&lt;br /&gt;
&amp;lt;script language=&amp;quot;JavaScript&amp;quot; &amp;gt;&lt;br /&gt;
/*------------------------------------------------------------------------------&lt;br /&gt;
   Copyright (c) 2005 Tyrell Corporation.&lt;br /&gt;
    This file is part of the Locative Blog project.&lt;br /&gt;
    http://locblog.sourceforge.net/&lt;br /&gt;
   Author   : $Author: darkeye $&lt;br /&gt;
   Version  : $Revision: 1.1.1.1 $&lt;br /&gt;
   Location : $Source: /cvsroot/locblog/rotatingGlobe/var/public_html/misc.js,v $&lt;br /&gt;
   Abstract : &lt;br /&gt;
    Utility functions.&lt;br /&gt;
   Copyright notice:&lt;br /&gt;
    This program is free software; you can redistribute it and/or&lt;br /&gt;
    modify it under the terms of the GNU General Public License  &lt;br /&gt;
    as published by the Free Software Foundation; either version 2&lt;br /&gt;
    of the License, or (at your option) any later version.&lt;br /&gt;
   &lt;br /&gt;
    This program is distributed in the hope that it will be useful,&lt;br /&gt;
    but WITHOUT ANY WARRANTY; without even the implied warranty of &lt;br /&gt;
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the &lt;br /&gt;
    GNU General Public License for more details.&lt;br /&gt;
   &lt;br /&gt;
    You should have received a copy of the GNU General Public License&lt;br /&gt;
    along with this program; if not, write to the Free Software&lt;br /&gt;
    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.&lt;br /&gt;
------------------------------------------------------------------------------*/&lt;br /&gt;
/**&lt;br /&gt;
 *  Constructor to reate an object, based on a named element from the document,&lt;br /&gt;
 *  browser-independently.&lt;br /&gt;
 *  The created object will have two properties:&lt;br /&gt;
 *  obj   - the named object itself&lt;br /&gt;
 *  style - the stylesheet object for the named object.&lt;br /&gt;
 *&lt;br /&gt;
 *  based on http://www.quirksmode.org/js/dhtmloptions.html&lt;br /&gt;
 *&lt;br /&gt;
 *  @param name the name of the element to create this object upon.&lt;br /&gt;
 */&lt;br /&gt;
function getObj(name)&lt;br /&gt;
{&lt;br /&gt;
    if (document.getElementById) {&lt;br /&gt;
        this.obj   = document.getElementById(name);&lt;br /&gt;
        this.style = document.getElementById(name).style;&lt;br /&gt;
    } else if (document.all) {&lt;br /&gt;
        this.obj   = document.all[name];&lt;br /&gt;
        this.style = document.all[name].style;&lt;br /&gt;
    } else if (document.layers) {&lt;br /&gt;
        this.obj   = document.layers[name];&lt;br /&gt;
        this.style = document.layers[name];&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
/**&lt;br /&gt;
 *  Find the X coordinate of an element in the document.&lt;br /&gt;
 *  based on http://www.quirksmode.org/js/findpos.html&lt;br /&gt;
 *&lt;br /&gt;
 *  @param obj the element in the document.&lt;br /&gt;
 *  @return the x coordinate for this element.&lt;br /&gt;
 */&lt;br /&gt;
function findPosX(obj)&lt;br /&gt;
{&lt;br /&gt;
    var curleft = 0;&lt;br /&gt;
    if (obj.offsetParent) {&lt;br /&gt;
        while (obj.offsetParent) {&lt;br /&gt;
            curleft += obj.offsetLeft&lt;br /&gt;
            obj = obj.offsetParent;&lt;br /&gt;
        }&lt;br /&gt;
    } else if (obj.x) {&lt;br /&gt;
        curleft += obj.x;&lt;br /&gt;
    }&lt;br /&gt;
    return curleft;&lt;br /&gt;
}&lt;br /&gt;
/**&lt;br /&gt;
 *  Find the Y coordinate of an element in the document.&lt;br /&gt;
 *  based on http://www.quirksmode.org/js/findpos.html&lt;br /&gt;
 *&lt;br /&gt;
 *  @param obj the element in the document.&lt;br /&gt;
 *  @return the x coordinate for this element.&lt;br /&gt;
 */&lt;br /&gt;
function findPosY(obj)&lt;br /&gt;
{&lt;br /&gt;
    var curtop = 0;&lt;br /&gt;
    if (obj.offsetParent) {&lt;br /&gt;
        while (obj.offsetParent) {&lt;br /&gt;
            curtop += obj.offsetTop&lt;br /&gt;
            obj = obj.offsetParent;&lt;br /&gt;
        }&lt;br /&gt;
    } else if (obj.y) {&lt;br /&gt;
        curtop += obj.y;&lt;br /&gt;
    }&lt;br /&gt;
    return curtop;&lt;br /&gt;
}&lt;br /&gt;
/**&lt;br /&gt;
 *  Replace the contenst of a DOM element.&lt;br /&gt;
 *  based on http://www.quirksmode.org/js/layerwrite.html&lt;br /&gt;
 *&lt;br /&gt;
 *  @param id the id of the element.&lt;br /&gt;
 *  @param text the new text of the element.&lt;br /&gt;
 */&lt;br /&gt;
function replaceContent(id, text)&lt;br /&gt;
{&lt;br /&gt;
    if (document.getElementById) {&lt;br /&gt;
        x = document.getElementById(id);&lt;br /&gt;
        x.innerHTML = &amp;quot;&amp;quot;;&lt;br /&gt;
        x.innerHTML = text;&lt;br /&gt;
    } else if (document.all) {&lt;br /&gt;
        x = document.all[id];&lt;br /&gt;
        x.innerHTML = text;&lt;br /&gt;
    } else if (document.layers) {&lt;br /&gt;
        x = document.layers[id];&lt;br /&gt;
        text2 = &amp;quot;&amp;lt;P CLASS=&amp;quot;testclass&amp;quot;&amp;gt;&amp;quot; + text + &amp;quot;&amp;lt;/P&amp;gt;&amp;quot;;&lt;br /&gt;
        x.document.open();&lt;br /&gt;
        x.document.write(text2);&lt;br /&gt;
        x.document.close();&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 *  Function to calculate the X coordinate of an orthographic projection.&lt;br /&gt;
 *  based on http://mathworld.wolfram.ru/OrthographicProjection.html&lt;br /&gt;
 *&lt;br /&gt;
 *  @param phi the lattitude of the point on the sphere&lt;br /&gt;
 *  @param lambda the longitude of the point on the sphere&lt;br /&gt;
 *  @param phi1 the lattitude of the viewpoint&lt;br /&gt;
 *  @param lambda1 the longitued of the viewpoint&lt;br /&gt;
 *  @return the x coordinate of the specified point.&lt;br /&gt;
 */&lt;br /&gt;
function orthographicX(phi, lambda, phi1, lambda1)&lt;br /&gt;
{&lt;br /&gt;
    var x = Math.cos(phi) * Math.sin(lambda - lambda1);&lt;br /&gt;
    return x;&lt;br /&gt;
}&lt;br /&gt;
/**&lt;br /&gt;
 *  Function to calculate the Y coordinate of an orthographic projection&lt;br /&gt;
 *  based on http://mathworld.wolfram.ru/OrthographicProjection.html&lt;br /&gt;
 *&lt;br /&gt;
 *  @param phi the lattitude of the point on the sphere&lt;br /&gt;
 *  @param lambda the longitude of the point on the sphere&lt;br /&gt;
 *  @param phi1 the lattitude of the viewpoint&lt;br /&gt;
 *  @param lambda1 the longitued of the viewpoint&lt;br /&gt;
 *  @return the y coordinate of the specified point.&lt;br /&gt;
 */&lt;br /&gt;
function orthographicY(phi, lambda, phi1, lambda1)&lt;br /&gt;
{&lt;br /&gt;
    var y = Math.cos(phi1) * Math.sin(phi)&lt;br /&gt;
          - Math.sin(phi1) * Math.cos(phi) * Math.cos(lambda - lambda1);&lt;br /&gt;
    return y;&lt;br /&gt;
}&lt;br /&gt;
/**&lt;br /&gt;
 *  Helper function to convert a latitude or longitued into radii.&lt;br /&gt;
 *&lt;br /&gt;
 *  @param degrees the latitude or longitude&lt;br /&gt;
 *  @return the same value, in radii&lt;br /&gt;
 */&lt;br /&gt;
function toRadii(degrees)&lt;br /&gt;
{&lt;br /&gt;
    return (degrees / 180.0) * Math.PI;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;!-- GeoLocation.js --&amp;gt;&lt;br /&gt;
&amp;lt;script language=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
/*------------------------------------------------------------------------------&lt;br /&gt;
   Copyright (c) 2005 Tyrell Corporation.&lt;br /&gt;
    This file is part of the Locative Blog project.&lt;br /&gt;
    http://locblog.sourceforge.net/&lt;br /&gt;
   Author   : $Author: darkeye $&lt;br /&gt;
   Version  : $Revision: 1.1.1.1 $&lt;br /&gt;
   Location : $Source: /cvsroot/locblog/rotatingGlobe/var/public_html/GeoLocation.js,v $&lt;br /&gt;
   Abstract : &lt;br /&gt;
    A class representing a geogpraphical location.&lt;br /&gt;
   Copyright notice:&lt;br /&gt;
    This program is free software; you can redistribute it and/or&lt;br /&gt;
    modify it under the terms of the GNU General Public License  &lt;br /&gt;
    as published by the Free Software Foundation; either version 2&lt;br /&gt;
    of the License, or (at your option) any later version.&lt;br /&gt;
   &lt;br /&gt;
    This program is distributed in the hope that it will be useful,&lt;br /&gt;
    but WITHOUT ANY WARRANTY; without even the implied warranty of &lt;br /&gt;
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the &lt;br /&gt;
    GNU General Public License for more details.&lt;br /&gt;
   &lt;br /&gt;
    You should have received a copy of the GNU General Public License&lt;br /&gt;
    along with this program; if not, write to the Free Software&lt;br /&gt;
    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.&lt;br /&gt;
------------------------------------------------------------------------------*/&lt;br /&gt;
/**&lt;br /&gt;
 *  Constructor for a geographic location, with a link.&lt;br /&gt;
 *&lt;br /&gt;
 *  @param id the id of the location (no spaces, etc.)&lt;br /&gt;
 *  @param name the name of the location&lt;br /&gt;
 *  @param longitude the longitude coordinate of the location&lt;br /&gt;
 *  @param latitude the latitude coordinate of the location&lt;br /&gt;
 *  @param url the url for more info on the location&lt;br /&gt;
 */&lt;br /&gt;
function GeoLocation(id,&lt;br /&gt;
                     name,&lt;br /&gt;
                     longitude,&lt;br /&gt;
                     latitude,&lt;br /&gt;
                     url)&lt;br /&gt;
{&lt;br /&gt;
    // the id of the location&lt;br /&gt;
    this.id = id;&lt;br /&gt;
    // the name of the location&lt;br /&gt;
    this.name = name;&lt;br /&gt;
    // the longitude coordinate of the location&lt;br /&gt;
    this.longitude = longitude &amp;lt; 0 ? 360 + longitude : longitude;&lt;br /&gt;
    // the latitude coordinate of the location&lt;br /&gt;
    this.latitude = latitude;&lt;br /&gt;
    // the url for more info on the location&lt;br /&gt;
    this.url = url;&lt;br /&gt;
    // the image used to mark the location visually&lt;br /&gt;
    this.markerImage = &amp;quot;globeImages/5x5.png&amp;quot;;&lt;br /&gt;
    // the width of the marker image&lt;br /&gt;
    this.markerWidth = 5;&lt;br /&gt;
    // the height of the marker image&lt;br /&gt;
    this.markerHeight = 5;&lt;br /&gt;
    // the x coordinate of this location, relative to the page window&lt;br /&gt;
    this.x = 0;&lt;br /&gt;
    // the y coordinate of this location, relative to the page window&lt;br /&gt;
    this.y = 0;&lt;br /&gt;
    // create the CSS definition for this location&lt;br /&gt;
    this.styleDefinition = geoLocationStyleDefinition;&lt;br /&gt;
    // create the HTML element source for this location&lt;br /&gt;
    this.htmlDefinition = geoLocationHtmlDefinition;&lt;br /&gt;
    // display the location object on a RotatingGlobe object&lt;br /&gt;
    this.display = geoLocationDisplay;&lt;br /&gt;
    // move the marker depiciting the location to the specified position&lt;br /&gt;
    this.moveMarker = geoLocationMoveMarker;&lt;br /&gt;
    // hide the marker depiciting the location&lt;br /&gt;
    this.hideMarker = geoLocationHideMarker;&lt;br /&gt;
    // show the location popup near the geo location&lt;br /&gt;
    this.showPopup = geoLocationShowPopup;&lt;br /&gt;
    // hide the location popup near the geo location&lt;br /&gt;
    this.hidePopup = geoLocationHidePopup;&lt;br /&gt;
    // Tell if the longitude coordinate of the GeoLocation object is visible&lt;br /&gt;
    // from a reference viewpoint.&lt;br /&gt;
    this.longitudeVisible = geoLocationLongitudeVisible;&lt;br /&gt;
}&lt;br /&gt;
/**&lt;br /&gt;
 *  Create the CSS definition for this location&lt;br /&gt;
 *&lt;br /&gt;
 *  @return the CSS definition for this location, as a string&lt;br /&gt;
 */&lt;br /&gt;
function geoLocationStyleDefinition()&lt;br /&gt;
{&lt;br /&gt;
    return &amp;quot;#&amp;quot; + this.id + &amp;quot;{&amp;quot;&lt;br /&gt;
         + &amp;quot; position: absolute; &amp;quot;&lt;br /&gt;
         + &amp;quot; top:      0px; &amp;quot;&lt;br /&gt;
         + &amp;quot; left:     0px; &amp;quot;&lt;br /&gt;
         + &amp;quot;}\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
/**&lt;br /&gt;
 *  Create the HTML element source for this location&lt;br /&gt;
 *&lt;br /&gt;
 *  @return the HTML element source for this location, as a string.&lt;br /&gt;
 */&lt;br /&gt;
function geoLocationHtmlDefinition()&lt;br /&gt;
{&lt;br /&gt;
    return &amp;quot;&amp;lt;a id=&amp;quot;&amp;quot; + this.id + &amp;quot;&amp;quot; href=&amp;quot;&amp;quot; + this.url + &amp;quot;&amp;quot;&amp;gt;&amp;quot;&lt;br /&gt;
         + &amp;quot;&amp;lt;img name=&amp;quot;&amp;quot; + this.id + &amp;quot;&amp;quot; alt=&amp;quot;&amp;quot; + this.name + &amp;quot;&amp;quot; &amp;quot;&lt;br /&gt;
            + &amp;quot;src=&amp;quot;&amp;quot; + this.markerImage + &amp;quot;&amp;quot; &amp;quot;&lt;br /&gt;
            + &amp;quot;width=&amp;quot;&amp;quot; + this.markerWidth + &amp;quot;&amp;quot; &amp;quot;&lt;br /&gt;
            + &amp;quot;height=&amp;quot;&amp;quot; + this.markerHeight + &amp;quot;&amp;quot; border=&amp;quot;0&amp;quot;/&amp;gt;&amp;quot;&lt;br /&gt;
         + &amp;quot;&amp;lt;/a&amp;gt;\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
/**&lt;br /&gt;
 *  Move the marker depicting the location to the specified coordinates.&lt;br /&gt;
 */&lt;br /&gt;
function geoLocationMoveMarker()&lt;br /&gt;
{&lt;br /&gt;
    var locationObject = new getObj(this.id);&lt;br /&gt;
    locationObject.style.top        = this.y + &amp;quot;px&amp;quot;;&lt;br /&gt;
    locationObject.style.left       = this.x + &amp;quot;px&amp;quot;;&lt;br /&gt;
    locationObject.style.visibility = &amp;quot;visible&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
/**&lt;br /&gt;
 *  Hide the Marker depicting the location.&lt;br /&gt;
 */&lt;br /&gt;
function geoLocationHideMarker()&lt;br /&gt;
{&lt;br /&gt;
    var locationObject = new getObj(this.id);&lt;br /&gt;
    locationObject.style.visibility = &amp;quot;hidden&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
/**&lt;br /&gt;
 *  Show the popup text near the location.&lt;br /&gt;
 */&lt;br /&gt;
function geoLocationShowPopup()&lt;br /&gt;
{&lt;br /&gt;
    replaceContent(&amp;quot;locationPopup&amp;quot;, this.name);&lt;br /&gt;
    var popup = new getObj(&amp;quot;locationPopup&amp;quot;);&lt;br /&gt;
    // display a bit to the right and above&lt;br /&gt;
    popup.style.left       = (this.x + 10) + &amp;quot;px&amp;quot;;&lt;br /&gt;
    popup.style.top        = (this.y - 15) + &amp;quot;px&amp;quot;;&lt;br /&gt;
    popup.style.visibility = &amp;quot;visible&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
/**&lt;br /&gt;
 *  Hide the popup near the location.&lt;br /&gt;
 */&lt;br /&gt;
function geoLocationHidePopup()&lt;br /&gt;
{&lt;br /&gt;
    var popup = new getObj(&amp;quot;locationPopup&amp;quot;);&lt;br /&gt;
    popup.style.visibility = &amp;quot;hidden&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 *  Display the location on the map.&lt;br /&gt;
 *&lt;br /&gt;
 *  @param globe a RotatingGlobe object, on which to display the location&lt;br /&gt;
 */&lt;br /&gt;
function geoLocationDisplay(globe)&lt;br /&gt;
{&lt;br /&gt;
    longStepSize  = 360.0 / globe.maxPosition;&lt;br /&gt;
    viewLongitude = globe.position * longStepSize;&lt;br /&gt;
    if (!this.longitudeVisible(viewLongitude)) {&lt;br /&gt;
        this.hideMarker();&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
    lambda  = toRadii(this.longitude);&lt;br /&gt;
    phi     = toRadii(this.latitude);&lt;br /&gt;
    lambda1 = toRadii(viewLongitude);&lt;br /&gt;
    phi1    = toRadii(0);&lt;br /&gt;
    x = (orthographicX(phi, lambda, phi1, lambda1) * (globe.realGlobeWidth/2))&lt;br /&gt;
      + (globe.globeImage.width / 2);&lt;br /&gt;
    y = globe.globeImage.height&lt;br /&gt;
      - ((orthographicY(phi, lambda, phi1, lambda1) * (globe.realGlobeHeight/2))&lt;br /&gt;
         + (globe.globeImage.height / 2) );&lt;br /&gt;
    this.x = globe.globeImageX + x;&lt;br /&gt;
    this.y = globe.globeImageY + y;&lt;br /&gt;
    this.moveMarker();&lt;br /&gt;
}&lt;br /&gt;
/**&lt;br /&gt;
 *  Tell if the longitude coordinate of the GeoLocation object is visible&lt;br /&gt;
 *  from a reference viewpoint.&lt;br /&gt;
 *  It&amp;quot;s not visible if it would be &amp;quot;on the other side of the planet&amp;quot;&lt;br /&gt;
 *&lt;br /&gt;
 *  @param refLongitude the reference view point, to check from.&lt;br /&gt;
 *  @return true if longitude is visible, false otherwise&lt;br /&gt;
 */&lt;br /&gt;
function geoLocationLongitudeVisible(refLongitude)&lt;br /&gt;
{&lt;br /&gt;
    var westEdge = refLongitude - 90;&lt;br /&gt;
    var eastEdge = refLongitude + 90;&lt;br /&gt;
    if (westEdge &amp;gt;= 0 &amp;amp;&amp;amp; eastEdge &amp;lt; 360) {&lt;br /&gt;
        return westEdge &amp;lt;= this.longitude &amp;amp;&amp;amp; this.longitude &amp;lt;= eastEdge;&lt;br /&gt;
    } else if (eastEdge &amp;gt;= 360) {&lt;br /&gt;
        eastEdge -= 360;&lt;br /&gt;
        return westEdge &amp;lt;= this.longitude || this.longitude &amp;lt;= eastEdge;&lt;br /&gt;
    } else {&lt;br /&gt;
        westEdge += 360;&lt;br /&gt;
        return westEdge &amp;lt;= this.longitude || this.longitude &amp;lt;= eastEdge;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;!-- RotatingGlobe.js --&amp;gt;&lt;br /&gt;
&amp;lt;script language=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
/*------------------------------------------------------------------------------&lt;br /&gt;
   Copyright (c) 2005 Tyrell Corporation.&lt;br /&gt;
    This file is part of the Locative Blog project.&lt;br /&gt;
    http://locblog.sourceforge.net/&lt;br /&gt;
   Author   : $Author: darkeye $&lt;br /&gt;
   Version  : $Revision: 1.1.1.1 $&lt;br /&gt;
   Location : $Source: /cvsroot/locblog/rotatingGlobe/var/public_html/RotatingGlobe.js,v $&lt;br /&gt;
   Abstract : &lt;br /&gt;
    A rotating globe JavaScript object.&lt;br /&gt;
   Copyright notice:&lt;br /&gt;
    This program is free software; you can redistribute it and/or&lt;br /&gt;
    modify it under the terms of the GNU General Public License  &lt;br /&gt;
    as published by the Free Software Foundation; either version 2&lt;br /&gt;
    of the License, or (at your option) any later version.&lt;br /&gt;
   &lt;br /&gt;
    This program is distributed in the hope that it will be useful,&lt;br /&gt;
    but WITHOUT ANY WARRANTY; without even the implied warranty of &lt;br /&gt;
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the &lt;br /&gt;
    GNU General Public License for more details.&lt;br /&gt;
   &lt;br /&gt;
    You should have received a copy of the GNU General Public License&lt;br /&gt;
    along with this program; if not, write to the Free Software&lt;br /&gt;
    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.&lt;br /&gt;
------------------------------------------------------------------------------*/&lt;br /&gt;
/**&lt;br /&gt;
 *  Event handler for a preloaded image finishing loading.&lt;br /&gt;
 *  This function expects the rotating globe, for which preloaded images&lt;br /&gt;
 *  are checked, being available at the global variable named &amp;quot;globe&amp;quot;.&lt;br /&gt;
 *&lt;br /&gt;
 *  @return true if all images are loaded, false otherwise.&lt;br /&gt;
 */&lt;br /&gt;
function globeImageLoaded()&lt;br /&gt;
{&lt;br /&gt;
    if (globe.imagesLoaded()) {&lt;br /&gt;
        globe.init();&lt;br /&gt;
        return true;&lt;br /&gt;
    }&lt;br /&gt;
    return false;&lt;br /&gt;
}&lt;br /&gt;
/**&lt;br /&gt;
 *  Start dragging the image by the mouse move.&lt;br /&gt;
 *  This function expects the rotating globe at a global variable named &amp;quot;globe&amp;quot;&lt;br /&gt;
 */&lt;br /&gt;
function globeDragImage()&lt;br /&gt;
{&lt;br /&gt;
    globe.startDragImage();&lt;br /&gt;
    document.globe.onmousemove = globeTrackMouseMove;&lt;br /&gt;
}&lt;br /&gt;
/**&lt;br /&gt;
 *  Stop dragging the image by the mouse move.&lt;br /&gt;
 *  This function expects the rotating globe at a global variable named &amp;quot;globe&amp;quot;&lt;br /&gt;
 */&lt;br /&gt;
function globeUndragImage()&lt;br /&gt;
{&lt;br /&gt;
    document.globe.onmousemove = null;&lt;br /&gt;
    globe.stopDragImage();&lt;br /&gt;
}&lt;br /&gt;
/**&lt;br /&gt;
 *  Track the mouse movement, and change the globe view if necessary.&lt;br /&gt;
 *  This function expects the rotating globe at a global variable named &amp;quot;globe&amp;quot;&lt;br /&gt;
 *&lt;br /&gt;
 *  @param event the mouse movement event.&lt;br /&gt;
 */&lt;br /&gt;
function globeTrackMouseMove(event)&lt;br /&gt;
{&lt;br /&gt;
    // first tell the current mouse position, possibly in all browsers&lt;br /&gt;
    // thanks to http://www.quirksmode.org/js/events_properties.html&lt;br /&gt;
    var posx = 0;&lt;br /&gt;
    var posy = 0;&lt;br /&gt;
    if (!event) {&lt;br /&gt;
        var event = window.event;&lt;br /&gt;
    }&lt;br /&gt;
    if (event.pageX || event.pageY) {&lt;br /&gt;
        posx = event.pageX;&lt;br /&gt;
        posy = event.pageY;&lt;br /&gt;
    } else if (event.clientX || event.clientY) {&lt;br /&gt;
        posx = event.clientX + document.body.scrollLeft;&lt;br /&gt;
        posy = event.clientY + document.body.scrollTop;&lt;br /&gt;
    }&lt;br /&gt;
    // display the detected coordinates, for debug reasons&lt;br /&gt;
    document.test.x.value = posx;&lt;br /&gt;
    document.test.y.value = posy;&lt;br /&gt;
    globe.updateView(posx, posy);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 *  The contructor class depicting the rotating globe.&lt;br /&gt;
 *&lt;br /&gt;
 *  @param globeImage the globe &amp;lt;img/&amp;gt; tag in the page,&lt;br /&gt;
 *         that holds the globe images.&lt;br /&gt;
 *  @param globeBorder the number of pixels the image has a border around&lt;br /&gt;
 *         the enclosed globe. it is expected that the image has a globe at&lt;br /&gt;
 *         its center, which is surrounded by a border on each side with&lt;br /&gt;
 *         this many pixels. thus the actual globe is&lt;br /&gt;
 *         globeImage.width - (2 * globeBorder) wide, and&lt;br /&gt;
 *         globeImage.height - (2 * globeBorder) in height.&lt;br /&gt;
 *  @param locations an array holding GeoLocation object, the list of&lt;br /&gt;
 *         interesting locations.&lt;br /&gt;
 */&lt;br /&gt;
function RotatingGlobe(globeImage, globeBorder, locations)&lt;br /&gt;
{&lt;br /&gt;
    // the &amp;lt;img/&amp;gt; element in the page, holding the globe images&lt;br /&gt;
    this.globeImage = globeImage;&lt;br /&gt;
    // the size of the border around the globe in the image&lt;br /&gt;
    this.globeBorder = globeBorder;&lt;br /&gt;
    // the interesting locations on the globe&lt;br /&gt;
    this.locations = locations;&lt;br /&gt;
    // the X coordinate of the upper-left corner of the globe image&lt;br /&gt;
    // in the browser window&lt;br /&gt;
    this.globeImageX = findPosX(document.globe);&lt;br /&gt;
    // the Y coordinate of the upper-left corner of the globe image&lt;br /&gt;
    // in the browser window&lt;br /&gt;
    this.globeImageY = findPosY(document.globe);&lt;br /&gt;
    // the real height of the globe itself, inside the image&lt;br /&gt;
    this.realGlobeHeight = this.globeImage.width - (2 * this.globeBorder);&lt;br /&gt;
    // the real width of the globe itself, inside the image&lt;br /&gt;
    this.realGlobeWidth  = this.globeImage.height - (2 * this.globeBorder);&lt;br /&gt;
    // the number of view positions available&lt;br /&gt;
    this.maxPosition = 36;&lt;br /&gt;
    // the current view position&lt;br /&gt;
    this.position = 0;&lt;br /&gt;
    // the prefix for each globe image&lt;br /&gt;
    // the image names are: imagePrefix + position + imagePostfix&lt;br /&gt;
    this.imagePrefix = &amp;quot;globeImages/globe&amp;quot;;&lt;br /&gt;
    // the postfix for each globe image&lt;br /&gt;
    // the image names are: imagePrefix + position + imagePostfix&lt;br /&gt;
    this.imagePostfix = &amp;quot;.jpg&amp;quot;;&lt;br /&gt;
    // the globe images, as an array&lt;br /&gt;
    this.images = Array(this.maxPosition);&lt;br /&gt;
    // the x coordinate, which if passed by the mouse, triggers a move to east&lt;br /&gt;
    this.eastThreshold = 0;&lt;br /&gt;
    // the x coordinate, which if passed by the mouse, triggers a move to west&lt;br /&gt;
    this.westThreshold = 0;&lt;br /&gt;
    // the size of the x coordinate window to trigger a move to east or west&lt;br /&gt;
    // by the mouse movement&lt;br /&gt;
    this.thresholdStep = 20;&lt;br /&gt;
    // a flag indicating if this object has already been initialized&lt;br /&gt;
    this.initialized = false;&lt;br /&gt;
    // preload all the images for the globe&lt;br /&gt;
    this.preloadImages = rotatingGlobePreloadImages;&lt;br /&gt;
    // tell if all images that are to be preloaded have completed loading.&lt;br /&gt;
    this.imagesLoaded = rotatingGlobeImagesLoaded;&lt;br /&gt;
    // initialize the globe, after all the images have been loaded&lt;br /&gt;
    this.init = rotatingGlobeInit;&lt;br /&gt;
    // start mouse dragging&lt;br /&gt;
    this.startDragImage = rotatingGlobeStartDragImage;&lt;br /&gt;
    // stop mouse dragging&lt;br /&gt;
    this.stopDragImage = rotatingGlobeStopDragImage;&lt;br /&gt;
    // update the view point according to the new mouse coordinates, if needed&lt;br /&gt;
    this.updateView = rotatingGlobeUpdateView;&lt;br /&gt;
    // function to return the name of an image for a specified position&lt;br /&gt;
    this.imageName = rotatingGlobeImageName;&lt;br /&gt;
    // rotate the viewpoint one step to the east&lt;br /&gt;
    this.rotateEast = rotatingGlobeRotateEast;&lt;br /&gt;
    // rotate the viewpoint one step to the west&lt;br /&gt;
    this.rotateWest = rotatingGlobeRotateWest;&lt;br /&gt;
    // reset the mouse movement thresholds triggering view point change&lt;br /&gt;
    this.resetThreshold = rotatingGlobeResetThreshold;&lt;br /&gt;
    // display the locations&lt;br /&gt;
    this.displayLocations = rotatingGlobeDisplayLocations;&lt;br /&gt;
}&lt;br /&gt;
/**&lt;br /&gt;
 *  Function returning the name of an image for a specified position&lt;br /&gt;
 *&lt;br /&gt;
 *  @param position the view position to get the image for, must be&lt;br /&gt;
 *         in the interval [0:maxPosition[&lt;br /&gt;
 *  @return the name of the appropariate globe image, as a string&lt;br /&gt;
 */&lt;br /&gt;
function rotatingGlobeImageName(position)&lt;br /&gt;
{&lt;br /&gt;
    return this.imagePrefix + position + this.imagePostfix;&lt;br /&gt;
}&lt;br /&gt;
/**&lt;br /&gt;
 *  Rotate the current viewpoint one step to the east.&lt;br /&gt;
 */&lt;br /&gt;
function rotatingGlobeRotateEast()&lt;br /&gt;
{&lt;br /&gt;
    this.position = (++this.position) % this.maxPosition;&lt;br /&gt;
    this.globeImage.src = this.images[this.position].src;&lt;br /&gt;
    this.displayLocations();&lt;br /&gt;
}&lt;br /&gt;
/**&lt;br /&gt;
 *  Rotate the current viewpoint one step to the east.&lt;br /&gt;
 */&lt;br /&gt;
function rotatingGlobeRotateWest()&lt;br /&gt;
{&lt;br /&gt;
    this.position = (--this.position) % this.maxPosition;&lt;br /&gt;
    if (this.position &amp;lt; 0) {&lt;br /&gt;
        this.position += this.maxPosition;&lt;br /&gt;
    }&lt;br /&gt;
    this.globeImage.src = this.images[this.position].src;&lt;br /&gt;
    this.displayLocations();&lt;br /&gt;
}&lt;br /&gt;
/**&lt;br /&gt;
 *  Preload all the images, so that they are in the browsers cache.&lt;br /&gt;
 */&lt;br /&gt;
function rotatingGlobePreloadImages()&lt;br /&gt;
{&lt;br /&gt;
    this.initialized = false;&lt;br /&gt;
    for (i = 0; i &amp;lt; this.maxPosition; ++i) {&lt;br /&gt;
        this.images[i] = new Image(this.globeImage.width,&lt;br /&gt;
                                   this.globeImage.height);&lt;br /&gt;
        this.images[i].onload = globeImageLoaded;&lt;br /&gt;
        this.images[i].src    = this.imageName(i);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
/**&lt;br /&gt;
 *  Tell if all images that are to be preloaded have completed loading.&lt;br /&gt;
 *&lt;br /&gt;
 *  @return true if all images have been loaded, false otherwise&lt;br /&gt;
 */&lt;br /&gt;
function rotatingGlobeImagesLoaded()&lt;br /&gt;
{&lt;br /&gt;
    var   allCompleted = true;&lt;br /&gt;
    for (i = 0; i &amp;lt; this.maxPosition; ++i) {&lt;br /&gt;
        if (!this.images[i].ruplete) {&lt;br /&gt;
            allCompleted = false;&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return allCompleted;&lt;br /&gt;
}&lt;br /&gt;
/**&lt;br /&gt;
 *  Initialize the globe, after all the images have been loaded.&lt;br /&gt;
 *  This means grabbing event handlers, etc.&lt;br /&gt;
 */&lt;br /&gt;
function rotatingGlobeInit()&lt;br /&gt;
{&lt;br /&gt;
    if (this.initialized) {&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
    this.thresholdStep        = this.globeImage.width / (this.maxPosition + 1);&lt;br /&gt;
    this.globeImage.onmousedown = globeDragImage;&lt;br /&gt;
    this.globeImage.onmouseup   = globeUndragImage;&lt;br /&gt;
    this.globeImage.src         = this.images[0].src;&lt;br /&gt;
    this.initialized            = true;&lt;br /&gt;
    for (i = 0; i &amp;lt; locations.length; ++i) {&lt;br /&gt;
        var obj = new getObj(locations[i].id);&lt;br /&gt;
        obj.obj.onmouseover = locationShowPopup;&lt;br /&gt;
        obj.obj.onmouseout  = locationHidePopup;&lt;br /&gt;
    }&lt;br /&gt;
    this.displayLocations();&lt;br /&gt;
}&lt;br /&gt;
/**&lt;br /&gt;
 *  Find a location in an array of locations, by its id.&lt;br /&gt;
 *&lt;br /&gt;
 *  @param locations an array of GeoLocation objects.&lt;br /&gt;
 *  @param id the id of the location to look for&lt;br /&gt;
 *  @return the requested GeoLocation object, or null if not found.&lt;br /&gt;
 */&lt;br /&gt;
function getLocationById(locations, id) {&lt;br /&gt;
    for (i = 0; i &amp;lt; locations.length; ++i) {&lt;br /&gt;
        if (locations[i].id == id) {&lt;br /&gt;
            return locations[i];&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return null;&lt;br /&gt;
}&lt;br /&gt;
/**&lt;br /&gt;
 *  Event hanlder for showing the popup near a location.&lt;br /&gt;
 *&lt;br /&gt;
 *  @param event the event triggering this call. it is expected that the event&lt;br /&gt;
 *         target name is a valid GeoLocation id in the locations array.&lt;br /&gt;
 */&lt;br /&gt;
function locationShowPopup(event) {&lt;br /&gt;
    geoLocation = getLocationById(locations, event.target.name);&lt;br /&gt;
    if (geoLocation != null ) {&lt;br /&gt;
        geoLocation.showPopup();&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
/**&lt;br /&gt;
 *  Event hanlder for hiding the popup near a location.&lt;br /&gt;
 *&lt;br /&gt;
 *  @param event the event triggering this call. it is expected that the event&lt;br /&gt;
 *         target name is a valid GeoLocation id in the locations array.&lt;br /&gt;
 */&lt;br /&gt;
function locationHidePopup(event) {&lt;br /&gt;
    geoLocation = getLocationById(locations, event.target.name);&lt;br /&gt;
    if (geoLocation != null ) {&lt;br /&gt;
        geoLocation.hidePopup();&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
/**&lt;br /&gt;
 *  Reset the mouse movement thresholds. Set the new limits for when&lt;br /&gt;
 *  to change the view point, if the mouse move beyonds these limints.&lt;br /&gt;
 *&lt;br /&gt;
 *  @param posx the current position, from where the relative thresholds&lt;br /&gt;
 *         have to be set up.&lt;br /&gt;
 */&lt;br /&gt;
function rotatingGlobeResetThreshold(posx)&lt;br /&gt;
{&lt;br /&gt;
    this.eastThreshold = posx - this.thresholdStep;&lt;br /&gt;
    this.westThreshold = posx + this.thresholdStep;&lt;br /&gt;
}&lt;br /&gt;
/**&lt;br /&gt;
 *  Start mouse dragging&lt;br /&gt;
 */&lt;br /&gt;
function rotatingGlobeStartDragImage()&lt;br /&gt;
{&lt;br /&gt;
    this.eastThreshold = 0;&lt;br /&gt;
    this.westThreshold = 0;&lt;br /&gt;
}&lt;br /&gt;
/**&lt;br /&gt;
 *  Stop mouse dragging.&lt;br /&gt;
 */&lt;br /&gt;
function rotatingGlobeStopDragImage()&lt;br /&gt;
{&lt;br /&gt;
    this.eastThreshold = 0;&lt;br /&gt;
    this.westThreshold = 0;&lt;br /&gt;
}&lt;br /&gt;
/**&lt;br /&gt;
 *  Update the view point according to the new mouse coordinates, if needed.&lt;br /&gt;
 *&lt;br /&gt;
 *  @param x the new x coordinate for the mouse&lt;br /&gt;
 *  @param y the new y coordinate for the mouse&lt;br /&gt;
 */&lt;br /&gt;
function rotatingGlobeUpdateView(x, y)&lt;br /&gt;
{&lt;br /&gt;
    // if this is the first event after started dragging, initialize&lt;br /&gt;
    // the appropriate thresholds&lt;br /&gt;
    if (this.eastThreshold == 0 &amp;amp;&amp;amp; this.westThreshold == 0) {&lt;br /&gt;
        this.resetThreshold(x);&lt;br /&gt;
    }&lt;br /&gt;
    // change the view point, if needed&lt;br /&gt;
    if (x &amp;gt; this.westThreshold) {&lt;br /&gt;
        this.rotateWest();&lt;br /&gt;
        this.resetThreshold(x);&lt;br /&gt;
    } else if (x &amp;lt; this.eastThreshold) {&lt;br /&gt;
        this.rotateEast();&lt;br /&gt;
        this.resetThreshold(x);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
/**&lt;br /&gt;
 *  Display all interesting locations on the map.&lt;br /&gt;
 */&lt;br /&gt;
function rotatingGlobeDisplayLocations()&lt;br /&gt;
{&lt;br /&gt;
    for (i = 0; i &amp;lt; locations.length; ++i) {&lt;br /&gt;
        this.locations[i].display(this);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;script language=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
/**&lt;br /&gt;
 *  The global rotating globe object, the event handlers depend on this.&lt;br /&gt;
 */&lt;br /&gt;
var globe;&lt;br /&gt;
/**&lt;br /&gt;
 *  The locations.&lt;br /&gt;
 */&lt;br /&gt;
var locations = Array();&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;!-- locations.js --&amp;gt;&lt;br /&gt;
&amp;lt;script language=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
/*------------------------------------------------------------------------------&lt;br /&gt;
   Copyright (c) 2005 Tyrell Corporation.&lt;br /&gt;
    This file is part of the Locative Blog project.&lt;br /&gt;
    http://locblog.sourceforge.net/&lt;br /&gt;
   Author   : $Author: darkeye $&lt;br /&gt;
   Version  : $Revision: 1.1.1.1 $&lt;br /&gt;
   Location : $Source: /cvsroot/locblog/rotatingGlobe/var/public_html/locations.js,v $&lt;br /&gt;
   &lt;br /&gt;
   Abstract : &lt;br /&gt;
    A sample location data definition file.&lt;br /&gt;
   Copyright notice:&lt;br /&gt;
    This program is free software; you can redistribute it and/or&lt;br /&gt;
    modify it under the terms of the GNU General Public License  &lt;br /&gt;
    as published by the Free Software Foundation; either version 2&lt;br /&gt;
    of the License, or (at your option) any later version.&lt;br /&gt;
   &lt;br /&gt;
    This program is distributed in the hope that it will be useful,&lt;br /&gt;
    but WITHOUT ANY WARRANTY; without even the implied warranty of &lt;br /&gt;
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the &lt;br /&gt;
    GNU General Public License for more details.&lt;br /&gt;
   &lt;br /&gt;
    You should have received a copy of the GNU General Public License&lt;br /&gt;
    along with this program; if not, write to the Free Software&lt;br /&gt;
    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.&lt;br /&gt;
------------------------------------------------------------------------------*/&lt;br /&gt;
locations.push(new GeoLocation(&lt;br /&gt;
    &amp;quot;amsterdam&amp;quot;, &amp;quot;Amsterdam&amp;quot;, 4.54, 52.23, &amp;quot;/amsterdam&amp;quot;));&lt;br /&gt;
locations.push(new GeoLocation(&lt;br /&gt;
    &amp;quot;bangkok&amp;quot;, &amp;quot;Bangkok&amp;quot;, 100.50, 13.73, &amp;quot;/bangkok&amp;quot;));&lt;br /&gt;
locations.push(new GeoLocation(&lt;br /&gt;
    &amp;quot;budapest&amp;quot;, &amp;quot;Budapest&amp;quot;, 19.05, 47.50, &amp;quot;/budapest&amp;quot;));&lt;br /&gt;
locations.push(new GeoLocation(&lt;br /&gt;
    &amp;quot;chiang_mai&amp;quot;, &amp;quot;Chiang Mai&amp;quot;, 99.03, 18.82, &amp;quot;/chiang_mai&amp;quot;));&lt;br /&gt;
locations.push(new GeoLocation(&lt;br /&gt;
    &amp;quot;linz&amp;quot;, &amp;quot;Linz&amp;quot;, 14.18, 48.19, &amp;quot;/linz&amp;quot;));&lt;br /&gt;
locations.push(new GeoLocation(&lt;br /&gt;
    &amp;quot;london&amp;quot;, &amp;quot;London&amp;quot;, -0.16, 51.50, &amp;quot;/london&amp;quot;));&lt;br /&gt;
locations.push(new GeoLocation(&lt;br /&gt;
    &amp;quot;luang_prabang&amp;quot;, &amp;quot;Luang Prabang&amp;quot;, 102.14, 19.88, &amp;quot;/luang_prabang&amp;quot;));&lt;br /&gt;
locations.push(new GeoLocation(&lt;br /&gt;
    &amp;quot;new_york&amp;quot;, &amp;quot;New York&amp;quot;, -74.00, 40.70, &amp;quot;/new_york&amp;quot;));&lt;br /&gt;
locations.push(new GeoLocation(&lt;br /&gt;
    &amp;quot;Paris&amp;quot;, &amp;quot;Paris&amp;quot;, 2.33, 48.87, &amp;quot;/paris&amp;quot;));&lt;br /&gt;
locations.push( new GeoLocation(&lt;br /&gt;
    &amp;quot;philadelphia&amp;quot;, &amp;quot;Philadelphia&amp;quot;, -75.12, 39.96, &amp;quot;/philadelphia&amp;quot;));&lt;br /&gt;
locations.push( new GeoLocation(&lt;br /&gt;
    &amp;quot;prague&amp;quot;, &amp;quot;Prague&amp;quot;, 14.43, 50.10, &amp;quot;/prague&amp;quot;));&lt;br /&gt;
locations.push( new GeoLocation(&lt;br /&gt;
    &amp;quot;rotterdam&amp;quot;, &amp;quot;Rotterdam&amp;quot;, 4.29, 51.55, &amp;quot;/rotterdam&amp;quot;));&lt;br /&gt;
locations.push( new GeoLocation(&lt;br /&gt;
    &amp;quot;taipei&amp;quot;, &amp;quot;Taipei&amp;quot;, 121.36, 25.01, &amp;quot;/taipei&amp;quot;));&lt;br /&gt;
locations.push( new GeoLocation(&lt;br /&gt;
    &amp;quot;tokyo&amp;quot;, &amp;quot;Tokyo&amp;quot;, 139.50, 35.75, &amp;quot;/tokyo&amp;quot;));&lt;br /&gt;
locations.push( new GeoLocation(&lt;br /&gt;
    &amp;quot;vienna&amp;quot;, &amp;quot;Vienna&amp;quot;, 16.36, 48.20, &amp;quot;/vienna&amp;quot;));&lt;br /&gt;
locations.push( new GeoLocation(&lt;br /&gt;
    &amp;quot;washington&amp;quot;, &amp;quot;Washington DC&amp;quot;, -77.03, 38.88, &amp;quot;/washington&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;script language=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
/**&lt;br /&gt;
 *  Initialize the page, after it has loaded.&lt;br /&gt;
 */&lt;br /&gt;
function onPageLoad()&lt;br /&gt;
{&lt;br /&gt;
    globe = new RotatingGlobe(document.globe, 30, locations);&lt;br /&gt;
    // this sets up event handlers for the preloaded images&lt;br /&gt;
    globe.preloadImages();&lt;br /&gt;
    // as not all event handlers are called (damn these lame browswers)&lt;br /&gt;
    // set a timout value and call the load image hanlder ourselves&lt;br /&gt;
    makeSureImagesAreLoaded()&lt;br /&gt;
}&lt;br /&gt;
/**&lt;br /&gt;
 *  Make sure all images are loaded, by checking on this regularly.&lt;br /&gt;
 */&lt;br /&gt;
function makeSureImagesAreLoaded()&lt;br /&gt;
{&lt;br /&gt;
    if (!globeImageLoaded()) {&lt;br /&gt;
        // if not ready, check a second later as well&lt;br /&gt;
        setTimeout(&amp;quot;makeSureImagesAreLoaded()&amp;quot;, 1000);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 *  Rotate the globe one step to the east.&lt;br /&gt;
 */&lt;br /&gt;
function rotateEast()&lt;br /&gt;
{&lt;br /&gt;
    globe.rotateEast();&lt;br /&gt;
}&lt;br /&gt;
/**&lt;br /&gt;
 *  Rotate the globe one step to the west.&lt;br /&gt;
 */&lt;br /&gt;
function rotateWest()&lt;br /&gt;
{&lt;br /&gt;
    globe.rotateWest();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;script language=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
// create the style sheet definition for each geo location&lt;br /&gt;
document.write(&amp;quot;&amp;lt;style type=&amp;quot;text/css&amp;quot;&amp;gt;&amp;quot;);&lt;br /&gt;
for (i = 0; i &amp;lt; locations.length; ++i) {&lt;br /&gt;
    document.write(locations[i].styleDefinition());&lt;br /&gt;
}&lt;br /&gt;
document.write(&amp;quot;&amp;lt;/style&amp;gt;&amp;quot;);&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;style type=&amp;quot;text/css&amp;quot;&amp;gt;&lt;br /&gt;
#locationPopup {&lt;br /&gt;
    position:    absolute;&lt;br /&gt;
    top:         0px;&lt;br /&gt;
    left:        0px;&lt;br /&gt;
    visibility:  hidden;&lt;br /&gt;
    font:        14px arial;&lt;br /&gt;
    font-weight: bold;&lt;br /&gt;
    color:       yellow;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/style&amp;gt;&lt;br /&gt;
&amp;lt;/head&amp;gt;&lt;br /&gt;
&amp;lt;body onLoad=&amp;quot;onPageLoad();&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;a href=&amp;quot;#&amp;quot; onClick=&amp;quot;javascript:rotateWest(); return false;&amp;quot;&amp;gt;west&amp;lt;/a&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;a href=&amp;quot;#&amp;quot; onClick=&amp;quot;javascript:rotateEast(); return false;&amp;quot;&amp;gt;east&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;img name=&amp;quot;globe&amp;quot; src=&amp;quot;images/loading.png&amp;quot; width=&amp;quot;650&amp;quot; height=&amp;quot;650&amp;quot; alt=&amp;quot;globe&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;form name=&amp;quot;test&amp;quot;&amp;gt;&lt;br /&gt;
    X: &amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;x&amp;quot; size=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
    Y: &amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;y&amp;quot; size=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;script language=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
// create the HTML element for each geo location&lt;br /&gt;
for (i = 0; i &amp;lt; locations.length; ++i) {&lt;br /&gt;
    document.write(locations[i].htmlDefinition());&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;locationPopup&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&amp;lt;A href=&amp;quot;http://www.wbex.ru/Code/JavaScriptDownload/rotatingGlobe-0.1.zip&amp;quot;&amp;gt;rotatingGlobe-0.1.zip( 4,605 k)&amp;lt;/a&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>