function checkAll(thisForm,elmnt,tf,x) {
	var o = document.forms[thisForm].elements
	if (o){
		for (i=0; i<o.length; i++){
			if (elmnt != ''){
				if ((o[i].type == 'checkbox')&&(o[i].name.indexOf(elmnt+"") != -1)){
					o[i].checked = tf
				}
			}
			else {
				if (o[i].type == 'checkbox'){
					o[i].checked = tf
				}
			}			
		}
	}	
	for (var j = 0; j < document.links.length; j++){
		if ((document.links[j].href.indexOf(thisForm) != -1) && (document.links[j].href.indexOf('checkAll') != -1)){
			if (tf == true){
				document.links[j].href = "javascript:checkAll('"+thisForm+"','"+elmnt+"',false)";
				//document.links[j].innerText = "- all";
			}
			else {
				document.links[j].href = "javascript:checkAll('"+thisForm+"','"+elmnt+"',true)";
				//document.links[j].innerText = "+ all";
			}
		}
	}
}
// formFocus sets the keyboard focus to the specified form element
// args:	form -- the form the element lives in
//			elmnt -- the element you want to give focus to
//			elmnt2 -- a second element that will get focus if the first is not present or is fillled in
// usage:	call from the onLoad event in the body tag, excluding pre-JS1.1 browsers
function formFocus(form,elmnt,elmnt2){
	if (document.forms[form].elements[elmnt]){
		if (document.forms[form].elements[elmnt].type != "hidden" && document.forms[form].elements[elmnt].value.length<1){
			document.forms[form].elements[elmnt].focus();
		}
		else if (document.forms[form].elements[elmnt2]){
			if (document.forms[form].elements[elmnt2].type != "hidden"){
				document.forms[form].elements[elmnt2].focus();
			}
		}
	}
	else if (document.forms[form].elements[elmnt2]){
		if (document.forms[form].elements[elmnt2].type != "hidden"){
			document.forms[form].elements[elmnt2].focus();
		}
	}
}
var form_functions = 1;