<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs 
	title="Gaia PriceTracker"
	title_url="http://www.alloscomp.com/gaia/price-tracker.html"
	description="Track the price of one or more Gaia items. Refreshes once an hour, from TekTek."
	author="Eric Swanson"
	author_email="google-gadgets@alloscomp.com"
	author_affiliation="Alloscomp"
	author_location="Ohio, United States"
	height="213"
>
<Require feature="dynamic-height" />
</ModulePrefs>
<UserPref name="ids" display_name="TekTek IDs" datatype="list" required="true"/>
<Content type="html">
<![CDATA[
	<style type="text/css">
		img {
			border: none;
		} 		
	</style>
	<table id='item_table'></table>
	<script type="text/javascript">
		var prefs = new _IG_Prefs();
		var ids = prefs.getArray("ids");
		for(var key in ids) {
			var id = ids[key];
			_IG_FetchContent('http://www.alloscomp.com/cgi-bin/item-tracker.cgi?id='+id, function (responseText) {
				var arr = responseText.split('|');
				var oRow = _gel('item_table').insertRow(-1);
				var oCellOne = oRow.insertCell(-1);
				var oLink = document.createElement("a");
				oLink.setAttribute('href','http://www.tektek.org/gaia/price/?p='+arr[0]);
				var oImg = _IG_GetImage('http://www.tektek.org/gaia/thumbnail/'+arr[0]+'.png');
				oImg.setAttribute('title',arr[1])
				oLink.appendChild(oImg);
				oCellOne.appendChild(oLink);
				var oCellTwo = oRow.insertCell(-1);
				oCellTwo.innerHTML = arr[3];
			},{refreshInterval: 3600});
		}
		_IG_AdjustIFrameHeight();
	</script>
]]>
</Content>
</Module>

