//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,British Columbia Coast:002,Chile:003,Costa Rica:004,Costa Rica:005,Costa Rica:006,Easter Island:007,France:008,Venice';
//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]);
}
