<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs
height="440"
title="Hotmail by iGetty.com"
title_url="http://www.igetty.com/?q=hotmail"
directory_title="Hotmail"
description="Hotmail right in your iGoogle page. Hotmail email reading, writing and more ..."
author="Papa Noel"
author_affiliation="igetty.com"
screenshot="http://www.igetty.com/gadgets/images/hotmailGadget.png"
thumbnail="http://www.igetty.com/gadgets/images/hotmailGadgetThumb.png"
author_email="123papanoel@gmail.com"
author_location="North Pole"
render_inline="optional"
scaling="false"
scrolling="false" >
<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" default_value="10 minutes" 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" />
<EnumValue value="30" display_value="30 minutes" />
<EnumValue value="60" display_value="Every hour" />
</UserPref>
<UserPref datatype="hidden" name="cntry"/>
<Content type="html">
<![CDATA[
<style>
.text{ font-family:Arial,sans-serif;font-size:8pt; }
</style>
  <div align="center" style="font-size: 10px;" >
<b>Cool new site: <a
href="http://www.YouTubeForChildren.com?r=hotmail"
target="_blank">YouTubeForChildren.com</a></b>
</div>
<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://mobile.live.com/hm/folders.aspx?bf=1";
}

// 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 );
}

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://mobile.live.com/hm/c.aspx?rru=folder.aspx%3ffolder%3dACTIVE'">Compose</a> |
<a style="color:blue" href="javascript:void(null)" onclick="frames['frmHotmail'].location.href='http://mobile.live.com/hm/folders.aspx?bf=1'">Folders</a> |
<a style="color:blue" href="javascript:void(null)" onclick="frames['frmHotmail'].location.href='http://mobile.live.com/hm/contacts.aspx?bf=1'">Contacts</a> |
<a style="color:blue" href="javascript:void(null)" onclick="frames['frmHotmail'].location.href='http://mobile.live.com/wml/signout.aspx'">Sign Out</a> |
</div>
<script type="text/javascript">
// iframe with default page
document.write( '<iframe name="frmHotmail" id="frmHotmail" style="height:390px;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>


]]>
</Content>
</Module>
