<?xml version="1.0" encoding="UTF-8" ?>
<Module>
  <ModulePrefs
	title="__UP_title__"
	height="170"
	scaling="false"
	description="Adds a nice digital clock to your iGoogle. You can choose between different time formats (12/24h), different date formats (English, German and French date format), timezones and enable daylight savings. Until now it is translated into German, French, Croatian and Serbian; more translations will follow. Tags: Clock, Time, Date, Uhr, Uhrzeit, Datum"
	author = "Sebastian Majstorovic"
	author_email = "google@canbuffi.de"
	screenshot = "http://www.canbuffi.de/gadgets/clock_date/images/screen.png"
	thumbnail = "http://www.canbuffi.de/gadgets/clock_date/images/thumb.png"
	author_location = "Cologne, Germany"
	directory_title = "Clock &amp; Date"
	author_aboutme = "Fascinated by Rails, AJAX. Likes english humor (Monty Python, Little Britain)."
	author_quote = "Oh freddled gruntbuggly, Thy micturations are to me As plurdled gabbleblotchits On a lurgid bee. - Vogon Captain in The Hitchhiker's Guide to the Galaxy">
  	<Locale messages="http://www.canbuffi.de/gadgets/clock_date/lang/en_ALL.xml"/> 
  	<Locale lang="de" messages="http://www.canbuffi.de/gadgets/clock_date/lang/de_ALL.xml"/> 
    <Locale lang="en" messages="http://www.canbuffi.de/gadgets/clock_date/lang/en_ALL.xml"/> 
    <Locale lang="en-gb" messages="http://www.canbuffi.de/gadgets/clock_date/lang/en_UK.xml"/>
    <Locale lang="en" country="UK" messages="http://www.canbuffi.de/gadgets/clock_date/lang/en_UK.xml"/>
    <Locale lang="en" country="CA" messages="http://www.canbuffi.de/gadgets/clock_date/lang/en_CA.xml"/>
  	<Locale lang="fr" messages="http://www.canbuffi.de/gadgets/clock_date/lang/fr_ALL.xml"/>  
  	<Locale lang="hr" messages="http://www.canbuffi.de/gadgets/clock_date/lang/hr_ALL.xml"/> 
  	<Locale lang="sr" messages="http://www.canbuffi.de/gadgets/clock_date/lang/sr_ALL.xml"/> 
  	<Require feature="analytics"/>
	<Require feature="settitle" />   
	<Require feature="setprefs" />
	<Require feature="dynamic-height"/>
  </ModulePrefs>
  <UserPref name="title" display_name="__MSG_title__" default_value="Clock &amp; Date" />
  <UserPref name="time_format" display_name="__MSG_time_format__" default_value="0" datatype="enum">
  	<EnumValue value="0" display_value="1:15 PM" />
	<EnumValue value="1" display_value="13:15" />
  </UserPref>
  <UserPref name="seconds" display_name="__MSG_seconds__" default_value="true" datatype="bool" />
  <UserPref name="date_format" display_name="__MSG_date_format__" default_value="0" datatype="enum">
    <EnumValue value="0" display_value="__MSG_january__ 1, 2000" />
	<EnumValue value="1" display_value="1. __MSG_january__ 2000" />
	<EnumValue value="2" display_value="2000, __MSG_january__ 1" />
	<EnumValue value="3" display_value="1 __MSG_january__ 2000" />
  </UserPref>
  <UserPref name="dayofweek" display_name="__MSG_dayofweek__" default_value="true" datatype="bool" />
  <UserPref name="offset_hours" display_name="__MSG_offset_hours__" default_value="" datatype="enum">
  	<EnumValue value="-12" display_value="__MSG_gmt__-12" />
  	<EnumValue value="-11" display_value="__MSG_gmt__-11" />
  	<EnumValue value="-10" display_value="__MSG_gmt__-10" />
  	<EnumValue value="-9" display_value="__MSG_gmt__-9" />
  	<EnumValue value="-8" display_value="__MSG_gmt__-8" />
  	<EnumValue value="-7" display_value="__MSG_gmt__-7" />
  	<EnumValue value="-6" display_value="__MSG_gmt__-6" />
  	<EnumValue value="-5" display_value="__MSG_gmt__-5" />
  	<EnumValue value="-4" display_value="__MSG_gmt__-4" />
  	<EnumValue value="-3" display_value="__MSG_gmt__-3" />
  	<EnumValue value="-2" display_value="__MSG_gmt__-2" />
  	<EnumValue value="-1" display_value="__MSG_gmt__-1" />
  	<EnumValue value="" display_value="__MSG_gmt__" />
  	<EnumValue value="+1" display_value="__MSG_gmt__+1" />
  	<EnumValue value="+2" display_value="__MSG_gmt__+2" />
  	<EnumValue value="+3" display_value="__MSG_gmt__+3" />
  	<EnumValue value="+4" display_value="__MSG_gmt__+4" />
  	<EnumValue value="+5" display_value="__MSG_gmt__+5" />
  	<EnumValue value="+6" display_value="__MSG_gmt__+6" />
  	<EnumValue value="+7" display_value="__MSG_gmt__+7" />
  	<EnumValue value="+8" display_value="__MSG_gmt__+8" />
  	<EnumValue value="+9" display_value="__MSG_gmt__+9" />
  	<EnumValue value="+10" display_value="__MSG_gmt__+10" />
  	<EnumValue value="+11" display_value="__MSG_gmt__+11" />
  	<EnumValue value="+12" display_value="__MSG_gmt__+12" />
  	<EnumValue value="+13" display_value="__MSG_gmt__+13" />
  </UserPref>
  <UserPref name="offset_minutes" display_name="__MSG_offset_minutes__" default_value="" datatype="enum">
  	<EnumValue value="" />
  	<EnumValue value="15" />
  	<EnumValue value="30" />
  	<EnumValue value="45" />
  </UserPref>
  <UserPref name="daylight" display_name="__MSG_daylight__" default_value="false" datatype="bool" />
  <UserPref name="color" display_name="__MSG_color__" default_value="red" datatype="enum">
  	<EnumValue value="red" display_value="__MSG_red__" />
  	<EnumValue value="blue" display_value="__MSG_blue__" />
  	<EnumValue value="green" display_value="__MSG_green__" />
  	<EnumValue value="brown" display_value="__MSG_brown__" />
  	<EnumValue value="orange" display_value="__MSG_orange__" />
  	<EnumValue value="purple" display_value="__MSG_purple__" />
  </UserPref>
  <UserPref name="amazon" display_name="Amazon" default_value="1" datatype="hidden" />
  <Content type="html">
  <![CDATA[	
	<link rel="stylesheet" type="text/css" href="http://www.canbuffi.de/gadgets/clock_date/css/main.css" />
	<style>#content { background: url(http://www.canbuffi.de/gadgets/clock_date/images/bg/__UP_color__.png) center center no-repeat; } </style>
	
	<body>

	<script type="text/javascript"> var prefs = new _IG_Prefs(__MODULE_ID__); </script>
	<script src="http://www.canbuffi.de/gadgets/clock_date/js/mootools.js" type="text/javascript"></script>
	<script src="http://www.canbuffi.de/gadgets/clock_date/js/main.js" type="text/javascript"></script>
	
		<div id="content">
			<div id="greeting">__MSG_loading__</div>
			<div id="clock"><span id="time"></span><span id="am_pm"></span></div>
			<div id="date"></div>
		</div>
		
		<script type="text/javascript">
      function disableAds() {
  	    _gel('ads_wrap').style.display = "none";
  	    prefs.set("amazon", "2");
  	    _IG_AdjustIFrameHeight();
  	    _IG_Analytics('UA-2354975-1', '/clock/disable_ads');
  	  }
		</script>
		
    <div id="ads_wrap">
  		<div id="ads">
        <script type="text/javascript">
          var msg_amazon = "__MSG_amazon__";
          var amazon = ["gogaclda-20", "http://www.assoc-amazon.com/s/ads.js"];
          if (msg_amazon == "UK") {
                     amazon = ["canbgooggad00-21", "http://www.assoc-amazon.co.uk/s/ads.js"];
          } else if (msg_amazon == "DE") {
            amazon = ["canbgooggadg-21", "http://www.assoc-amazon.de/s/ads.js"];
          } else if (msg_amazon == "FR") {
            amazon_ad_o = 8;
            amazon_ad_rcm = "rcm-fr.amazon.fr";
            amazon_ad_linkcode = "bn1";
            amazon_ad_categories = "ahbicjdkelfmg";
            amazon = ["canbgooggad08-21", "http://www.assoc-amazon.fr/s/ads-common.js"];
          } else if (msg_amazon == "CA") {
            amazon_ad_o = 15;
            amazon_ad_rcm = "rcm-ca.amazon.ca";
            amazon_ad_linkcode = "bn1";
            amazon_ad_categories = "ahbicjdkelfmg";
            amazon = ["canbgooggadg-20", "http://www.assoc-amazon.ca/s/ads-common.js"];
          }
          
          var html = "<scr"+"ipt type='text/javascr"+"ipt'>amazon_ad_tag = amazon[0]; amazon_ad_width = '468'; amazon_ad_height = '60'; amazon_ad_link_target = 'new';</scr"+"ipt>";
          html += "<scr"+"ipt src='"+ _IG_GetCachedUrl(amazon[1], { refreshInterval: 0 }) +"' type='text/javascr"+"ipt'></scr"+"ipt>";
          
          var iframe_link = "http://rcm.amazon.com/e/cm?t=gogaclda-20&o=1&p=13&l=op1&f=ifr&f=ifr";
          
          if (msg_amazon == "US") {
            iframe_link = "http://rcm.amazon.com/e/cm?t=gogaclda-20&o=1&p=13&l=op1&ref-ref=&bgc=FFFFFF&bdc=000000&pcc=990000&tec=000000&tic=3399FF&ac=CC6600&pvc=6E6E6E&lgl=1&mp=1&tg=_blank&f=ifr&e=utf-8";
          } else if (msg_amazon == "DE") {
            iframe_link = "http://rcm-de.amazon.de/e/cm?t=canbgooggadg-21&o=3&p=13&l=op1&ref-ref=&bgc=FFFFFF&bdc=000000&pcc=990000&tec=000000&tic=3399FF&ac=CC6600&pvc=6E6E6E&lgl=1&mp=1&tg=_blank&f=ifr&e=utf-8";
          } else if (msg_amazon == "UK") {
            iframe_link = "http://rcm-uk.amazon.co.uk/e/cm?t=canbgooggad00-21&o=2&p=13&l=op1&ref-ref=&bgc=FFFFFF&bdc=000000&pcc=990000&tec=000000&tic=3399FF&ac=CC6600&pvc=6E6E6E&lgl=1&mp=1&tg=_blank&f=ifr&e=utf-8";
          }
          
          html = "<iframe src='" + iframe_link + "' width='468' height='60' scrolling='no' marginwidth='0' marginheight='0' border='0' frameborder='0' style='border:none;'></iframe>";
          
           document.write(html);

					function GetRandom( min, max ) {
						if( min > max ) {
							return( -1 );
						}
						if( min == max ) {
							return( min );
						}

					  return( min + parseInt( Math.random() * ( max-min+1 ) ) );
					}
					
					random_index = GetRandom(0,1);
					image = ""
						
					if (msg_amazon == "US" || msg_amazon == "CA") {
						random_index = 0;
						urls = ['http://www.endless.com/?&tag=gogaclda-20&camp=213201&creative=386261&linkCode=ur1&adid=0VTH8N58EWCJJF68945S&'];
						titles = ['<strong>Endless.com - shoes and more...</strong><br />Free overnight and return shipping on over 800 brands'];
					} else if (msg_amazon == "UK") {
						urls = ["http://www.amazon.com/gp/product/B0015T963C?ie=UTF8&tag=gogaclda-20&linkCode=as2&camp=1789&creative=9325&creativeASIN=B0015T963C", "http://www.amazon.com/gp/product/B0015TG12Q?ie=UTF8&tag=gogaclda-20&linkCode=as2&camp=1789&creative=9325&creativeASIN=B0015TG12Q"];
						titles = ['NEW! Get an Amazon Kindle 6" for $259.00', 'NEW! Get an Amazon Kindle DX 9" for $489.00'];
					} else if (msg_amazon == "DE") {
						random_index = 0;
						urls = ["http://www.amazon.de/b?ie=UTF8&linkCode=waa&node=78791031&tag=canbgooggadg-21"];
						titles = ['Diesel, Ray Ban, Joop!, Prada, u.a. Top-Marken<br />Jetzt reduziert im Accessoires-Shop von Amazon.de'];
					}
					
					if (msg_amazon == "US" || msg_amazon == "DE" || msg_amazon == "UK" || msg_amazon == "CA") {	
						html = '<a target="_blank" onclick="_IG_Analytics(\'UA-2354975-1\', \'/kindle\')" style="font-size: 11px;" href="' + urls[random_index] + '">' + image + titles[random_index] + '</a><img src="http://www.assoc-amazon.com/e/ir?t=gogaclda-20&l=as2&o=1&a=B0015T963C" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />';
						$('ads_wrap').setHTML(html);
						$('ads_wrap').addClass("textlink");
					}
					
          _IG_AdjustIFrameHeight();
        </script>
  		</div>  
  		
    	<!-- <div id="ads_disable"><a onclick="disableAds();" href="javascript:void(0);" alt="">[X]</a></div> -->
  	</div>
	
		<script type="text/javascript">
			_IG_Analytics("UA-2354975-1", "/clock");
		</script>
				
		<script type="text/javascript">
			var clock = new Clock();
			window.setInterval("clock.go()", 1000);
		</script>
	</body>
  ]]> 
  </Content>
</Module>