var itemsToShow=1;var itemIndex=-1;var lastItemIndex=-1;var itemsShown=0;var storeItems,deliveryAgentStoreItems;var item,deliveryAgentItem;StoreItem=function(c,b,a,d){this.name=c;this.url=b;this.imageUrl=a;this.price=d;};StoreItem.prototype.getHTML=function(){var a='<table width="100%">';a+="<tr>";a+='<td><a href="'+this.url+'" ><img src="'+this.imageUrl+'" width="100" height="100" style="border:1px solid #999999;" /></a>';
a+="</td>";a+='<td align="left">';a+='<div class="storeItemTitle"><a href="'+this.url+'" >'+this.name+"</a></div>";a+="<br/>";a+='<div class="storeItemPrice"><a href="'+this.url+'" >$'+this.price+"</a></div>";a+="</td>";a+="</tr>";a+="</table>";return a;};StoreItem.prototype.display=function(a){a.innerHTML+=this.getHTML();
};DeliveryAgentStoreItem=function(c,b,a,d){this.name=c;this.url=b;this.imageUrl=a;this.price=d;};DeliveryAgentStoreItem.prototype.getHTML=function(){var a='<table width="100%">';a+="<tr>";a+='<td><a href="'+this.url+'" ><img src="'+this.imageUrl+'" width="100" height="100" style="border:1px solid #999999;" /></a>';
a+="</td>";a+='<td align="left">';a+='<div class="storeItemTitle"><a href="'+this.url+'" >'+this.name+"</a></div>";a+="<br/>";a+='<div class="storeItemPrice"><a href="'+this.url+'" >$'+this.price+"</a></div>";a+="</td>";a+="</tr>";a+="</table>";return a;};DeliveryAgentStoreItem.prototype.display=function(a){a.innerHTML+=this.getHTML();
};DisplayDeliveryAgentStoreItems=function(a){itemsToShow=1;while(itemsShown<itemsToShow){while((itemIndex=Math.floor(Math.random()*a.length))&&itemIndex!=lastItemIndex){if(a[itemIndex]){lastItemIndex=itemIndex;a[itemIndex].display(document.getElementById("storeitemscontainer0"));++itemsShown;break;}}}};
DisplayStoreItems=function(a){itemsToShow=2;while(itemsShown<itemsToShow){while((itemIndex=Math.floor(Math.random()*a.length))&&itemIndex!=lastItemIndex){if(a[itemIndex]){lastItemIndex=itemIndex;a[itemIndex].display(document.getElementById("storeitemscontainer1"));++itemsShown;if((a.length-1)>itemIndex){itemIndex++;
}else{itemIndex--;}a[itemIndex].display(document.getElementById("storeitemscontainer2"));++itemsShown;break;}}}};
