		//##########################
		//## Search Box Functions ##
		//##########################
		function ShowSearchBox(boxButton, boxField){
			var buttonCurrentValue = document.getElementById(boxButton);
			var fieldCurrentValue = document.getElementById(boxField);
			//Effect.Fade(boxButton, {duration:.3});
			//buttonCurrentValue.style.display = "none";
			if(fieldCurrentValue.style.display == "none"){
				Effect.BlindDown(boxField);
			}
			else{
				Effect.BlindUp(boxField);
			}
		}
		
		function disableTextBox(sourceValueName, targetTextBox){
			if(eval("document.form1."+sourceValueName+".value")=="other" || eval("document.form1."+sourceValueName+".value")=="Other"){
				//document.form1.sponsorName.disabled=false;
				document.getElementById(targetTextBox).style.visibility='visible';
			}
			else{
				//document.form1.sponsorName.disabled=true;
				document.getElementById(targetTextBox).style.visibility='hidden';
			}
		}

		function displayTextBox(sourceValueName, targetTextBox){
			if(eval("document.form1."+sourceValueName+".value")=="other" || eval("document.form1."+sourceValueName+".value")=="Other"){
				//document.form1.sponsorName.disabled=false;
				document.getElementById(targetTextBox).style.display='block';
			}
			else{
				//document.form1.sponsorName.disabled=true;
				document.getElementById(targetTextBox).style.display='none';
			}
		}
		
		function LOIDate(){
			if(document.form1.loi.value=="Required"){
				document.getElementById('LOIDate').style.visibility='visible';
			}
			else{
				document.getElementById('LOIDate').style.visibility='hidden';
			}			
		}
		
		function SubmissionDate(){
			if(document.form1.submission.value=="Limited (UNC)"){
				document.getElementById('SubmissionDate').style.visibility='visible';
			}
			else{
				document.getElementById('SubmissionDate').style.visibility='hidden';
			}			
		}
		
		//#####################################
		//## Show Full Description Functions ##
		//#####################################
		function DetailDesc(field_index, size){
			//alert(field_index);
			document.getElementById('part_purpose_field'+field_index).style.display="none";
			document.getElementById('full_purpose_field'+field_index).style.display="block";
			for(var i=0; i<size; i++){
				var part_field = 'part_purpose_field'+i;
				var full_field = 'full_purpose_field'+i;
				if(i != field_index){
					if(document.getElementById(full_field).style.display=="block"){
						document.getElementById(part_field).style.display="block";
						document.getElementById(full_field).style.display="none";
					}
				}
			}
			
		}


// function user added for toggling visibility; 
// modified to use jQuery & adjust heights on content/nav to match	
function toggleDiv(div, link, word)
{
    var x = $('#'+div);
    if(x.is(':hidden'))
    {
        $('#content').css('height','auto');
        x.show();
        $('#nav ul:first, #content').equalHeight();
        //link.innerHTML = 'Hide ' + word;
    } 
	else 
	{
        var h = $('#content').height() - x.height();
        x.hide();
        $('#nav ul:first, #content').height(h);
        //link.innerHTML = 'Show ' + word;
    }
}

