		var iSelectedFAQ = false;
		var oSearchFAQTimer = false;
		//*****************************************
		// TBC SPECIFIC FUNCTION :: Allows user to select FAQ using AJAX. Yay!
		function tbcSelectFAQ(iFAQId) {
			var laListItems = document.getElementsByTagName('a');
			for (var i=0; i<laListItems.length; i++) {
				if (laListItems[i].className == 'faqs-list-item') {
					if (laListItems[i].getAttribute('id') != 'faq-'+iFAQId) {
						laListItems[i].style.color = '#ffffff';
					} else {
						laListItems[i].style.color = '#0B2675';	
					}
				}
			}
			if (iFAQId != iSelectedFAQ) {
				iSelectedFAQ = iFAQId;
				ajaxEvent('/about/faqs/'+iFAQId, $('faqs_answers_holder'), false, true);
			}
		}
		//*****************************************
		//*****************************************
		// TBC SPECIFIC FUNCTION :: Allows user to select FAQ using AJAX. Yay!
		function tbcSearchFAQ(lsText) {
			if (oSearchFAQTimer != false) {
				oSearchFAQTimer = window.clearTimeout(oSearchFAQTimer);
				oSearchFAQTimer = false;
			}
			oSearchFAQTimer = window.setTimeout("ajaxEvent('/faqs/search?_q="+lsText+"', $('faqs_questions_holder'), false, true);", 1000);
		}
		//*****************************************



		function encodeRE(lsValue) {
			lsValue=lsValue.replace(/\s/g,"");
			lsValue=lsValue.replace(/\'/g,"");
			lsValue=lsValue.replace(/\"/g,"");
  			lsValue = lsFileName.replace(/[^a-zA-Z0-9\.\-\_\\]/g,'');
  			return lsValue; //.replace(/([~`@#%*^&*=!+?^${}()|[\]\/\\])/g,'');
		}
		//*****************************************

		//*****************************************
		function $() { // returns object reference || array of object references
			var loElements = new Array();
			for (var i = 0; i < arguments.length; i++) {
				var loElement = arguments[i];
				if (typeof loElement == 'string') {
					loElement = (document.getElementById(loElement))?document.getElementById(loElement):false;
				}
				if (arguments.length==1) {
					return loElement;
				}	
				loElements.push(loElement);
			}
			return loElements;
		}
		//*****************************************

		//*****************************************
		function PrepValue(luValue) { //gotta make this solid at some point very soon...
			if (typeof luValue == 'string') {
				luValue=luValue.replace(/\'/g,"''");
				luValue='\'' + luValue + '\'';
				return luValue;
			}
			return luValue;
		}
		//*****************************************
		
		
		//*****************************************
		function UpdateRTE(loElement,lsContext,lsID,lsField,luValue,llCallBack) { //Single Field Edit
			loContainer = createOverlayDiv(); 
			if (!lsContext){return;}
			if (!lsID){return;}
			if (!lsField){return;}
			this.URI='/corespin/rte/'; //current XML HTTP Request URI
			lsRequest='?_context='+lsContext;
			lsRequest+='&_id='+lsID;
			lsRequest+='&_field='+lsField;
			lsRequest+='&_value=';
			this.URI+=lsRequest;
			
			loTheAggravatingIframe = document.createElement('IFRAME')
			loTheAggravatingIframe.id='_RTE_Container';
			loTheAggravatingIframe.src=this.URI;
			loTheAggravatingIframe.style.width="740px";
			loTheAggravatingIframe.style.height="490px";
			loTheAggravatingIframe.style.border="0px";
			
			loContainer.appendChild(loTheAggravatingIframe);
			
			//ajaxEvent(this.URI,loContainer,false,true); //callback, replace contents(false replaces contents, true appends), synchronous.
		}
		//*****************************************
		
		
		//*****************************************
		function UpdateSingleField(loElement,lsContext,lsID,lsField,luValue,llCallBack) { //Single Field Edit
			if (!lsContext){return;}
			if (!lsID){return;}
			if (!lsField){return;}
			if (!luValue){return;}
			this.UpdateURI='/corespin/pf_update/';//current XML HTTP Request URI
			lsRequest='?_context='+lsContext;
			lsRequest+='&_id='+lsID;
			lsRequest+='&_field='+lsField;
			lsRequest+='&_value='+PrepValue(luValue);
			this.UpdateURI+=lsRequest;
			ajaxEvent(this.UpdateURI,(llCallBack)?(loElement):(false),false,true); //callback, replace contents, synchronous.
		}
		//*****************************************
		
		
		
		//*****************************************
		// Returns cross-browser window dimensions
		// lsDimension = 'width' or 'height'
		/*function windowSize(lsDimension) {
			if (!lsDimension || lsDimension == '') { return true; }
			if (typeof(window.innerWidth) == 'number') {
				iFullWidth = window.innerWidth;
				iFullHeight = window.innerHeight;
			} else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
				iFullWidth = document.documentElement.clientWidth;
				iFullHeight = document.documentElement.clientHeight;
			} else if (document.body && (document.body.clientWidth || document.body.clientHeight)) {
				iFullWidth = document.body.clientWidth;
				iFullHeight = document.body.clientHeight;
			}
			lsDimension = lsDimension.toLowerCase();
			if (lsDimension == 'width') {
				return iFullWidth;				
			} else if (lsDimension == 'height') {
				return iFullHeight;
			} else {
				return true;	
			}
		}*/
		//*****************************************

		
		
		//*****************************************
		// Returns cross-browser window dimensions, offsets liScroll position
		// lsDimension = 'width' or 'height' or 'center' 
		// hopefully good enough for now....
		function windowSize(lsDimension) {
			var liClientWidth = 0; 
			var liClientHeight = 0;
			if(typeof( window.innerWidth ) == 'number' ) {
				liClientWidth = window.innerWidth;
				liClientHeight = window.innerHeight;
			} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
				liClientWidth = document.documentElement.clientWidth;
				liClientHeight = document.documentElement.clientHeight;
			} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
				liClientWidth = document.body.clientWidth;
				liClientHeight = document.body.clientHeight;
			}
			var liScrollOffX = 0; 
			var liScrollOffY = 0;
			var liScrollHeight = 0; 
			var liScrollWidth = 0;
			if (typeof(window.pageYOffset) == 'number') {
				liScrollOffY = window.pageYOffset;
				liScrollOffX = window.pageXOffset;
				liScrollHeight = window.scrollMaxY;
				liScrollWidth = window.scrollMaxX;
			} else if (document.documentElement && (document.documentElement.scrollLeft || document.documentElement.scrollTop)) {
				liScrollOffY = document.documentElement.scrollTop;
				liScrollOffX = document.documentElement.scrollLeft;
				liScrollHeight = document.documentElement.scrollHeight;
				liScrollWidth = document.documentElement.scrollWidth;
			} else if (document.body && (document.body.scrollHeight || document.body.scrollTop)) {
				liScrollOffY = document.body.scrollTop;
				liScrollOffX = document.body.scrollLeft;
				liScrollHeight = document.body.scrollHeight; 
				liScrollWidth = document.body.scrollWidth;
			}
			liContentHeight=(document.height)?(document.height+liClientHeight):(document.documentElement.offsetHeight); //FF||IE
			liContentWidth=liClientWidth;
			liContentCenter=liContentHeight/2; //actual content center (ish ?), every browser has different values.
			//center of VIEWABLE area
			liViewPortCenter=liContentCenter;
			liViewPortCenter=(document.height)?(liViewPortCenter-liClientHeight/2):(liViewPortCenter); //subtract window height from content
			liViewPortCenter+=liScrollOffY; //oh look at that, magically works in Firefox. Thank You God for Firefox....
			// ! reset content height for IE; // if we add this above it gets thrown way off in ie
			liContentHeight=(document.height)?(liContentHeight):(document.documentElement.offsetHeight+(liClientHeight));
			if (lsDimension == 'width') {
				return liClientWidth;				
			} else if (lsDimension == 'height') {
				return liContentHeight;
			} else if (lsDimension == 'center') {
				return liContentCenter;
			} else if (lsDimension == 'vpcenter') {
				return liViewPortCenter;
			} else {
				return true;	
			}
		}
		//*****************************************
		
		
		//golobulus am sux
		var blahdibloo = document.getElementsByTagName('body');
		var blackScreen = document.createElement('div');
		var ajaxContainer = document.createElement('div');
		var ajaxTitleBar = document.createElement('div');
		var ajaxTitle = document.createElement('div');
		var ajaxToolBar = document.createElement('div');
		var ajaxExitDiv = document.createElement('div');
		var ajaxExitBtn = document.createElement('img');
		var ajaxScroll = document.createElement('div');

		
		//*****************************************
		// Create AJAX Holder for CORESPIN
		function createOverlayDiv(liWidth, liHeight, lsTitleElement) {
			// Create Element, Apply Classes, Attach to Body
			ClassFX.addClass(blackScreen,'blackroot');
			blackScreen.setAttribute('id', 'blackscreen');
			// blackScreen.setAttribute('onclick', 'removeOverlayDiv()');
			ClassFX.addClass(ajaxContainer, 'cs_ajax_container');
			ajaxContainer.setAttribute('id', 'ajaxcontainer');
			
			if (lsTitleElement) {
				ClassFX.addClass(ajaxTitleBar, 'fm-title-bar');
				ClassFX.addClass(ajaxToolBar, 'fm-tools');
				ClassFX.addClass(ajaxExitDiv, 'fm-tool');
				ajaxExitBtn.setAttribute('src', '/box/icons/cross.png');
				ajaxExitBtn.setAttribute('onclick', 'removeOverlayDiv()');
				ajaxScroll.style.width = liWidth + 'px';
				ajaxScroll.style.height = liHeight - 35 + 'px';
				ajaxScroll.style.overflow = 'auto';
				ajaxExitDiv.appendChild(ajaxExitBtn);
				ajaxToolBar.appendChild(ajaxExitDiv);
				ajaxTitleBar.appendChild(ajaxToolBar);
				ajaxTitleBar.appendChild(ajaxTitle);
				ajaxTitle.innerHTML = lsTitleElement;
				ajaxContainer.appendChild(ajaxTitleBar);
				ajaxContainer.appendChild(ajaxScroll);
			}
			
			blahdibloo[0].appendChild(blackScreen);
			blahdibloo[0].appendChild(ajaxContainer);
			fadeControl('blackscreen', 0, 40, 440);
			
			//fadeControl('ajaxcontainer', 0, 100, 770);
			
			iFullWidth = windowSize("width");
			iFullHeight = windowSize("height");
			iScreenCenter = windowSize("vpcenter");
			iLeftAdjust = Math.round((iFullWidth - liWidth) / 2);
			// iTopAdjust = Math.round((iScreenCenter - liHeight)/2);
			iTopAdjust = Math.round(window.pageYOffset + 50);
			if (iTopAdjust < 50) {
				iTopAdjust = 50;	
			}

			window.onresize = function() {
				iFullWidth = windowSize("width");
				iFullHeight = windowSize("height");
				iScreenCenter = windowSize("vpcenter");
				iLeftAdjust = Math.round((iFullWidth - liWidth) / 2);
				iTopAdjust = Math.round(window.pageYOffset + 50);
				if (iTopAdjust < 0) {
					iTopAdjust = 50;	
				}
				blackScreen.style.width=iFullWidth+"px";
				blackScreen.style.height=iFullHeight+"px";
				ajaxContainer.style.top=iTopAdjust+"px";
				ajaxContainer.style.left=iLeftAdjust+"px";
			}
				
			blackScreen.style.width=iFullWidth+"px";
			blackScreen.style.height=iFullHeight+"px";
			ajaxContainer.style.top=iTopAdjust+"px";
			ajaxContainer.style.left=iLeftAdjust+"px";
			ajaxContainer.style.width=liWidth+"px";
			ajaxContainer.style.height=liHeight+"px";

			return ajaxContainer;
			
		}
		//*****************************************

		
		//*****************************************
		function removeOverlayDiv() {
			//fadeControl('blackscreen', 40, 0, 300);
			//fadeControl('ajaxcontainer', 94, 0, 500);
			//setTimeout('ajaxContainer.innerHTML = "";', 500);
			//setTimeout('blahdibloo[0].removeChild(blackScreen);', 300);
			//setTimeout('blahdibloo[0].removeChild(ajaxContainer);', 300);

			ajaxContainer.innerHTML = "";
			blahdibloo[0].removeChild(blackScreen);
			blahdibloo[0].removeChild(ajaxContainer);
			blahdibloo[0].style.overflow = blahdibloo[0].style.overflow; 
		}
		//*****************************************

		// Change opacity of element !!WITH A SPECIFIC WIDTH!! IE requires the element to have a specific width.
		// Update - make changeOpacity use fadeControl function (if set(use elements current start opacity ))else(if not set((if style display property none)start from 0 by default))
		function changeOpacity(loElement, iOpacity) {
			if(!loElement) {return(false);}
			if(!iOpacity) {return(false);}
			var lsTagName=loElement.tagName.toLowerCase();
			var loElementStyle = loElement.style;
			loElementStyle.opacity = (iOpacity / 100);
			loElementStyle.MozOpacity = (iOpacity / 100);
			loElementStyle.KhtmlOpacity = (iOpacity / 100);
			loElementStyle.filter = "alpha(opacity=" + iOpacity + ")";
			(iOpacity==0)?(loElementStyle.display='none'):(loElementStyle.display=(lsTagName!='div')?('inline'):('block')); //@opacity = zero set display:none; hinders mouse events for zero opacity elements.
		}
		//*****************************************
		
		// Advanced style based fading. -MM ( - you guys wanna see some magic...?)
		function fadeControl(lsItem, iOpacStart, iOpacEnd, iMilliseconds) {

			changeOpacity($(lsItem),iOpacEnd);
			return
			//bypass this funkyness - speed is better than effects

			var speed = Math.round(iMilliseconds / 100); //speed for each frame
			var timer = 0;
			if(iOpacStart > iOpacEnd) { //determine the direction for the blending, if start and end are the same use pulse effect
				for(i = iOpacStart; i >= iOpacEnd; i--) {
					setTimeout("changeOpacity($('" + lsItem + "'),'" + i + "')",(timer*speed));
					timer++;
				}
			} else if(iOpacStart < iOpacEnd) {
				for(i = iOpacStart; i <= iOpacEnd; i++) {
					setTimeout("changeOpacity($('" + lsItem + "'),'" + i + "')",(timer*speed));
					timer++;
				} 
			} else if(iOpacStart==iOpacEnd) { //pulse, not finished -- just pulses without considering value from/to which it's pulsing (just from full opacity to zero and back)
				for(i=0; i<3.1; i+=0.1) {
					setTimeout("changeOpacity($('" + lsItem + "'),'" + Math.round(Math.abs(Math.cos(i)*100)) + "')",(timer*speed));
					timer++;
				}
				changeOpacity($(lsItem),iOpacEnd); //hard set back to iOpacEnd, temp...
			}
		}
		//*****************************************




		
		
		
		
		
		
		
		
		
		function trace(lsEvent) {
			lsTracer='tracer';
			loTracer=($(lsTracer))?$(lsTracer):null;
			(loTracer!=null)?loTracer.value=lsEvent+'\r'+loTracer.value:false;
		}
	
		
		
		
		
		
		//NOT RECOMMENDED
		//*****************************************
		Date.ONE_SECOND = 1000;
		Date.ONE_MINUTE = Date.ONE_SECOND * 60;
		Date.ONE_HOUR = Date.ONE_MINUTE * 60;
		Date.ONE_DAY = Date.ONE_HOUR * 24;
		var llNapping=false;
		//*****************************************
		function nap (liFor) {
			if(llNapping){return;}
			llNapping=true;
			var then = new Date(new Date().getTime() + liFor); 
			while (new Date() < then) { /*<-destroy my processor*/ }
			llNapping=false;
		}
		//*****************************************
		
		
		

		//DEPRECATED
		//*****************************************
		function newWindow(url) {
			oNewWindow=window.open(url,'newWindow','width=760,height=550','location=no, status=no, liScrolling=no, resize=yes');
			if (window.focus) {oNewWindow.focus()}
		}
		//*****************************************
		//*****************************************
		function updateTime( loElementQualifier ) {
			loHourElement=$(loElementQualifier+'-hour');
			llConstituents=(loHourElement)?(true):(false);
			loMinuteElement=$(loElementQualifier+'-minute');
			llConstituents=(loMinuteElement)?(true):(false);
			loMeridianElement=$(loElementQualifier+'-meridian');
			llConstituents=(loMeridianElement)?(true):(false);
			var loElement = $(loElementQualifier+'_time');
			llConstituents=(loElement)?(true):(false);
			if (!llConstituents) {
				return false;				
			} else {
				lsHour=loHourElement.options[loHourElement.selectedIndex].value;
				lsMinute=loMinuteElement.options[loMinuteElement.selectedIndex].value;
				lsMeridian=loMeridianElement.options[loMeridianElement.selectedIndex].value;
				lsTime = lsHour + ':' + lsMinute + ' ' + lsMeridian;
				loElement.value=lsTime;
				return true;
			}
		}
		//*****************************************
		//*****************************************
		function formatThisDate(loDateField) { //pg formatted timestamp as expected input -(haxxors for datepicker weirdness)
			if (!$(loDateField)){return false;}
			lsMM_DD_YYYY = $(loDateField).value;
			lsMM_DD_YYYY = lsMM_DD_YYYY.substring(0, 10);			
			lsMM_DD_YYYY = lsMM_DD_YYYY.substring(5, 7) + '-' + lsMM_DD_YYYY.substring(8, 10) + '-' + lsMM_DD_YYYY.substring(0, 4); 
			$(loDateField).value=lsMM_DD_YYYY;
		}
		//*****************************************
		
		var scrollUpInterval;
		var scrollDownInterval;
		var oScrollDiv;
		//*****************************************
		function scrollUp(iElementId, iJumpRate, iRate) {
			if (scrollUpInterval != null) {
				return;	
			}
			oScrollDiv = document.getElementById(iElementId);
			scrollUpInterval = window.setInterval("oScrollDiv.scrollTop-="+iJumpRate, iRate);
		}
		//*****************************************
		
		//*****************************************
		function scrollDown(iElementId, iJumpRate, iRate) {
			if (scrollDownInterval != null) {
				return;	
			}
			oScrollDiv = document.getElementById(iElementId);
			scrollDownInterval = window.setInterval("oScrollDiv.scrollTop+="+iJumpRate, iRate);
		}
		//*****************************************
		
		//*****************************************
		function scrollStop() {
			if (scrollUpInterval != null) {
				window.clearInterval(scrollUpInterval);
				scrollUpInterval = null;
			}
			if (scrollDownInterval != null) {
				window.clearInterval(scrollDownInterval);	
				scrollDownInterval = null;
			}
		}
		//*****************************************
