/**
 * JavaScript Document: standard.js 
 * @author Raihan Islam
 */


/**
 * Extendable to other events if desired, this template is meant for the minimization/restoration
 * of an interactive table from its header.  Special cases include: post-resume [resume]
 * @param event_name		tag attribute (event)
 * @param item_id			refers to the div ID container for system menu box
 * @param item_body_id		refers to the div ID for the the content cell of the interactive table
 */
function system_menu(event_name, item_id, item_body_id) {
	if(event_name == 'onclick')
	{
		if(document.getElementById(item_id).childNodes[0].className == 'system-min')
		{
			document.getElementById(item_id).childNodes[0].className = 'system-restore';
			document.getElementById(item_body_id).className = 'col standard hidden';
		}
		else
		{
			document.getElementById(item_id).childNodes[0].className = 'system-min';
			if(item_id == 'post-resume')
			{
				document.getElementById(item_body_id).className = 'col standard resume';
			}
			else
			{
				document.getElementById(item_body_id).className = 'col standard';
			}
		}
	}
}

/**
 * This template is meant to toggle an image from its interactive thumbnail to its original specification
 * @param image_container_id			refers to the div ID for the source container for image
 * @param image_thumb_container_id		refers to the div ID for the thumbnail container for image
 * @param becomes_in_class				class name of source container for image (when thumbnail)
 * @param becomes_out_class				class name of source container for image (when source)
 */
function image_toggle(image_container_id, image_thumb_container_id, becomes_in_class, becomes_out_class)
{
	if(document.getElementById(image_container_id).className == becomes_in_class)
	{
		document.getElementById(image_container_id).className = becomes_out_class;
		document.getElementById(image_thumb_container_id).className = 'thumb_arrow thumb_arrow_in';
	}
	else if(document.getElementById(image_container_id).className == becomes_out_class)
	{
		document.getElementById(image_container_id).className = becomes_in_class;
		document.getElementById(image_thumb_container_id).className = 'thumb_arrow thumb_arrow_out';
	}
}