/*
* Partycharter Foto class
*/

function Foto(fotoPath, fotoWidth, fotoHeight, fotoComment)	{
	this.fotoPath = fotoPath
	this.fotoWidth = fotoWidth;
	this.fotoHeight = fotoHeight;
	this.imageGenPath = "/umbraco/ImageGen.aspx?image={$i}&width={$w}&height={$h}&NoCache=true";
	this.fotoComment = fotoComment;

	this.getPath = function()	{
		return this.fotoPath;
	}
	
	this.getName = function()	{
		return this.fotoName;
	}

	this.getWidth = function()	{
		return this.fotoWidth;
	}

	this.getComment = function()	{
		return this.fotoComment;
	}

	this.getHeight = function()	{
		return this.fotoHeight;
	}


	this.getImageGenPath = function()	{
		var igPath = this.imageGenPath;
		igPath = igPath.replace("{$i}", this.getPath());
		igPath = igPath.replace("{$w}", this.getWidth());
		igPath = igPath.replace("{$h}", this.getHeight());
		return igPath;
	}

	this.getImageGenThumbnailPath = function(thumbWidth, thumbHeight)	{
		var igPath = this.imageGenPath;
		igPath = igPath.replace("{$i}", this.getPath());
		igPath = igPath.replace("{$w}", thumbWidth);
		igPath = igPath.replace("{$h}", thumbHeight);
		return igPath;
	}
	
	this.getImageGenThumbnail = function()	{
		return this.getImageGenThumbnailPath(75, 60);
	}
}

