function showThis(showthis, showothersections, thetype) { thetype = parseInt(thetype); if ((thetype == 1) || (thetype == -9)) eval("document.getElementById('" + showthis + "').style.display ='block';"); else if (thetype == 2) eval("document.getElementById('" + showthis + "').style.display ='none';");//this allows you to hide a second field, identified with a 2 if (thetype != -9)//this is for cases when u don't want to hide anything, just show eval("document.getElementById('" + showthis + "text').style.display ='none';"); if (showothersections != "") { for (var i = 1; i <= showothersections; i++){eval("document.getElementById('" + showthis + "." + i + "').style.display ='block';");} } } function hideThis(hidethis, hideothersections, thetype) { thetype = parseInt(thetype); if ((thetype == 1) || (thetype == -9)) eval("document.getElementById('" + hidethis + "').style.display ='none';"); else if (thetype == 2) eval("document.getElementById('" + hidethis + "').style.display ='block';");//this allows you to show the second field, identified with a 2 if (thetype != -9)//this is for cases when u don't want to show anything, just hide eval("document.getElementById('" + hidethis + "text').style.display ='block';"); if (hideothersections != "") { for (var i = 1; i <= hideothersections; i++){eval("document.getElementById('" + hidethis + "." + i + "').style.display ='none';");} } } function showSection(thetype, staffids_in, seniorstaffids_in) { thetype = parseInt(thetype); eval("document.getElementById('voting_staff_div').style.display ='none';"); try { var staffids = new Array(); staffids = staffids_in.split("|"); //holds all the faculty who can vote var seniorstaffids = new Array(); seniorstaffids = seniorstaffids_in.split("|"); //holds all the senior faculty if ((thetype != 2) && (thetype != 13)) { for (var u = 0; u < staffids.length - 1; u++) { eval("document.getElementById('voting_staff_" + staffids[u] + "').disabled = false;");//enable the check boxes of faculty eval("document.page_form.voting_staff_" + staffids[u] + ".checked = true;");//uncheck all the faculty, then select senior faculty } } if (thetype == 99) { hidethis = "allstudy_section"; var hidethis2 = "newhire_section"; eval("document.getElementById('" + hidethis + "').style.display ='none';"); eval("document.getElementById('" + hidethis2 + "').style.display ='none';"); } else if (thetype == 4)//4=New Hire { hidethis = "allstudy_section"; showthis = "newhire_section"; eval("document.getElementById('" + hidethis + "').style.display ='none';"); eval("document.getElementById('" + showthis + "').style.display ='block';"); } else if (thetype == 15)//15=Academic Officer Vote Type { hidethis = "allstudy_section"; showthis = "newhire_section"; var d = new Date(); var year = d.getFullYear(); var volname = eval("document.page_form.volname.value='Academic';"); var vofname = eval("document.page_form.vofname.value='Officer';"); var votitle = eval("document.page_form.votitle.value='" + year + " Academic Officer';"); eval("document.getElementById('" + hidethis + "').style.display ='none';"); eval("document.getElementById('" + showthis + "').style.display ='block';"); } else if ((thetype == 2) || (thetype == 13))//2=Promotion to Full { hidethis = "newhire_section"; showthis = "allstudy_section"; eval("document.getElementById('" + hidethis + "').style.display ='none';"); eval("document.getElementById('" + showthis + "').style.display ='block';"); var seniorcount = 0; for (var u = 0; u < staffids.length - 1; u++) { eval("document.page_form.voting_staff_" + staffids[u] + ".checked = false;");//uncheck all the faculty, then select senior faculty eval("document.getElementById('voting_staff_" + staffids[u] + "').disabled = true;");//disable the check boxes of faculty } for (var u = 0; u < seniorstaffids.length - 1; u++) { eval("document.getElementById('voting_staff_" + seniorstaffids[u] + "').disabled = false;");//enable the check boxes of faculty eval("document.page_form.voting_staff_" + seniorstaffids[u] + ".checked = true;");//select senior faculty seniorcount ++; } document.getElementById("voting_staff_div").innerHTML = "  Note 1: Senior faculty (" + seniorcount + " members) selected for you based on Vote Type."; eval("document.getElementById('voting_staff_div').style.display ='block';"); } else { hidethis = "newhire_section"; showthis = "allstudy_section"; eval("document.getElementById('" + hidethis + "').style.display ='none';"); eval("document.getElementById('" + showthis + "').style.display ='block';"); } } catch(Exception) { alert("exception: "+Exception.message); return false; } // alert ("thetype: " + thetype + hidethis + " showthis:" + showthis); } function checkOneBox(this_check, trackingid, theformname) { //force check boxes to respond like a radio button var fieldname = "emailmembers_1st" + trackingid; if (fieldname == this_check.name && eval("document." + theformname + "." + fieldname + ".checked == true")) { eval("document." + theformname + ".emailmembers_reminder" + trackingid + ".checked = false;"); } fieldname = "emailmembers_reminder" + trackingid; if (fieldname == this_check.name && eval("document." + theformname + "." + fieldname + ".checked == true")) { eval("document." + theformname + ".emailmembers_1st" + trackingid + ".checked = false;"); } }