	// The following is the script for the main drop-downs 

var longRef = "document.forms.form";

function displayOrHideFormSection(formSection)
{
	if (document.getElementById(formSection).style.display == 'block')
	{
		hideFormSection(formSection);
	}
	else
	{
		displayFormSection(formSection);
	}
}
	
function showAllRows()
{
    var elementList = document.getElementById('products').getElementsByTagName("TR");

    for (i=0; i < elementList.length; i++)
    {   
        if ((elementList[i].getAttribute("id") != null)&&(elementList[i].getAttribute("id") != ""))
        {
            var formRow = elementList[i].getAttribute("id");
            displayFormRow(formRow);
            changeImage(formRow, (formRow + '_img'));
        }      
    }
    document.getElementById('allRows').innerHTML = "<a href=\"javascript:hideAllRows();\" style=\"font-size: 10px; color: #999999\">&raquo;  Hide All</a></span>";

}	

function hideAllRows()
{
    var elementList = document.getElementById('products').getElementsByTagName("TR");

    for (i=0; i < elementList.length; i++)
    {
        if ((elementList[i].getAttribute("id") != null)&&(elementList[i].getAttribute("id") != ""))
        {
            var formRow = elementList[i].getAttribute("id");
            hideFormRow(formRow);
            changeImage(formRow, (formRow + '_img'));
        }      
    }
    document.getElementById('allRows').innerHTML = "<a href=\"javascript:showAllRows();\" style=\"font-size: 10px; color: #999999\">&raquo;  Show All</a></span>";
}
	
function displayOrHideFormRow(formRow)
{
	//var curDate = new Date();
	//var currentTimestamp = curDate.getTime();
	//if ( (currentTimestamp - lastTimestamp) > 400)
	//{
		if ((document.getElementById(formRow).style.display == 'table-row')||(document.getElementById(formRow).style.display == ''))
		{
			hideFormRow(formRow);
		}
		else
		{
			displayFormRow(formRow);
		}
	//	lastTimestamp = currentTimestamp;
	//}
}

function displayFormSection(formSection)
{
	document.getElementById(formSection).style.display = 'block';
}

function displayFormRow(formRow)
{   
    // set to default for browser.
    // Mozilla will interpret this as 'table-row'
    // IE will interpret this as block 
    // (IE does not support 'table-row' as a display value)
	document.getElementById(formRow).style.display = '';
	document.getElementById(formRow).style.border = '0px solid red';
}

function hideFormSection(formSection)
{
	document.getElementById(formSection).style.display = 'none';
}
	
function hideFormRow(formRow)
{
	document.getElementById(formRow).style.display = 'none';
}

function displayOrHideBorderRow(formCell)
{
	if (document.getElementById(formCell).style.borderBottomWidth == '0px')
	{
		displayBorderRow(formCell);
	}
	else
	{
		hideBorderRow(formCell);
	}
}

function displayBorderRow(formCell)
{
	document.getElementById(formCell).style.borderBottomWidth='1px';
	document.getElementById(formCell).style.borderBottomStyle='solid';
	document.getElementById(formCell).style.borderBottomColor='#CCCCCC';
}

function hideBorderRow(formCell)
{
	document.getElementById(formCell).style.borderBottomWidth='0px';
}

var searchStr = 'Search This Site';

function cleanSASearch() 
{
	document.search.query.onfocus = function() {if (this.value == searchStr) this.value = ''};
	document.search.query.onblur = function() {if (this.value == '') this.value = searchStr};
}

var searchStr = 'Search This Site';
	
addEvent(window, "load", cleanSearch, false);
addEvent(window, "load", function() {enableDropdown('utilities')}, false);
addEvent(window, "load", function() {enableDropdown('nav')}, false);

function changeImage(formSection, img_id)
{
	if (document.getElementById(formSection).style.display != 'none')
	{
		
	    document.getElementById(img_id).src = './images/btn.hide.details.gif';
	}
	else
	{
	    document.getElementById(img_id).src = './images/btn.more.details.gif';
	}
}

function changeLink(formSection, link)
{
	if (document.getElementById(formSection).style.display == 'block')
	{
		
	    document.getElementById(link).innerHTML = '(Hide)';
	}
	else
	{
	    document.getElementById(link).innerHTML = '(Specifications)';
	}
}



/*
	// The following is the script for the internal drop-downs
	
<script>
	function displayOrHideifForm()
	{ 
		if(document.wlapfeedback.utilized[0].checked)    // yes
		{
			hideifForm('first_question'); hideifForm('if_No'); displayifForm('if_Yes');
		}
		else if (document.wlapfeedback.utilized[1].checked)    // no
		{
			hideifForm('first_question'); hideifForm('if_Yes'); displayifForm('if_No');
		}
		else
		{
			displayifForm('first_question'); hideifForm('if_Yes'); hideifForm('if_No');
		}
	} 

		
	
	function displayifForm(a)
	{
		document.getElementById(a).style.display = 'block';
	}
	
	
	function hideifForm(a)
	{
		document.getElementById(a).style.display = 'none';
	}

</script>
*/
