<!--
/////////////////////////////////////////////////////////////////////////////
//////// TH  ////////////////////////////
/////////////////////////////////////////////////////////////////////////////


// browser/ platform detection
var w3c=(document.getElementById)
var IE4=(document.all)
var NS4=(document.layers)
var opera = navigator.userAgent.toLowerCase()+" ";
	opera=opera.indexOf("opera")!=-1
var mac=navigator.userAgent.toLowerCase()+" ";
    mac=mac.indexOf("mac")!=-1

//  turn off scripting if test <4 browsers
var doScript=parseInt(navigator.appVersion.charAt(0))>=4

// mark the sub navigation page - to switch off mouse-oyt effect
var STR_SUB_ID=""

// set up browser spacific references
var reference=""
var styleFlag=""
if (IE4) {
    reference="document.all"
    styleFlag=".style"
} else {
	reference="document.layers"
}
	

	
//  Subnavigation highlighting
// note : needs fixing in mac
function SubNavHighlight(id,action){
if (!mac){
var colourOne="#FFFFFF"
var colourTwo="#86B1F2"
if (doScript && !opera && id != STR_SUB_ID){
	if (w3c){
		if (action=="on"){
			document.getElementById('sub'+id).style.backgroundColor=colourOne
			document.getElementById('sub'+'TXT'+id).style.color=colourTwo
		}else{
			document.getElementById('sub'+id).style.backgroundColor=colourTwo
			document.getElementById('sub'+'TXT'+id).style.color=colourOne
		
		}
	}else{
		if (IE4){
			if (action=="on"){
				document.all('sub'+id).style.backgroundColor=colourOne
				document.all('sub'+'TXT'+id).style.color=colourTwo
			}else{
				document.all('sub'+id).style.backgroundColor=colourTwo	
				document.all('sub'+'TXT'+id).style.color=colourOne	
			}
		}else{
			// netscape
			// no action
		}
	}
}}}

// visibility switch
function visSwitch(objname,y_n_t){
if (doScript){
var condition
if (document.getElementById){
	//W3C
	if (document.getElementById(objname)) {
		object=document.getElementById(objname)
    	condition=(y_n_t==2)?object.style.visibility=="hidden":y_n_t
	    object.style.visibility=(condition)?"visible":"hidden"
	}
	}else{
	//not W3C
	var state=eval(reference+"[objname]"+styleFlag+".visibility")
	condition=(y_n_t==2)?(state=='hide' || state=='hidden' || state=='none'):y_n_t
	var visTXT=(condition)?'visible':'hidden'
	eval(reference+"[objname]"+styleFlag+".visibility='"+visTXT+"'")
}
}
}



//test for section and highlight navigation accordingly
function sectionDetect(){
if (doScript){
var section=window.location.pathname
sectionID=section.charAt(2)
sectionID=parseInt(sectionID)
if ((String(sectionID*1)=="NaN") && (section.indexOf("index")!=-1 || section=="/")){
	// site homepage detected
	sectionID=0
}
if (sectionID>=0 && sectionID<=5){
	swtch(sectionID*2+1,'nav'+sectionID)
}
}
}

///////////////////////////////////////////////////////////////////////////
// checks the href to determin sub section - then highlights relavent tab
function subSectionDetection()
{
	if (doScript)
	{
		// get page id
		var strSection=window.location.pathname+""
		strSection = strSection.substring(strSection.lastIndexOf("/")+1,strSection.length)
		if (strSection.indexOf(".")!=-1)
		{
			strSection = strSection.substring(0, strSection.lastIndexOf("."))
			if (strSection == "index")
			{
				strSection = ""
			}
			if (strSection.indexOf("hod")!=-1)
			{
				strSection = strSection.substring(0,strSection.lastIndexOf("_"))
				if (strSection.indexOf("cs_")!=-1)
				{
					strSection = "client_services"
				}
			}
		}
		
		// get pageRef
		var objTRCollection = document.getElementsByTagName("tr")
		var intNoOfTRs = objTRCollection.length
		for (var i=0;i<intNoOfTRs;i++)
		{
			if (objTRCollection[i].pageRef+"" == strSection)
			{
				var strID=objTRCollection[i].id.substring(3,5)
				SubNavHighlight(strID, 'on')
				STR_SUB_ID = strID
			}
		}
	}
}






//-->