/* 
	rccHeader.js
	File containing scripts for generating Redbridge CC Header
	Created by Questronics Computing Service
 */

var ns4 = document.layers
var ie4 = document.all
var ns6 = document.getElementById && !document.all
var isNav = (ns4 || ns6)
var isIE = !isNav

function showHeader(colour, doc) {
/*
	var image1 = new Image()
	var image2 = new Image()
	var image3 = new Image()
	var image4 = new Image()
	image1.src = "images/template_' + colour + '/' + colour + '_logo.gif"
	image2.src = "images/template_' + colour + '/' + colour + '_banner.gif"
	image3.src = "images/redbridge_logo.gif"
	image4.src = "images/button_menu.gif"
*/
	var obj = eval(((doc == null) || (doc == "") || (doc == "undefined")) ? 'document' : 'doc.document')
	var cText = '<map name="nav">\n'
		+ '<area coords="    6,6,  77,34" href="competitive/competition_frame.html" target="_top" alt="time trials and road races">\n'
		+ '<area coords="102,6,173,34" href="social/social_frame.html" target="_top" alt="details of social rides and events">\n'
		+ '<area coords="197,6,268,34" href="about/about_frame.html" target="_top" alt="all about us">\n'
		+ '<area coords="293,6,364,34" href="about/diary_frame.html" target="_top" alt="club events and activities">\n'
		+ '<area coords="389,6,460,34" href="about/membership_frame.html" target="_top" alt="details of how to join Redbridge CC">\n'
		+ '<area coords="485,6,555,34" href="ecca/ecca_frame.html" target="_top" alt="eastern counties cycling association">\n'
		+ '</map>\n'
		+ '<map name="logo">\n'
		+ '<area alt="" shape="circle" coords="58,57,56" href="info/homepage_frame.html" target="_top" title="click for home page">\n'
		+ '</map>\n'
		+ '<div id=logo1><img name="' + colour + '_logo" src="images/template_' + colour + '/' + colour + '_logo.gif" width="183" height="151"></div>\n'
		+ '<div id=banner1><img src="images/template_' + colour + '/' + colour + '_banner.gif" width="605" height="103"></div>\n'
		+ '<div id=logo2><img src="images/redbridge_logo.gif" usemap="#logo" width="115" height="115"></div>\n'
	obj.write(cText)
	cText = '<div id=menu1>\n'
		+ '<img src="images/button_menu A.gif" width="560" height="40">\n'
/*
		+ '<div style="font-family:Rockwell Condensed, Arial Narro, Arial; font-weight:normal; font-size:21pt; line-height:21pt; text-align:center;">\n'
		+ '<div style="position:absolute; z-index:12; top:6; left:8; width:65;  color:black; background-color:yellow">racing</div>\n'
		+ '<div style="position:absolute; z-index:12; top:6; left:104; width:65; color:white; background-color:blue">social</div>\n'
		+ '<div style="position:absolute; z-index:12; top:6; left:200; width:65; color:black; background-color:lime">about</div>\n'
		+ '<div style="position:absolute; z-index:12; top:6; left:296; width:65; color:black; background-color:white">diary</div>\n'
		+ '<div style="position:absolute; z-index:12; top:6; left:391; width:65; color:black; background-color:red">join</div>\n'
		+ '<div style="position:absolute; z-index:12; top:6; left:487; width:65; color:black; background-color:magenta">ecca</div>\n'
		+ '</div>'
*/
		+ '</div>\n'
		+ '<div style="position:absolute; top:26; left:200; z-index:15;"><img src="images/blank_menu.gif" usemap="#nav" width="560" height="50"></div>\n'
	obj.write(cText)
//	window.setTimeout("document.all.welcome.style.visibility='hidden'", 3000)
}

function hideWelcome() {
	getObj("loaded").style.visibility='visible'
	getObj("welcome").style.visibility='hidden'
}

<!-- Start of Globel Code -->
var count = "redbridge2";          // Change Your Account?
var type = "boffo";       // Change Your Counter Image?
var digits = "5";          // Change The Amount of Digits on Your Counter?
var prog = "unique";          // Change to Either hit/unique?
var statslink = "yes";    // provide statistical link in counter yes/no?
var sitelink = "no";     // provide link back to our site;~) yes/no?
var cntvisible = "yes"; // do you want counter visible yes/no?
/*
<!-- START DO NOT TAMPER WITH ANYTHING ELSE BELOW THIS LINE FOR YOUR WEBTV & UNIX VISITORS -->
<script language="JavaScript" src="http://008.free-counters.co.uk/count-011.js">
</script>
<noscript>
<a href="http://www.free-counters.co.uk/" target="_blank">
<img  src="http://008.free-counters.co.uk/count-011.pl?count=redbridge&cntvisible=no&mode=noscript" alt="site counters" title="site counters" border="0">
</a>The following text will not be seen after you upload your website,
please keep it in order to retain your counter functionality 
<br>Diamonds are forever, but insurance lasts longer. also one should note that <a href="http://www.nlgha.org" target="_blank">term life insurance quotes</a><br> is important for many other reasons not to be specified here. Insurance quotes are the way to start looking for insurance. <a href="http://www.free-counters.co.uk/" target="_blank">hit counter</a><br>
</noscript>
<!-- END DO NOT TAMPER WITH ANYTHING ELSE ABOVE THIS LINE FOR YOUR WEBTV & UNIX VISITORS -->
</CENTER>        
<!-- End of Globel Code -->
<!-- Start of Globel Code -->
<CENTER>
<script language="JavaScript">
var count = "redbridge2";          // Change Your Account?
var type = "boffo";       // Change Your Counter Image?
var digits = "5";          // Change The Amount of Digits on Your Counter?
var prog = "unique";          // Change to Either hit/unique?
var statslink = "yes";    // provide statistical link in counter yes/no?
var sitelink = "no";     // provide link back to our site;~) yes/no?
var cntvisible = "yes"; // do you want counter visible yes/no?
</script>
<!-- START DO NOT TAMPER WITH ANYTHING ELSE BELOW THIS LINE FOR YOUR WEBTV & UNIX VISITORS -->
<script language="JavaScript" src="http://001.c-o-u-n-t.com/count-011.js">
</script>
<noscript>
<a href="http://www.c-o-u-n-t.com" target="_blank">
<img  src="http://001.c-o-u-n-t.com/count-011.pl?count=redbridge&cntvisible=no&mode=noscript" alt="COUNT" title="COUNT" border="0">
</a>The following text will not be seen after you upload your website,
please keep it in order to retain your counter functionality 
<br><a href="http://www.family-ancestry.co.uk/history/" target="_blank">Family History</a><br> <a href="http://www.free-stuff.me.uk/free/graphics/" target="_blank">Freebie Graphics</a><br>

</noscript>
<!-- END DO NOT TAMPER WITH ANYTHING ELSE ABOVE THIS LINE FOR YOUR WEBTV & UNIX VISITORS -->
</CENTER>        
<!-- End of Globel Code -->
*/

