// Javascript for LTC thumbnail creation

	var ltc_current_layer = 'ltc_building';

	var ltc_path = '/living/seniors/images/';


function create_photos()
{

	// Create Div

	document.write('<DIV ID="ltc_photos" STYLE="display: none;">');

	document.write('<P STYLE="margin: 0 0 5px 0;">');

	if (ltc_building > 0 && ltc_daily > 0)
	{
		document.write('<A HREF="javascript:tab_photo(\'ltc_building\');" ID="ltc_building_font" STYLE="font-weight: bold;">Home &amp; Grounds</A> &middot; ');
	
		document.write('<A HREF="javascript:tab_photo(\'ltc_daily\');" ID="ltc_daily_font">Daily Life</A>');
	}

	document.write('</P>');

	if (ltc_building > 0)
	{
		document.write('<DIV ID="ltc_building" STYLE="display: block;">');

		for(i=1; i<ltc_building+1; i++)
		{
			create_thumbnail(ltc_location + '-building-' + i);
		}

		document.write('</DIV>');
	}

	if (ltc_daily > 0)
	{
		document.write('<DIV ID="ltc_daily" STYLE="display: none;">');

		for(i=1; i<ltc_daily+1; i++)
		{
			create_thumbnail(ltc_location + '-daily-' + i);
		}

		document.write('</DIV>');
	}
	
	document.write('</DIV>');
}

function tab_photo(which_layer)
{
	document.getElementById(ltc_current_layer).style.display = 'none';

	document.getElementById(which_layer).style.display = 'block';

	if (ltc_building > 0 && ltc_daily > 0)
	{
		document.getElementById('ltc_building_font').style.fontWeight = 'normal';
		document.getElementById('ltc_daily_font').style.fontWeight = 'normal';

		document.getElementById(which_layer + '_font').style.fontWeight = 'bold';
	}

	ltc_current_layer = which_layer;
}

function ltc_show_hide(which_layer)
{
	document.getElementById('ltc_show_address').style.display = 'none';
	document.getElementById('ltc_photos').style.display = 'none';
	document.getElementById('ltc_videos').style.display = 'none';

	document.getElementById(which_layer).style.display = 'block';
}

function create_thumbnail(img_src)
{
	document.write('<a rel="lightbox[All]" href="' + ltc_path + img_src + '.jpg">');

	document.write('<IMG HSPACE="2" VSPACE="2" SRC="' + ltc_path + 't-' + img_src + '.jpg" BORDER="0" ALT="Click to Enlarge" WIDTH="70" HEIGHT="46">');

	document.write('</a>');
}
