function initializeChatbot(clientId, hostname) {
    const chatbotchatwindowiframe = document.getElementById("chatwindow");
    if (!chatbotchatwindowiframe) return;

    chatbotchatwindowiframe.onload = function () {
        chatbotchatwindowiframe.contentWindow.postMessage(
            {
                action: "setsession",
                clientId: clientId,
                hostname: hostname
            },
            "https://chatbot.onlinevidyalaya.net"
        );
    };
}