//alert('started inventory');
inventory = new Object();
inventory.numbers = new Array();
inventory.images = new Array();
inventory.thumbs = new Array();
inventory.biguns = new Array();
inventory.captions = new Array();

function addToinventory(strparse) {
	//alert(strparse);
	parts = strparse.split(',');
	num = parts[0];
	cap = parts[1];
	nm = parseInt(num,10);
	//alert(num+':'+nm);
	inventory.numbers[nm] = num;
	inventory.images[nm] = 'images/img_'+num+'.jpg';
	inventory.thumbs[nm] = 'thumbs/thm_'+num+'.gif';
	inventory.biguns[nm] = 'biguns/big_'+num+'.jpg';
	inventory.captions[nm] = cap;
}

//ratio for all images: 205x305; ratio for thumbs: 41x51;
//THIS LINE BELOW MUST BE UPDATED TO REFLECT IMAGES ADDED TO THE GALLERY DIRECTORY.
//CAPTIONS FOR PICTURES MAY NOT CONTAIN COLONS OR COMMAS.
//EACH IMAGE MUST BE ADDED IN THE FORM OF: <image number><comma><image caption>
//IMAGE ENTRIES MUST BE SEPARATED BY COLONS, LIKE SO: <image number><comma><image caption><colon><image number><comma><image caption>
//IF THESE RULES ARE NOT FOLLOWED, THIS CRAPPY SCRIPT WILL BREAK.
inventory.list = '001,BURNCO:002,Diamond Back:003,Diamond Back:004, :005, :006, :007, :008, :009, :010,The Muse Restaurant for EnRoute Magazine:011,Honda Canada:012,The Green Bean:013,Helly Hansen:014,Helly Hansen';
//END OF USER-EDITABLE SECTION. DON'T CHANGE ANYTHING ELSE UNLESS YOU KNOW WHAT YOU'RE DOING.

inventory.textarray = inventory.list.split(':');
for (i=0;i<inventory.textarray.length;i++) {
	addToinventory(inventory.textarray[i]);
}