function showVisitors(site) {
	var siteName, siteDate
	switch (site) {
		case "Redbridge":
			siteName="RedbridgeCyclingClub"
			siteDate="September 2001"
			break
		case "ECCA":
			siteName="ECCA"
			siteDate="April 2002"
			break
		case "ECRRA":
			siteName="ECRRA"
			siteDate="April 2002"
			break
	}

	if (document.location.href.toLowerCase().indexOf("http") != -1) {
/*
		document.write(
			'<img id=counter src="http://counter.digits.com/wc/-d/4/-c/2/-f/ff0000/-b/ffffff/' + siteName + '" width=60 height=20 '
			+ 'title="Number of Visitors since ' + siteDate + '">'
		)
*/
		document.write(
			'<script language="JavaScript" src="http://001.c-o-u-n-t.com/count-011.js"></script>'
			+ '<noscript><a href="http://www.c-o-u-n-t.com" target="_blank">'
			+ '<img  src="http://001.c-o-u-n-t.com/count-011.pl?count=redbridge2&cntvisible=no&mode=noscript" '
			+ 'alt="COUNT" title="COUNT" border="0"></a>'
			+ 'The following text will not be seen after you upload your website, please keep it in order to retain your counter functionality<br>'
			+ '<a href="http://www.family-ancestry.co.uk/history/" target="_blank">Family History</a><br>'
			+ '<a href="http://www.free-stuff.me.uk/free/graphics/" target="_blank">Freebie Graphics</a><br></noscript>'
		)
	}
}

function setMsg(msg) {
	if ((msg == null) || (msg == "undefined")) { msg = '' }
	if ((msg != '') && (msg != ' ')) {
		msg = unescape(msg)
		var msg2 = msg.toLowerCase()
		if ((msg2.indexOf('show') != 0) && (msg2.indexOf('go') != 0) && (msg2.indexOf('select') != 0) && (typeof selectedYear != "undefined")) { 
			msg = 'Show ' + selectedYear + ' ' + msg 
		}
	}
	window.status = msg
	return true
}

function addMenu(link, title, msg, desc, space, target, txt) {
	var cText = "", suffix = "", blink = ""
	if ((space != "") && (space != null) && (space != "undefined")) {
		if ((typeof space == "boolean") && (space == true)) { suffix = "&nbsp;&nbsp;&nbsp;&nbsp;" }
		if (typeof space == "number") { for (x = 0; x < space; x++) { suffix = suffix + "&nbsp;" } }
		if ((typeof space == "string") && (space.toLowerCase().indexOf('blnk') != -1)) { blink = " " + space }
	}
	cText += '<a href="' + link + '" title="' + title + '"' + blink + ' onmouseover="return setMsg(\'' + msg + '\')" onmouseout="return setMsg()"'
	if ((target != "") && (target != null) && (target != "undefined")) { cText += ' target="' + target + '"' }
	cText += '>' + desc + '</a>' + suffix
	if ((txt != "") && (txt != null) && (txt != "undefined") && ((typeof space == "boolean") && (space == true))) { 
		return cText
	} else {
		document.write(cText)
	}
}

function goHome() {
	var x = 0, locn = ""
	var host = parent.document.location.href 
//alert(host)
	x=host.toLowerCase().lastIndexOf("redbridge/")
	if (x>0) { host = host.substring(0,x+10) + "index.html" }
	locn = host
	host = host.toLowerCase()
	if (host.indexOf("http") != -1) {
		if (host.indexOf("microlite21") != -1) {
			locn = "http://server.microlite21.com/~admin871/Redbridge/index.html"
		} else {
			if ((host.indexOf("fsnet") != -1) || (host.indexOf("supanettrial") != -1) || (host.indexOf("questronics.co.uk") != -1)) { 
				locn = "http://www.RedbridgeCC.org.uk"
			} else {
			}
		}
	}
//alert(locn)
	parent.document.location = locn
}

