	var client = new IdentifyClient();
	

	// Check client browser & platform specifics
	function IdentifyClient() {
		this.agent = navigator.userAgent.toLowerCase();
		this.name = navigator.appName.toLowerCase();
		this.version = parseFloat(navigator.appVersion.slice(0, navigator.appVersion.indexOf(' ')));
		
		this.ie = (this.name.indexOf('microsoft internet explorer') >= 0);
		this.ns = (this.name.indexOf('netscape') >= 0);
		this.mac = (this.agent.indexOf('mac') >= 0);
		this.dom = (document.getElementById) ? true : false;
		
		if (this.agent.indexOf('msie') >= 0) { this.version = parseFloat(this.agent.slice(this.agent.indexOf('msie') + 5, this.agent.indexOf(';', this.agent.indexOf('msie') + 5))); }
		
		return this;
	}



	// Launch pop-up window
	// Requires:	IdentifyClient
	function LaunchWindow( psWindowURL, psWindowName, piWidth, piHeight, pbResizable, pbScrollbars, pbMenubar, pbToolbar, pbLocation, pbStatus ) {
		if (client.mac) {
			if (client.ie && client.version >= 4 && client.version < 5) piHeight = parseInt(piHeight + 17);
		}
		var windowAttribs = 'width=' + piWidth + ',height=' + piHeight + ',resizable=' + Number(pbResizable) + ',scrollbars=' + Number(pbScrollbars) + ',menubar=' + Number(pbMenubar) + ',toolbar=' + Number(pbToolbar) + ',location=' + Number(pbLocation) + ',status=' + Number(pbStatus);
		var win = window.open(psWindowURL, psWindowName, windowAttribs);
		if (win != null) {
			if (win.opener == null) win.opener = self;
		}
		win.focus();
		
		return win;
	}


	function CreateObject(imgName, imgSrc) {
		if (client.dom) {
			var tempImg = document.createElement("img");
			tempImg.src = imgSrc;
			tempImg.id = imgName;
			tempImg.style.visibility = 'hidden';
			tempImg.style.position = 'absolute';
			tempImg.style.top = 0;
			document.body.appendChild(tempImg);
		} else {
			eval(imgName+' = new Image()');
			eval(imgName+'.src = "'+imgSrc+'"');
		}
	}


	// Changes the image source
	// Requires:	IdentifyClient
	function ChangeImage( psImageRef, psImageVariable ) {
		var loImg = (client.dom) ? document.getElementById(psImageRef) : document.images[psImageRef];
		//alert(loImg);
		if (client.dom) {
			var loImageElement = document.getElementById(psImageVariable);
			if (loImg && loImageElement) loImg.setAttribute("src", loImageElement.getAttribute("src"));
		} else { loImg.src = eval(psImageVariable + ".src"); }
	}

	
	function ToggleCalendar( psCalendarID, pbOpen ) {
		var loCal = document.getElementById(psCalendarID);
		var lOpen;
		
		if (loCal) {
			if (pbOpen === undefined) {
				lOpen = (loCal.style.display != 'inline') ? true : false;
			} else {
				lOpen = pbOpen;
			}
			
			
			loCal.style.display = (lOpen) ? 'inline' : 'none';
		} else {
			alert("calendar not found");
		}
	}
	
	
	function LaunchPhoto( psURL, psTarget ) {
		LaunchWindow( "/photo.aspx?path=" + psURL, psTarget, 700, 500, 1, 1, 0, 0, 0, 1 );
		
		return false;
	}	
	
	
	function LaunchInfo( psURL, psTarget ) {
		LaunchWindow( psURL, psTarget, 600, 450, 1, 1, 0, 0, 0, 1 );
		
		return false;
	}
	
	function calcHeight()

	{
	
	  //find the height of the internal page
	
	  var the_height=
	
	    document.getElementById('pages').contentWindow.
	
	      document.body.scrollHeight;
	
	
	
	  //change the height of the iframe
	
	  document.getElementById('pages').height=
	
	      the_height;
	
	}
	
	
	function CSSMenu() {}	

	CSSMenu.Activate = function() {

		if (document.all && document.getElementById) {

			var navRoot = document.getElementById("imgMenu");

			//alert (navRoot);

			if (navRoot) {

				for (var i = 0; i < navRoot.childNodes.length; i++) {

					var node = navRoot.childNodes[i];

					

					if (node) {

						if (node.nodeName == "LI") {

							node.onmouseover = CSSMenu.MouseOver;

							node.onmouseout = CSSMenu.MouseOut;

						}

					}

				}

			}

		}

	}

	

	CSSMenu.MouseOver = function() {

		this.className += " over";

	}

	

	

	CSSMenu.MouseOut = function() {

		this.className = this.className.replace(" over", "");

	}
	
	function AddLoadEvent( func ) {

		var oldOnLoad = window.onload;		

		if (typeof window.onload != 'function') {

			window.onload = func;

		} else {

			window.onload = function() {

				if (oldOnLoad) oldOnLoad();

				func();

			}

		}

	}

