<?xml version="1.0" encoding="UTF-8"?>
<Module>
  <ModulePrefs title="The Other Side of the World"
               height="200"
               description="A dual map showing points directly on opposite sides of the planet. Where would you come out if you dug a hole through the Earth?"
               title_url="http://gad.getpla.net/antipode/"
               category="fundandgames"
               author="Sterling Udell"
               author_email="sterling.udell+gadgets@gmail.com"
               author_location="North Wales, UK"
               author_affiliation="Udell Enterprises, Inc"
               author_photo="http://gad.getpla.net/images/my_photo.jpg"
               author_aboutme="Free-range programmer developing gadgets, map applications, and anything else that catches my interest."
               author_link="http://gad.getpla.net"
               author_quote="Is there no sun in this cursed country?"
               screenshot="http://gad.getpla.net/antipode/osw_280.png"
               thumbnail="http://gad.getpla.net/antipode/osw_120.png">
    <Require feature="sharedmap" />
    <Require feature="dynamic-height"/>
    <Require feature="analytics" />
  </ModulePrefs>
  <Content type="html" view="default,home"><![CDATA[
    <style>
      p {
        margin: 0 0 0.5em 0;
        font-size: 70%;
      }
      #hint {
        float: right;
        margin-top: -1.7em;
      }
        
      .dual_map {
        float: left;
        display: inline;
        height: 200px;
        overflow: hidden;
        clear: right;
      }
      #main_map {
        width: 59%;
        margin-right: 1%;
      }
      #sidebar_map {
        width: 40%;
      }
    </style>
    <script type="text/javascript" src="http://www.google.com/jsapi"></script>
    <script type="text/javascript">
      document.write('<script type="text/javascript" src="' + 
        _IG_GetCachedUrl('http://gad.getpla.net/antipode/antipode.js', {refreshInterval: 300}) + '"><\/script>');

      var platform = '';
      var referer = document.referrer;
      if (!referer && (window._args instanceof Function))
        referer = _args()['parent'];
      if (!referer || !(referer.search instanceof Function))
        platform = 'other/unknown';
      else if ((referer.indexOf('//maps.google') > -1) ||
               (referer.search(/google\.[.a-z]+\/maps/) > -1))
        platform = 'gmaps';
      else if (referer.indexOf('//www.google') > -1)
      {
        platform = 'igoogle';
        var tld = referer.split('.');
        tld = tld[tld.length - 1];
      }
      else if (referer.indexOf('//mail.google') > -1)
        platform = 'gmail';
      else
        platform = 'other/' + document.referrer.split('/')[2];

      if (platform == 'gmaps')
      {
        document.write('<div id="sidebar_map" style="width: 100%; height: 200px;"></div>');
        document.write('<p>' + 
            'If you were to dig a hole directly through the Earth, ' +
            'this is where you\'d come out! <a target="_blank" href="http://gad.getpla.net/antipode/">More info</a>' +
          '</p>');
      }
      else
      {
        document.write('<p><a onclick="flip(); return false" href="#">Flip Sides</a></p>');
        
        if ((platform == 'igoogle') &&
            ('|com|uk|ca|au|fr|es|de|it|'.search(tld) > -1))
          document.write('<p id="hint">Looks best maximized <img width="13" height="14" src="' + 
            _IG_GetCachedUrl('http://gad.getpla.net/theme_mgr/up_arrow.png') + '" /></p>');

        document.write('<script type="text/javascript" src="http://maps.google.com/maps?file=api&amp;v=2;sensor=true"><\/script>');
        document.write('<script type="text/javascript" src="' + 
          _IG_GetCachedUrl('http://gad.getpla.net/include/async.js', {refreshInterval: 300}) + '"><\/script>');

        document.write('<div class="dual_map" id="main_map"></div>');
        document.write('<div class="dual_map" id="sidebar_map"></div>');
      }
    </script>
  ]]></Content>
  <Content type="html" view="canvas"><![CDATA[
    <style>
      p {
        margin: 0 0 0.5em 0;
        font-size: 90%;
      }
      .dual_map {
        float: left;
        display: inline;
        height: 600px;
        overflow: hidden;
      }
      #main_map {
        width: 59%;
        margin-right: 1%;
      }
      #sidebar_map {
        width: 40%;
      }
    </style>
    <script type="text/javascript" src="http://maps.google.com/maps?file=api&amp;v=2"></script>
    <script type="text/javascript" src="http://www.google.com/jsapi"></script>
    <p><a onclick="flip(); return false" href="#">Flip Sides</a></p>
    <div class="dual_map" id="main_map"></div>
    <div class="dual_map" id="sidebar_map"></div>
    <script type="text/javascript">
      document.write('<script type="text/javascript" src="' + 
        _IG_GetCachedUrl('http://gad.getpla.net/include/async.js', {refreshInterval: 300}) + '"><\/script>');
      document.write('<script type="text/javascript" src="' + 
        _IG_GetCachedUrl('http://gad.getpla.net/antipode/antipode.js', {refreshInterval: 300}) + '"><\/script>');

      var platform = 'canvas';
    </script>
  ]]></Content>
</Module>