	//detect browser
	var isNS4 = (document.layers) ? true : false;
	var isIE4 = (document.all && !document.getElementById) ? true : false;
	var isIE5 = (document.all && document.getElementById) ? true : false;
	var isNS6 = (!document.all && document.getElementById) ? true : false;
	
	if (isNS4){
		window.alert("This website is not configured for use with Netscape 4. Please update you browser.");
		window.location.href = '../default.htm';
	}

	function showDiv(parentID, divID){
		var bodyTD = document.getElementById(parentID);
		//hide all the body div tags
		for(i=0; i<bodyTD.childNodes.length; i++){
			if(bodyTD.childNodes[i].nodeName=='DIV'){
				bodyTD.childNodes[i].style.display = 'none';
			}
		}
		//display the div requested
		document.getElementById(divID).style.display = 'block';
		
		return 0;
	}
	
	function showHide(divElement){
		var myElement = document.getElementById(divElement);
		if (myElement.style.display == "none")
			myElement.style.display = "block";
		else
			myElement.style.display = "none";
	}
	
	function openRegister() {
		window.open ("register.htm", "_blank", "height=450, width=500, resizeable=no, scrollbars=no, status=no, toolbar=no, menubar=no, location=no");
	}

	function openIntegration(){
		window.open ("integration.htm", "_blank", "height=500, width=700, resizeable=yes, scrollbars=yes, status=no, toolbar=no, menubar=no, location=no");
	}

	function openPP(source){
		window.open (source, "aliaPP", "height=600, width=700, resizeable=yes, scrollbars=yes, status=no, toolbar=no, menubar=no, location=no");
	}

	function determineDisplay(parentID, divID){
	    if(window.name=='aliaPP'){
			changeStyle('printPreview');
		}
		else{
			showDiv(parentID, divID);
		}	
	}

	function getCopyright(){
		var d = new Date()
		return "Copyright &copy; 1999-" + d.getFullYear() +" Alia Systems Limited&nbsp;";
	}

	function getAllSheets(){
		//if you want ICEbrowser's limited support, do it this way
		if(!window.ScriptEngine && navigator.__ice_version){
			//IE errors if it sees navigator.__ice_version when a window is closing
			//window.ScriptEngine hides it from that
			return document.styleSheets;
		}
		
		if(document.getElementsByTagName){
			//DOM browsers - get link and style tags
			var Lt = document.getElementsByTagName('LINK');
			var St = document.getElementsByTagName('STYLE');
		}
		else if(document.styleSheets && document.all) {
			//not all browsers that supply document.all supply document.all.tags
			//but those that do and can switch stylesheets will also provide
			//document.styleSheets (checking for document.all.tags produces errors [WHY?!])
			var Lt = document.all.tags('LINK'), St = document.all.tags('STYLE');
		}
		else{
			return [];
		} //lesser browser - return a blank array
		
		//for all link tags ...
		for(var x = 0, os = []; Lt[x]; x++){
			//check for the rel attribute to see if it contains 'style'
			if(Lt[x].rel){
				var rel = Lt[x].rel;
			}
			else if(Lt[x].getAttribute){
				var rel = Lt[x].getAttribute('rel');
			}
			else{
				var rel = '';
			}
			
			if(typeof(rel)=='string' && rel.toLowerCase().indexOf('style') + 1){
				//fill os with linked stylesheets
				os[os.length] = Lt[x];
			}
		}
		
		//include all style tags too and return the array
		for(var x = 0; St[x]; x++){
			os[os.length] = St[x];
		} 
		return os;
	}

	function changeStyle(){
		for(var x = 0, ss = getAllSheets(); ss[x]; x++){
			//for each stylesheet ...
			if(ss[x].title){
				//disable the stylesheet if it is switchable
				ss[x].disabled = true;
			}
			for( var y = 0; y < arguments.length; y++ ) {
				//check each title ...
				if(ss[x].title == arguments[y]){
					//and re-enable the stylesheet if it has a chosen title
					ss[x].disabled = false;
				}
			}
		}
		
		if(!ss.length){
			window.alert( 'Your browser cannot change stylesheets' );
		}
	}