<?xml version="1.0" encoding="UTF-8" ?> 
<Module>
  <ModulePrefs title="Urban Dictionary" 
  title_url="http://www.grimmthething.com/googmods/index.htm"
     height="130" 
     author="Grimmthething" 
     author_email="grimmthething@gmail.com"
     description="Retrieves the top user rated definitions from Urbandictionary.com, Currently doesn't work in I.e."
	 scrolling="true" 
     screenshot="http://img209.imageshack.us/img209/1125/urbanuj5.gif"  
	 thumbnail="http://img297.imageshack.us/img297/2456/urbantbtt2.gif"
	 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" />
  <Content type="html">
     <![CDATA[ 
<div
style="
    width: 100% !important; /* FF */
    width: 250px; /* IE */
    min-height: 130px; /* IE */
    min-width: 300px; /* FF */
    overflow: auto; /* IE */
    overflow-y: auto; /* FF */ "
>

<form name=textbox action="javascript:void(0);" onSubmit="init(this.thebox.value); return false;">
<input name=thebox><input type=submit value="Search">
</form>
<p id="pagecount" style="padding: 4px; font-family: arial, helvetica, sans-serif; font-size: 90%; text-align: center;"></p>

<script type="text/javascript">

function init(querystring1)
{
_IG_FetchContent( 'http://www.urbandictionary.com/define.php?term='+querystring1, function (responseText) {
var sPart = getTextBetween(responseText, 'def_p', '</p>                  <div');

if (sPart != "") {
sPart = '<font color=#cc0000'+sPart+"</p>";
echo("pagecount", sPart);
}
else {
echo("pagecount", querystring1+" Not Found!");
}
} );
}


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>
</div>
     ]]>
  </Content> 
</Module>


