// NOTE The array ImageNames is created in Default.aspx

function _Categories(idx, Folder)
{
	this.idx = idx													// Own index into Categories[]
	this.Folder = Folder										// The folder name
	if( this.Folder != '' )
		this.Folder += '/'

	this.getImageId = function(idx)				{ return this.idx + "I" + idx 									}
	this.getThumbSmallId = function(idx)	{ return this.idx + 'S' + idx										}
	this.getThumbLargeId = function(idx)	{ return this.idx + 'L' + idx										}
	this.getIdx = function(id)						{ return parseInt( id.split(/[ISL]/)[1] )				}
	
	this.getThumbClass = function(idx)		{ return 'T' + this.idx													}

	this.getImagePath = function()				{ return 'PublicGalleryUploads/' + this.Folder 	}
	this.getThumbSmallPath = function()		{ return 'Thumbs/Small/' + this.Folder 					}
	this.getThumbLargePath = function()		{ return 'Thumbs/Large/' + this.Folder 					}
}

function EscapeImageNames()
{
	for(Cindex in Categories)
	{
		var Cat = Categories[Cindex]
		var ImageNames = Cat.ImageNames
		for(idx in ImageNames)
			ImageNames[idx] = escape( ImageNames[idx] )
	}
}

var Categories = new Array()

