<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs
title="Wii Fit - real-time stock availability in CANADA"
description="Wii Fit - real-time stock availability in CANADA from on-line retailers - Amazon, BestBuy, Costco, Dell, Futureshop, TheSourceCC, Toys'R Us, Sears and others "
scrolling="true"
author="Sergey Vlasov"
author_email="support+coolgadget@wiisniper.com"
author_location="Canada"
author_affiliation="http://wiisniper.com"
directory_title="Wii Fit - real-time stock availability in CANADA"
title_url="http://wiisniper.blogspot.com/"
height="410"
width="325">
<Require feature="analytics"/>
<Require feature="setprefs"/>
</ModulePrefs>
<UserPref name="notificationSound" display_name="Notification sound: " datatype="bool" default_value="true"/>
<Content type="html">
<![CDATA[
<div id="content_div"></div><div id="notification_div"></div>
<script type="text/javascript">
  var myLibrary=new Object();
  var popUp=false;
  var gadgetPrefs = new _IG_Prefs(__MODULE_ID__);
  var notificationSound = gadgetPrefs.getBool("notificationSound");
  var ebayURL='http://rover.ebay.com/rover/1/706-53473-19255-0/1?type=4&campid=5335947629&toolid=10001&customid=&mpre=http%3A%2F%2Fsearch.ebay.ca%2Fwii-fit_Video-Games_W0QQcatrefZC12QQfromZR40QQsacatZ1249';
var storeStyle="<div style='padding: 5px;background-color: #FFFFBF;font-family:Arial, Helvetica;" 
     + "text-align:left;font-size:90%'>";
function eBayRef(){
var html = "";
// Set CSS for div.
html += storeStyle;

// Use the split function to extract substrings separated by comma
// delimiters.
html += "eBay.ca";


html += " ";
html+="<a target='_new' href='";
html+=ebayURL;
html+="'>";
html+="Wii Fit auction listings";
html+="</a>";
html += "<br>";
html += "</div>";
var oldHTML = _gel('content_div').innerHTML;
html = oldHTML + html;
_gel('content_div').innerHTML = html;
}

function notify(){if(notificationSound == true) {try {_gel('sndNotification').Play();} catch(e) {}}}
function handleStore(store){if(store.useCache){_IG_FetchContent(store.url, _IG_Callback(storeCallback,store));}else{_IG_FetchContent(store.url, _IG_Callback(storeCallback,store), { refreshInterval: 0 });}}function storeCallback(responseText,nextStore) {var html = "";// Set CSS for div.html += "<div style='padding: 5px;background-color: #FFFFBF;font-family:Arial, Helvetica;"+ "text-align:left;font-size:90%'>";
// Use the split function to extract substrings separated by comma
// delimiters.
html += nextStore.name;
var index = 0;
var found = false;
if (responseText.length > 200) {  
while( index<nextStore.key.length && (responseText.indexOf(nextStore.key[index])<=0)) 
{
found = true;index++;
}
}
var inStock=false;
if (!found || index!=nextStore.key.length || (nextStore.inkey && (responseText.indexOf(nextStore.inkey)<=0))) {
//alert(nextStore.name+(nextStore.inkey && (responseText.indexOf(nextStore.inkey)<=0)));
html += " Out of Stock";
nextStore.inStock = false;
}
else {
if(nextStore.inStock==false)
{
nextStore.inStock = true;
notify();
_IG_Analytics("UA-498688-2", "/FIT-"+nextStore.name);
}
html += " ";
html+="<a target='_new' href='";
if (typeof nextStore.ref != 'undefined') {
      html+=nextStore.ref;
}
else {
      html+=nextStore.url;
}
html+="'>";
html+="In-Stock";
html+="</a>";inStock=true;}
html += "<br>";
html += "</div>";
var oldHTML = _gel('content_div').innerHTML;html = oldHTML + html;
_gel('content_div').innerHTML = html;
}

function displayMenu() {
_gel('content_div').innerHTML = "Wii Fit search result "+time2string()+"<div style='font-size:50%'>reload interval 30 seconds <a target='_new' href='http://wiisniper.blogspot.com/'>Support forum</a> v0.52</div>";
var index=0;
while(index<myLibrary.stores.length) 
{
handleStore(myLibrary.stores[index++]);
}
}

function init() {
//_IG_Analytics("UA-498688-2", "/load");

if(notificationSound){
_gel('notification_div').innerHTML = '<embed src="http://hosting.gmodules.com/ig/gadgets/file/111235031415052608966/google_gadget_gmail_sound.wav" autostart="false" id="sndNotification" class="hiddenObject" enablejavascript="true"/>';
}

myLibrary.stores=new Array();

myLibrary.stores[0]=new Object();
myLibrary.stores[0].name="ToysRUs";
myLibrary.stores[0].url='http://www.toysrus.ca/product/index.jsp?productId=3073381&siteID=ymWEbTb0BI8-Jrr3m4_vo8NEV_wXQef7aQ';
myLibrary.stores[0].key=new Array('avail: '+unescape('%27')+'NOT_AVAILABLE','trouble locating a match');
//myLibrary.stores[0].key=new Array('avail: '+unescape('%27')+'NOT_AVAILABLE','prod_unavailonline','trouble locating a match');
myLibrary.stores[0].useCache=false;
myLibrary.stores[0].inStock=false;
myLibrary.stores[0].ref='http://click.linksynergy.com/fs-bin/click?id=ymWEbTb0BI8&offerid=136430.30733810&type=2&subid=0';

myLibrary.stores[1]=new Object();
myLibrary.stores[1].name="Amazon.com";
myLibrary.stores[1].url='http://www.amazon.com/gp/product/B000VJRU44?ie=UTF8&tag=itbo-20&linkCode=ur2&camp=1789&creative=9325&creativeASIN=B000TGB4UU';
myLibrary.stores[1].key=new Array('Available from','Currently unavailable. We don','Temporarily Out-of-Stock','check back soon');
myLibrary.stores[1].inkey="Pre-order";
myLibrary.stores[1].useCache=false;
myLibrary.stores[1].inStock=false;  
  
//myLibrary.stores[2]=new Object();
//myLibrary.stores[2].name="HMV";
//myLibrary.stores[2].url='http://www.hmv.ca/hmvcaweb/en_CA/displayProductDetails.do?sku=1237564';
//myLibrary.stores[2].key=new Array('Availability: Not available');
//myLibrary.stores[2].useCache=false;
//myLibrary.stores[2].inStock=false;

i=2;
myLibrary.stores[i]=new Object();
myLibrary.stores[i].name="Amazon.ca";
myLibrary.stores[i].url='http://www.amazon.ca/gp/product/B000VJRU44';
myLibrary.stores[i].key=new Array('Currently unavailable. We don','Sign up to be notified when this item becomes available');
//'Order it used',
myLibrary.stores[i].useCache=false;
myLibrary.stores[i].inStock=false;
myLibrary.stores[i++].ref='http://www.amazon.ca/gp/product/B000VJRU44?ie=UTF8&tag=javaprogrammi-20&linkCode=as2&camp=15121&creative=330641&creativeASIN=B000VJRU44';

myLibrary.stores[i]=new Object();
myLibrary.stores[i].name="Amazon.ca-II";
myLibrary.stores[i].url='http://www.amazon.ca/Nintendo-RVLRRFNE-Wii-Fit/dp/B000VJRU44';
myLibrary.stores[i].key=new Array('Currently unavailable. We don','Sign up to be notified when this item becomes available');
//'Order it used',
myLibrary.stores[i].useCache=false;
myLibrary.stores[i].inStock=false;
myLibrary.stores[i++].ref='http://www.amazon.ca/Nintendo-RVLRRFNE-Wii-Fit/dp/B000VJRU44?ie=UTF8&tag=javaprogrammi-20&linkCode=as2&camp=15121&creative=330641&creativeASIN=B000VJRU44';

myLibrary.stores[i]=new Object();
myLibrary.stores[i].name="ecost.com";
myLibrary.stores[i].url='http://www.ecost.com/Detail.aspx?edp=41198076&navid=155441519'
myLibrary.stores[i].key=new Array('Out of Stock');
myLibrary.stores[i].useCache=false;
myLibrary.stores[i].inStock=false;
myLibrary.stores[i++].ref='http://clickserve.cc-dt.com/link/click?lid=41000000027023205';


myLibrary.stores[i]=new Object();
myLibrary.stores[i].name="Dell-Wii+Wii Fit";
myLibrary.stores[i].url='http://accessories.dell.com/sna/products/Games/productdetail.aspx?c=ca&l=en&sku=A2614081';
myLibrary.stores[i].key=new Array('Our apologies.','Dell : Accessories : Home');
myLibrary.stores[i].useCache=false;
myLibrary.stores[i].inStock=false;
myLibrary.stores[i++].ref='http://click.linksynergy.com/fs-bin/click?id=ymWEbTb0BI8&offerid=116095.740472367&type=10&subid=';

  
myLibrary.stores[i]=new Object();
myLibrary.stores[i].name="Dell-Wii+Wii Fit+AnimalCross.+WiiSpeak";
myLibrary.stores[i].url='http://accessories.dell.com/sna/products/Games/productdetail.aspx?c=ca&l=en&s=dhs&cs=cadhs1&sku=A2468378';
myLibrary.stores[i].key=new Array('Our apologies.','Dell : Accessories : Home');
myLibrary.stores[i].useCache=false;
myLibrary.stores[i].inStock=false;
myLibrary.stores[i++].ref='http://click.linksynergy.com/fs-bin/click?id=ymWEbTb0BI8&offerid=116095.736106758&type=10&subid=';

    
myLibrary.stores[i]=new Object();
myLibrary.stores[i].name="Dell-Wii+Wii Fit+Wii Play";
myLibrary.stores[i].url='http://accessories.dell.com/sna/products/Wii/productdetail.aspx?c=ca&l=en&s=dhs&cs=cadhs1&sku=A1664189'
myLibrary.stores[i].key=new Array('Our apologies.','Dell : Accessories : Home');
myLibrary.stores[i].useCache=false;
myLibrary.stores[i].inStock=false;
myLibrary.stores[i++].ref='http://click.linksynergy.com/fs-bin/click?id=ymWEbTb0BI8&offerid=116095.652711284&type=10&subid=';

myLibrary.stores[i]=new Object();
myLibrary.stores[i].name="sourcecc-Wii Fit bundle";
myLibrary.stores[i].url='http://www.thesource.ca/estore/Product.aspx?language=en-CA&product=5894195'
myLibrary.stores[i].key=new Array('SOLD OUT','Product not orderable from the web','Coming Soon','product can not be found','Please check back');
myLibrary.stores[i].useCache=false;
myLibrary.stores[i].inStock=false;
myLibrary.stores[i++].ref='http://www.intactearnings.com/handleclicks.asp?affID=12252&mID=11222&bid=3222&link=www.thesourcecc.com/estore/Product.aspx%3Flanguage=en-CA%26product=5894195%26aff=IntactEarnings%26ref=2000';

myLibrary.stores[i]=new Object();
myLibrary.stores[i].name="sourcecc-Wii Fit bonus bundle";
myLibrary.stores[i].url='http://www.thesource.ca/estore/Product.aspx?language=en-CA&product=5884195'
myLibrary.stores[i].key=new Array('SOLD OUT','Product not orderable from the web','Coming Soon','product can not be found','Please check back');
myLibrary.stores[i].useCache=false;
myLibrary.stores[i].inStock=false;
myLibrary.stores[i++].ref='http://www.intactearnings.com/handleclicks.asp?affID=12252&mID=11222&bid=3222&link=www.thesourcecc.com/estore/Product.aspx%3Flanguage=en-CA%26product=5884195%26aff=IntactEarnings%26ref=2000';
  
myLibrary.stores[i]=new Object();
myLibrary.stores[i].name="sourcecc-Wii Fit cheer bundle";
myLibrary.stores[i].url='http://www.thesource.ca/estore/Product.aspx?language=en-CA&product=5844195'
myLibrary.stores[i].key=new Array('SOLD OUT','Product not orderable from the web','Coming Soon','product can not be found','Please check back');
myLibrary.stores[i].useCache=false;
myLibrary.stores[i].inStock=false;
myLibrary.stores[i++].ref='http://www.intactearnings.com/handleclicks.asp?affID=12252&mID=11222&bid=3222&link=www.thesourcecc.com/estore/Product.aspx%3Flanguage=en-CA%26product=5844195%26aff=IntactEarnings%26ref=2000';

myLibrary.stores[i]=new Object();
myLibrary.stores[i].name="sourcecc-Wii Fit+Wii Ski+ACP";
myLibrary.stores[i].url='http://www.thesource.ca/estore/Product.aspx?language=en-CA&product=5888695'
myLibrary.stores[i].key=new Array('SOLD OUT','Product not orderable from the web','Coming Soon','product can not be found','Please check back');
myLibrary.stores[i].useCache=false;
myLibrary.stores[i].inStock=false;
myLibrary.stores[i++].ref='http://www.intactearnings.com/handleclicks.asp?affID=12252&mID=11222&bid=3222&link=www.thesourcecc.com/estore/Product.aspx%3Flanguage=en-CA%26product=5888695%26aff=IntactEarnings%26ref=2000';

myLibrary.stores[i]=new Object();
myLibrary.stores[i].name="sourcecc";
myLibrary.stores[i].url='http://www.thesource.ca/estore/Product.aspx?language=en-CA&catalog=Online&category=Wii_Sports&product=5814195'
myLibrary.stores[i].key=new Array('SOLD OUT','Product not orderable from the web','Coming Soon','product can not be found','Please check back');
myLibrary.stores[i].useCache=false;
myLibrary.stores[i].inStock=false;
myLibrary.stores[i++].ref='http://www.intactearnings.com/handleclicks.asp?affID=12252&mID=11222&bid=3222&link=www.thesourcecc.com/estore/Product.aspx%3Flanguage=en-CA%26catalog=Online%26category=Wii_Sports%26product=5814195%26aff=IntactEarnings%26ref=2000';

//myLibrary.stores[i]=new Object();
//myLibrary.stores[i].name="dvdboxoffice.com";
//myLibrary.stores[i].url='http://www.dvdboxoffice.com/games/wii/products/90335949'
//myLibrary.stores[i].key=new Array("No results found","Ships in 14+ Days","unavailable for order");
//myLibrary.stores[i].useCache=false;
//myLibrary.stores[i].inStock=false;
//myLibrary.stores[i++].ref='http://scripts.affiliatefuture.com/AFClick.asp?affiliateID=124199&merchantID=2099&programmeID=5705&mediaID=0&tracking=&url=http://www.dvdboxoffice.com/games/wii/products/90335949';

  
myLibrary.stores[i]=new Object();
myLibrary.stores[i].name="TigerDirect.ca";
myLibrary.stores[i].url='http://www.tigerdirect.ca/applications/searchtools/item-details.asp?Sku=ND10-1140';
myLibrary.stores[i].key=new Array('UNAVAILABLE','THIS ITEM IS NO LONGER AVAILABLE');
myLibrary.stores[i].useCache=true;
myLibrary.stores[i].inStock=false;
myLibrary.stores[i++].ref='http://click.linksynergy.com/fs-bin/click?id=ymWEbTb0BI8&offerid=143029.653307852&type=10&subid=';

//myLibrary.stores[i]=new Object();
//myLibrary.stores[i].name="DDRgame.ca";
//myLibrary.stores[i].url='http://www.ddrgame.com/wii-game-wii-fit-original-bundle.html';
//myLibrary.stores[i].key=new Array('No Stock!');
//myLibrary.stores[i].useCache=false;
//myLibrary.stores[i].inStock=false;
//myLibrary.stores[i++].ref='http://www.kqzyfj.com/click-2859715-10504288';
    
myLibrary.stores[i]=new Object();
myLibrary.stores[i].name="dimensiongames.com";
myLibrary.stores[i].url='http://www.dimensiongames.com/console.php?idProduct=pric_18890&lang=en&searchSubmit=GO';
myLibrary.stores[i].key=new Array('PRE-ORDER','There is no item for your selection','indisponible');
myLibrary.stores[i].useCache=false;
myLibrary.stores[i].inStock=false;
myLibrary.stores[i++].ref='http://www.dimensiongames.com/console.php?idProduct=pric_18890&lang=en&searchSubmit=GO';
    
//myLibrary.stores[i]=new Object();
//myLibrary.stores[i].name="VideoGameCentral.com";
//myLibrary.stores[i].url='http://store.videogamecentral.com/wii-fit.html'
//myLibrary.stores[i].key=new Array('Back Ordered');
//myLibrary.stores[i].useCache=false;
//myLibrary.stores[i].inStock=false;  
//myLibrary.stores[i++].ref='http://scripts.affiliatefuture.com/AFClick.asp?affiliateID=124199&merchantID=2754&programmeID=7179&mediaID=0&tracking=wiifit&url=http://store.videogamecentral.com/wii-fit.html';
  
myLibrary.stores[i]=new Object();
myLibrary.stores[i].name="Futureshop";
myLibrary.stores[i].url='http://www.futureshop.ca/catalog/productdetail/oa/onlineavailability.aspx?isispuenabled=True&iskiosk=False&logon=&sku_id=0665000FS10104307&langid=EN&FromAjax=1';
myLibrary.stores[i].key=new Array('This product is sold out','Runtime Error');
myLibrary.stores[i].useCache=false;
myLibrary.stores[i].inStock=false;
myLibrary.stores[i++].ref='http://www.futureshop.ca/catalog/proddetail.asp?logon=&langid=EN&sku_id=0665000FS10104307';

myLibrary.stores[i]=new Object();
myLibrary.stores[i].name="Futureshop bundle";
myLibrary.stores[i].url='http://www.futureshop.ca/catalog/productdetail/oa/onlineavailability.aspx?isispuenabled=True&iskiosk=False&logon=&sku_id=BDL10003260&langid=EN&FromAjax=1';
myLibrary.stores[i].key=new Array('This product is sold out','Runtime Error');
myLibrary.stores[i].useCache=false;
myLibrary.stores[i].inStock=false;
myLibrary.stores[i++].ref='http://www.futureshop.ca/catalog/proddetail.asp?logon=&langid=EN&sku_id=BDL10003260';

  
myLibrary.stores[i]=new Object();
myLibrary.stores[i].name="BestBuy";
myLibrary.stores[i].url='http://www.bestbuy.ca/catalog/productdetail/oa/quantitylimits.aspx?logon=&sku_id=0926INGFS10104307&langid=EN&FromAjax=1';
myLibrary.stores[i].key=new Array('qty_limit">0');
myLibrary.stores[i].useCache=false;
myLibrary.stores[i].inStock=false;
myLibrary.stores[i++].ref='http://www.bestbuy.ca/catalog/proddetail.asp?sku_id=0926INGFS10104307&logon=&langid=EN';

myLibrary.stores[i]=new Object();
myLibrary.stores[i].name="Costco";
myLibrary.stores[i].url='http://www.costco.ca/Browse/Product.aspx?Prodid=10312442'
myLibrary.stores[i].key=new Array('not available','out of stock');
myLibrary.stores[i].useCache=false;
myLibrary.stores[i++].inStock=false;

myLibrary.stores[i]=new Object();
myLibrary.stores[i].name="Costco bundle 1";
myLibrary.stores[i].url='http://www.costco.ca/Browse/Product.aspx?Prodid=11271404'
myLibrary.stores[i].key=new Array('not available','out of stock');
myLibrary.stores[i].useCache=false;
myLibrary.stores[i++].inStock=false;

myLibrary.stores[i]=new Object();
myLibrary.stores[i].name="Costco bundle 2";
myLibrary.stores[i].url='http://www.costco.ca/Browse/Product.aspx?Prodid=10319861'
myLibrary.stores[i].key=new Array('not available','out of stock');
myLibrary.stores[i].useCache=false;
myLibrary.stores[i++].inStock=false;

  
myLibrary.stores[i]=new Object();
myLibrary.stores[i].name="Sears";
//myLibrary.stores[i].url='http://www.sears.ca/gp/product/B000KQVH9M/sr=1-2/qid=1198383100/ref=sr_1_2?ie=UTF8&searsBrand=core&mqnodeid=361989011';
myLibrary.stores[i].url='http://www.sears.ca/gp/product/B001A6OI5G/sr=1-10/qid=1216466926/ref=sr_1_10/103-1347360-7423818?ie=UTF8&searsBrand=core&mqnodeid=397122011';
myLibrary.stores[i].key=new Array('not available','re sorry');
myLibrary.stores[i].useCache=false;
myLibrary.stores[i++].inStock=false;  
  
//myLibrary.stores[i]=new Object();
//myLibrary.stores[i].name="Dumoulin";
//myLibrary.stores[i].url='http://store.en.dumoulin.com/eSection/eProd.asp?codFab=WII&codPrd=WIIFIT'
//myLibrary.stores[i].key=new Array('not available');
//myLibrary.stores[i].useCache=false;
//myLibrary.stores[i++].inStock=false;
  

setupTimer();
setInterval('setupTimer()', 30000);
}

function setupTimer() {
displayMenu();
eBayRef();  
//setTimeout('setupTimer()', 30000);
//setTimeout('setupTimer()', 10*60000);
}

function time2string() {
  var now = new Date();
  var hour = now.getHours();
  var minute = now.getMinutes();
  if (minute<10) {
    minute = "0"+minute;
  }
  var second = now.getSeconds();
  if (second<10) {
    second = "0"+second;
  }
  var timeString = hour + ':' +minute +':' +second;
  return timeString;
}

_IG_RegisterOnloadHandler(init);

</script>
<style type="text/css">
.hiddenObject 
{width: 0px;height: 0px;position: absolute;top: 0px;left: 0px;}
</style>]]>
</Content>
</Module>

































