﻿var divArray = new Array();
divArray[0] = "noConfirm";
divArray[1] = "noMagazine";
divArray[2] = "noInvoice";
divArray[3] = "orderAbroad";
divArray[4] = "quit";
divArray[5] = "question";
divArray[6] = "coop";
divArray[7] = "suggestion";
divArray[8] = "giftCard";

function Question(strId) {

    $.each(divArray, function (key, value) {
        $('#' + value).css('display', 'none');        
    });


    if (strId != "x") {
        document.getElementById(strId).style.display = 'inline';
    }
    if (strId == "quit" || strId == "noInvoice" || strId == "noMagazine")
        document.getElementById('magSelect').style.display = 'inline';
    else
        document.getElementById('magSelect').style.display = 'none';

}

function Title(intValue, intText) {
    switch (intText) {
        case 0:
            document.getElementById("noMagCon").innerHTML = Magazine(intValue, intText);
            break;
        case 1:
            document.getElementById("noInvoiceCon").innerHTML = Magazine(intValue, intText);
            break;
        case 2:
            document.getElementById("quitCon").innerHTML = Magazine(intValue, intText);
            break;
        default:
            document.getElementById("noMagCon").innerHTML = Magazine(intValue, intText);
    }
}



function GetContactInfo(divId, intProductId)//, intProductId)
{
    var question = $("#ddlQuestion").val();
    /*

    new Ajax.Updater(divId, '/service/CSService.aspx',
    { parameters:
    {
        q: $("ddlQuestion").value
    , intProductId: intProductId
    
    }
});
*/
$.ajax({
    url: '/service/CSService.aspx',
    data: { intProductId: intProductId, q: $('#ddlQuestion').val() },
    type: 'POST',
    success: function (data) {
        $('#' + divId).html(data);
    }
});


}
