var button;
var content;
var menu;
var contentArray=new Array("<li class=\"sub-buttons\"><a href=\"../aims.htm\" class=\"sub-links\" id=\"aims\">aims</a></li><li class=\"sub-buttons\"><a href=\"committee.htm\" class=\"sub-links\" id=\"committee\">people</a></li><li class=\"sub-buttons\"><a href=\"beliefs.htm\" class=\"sub-links\" id=\"beliefs\">beliefs</a></li><li class=\"sub-buttons\"><a href=\"membership.htm\" class=\"sub-links\" id=\"membership\">membership</a></li><li class=\"sub-buttons\"><a href=\"history.htm\" class=\"sub-links\" id=\"history\">history</a></li><li class=\"sub-buttons\"><a href=\"assocgroups.htm\" class=\"sub-links\" id=\"assocgroups\">associated groups</a></li>","<li class=\"sub-buttons\"><a href=\"cafe360.htm\" class=\"sub-links\" id=\"cafe360\">caf&eacute; 360&deg;</a></li><li class=\"sub-buttons\"><a href=\"iwelcome.htm\" class=\"sub-links\" id=\"iwelcome\">iWelcome</a></li>","<li class=\"sub-buttons\"><a href=\"publicity.php\" class=\"sub-links\" id=\"publicity\">publicity</a></li><li class=\"sub-buttons\"><a href=\"biblestudies.php\" class=\"sub-links\" id=\"biblestudies\">bible studies</a></li><li class=\"sub-buttons\"><a href=\"forms.php\" class=\"sub-links\" id=\"forms\">membership</a></li><li class=\"sub-buttons\"><a href=\"library.htm\" class=\"sub-links\" id=\"library\">library</a></li><li class=\"sub-buttons\"><a href=\"links.htm\" class=\"sub-links\" id=\"links\">links</a>","<li class=\"sub-buttons\"><a href=\"2wtl.htm\" class=\"sub-links\" id=\"2wtl\">2 ways to live</a></li><li class=\"sub-buttons\"><a href=\"videos.php\" class=\"sub-links\" id=\"videos\">videos/mp3s</a></li>","<li class=\"sub-buttons\"><a href=\"whatson.htm\" class=\"sub-links\" id=\"whatson\">termcard</a></li><li class=\"sub-buttons\"><a href=\"regularevents.htm\" class=\"sub-links\" id=\"regularevents\">regular events</a></li>")

function turnon(button,menu,content)
{
document.getElementById(button).href="javascript:turnoff(\'"+button+"\',\'"+menu+"\',\'"+content+"\')";
document.getElementById(menu).innerHTML=contentArray[content];
document.getElementById(menu).style.borderTop="1px solid #666666";
document.getElementById(menu).style.borderBottom="1px solid #666666";
if (navigator.appName=="Microsoft Internet Explorer")
{ document.getElementById(menu).style.height="auto"; }
}

function turnoff(button,menu,content)
{
document.getElementById(menu).innerHTML="";
document.getElementById(menu).style.borderTop="";
document.getElementById(menu).style.borderBottom="";
document.getElementById(button).href="javascript:turnon(\'"+button+"\',\'"+menu+"\',\'"+content+"\')";
if (navigator.appName=="Microsoft Internet Explorer")
{ document.getElementById(menu).style.height="0px"; }
}

