function txtInput_OnFocus(event, elementId){
	var txtObj = document.getElementById(elementId);
	if(txtObj.value == txtObj.getAttribute("defaultvalue")){
		txtObj.className = "objInitialInput txtInput";
		txtObj.value = "";
	}
}

function txtInput_OnBlur(event, elementId){
	
	var txtObj = document.getElementById(elementId);
	if(txtObj.value == ""){
		txtObj.className = "objInitialInput txtInputDefault";
		txtObj.value = txtObj.getAttribute("defaultvalue");
	}
}

function txtExecName_OnClick(event){
	var txtObj = document.getElementById("txtExecCompany");
	txtObj.disabled = "disabled";
	txtObj.value = "";
	
	txtObj = document.getElementById("lblExecCompany");
	txtObj.className = "Grayout";
	
	txtObj = document.getElementById("txtExecName");
	txtObj.className = "txtInput";
	txtObj.value = "";
	
	txtObj = document.getElementById("sel_ExecCompany_0");
	txtObj.className = "clickable_text_inactive";

	txtObj = document.getElementById("sel_ExecCompany_1");
	txtObj.className = "clickable_text_inactive";
	
	txtObj = document.getElementById("txtExecCompany");
	txtObj.disabled = "disabled";
	txtObj.value = "";
	
	txtObj = document.getElementById("lblExecCompany");
	txtObj.className = "Grayout";
	
	document.mainform.istickersymbol.value = 0;
	document.getElementById("rdbSearchCat_0").checked = true;
	document.getElementById("rdbSearchCat_1").checked = false;
}

function txtExecCompany_OnClick(event){

	var txtObj = document.getElementById("txtExecName");
	txtObj.disabled = "disabled";
	txtObj.value = "";
	
	txtObj = document.getElementById("lblExecName");
	txtObj.className = "Grayout";
	
	txtObj = document.getElementById("txtExecCompany");
	txtObj.className = "txtInput";
	txtObj.value = "";
	
	document.getElementById("rdbSearchCat_1").checked = true;
	document.getElementById("rdbSearchCat_0").checked = false;
}

function selectSearchCat(event, elementId)
{
	var txtObj;

	if (elementId == "rdbSearchCat_0")
	{
		txtObj = document.getElementById("lblExecName");
		txtObj.className = "";
		
		txtObj = document.getElementById("txtExecName");
		txtObj.disabled = "";
	
		txtObj = document.getElementById("txtExecCompany");
		txtObj.disabled = "disabled";
		txtObj.value = "";
		
		txtObj = document.getElementById("lblExecCompany");
		txtObj.className = "Grayout";
		
		txtObj = document.getElementById("sel_ExecCompany_0");
		txtObj.className = "clickable_text_inactive";

		txtObj = document.getElementById("sel_ExecCompany_1");
		txtObj.className = "clickable_text_inactive";
		document.mainform.istickersymbol.value = 0;
	}
	else
	{
		txtObj = document.getElementById("lblExecCompany");
		txtObj.className = "";
		
		txtObj = document.getElementById("txtExecCompany");
		txtObj.disabled = "";
		
		txtObj = document.getElementById("txtExecName");
		txtObj.disabled = "disabled";
		txtObj.value = "";
		
		txtObj = document.getElementById("lblExecName");
		txtObj.className = "Grayout";
		
		txtObj = document.getElementById("sel_ExecCompany_0");
		txtObj.className = "clickable_text_active";

		txtObj = document.getElementById("sel_ExecCompany_1");
		txtObj.className = "clickable_text";	
		document.mainform.istickersymbol.value = 0;
	}
	
}

function clickNameOrTicker(event, IsSelectTicker)
{

	var txtObj;
	if (IsSelectTicker == 1)
	{
		document.mainform.istickersymbol.value = 1;
		txtObj = document.getElementById("sel_ExecCompany_0");
		txtObj.className = "clickable_text";

		txtObj = document.getElementById("sel_ExecCompany_1");
		txtObj.className = "clickable_text_active";
		
		txtObj = document.getElementById("txtExecCompany");
		txtObj.disabled = "";
		txtObj.value = "ie: MSFT";
		txtObj.className = "txtInputDefault";
		
	}
	else
	{
		document.mainform.istickersymbol.value = 0;
		txtObj = document.getElementById("sel_ExecCompany_0");
		txtObj.className = "clickable_text_active";

		txtObj = document.getElementById("sel_ExecCompany_1");
		txtObj.className = "clickable_text";
		
		txtObj = document.getElementById("txtExecCompany");
		txtObj.disabled = "";
		txtObj.value = "ie: Microsoft";
		txtObj.className = "txtInputDefault";
	}
	
	document.getElementById("rdbSearchCat_1").checked = true;
	document.getElementById("rdbSearchCat_0").checked = false;
	txtObj = document.getElementById("lblExecCompany");
	txtObj.className = "";
	
	
	txtObj = document.getElementById("txtExecName");
	txtObj.disabled = "disabled";
	txtObj.value = "";
	
	txtObj = document.getElementById("lblExecName");
	txtObj.className = "Grayout";
}



function searchExecInfo()
{
	var strExecNameKeyword = "";
	var strCompanyKeyword = "";
	var bIsTickerSymbol = 0;
	var txtObj;
	
	strExecNameKeyword = trim(document.mainform.txtExecName.value);
	strCompanyKeyword = trim(document.mainform.txtExecCompany.value);
	if (strExecNameKeyword == "ie: Steven A. Ballmer")
		strExecNameKeyword = "Steven A. Ballmer";
	
	if (strCompanyKeyword == "ie: Microsoft")
		strCompanyKeyword = "Microsoft";
	else if (strCompanyKeyword == "ie: MSFT")
		strCompanyKeyword = "MSFT";
		
	if(strExecNameKeyword == ""  && strCompanyKeyword == "")
	{
		alert("Please enter an Executive Name, Company Name or Ticker Symbol to search.");
		document.mainform.txtExecName.focus();
		return false;
	}

	document.mainform.txtExecName.value = strExecNameKeyword;
	document.mainform.txtExecCompany.value = strCompanyKeyword;

	return true;
}
