function updateCharacterCount()
{
    maxCharacters = 100;
    count = questionTextBox.value.length;
    document.getElementById("characterCount").innerHTML = maxCharacters - count;
	
    if (count >= maxCharacters)
    {
        questionTextBox.value = questionTextBox.value.substring(0, maxCharacters - 1);
    }
}

function setSearchTab(tabName)
{
    questionsTab = document.getElementById("searchQuestions");
    solutionsTab = document.getElementById("searchSolutions");
    expertsTab = document.getElementById("searchExperts");
    questionsTab.style.backgroundColor = "#FFFFFF";
    solutionsTab.style.backgroundColor = "#FFFFFF";
    expertsTab.style.backgroundColor = "#FFFFFF";
	
    chosenTab = document.getElementById(tabName);
    if (chosenTab != null)
    {
        chosenTab.style.backgroundColor = "#E1E1E1";
    }
    else
    {
        solutionsTab.style.backgroundColor = "#E1E1E1";
        tabName = 'searchSolutions';
    }
	
    searchTypeTextBox.value = tabName;
}
