<?xml version="1.0" encoding="UTF-8" ?> 
<Module>
	<ModulePrefs 
		height="460" 
		title="Hotmail" 
		title_url="http://www.hotmail.com/"
		description="This gadget lets you access your Hotmail account from your Google homepage. Read and send Hotmail emails without leaving Google!" 
		author="Mandy" 
		author_email="hotmail@mySocialGadget.com" 
		author_affiliation="LoveMyGadgets.com" 
		author_photo="http://lovemygadget.com/googleDev.jpg" 
		author_aboutme="Stay at home mom.  I owe my budding passion for developing to my husband and brothers." 
		author_link="http://lovemygadgets.com" 
		author_location="Utah" 
		author_quote="Try a little harder to be a little better" 
		screenshot="http://lovemygadget.com/hotmail/hotScreen.gif" 
		thumbnail="http://lovemygadget.com/hotmail/hotThumb.gif" 
		scrolling="false" 
		>
		<Require feature="analytics" /> 
		<Require feature="minimessage" />
		<Require feature="setprefs" />
	</ModulePrefs>
	<UserPref name="defaultPage" display_name="Default Page" default_value="Inbox" datatype="enum">
		<EnumValue value="Inbox" />
		<EnumValue value="Folders" />
	</UserPref>
	<UserPref name="refreshInterval" display_name="Refresh interval (BETA)" default_value="Never" datatype="enum">
		<EnumValue value="0" display_value="Never" />
		<EnumValue value="1" display_value="1 minute" />
		<EnumValue value="2" display_value="2 minutes" />
		<EnumValue value="5" display_value="5 minutes" />
		<EnumValue value="10" display_value="10 minutes" />
	</UserPref>
	<UserPref datatype="hidden" default_value="0" name="msnProblem" />
	<UserPref datatype="hidden" default_value="0" name="linksFixed" />
	<UserPref datatype="hidden" default_value="0" name="seenNews20080221" />
	<UserPref datatype="hidden" default_value="0" name="degree" />
	<UserPref datatype="hidden" default_value="0" name="dj" />
	<UserPref datatype="hidden" default_value="0" name="santa" />
	<UserPref datatype="hidden" default_value="0" name="tabTop" />
	<UserPref datatype="hidden" name="cntry"/>
  	<Content type="html">
		<![CDATA[ 
		<style>
			.text{ font-family:Arial,sans-serif;font-size:8pt; }
		</style>
		<div id="country" style="display:none">
		</div>

		<script type="text/javascript">

			// user preferences
   			var prefs 			= new _IG_Prefs( __MODULE_ID__ );
			var countryUS 		= prefs.getBool("cntry");
			var country ;//= document.getElementById("country").innerHTML;
			//if (country.match("United States") == null){ countryUS = false; } else { countryUS = true; }
			prefs.set("cntry", countryUS);

			// default page
			var sDefaultPage	= prefs.getString( "defaultPage" );
			var sDefaultURL		= "http://mobile.live.com/hm/folder.aspx?bf=1&folder=ACTIVE&msg=0";
			if( sDefaultPage == "Folders" )
			{
				sDefaultURL		= "http://co116w.col116.mail.live.com/m/folders.aspx";
			}
   			   			
   			// refresh interval
   			var sRefresh 		= parseInt( prefs.getInt( "refreshInterval" ) );
   			var bCancel			= false;
			if( sRefresh != 0 )
			{
				sRefresh		= parseInt( sRefresh * 60 * 1000 );
				window.setInterval( "triggerRefresh__MODULE_ID__()", sRefresh );
			}
			
			
			// mini message
			if( parseInt( prefs.getInt( "linksFixed" ) ) == 0 )	// value at 2 means don't show this
			{
				var oMsg1 			= new _IG_MiniMessage( __MODULE_ID__ );
				oMsg1.createDismissibleMessage( "Top links fixed. Compose at bottom of Inbox.", function() { prefs.set( "linksFixed", 1 ); return true;  } );
			}
			
			// mini message
			if( parseInt( prefs.getInt( "msnProblem" ) ) == 2 )	// value at 2 means don't show this
			{
				var oMsg1 			= new _IG_MiniMessage( __MODULE_ID__ );
				oMsg1.createDismissibleMessage( "Tell MSN about the 'compose' problem <a href='https://feedback.live.com/default.aspx?productkey=wlmobile' target='_top'>here</a> or <a href='http://windowslivehelp.com/community/p/55727/230456.aspx#230456' target='_top'>here</a>", function() { prefs.set( "msnProblem", 1 ); return true;  } );
			}
			
			// mini message
			if( parseInt( prefs.getInt( "seenNews20080221" ) ) == 2 )	// value at 2 means don't show this
			{
				var oMsg1 			= new _IG_MiniMessage( __MODULE_ID__ );
				oMsg1.createDismissibleMessage( "<span style='color:#676767;'>News &raquo;</span> <a href='http://lovemygadget.com/hotmail/greasemonkeyscripts.htm' target='_top'>Improve this gadget's look and feel: more options</a>", function() { prefs.set( "seenNews20080221", 1 ); return true;  } );
			}
			
			// mini message
			if( parseInt( prefs.getInt( "degree" ) ) == 2 )
			{
				var oMsg2 			= new _IG_MiniMessage( __MODULE_ID__ );
				oMsg2.createDismissibleMessage( "<a href='http://hybrid1.onlinedegreeatwaldenu.com/?s_id=9686&bid=117&aid=CD43' target='_blank'>Online Masters Degree</a>", function() { prefs.set( "degree", 1 ); return true;  } );
			}
			
			// mini message
			//prefs.set( "dj", 0 );
			if( parseInt( prefs.getInt( "dj" ) ) == 2 )
			{
				var oMsg2 			= new _IG_MiniMessage( __MODULE_ID__ );
				oMsg2.createDismissibleMessage( "<a href='http://dowJones.mysocialgadget.com/addStock.php?r=mb&l=hot' target='_top'>Dow Jones iGoogle - watch minute-by-minute updates</a>", function() { prefs.set( "dj", 1 ); return true;  } );
			}
			
			// mini message
			if( parseInt( prefs.getInt( "tabTop" ) ) == 2 )
			{
				var oMsg 			= new _IG_MiniMessage( __MODULE_ID__ );
				oMsg.createDismissibleMessage( "<a href='http://mysocialgadget.com/tabs' target='_top'>iGoogle TABS BACK on TOP</a> with this <a href='http://www.google.com/ig/directory?url=mysocialgadget.com/tools/tabsOnTop2.xml' target='_top'>gadget</a>", function() { prefs.set( "tabTop", 1 ); return true;  } );
			}
			

			function triggerRefresh__MODULE_ID__()
			// triggers the refresh
			{
				bCancel = false;
				_gel( "divCancelRefresh" ).style.visibility = "visible";
				window.setTimeout( "doRefresh__MODULE_ID__( 7 )", 1000 ); // 7 is number of seconds that the cancel box will be displayed. Hardcoded for the moment.
			}
			
			function doRefresh__MODULE_ID__( nTimeout )
			// displays the message and actually performs the refresh
			{
				if( !bCancel )
				{
					if( nTimeout == 0 )
					{
						_gel( "divCancelRefresh" ).style.visibility = "hidden";
						frames["frmHotmail"].location.href = sDefaultURL;
					}
					else
					{
						window.setTimeout( "doRefresh__MODULE_ID__(" + ( nTimeout - 1 ) + ")", 1000 );
					}
				}
			}
		</script>
		<div class="text" style="width:100%;background-color:#ebebfd;padding2px;border-top:1px solid #b498dc;">
			<a style="color:blue" href="javascript:void(null)" onclick="frames['frmHotmail'].location.href='http://mobile.live.com/hm/folder.aspx?bf=1&folder=ACTIVE&msg=0'">Inbox</a> | 
			<a style="color:blue" href="javascript:void(null)" onclick="frames['frmHotmail'].location.href='http://co116w.col116.mail.live.com/m/folders.aspx'">Folders</a> |
			<a style="color:blue" href="javascript:void(null)" onclick="frames['frmHotmail'].location.href='http://mpeople.live.com/?mkt=en-US'">Contacts</a> |
			<a style="color:blue" href="javascript:void(null)" onclick="frames['frmHotmail'].location.href='https://mid.live.com/si/logout.aspx'">Sign Out</a> |
			<a style="color:blue" href="http://lovemygadget.com/hotmail/help.html" target="_top">Help</a> |
			<a style="color:blue" href="http://mysocialgadget.com/stocks/dowjonesBig.php" target="_top">Stocks</a>
			<script type="text/javascript">
			/*
			 | 
			<a style="color:blue" href='http://rover.ebay.com/rover/1/711-53200-19255-0/1?type=1&campid=5336114641&toolid=10001&customid=' target='_blank'>eBay<img style='text-decoration:none; border: 0; padding: 0; margin: 0;' src='http://rover.ebay.com/ar/1/55242/1?mpt=[CacheBuster]&adtype=1&size=1x1&type=1&campid=5336114641&toolid=10001&customid=&v1e=1&l3s=1&p9m=1&n3y=1&a3h=1&k4v=1&u7v=1&x6n=1&b4x=1&m9q=1&def=a3h'></a>
			*/
			</script>
			

		</div>
		<script type="text/javascript">
			// iframe with default page
			document.write( '<iframe name="frmHotmail" id="frmHotmail" style="height:367px;width:100%;" frameborder="0" src="' + sDefaultURL + '"></iframe>' );
		</script>
		<div id="divCancelRefresh" class="text" style="visibility:hidden;background-color:#fff4c2;padding:7px;position:absolute;top:24px;left:0px;">
			<b>Refresh is about to happen</b><br>
			<a style="color:blue" href="javascript:void(null)" onclick="bCancel=true;_gel('divCancelRefresh').style.visibility='hidden';//_IG_Analytics( 'UA-1444102-1', '/HotmailGadgetXML/CancelRefresh' );">Cancel Refresh</a>
		</div>

<table cellspacing="0" cellpadding="0" width="100%">
	<tr>
		<td colspan="2"><div style="font-size:2px;">&nbsp;</div></td> 
	</tr>
	<tr>
		<td width="16">&nbsp;</td> 
		<td>
			<div style="height:60px;overflow-y:scroll;">

				<script type="text/javascript"><!--
				google_ad_client = "pub-4618009450564010";
				/* 250x250, hotmail */
				google_ad_slot = "2198600480";
				google_ad_width = 250;
				google_ad_height = 250;
				//-->
				</script>
				<script type="text/javascript"
				src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
				</script>
			</div>

		</td>
	</tr>
</table>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-2006511-18";
urchinTracker();
</script>

		]]>
	</Content> 
</Module>
