	
	// DYNAMIC POSITIONING of Relational Element
	var _adjustCPLeft = 0;  // adjust as needed
	var _adjustCPTop = 0;	// adjust as needed
	function AnchorPosition_getPageOffsetLeft(el){var ol=el.offsetLeft;while((el=el.offsetParent) != null){ol += el.offsetLeft;}if (window._adjustCPLeft) {ol +=_adjustCPLeft}return ol;}
	function AnchorPosition_getWindowOffsetLeft(el){return AnchorPosition_getPageOffsetLeft(el)-document.body.scrollLeft;}
	function AnchorPosition_getPageOffsetTop(el){var ot=el.offsetTop;while((el=el.offsetParent) != null){ot += el.offsetTop;}if(window._adjustCPTop){ot +=_adjustCPTop}return ot;}
	function AnchorPosition_getWindowOffsetTop(el){return AnchorPosition_getPageOffsetTop(el)-document.body.scrollTop;}
	function getAnchorPosition(anchorname){var useWindow=false;var coordinates=new Object();var x=0,y=0;var use_gebi=false, use_css=false, use_layers=false;if(document.getElementById){use_gebi=true;}else if(document.all){use_css=true;}else if(document.layers){use_layers=true;}if(use_gebi && document.all){x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);}else if(use_gebi){var o=document.getElementById(anchorname);x=AnchorPosition_getPageOffsetLeft(o);y=AnchorPosition_getPageOffsetTop(o);}else if(use_css){x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);}else if(use_layers){var found=0;for(var i=0;i<document.anchors.length;i++){if(document.anchors[i].name==anchorname){found=1;break;}}if(found==0){coordinates.x=0;coordinates.y=0;return coordinates;}x=document.anchors[i].x;y=document.anchors[i].y;}else{coordinates.x=0;coordinates.y=0;return coordinates;}coordinates.x=x;coordinates.y=y;return coordinates;}
	// EXAMPLE: function setEmotDiv(anchorname,divObj){var coordinates;coordinates = getAnchorPosition(anchorname);divObj.style.left = coordinates.x;divObj.style.top = coordinates.y;}


	// SELECT nav header
	function nav_on(navID) {
		document.getElementById("nav_" + navID).src = "img/" + navID + "-over.gif";
	}
	// SWAP image by reference/state
	function imgSwapGif(_this, _state) {
		_this.src = "img/" + _this.id + "-" + _state + ".gif";
	}
	// SWAP image by reference/state
	function imgSwapJpg(_this, _state) {
		_this.src = "img/" + _this.id + "-" + _state + ".jpg";
	}
	// SWAP image by reference/src
	function imgSwapSrc(_this, _src) {
		_this.src = "img/" + _src;
	}
	// LOAD page
	function loadPage(PageURL) {
		window.location.href = PageURL;
	}
	// OPEN new window
	function openPage(PageURL,w,h) {
		width=w
		height=h
		window.open(PageURL,'newWindow','width='+width+',height='+height+',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=no,resizable=yes')
	}
	// HIDE Element by ID
	function hideEle(inID) {
		document.getElementById(inID).style.visibility = "hidden";
	}
	// SHOW Element by ID
	function showEle(inID) {
		document.getElementById(inID).style.visibility = "visible";
	}
	// NONE Element by ID
	function removeEle(inID) {
		try {document.getElementById(inID).style.display = "none";}
		catch (e) {};
	}
	// BLOCK Element by ID
	function displayEle(inID) {
		try {document.getElementById(inID).style.display = "block";}
		catch (e) {};
	}
	// HTTP/HTTPS
	function secit(_secure) {
		var eLink=document.getElementsByTagName("a");
		for(var i=0;i<eLink.length;i++){
			eHref = eLink[i].getAttribute('href')
			if (_secure) eHref = eHref.replace("http","https");
			else eHref = eHref.replace("https","http");
			eLink[i].href = eHref
		}
	}
	// SET JS YEAR to 4 digit
	function y2k(_year) { return (_year < 1000) ? _year + 1900 : _year; }
	
	// TRIM
	function trim(_str) {
		return _str.replace(/^\s+|\s+$/g,'');
	}
	
