<?xml version="1.0" encoding="UTF-8"?>
<Module>
	<ModulePrefs title="Bioinformatics" description="This gadget provides current bioinformatics news (5 feeds), different journal current issues (17 feeds), Jobs (12 feeds) and pubmed search facility.
CURRENT NEWS FEEDS: Bioinform,New Scientist,The Scientist,Science,UK Bioinformatics. 
CURRENT JOURNAL FEEDS: Bioinformatics,BMC Bioinformatics,Briefings in Bioinformatics,Computational Biology,Nucleic Acids Research,Protein Science,Current Biology,Structure,Trends in Biotechnology,Genome Biology,EMBOJ,Nature Genetics,Nature Biotechnology,RNA,Structural Biology,Nature,Genome Research. CURRENT JOB FEEDS: New Scientist's:Europe,US and Canada,Australia and New Zealand,Rest of the world;Jobs.ac.uk's:Biotechnology,IT,Biochemistry,Genetics,Microbiology,Molecular biology;Nature Jobs,UK Jobs." author="Dushyanth Jyothi." author_email="contact.dushi.feedback+bioinformatics@gmail.com" author_affiliation="http://dushi.co.uk" author_location="UK" screenshot="http://dushyanth.jyothi.googlepages.com/bioinformatics.png" thumbnail="http://dushyanth.jyothi.googlepages.com/bioinformatics_thumb.png" title_url="http://dushi.co.uk/code/bioinformatics.html" author_photo="http://dushyanth.jyothi.googlepages.com/Dushi.JPG" author_aboutme="http://dushi.co.uk" author_link="http://dushi.co.uk" height="251" width="251" scrolling="false" singleton="false">
		<Require feature="dynamic-height"/>
		<Require feature="setprefs"/>
		<Require feature="tabs"/>
	</ModulePrefs>
	<UserPref name="News" display_name="News" datatype="enum" default_value="http://www.bioinform.com/issues/index.xml">
		<EnumValue value="http://www.bioinform.com/issues/index.xml" display_value="Bioinform"/>
		<EnumValue value="http://www.pheedo.com/f/newscientist_online-news" display_value="New Scientist"/>
		<EnumValue value="http://feeds.feedburner.com/NewsFromTheScientist" display_value="The Scientist"/>
		<EnumValue value="http://www.sciencemag.org/rss/news.xml" display_value="Science"/>
		<EnumValue value="http://www.bioinformaticsforumuk.net/index.php?nav=rss&amp;news=1" display_value="UK Bioinformatics"/>
	</UserPref>
	<UserPref name="Journal" display_name="Journal" datatype="enum" default_value="http://bioinformatics.oxfordjournals.org/rss/current.xml">
		<EnumValue value="http://bioinformatics.oxfordjournals.org/rss/current.xml" display_value="Bioinformatics"/>
		<EnumValue value="http://www.biomedcentral.com/bmcbioinformatics/rss/" display_value="BMC Bioinformatics"/>
		<EnumValue value="http://bib.oxfordjournals.org/rss/current.xml" display_value="Briefings in Bioinformatics"/>
		<EnumValue value="http://www.liebertonline.com/action/showFeed?mi=cjwv&amp;ai=su&amp;jc=CMB&amp;type=etoc&amp;feed=rss" display_value="Computational Biology"/>
		<EnumValue value="http://nar.oxfordjournals.org/rss/current.xml" display_value="Nucleic Acids Research"/>
		<EnumValue value="http://www.proteinscience.org/rss/current.xml" display_value="Protein Science"/>
		<EnumValue value="http://www.cellpress.com/webfiles/feeds/rssfeed.curbio.xml" display_value="Current Biology"/>
		<EnumValue value="http://www.cellpress.com/webfiles/feeds/rssfeed.foldes.xml" display_value="Structure"/>
		<EnumValue value="http://barf.jcowboy.org/trendsinbiotechnology.xml" display_value="Trends in Biotechnology"/>
		<EnumValue value="http://genomebiology.com/rss/" display_value="Genome Biology"/>
		<EnumValue value="http://www.nature.com/emboj/journal/vaop/ncurrent/rss.rdf" display_value="EMBOJ"/>
		<EnumValue value="http://www.nature.com/ng/current_issue/rss/index.html" display_value="Nature Genetics"/>
		<EnumValue value="http://www.nature.com/nbt/current_issue/rss/index.html" display_value="Nature Biotechnology"/>
		<EnumValue value="http://www.rnajournal.org/rss/current.xml" display_value="RNA"/>
		<EnumValue value="http://www.biomedcentral.com/bmcstructbiol/rss/" display_value="Structural Biology"/>
		<EnumValue value="http://www.nature.com/nature/current_issue/rss/index.html" display_value="Nature"/>
		<EnumValue value="http://www.genome.org/rss/current.xml" display_value="Genome Research"/>
	</UserPref>

	<UserPref name="Jobs" display_name="Jobs" datatype="enum" default_value="http://www.newscientistjobs.com/feed.action?query.region=0&amp;query.discipline=100&amp;query.sector=1&amp;query.sector=3&amp;query.sector=2&amp;query.numDays=21">
		<EnumValue value="http://www.newscientistjobs.com/feed.action?query.region=210&amp;query.discipline=100&amp;query.sector=1&amp;query.sector=3&amp;query.sector=2&amp;query.numDays=21" display_value="NewScientist Europe"/>
		<EnumValue value="http://www.newscientistjobs.com/feed.action?query.region=10&amp;query.discipline=100&amp;query.sector=1&amp;query.sector=3&amp;query.sector=2&amp;query.numDays=21" display_value="US &amp; Canada"/>
		<EnumValue value="http://www.newscientistjobs.com/feed.action?query.region=501&amp;query.region=550&amp;query.discipline=100&amp;query.sector=1&amp;query.sector=3&amp;query.sector=2&amp;query.numDays=21" display_value="Australia &amp; New Zealand"/>
		<EnumValue value="http://www.newscientistjobs.com/feed.action?query.region=250&amp;query.discipline=100&amp;query.sector=1&amp;query.sector=3&amp;query.sector=2&amp;query.numDays=21" display_value="Rest of the World"/>
		<EnumValue value="http://www.bioinformaticsforumuk.net/index.php?nav=rss&amp;jobs=1" display_value="UK Jobs"/>
		<EnumValue value="http://www.nature.com/naturejobs/science/jobs.rss" display_value="Nature Jobs"/>
	</UserPref>
	<UserPref name="entries" display_name="Display:" datatype="enum" default_value="5">
		<EnumValue value="4"/>
		<EnumValue value="5"/>
		<EnumValue value="6"/>
		<EnumValue value="7"/>
		<EnumValue value="8"/>
		<EnumValue value="9"/>
		<EnumValue value="10"/>
		<EnumValue value="11"/>
		<EnumValue value="12"/>
		<EnumValue value="13"/>
		<EnumValue value="14"/>
		<EnumValue value="15"/>
		<EnumValue value="16"/>
		<EnumValue value="17"/>
		<EnumValue value="18"/>
		<EnumValue value="19"/>
		<EnumValue value="20"/>
		<EnumValue value="21"/>
		<EnumValue value="22"/>
		<EnumValue value="23"/>
		<EnumValue value="24"/>
		<EnumValue value="25"/>
	</UserPref>
	<UserPref name="summaries" display_name="Description" datatype="enum" default_value="100">
		<EnumValue value="0" display_value="None"/>
		<EnumValue value="100" display_value="Short"/>
		<EnumValue value="300" display_value="Long"/>
	</UserPref>
	<UserPref name="selectedTab" datatype="hidden"/>
	<Content type="html">

                <![CDATA[ 
                <!-- ALm6fM2gIbw4iz7mYk_eo3M7ov-ddYYHs-ePLy_6mvJJPfxtm9MfExcsYBS0joELtz8gWWKBsc4CPc-KgEbL9Uc8EIMjnMC0m4KNz6gR_sERjgBFKoY3xxmsYiWu1D2zxbPQYfmg8dWnIDu-DzMkYJDz4hzJeXWAgaIlyUej9dMJDDg1asKvdb5ztVChKb8yCNxMxWABcDuk -->
<style type="text/css">
/* Import tabs library style sheet */
/*@import url(http://dushi.co.uk/gadgets/css1.css);
@import url(http://dushi.co.uk/gadgets/css2.css);*/
.statusLabel {
padding-top:5px;
font-size:10px;
text-align:center;
background-color:#CBE2FE; 
}
.feedHeader {
padding-top:5px;
font-size:12px;
background-color:#CBE2FE; 
}
.feedList {
font-size:12px;
margin:5px 0px 0px 0px;
padding:0px 3px 5px 3px;
border-top: 1px solid #aaaaaa;
border-bottom: 1px solid #aaaaaa;
background-color:#EBF4FE; 
}
.feedList li {
margin-top:5px;
padding:0px;
background-color:#EBF4FE; 
}
.feedList div.entrySummary {
font-size:11px;
background-color:#F3F9FE; 
}
.feedlist div.entryTimestamp {
font-size:10px;
font-style:italic;
color:#676767;
background-color:#F3F9FE; 
}

.instructions {
font-size:10px;
font-style:italic;
color:#FF3300;
background-color:#EBF4FE; 
}
	.tablib_table__MODULE_ID__ { font-size:12px; color: #fff000;}
	.tablib_selected__MODULE_ID__ {background-color:#CBE2FE; color: #FF3300; }
	.tablib_unselected__MODULE_ID__ {background-color:#EBF4FE; color: #000000; }
	.tablib_emptyTab__MODULE_ID__ { padding:5px 5px; }	
	.tablib_spacerTab__MODULE_ID__ { padding:5px 5px; }
</style>


<script>
// Global variables
var prefs = new _IG_Prefs(__MODULE_ID__);
var tabs = new _IG_Tabs(__MODULE_ID__);

//Initialize tabs when page loads.
function init() {

var News = _trim(prefs.getString("News"));
var Journal = _trim(prefs.getString("Journal"));
var Jobs = _trim(prefs.getString("Jobs"));

if (News != "") {
		tabs.addDynamicTab("News", callbackGenerator(News));
}

if (Journal != "") {
		tabs.addDynamicTab("Journal", callbackGenerator(Journal));
}

if (Jobs != "") {
		tabs.addDynamicTab("Jobs", callbackGenerator(Jobs));
}

tabs.addDynamicTab("Pubmed", callback);
//end in it 
};

/**
* Creates a function that calls the tab's callback function
* and passes along an additional variable from the calling environment.
*/
function callbackGenerator(feedUrl) {
	return function(tabId) {
	callbackTab(tabId, feedUrl);
	}
}

function callback(tabId) {
// Create feed header containing title and description.
    pubmed_html =' <div class="feedHeader">';
	pubmed_html+='<b>Search Articles</b><br>';
	pubmed_html+='</div>';
    pubmed_html+='<div class="feedList">';
	pubmed_html+='<table width="100%" border="0" height="100%" align="center">';
	pubmed_html+='<tr  valign="top">';
	pubmed_html+='<td  valign="top">';
	pubmed_html+='<div align="center">';
	pubmed_html+='<form method="get" action="http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=pubmed" target="_blank">';
	pubmed_html+='<p><input name="term" size="30"  type="text" value="Search Pubmed" /></p>';
	pubmed_html+='<p>';
	pubmed_html+='<input name="submit" type="submit"  value="Search Pubmed"/>';
	pubmed_html+='</p>';
	pubmed_html+='</form>';
	pubmed_html+='</div>';
	pubmed_html+='</td>';
	pubmed_html+='</tr>';
	pubmed_html+='</table>';
	pubmed_html+='</div>';
    _gel(tabId).innerHTML = pubmed_html;
    // Resize iframe height to fit content.
	_IG_AdjustIFrameHeight();
    }


/**
* Fetches an Atom or RSS feed and generates content inside the
* selected tab's content container. This function is called whenever
* a tab is selected.
*/
function callbackTab(tabId, feedUrl) {
var summaries = prefs.getInt("summaries");
var entries = prefs.getInt("entries");
var container = _gel(tabId);

// Display loading message before fetching feed.
container.innerHTML = '<div class="statusLabel">Loading...</div>';

// Fetch feed and return it as a JSON object.
// Callback function is defined within local scope.
_IG_FetchFeedAsJSON(
feedUrl,
function(feed) {
if (typeof feed == "undefined" || typeof feed.Entry == "undefined") {
container.innerHTML = '<div class="statusLabel">Invalid feed URL:<br>' + feedUrl + '</div>';
} else {
// Fetch feed successful. Generate HTML content from returned JSON object.
var html = new Array();

// Create feed header containing title and description.
html.push('<div class="feedHeader">');
html.push('<b>' + _hesc(feed.Title) + '</b><br>');
html.push(_hesc(feed.Description));
html.push('</div>');

// Iterate through each feed entry and generate list of content.
html.push('<ul class="feedList">');
for (var n = 0; n < feed.Entry.length; n++) {
var entry = feed.Entry[n];
html.push('<li>');
html.push('<a target="_blank" href="' + entry.Link + '">' + _hesc(entry.Title) + '</a>');
if (typeof entry.Summary != "undefined" && entry.Summary != "") {
html.push('<div class="entrySummary">' + _hesc(entry.Summary.substr(0, summaries)) + ' ...</div>');
}
if (!isNaN(entry.Date)) {
html.push('<div class="entryTimestamp">' + new Date(entry.Date * 1000).toLocaleString() + '</div>');
}
html.push('</li>');
}
html.push('</ul>');
	
container.innerHTML = html.join("");
}

// Resize iframe height to fit content.
_IG_AdjustIFrameHeight();
},
entries,
(summaries > 0)
);
}

// Set onload event handler to call init()
_IG_RegisterOnloadHandler(init);
</script>
 ]]></Content>
</Module>

