//Actuate grabs all the tags in the target's container (parent) that have an ID or name element.
//Then it toggles these tags' class to either animate or inert depending if it matches the target value.
function actuate(target){id = document.getElementById(target);

tags = id.parentNode.getElementsByTagName('*');
for(i=0;i<tags.length;i++)if(tags[i].id != "")tags[i].className=(tags[i].id == target)?"animate":"inert";
}

function mopen(target){id = document.getElementById(target);
id.className =(id.className == "closed")?"":"closed";
}

function mjump(target){id = document.getElementById(target);
if(id.className == "closed")id.className = "";
window.scrollTo(0,(id.offsetTop));
}

function tabtoggle(target,tabs){actuate(target);actuate(tabs);}

var pop_id = 0;
function open_pop(target){if(pop_id) close_pop();
pop_id = document.getElementById(target);
pop_id.className = "open";}
function close_pop(){if(pop_id)pop_id.className = "hidden";pop_id = 0;}

