function DeliverySubmit(cmd) {
    var hiddenField = document.getElementById("DeliverySubmitButtonSpan").getElementsByTagName("input")[1];
    hiddenField.value = "1";
    eval(cmd);
}
function DeliveryRadiochecked() {
    if (!(document.getElementById("DeliveryRepeaterTd") == null)) {
        var deliveryRadio = document.getElementById("DeliveryRepeaterTd").getElementsByTagName("input");
        var hiddenFieldStr = document.getElementById("DeliverySubmitButtonSpan").getElementsByTagName("input")[1].value;

        for (var i = 0; i < deliveryRadio.length; i++) {
            if (deliveryRadio[i].value == hiddenFieldStr) {
                deliveryRadio[i].checked = true;
                return;
            }
        }
    }
}
function MessageSubmit() {
    if (!(document.getElementById("messageSubmitSpan") == null)) {
        var isMessageSubmit = document.getElementById("messageSubmitSpan").getElementsByTagName("input")[0];
        isMessageSubmit.value = 1;
    }
}
function AddFavorite() {
    var sTitle = document.title;
    var sURL = document.location.href;
    try {
        window.external.addFavorite(sURL, sTitle);
    }
    catch (e) {
        try {
            window.sidebar.addPanel(sTitle, sURL, "");
        }
        catch (e) {
        }
    }
}
function ShowVoteOpen(id, language) {
    var url = "../ShowVoteResult.aspx?id=" + id + "&Language=" + language;
    var features = "width=" + screen.width - 100 + ",height=" + screen.height / 2 + ",scrollbars=yes,resizable=yes"
    var features = "width=700,height=500,scrollbars=yes,resizable=yes"
    var cartWindow = window.open(url, "cart", features, true);
    cartWindow.focus();
    return false;
}
function DeliveryClientSubmit(id, money_unit) {
    var money = id + ".00";
    var deliverymoney = document.getElementById("DeliveryMoney");
    deliverymoney.innerText = money_unit + money;

}
function radio(obj) {
    if (obj.checked && obj.value == "true") {
        document.getElementById('tr1').className = "show";
        document.getElementById('tr2').className = "show";
    }
    else {
        document.getElementById('tr1').className = "show";
        document.getElementById('tr2').className = "hide";
    }
}
function load(value) {

    var panel1 = document.getElementById('Search1_Product');
    var panel2 = document.getElementById('Search1_News');
    var panel3 = document.getElementById('Search1_Pic');
    if (value == 0) {
        panel1.style.display = '';
        panel2.style.display = 'none';
        panel3.style.display = 'none';
    }
    else {
        if (value == 1) {
            panel1.style.display = 'none';
            panel2.style.display = '';
            panel3.style.display = 'none';
        }
        else {
            panel1.style.display = 'none';
            panel2.style.display = 'none';
            panel3.style.display = '';

        }
    }
}
function load() {
    var ddl = document.getElementById('Search1_ddlCategory');
    var panel1 = document.getElementById('Search1_Product');
    var panel2 = document.getElementById('Search1_News');
    var panel3 = document.getElementById('Search1_Pic');
    if (ddl.value == 0) {
        panel1.style.display = '';
        panel2.style.display = 'none';
        panel3.style.display = 'none';
    }
    else {
        if (ddl.value == 1) {
            panel1.style.display = 'none';
            panel2.style.display = '';
            panel3.style.display = 'none';
        }
        else {
            panel1.style.display = 'none';
            panel2.style.display = 'none';
            panel3.style.display = '';
        }
    }
}