ed un secondo che gestisce la visualizzazione e i check box
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,men ubar=0,resizable=0,width=280,height=250');");
}

// adds zeros in front of a string to make the string [length] length
function leading_zero(arg, length) {
var strArg = new String(arg);

while (strArg.length < length) {
strArg = "0" + strArg;
}
return (strArg);
}

// checks or un-checks a checkbox
function checkit(formname, elementname) {
if (document.forms[formname].elements[elementname].checked == true) {
document.forms[formname].elements[elementname].checked = false;
return false;
} else {
document.forms[formname].elements[elementname].checked = true;
return true;
}
}

function changeButton(mode, formname, elementname) {
if (mode == true) {
// button text NEXT
document.forms[formname].elements[elementname].value = "Next >>";
} else {
// button text is DONE
document.forms[formname].elements[elementname].value = "Done";
}


}

function ValidateForm(id)
{
var i=0;
for(i=0;i<document.forms[id].elements.length;i++) {
if (document.forms[id].elements[i].value =="") {
alert("Please enter data in all fields");
return false;
}
if (document.forms[id].elements[i].name == "studPassword") {
if (document.forms[id].studPassword.value !== document.forms[id].studPassword2.value) {
alert("Password fields do not match");
return false;
}
}
}
return true;
}

function hide(obj) {
if (document.all) {
document.all[obj].style.visibility = 'hidden';
}
else if(document.layers) {
document.layers[obj].display = 'hidden';
}
else if(document.getElementById) {
node = document.getElementById(obj).style.visibility = 'hidden';
}
}

function showfrms(id) {
if (document.all) {
document.all['BB_frm_Group'].style.visibility = 'hidden';
document.all['BB_frm_Loc'].style.visibility = 'hidden';
document.all['BB_frm_All'].style.visibility = 'hidden';
document.all[id].style.visibility = 'visible';
}
}

function RM_StatusBar(txt) {
if (txt=='') {
window.status='';
}
else
{
window.status=':::Click To ' + txt + ':::';
}
}

function ShowLayer(obj,arg) {
var i=1;
if (document.all) {
for(i=1;i<=arg;i++){
eval("window.document.all['mod"+i+"'].style.visibility='hidden';");
}
window.document.all[obj].style.visibility='visible';
}
else if (document.layers) {
for(i=1;i<=arg;i++) {
eval("window.doument.layers['mod"+i+"'].visibility='hidden';");
}
window.document.layers[obj].visibility='visible';
}
else if (document.getElementById) {
for(i=1;i<=arg;i++) {
node = eval("window.document.getElementById('mod"+i+"').s tyle.visibility='hidden';");
}
node = window.document.getElementById(obj).style.visibili ty='visible';
}
}

var color = '';
var fgcolor = '';

function RM_mOver(obj) {
if (document.all) {
window.color = window.document.all[obj].style.background;
//window.fgcolor = window.document.all[obj].style.color;
window.document.all[obj].style.background = '#008FB3';
//window.document.all[obj].style.color = '#FFCC00';
}
else {
if (document.layers){
window.color = window.document.layers[obj].bgcolor;
//window.fgcolor = window.document.layers[obj].fgcolor;
window.document.layers[obj].bgcolor = '#008FB3';
//window.document.layers[obj].fgcolor = '#FFCC00';
}
else {
if (document.getElementById){
window.color = window.document.getElementById(obj).style.backgrou nd;
//window.fgcolor = window.document.getElementById(obj).style.color;
node = window.document.getElementById(obj).style.backgrou nd = '#008FB3';
//node = window.document.getElementById(obj).style.color = '#FFCC00';
}
else {
alert("aggggghhhh");
}
}
}
}


function RM_mOut(obj) {
if (document.all) {
window.document.all[obj].style.background = window.color;
//window.document.all[obj].style.color = window.fgcolor;
}
else {
if (document.layers) {
window.document.layers[obj].bgcolor = window.color;
//window.document.layers[obj].fgcolor = window.fgcolor;
}
else {
if (document.getElementById) {
node = window.document.getElementById(obj).style.backgrou nd = window.color;
//node = window.document.getElementById(obj).style.color = window.fgcolor;
}
}
}
}

function SortRecs(arg,obj) {
var myString;
myString = new String(arg);
document.forms[obj].SortBy.value = myString;
document.forms[obj].submit();
}

function TOCheck() {
alert("Your Session Has Expired!\nPlease Click OK And Log In Again.");
}

function RM_PrntChk(arg1,arg2) {
if ((arg1==0) && (arg2==0)) {
alert("Please choose a Section before attempting to print.");
}
else {
eval("window.open('pr_reports.asp?RprtType=" + arg1 + "&Cls=" + arg2 + "','new_win')");
}
}

function RM_SelectDept(arg) {


var strArg = new String(leading_zero(arg, 3));
/*

var strElmnt;
var objElmnt;
objElmnt = eval("document.forms['frmGroup'].elements['chk_dept_" + strArg + "']");

for (i=0;i<document.forms['frmGroup'].elements.length;i++) {
strElmnt = new String(document.forms['frmGroup'].elements[i].name);
if (strElmnt.substr(0,13) == "chk_dept_" + strArg + "_") {
document.forms['frmGroup'].elements[i].checked = objElmnt.checked;
}
} */

}


function RM_deptcheck(arg) {

var strArg = new String(leading_zero(arg, 3));

alert("Department checked is: "+strArg);

/*
var objElmnt = eval("document.forms['frmGroup'].elements['chk_dept_" + strArg + "']");
var strElmnt;
var x=0;
var y=0;
var z=0;
// loop through each form object

for(i=0;i<document.forms['frmGroup'].elements.length;i++) {
strElmnt = new String(document.forms['frmGroup'].elements[i].name);

if (strElmnt.substr(0,13) == "chk_dept_" + strArg + "_") {
z += 1;
if (document.forms['frmGroup'].elements[i].checked == true) {
x += 1;
} else {
y += 1;
}
}
}

if (x==z) {
objElmnt.checked = true;
RM_toggBg(strArg);
} else {
objElmnt.checked = false;
var strTmp = eval("window.document.all['cat" + strArg + "'].style.background");
if (strTmp == '#006699') {
eval("window.document.all['cat" + strArg + "'].style.background = '#666666'");
}
}*/

}

function RM_toggBg(id) {

alert(id);

/*var rowcolor;
var row = 'cat' + new String(leading_zero(id, 3));


rowcolor = window.document.all[row].style.background;
if (rowcolor == '#006699') {
window.document.all[row].style.background = '#666666';
}
else {
window.document.all[row].style.background = '#006699';
}*/
}



se provate a usare i tre files, gli ultimi due vanno nominati rispettivamente directory.js e toolbox.js non funzionano perfettamente, anzi se abilitate glia lert vedrete che i gruppi non corrispondono...
a me l'unica cosa che interessa e' che abilitando il checkbox di una sezione si abilitino anche i check di tutti i partecipanti della questione in esame
grazie
david