/*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=\"evangelismresources.php\" class=\"sub-links\" id=\"evangres\">evangelism resources</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\">what is Christianity<br /> all about?</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=\"archives.php\" class=\"sub-links\" id=\"archives\">archives</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>")*/

var submenus = new Object();
submenus['new'] = '<li class="sub-buttons"><a class="sub-links" id="freshers" href="freshers.htm">Freshers\' Guide</a></li><li class="sub-buttons"><a class="sub-links" id="colleges" href="collegegroups.htm">Find your college CU</a></li><li class="sub-buttons"><a class="sub-links" id="video-new" href="videos.php?new">Recent talks</a></li><li class="sub-buttons"><a class="sub-links" id="2wtl" href="2wtl.htm">What\'s Christianity all about?</a></li><li class="sub-buttons"><a class="sub-links" id="whatson-new" href="whatson.htm?new">What\'s on next?</a></li><li class="sub-buttons"><a class="sub-links" id="events" href="regularevents.htm?new">Regular events</a></li><li class="sub-buttons"><a class="sub-links" id="join-new" href="join.htm?new">Join the OICCU</a></li>';
submenus['members'] = '<li class="sub-buttons"><a class="sub-links" id="video" href="videos.php">Recent talks</a></li><li class="sub-buttons"><a class="sub-links" id="whatson" href="whatson.htm">What\'s on next?</a></li><li class="sub-buttons"><a class="sub-links" id="events" href="regularevents.htm">Regular events</a></li><li class="sub-buttons"><a class="sub-links" id="library" href="library.htm">The OICCU Library</a></li><li class="sub-buttons"><a class="sub-links" id="resources" href="evangelismresources.php">Resources</a></li><li class="sub-buttons"><a class="sub-links" id="publicity" href="tijresources.php">"This Is Jesus" Publicity</a></li><li class="sub-buttons"><a class="sub-links" id="forms" href="forms.php">Forms</a></li><li class="sub-buttons"><a class="sub-links" id="volunteer" href="volunteer.php">Volunteer</a></li><li class="sub-buttons"><a class="sub-links" id="giving" href="giving.php">Giving</a></li><li class="sub-buttons"><a class="sub-links" id="join" href="join.htm">Join the OICCU</a></li>';
submenus['alumni'] = '<li class="sub-buttons"><a class="sub-links" id="alumni" href="alumni.php">Join the mailing list</a></li><li class="sub-buttons"><a class="sub-links" id="oiccuforlife" href="oiccuforlife.htm">OICCU For Life 2011</a></li><li class="sub-buttons"><a class="sub-links" id="giving-alumni" href="giving.php?alumni">Giving</a></li>';
submenus['iteam'] = '<li class="sub-buttons"><a class="sub-links" id="cafe360" href="cafe360.htm">Caf&eacute; 360&deg;</a></li><li class="sub-buttons"><a class="sub-links" id="iwelcome" href="iwelcome.htm">iWelcome</a></li>';
submenus['about'] = '<li class="sub-buttons"><a class="sub-links" id="aims" href="aims.htm">Aims</a></li><li class="sub-buttons"><a class="sub-links" id="people" href="committee.htm">People</a></li><li class="sub-buttons"><a class="sub-links" id="beliefs" href="beliefs.htm">Beliefs</a></li><li class="sub-buttons"><a class="sub-links" id="history" href="history.htm">History</a></li><li class="sub-buttons"><a class="sub-links" id="talks" href="archives.php">Talk archives</a></li><li class="sub-buttons"><a class="sub-links" id="groups" href="assocgroups.htm">Associated groups</a></li><li class="sub-buttons"><a class="sub-links" id="links" href="links.htm">Links</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 turnon(section) {
document.getElementById(section + '-button').href = 'javascript:turnoff(\'' + section + '\');';
document.getElementById(section + '-menu').innerHTML = submenus[section];
document.getElementById(section + '-menu').style.borderTop = '1px solid #666666';
document.getElementById(section + '-menu').style.borderBottom = '1px solid #666666';
if (navigator.appName=="Microsoft Internet Explorer") { document.getElementById(section + '-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 turnoff(section) {
document.getElementById(section + '-menu').innerHTML = '';
document.getElementById(section + '-menu').style.borderTop = '';
document.getElementById(section + '-menu').style.borderBottom = '';
document.getElementById(section + '-button').href = 'javascript:turnon(\''+section+'\')';
if (navigator.appName=="Microsoft Internet Explorer") { document.getElementById(section + '-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";
} else {
if (window.location.href.indexOf("evangelismresources.php") !=-1){
turnon('downloads','downloadmenu','2')
document.getElementById('downloads').style.backgroundColor="#9cd4de";
document.getElementById('evangres').style.backgroundColor="#9cd4de";
} else {
if (window.location.href.indexOf("archives.php") !=-1){
turnon('media','mediamenu','3')
document.getElementById('media').style.backgroundColor="#9cd4de";
document.getElementById('archives').style.backgroundColor="#9cd4de";
}}}}}}}}}}}}}}}}}}}}}}}
}
window.onload=selector;*/
