﻿function DropDown_Change(SelectField, OtherField, textVisibleStyle, textHiddenStyle) 
{
    var indexNum = SelectField.selectedIndex;
	if (SelectField[indexNum].text.toLowerCase() == 'other')
		MM_findObj(OtherField).className = textVisibleStyle;
	else 
	{
		MM_findObj(OtherField).className = textHiddenStyle;
		MM_findObj(OtherField).value = "";
	}
}


function ValidateHowDidYouHearSelection(ddl, other)
{
    argsIsValid = true;
    
    if((ddl != null) && (other != null))
    {
        if(ddl.options[ddl.selectedIndex].text.toLowerCase() == "other")
            if (other.value.length == 0)
                argsIsValid = false;
    }
    else
        argsIsValid = false;
    
    return argsIsValid;
}