﻿try {

    suggestAddress = function() { };

    var div = document.createElement('div');

    $('dvAddressCongratulations').innerHTML = '<h3 style="display:inline">Congratulations! Offers are available for your address:</h3>' + getAddressString(Address) + '<br/><br/><p>Specially-trained ATT representatives are standing by to take your calls and provide you with all of your options, to ensure that your ATT purchases best suits your needs.</p><br />' +
            '<div class="service">' +
                '<div class="service_text">' +
                '<span class="subtitle">By calling ' + getPhoneNumber() + ' now, you will be able to:</span>' +
                    '<ul>' +
                        '<li>Sign up now and receive exclusive savings on phone, Internet, and TV services.</li>' +
                        '<li>Get additional ATT services\' questions answered.</li>' +
                    '</ul>' +
                   'Call us today to take advantage of ATT special offers available exclusively for you.' +
                '</div>' +
                '<div class="service_img">' +
                '</div>' + '<span id="lblAddressAvailable" style="disply:none;"> </span>' +
    '</div>';

    $('dvAddressNotFound').innerHTML = '<div>' +
                '<span class="test">Sorry, AT&T offers are not available in your area. Please give us a call at ' + getPhoneNumber() + ' and we will find the providers and offers available in our area.</span>' +
                '</div>';

    $('yuiDataTable').style.display = 'none';
    $('dvFilter').style.display = 'none';
    $('dvAddressAvailable').style.display = 'none';
    $('dvShoppingCart').style.display = 'none';
}
catch (Error) { };

function getAddressString(a) {
    var AddressString = "";

    AddressString += a.Address1;
    if (a.Address2 != "") {
        AddressString += ", " + a.Address2;
    }
    AddressString += ", " + a.City + ", " + a.State + ", " + a.Zip;

    return AddressString;
}