/**************************************************************
	Photo Browser Control

	id="largephoto" .......	Large photo display area
**************************************************************/

// Display a photo
function disp_photo(filename)
{
	dom = document.getElementById;

	if( dom )
		document.getElementById("largephoto").src = filename;
	else
		document.all("largephoto").src = filename;
}


var curr_category = "kendo";

// Display selected category
function disp_category(category_id)
{
	dom = document.getElementById;

	// About previously selected category
	//		- remove A tag's "selected" color
	//		- unvisible the thumbnail
	if( dom )
	{
		atag = document.getElementById("cat" + curr_category);
		atag.className = "";

		category = document.getElementById(curr_category);
		category.style.display = "none";
	}
	else
	{
		document.all("cat" + curr_category).className = "";
		document.all(curr_category).style.display = "none";
	}

	// About new category
	//		- change color of A tag for the category selection
	//		- visualize the thumbnail for the selected category
	if( dom )
	{
		atag = document.getElementById("cat" + category_id);
		atag.className = "selected";

		category = document.getElementById(category_id);
		category.style.display = "block";
	}
	else
	{
		document.all("cat" + category_id).className = "selected";
		document.all(category_id).style.display = "block";
	}

	curr_category = category_id;	// save the current category
}


// Execute this on initial loading
function initial_display(category_id, init_disp_file)
{
	curr_category = category_id;

	disp_category(category_id);
	disp_photo(init_disp_file);
}


