function hide(e) {
    document.getElementById(e).style.display = "none"
    document.getElementById(e).style.visibility = "hidden"
}
function show(e) {
    document.getElementById(e).style.display = ""
    document.getElementById(e).style.visibility = ""
}

function selectCountryDropdown() {
    var country = document.getElementById("ddlCountry")
    var ind = country.selectedIndex
    var val = country.options[ind].value
    if (val == "USA") {
        //alert("USA")
        hide('rowCAProvinces')
        hide('rowBRStates')
        show('rowUSStates')
    } else if (val == "Canada") {
        //alert("Canada")
        hide('rowUSStates')
        hide('rowBRStates')
        show('rowCAProvinces')
    } else if (val == "Brazil") {
        //alert("Brazil")
        hide('rowUSStates')
        hide('rowCAProvinces')
        show('rowBRStates')
    } else {
        hide('rowUSStates')
        hide('rowBRStates')
        hide('rowCAProvinces')
    }
}

function selectConfirmDropdown() {
    var confirm = document.getElementById("ddlConfirm")
    var ind = confirm.selectedIndex
    var val = confirm.options[ind].value
    if (val == "Email") {
        hide('spanFax')
        show('spanEmail')
    } else if (val == "Fax") {
        hide('spanEmail')
        show('spanFax')
    } else {
        hide('spanEmail')
        hide('spanFax')
    }
}

function selectServiceDropdown() {
    var service = document.getElementById("ddlService")
    var ind = service.selectedIndex
    var val = service.options[ind].value
    if (val == "Other") {
        show('spanComments')
    } else {
        hide('spanComments')
    }
}