﻿var oldPanel = "RFQ";

function changeCountry() {

    if ($fo("Country").value != "UNITED STATES") {
        $fo("State").disabled = true;
    }
    else
        $fo("State").disabled = false;
}

//$fo("Country").onchange = changeCountry;
//changeCountry();

function $fo(id) {
    return document.getElementById(id);
}

function togglePanel(id) {

    setPanelClass(oldPanel, false);
    oldPanel = id;
    setPanelClass(id, true);
    
}


function validatorToggle(validatorID) {
}

function setPanelClass(panelId, expanded)
{
    $fo(panelId+"_Header").setAttribute("class", "RFQ_Panel_Header"+(expanded?"_Expanded":""));
    $fo(panelId+"_Header").setAttribute("className", "RFQ_Panel_Header"+(expanded?"_Expanded":"")); 
    
    $fo(panelId).setAttribute("class", "RFQ_Panel_Body"+(expanded?"_Expanded":""));
    $fo(panelId).setAttribute("className","RFQ_Panel_Body"+(expanded?"_Expanded":""));
}

function getCaptcha(imgID) {
    $fo(imgID).onload = null;
    $fo("CaptchaInput").value = "";
    $fo(imgID).src = "http://72.44.170.90:8081/getcaptcha.aspx?bc="+Math.random();
}