// Get title and write styles to highlight navigations state
// Done so that the BODY tag can be generic to  the DW templates

var j = document.getElementsByTagName("title")[0].innerHTML;

ttlContact = /\b(Contact)\b/;
ttlAbout = /\b(About)\b/;
ttlMembers = /\b(Our Members)\b/;
ttlPartners = /\b(Partners)\b/;
ttlNews = /\b(News)\b/;
ttlEvents = /\b(Events)\b/;
ttlMembersOnly = /\b(Members Only)\b/;

if (ttlContact.test(j)) { 
	document.write('<style type="text/css">#navUtil ul li#three a {background-position: 0 -23px;}}</style>');
}
if (ttlAbout.test(j)) { 
	document.write('<style type="text/css">ul.dropdown li a#four {background-position: 0 -33px;}}</style>');
}
if (ttlMembers.test(j)) { 
	document.write('<style type="text/css">ul.dropdown li a#five {background-position: 0 -33px;}}</style>');
}
if (ttlMembersOnly.test(j)) {
	document.write('<style type="text/css">body{background: #FFF url(../images/background/background-members.gif) repeat-x;}#navUtil ul li#two a {background-position: 0 -23px;}</style>');
}
if (ttlPartners.test(j)) { 
	document.write('<style type="text/css">ul.dropdown li a#six {background-position: 0 -33px;}</style>');
}
if (ttlNews.test(j)) { 
	document.write('<style type="text/css">ul.dropdown li a#seven {background-position: 0 -33px;}}</style>');
}
if (ttlEvents.test(j)) { 
	document.write('<style type="text/css">ul.dropdown li a#eight {background-position: 0 -33px;}}</style>');
}

function showContact(e) {
	if (document.getElementById(e).style.display == "none"){
		document.getElementById(e).style.display = "";
		}
	else{
		document.getElementById(e).style.display = "none";
	}
}

function nospam(user,domain,args) {
	loc = "mailto:" + user + "@" + domain;
	if (args) {
		loc += "?" + args;
	}
	window.location = loc;
}