/************** WebServices ***************\
| Dateiname:	script_admin.js
| Ort:		/etc/
| Version:	0.1 ; 01.03.2004
| Autor:	Daniel Kellenberger <daniel.kellenberger@netzgestaltung.ch>
| Beschreibung:	Javascripts
| Abhängikeit:	keine
\*******************************************************/

/******
  * All
******/
// Spielerei Statusbar
function SetStatusbar (title, module, user, loop) {
	if (loop==2) {
		window.status = ".« "+title+". . .Modul:"+module+". . .User:"+user+" ».";
	} else if (loop==3) {
		window.status = "«: "+title+".. ..Modul:"+module+".. ..User:"+user+" :»";
	} else {
		window.status = ".: "+title+" .:. Modul:"+module+" .:. User:"+user+" :.";
	}
	window.setTimeout("SetStatusbar('"+title+"','"+module+"','"+user+"',"+((loop+1)%16)+")",1000);
}

function CheckLength(id, maxlength) {
	if (id.value.length > maxlength) {
		id.value = id.value.substr(0,maxlength);
	}
	return true;
}

/******
  * Galerie
******/

/**
 * Checks/unchecks all tables
 */
function setCheckboxes(the_form, do_check)
{
	for (var i = 0; i < document.forms[the_form].elements.length; i++) {
		document.forms[the_form].elements[i].checked = do_check;
	}
} // end of the 'setCheckboxes()' function

