﻿function heightTest(arg) {
    var LiveChat;
    var ClickToCall = document.getElementById('dvClickToCall');
    
    if (liveChatClientID) {
        LiveChat = document.getElementById(liveChatClientID);
    } 
    else {
        LiveChat = document.getElementById('dvLiveChat');
    }
    
    if (arg != null) {
        if (arg.clientHeight < 2) {
            if (LiveChat != null) {
                LiveChat.style.paddingRight = 0;
            }
        }
        else {
            if (LiveChat != null) {
                if (navigator.userAgent.indexOf('Firefox') > -1) {
                    if (ClickToCall != null) {
                        ClickToCall.style.paddingLeft = "5.5px";
                    }
                }
                else if (navigator.userAgent.indexOf('MSIE') > -1) {
                    LiveChat.style.paddingRight = 4;
                }
                else if (navigator.userAgent.indexOf('Safari') > -1) {
                    if (ClickToCall != null) {
                        ClickToCall.style.paddingLeft = "5.5px";
                    }
                }
                else
                {
                    if (ClickToCall != null) {
                        ClickToCall.style.paddingLeft = "5.5px";
                    }
                }
            }
        }
    }
}

function launchChatNow() {
    pixel_conversion(1879)
    window.open('/contact/ChatNow', 'this','width=435, height=417', false); 
    return false;
}

function launchChatNow(state) {
    pixel_conversion(1879)
    window.open('/contact/ChatNow.aspx?state=' + state, 'this', 'width=435, height=417', false);
    return false;
}

function launchChatNow(state, market) {
    pixel_conversion(1879)
    window.open('/contact/ChatNow.aspx?state=' + state +'&mktid='+market, 'this', 'width=487, height=430', false);
    return false;
}

