function toggleView(state,group,title) {
if(group == 1) {
var elementdiv = document.getElementById("ResourceDirectory");
var elementlink = document.getElementById("ResourceDirectoryLink");
var section = "'Resource Directory'";
} else if (group == 2) {
var elementdiv = document.getElementById("EarthScience");
var elementlink = document.getElementById("EarthScienceLink");
var section = "'Earth Science'";
} else if (group == 3) {
var elementdiv = document.getElementById("SpaceScience");
var elementlink = document.getElementById("SpaceScienceLink");
var section = "'Space Science'";
} else if (group == 4) {
var elementdiv = document.getElementById("LifeScience");
var elementlink = document.getElementById("LifeScienceLink");
var section = "'Life Science'";
} else if (group == 5) {
var elementdiv = document.getElementById("Nanotechnology");
var elementlink = document.getElementById("NanotechnologyLink");
var section = "'Nanotechnology'";
} else if (group == 6) {
var elementdiv = document.getElementById("FieldsofScientificStudy");
var elementlink = document.getElementById("FieldsofScientificStudyLink");
var section = "'Fields of Scientific Study'";
} else if (group == 7) {
var elementdiv = document.getElementById("MedicalTopicsandFieldsofStudy");
var elementlink = document.getElementById("MedicalTopicsandFieldsofStudyLink");
var section = "'Medical Topics and Fields of Study'";
}
if(state == 1) {
elementdiv.className = "Toggle-Live";
elementlink.innerHTML = "" + title + ""
} else {
elementdiv.className = "Toggle-Dead";
elementlink.innerHTML = "" + title + ""
}
}