<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs title="Totally Free Crap"
			 title_url="http://www.totallyfreecrap.com"
   	         height="260"
			 thumbnail="http://www.totallyfreecrap.com/Images/ggthumb.jpg"
		     author="Grimmthething" 
             author_email="grimmthething@gmail.com"
			 author_location="Wisconsin, USA" 
	         author_photo="http://www.grimmthething.com/googmods/me.jpg"
             author_aboutme="I have a degree in computer science, and just recently started managing websites, however I am always on the google bandwagon!"
	         author_link="http://www.grimmthething.com"
             author_quote="Only those who attempt the absurd will achieve the impossible. - MC Escher"
             description="The easiest way to get free stuff delivered right to your door."
			 screenshot="http://www.totallyfreecrap.com/Images/ggscreen.jpg">
			 <Require feature="dynamic-height"/>
</ModulePrefs>

<Content type="html">
<![CDATA[
<p id="pagecount" style="padding: .5px; font-family: Geneva, Trebuchet, Trebuchet; font-size: 110%; text-align: center;"></p>
<p id="pagecount2" style="padding: 1px; font-family: Geneva, Trebuchet, Trebuchet; font-size: 90%; text-align: center;"></p>
<p id="pagecount3" style="padding: 1.5px; font-family: Geneva, Trebuchet, Trebuchet; font-size: 90%; text-align: center;"></p>

<script type="text/javascript">


document.body.onload = init();

function init()
{

_IG_FetchContent( "http://www.totallyfreecrap.com", function (responseText) {
var sPart = getTextBetween(responseText, '<!-- item -->', '<!-- end item -->');
var Title = getTextBetween(sPart, '<h3>','</h3>');
var Picture = getTextBetween(sPart, '<p>','</p>');
var Comment = getTextBetween(sPart, '<small class="metadata">','</small>');

if (sPart != "") {
echo("pagecount", Title)
echo("pagecount3", Comment)
echo("pagecount2", Picture)


_IG_AdjustIFrameHeight()
}
else {
echo("pagecount", "Gadget Back Shortly");
}
} );

}


function echo(id, s)
{
var elm = _gel(id);
if (elm) {
elm.innerHTML = s;
}
}

function getTextBetween(sAll, sFrom, sTo)
{
var sPart = "";

var iFrom = sAll.indexOf(sFrom);
var iTo = sAll.indexOf(sTo);
iFrom += sFrom.length;
if (iTo > iFrom) {
sPart = sAll.substring(iFrom, iTo);
}

return sPart;
}

</script>

]]>
</Content>
</Module>