/*
	##
	#	/styles/default/js/misc.js
	#	Copyright © 2004 Beau D. Scott, All Rights Reserved
	#	$Header: /public/Pictars/src/html/styles/default/js/misc.js,v 1.1 2004/09/07 14:23:36 Beau D. Scott Exp $
	#	Pictars Image Server v.1.0
	##
*/


/*
	Toggles all checkboxes with the given name to in the given form to the inverse of their current respective states
*/
function toggle(the_form, elem_name)
{
	if(document.forms[the_form])
	{
		var elem = document.forms[the_form][elem_name];
		if(elem)
			for(var i = 0; i < elem.length; i++)
				elem[i].checked = !elem[i].checked;
	}
	return;
}

var my_home_action_messages = [];
my_home_action_messages['delete'] = 'Are you sure you want to delete this/these file(s)?';
my_home_action_messages['private'] = 'Are you sure you want to mark these files as Private?';
my_home_action_messages['nsfw'] = 'Are you sure you want to mark these files as NSFW?';
my_home_action_messages['getcode'] = false;


function switchPanes(mode)
{
	var divs = new Array('BBCode', 'FTCode', 'HTMLCode');
	for(var i = 0; i < divs.length; i++)
	{
		if(mode == divs[i])
			document.getElementById(mode).style.display = 'block';
		else
			document.getElementById(mode).style.display = 'none';
	}
}