function selector()
{
if (window.location.search.indexOf("+") !=-1){return true;
}else{
if (window.location.search.indexOf("?") !=-1){
var searchterm=window.location.search.split("?");
document.getElementById(searchterm[1]).style.backgroundColor="#9cd4de";
} else {
if (window.location.href.indexOf("aims.htm")!=-1){
turnon('aboutlink','aboutmenu','0')
document.getElementById('aboutlink').style.backgroundColor="#9cd4de";
document.getElementById('aims').style.backgroundColor="#9cd4de";
} else {
if (window.location.href.indexOf("committee.htm")!=-1 || window.location.href.indexOf("people.htm")!=-1){
turnon('aboutlink','aboutmenu','0')
document.getElementById('aboutlink').style.backgroundColor="#9cd4de";
document.getElementById('committee').style.backgroundColor="#9cd4de";
} else {
if (window.location.href.indexOf("assocgroups.htm") !=-1){
turnon('aboutlink','aboutmenu','0')
document.getElementById('aboutlink').style.backgroundColor="#9cd4de";
document.getElementById('assocgroups').style.backgroundColor="#9cd4de";
} else {
if (window.location.href.indexOf("membership.htm") !=-1){
turnon('aboutlink','aboutmenu','0')
document.getElementById('aboutlink').style.backgroundColor="#9cd4de";
document.getElementById('membership').style.backgroundColor="#9cd4de";
} else {
if (window.location.href.indexOf("whatson.htm") !=-1){
turnon('whatsonlink','whatsonmenu','4')
document.getElementById('whatsonlink').style.backgroundColor="#9cd4de";
document.getElementById('whatson').style.backgroundColor="#9cd4de";
} else {
if (window.location.href.indexOf("regularevents.htm") !=-1){
turnon('whatsonlink','whatsonmenu','4')
document.getElementById('whatsonlink').style.backgroundColor="#9cd4de";
document.getElementById('regularevents').style.backgroundColor="#9cd4de";
} else {
if (window.location.href.indexOf("collegegroups.htm") !=-1){
document.getElementById('collegegroups').style.backgroundColor="#9cd4de";
} else {
if (window.location.href.indexOf("beliefs.htm") !=-1){
turnon('aboutlink','aboutmenu','0')
document.getElementById('aboutlink').style.backgroundColor="#9cd4de";
document.getElementById('beliefs').style.backgroundColor="#9cd4de";
} else {
if (window.location.href.indexOf("history.htm") !=-1){
turnon('aboutlink','aboutmenu','0')
document.getElementById('aboutlink').style.backgroundColor="#9cd4de";
document.getElementById('history').style.backgroundColor="#9cd4de";
} else {
if (window.location.href.indexOf("cafe360.htm") !=-1){
turnon('international','internationalmenu','1')
document.getElementById('international').style.backgroundColor="#9cd4de";
document.getElementById('cafe360').style.backgroundColor="#9cd4de";
} else {
if (window.location.href.indexOf("iwelcome.htm") !=-1){
turnon('international','internationalmenu','1')
document.getElementById('international').style.backgroundColor="#9cd4de";
document.getElementById('iwelcome').style.backgroundColor="#9cd4de";
} else {
if (window.location.href.indexOf("publicity.php") !=-1){
turnon('downloads','downloadmenu','2')
document.getElementById('downloads').style.backgroundColor="#9cd4de";
document.getElementById('publicity').style.backgroundColor="#9cd4de";
} else {
if (window.location.href.indexOf("biblestudies.php") !=-1){
turnon('downloads','downloadmenu','2')
document.getElementById('downloads').style.backgroundColor="#9cd4de";
document.getElementById('biblestudies').style.backgroundColor="#9cd4de";
} else {
if (window.location.href.indexOf("forms.php") !=-1){
turnon('downloads','downloadmenu','2')
document.getElementById('downloads').style.backgroundColor="#9cd4de";
document.getElementById('forms').style.backgroundColor="#9cd4de";
} else {
if (window.location.href.indexOf("2wtl.htm") !=-1){
turnon('media','mediamenu','3')
document.getElementById('media').style.backgroundColor="#9cd4de";
document.getElementById('2wtl').style.backgroundColor="#9cd4de";
} else {
if (window.location.href.indexOf("videos.php") !=-1){
turnon('media','mediamenu','3')
document.getElementById('media').style.backgroundColor="#9cd4de";
document.getElementById('videos').style.backgroundColor="#9cd4de";
} else {
if (window.location.href.indexOf("library.htm") !=-1){
turnon('downloads','downloadmenu','2')
document.getElementById('downloads').style.backgroundColor="#9cd4de";
document.getElementById('library').style.backgroundColor="#9cd4de";
} else {
if (window.location.href.indexOf("volunteer.php") !=-1){
document.getElementById('volunteer').style.backgroundColor="#9cd4de";
} else {
if (window.location.href.indexOf("links.htm") !=-1){
turnon('downloads','downloadmenu','2')
document.getElementById('downloads').style.backgroundColor="#9cd4de";
document.getElementById('links').style.backgroundColor="#9cd4de";
}}}}}}}}}}}}}}}}}}}}}
}
window.onload=selector;