//First Level Vars Level_one[0]=Level_one[1]=Level_one[2]=Level_one[3]=Level_one[4]=0; //Second Level Vars Level_two_2[0]=Level_two_2[1]=Level_two_2[2]=Level_two_2[3]=Level_two_2[4]=Level_two_2[5]=0; Level_two_4[3]=0; Level_two_5[2]=0; //Third Level Vars Level_three_23[0]=Level_three_23[1]=Level_three_23[2]=0; Level_three_25[0]=Level_three_25[1]=Level_three_25[2]=Level_three_25[3]=Level_three_25[4]=Level_three_25[5]=0; function first_level(x,part){ var idnum = document.getElementById(x) if (Level_one[part-offset] == 0) { //[part-offset] openlist(idnum); Level_one[part-offset]=1; } else { // Level_one[part-offset] == 1 closelist(idnum); Level_one[part-offset]=0; // this will also close any list that is open belew if (part == 2) { reset_lev_2_2(); close_all(2,2); //if third level is open reset_lev_3_23(); reset_lev_3_25(); close_all(3,3); // level 3 from part 2 (first level) part 3 (second level) close_all(3,5); // level 3 from part 2 (first level) part 5 (second level) } if (part == 4) { reset_lev_2_4(); close_all(2,4); } if (part == 5) { reset_lev_2_5(); close_all(2,5); } } // else } // for fuction first_level function second_level(x,prev_lev_part,part){ var idnum = document.getElementById(x) if (prev_lev_part == 2) { if (Level_two_2[part-offset] == 0) { openlist(idnum); Level_two_2[part-offset]=1; } else { // Level_two_2[part-offset] == 1 closelist(idnum); Level_two_2[part-offset]=0; reset_lev_3_23(); reset_lev_3_25(); close_all(3,3); // level 3 from part 2 (first level) part 3 (second level) close_all(3,5); // level 3 from part 2 (first level) part 5 (second level) } } // if if (prev_lev_part == 4) { if (Level_two_4[part-offset] == 0) { openlist(idnum); Level_two_4[part-offset]=1; } else { // Level_one[y-offset] == 1 closelist(idnum); Level_two_4[part-offset]=0; } } // if if (prev_lev_part == 5) { if (Level_two_5[part-offset] == 0) { openlist(idnum); Level_two_5[part-offset]=1; } else{ // Level_one[y-offset] == 1 closelist(idnum); Level_two_5[part-offset]=0; } } // if } // function second_level function third_level(x,first_lev_part,second_lev_part,part) { var idnum = document.getElementById(x) if (first_lev_part == 2) { if (second_lev_part == 3) { if (Level_three_23[part-offset] == 0) { openlist(idnum); Level_three_23[part-offset]=1; } else{ // Level_one[y-offset] == 1 closelist(idnum); Level_three_23[part-offset]=0; } } if (second_lev_part == 5) { if (Level_three_25[part-offset] == 0) { openlist(idnum); Level_three_25[part-offset]=1; } else{ // Level_one[y-offset] == 1 closelist(idnum); Level_three_25[part-offset]=0; } } } } // function thrid_level function openlist(idnum) { idnum.style.display=''; } function closelist(idnum) { idnum.style.display="none"; } function reset_lev_2_2() { Level_two_2[0]=Level_two_2[1]=Level_two_2[2]=Level_two_2[3]=Level_two_2[4]=Level_two_2[5]=0; } function reset_lev_2_4() { Level_two_4[3]=0; } function reset_lev_2_5() { Level_two_5[2]=0; } function reset_lev_3_23() { Level_three_23[0]=Level_three_23[1]=Level_three_23[2]=0; } function reset_lev_3_25(){ Level_three_25[0]=Level_three_25[1]=Level_three_25[2]=Level_three_25[3]=Level_three_25[4]=Level_three_25[5]=0; } function close_all(level,part){ var idnum; if (level == 2) { if (part == 2) { idnum = document.getElementById('sec2_2'); closelist(idnum); idnum = document.getElementById('sec2_3'); closelist(idnum); idnum = document.getElementById('sec2_4'); closelist(idnum); idnum = document.getElementById('sec2_5'); closelist(idnum); } if (part == 4) { idnum = document.getElementById('sec4_4'); closelist(idnum); } if (part == 5) { idnum = document.getElementById('sec5_3'); closelist(idnum); } } if (level = 3) { if (part == 3) { idnum = document.getElementById('sec2_3_1'); closelist(idnum); idnum = document.getElementById('sec2_3_2'); closelist(idnum); idnum = document.getElementById('sec2_3_3'); closelist(idnum); } if (part == 5) { idnum = document.getElementById('sec2_5_5'); closelist(idnum); } } }// function
var browser=navigator.appName; var version=navigator.appVersion; var major=parseInt(version); if (navigator.appName == "Netscape") { if(parseInt(navigator.appVersion) <= 3 ){ //document.write("old 3"); } else { //document.write("new") ; } } var Level_one = new Array(5); // there are 5 parts in the first level var Level_two_2 = new Array(6); // there are 6 parts in the second level of part 2 (of fisrt level) var Level_two_4 = new Array(10); // there are 10 parts in the second level of part 4 (of first level) var Level_two_5 = new Array(13); // there are 13 parts in the second level of part 5 (of first level) var Level_three_23 = new Array(3); // there are only 3 parts in the third level of part 2 (first level) part 3 (second level) var Level_three_25 = new Array(6); // there are 6 part in the third level of part 2 (first level) part 5 (second level) var offset = 1; // this is the offset for the array index so indexing make sense // Note: we just have to set the subparts that needs a list. //First Level Vars Level_one[0]=Level_one[1]=Level_one[2]=Level_one[3]=Level_one[4]=0; //Second Level Vars Level_two_2[0]=Level_two_2[1]=Level_two_2[2]=Level_two_2[3]=Level_two_2[4]=Level_two_2[5]=0; Level_two_4[3]=0; Level_two_5[2]=0; //Third Level Vars Level_three_23[0]=Level_three_23[1]=Level_three_23[2]=0; Level_three_25[0]=Level_three_25[1]=Level_three_25[2]=Level_three_25[3]=Level_three_25[4]=Level_three_25[5]=0; function first_level(x,part){ var idnum = document.getElementById(x) if (Level_one[part-offset] == 0) { //[part-offset] openlist(idnum); Level_one[part-offset]=1; } else { // Level_one[part-offset] == 1 closelist(idnum); Level_one[part-offset]=0; // this will also close any list that is open belew if (part == 2) { reset_lev_2_2(); close_all(2,2); //if third level is open reset_lev_3_23(); reset_lev_3_25(); close_all(3,3); // level 3 from part 2 (first level) part 3 (second level) close_all(3,5); // level 3 from part 2 (first level) part 5 (second level) } if (part == 4) { reset_lev_2_4(); close_all(2,4); } if (part == 5) { reset_lev_2_5(); close_all(2,5); } } // else } // for fuction first_level function second_level(x,prev_lev_part,part){ var idnum = document.getElementById(x) if (prev_lev_part == 2) { if (Level_two_2[part-offset] == 0) { openlist(idnum); Level_two_2[part-offset]=1; } else { // Level_two_2[part-offset] == 1 closelist(idnum); Level_two_2[part-offset]=0; reset_lev_3_23(); reset_lev_3_25(); close_all(3,3); // level 3 from part 2 (first level) part 3 (second level) close_all(3,5); // level 3 from part 2 (first level) part 5 (second level) } } // if if (prev_lev_part == 4) { if (Level_two_4[part-offset] == 0) { openlist(idnum); Level_two_4[part-offset]=1; } else { // Level_one[y-offset] == 1 closelist(idnum); Level_two_4[part-offset]=0; } } // if if (prev_lev_part == 5) { if (Level_two_5[part-offset] == 0) { openlist(idnum); Level_two_5[part-offset]=1; } else{ // Level_one[y-offset] == 1 closelist(idnum); Level_two_5[part-offset]=0; } } // if } // function second_level function third_level(x,first_lev_part,second_lev_part,part) { var idnum = document.getElementById(x) if (first_lev_part == 2) { if (second_lev_part == 3) { if (Level_three_23[part-offset] == 0) { openlist(idnum); Level_three_23[part-offset]=1; } else{ // Level_one[y-offset] == 1 closelist(idnum); Level_three_23[part-offset]=0; } } if (second_lev_part == 5) { if (Level_three_25[part-offset] == 0) { openlist(idnum); Level_three_25[part-offset]=1; } else{ // Level_one[y-offset] == 1 closelist(idnum); Level_three_25[part-offset]=0; } } } } // function thrid_level function openlist(idnum) { idnum.style.display=''; } function closelist(idnum) { idnum.style.display="none"; } function reset_lev_2_2() { Level_two_2[0]=Level_two_2[1]=Level_two_2[2]=Level_two_2[3]=Level_two_2[4]=Level_two_2[5]=0; } function reset_lev_2_4() { Level_two_4[3]=0; } function reset_lev_2_5() { Level_two_5[2]=0; } function reset_lev_3_23() { Level_three_23[0]=Level_three_23[1]=Level_three_23[2]=0; } function reset_lev_3_25(){ Level_three_25[0]=Level_three_25[1]=Level_three_25[2]=Level_three_25[3]=Level_three_25[4]=Level_three_25[5]=0; } function close_all(level,part){ var idnum; if (level == 2) { if (part == 2) { idnum = document.getElementById('sec2_2'); closelist(idnum); idnum = document.getElementById('sec2_3'); closelist(idnum); idnum = document.getElementById('sec2_4'); closelist(idnum); idnum = document.getElementById('sec2_5'); closelist(idnum); } if (part == 4) { idnum = document.getElementById('sec4_4'); closelist(idnum); } if (part == 5) { idnum = document.getElementById('sec5_3'); closelist(idnum); } } if (level = 3) { if (part == 3) { idnum = document.getElementById('sec2_3_1'); closelist(idnum); idnum = document.getElementById('sec2_3_2'); closelist(idnum); idnum = document.getElementById('sec2_3_3'); closelist(idnum); } if (part == 5) { idnum = document.getElementById('sec2_5_5'); closelist(idnum); } } }// function