/*======================================================================*\
|| #################################################################### ||
|| # vBulletin-Glossar Version 1.0.1                                  # ||
|| # ---------------------------------------------------------------- # ||
|| # Copyright ©2007-2008, AddOn-Coders (http://www.addon-coders.de)  # ||
|| # ---------------------------------------------------------------- # ||
|| # Dateiname/filename: inlinemod_vbglossar.php                      # ||
|| # ---------------------------------------------------------------- # ||
|| # Support nur unter http://www.vbulletin-germany.org               # ||
|| # ---------------------------------------------------------------- # ||
|| # Dieses ist keine freie Software! Änderungen, unerlaubtes Nutzen  # ||
|| # oder unerlaubte Verbreitung sind nicht erlaubt (auch nicht in    # ||
|| # Auszügen oder Einzelteilen) - This is not free software, changes # ||
|| # in and unallowed use of (parts from) this script is not allowed! # ||
|| # ---------------------------------------------------------------- # ||
|| # Dieses Addon wurde von folgenden Leuten (in alphabetischer       # ||
|| # Reihenfolge) entwickelt und getestet / This addon has been de-   # ||
|| # veloped and tested by the following people (abc): Captainslater, # ||
|| # Gérome, Kirby, MrD, Surviver and Vossi.    		   			  # ||
|| #################################################################### ||
\*======================================================================*/

function check_all_cbs()
{
	onoff = fetch_object("checkall_all").checked;
	form = fetch_object("vbglossar_inlinemod");

	for (i = 0; i < form.elements.length; i++)
	{
		if (form.elements[i].type != "checkbox")
		{
			continue;
		}

		form.elements[i].checked = onoff;

		if (form.elements[i].id != "checkall_all")
		{
			inline_select_entry(form.elements[i].id.substr(9), onoff);
		}
	}
}

function inline_select_entry(entryid, check)
{
	//if (fetch_object('check_' + entryid).value == 0)
	if (check)
	{
		fetch_object('check_' + entryid).value = 1;
		fetch_object('img_' + entryid).className = 'inlinemod';
		fetch_object('name_' + entryid).className = 'inlinemod';
		fetch_object('user_' + entryid).className = 'inlinemod';
		fetch_object('date_' + entryid).className = 'inlinemod';
		fetch_object('del_' + entryid).className = 'inlinemod';
	}
	else
	{
		fetch_object('check_' + entryid).value = 0;
		fetch_object('img_' + entryid).className = 'alt2';
		fetch_object('name_' + entryid).className = 'alt1';
		fetch_object('user_' + entryid).className = 'alt2';
		fetch_object('date_' + entryid).className = 'alt1';
		fetch_object('del_' + entryid).className = 'alt2';
	}
}

var shall_check=true;

function check(field)
{
	shall_check = (shall_check ? false : true);
	for(var a = 0; a < field.length; a++)
	{
		for (var b = 0; b < field[a].length; b++)
		{
			field[a][b].checked = shall_check;
		}
	}
}

/*======================================================================*\
|| ####################################################################
|| # $Revision: 179 $
|| # $Date: 2008-09-18 16:53:54 +0200 (Do, 18. Sep 2008) $
|| ####################################################################
\*======================================================================*/
