Function exmenu (tname, INAME ){
VaR TBL = Document. getelementbyid ("Table1 ");
VaR TRS = TBL. getelementsbytagname ("TR ");
Dflg = 'none ';
For (j = 0; j <TRS. length; j ++ ){
If (TRs [J]. Name! = NULL & TRS [J]. Name = tname ){
VaR tmenu = TRS [J]. style;
If (tmenu. Display = 'None '){
Tmenu. Display = "Block ";
Dflg = tmenu. display;
Document. All [INAME]. src = "../images/icon_minus.gif ";
} Else {
Tmenu. Display = "NONE ";
Dflg = tmenu. display;
Document. All [INAME]. src = "../images/icon_plus.gif ";
}
}
}
For (j = 0; j <TRS. length; j ++ ){
If (TRs [J]. Name! = NULL & TRS [J]. Name! = Tname & startswith (TRs [J]. Name, tname )){
VaR tmenu = TRS [J]. style;
Tmenu. Display = "NONE ";
Document. All [TRS [J]. Name + "-IMG"]. src = "../images/icon_plus.gif ";
}
}
}
Function startswith (Val, Pref ){
Len = Pref. length;
If (LEN> 0 ){
Return Val. substring (0, Len) = Pref;
}
Return false;
}