/* Templates */
function menuItemHover(element, isOver)
{
    var className = "DropDownNav";
    if (isOver)
    {
        className += "Hover";
    }
    element.className = className;
}

function NavImage_MouseEvent(navImage)
{
    if (navImage.src.indexOf("on.gif") > -1)
    {
        navImage.src = navImage.src.replace("on.gif", "off.gif");
    }
    else
    {
        navImage.src = navImage.src.replace("off.gif", "on.gif");
    }
}

function QuoteTypeDropDown_Change(quoteTypeDropDown)
{
    var url = quoteTypeDropDown.options[quoteTypeDropDown.selectedIndex].value
    
    if(url.match("http:") || url.match("https:"))
    {
           window.location = url;
    }
    else
    {
        if (quoteTypeDropDown.options[quoteTypeDropDown.selectedIndex].value != "-")
        {
            window.location = "/TopNav/"
                + quoteTypeDropDown.options[quoteTypeDropDown.selectedIndex].value
                + ".aspx";
        }
    }
    

    
}

/* Modules */
function DateTextBox_Blur(dateTextBox)
{
    if (dateTextBox.value == "__/__/____")
    {
        dateTextBox.value = "";
    }
}

function PhoneTextBox_Click(phoneTextBox)
{

    if (phoneTextBox.value == "(___) ___-____")
    {
        phoneTextBox.value = "";
    }
}

function SsnTextBox_Click(ssnTextBox)
{
    if (ssnTextBox.value == "___-__-____")
    {
        ssnTextBox.value = "";
    }
}

/* HomeQuoteRequest */
function AlsoNeedCoverageForCheckBoxList_Click(checkBox, textBox)
{
    document.getElementById(homeQuoteRequestCntl + textBox).className
        = checkBox.checked ? "visible" : "hidden";
}
