var project_slideSpeed = 4000;	// Higher value = faster
				var project_timer = 0;	// Lower value = faster

				var objectIdToSlideDown = false;
				var project_activeId = false;
				var project_slideInProgress = false;
				function showHideContent(e,inputId)
				{
					if(project_slideInProgress)return;
					project_slideInProgress = true;
					if(!inputId)inputId = this.id;
					inputId = inputId + '';
					var numericId = inputId.replace(/[^0-9]/g,'');
					var blockDiv = document.getElementById('project_a' + numericId);

					objectIdToSlideDown = false;

					if(!blockDiv.style.display || blockDiv.style.display=='none'){
						if(project_activeId &&  project_activeId!=numericId){
							objectIdToSlideDown = numericId;
							slideContent(project_activeId,(project_slideSpeed*-1));
						}else{

							blockDiv.style.display='block';
							blockDiv.style.visibility = 'visible';

							slideContent(numericId,project_slideSpeed);
						}
					}else{
						slideContent(numericId,(project_slideSpeed*-1));
						project_activeId = false;
					}
				}

				function slideContent(inputId,direction)
				{

					var obj =document.getElementById('project_a' + inputId);
					var contentObj = document.getElementById('project_ac' + inputId);
					height = obj.clientHeight;
					if(height==0)height = obj.offsetHeight;
					height = height + direction;
					rerunFunction = true;
					if(height>contentObj.offsetHeight){
						height = contentObj.offsetHeight;
						rerunFunction = false;
					}
					if(height<=1){
						height = 1;
						rerunFunction = false;
					}

					obj.style.height = height + 'px';
					var topPos = height - contentObj.offsetHeight;
					if(topPos>0)topPos=0;
					contentObj.style.top = topPos + 'px';
					if(rerunFunction){
						setTimeout('slideContent(' + inputId + ',' + direction + 
')',project_timer);
					}else{
						if(height<=1){
							obj.style.display='none';
							if(objectIdToSlideDown && objectIdToSlideDown!=inputId){
								document.getElementById('project_a' +
objectIdToSlideDown).style.display='block';
								document.getElementById('project_a' +
objectIdToSlideDown).style.visibility='visible';
								slideContent(objectIdToSlideDown,project_slideSpeed);
							}else{
								project_slideInProgress = false;
							}
						}else{
							project_activeId = inputId;
							project_slideInProgress = false;
						}
					}
				}



				function initShowHideDivs()
				{
					var divs = document.getElementsByTagName('DIV');
					var divCounter = 1;
					for(var no=0;no<divs.length;no++){
						if(divs[no].className=='project_header'){
							divs[no].onclick = showHideContent;
							divs[no].id = 'project_q'+divCounter;
							var block = divs[no].nextSibling;
							while(block && block.tagName!='DIV'){
								block = block.nextSibling;
							}
							block.id = 'project_a'+divCounter;
							contentDiv = block.getElementsByTagName('DIV')[0];
							contentDiv.style.top = 0 - contentDiv.offsetHeight + 'px';
							contentDiv.className='project_block_content';
							contentDiv.id = 'project_ac' + divCounter;
							block.style.display='none';
							block.style.height='1px';
							divCounter++;
						}
					}
				}
				window.onload = initShowHideDivs;
				
sfHover = function() {
				var sfEls =
document.getElementById("nav").getElementsByTagName("LI");
				for (var i=0; i<sfEls.length; i++) {
					sfEls[i].onmouseover=function() {
						this.className+=" sfhover";
					}
					sfEls[i].onmouseout=function() {
						this.className=this.className.replace(new RegExp(" sfhover\\b"),
"");
					}
				}
			}
			if (window.attachEvent) window.attachEvent("onload", sfHover);				