// JScript source code
function submitSearchForm()
{
	if(document.equitySearch.action == "/app/equityList.asp")
	{
		document.equitySearch.equityName.value = document.submitForm.S_WORD_ALL.value
		document.equitySearch.submitForm.submit()
	}
	else if(document.fundSearch.action == "/app/fundList.asp")
	{
		document.fundSearch.SEARCH_WORD.value = document.submitForm.S_WORD_ALL.value
		document.fundSearch.submitForm.submit()
	}
	else if(document.specSearch.action == "/app/specSecList.asp")
	{
		document.specSearch.search_word.value = document.submitForm.S_WORD_ALL.value
		
	}
	else
	{
		document.submitForm.submit()
	}
	
}

function ssChanged()
{
	if(document.all.S_IN_SS.checked == true)
	{
		document.all.S_IN_CONTENT.checked = false
		document.all.S_IN_TITLE.checked = false
		document.all.S_IN_SUM.checked = false
		document.all.S_IN_META.checked = false
		document.all.S_IN_CONTENT.disabled = true
		document.all.S_IN_TITLE.disabled = true
		document.all.S_IN_SUM.disabled = true
		document.all.S_IN_META.disabled = true
		if(document.all.S_IN_FUND.checked == true)
		{
			document.all.S_IN_FUND.checked = false
		}
		if(document.all.S_IN_EQUITY.checked == true)
		{
			document.all.S_IN_EQUITY.checked = false
		}
		document.all.submitForm.action = "/app/specSecList.asp"
	}
	else
	{
		document.all.S_IN_CONTENT.disabled = false
		document.all.S_IN_TITLE.disabled = false
		document.all.S_IN_SUM.disabled = false
		document.all.S_IN_META.disabled = false
		
		document.all.S_IN_CONTENT.checked = true
		document.all.S_IN_TITLE.checked = true
		document.all.submitForm.action = "searchAdvanced.asp"	
	}
}

function fundChanged()
{
	if(document.all.S_IN_FUND.checked == true)
	{
		document.all.S_IN_CONTENT.checked = false
		document.all.S_IN_TITLE.checked = false
		document.all.S_IN_SUM.checked = false
		document.all.S_IN_META.checked = false
		document.all.S_IN_CONTENT.disabled = true
		document.all.S_IN_TITLE.disabled = true
		document.all.S_IN_SUM.disabled = true
		document.all.S_IN_META.disabled = true
		if(document.all.S_IN_SS.checked == true)
		{
			document.all.S_IN_SS.checked = false
		}
		if(document.all.S_IN_EQUITY.checked == true)
		{
			document.all.S_IN_EQUITY.checked = false
		}
		document.all.submitForm.action = "/app/fundList.asp"
	}
	else
	{
		document.all.S_IN_CONTENT.disabled = false
		document.all.S_IN_TITLE.disabled = false
		document.all.S_IN_SUM.disabled = false
		document.all.S_IN_META.disabled = false
		document.all.S_IN_CONTENT.checked = true
		document.all.S_IN_TITLE.checked = true
		document.all.submitForm.action = "searchAdvanced.asp"	
	}
}

function equityChanged()
{
	if(document.all.S_IN_EQUITY.checked == true)
	{
		document.all.S_IN_CONTENT.checked = false
		document.all.S_IN_TITLE.checked = false
		document.all.S_IN_SUM.checked = false
		document.all.S_IN_META.checked = false
		document.all.S_IN_CONTENT.disabled = true
		document.all.S_IN_TITLE.disabled = true
		document.all.S_IN_SUM.disabled = true
		document.all.S_IN_META.disabled = true
		if(document.all.S_IN_SS.checked == true)
		{
			document.all.S_IN_SS.checked = false
		}
		if(document.all.S_IN_FUND.checked == true)
		{
			document.all.S_IN_FUND.checked = false
		}
		document.all.submitForm.action = "/app/equityList.asp"
	}
	else
	{
		document.all.S_IN_CONTENT.disabled = false
		document.all.S_IN_TITLE.disabled = false
		document.all.S_IN_SUM.disabled = false
		document.all.S_IN_META.disabled = false
		document.all.S_IN_CONTENT.checked = true
		document.all.S_IN_TITLE.checked = true
		document.all.submitForm.action = "searchAdvanced.asp"	
	}
}

