<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs title="Slideshow from Yahoo News Media RSS Feed"
title_url="http://sites.google.com/site/annuairevin/"
height="220"
width="280"
scrolling="false"
directory_title="Yahoo News Slideshow"
description="Yahoo News Slideshow. Select a Category"
screenshot="http://www.liens-du-vin.ch/_pic06/gadget-flash_slideshow-screenshot.png"
thumbnail="http://www.liens-du-vin.ch/_pic06/gadget-flash_slideshow-thumb.png"
author="Philippe Chappuis"
author_email="info+gadgetCSE@liens-du-vin.ch"
author_affiliation="Google"
author_location="Rolle Switzerland"
author_link="http://www.liens-du-vin.ch"
author_photo="http://www.liens-du-vin.ch/_pic02/gadget-author-photo.png"
author_aboutme="An Engineer who likes to develop for the Net and tastes wines"
author_quote="A chief is a man who assumes responsibility. He says &quot;I was beaten&quot; he does not say &quot;My men were beaten&quot; - Antoine de Saint-Exupery">

</ModulePrefs>

<UserPref name="Link" display_name="Link on Title" required="true" default_value="http://news.yahoo.com" />
<UserPref name="Titre" display_name="Title of Link" required="true" default_value="Yahoo News" />
<UserPref name="Textcol" display_name="Color for Text" required="true" default_value="#000" />
<UserPref name="TextBcol" display_name="Background for Text" required="true" default_value="#d1dae3" />
<UserPref name="Bordercol" display_name="Color of border" required="true" default_value="#f00" />
<UserPref name="SlideBcol" display_name="Background for Slide" required="true" default_value="#c3d9ff" />
<UserPref name="BoxBcol" display_name="Background for Main Box" required="true" default_value="#d1dae3" />
<UserPref name="Category" display_name="Category" default_value="Science (832)" datatype="enum" >
<EnumValue value="Editors'Picks (441)" />
<EnumValue value="Most Emailed (1756)" />
<EnumValue value="Most Viewed (1778)" />
<EnumValue value="Highest Rated (1750)" />
<EnumValue value="Top Stories (705)" />
<EnumValue value="World (708)" />
<EnumValue value="Iraq (1479)" />
<EnumValue value="Entertainment (707)" />
<EnumValue value="Sports (706)" />
<EnumValue value="Politics (1617)" />
<EnumValue value="Business (833)" />
<EnumValue value="Technology (1216)" />
<EnumValue value="Science (832)" />
<EnumValue value="Health (1599)" />
<EnumValue value="Lifestyle (1007)" />
<EnumValue value="Odd News (1600)" />
<EnumValue value="AFP Top Photos (1573)" />
<EnumValue value="The Week Photos (2770)" />
</UserPref>

<Content type="html"><![CDATA[
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script src="http://www.google.com/uds/solutions/slideshow/gfslideshow.js" type="text/javascript"></script>

<style text="text/css">

.gss a img
{
border: 0 none;
}

.gss
{
width: 160px;
height: 140px;
margin: 15px auto 5px auto;
color: #000;
background-color: __UP_SlideBcol__;
border: 2px solid __UP_Bordercol__;
padding: 4px;
}

#image_title
{
font-size: 0.85em;
font-family: Arial, Helvetica, sans-serif;
font-style: italic;
text-align: center;
color: __UP_Textcol__;
background-color: __UP_TextBcol__;
}

#feed_title
{
font-size: 0.9em;
font-weight: bold;
font-family: Arial, sans-serif;
text-align: center;
color: __UP_Textcol__;
background-color: __UP_TextBcol__;
}

#feed_title a:link, #feed_title a:visited
{
text-decoration: none;
color: __UP_Textcol__;
}

#feed_title a:hover
{
font-weight: normal;
color: __UP_Textcol__;
}

#main_box
{
background-color: __UP_BoxBcol__;
}

</style>

<script type="text/javascript">

// Global variables

var u_def="http://philippe.chappuis.googlepages.com/ascreen.jpg";

var prefs = new _IG_Prefs(__MODULE_ID__);


var s_lnk=_trim(prefs.getString("Link"));
var s_tit=_trim(prefs.getString("Titre"));

// define the feed

var s_fil="http://rss.news.yahoo.com/imgrss/";

var s_cat=prefs.getString("Category");
var i_deb = s_cat.indexOf("(")+1;
var i_fin = s_cat.indexOf(")");

var s_cat=s_cat.substring(i_deb,i_fin);

s_fil = s_fil + s_cat;

function load_feed()
{
var feed_input = s_fil;

var options = {
fullControlPanel: true,
fullControlPanelSmallIcons: true,
thumbnailSize : GFslideShow.THUMBNAILS_LARGE,
pauseOnHover: true,
scaleImages : true,
displayTime: 2000,
transitionTime: 1000,
linkTarget : google.feeds.LINK_TARGET_BLANK,
thumbnailUrlResolver : GetURLFullSize,
feedLoadCallback: FeedTitle,
transitionCallback: TransitionHandler
};

new GFslideShow(feed_input, "slide_box", options);
}

// Find the title of the Feed

function FeedTitle(result)
{ if ( result.error ) { alert("Error : Feed load failed"); }
else
{

var html=result.feed.title;

html="<a href='" + s_lnk + "' target='_blank' title='" + s_tit + "'>" + html + "</a>";

_gel("feed_title").innerHTML=html;
}
}

// Find title of pic

function TransitionHandler(entry, transitionTime)
{
_gel("image_title").innerHTML=entry.title + '<br>&nbsp;<br>';
}

// use full size

function GetURLFullSize(entry)
{
var content = entry.content; 
var start = content.indexOf("<img src="); 
if (start==-1) {return(u_def);}
start=start+10;
var stop = content.indexOf(".jpg",start)+4; 
if (stop==3) { stop = content.indexOf(".jpeg",start)+5;}
if (stop==4) {return(u_def);}
var img = content.substring(start,stop);
return(img);
}

google.load("feeds", "1");
google.setOnLoadCallback(load_feed);

</script>

<div id="main_box">
<div id="feed_title"></div>
<center><div id="slide_box" class="gss">Loading pictures...</div></center>
<div id="image_title"></div>
&nbsp;<br>
</div>
]]></Content>
</Module>