// JavaScript Document

function set_thumbnails (directory)
{
	root_path = "assets/" + directory;
	for(i=1;i<15;i++)
	{
		file_path_large = root_path + "/" + i + ".jpg";
		file_path_untinted = root_path + "/TN/" + i + ".jpg";
		file_path_tinted = root_path + "/TND/" + i + ".jpg";
		image_holder = "small_img_" + i;
		document.getElementById(image_holder).src = file_path_untinted;
		document.getElementById(image_holder).height = 50;
		pre_load_image(file_path_large);
		pre_load_image(file_path_tinted);
		if (i==1){document.getElementById("main_img").src = file_path_large;}
		//document.getElementById(image_holder).onmouseover = function () {document.getElementById(image_holder).src = file_path_tinted;}
		//document.getElementById(image_holder).onmouseout = function () {set_photo(image_holder, file_path_untinted);}
		//document.getElementById(image_holder).onclick = function () { set_photo('main_img', file_path_large);}
	}
}

function set_photo (id, new_photo_filepath)
{
	document.getElementById(id).src = new_photo_filepath;
}

function pre_load_image (file_path)
{
      preload_image = new Image(25,25); 
      preload_image.src=file_path;
}