var totalFeatures = 0;
var FeatureObj = class FeatureObj {
constructor(category, options) {
this.id = totalFeatures;
totalFeatures++;
this.category = category;
this.options = options;
}
}
function initFeatures() {
var featuresO = [
{
category: "Security/Encryption",
options: [{
name: "Clear (No Encryption)",
question: 4,
value: 0
},
{
name: "TEA (Air Interface Encryption)",
question: 4,
value: 1
}, {
name: "AES 128 (End to End Encryption)",
question: 4,
value: 2
},
{
name: "AES 256 (End to End Encryption)",
question: 4,
value: 3
}]
},
{
category: "Coverage and Capacity Bundle",
options: [
{
name: `Functions designed to enhance connectivity of radios to the network in a dynamic environment`,
question: 5,
value: 0
}
]
},
{
category: "Safety and Security Bundle",
options: [
{
name: `Functions providing enhanced personnel safety and communications security features`,
question: 5,
value: 1
}
]
},
{
category: "Productivity and Efficiency Bundle",
options: [
{
name: `Functions to enhance call and fleet management`,
question: 5,
value: 2
}
]
},
{
category: "Bluetooth Capabilities Bundle",
options: [
{
name: `Functions to allow Bluetooth accessories and Bluetooth enabled capabilities to be used`,
question: 5,
value: 3
}
]
},
{
category: "Location Services Bundle",
options: [
{
name: `Functions to enable the location of radios and personnel`,
question: 5,
value: 4
}
]
},
{
category: "Data Services Bundle",
options: [
{
name: `Functions including data capabilities to improve effectiveness and efficiency`,
question: 5,
value: 5
}
]
},
{
category: "Accessories",
options: [
{
name: "Remote Speaker Microphone (RSM)",
question: 6,
value: 0
},
{
name: "Heavy Duty Headset",
question: 6,
value: 1
},
{
name: "Earpiece",
question: 6,
value: 2
},
{
name: "Carry Accessories",
question: 6,
value: 3
},
{
name: "Bluetooth Accessories",
question: 6,
value: 4
},
{
name: "Multi-Unit Chargers",
question: 6,
value: 5
}
]
},
{
category: "Performance Model",
options: [
{
name: "",
update: function () {
this.name = "All-Band Capable";
var tier = getModelTier();
if (tier == "Performance Tier") {
this.name = `
Class 3 Transmission Power</br>
Class 3L Transmission Power</br>
BT Audio</br>
GPS</br>
GNSS (Inc. Galileo, BeiDou, GLONASS)</br>
Car kit enablement</br>
WIFI OTAP</br>
Noise suppression</br>
Adaptive Acoustic Feedback`;
}
if (tier == "Power Tier") {
this.name =
`Class 3 Transmission Power</br>
Class 3L Transmission Power</br>
BT Audio</br>
GPS</br>
GNSS (Inc. Galileo, BeiDou, GLONASS)</br>
Car kit enablement`;
}
if (tier == "Primary Tier") {
this.name = `
Class 3L Transmission Power</br>
BT Audio</br>
GPS`;
}
},
question: 7,
value: [0,1,2,3,4,5,6,7,8,9]
},
]
},
{
category: "Coverage and Capacity Bundle",
options: [
{
name: "Functions designed to enhance connectivity of radios to the network in a dynamic environment",
question: 12,
value: 0
}
]
},
{
category: "Safety and Security Bundle",
options: [
{
name: "Functions providing enhanced safety and security features",
question: 12,
value: 1
}
]
},
{
category: "Productivity and Efficiency Bundle",
options: [
{
name: "Functions including data capabilities to improve effectiveness and efficiency",
question: 12,
value: 2
}
]
},
{
category: "Accessories",
options: [
{
name: "Remote Speaker Microphone (RSM)",
question: 13,
value: 0
},
{
name: "Earpiece",
question: 13,
value: 1
},
{
name: "Carry Accessories",
question: 13,
value: 2
},
{
name: "Bluetooth Accessories",
question: 13,
value: 3
},
{
name: "Car Kit Accessories",
question: 13,
value: 4
},
{
name: "Multi-Unit Chargers",
question: 13,
value: 5
}
]
}
];
var features = [];
for (var feature in featuresO) {
feature = featuresO[feature];
features.push(new FeatureObj(feature.category, feature.options));
}
return features;
}var totalRadios = 0;
var RadioObj = class RadioObj {
constructor(name, imageUrl, fullImageUrl, description, features, smallName) {
this.id = totalRadios;
totalRadios++;
this.name = name;
this.smallName = smallName;
this.disabled = false;
this.imageUrl = imageUrl;
this.fullImageUrl = fullImageUrl;
this.description = description;
this.features = features;
this._htmlId = `radio-${this.id}`;
}
render() {
if (this.id == 0) {
return `
<div class="radioContainer radioContainer-mtp8000" id="${this._htmlId}">
<div class="radioContent">
<div class="content">
<div class="leftContent">
<div class="image">
<img src="${this.getFullImageSrc(0)}" alt="${this.getName(0)}">
</div>
<div>
<div class="name">
${this.getName(0)}
</div>
<div class="description">
${this.getDescription(0)}
</div>
</div>
</div>
<div class="radioActions">
<a onclick="addToCart(${this.id})" data-uet='{"link-type":"button","link-label":"add to cart - ${this.getName(0)}","cname":"button click","link-url":"@button click","link-place":"1","restriction":"public","page-area":"2"}' href="javascript:void(0)" class="addToCart"><span>ADD TO DEMONSTRATION</span></button>
<a onclick="openDetails(${this.id})" data-uet='{"link-type":"button","link-label":"open details - ${this.getName(0)}","cname":"button click","link-url":"@button click","link-place":"1","restriction":"public","page-area":"2"}' href="javascript:void(0)" class="openDetails"><span>OPEN DETAILS</span></a>
</div>
</div>
</div>
<div>
<div class="radioContent">
<div class="content">
<div class="leftContent">
<div class="image small">
<img src="${this.getFullImageSrc(1)}" alt="${this.getName(1)}">
</div>
<div>
<div class="name">
${this.getName(1)}
</div>
<div class="description">
${this.getDescription(1)}
</div>
</div>
</div>
</div>
</div>
<div class="radioContent">
<div class="content">
<div class="leftContent">
<div class="image small">
<img src="${this.getFullImageSrc(2)}" alt="${this.getName(2)}">
</div>
<div>
<div class="name">
${this.getName(2)}
</div>
<div class="description">
${this.getDescription(2)}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
`;
}
return `
<div class="radioContainer radioContent" id="${this._htmlId}">
<div class="image">
<img src="${this.getFullImageSrc(0)}" alt="${this.getName(0)}">
</div>
<div class="content">
<div>
<div class="name">
${this.getName(0)}
</div>
<div class="description">
${this.getDescription(0)}
</div>
</div>
<div class="radioActions">
<a onclick="addToCart(${this.id})" href="javascript:void(0)" data-uet='{"link-type":"button","link-label":"add to cart - ${this.getName(0)}","cname":"button click","link-url":"@button click","link-place":"1","restriction":"public","page-area":"2"}' class="addToCart"><span>ADD TO DEMONSTRATION</span></button>
<a onclick="openDetails(${this.id})" href="javascript:void(0)" data-uet='{"link-type":"button","link-label":"open details - ${this.getName(0)}","cname":"button click","link-url":"@button click","link-place":"1","restriction":"public","page-area":"2"}' class="openDetails"><span>OPEN DETAILS</span></a>
</div>
</div>
</div>
`;
}
getImageSrc() {
if (this.id == 1 && questions[0].valueSelected != 3) {
return "https://images.campaignresources.motorolasolutions.com/EloquaImages/clients/MotorolaSolutionsInc/%7Be611d166-497e-413a-a8c9-2e4eb14bad47%7D_MXP600_black.png";
}
return this.imageUrl;
}
getFullImageSrc(counter = 0) {
if (this.id == 1 && questions[0].valueSelected != 3) {
return "https://images.campaignresources.motorolasolutions.com/EloquaImages/clients/MotorolaSolutionsInc/%7Be611d166-497e-413a-a8c9-2e4eb14bad47%7D_MXP600_black.png";
}
if (typeof this.fullImageUrl == "object") {
return this.fullImageUrl[counter];
}
return this.fullImageUrl;
}
getDescription(counter = 0) {
if (typeof this.description == "object") {
return this.description[counter];
}
return this.description;
}
getName(counter = 0) {
if (typeof this.name == "object") {
return this.name[counter];
}
return this.name;
}
generateHighlitedFeatureList() {
var featureList = {};
for (var feature in this.features) {
var feature = this.features[feature];
var key = feature.split("@");
if (key.length != 2) {
console.log("key error");
continue;
}
feature = features[key[0]];
if (typeof feature.update === "function") {
feature.update();
}
var option = feature.options[key[1]];
if (typeof option.update === "function") {
option.update();
}
if (typeof option.value == "object") {
for (var val in option.value) {
val = option.value[val];
if (this.addToFeatureList(featureList, feature, option, val, true)) break;
}
}
else {
this.addToFeatureList(featureList, feature, option, option.value, true);
}
}
return featureList;
}
renderHighlatedFeatures(compare = false) {
var featureList = this.generateHighlitedFeatureList();
return this.renderFeatureList(featureList, compare);
}
addToFeatureList(featureList, feature, option, val, highlated) {
if (typeof questions[option.question] == "undefined") {
if (highlated) return false;
this._addToFeatureList(featureList, feature, option);
return true;
}
var extraQuestions = extraQuestions = {
4: { multiple: false, answers: [] },
5: { multiple: false, answers: [] },
6: { multiple: false, answers: [] },
7: { multiple: false, answers: [] }
};
extraQuestions = {};
var question = questions[option.question];
if (typeof extraQuestions[option.question] != "undefined") {
question = extraQuestions[option.question];
}
if (typeof question.answers[val] == "undefined") {
if (highlated) return false;
this._addToFeatureList(featureList, feature, option);
return true;
}
var answer = question.answers[val];
if (question.multiple || answer.multiple) {
if (!answer.value) {
if (highlated) return false;
this._addToFeatureList(featureList, feature, option);
return true;
} else {
if (!highlated) return false;
this._addToFeatureList(featureList, feature, option);
return true;
}
} else {
if (val !== question.valueSelected) {
if (highlated) return false;
this._addToFeatureList(featureList, feature, option);
return true;
} else {
if (!highlated) return false;
this._addToFeatureList(featureList, feature, option);
return true;
}
}
this._addToFeatureList(featureList, feature, option);
return true;
}
_addToFeatureList(featureList, feature, option) {
if (typeof featureList[feature.category] === "undefined") {
featureList[feature.category] = [];
}
featureList[feature.category].push(option);
}
renderFeatureList(featureList, compare) {
var rendered = "";
var order = Object.keys(featureList);
// order.sort();
for (var category in order) {
category = order[category];
if (compare) {
rendered = rendered + `
<div class="categoryContainer">
<b>${category}</b>
`;
var orderOption = [];
for (i in featureList[category]) {
orderOption.push({ id: i, name: featureList[category][i].name });
}
orderOption.sort(function (a, b) {
return a.name.localeCompare(b.name);
});
for (var option in orderOption) {
option = orderOption[option].id;
var fake = typeof featureList[category][option].fake != "undefined" && featureList[category][option].fake;
rendered = rendered + `<p class="${fake ? "fake" : "real"}">
<img class="fakeImage" src="https://images.campaignresources.motorolasolutions.com/EloquaImages/clients/MotorolaSolutionsInc/%7Bb7f1e8d3-e4f5-4949-bae1-800b145d12b5%7D_greyCross.png" />
<img class="realImage" src="https://images.campaignresources.motorolasolutions.com/EloquaImages/clients/MotorolaSolutionsInc/%7B9564e1d5-f214-47e4-96d7-c602196b9726%7D_blueTick.png" />
${featureList[category][option].name}
</p>`;
}
rendered = rendered + `
</div>`;
continue;
}
rendered = rendered + `
<ul>
<li>${category}</li>
</ul>
`;
for (var option in featureList[category]) {
rendered = rendered + `<p>${featureList[category][option].name}</p>`;
}
}
return rendered;
}
renderNonHighlatedFeatures(compare = false) {
var featureList = {};
for (var feature in this.features) {
var feature = this.features[feature];
var key = feature.split("@");
if (key.length != 2) {
console.log("key error");
continue;
}
feature = features[key[0]];
if (typeof feature.update === "function") {
feature.update();
}
var option = feature.options[key[1]];
if (typeof option.update === "function") {
option.update();
}
if (typeof option.value == "object") {
for (var val in option.value) {
val = option.value[val];
if (this.addToFeatureList(featureList, feature, option, val, false)) break;
}
}
else {
this.addToFeatureList(featureList, feature, option, option.value, false);
}
}
return this.renderFeatureList(featureList, compare);
}
rendeAnsData() {
if (this.totalCart <= 0) return "";
return `${this.name}->${this.totalCart}`;
}
}
function isDualBandSelected() {
if (questions[3].valueSelected === 1) {
return true;
}
return false;
}
function isAllBandSelected() {
if (questions[3].valueSelected === 2) {
return true;
}
return false;
}
function initRadios() {
var radios = [];
var radioNames = [
["MTP8000EX SERIES TETRA ATEX RADIO",
"MTP8500EX TETRA RADIO",
"MTP8550EX TETRA RADIO"
], "MXP600 MISSION-CRITICAL TETRA PORTABLE RADIO"];
var radioNamesSmall = ["MTP8000EX", "MXP600 Black/Green"];
var descriptions = [
[`The MTP8000Ex series intrinsically safe TETRA radios have been engineered to address workers’ needs and offer reliable radio communications in hazardous environments. From their form to their function, these radios are certified to the latest standards listed by ATEX and IECEx.`,
`The MTP8500Ex portable radio delivers powerful features and user benefits, in a form factor that features a limited keypad ideally suited for operation while wearing heavy gloves. Offering innovative features such as top display, t-bar shaped grip and colour display, this TETRA ATEX radio is optimized for use without getting in your way.`,
`The MTP8550Ex portable radio delivers powerful features and user benefits, in a form factor that features a full keypad ideally suited for those users who require features offered by an expanded keyboard. Its ergonomic design enables easy operation by offering innovative features such as top display, t-bar shaped grip and colour display. The MTP8550Ex TETRA ATEX radio is optimized for use without getting in your way and designed for operation while wearing protective gloves and equipment.`],
`MXP600 takes the proven capabilities of mission-critical voice communication to new levels and can collaborate with other solutions. It has innovative audio technology so you can hear and be heard in the noisiest of conditions. It delivers best-in-class coverage so vital messages get through even in marginal coverage areas. Its rugged design copes with extreme environments, and its extended battery life outlasts a shift.`
];
var features = [
["0@0", "0@1", "0@2", "0@3", "1@0", "2@0", "3@0", "4@0", "5@0", "6@0", "7@0", "7@1", "7@2", "7@3", "7@4", "7@5"],
["8@0", "9@0", "10@0", "11@0", "12@0", "12@1", "12@2", "12@3", "12@4", "12@5"],
];
var radioImages = [
"https://images.campaignresources.motorolasolutions.com/EloquaImages/clients/MotorolaSolutionsInc/%7B791a1c78-8537-4a24-b7bd-5cbed191e705%7D_MTP8000EX_small.png",
"https://images.campaignresources.motorolasolutions.com/EloquaImages/clients/MotorolaSolutionsInc/%7B0b61f3f0-8b04-4f95-af87-fc9d2091166b%7D_MXP600_small.png",
];
var radioImagesFull = [
["https://images.campaignresources.motorolasolutions.com/EloquaImages/clients/MotorolaSolutionsInc/%7B0bfa880c-d00b-458e-81e3-fda6938cb726%7D_MTP8000EX.png", "https://images.campaignresources.motorolasolutions.com/EloquaImages/clients/MotorolaSolutionsInc/%7B20219846-a1c9-414f-b86a-ce99f772c07d%7D_MTP8500EX.png", "https://images.campaignresources.motorolasolutions.com/EloquaImages/clients/MotorolaSolutionsInc/%7B2be1daa3-0a61-433b-adf3-580ce265fdb3%7D_MTP8550EX.png"],
"https://images.campaignresources.motorolasolutions.com/EloquaImages/clients/MotorolaSolutionsInc/%7B25032fed-4f15-41b9-bdcf-e6ff483e107e%7D_MXP600.png",
];
for (i in radioNames) {
radios.push(new RadioObj(radioNames[i], radioImages[i], radioImagesFull[i], descriptions[i], features[i], radioNamesSmall[i]));
}
return radios;
}
function radioMouseover(id) {
console.log("radioMouseover", id);
var modal = $(".maximumCompareReached");
modal.attr("data-radio-id", id);
}
function radioMouseout(id) {
console.log("radioMouseout", id);
var modal = $(".maximumCompareReached");
modal.attr("data-radio-id", "");
}
window.requestAnimationFrame(function comparePopUp() {
var modal = $(".maximumCompareReached");
id = modal.attr("data-radio-id");
if (typeof id != "undefined" && id != "" && $(window).width() > 600 && typeof compare != "undefined" && compare.items.length >= 3 && typeof compare.items.find((e) => e._htmlId == id) == "undefined") {
var radio = $(`#${id}`);
modal.attr("data-radio-id", id);
var top = radio.offset().top - 85;
var renderedRadios = $("#renderedRadios");
var minTop = renderedRadios.offset().top - modal.outerHeight() - 15;
if (top < minTop) {
modal.removeClass("visible");
}
else {
var left = radio.offset().left + radio.outerWidth() - modal.outerWidth() - 48;
modal.css("top", top + "px");
modal.css("left", left + "px");
modal.addClass("visible");
}
} else {
modal.removeClass("visible");
}
window.requestAnimationFrame(comparePopUp);
});
var totalQuestions = 0;
var ansCounter = 0;
var QuestionObj = class QuestionObj {
constructor(question, answers, type, multiple, questionInfo = "") {
this.id = totalQuestions;
this._htmlId = `questionContainer-${this.id}`;
totalQuestions++;
// this.sectionTitle = sectionTitle;
// this.questionShort = questionShort;
this.questionInfo = questionInfo;
// this.influence = influence;
this.question = question;
this.multiple = multiple;
if (type == "scale") {
for (let i = 1; i <= 10; i++) {
answers.push({ html: i.toString() });
}
}
for (var i in answers) {
var answer = answers[i];
answer.html = answer.html.trim();
if (typeof answer.long == "undefined") {
answer.long = answer.html;
}
if (typeof answer.positiveImpact == "undefined") {
answer.positiveImpact = [];
}
if (typeof answer.negativeImpact == "undefined") {
answer.negativeImpact = [];
}
if (typeof answer.short == "undefined") {
answer.short = answer.long;
}
if (multiple) {
answer.value = false;
}
if (typeof answer.multiple == "undefined") {
answer.multiple = multiple;
}
}
this.answers = answers;
this.type = type;
this.valueSelected = "";
}
render() {
if (["radio", "scale", "radioSingleColumn"].includes(this.type)) return this.renderRadio();
if (this.type == "radioBox") return this.renderRadioBox();
return "none";
}
rendeAns() {
var short = "";
var long = "";
if (this.multiple) {
for (var ans in this.answers) {
if (this.answers[ans].value) {
if (short == "") {
short = short + `<div>${this.answers[ans].short}</div>`;
}
long = long + `<div>${this.answers[ans].long}</div>`;
}
}
}
else if (this.valueSelected !== "") {
long = this.answers[this.valueSelected].long;
short = this.answers[this.valueSelected].short;
}
if (short === "") return "";
ansCounter++;
return `
<div class="renderedAnswer renderedAnswer-${ansCounter}">
<div class="topQuestion">
${this.questionShort}
</div>
<div class="topQuestionAns" onclick="goToStepExpandedCheck(this, ${this.id})">
<span class="long">${long}</span>
<span class="short">${short}</span>
</div>
</div>
`;
}
rendeAnsData() {
var value = "";
if (this.multiple) {
for (var ans in this.answers) {
if (this.answers[ans].value) {
if (typeof this.answers[ans].short != "undefined") {
value = `${value}&${this.answers[ans].short}`;
}
else {
value = `${value}&${this.answers[ans].long}`;
}
}
}
if (value == "") return "";
value = value.substring(1);
}
else if (this.valueSelected !== "") {
if (typeof this.answers[this.valueSelected].short != "undefined") {
value = this.answers[this.valueSelected].short;
}
else {
value = this.answers[this.valueSelected].long;
}
}
if (value == "") return "";
return `${this.question}->${value}`;
}
renderRadio(singleColumn) {
var that = this;
var radioQuestions = this.answers.reduce((acc, curr, currentIndex) => {
if (typeof curr.disabled != "undefined" && curr.disabled) return acc;
var checked = "";
if (typeof curr.value != "undefined" && curr.value) {
checked = "checked";
}
else if (typeof curr.value == "undefined" && that.valueSelected === currentIndex) {
checked = "checked";
}
var linkLabel = curr.html;
linkLabel = $(`<span>${linkLabel}</span>`).text().toString().trim();
acc += `<div class="form-check" data-uet='{"link-type":"button","link-label":"${linkLabel}","cname":"field value populated","link-url":"@field value populated","link-place":"1","restriction":"public","page-area":"2"}'>
<input ${checked} onchange="radioChanged(this, ${that.id},${currentIndex})" class="form-check-input" type="${that.multiple ? "checkbox" : "radio"}" name="radioInput" id="radio-${currentIndex}" value="${currentIndex}">
<label class="form-check-label radio-${currentIndex}-label" for="radio-${currentIndex}">${curr.html}</label>
</div>`;
return acc;
}
, "");
var rendered = `
<div class="radioQuestionContainer">
${this.renderQuestionInfo()}
<div class="form-check-container ${this._htmlId} ${this.multiple ? "multiple" : ""} ${this.type == "scale" ? "scale" : ""} ${this.type == "radioSingleColumn" ? "singleColumn" : ""}" id="${this._htmlId}">
${radioQuestions}
</div>
</div>
`;
return rendered;
}
renderRadioBox() {
var that = this;
var radioQuestions = this.answers.reduce((acc, curr, currentIndex) => {
if (typeof curr.disabled != "undefined" && curr.disabled) return acc;
var info = "";
if (typeof curr.infoDescription != "undefined" && curr.infoDescription.trim() != "") {
info = `
<div class="info">
<img src="https://images.campaignresources.motorolasolutions.com/EloquaImages/clients/MotorolaSolutionsInc/%7Bbe581b31-ce36-4d0c-98d1-779e297329c1%7D_infoIcon.png" alt="info" />
</div>
<div class="infoHovered">
${curr.infoDescription}
</div>
`;
}
var linkLabel = curr.html
linkLabel = $(`<span>${linkLabel}</span>`).text().toString().trim();
if (typeof curr.infoDescriptionExpand != "undefined" && curr.infoDescriptionExpand.trim() != "") {
info = `
<div class="infoViewFeatures">
<div data-infoViewFeatures="infoViewFeatures_${that.id}_${currentIndex}" class="infoViewFeaturesToggle" onclick="toggleInfoViewFeaturesToggle(${that.id},${currentIndex}, event)">
${curr.infoDescriptionExpand}
</div>
<span class="expand" onclick="toggleInfoViewFeaturesToggle(${that.id},${currentIndex}, event)" class="label" data-uetfake='{"link-type":"button","link-label":"${linkLabel} - View features","cname":"field value populated","link-url":"@field value populated","link-place":"1","restriction":"public","page-area":"2"}'>View features</span>
<span class="collapse" onclick="toggleInfoViewFeaturesToggle(${that.id},${currentIndex}, event)" class="label" data-uetfake='{"link-type":"button","link-label":"${linkLabel} - Hide features","cname":"field value populated","link-url":"@field value populated","link-place":"1","restriction":"public","page-area":"2"}'>View features</span>
<img class="expand" onclick="toggleInfoViewFeaturesToggle(${that.id},${currentIndex}, event)" src="https://images.campaignresources.motorolasolutions.com/EloquaImages/clients/MotorolaSolutionsInc/%7B59baa535-4626-4966-bef4-db0425459609%7D_expandIcon.png" alt="info" data-uetfake='{"link-type":"button","link-label":"${linkLabel} - View features","cname":"field value populated","link-url":"@field value populated","link-place":"1","restriction":"public","page-area":"2"}' />
<img class="collapse" onclick="toggleInfoViewFeaturesToggle(${that.id},${currentIndex}, event)" src="https://images.campaignresources.motorolasolutions.com/EloquaImages/clients/MotorolaSolutionsInc/%7B41957325-4b89-40c7-86fc-e365f9d8b29d%7D_collapseIcon.png" alt="info"data-uetfake='{"link-type":"button","link-label":"${linkLabel} - Hide features","cname":"field value populated","link-url":"@field value populated","link-place":"1","restriction":"public","page-area":"2"}' />
</div>
`;
}
var checked = "";
if (typeof curr.value != "undefined" && curr.value) {
checked = "checked";
}
else if (typeof curr.value == "undefined" && that.valueSelected === currentIndex) {
checked = "checked";
}
acc += `<div class="form-check ${this._htmlId}-radio-${currentIndex} ${this.multiple ? "multiple" : ""}" id="${this._htmlId}-radio-${currentIndex}" data-uetfake='{"link-type":"button","link-label":"${linkLabel}${(typeof curr.infoDescriptionExpand != "undefined" && curr.infoDescriptionExpand.trim() != "")?" - field populated":""}","cname":"field value populated","link-url":"@field value populated","link-place":"1","restriction":"public","page-area":"2"}'>
<input ${checked} onchange="radioChanged(this, ${that.id},${currentIndex})" class="form-check-input" type="${(that.multiple || curr.multiple) ? "checkbox" : "radio"}" name="radioInput" id="radio-${currentIndex}" value="${currentIndex}">
<label class="form-check-label radio-${currentIndex}-label ${this.multiple ? "multiple" : ""} ${info != "" ? "hasInfo" : ""}" for="radio-${currentIndex}"><span>${curr.html}${typeof curr.htmlExtra != "undefined" ? `<p>${curr.htmlExtra}</p>` : ""}</span>${info}</label>
</div>`;
return acc;
}
, "");
var rendered = `
<div class="radioQuestionContainer">
${this.renderQuestionInfo()}
<div class="form-check-container large ${this._htmlId}" id="${this._htmlId}">
${radioQuestions}
</div>
</div>
`;
return rendered;
}
renderQuestionInfo() {
if (this.type == "scale" && typeof this.questionInfo != "undefined" && this.questionInfo != "") {
return this.questionInfo;
}
else if (typeof this.questionInfo != "undefined" && this.questionInfo != "") {
return `<p class="questionInfo">${this.questionInfo}</p>`;
}
return "";
}
}
function initQuestions() {
var questions = [];
questions.push(new QuestionObj("What is your area of work?", [
{
html: "Law Enforcement"
}, {
html: "Fire and Rescue Services"
}, {
html: "Emergency Medical Services"
}, {
html: "Military"
}, {
html: "Utilities"
}, {
html: "Transportation"
}, {
html: "Oil and Gas"
}, {
html: "Other (Public Sector)"
}, {
html: "Other (Commercial)"
}
], "radio", false));
questions.push(new QuestionObj("Who will be primarily using radios?", [
{
html: "Mobile workers",
update: function () {
this.html = "Mobile workers";
if (questions[0].valueSelected === 0) {
this.html = "Frontline Officers";
}
if (questions[0].valueSelected === 1) {
this.html = "Frontline Fire Fighters";
}
if (questions[0].valueSelected === 2) {
this.html = "Emergency response personnel";
}
if (questions[0].valueSelected === 3) {
this.html = "Field deployed personnel";
}
if (questions[0].valueSelected === 6) {
this.html = "Workers in the facility / Mobile workers";
}
},
},
{
html: "Administrative personnel"
}, {
html: "Management level staff etc",
update: function () {
this.html = "Management level staff etc";
if (questions[0].valueSelected === 0 || questions[0].valueSelected === 1 || questions[0].valueSelected === 2 || questions[0].valueSelected === 3) {
this.html = "Chief level staff, command staff etc";
}
},
}, {
html: "Covert personnel",
update: function () {
if (questions[0].valueSelected === 0 || questions[0].valueSelected === 3) {
this.disabled = false;
}
else {
this.disabled = true;
}
}
}], "radioSingleColumn", false));
questions.push(new QuestionObj("How many personnel need a radio?", [{
html: "0 - 50"
}, {
html: "51 - 100"
}, {
html: "101 - 500"
}, {
html: "501+"
}], "radioSingleColumn", false));
questions.push(new QuestionObj("Do you work in an area with hazardous gases, or other materials, with the potential for explosions?", [
{
html: "Yes",
}, {
html: "No",
}
], "radio", false)
);
questions.push(new QuestionObj("Will you require encrypted communications?", [{
html: "Clear (No Encryption)",
}, {
html: "TEA (Air Interface Encryption)"
}, {
html: "AES 128 (End to End Encryption)"
}, {
html: "AES 256 (End to End Encryption)"
}], "radio", false, "<b>(AES 256 is most secure)</b>"));
questions.push(new QuestionObj("Select your software bundles based on what is important to you",
[
{
html: `<b>Coverage and Capacity</b>`,
htmlExtra: `Functions designed to enhance connectivity of radios to the network in a dynamic environment`,
infoDescriptionExpand: `
<ul>
<li>
Migration – Dynamic
</li>
<li>
Ignore Local Site Trunking (LST)
</li>
<li>
Cell Select By Talkgroup
</li>
<li>
Enhanced Gateway & Repeater
</li>
<li>
Migration
</li>
<li>
Migration – Encryption
</li>
<li>
Toggle RF Power Class
</li>
<li>
Network Monitoring
</li>
<li>
Repeater feature
</li>
<li>
Dynamic Air Interface Migration
</li>
</ul>
`
},
{
html: `<b>Safety and Security</b>`,
htmlExtra: `Functions providing enhanced personnel safety and communications security features`,
infoDescriptionExpand: `
<ul>
<li>
Enhanced Security
</li>
<li>
Direct Mode Operation Static Cypher Keys (DMO-SCK)
</li>
<li>
Call Out
</li>
<li>
Emergency Alert
</li>
<li>
Permanent Disable Feature
</li>
<li>
British Standards Institute End To End Encryption (BSI E2EE Enhanced Audio)
</li>
<li>
Short Data Services (SDS) Over End To End Encryption (E2EE)
</li>
<li>
Emergency Destination In Local Site Trunking (LST)
</li>
<li>
Mandown
</li>
<li>
Permanent Disable V2 Kill/Unkill
</li>
<li>
Static Cypher Key Over The Air Reprogramming (SCK OTAR)
</li>
<li>
Shadow Groups License
</li>
</ul>`
},
{
html: `<b>Productivity and Efficiency</b>`,
htmlExtra: `Functions to enhance call and fleet management`,
infoDescriptionExpand: `
<ul>
<li>
Individual Call Manipulation
</li>
<li>
Radio Messaging Service/Funk Melde System (RMS/FMS)
</li>
<li>
Simultaneous Physical Equipment Interface (PEI) and Audio
</li>
<li>
Secondary Control. Channels (SCCH)
</li>
<li>
Short Data Service Over-The-Air-Programming (SDS-OTAP) Remote Control
</li>
<li>
Callout Authorized Inter RF Subsystem Interface (ISSI)
</li>
<li>
Temporary Group Call Preemption
</li>
<li>
Short Data Service Over-The-Air-Programming (SDS-OTAP) Bundle
</li>
<li>
Multi Slot Data Package (MSPD)
</li>
<li>
Land Mobile Radio Over-The-Air-Programming (LMR OTAP)
</li>
</ul>`},
{
html: `<b>Bluetooth Capabilities</b>`,
htmlExtra: `Functions to allow Bluetooth accessories and Bluetooth enabled capabilities to be used`,
infoDescriptionExpand: `
<ul>
<li>
Bluetooth Connectivity
</li>
<li>
Bluetooth Audio Object Push
</li>
<li>
Bluetooth Control
</li>
<li>
Bluetooth Smart Ready
</li>
<li>
Bluetooth Smart Proximity Pairing
</li>
<li>
Bluetooth Indoor Location
</li>
</ul>`},
{
html: `<b>Location Services</b>`,
htmlExtra: `Functions to enable the location of radios and personnel`,
infoDescriptionExpand: `
<ul>
<li>
GPS Feature
</li>
<li>
BeiDou
</li>
<li>
GLONASS
</li>
</ul>`},
{
html: `<b>Data <br class="hide-mobile"/> Services</b>`,
htmlExtra: `Functions including data capabilities to improve effectiveness and efficiency`,
infoDescriptionExpand: `
<ul>
<li>
Immediate Text Message
</li>
<li>
Multi Slot Data Package (MSPD)
</li>
<li>
Wireless Application Protocol (WAP) Push
</li>
<li>
Wireless Application Protocol (WAP)
</li>
<li>
Enhanced Immediate Text Message
</li>
</ul>`}]
, "radioBox", true, "The bundles are a guide, multiple items can be selected from multiple bundles during the order process"));
questions.push(new QuestionObj("Select the type of accessory you require",
[{
html: "Remote Speaker Microphone (RSM)",
},
{
html: "Heavy Duty Headset",
update: function () {
if (questions[1].answers[1].value) {
this.disabled = true;
}
else {
this.disabled = false;
}
}
},
{
html: "Earpiece",
},
{
html: "Carry Accessories",
},
{
html: "Bluetooth Accessories",
update: function () {
if (questions[5].answers[3].value) {
this.disabled = false;
}
else {
this.disabled = true;
}
}
},
{
html: "Multi-Unit Chargers",
}]
, "radio", true));
questions.push(new QuestionObj("How noisy is your working environment?", [], "scale", false, `
<table class="minMax">
<tbody>
<tr>
<td>1:</td>
<td>I need radios to be clear but not expecting use in potentially loud environments. No advanced speaker or microphone requirements needed</td>
</tr>
<tr>
<td>10:</td>
<td>The environments I work in can be very loud and I need to be heard first time, every time</td>
</tr>
</tbody>
</table>
`));
questions.push(new QuestionObj("How important is personnel location to you?", [], "scale", false, `
<table class="minMax">
<tbody>
<tr>
<td>1:</td>
<td>I work in a designated area</td>
</tr>
<tr>
<td>5:</td>
<td>My location varies but it is not essential to know where I am at all times</td>
</tr>
<tr>
<td>10:</td>
<td>I can work in a variety of locations and for my safety and my role it is important for my position to be known accurately</td>
</tr>
</tbody>
</table>
`));
questions.push(new QuestionObj("How important is it for you to be able to update your radios remotely?", [], "scale", false, `
<table class="minMax">
<tbody>
<tr>
<td>1:</td>
<td>Radios are always located within easy access of central facility</td>
</tr>
<tr>
<td>10:</td>
<td>Radios are constantly used remotely from central facility</td>
</tr>
</tbody>
</table>
`));
questions.push(new QuestionObj("Do you work over a wide area or within buildings?", [], "scale", false, `
<table class="minMax">
<tbody>
<tr>
<td>1:</td>
<td>I work close to a base station and in an open area</td>
</tr>
<tr>
<td>10:</td>
<td>I work within buildings that can restrict transmission and/or remote from base stations</td>
</tr>
</tbody>
</table>
`));
questions.push(new QuestionObj("Do you need a car kit?", [
{
html: "Yes",
}, {
html: "No",
}
], "radio", false)
);
questions.push(new QuestionObj("Select your software bundles based on what is important to you",
[{
html: `<b>Coverage and Capacity</b>`,
htmlExtra: `Functions designed to enhance connectivity of radios to the network in a dynamic environment`,
infoDescriptionExpand: `
<ul>
<li>
Network Monitoring
</li>
<li>
Emergency Alert
</li>
<li>
Enhanced Gateway & Repeater
</li>
<li>
Cell Select By Talkgroup
</li>
<li>
Ignore Local Site Trunking (LST)
</li>
<li>
Home Cell Stickiness
</li>
<li>
Migration – Dynamic
</li>
<li>
Migration – Encryption
</li>
<li>
Migration
</li>
</ul>
`
},
{
html: `<b>Safety and Security</b>`,
htmlExtra: `Functions providing enhanced safety and security features`,
infoDescriptionExpand: `
<ul>
<li>
Bluetooth (BT) Indoor Location
</li>
<li>
Bluetooth (BT) Smart Ready
</li>
<li>
Bluetooth (BT) Connectivity
</li>
<li>
Call Out
</li>
<li>
Mandown
</li>
<li>
Emergency Destination In Local Site Trunking (LST)
</li>
<li>
End to End Encryption Short Data Services (E2EE SDS)
</li>
<li>
Permanent Disable Feature
</li>
<li>
Permanent Disable v2 Kill/UnKill
</li>
<li>
Enhanced Security
</li>
<li>
Group Cipher Key Over The Air Reprogramming (OTAR)
</li>
<li>
Static Cipher Keys
</li>
<li>
Static Cipher Keys Over The Air Reprogramming
</li>
</ul>`
},
{
html: `<b>Productivity and Efficiency</b>`,
htmlExtra: `Functions including data capabilities to improve effectiveness and efficiency`,
infoDescriptionExpand: `
<ul>
<li>
Shadow Groups
</li>
<li>
Immediate Text Message
</li>
<li>
Individual Call Manipulation
</li>
<li>
Radio User Assignment/Radio User Identity (RUA/RUI)
</li>
<li>
Radio Messaging Service (RMS)
</li>
<li>
Land Mobile Radio Over-The-Air-Programming (LMR OTAP)
</li>
<li>
Wireless Application Protocol (WAP) Push
</li>
<li>
Wireless Application Protocol (WAP)
</li>
<li>
Multi Slot Data Package (MSPD)
</li>
<li>
British Standards Institute End to End Encryption (BSI E2EE)
</li>
<li>
Enhanced Audio
</li>
<li>
Short Data Services (SDS) Remote Control
</li>
<li>
Secondary Common Control Channel (SCCH)
</li>
</ul>`}
]
, "radioBox", true, "Select all that apply"));
questions.push(new QuestionObj("Select the type of accessory you require",
[{
html: "Remote Speaker Microphone (RSM)",
},
{
html: "Earpiece",
},
{
html: "Carry Accessories",
},
{
html: "Bluetooth Accessories",
},
{
html: "Car Kit Accessories",
update: function () {
if (getModelTier() == "Performance Tier") {
this.disabled = false;
}
else {
this.disabled = true;
}
}
},
{
html: "Multi-Unit Chargers",
}]
, "radio", true));
return questions;
}
function toggleInfoViewFeaturesToggle(radio, index, event) {
var elements = $(`[data-infoviewfeatures="infoViewFeatures_${radio}_${index}"]`)
elements.each((i, e) => {
var label = $(e).closest(".form-check-label");
if (!$(e).parent().hasClass("toggled")) {
$(e).closest(".form-check").css("min-height", label.outerHeight());
$(e).closest(".form-check").css("min-width", label.outerWidth());
}
$(e).parent().toggleClass("toggled");
label.toggleClass("infoDescriptionExpanded");
if ($(".form-check-label.infoDescriptionExpanded").length != 0) {
$(e).closest(".stepState .stepContainer").addClass("infoDescriptionExpanded");
}
else {
$(e).closest(".stepState .stepContainer").removeClass("infoDescriptionExpanded");
}
});
event.stopPropagation();
event.preventDefault();
event.stopImmediatePropagation();
onResizeAdjustments();
}var cartObj = class cartObj {
constructor() {
this.items = [];
}
addItem(item) {
var itemIndex = this.items.findIndex(i => i.id === item.id)
if (itemIndex === -1) {
this.items.push(item);
item.totalCart = 0;
}
item.totalCart++;
}
removeItem(item) {
var itemIndex = this.items.findIndex(i => i.id === item.id);
if (itemIndex !== -1) {
this.items.splice(itemIndex, 1);
}
}
render() {
var rendered = "";
for (var item in this.items) {
item = this.items[item];
rendered = rendered + `
<div class="cartItem" id="${item._htmlId}-cart-item">
<div class="left">
<img src="${item.getFullImageSrc()}" alt="${item.getName(0)}">
<div class="radioTitle">
Radio:
</br>
${item.smallName}
</div>
</div>
<div class="right">
<p class="estimate d-none">
ESTIMATED NO.
</p>
<div class="radioTitle">
Radio:
</br>
${item.smallName}
</div>
<div class="numControl d-none">
<button onclick="decreaseCart(this)"><img class="minus" src="https://images.campaignresources.motorolasolutions.com/EloquaImages/clients/MotorolaSolutionsInc/%7Bf85cc040-20a0-47be-a92f-a3218e3e9a03%7D_minus.png" alt=""></button>
<input type="text" oninput="clenseInput(this)" onchange="cartChange(this,${item.id})" min="0" value="${item.totalCart}"/>
<button onclick="increaseCart(this)"><img class="plus" src="https://images.campaignresources.motorolasolutions.com/EloquaImages/clients/MotorolaSolutionsInc/%7Ba4adff35-2863-4c2b-afdd-1f370a11b840%7D_plus.png" alt=""></button>
</div>
<div>
<a data-uet='{"link-type":"button","link-label":"remove from cart - ${item.getName(0)}","cname":"button click","link-url":"Remove from cart","link-place":"1","restriction":"public","page-area":"2"}' onclick="removeFromCart(${item.id})" href="javascript:void(0)">remove</a>
</div>
</div>
</div>
`;
}
return rendered;
}
}
function clenseInput(elem) {
elem.value = elem.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');
elem.value = elem.value.replace(/\b0+/g, '')
}
function cartChange(elem, id) {
closeRenderedAnswers();
var input = $(elem);
val = parseInt(input.val());
val = isNaN(val) ? 0 : val
radios[id].totalCart = val;
}
function decreaseCart(elem) {
closeRenderedAnswers();
var input = $(elem).parent().find("input");
val = parseInt(input.val());
val = isNaN(val) ? 0 : val;
if (val > 0) {
val--;
input.val(val);
input.trigger("change");
}
}
function increaseCart(elem) {
closeRenderedAnswers();
var input = $(elem).parent().find("input");
val = parseInt(input.val());
val = isNaN(val) ? 0 : val;
val++
input.val(val);
input.trigger("change");
}
function initCart() {
return new cartObj();
};var compareObj = class compareObj {
constructor() {
this.items = [];
}
addItem(item) {
var itemIndex = this.items.findIndex(i => i.id === item.id)
if (itemIndex === -1) {
this.items.push(item);
}
}
removeItem(item) {
var itemIndex = this.items.findIndex(i => i.id === item.id);
if (itemIndex !== -1) {
this.items.splice(itemIndex, 1);
}
}
render() {
var rendered = "";
if (this.items.length < 1) {
return "";
}
rendered = `
<div class="compareOnCartContainer">
<div class="left">
${this.items.length} item${this.items.length == 1 ? "" : "s"} in compare list
</div>
<div class="right">
<a onclick="openCompare()" href="javascript:void(0)">OPEN</a>
</div>
</div>
`;
return rendered;
}
renderDescriptions() {
var rendered = "";
var k = 0;
for (var item in this.items) {
item = this.items[item];
item.compareId = k;
k++;
rendered = rendered + `
<div>
${item.description}
</div>
`;
}
return rendered;
}
renderHighlatedFeatures() {
var rendered = "";
var k = 0;
var featureLists = [];
for (var item in this.items) {
item = this.items[item];
featureLists.push(item.generateHighlitedFeatureList());
}
for (var featureList in featureLists) {
featureList = featureLists[featureList];
for (var categoryName in featureList) {
var category = featureList[categoryName];
for (var feature in category) {
feature = category[feature];
for (var featureList2 in featureLists) {
featureList2 = featureLists[featureList2];
if (typeof featureList2[categoryName] == "undefined") {
featureList2[categoryName] = [];
}
item = featureList2[categoryName].find(i => (i.name === feature.name) || (typeof i.group != "undefined" && i.group === feature.group));
if(typeof item == "undefined"){
var f = JSON.parse(JSON.stringify(feature));
f.fake = true;
featureList2[categoryName].push(f);
}
}
}
}
}
for (var item in this.items) {
var featureList = featureLists[item];
item = this.items[item];
item.compareId = k;
k++;
rendered = rendered + `
<div class="featureContainer">
${item.renderFeatureList(featureList, true)}
</div>
`;
}
return rendered;
}
renderImages() {
var rendered = "";
var k = 0;
for (var item in this.items) {
item = this.items[item];
item.compareId = k;
k++;
rendered = rendered + `
<div>
<img src="${item.getImageSrc()}" alt="${item.name}"/>
<div class="name">${item.name}</div>
</div>
`;
}
return rendered;
}
renderAddToCart() {
var rendered = "";
var k = 0;
for (var item in this.items) {
item = this.items[item];
item.compareId = k;
k++;
var addedToCart = typeof cart.items.find(i => i.id === item.id) != "undefined";
rendered = rendered + `
<div>
<a class="${addedToCart?"added":""} link-${item.id}" onclick="addToCart(${item.id})" href="javascript:void(0)">ADD TO CART</a>
</div>
`;
}
return rendered;
}
}
function initCompare() {
return new compareObj();
};var curentStep = 0;
function startSurvey() {
curentStep = 0;
setSurveyStep();
}
function skip3A() {
curentStep = 8;
setSurveyStep();
}
function nextStep() {
if (curentStep == 3) {
if (questions[3].valueSelected == 0) {
curentStep = 4;
}
else {
curentStep = 7;
}
}
else if (curentStep == 6) {
curentStep = questions.length;
}
else {
curentStep++;
}
setSurveyStep();
}
function prevStep() {
if (curentStep == 7) {
curentStep = 3;
}
else {
curentStep--;
}
setSurveyStep(true);
}
function goToStep(step) {
curentStep = step;
setSurveyStep();
}
function goToStepExpandedCheck(elem, step) {
if ($(elem).closest(".expanded").length == 0) return;
goToStep(step)
}
function setSurveyStep(prevFlag = false) {
var QNUM = curentStep + 1;
//
if (QNUM > 7) {
QNUM = QNUM - 3;
}
if (questions.length != curentStep) {
var step = parseInt(curentStep);
var question = questions[step];
if (typeof question != "undefined") {
newPageView(`Q_${QNUM}_${question.question.toString().replaceAll(" ", "_").replaceAll("?", "")}`);
}
}
else {
newPageView(`resultPage`);
}
const CprevFlag = prevFlag;
window.requestAnimationFrame(function animate() {
if ($(".stepContainer").hasClass("notAnimate")) {
_setSurveyStep(CprevFlag);
return;
}
window.requestAnimationFrame(animate);
});
}
function _setSurveyStep(prevFlag = false) {
const CprevFlag = prevFlag;
var step = parseInt(curentStep);
for (var question in questions) {
question = questions[question]
for (var answer in question.answers) {
answer = question.answers[answer];
if (typeof answer.update == "function") {
answer.update(questions);
}
}
}
if (step < 0) {
$("main").addClass("initImage");
setMainState("initialState");
return;
}
$(".loader .percentage").css("width", (step / questions.length * 100) + "%");
$(".skipQuestion").hide();
if (step >= 0) {
var background = "";
var industry = questions[0].valueSelected;
var defaultUrl = "https://images.campaignresources.motorolasolutions.com/EloquaImages/clients/MotorolaSolutionsInc/%7B435abe57-01fd-4154-9f03-80886d27ec5e%7D_default.png";
if (industry === 0) {
background = "https://images.campaignresources.motorolasolutions.com/EloquaImages/clients/MotorolaSolutionsInc/%7B4c4f20bf-6b4c-4392-93be-34f49401f9e4%7D_law.png";
$("main").attr("data-backimage", "law");
}
else if (industry === 1) {
background = "https://images.campaignresources.motorolasolutions.com/EloquaImages/clients/MotorolaSolutionsInc/%7B1e8d4368-a584-4f55-9293-222c5d2c8616%7D_fire.png";
$("main").attr("data-backimage", "fire");
}
else if (industry === 2) {
background = "https://images.campaignresources.motorolasolutions.com/EloquaImages/clients/MotorolaSolutionsInc/%7B07008f73-5ad3-40b8-be6b-756fc3c009e6%7D_medical.png";
$("main").attr("data-backimage", "medical");
}
else if (industry === 3) {
background = "https://images.campaignresources.motorolasolutions.com/EloquaImages/clients/MotorolaSolutionsInc/%7B1923c05a-b09f-4e90-9b7d-414dd5694ee3%7D_military.png";
$("main").attr("data-backimage", "military");
}
else if (industry === 4) {
background = "https://images.campaignresources.motorolasolutions.com/EloquaImages/clients/MotorolaSolutionsInc/%7B68463639-b0b0-4c67-8097-aec2ac9af101%7D_utilities.png";
$("main").attr("data-backimage", "utilities");
}
else if (industry === 5) {
background = "https://images.campaignresources.motorolasolutions.com/EloquaImages/clients/MotorolaSolutionsInc/%7B0e6e868b-047a-41d1-a82d-f241f144c587%7D_transportation.png";
$("main").attr("data-backimage", "transportation");
}
else if (industry === 6) {
background = "https://images.campaignresources.motorolasolutions.com/EloquaImages/clients/MotorolaSolutionsInc/%7B1368faae-df1c-475f-bf0e-d2d40d602531%7D_oilAndGas.png";
$("main").attr("data-backimage", "oilAndGas");
}
else if (industry === 7) {
background = defaultUrl;
$("main").attr("data-backimage", "otherPublicSector");
}
else if (industry === 8) {
background = defaultUrl;
$("main").attr("data-backimage", "otherCommercial");
}
if (step > 3 && questions[3].valueSelected == 0) {
background = "https://images.campaignresources.motorolasolutions.com/EloquaImages/clients/MotorolaSolutionsInc/%7B3ad72a7f-3a4b-4cab-a330-0b2db0ced19d%7D_hazardous.png";
$("main").attr("data-backimage", "hazardous");
}
if (background != "") {
$("main").removeClass("initImage");
$("main").css("background-image", `url('${background}')`);
}
else {
$("main").addClass("initImage");
$("main").css("background-image", ``);
}
}
if (step == 4) {
for (var i = 7; i < 14; i++) {
if (typeof question[i] == "undefined") {
continue;
}
questions[i].valueSelected = "";
if (questions[i].multiple) {
for (var ans in questions[i].answers) {
questions[i].answers[ans].value = false;
}
}
}
}
if (step == 7) {
for (var i = 4; i < 7; i++) {
if (typeof question[i] == "undefined") {
continue;
}
questions[i].valueSelected = "";
if (questions[i].multiple) {
for (var ans in questions[i].answers) {
questions[i].answers[ans].value = false;
}
}
}
}
setMainState("stepState");
var question = questions[step];
if (typeof question == "undefined") {
question = new QuestionObj("", "", "", [], 0, "radio", false, "");
}
var rendered = question.render();
if (step != 0 && !CprevFlag) {
$(".stepContainer .prevContainer").show();
}
else {
$(".stepContainer .prevContainer").hide();
}
$(".stepContainer").attr("data-step", step);
$(".stepContainer .currentContainer .sectionTitle").html(question.sectionTitle);
$(".stepContainer .currentContainer .currentQuestion").html(question.question);
$(".stepContainer .currentContainer .questionContainer").html(rendered);
if (CprevFlag) {
$(".stepContainer").addClass("preAnimatePrev");
}
else {
$(".stepContainer").addClass("preAnimate");
}
window.requestAnimationFrame(function animate() {
if ($(".stepContainer").hasClass("notAnimate")) {
$(".stepContainer").removeClass("preAnimate").removeClass("preAnimatePrev");
if (CprevFlag) {
$(".stepContainer").addClass("animatePrev").removeClass("animate").removeClass("notAnimate");
}
else {
$(".stepContainer").addClass("animate").removeClass("animatePrev").removeClass("notAnimate");
}
setTimeout(function () {
$(".stepContainer").removeClass("animatePrev").removeClass("animate").addClass("notAnimate");
$(".stepContainer .prevContainer .sectionTitle").html($(".stepContainer .currentContainer .sectionTitle").html());
$(".stepContainer .prevContainer .currentQuestion").html($(".stepContainer .currentContainer .currentQuestion").html());
var elem = $(".stepContainer .currentContainer .questionContainer").clone();
var elems = elem.find("[id]");
elems.each(function (index, elem) {
$(elem).attr("id", "");
$(elem).attr("name", "");
}
);
$(".stepContainer .prevContainer .questionContainer").html(elem.html());
fixMainSize();
}, 600);
return;
}
window.requestAnimationFrame(animate);
});
if (!question.multiple && question.valueSelected === "") {
$(".nextQuestion").addClass("disabled");
}
else {
$(".nextQuestion").removeClass("disabled");
if (curentStep == questions.length - 1) {
$(".custom-btn-next").addClass("disabled");
}
}
$(".nextQuestionBtn").removeClass("recommendedText").removeClass("nextText");
if (step == questions.length - 1 || step == 6) {
$(".nextQuestionBtn").addClass("recommendedText");
}
else {
$(".nextQuestionBtn").addClass("nextText");
}
if (step > questions.length - 1) {
setTimeout(function () { finalstate(); }, 400);
}
if ($(window).width() < 600) {
const transition = document.querySelector('.currentContainer');
onResizeAdjustments();
transition.addEventListener('transitionend', () => {
onResizeAdjustments();
});
}
if (curentStep > 3 && questions[3].valueSelected != 0) {
var percentage = 0.42 + ((curentStep - 6) / 8) * 0.58;
}
else {
percentage = step / 7;
}
$(".progressBar .currentProgress").css("width", (percentage * 100) + "%");
fixMainSize();
}
function setMainState(newState) {
const $main = $("main");
$main.removeClass("initialState");
$main.removeClass("stepState");
$main.removeClass("finalState");
$main.removeClass("preFinalState");
$main.addClass(newState);
if (newState == "preFinalState") {
setTimeout(function () {
$main.addClass("finalState");
$main.removeClass("preFinalState");
onResizeAdjustments();
}, 10);
}
}
function radioChanged(elem, id, index) {
var question = questions[id];
if (question.multiple || questions[id].answers[index].multiple) {
questions[id].answers[index].value = elem.checked;
return;
}
if (id == 0 && index == 3) {
questions[6].answers[4].value = true;
}
questions[id].valueSelected = index;
$(".nextQuestion").removeClass("disabled");
}
function finalstate() {
renderAnswers();
var orderRadios = getRadioOrderedScore();
suggestRadios(1, orderRadios);
$("#renderedAnswers").removeClass("expanded");
$("#renderedAnswers .mCSB_container").removeClass("expanded");
setMainState("preFinalState");
$(".topContainer").addClass("survey").removeClass("all");
updateCartMobileUi();
}
function showAll() {
closeRenderedAnswers();
var orderRadios = getRadioOrderedScore();
if ($(".topContainer").hasClass("all")) {
suggestRadios(5, orderRadios);
$(".topContainer").addClass("survey").removeClass("all");
}
else {
suggestRadios("all", orderRadios);
$(".topContainer").addClass("all").removeClass("survey");
}
}
function suggestRadios(radiosToShow, orderRadios) {
if (radiosToShow == "all") {
radiosToShow = orderRadios.length
}
var rendered = "";
for (var i = 0; i < radiosToShow; i++) {
if (typeof orderRadios[i] == "undefined") continue;
var radio = orderRadios[i];
rendered = rendered + radio.render();
// console.log(radio.name, radio.id, radio.score);
}
$("#renderedRadios .mCSB_container").html(rendered)
updateCompareUi();
}
function renderAnswers() {
var rendered = "";
ansCounter = 0;
for (var i in questions) {
// for (var j in questions[i].answers) {
// questions[i].valueSelected = j;
// rendered = rendered + questions[i].rendeAns();
// }
rendered = rendered + questions[i].rendeAns();
}
rendered = `
<div class="filters renderedAnswer">
${ansCounter} Filters
</div>
` + rendered;
rendered = rendered + `<div class ="expandIcon" onclick="togglexpand(false)"></div>`;
if ($("#renderedAnswers .mCSB_container").length != 0) {
$("#renderedAnswers .mCSB_container").html(rendered);
}
else {
$("#renderedAnswers").html(rendered);
}
fixFilterSize();
}
function togglexpand(checkExpand, elem) {
event.stopPropagation();
if (checkExpand) {
if ($(elem).closest(".expanded").length != 0) return;
}
$("#renderedAnswers").toggleClass("expanded");
$("#renderedAnswers .mCSB_container").toggleClass("expanded");
}
function closeRenderedAnswers() {
$("#renderedAnswers").removeClass("expanded");
$("#renderedAnswers .mCSB_container").removeClass("expanded");
}
function getModelTier() {
var performanceScore = 0;
var powerScore = 0;
var primaryScore = 0;
if (parseInt(questions[7].valueSelected) + 1 <= 3) {
primaryScore += 10;
}
else if (parseInt(questions[7].valueSelected) + 1 <= 7) {
}
else {
performanceScore += 10;
}
if (parseInt(questions[8].valueSelected) + 1 <= 3) {
primaryScore += 10;
}
else if (parseInt(questions[8].valueSelected) + 1 <= 7) {
powerScore += 5;
performanceScore += 5;
primaryScore += 5;
}
else {
powerScore += 10;
performanceScore += 10;
}
if (parseInt(questions[9].valueSelected) + 1 <= 2) {
powerScore += 10;
primaryScore += 10;
}
else if (parseInt(questions[9].valueSelected) + 1 <= 6) {
powerScore += 5;
performanceScore += 5;
primaryScore += 5;
}
else {
performanceScore += 100;
}
if (parseInt(questions[10].valueSelected) + 1 <= 3) {
primaryScore += 5;
}
else if (parseInt(questions[10].valueSelected) + 1 <= 7) {
powerScore += 5;
performanceScore += 5;
primaryScore += 5;
}
else {
powerScore += 10;
performanceScore += 10;
}
if (questions[11].valueSelected == 0) {
powerScore += 100;
performanceScore += 100;
}
else {
primaryScore += 10;
}
// console.log("performanceScore",performanceScore);
// console.log("powerScore",powerScore);
// console.log("primaryScore",primaryScore);
if (performanceScore >= powerScore && performanceScore >= primaryScore) {
return "Performance Tier";
}
if (powerScore >= performanceScore && powerScore >= primaryScore) {
return "Power Tier";
}
return "Primary Tier";
}
function getRadioOrderedScore() {
if (questions[3].valueSelected == 1) {
return [radios[1], radios[0]];
}
return [radios[0], radios[1]];
}
function openDetails(id) {
closeRenderedAnswers();
$(".radioDetailsContent").mCustomScrollbar("scrollTo", "top");
var radio = radios[id];
$(".radioDetails .title").html(radio.getName());
$(".radioDetails .subTitle").html("Frontline safety, </br> today and tomorrow.");
if (id === 0) {
$(".radioDetails .subTitle").html("Power and performance </br> designed for extreme environments");
}
$(".radioDetails .radioDetailsImage img").attr("src", radio.getFullImageSrc()).attr("alt", radio.getName());
$(".radioDetails .radioDetailsContent .description").html(radio.getDescription());
var highlated = radio.renderHighlatedFeatures();
var nonHighlated = radio.renderNonHighlatedFeatures();
$(".radioDetails .radioDetailsContent").removeClass("zeroHighLighted");
$(".radioDetails .radioDetailsContent").removeClass("zeroNonHighLighted");
$(".radioDetails .radioDetailsContent .highLighted").html(highlated);
$(".radioDetails .radioDetailsContent .noHighLighted").html(nonHighlated);
if (highlated == "") {
$(".radioDetails .radioDetailsContent").addClass("zeroHighLighted");
}
if (nonHighlated == "") {
$(".radioDetails .radioDetailsContent").addClass("zeroNonHighLighted");
}
$("html").addClass("overlayOpen");
$(".overlay").addClass("detail");
$(".overlay").removeClass("compare");
$(".overlay").removeClass("form");
$(".overlay").removeClass("form2");
fixDetailsSize();
}
function openCompare() {
$(".compare .customScroll").mCustomScrollbar("scrollTo", "top");
closeRenderedAnswers();
$(".radioCompare").removeClass("one-radios").removeClass("two-radios").removeClass("three-radios");
if (compare.items.length == 1) {
$(".radioCompare").addClass("one-radios");
}
if (compare.items.length == 2) {
$(".radioCompare").addClass("two-radios");
}
// if (compare.items.length == 3) {
// $(".radioCompare").addClass("three-radios");
// }
$(".radioCompare").addClass("three-radios");
$(".radioCompare .descriptions").html(compare.renderDescriptions());
$(".radioCompare .higlatedFeatures").html(compare.renderHighlatedFeatures());
$(".radioCompare .images").html(compare.renderImages());
$(".radioCompare .addToCartCompare").html(compare.renderAddToCart());
$(".overlay").addClass("compare");
$(".overlay").removeClass("detail");
$(".overlay").removeClass("form");
$(".overlay").removeClass("form2");
$("html").addClass("overlayOpen");
}
function closeOverlay() {
$(".overlay").removeClass("detail");
$(".overlay").removeClass("compare");
$(".overlay").removeClass("form");
$(".overlay").removeClass("form2");
$("html").removeClass("overlayOpen");
$(".radioDetailsContent").mCustomScrollbar("scrollTo", "top");
$(".compare .customScroll").mCustomScrollbar("scrollTo", "top");
}
function addToCart(id) {
closeRenderedAnswers();
$(`.link-${id}`).addClass("added");
cart.addItem(radios[id]);
$(".cart")
.imagesLoaded()
.always(function () {
updateCartUi();
});
updateCartMobileUi();
}
function removeFromCart(id) {
closeRenderedAnswers();
cart.removeItem(radios[id]);
$(`#${radios[id]._htmlId}-cart-item`).remove();
$(".cart").attr("data-count", cart.items.length);
onResizeAdjustments();
updateCartMobileUi();
}
function updateCartMobileUi() {
if (cart.items.length == 0) {
$(".mobileCart").css("display", "none");
}
else {
$(".mobileCart").css("display", "");
}
$(".mobileCart .itemsAdded").html(`
Demo: ${cart.items.length} item${cart.items.length == 1 ? "" : "s"}
`);
}
function updateCartUi() {
if ($("#cartItemsContainer .mCSB_container").length == 0) {
$("#cartItemsContainer").html(cart.render());
}
else {
$("#cartItemsContainer .mCSB_container").html(cart.render());
}
$(".cart").attr("data-count", cart.items.length);
onResizeAdjustments();
}
function updateCompareUi() {
$("#compareCart").html(compare.render());
if (compare.items.length >= 3) {
for (var item in compare.items) {
item = compare.items[item];
$(`#radio-${item.id}-compare`).prop("checked", true);
}
$(".radioContainer .compare input:not(:checked)").parent().addClass("disabled");
$(".radioContainer .compare input:not(:checked)").addClass("disabled").prop("disabled", true);
} else {
$(".radioContainer .compare").removeClass("disabled");
$(".radioContainer .compare input").removeClass("disabled").prop("disabled", false);
}
onResizeAdjustments();
}
function addCompare(element, id) {
closeRenderedAnswers();
if (element.checked) {
compare.addItem(radios[id]);
}
else {
compare.removeItem(radios[id]);
}
updateCompareUi();
}
function requestAQuote() {
var str = "";
for (var i in questions) {
var temp = questions[i].rendeAnsData();
if (temp == "") {
continue;
}
str = `${str};${temp}`;
}
str = str.substring(1);
$("[name=questionAnswers]").val(str);
var str = "";
for (var i in cart.items) {
console.log(cart.items[i]);
var temp = cart.items[i].rendeAnsData();
if (temp == "") {
continue;
}
str = `${str};${temp}`;
}
str = str.substring(1);
$("[name=radioAnswers]").val(str);
closeRenderedAnswers();
stateValues("formContainer");
$(".overlay").addClass("form");
$(".overlay").removeClass("compare");
$(".overlay").removeClass("detail");
$("html").addClass("overlayOpen");
$(".formContainer").removeClass("thankYouMode");
}
function fixCartSize() {
var itemContainerHeight = window.innerHeight - 37 - ($(".cart").outerHeight() - $(".cart").height()) - 64;
if ($(window).width() < 600) {
itemContainerHeight = window.innerHeight - ($(".cart").outerHeight() - $(".cart").height()) - 64;
}
$(".cart").height(itemContainerHeight);
}
function fixFilterSize() {
if ($(window).width() > 600) {
if ($("#renderedAnswers").find(".mCustomScrollBox ").length != 0) {
$("#renderedAnswers").mCustomScrollbar('destroy');
}
}
if ($(window).width() < 600) {
if ($("#renderedAnswers").find(".mCustomScrollBox ").length == 0) {
$("#renderedAnswers").removeClass("expanded");
$("#renderedAnswers").mCustomScrollbar({
theme: "3d", scrollInertia: 200
});
}
}
var itemContainerHeight = window.innerHeight - 27 - ($("#renderedAnswers").outerHeight() - $("#renderedAnswers").height()) - 100;
$("#renderedAnswers").css("max-height", itemContainerHeight);
}
function fixRadioContainerSize() {
var itemContainerHeight = $(".finalContainer").outerHeight() - $(".finalContainer .topContainer").outerHeight() - 50;
$("#renderedRadios").height(itemContainerHeight);
}
function fixDetailsSize() {
var itemContainerHeight = $(".radioDetails").height() - $(".radioDetailsImage").outerHeight();
$(".radioDetailsContent").height(itemContainerHeight);
if ($(window).width() > 600) {
$(".radioDetailsContent").css("height", "");
}
}
function fixQuestionContainerSize() {
var itemContainerHeight = $(".stepContainer").height() - $(".currentContainer .sectionTitle").outerHeight(true) - $(".currentContainer .currentQuestion").outerHeight(true) - $(".currentContainer .questionActions").outerHeight(true) - $(".currentContainer .questionInfo").outerHeight(true) - 60;
$(".form-check-container").height(itemContainerHeight);
$(".form-check-container").each(function () {
if ($(this).find(".mCustomScrollBox ").length != 0) {
$(this).mCustomScrollbar('destroy');
}
}
);
if ($(window).width() > 600) {
$(".form-check-container").css("height", "");
} else {
$(".form-check-container").mCustomScrollbar({
theme: "3d", scrollInertia: 200
});
}
}
function onResizeAdjustments() {
fixCartSize();
fixRadioContainerSize();
fixDetailsSize();
fixQuestionContainerSize();
fixFilterSize();
fixMainSize();
}
function fixMainSize() {
if ($(".initialState .initialContainer").length > 0) {
var minH = $(".initialState .initialContainer").height() + 40;
}
else if ($(".stepState .currentContainer").length > 0) {
var minH = $(".stepState .currentContainer").height() + 40;
}
else {
var minH = "unset";
}
$("main").css("min-height", minH);
}
function goToAccesories() {
closeRenderedAnswers();
window.open('https://shop.motorolasolutions.com/', '_blank');
}
function headerLink() {
if (typeof isOnline != "undefined" && isOnline) {
console.log("agent online");
clickLiveAgent();
return;
}
closeRenderedAnswers();
stateValues("formContainer2");
$(".overlay").addClass("form2");
$(".overlay").removeClass("form");
$(".overlay").removeClass("compare");
$(".overlay").removeClass("detail");
$("html").addClass("overlayOpen");
$(".formContainer2").removeClass("thankYouMode");
}
function initScrols() {
$(".customScroll").each(function () {
$(this).mCustomScrollbar({
theme: "3d", scrollInertia: 200
});
});
}
function submitForm(formContainer = "formContainer") {
setTimeout(function () {
var form = $(`.${formContainer} form`);
var errors = form.find(".parsley-error").length;
if (errors == 0) {
$.post(form.attr("action"), form.serialize())
.done(function (data) { });
$(`.${formContainer}`).addClass("thankYouMode");
newPageView(`tetra_two-way_radio_finder_thankyou`);
} else {
// for validation
// $formWrapper.trigger('submit');
}
}, 500);
return false;
}
function optInCustomChanged(elem) {
elem = $(elem);
if (elem.prop("checked")) {
$("[name=emailoptout]").val("on");
$("[name=emailoptin]").val("");
} else {
$("[name=emailoptout]").val("");
$("[name=emailoptin]").val("on");
}
}
function optInCustomChanged2(elem) {
elem = $(elem);
if (elem.val() == "Opt In") {
$("[name=emailoptout]").val("");
$("[name=emailoptin]").val("on");
} else {
$("[name=emailoptout]").val("on");
$("[name=emailoptin]").val("");
}
}
function renderConsent(formContainer) {
var emailoptin = $(`.${formContainer} [name=emailoptin]`);
var country = $(`.${formContainer} select[name=country]`).val();
if (!['DE', 'CH', 'AT', 'PL', 'IT', 'CY'].includes(country)) {
emailoptin.val("on");
return `
<div class="forceFullWidth row custom-checkbox consentContainer">
<input type="checkbox" name="OptInCustom" id="OptInCustom" onChange="optInCustomChanged(this)">
<label class="elq-label" for="OptInCustom">
If you would NOT like to receive Marketing Communications from us then please CHECK THE BOX.
By submitting your personal data using this form, Motorola Solutions may contact you by EMAIL or CALL you to provide UPDATES, PRODUCT NEWS AND PROMOTIONAL MATERIALS.
To understand how Motorola Solutions uses your personal data see the Motorola Solutions <a href="https://www.motorolasolutions.com/en_xu/about/privacy-policy.html" target="_blank" data-uet="{'link-type':'link','link-label':'privacy policy','link-url':'https://www.motorolasolutions.com/en_us/about/privacy-policy.html','link-place':'1','restriction':'public','cname':'wrap-form cta','page-area':'2'}">Privacy Policy</a>.</label>
</div>
`;
}
else {
emailoptin.val("");
return `
<div class="forceFullWidth row custom-checkbox consentContainer excludes">
<label class="elq-label">
<div class="field-control-wrapper">
<input type="checkbox" name="OptInCustom" id="OptInCustom">
<select class="form-control" style="width:125px" required="" onChange="optInCustomChanged2(this)">
<option selected="selected" value="">Please Select</option>
<option value="Opt In">Opt In</option>
<option value="Opt Out">Opt Out</option>
</select>
</div>
<span class="spanLabel">
By selecting "Opt-in" and submitting your personal data, you agree that Motorola Solutions may contact you by EMAIL or CALL you to provide UPDATES, PRODUCT NEWS AND PROMOTIONAL MATERIALS.
Select "Opt-out" if you do not wish to be contacted by us. To understand how Motorola Solutions uses your personal data see the Motorola Solutions <a href="https://www.motorolasolutions.com/en_us/about/privacy-policy.html" target="_blank" data-uet="{'link-type':'link','link-label':'privacy policy','link-url':'https://www.motorolasolutions.com/en_xu/about/privacy-policy.html','link-place':'1','restriction':'public','cname':'wrap-form cta','page-area':'2'}">Privacy Policy</a>.</label>
</span>
</div>
`;
}
}
var $selectCountry = '<option value="CA">Canada</option>' + '<option value="US">United States</option>';
var $selectStatesCa = '<option value="AB">Alberta</option>' + '<option value="MB">Manitoba</option>' + '<option value="BC">British Columbia</option>' + '<option value="NB">New Brunswick</option>' + '<option value="NL">Newfoundland and Labrador</option>' + '<option value="NS">Nova Scotia</option>' + '<option value="NT">Northwest Territories</option>' + '<option value="NU">Nunavut</option>' + '<option value="ON">Ontario</option>' + '<option value="PE">Prince Edward Island</option>' + '<option value="QC">Quebec</option>' + '<option value="SK">Saskatchewan</option>' + '<option value="YT">Yukon</option>';
var $selectStatesUs = '<option value="AK">Alaska</option>' + '<option value="AL">Alabama</option>' + '<option value="AR">Arkansas</option>' + '<option value="AZ">Arizona</option>' + '<option value="CA">California</option>' + '<option value="CO">Colorado</option>' + '<option value="CT">Connecticut</option>' + '<option value="DC">D.C.</option>' + '<option value="DE">Delaware</option>' + '<option value="FL">Florida</option>' + '<option value="GA">Georgia</option>' + '<option value="HI">Hawaii</option>' + '<option value="IA">Iowa</option>' + '<option value="ID">Idaho</option>' + '<option value="IL">Illinois</option>' + '<option value="IN">Indiana</option>' + '<option value="KS">Kansas</option>' + '<option value="KY">Kentucky</option>' + '<option value="LA">Louisiana</option>' + '<option value="MA">Massachusetts</option>' + '<option value="MD">Maryland</option>' + '<option value="ME">Maine</option>' + '<option value="MI">Michigan</option>' + '<option value="MN">Minnesota</option>' + '<option value="MO">Missouri</option>' + '<option value="MS">Mississippi</option>' + '<option value="MT">Montana</option>' + '<option value="NC">North Carolina</option>' + '<option value="ND">North Dakota</option>' + '<option value="NE">Nebraska</option>' + '<option value="NH">New Hampshire</option>' + '<option value="NJ">New Jersey</option>' + '<option value="NM">New Mexico</option>' + '<option value="NV">Nevada</option>' + '<option value="NY">New York</option>' + '<option value="OH">Ohio</option>' + '<option value="OK">Oklahoma</option>' + '<option value="OR">Oregon</option>' + '<option value="PA">Pennsylvania</option>' + '<option value="RI">Rhode Island</option>' + '<option value="SC">South Carolina</option>' + '<option value="SD">South Dakota</option>' + '<option value="TN">Tennessee</option>' + '<option value="TX">Texas</option>' + '<option value="UT">Utah</option>' + '<option value="VA">Virginia</option>' + '<option value="VT">Vermont</option>' + '<option value="WA">Washington</option>' + '<option value="WI">Wisconsin</option>' + '<option value="WV">West Virginia</option>' + '<option value="WY">Wyoming</option>';
function stateValues(formContainer = "formContainer") {
var countryVal = $(`.${formContainer} select[name=country]`).val();
// var consentContainer = $(`.${formContainer} .consentContainer`);
// $(renderConsent(formContainer)).insertAfter(consentContainer);
// consentContainer.remove();
if (countryVal === "US") {
$(`.${formContainer} input[name=OptIn]`).prop("checked", true);
$(`.${formContainer} select[name=state]`).html($selectStatesUs);
$(`.${formContainer} select[name=state]`).closest(".formElement").show();
} else if (countryVal === "CA") {
$(`.${formContainer} input[name=OptIn]`).prop("checked", false);
$(`.${formContainer} select[name=state]`).html($selectStatesCa);
$(`.${formContainer} select[name=state]`).closest(".formElement").show();
} else {
$(`.${formContainer} input[name=OptIn]`).prop("checked", false);
$(`.${formContainer} select[name=state]`).html('<option value=""> State / Province</option>');
$(`.${formContainer} select[name=state]`).closest(".formElement").hide();
}
}
function gotToStart() {
curentStep = -1;
setSurveyStep();
}
function openCart() {
$(".cart").addClass("open");
fixCartSize();
}
function closeCart() {
$(".cart").removeClass("open");
}
var radios;
var questions;
var features;
var cart;
var compare;
var debug = false;
// debug = true;
function preloadImageUrl(url) {
var img = new Image();
img.src = url;
}
function trackEvent(trackingObj, type = "") {
// reusableAnalyticsEvent(act,lkCatg,lkType,lkLabel,lkUrl,lkPlace,restr,addDetail,cn,parea){
var parameter = "@" + trackingObj.category;
reusableAnalyticsEvent(trackingObj.action, trackingObj.category, trackingObj.action, trackingObj.label, parameter, "1", "public", "", trackingObj.category, "2");
}
function newPageView(url) {
if (typeof utag == "undefined") return;
utag.view({
page_name: document.title,
page_uri: `/${localeName}/webApp/${url}`,
locale: localeName,
page_type: "landing",
form_name: form_name,
campaign_code: keywords,
});
}
function trackRequestContact() {
var trackingObj = { category: "body interaction", action: "button click", label: "Request contact" };
trackEvent(trackingObj, "requestContact");
}
jQuery(function () {
if (window.location.href.includes("debug")) {
debug = true;
}
$(".formContainer select[name=country]").change(function () {
stateValues("formContainer");
});
$(".formContainer2 select[name=country]").change(function () {
stateValues("formContainer2");
});
// var checkboxElement = $(".formContainer .checkboxElement");
// checkboxElement.append($(renderConsent("formContainer")));
// var checkboxElement = $(".formContainer2 .checkboxElement");
// checkboxElement.append($(renderConsent("formContainer2")));
stateValues("formContainer");
stateValues("formContainer2");
features = initFeatures();
radios = initRadios();
questions = initQuestions();
cart = initCart();
compare = initCompare();
onResizeAdjustments();
$(window).on("resize", function () {
onResizeAdjustments();
});
updateCartUi();
initScrols();
for (var preloadImage in preloadImages) {
preloadImage = preloadImages[preloadImage];
preloadImageUrl(preloadImage);
}
setInterval(function () {
$(".formContainer form input,.formContainer form select,.formContainer2 form input,.formContainer2 form select").each(function () {
if ($(this).val() === "undefined" || $(this).val() === null) {
$(this).val("");
}
else if ($(this).val().toString().includes("~eloqua..type--e")) {
$(this).val("");
}
});
}, 1000);
if (debug) {
curentStep = 7;
curentStep = 5;
curentStep = questions.length;
questions[3].valueSelected = "0";
setSurveyStep();
return;
curentStep = questions.length;
setSurveyStep();
showAll();
// openDetails(0);
addToCart(1);
addToCart(2);
addToCart(3);
addToCart(4);
addToCart(5);
// openDetails(0);
// openCart();
// $("#radio-5-compare").prop("checked", true).trigger("change");
// $("#radio-6-compare").prop("checked", true).trigger("change");
$("#radio-14-compare").prop("checked", true).trigger("change");
$("#radio-8-compare").prop("checked", true).trigger("change");
$("#radio-13-compare").prop("checked", true).trigger("change");
return;
// requestAQuote();
// return;
openCompare();
}
$(document.body).on('mousedown', 'button[data-uetfake], a[data-uetfake], input[data-uetfake], img[data-uetfake], span[data-uetfake], div[data-uetfake]', function (e) {
if ($(e.target).attr("data-uetfake") && e.target != this) {
return;
}
if ($(this).attr("data-uetfake")) {
var uetData = $(this).attr("data-uetfake");
var uetObject = JSON.parse(uetData);
reusableAnalyticsEvent("button click", "body interaction", "button click", uetObject["link-label"], uetObject["link-url"], uetObject["link-place"], uetObject["restriction"], "", uetObject.cname, uetObject["page-area"]);
}
});
});
var preloadImages = [
"https://images.campaignresources.motorolasolutions.com/EloquaImages/clients/MotorolaSolutionsInc/%7B435abe57-01fd-4154-9f03-80886d27ec5e%7D_default.png",
"https://images.campaignresources.motorolasolutions.com/EloquaImages/clients/MotorolaSolutionsInc/%7B4c4f20bf-6b4c-4392-93be-34f49401f9e4%7D_law.png",
"https://images.campaignresources.motorolasolutions.com/EloquaImages/clients/MotorolaSolutionsInc/%7B1e8d4368-a584-4f55-9293-222c5d2c8616%7D_fire.png",
"https://images.campaignresources.motorolasolutions.com/EloquaImages/clients/MotorolaSolutionsInc/%7B07008f73-5ad3-40b8-be6b-756fc3c009e6%7D_medical.png",
"https://images.campaignresources.motorolasolutions.com/EloquaImages/clients/MotorolaSolutionsInc/%7B1923c05a-b09f-4e90-9b7d-414dd5694ee3%7D_military.png",
"https://images.campaignresources.motorolasolutions.com/EloquaImages/clients/MotorolaSolutionsInc/%7B1368faae-df1c-475f-bf0e-d2d40d602531%7D_oilAndGas.png",
"https://images.campaignresources.motorolasolutions.com/EloquaImages/clients/MotorolaSolutionsInc/%7B0e6e868b-047a-41d1-a82d-f241f144c587%7D_transportation.png",
"https://images.campaignresources.motorolasolutions.com/EloquaImages/clients/MotorolaSolutionsInc/%7B68463639-b0b0-4c67-8097-aec2ac9af101%7D_utilities.png",
"https://images.campaignresources.motorolasolutions.com/EloquaImages/clients/MotorolaSolutionsInc/%7B3ad72a7f-3a4b-4cab-a330-0b2db0ced19d%7D_hazardous.png"
];
CLICK TO CHAT
TETRA PORTABLE RADIO BUILDER
Keep personnel and communities safer with TETRA radio solutions. Build out your mission-critical solution online and see which portable radio is right for you.
This tool is designed to recommend solutions within the TETRA portfolio that may well be suited for different user profiles within your organisation. While our recommendations are based on your answers to a series of predetermined questions, we suggest the next step would be to discuss your requirements with a Motorola Solutions radio expert to verify the best solutions(s) for your organisation.
FIND YOUR RADIO
NEXT QUESTION VIEW RECOMMENDED PRODUCTS VIEW PRODUCTS
NEXT QUESTION VIEW RECOMMENDED PRODUCTS VIEW PRODUCTS