// Need to set this variable so Talisma can read lang as a custom variable talCustProp = "lang=" + proactive_lang; var isProactiveEnglish = (proactive_lang == "fr") ? false : true; // English by default if proactive_lang is invalid var proactiveLangAbbr = isProactiveEnglish ? "en" : "fr"; var isStartPage = false try { isStartPage = (proactive_invite == "startpage") ? true : false; } catch (e) {} var cssFilename = "css/proactive.css"; var jsFilename = "js/proactive.js"; if (isStartPage) { cssFilename = "css/proactive_start_" + proactiveLangAbbr + ".css"; jsFilename = "js/proactive_start.js"; } var featureNameArray = ["Mail", "Security", "Account", "Wireless"]; var enFeatureValueArray = ["mail", "security", "account", "wireless"]; var frFeatureValueArray = ["courriel", "sécurité", "compte", "sans-fil"]; var featureValueArray = (proactive_lang == "fr") ? frFeatureValueArray : enFeatureValueArray; // Outputs html for proactive chat function createProactiveHtml() { var popupwinDiv = oPopup; // oPopup is defined in parent vbscript //var popupwinDiv = document.createElement("div"); //popupwinDiv.id = "popupwin"; //popupwinDiv.style.display = "none"; //popupwinDiv.style.display = "block"; //document.body.appendChild(popupwinDiv); var popupwinDivHtml = ''; if (isStartPage) { // Update position popupwinDiv.style.left = "180px"; popupwinDiv.style.top = "150px"; // Set background var popupWinBgUrl = prefix + 'invite_images/popup_bg_startpage_' + proactiveLangAbbr + '.gif'; popupwinDiv.style.backgroundImage = 'url(' + popupWinBgUrl + ')'; // Language-based feature labels var featureLabels; if (isProactiveEnglish) { featureLabels = ["Your Bell Mail", "Your Bell Internet Security", "Your Account Details", "Your Wireless Home Network"]; } else { featureLabels = ["Votre Courriel Bell", "Vos services de sécurité Bell Internet", "Les détails de votre compte", "Votre réseau sans fil à domicile"]; } popupwinDivHtml = ''; popupwinDivHtml += '
';
popupwinDivHtml += '' + "\n";
popupwinDivHtml += '
';
popupwinDivHtml += '' + "\n";
popupwinDivHtml += '
';
popupwinDivHtml += '\n';
}
try {
if (popupwinDiv != null) {
popupwinDiv.innerHTML = popupwinDivHtml;
}
} catch (err) {
}
}
function Accept() {
var now = new Date();
// Prepare csv string for selected feature
var selectedfeatures = "";
var proactiveFormObj = document.getElementById("proactiveForm");
if (proactiveFormObj != null) {
var delimeter = "";
for (var i = 0; i < proactiveFormObj.elements.length; i++) {
var formElem = proactiveFormObj.elements[i];
if (formElem.type == "checkbox" && formElem.checked) {
selectedfeatures += delimeter + formElem.value;
delimeter = ",";
}
}
}
// Prepare URL
var paramHash = new Array();
paramHash["cmd"] = "5";
paramHash["rand"] = now.getTime();
paramHash["lang"] = filterNullValues(proactive_lang);
paramHash["selectedfeatures"] = filterNullValues(selectedfeatures);
try { paramHash["fname"] = filterNullValues(proactive_fname); } catch(e) {}
try { paramHash["lname"] = filterNullValues(proactive_lname); } catch(e) {}
try { paramHash["custid"] = filterNullValues(proactive_custid); } catch(e) {}
try { paramHash["phone"] = filterNullValues(proactive_phone); } catch(e) {}
var url = prefix + "SetCookieDataAndProcess.aspx";
var delimiter = "?";
for (var key in paramHash) {
url += delimiter + key + "=" + encodeURIComponent(paramHash[key]);
delimiter = "&";
}
// Open window
var options = "menubar=no,toolbar=no,scrollbars=no,resizable=no,width=580,height=500";
var oWin = window.open(url, "windowName", options);
if (oWin != null && typeof(oWin) == "object") {
hideInvite(true);
} else {
PortalBlocked();
}
}
function filterNullValues(str) {
if (str == null) str = "";
return str;
}
function popInvite() {
var dt = new Date(2999, 1, 1);
var dtT = new Date();
var dtToday = dtT.toUTCString();
setCookie("LastInvite", dtToday, dt);
lastInviteCookie = getDateStringFromUTCString(dtToday);
wcEnabledInv = (na_pro_img.height == 2) && (sessWin == 'n') && (typeof(g_theWCObj) == 'object');
var popupwinDiv = document.getElementById("popupwin");
popupwinDiv.style.display = "block";
var now = new Date();
na_pro_img2.src = prefix + 'Visitor.aspx?cmd=3&rand=' + now.getTime();
window.focus();
}
function isIE() {
return /msie/i.test(navigator.userAgent) && !/opera/i.test(navigator.userAgent);
}
function loadCssFile(filename) {
filename = prefix + filename;
if (isIE()) {
// IE requires you to use the DOM for dynamic css includes
var linkElem = document.createElement("link");
linkElem.setAttribute("rel", "stylesheet");
linkElem.setAttribute("type", "text/css");
linkElem.setAttribute("href", filename);
document.getElementsByTagName("head")[0].appendChild(linkElem);
} else {
document.write('<\/script>');
}
// Set background images
}
function loadJsFile(filename) {
filename = prefix + filename;
if (isIE()) {
// IE requires you to use the DOM for dynamic javascript includes
var linkElem = document.createElement("script");
linkElem.setAttribute("type", "text/javascript");
linkElem.setAttribute("src", filename);
document.getElementsByTagName("head")[0].appendChild(linkElem);
} else {
document.write('