function bccheck(){  
	this.ver=navigator.appVersion
	this.agent=navigator.userAgent
	this.dom=document.getElementById?1:0
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom)?1:0;
	this.ie4=(document.all && !this.dom)?1:0;
	this.ie=this.ie4||this.ie5||this.ie6
	this.mac=this.agent.indexOf("Mac")>-1
	this.opera5=this.agent.indexOf("Opera 5")>-1
	this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bc=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5 || this.dom)
	return this
}
var bc = new bccheck();
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// ~~~~~~~~~~~~ start radio button function ~~~~~~~~~~~~~~
var butNum = 3;
var imgName = 'reshi';
var d = document;
var current;
function reschange(imageName,imageFile,which) {
	if(which != current){
		if(!document.images) return;
		eval('document.images[imageName].src = '+imageFile+'.src');	
	}
}
function resetbuts(which,total){
	butNum = total;
	for(i = 0; i < butNum; i++)eval('d.images.'+imgName+ i +'.src = res_hiup.src');
	if(current != which){
		eval('d.images.'+imgName+which+'.src = res_hidn.src');
		current = which;
	}else if(current == which){
		eval('d.images.'+imgName+which+'.src = res_hiupx.src');
		current = "300";
	}
}		
//~~~~~~~~~~~~ end radio button function ~~~~~~~~~~~~ 
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~~~start hilight in text ~~~~~~~~~~~
var lo_colour = '#1F2836';
var hi_colour = '#ff6633';
var old_element;
//~~~~~~~~ hilight text for ie and nn6 ~~~~~~~~~~~
function hireset(element){ //resets all the links to their low-light colour before calling the hilight function.
	if (bc.dom){
		el = document.getElementsByTagName('a');
		for (i=0;i<el.length;i++){
			if (bc.ie){
				if (el[i].getAttribute('className') == old_element){
					el[i].style.color = lo_colour;
				}
			}else if (bc.ns6){
				if (el[i].getAttribute('class') == old_element){
					el[i].style.color = lo_colour;
				}
			}
		}
	}
	hilight(element);
}
function hilight(element){ //Hi-lights the desired set of links.
	if (bc.dom){
		if (element == old_element){
			old_element = '';
			return;
		}
		old_element = element;
		el = document.getElementsByTagName('a');
		for (i=0;i<el.length;i++){
			if (bc.ie){
				if (el[i].getAttribute('className') == element){
					el[i].style.color = hi_colour;
				}
			}else if (bc.ns6){
				if (el[i].getAttribute('class') == element){
					el[i].style.color = hi_colour;
				}
			}
		}
//~~~~~~~~~~~~~hilight text for nn4.x ~~~~~~~~~~
	}else if(bc.ns4){ //checks to see whether a query string has been called before.
		if (search.element){ // if a button has been clicked before
						eval("loc = '"+document.location+"'");
			temp = loc.split("?");
			newLocation = temp[0];
			old_element = search.element;
		}else{ // or a button hasn't been clicked
			if(!document.hash){
				eval("loc = '"+document.location+"'");
				temp = loc.split("#");
				newLocation = temp[0];
			}else{
				newLocation=document.location;
			}
		}
		if(old_element == element){ //if a the button clicked before was the same as the one clicked this time
			document.location = newLocation;
		}else{ //or it was different
			document.location = newLocation + "?element="+element; //reloads current page with new query string.
		}
	}	
}
if(bc.ns4){
	var className;
	var search = new Object(); //searches location for query string.
	var keyvals = location.search.substring(1).split("&"); 
	var search = new Object();
	for (var i = 0; i < keyvals.length; i++) {
		var temp = keyvals[i].split("=");
		if(temp[1]){
			temp[1] = temp[1].split("+").join(" ");
  			search[temp[0]] = unescape(temp[1]);
		}	
	}
	if(search.element){ // if 'element' exists in query string, the hilight for the desired element is written.
		className = search.element;
		document.write("<style type='text/css'>a."+className+"{color:"+hi_colour+"}</style>");
	}
}
//~~~~~~~~~~~~ end hilight in text ~~~~~~~~~~~~~~~
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
