/* ============================================================
VectorVest Product Selector โ Quiz Logic
Scoped IIFE to avoid global namespace conflicts
============================================================ */
(function() {
'use strict';
var ans = { q1: null, q2: null, q3: null };
/* ---- Pick an option ---- */
window.vvPick = function(q, el) {
var opts = document.getElementById('vvQ' + q + 'Opts');
if (!opts) return;
opts.querySelectorAll('.vv-option').forEach(function(o) {
o.classList.remove('vv-selected');
});
el.classList.add('vv-selected');
ans['q' + q] = el.getAttribute('data-val');
var btn = document.getElementById('vvBtn' + q);
if (btn) btn.disabled = false;
};
/* ---- Navigate to a question step ---- */
window.vvGoTo = function(step) {
document.querySelectorAll('.vv-question-panel').forEach(function(p) {
p.classList.remove('vv-active');
});
var panel = document.getElementById('vvQ' + step);
if (panel) panel.classList.add('vv-active');
vvSetProgress(step);
document.getElementById('vv-quiz-anchor').scrollIntoView({ behavior: 'smooth', block: 'nearest' });
};
/* ---- Update progress dots & fill ---- */
function vvSetProgress(step) {
[1, 2, 3].forEach(function(i) {
var dot = document.getElementById('vvDot' + i);
if (!dot) return;
dot.classList.remove('active', 'complete');
if (i < step) dot.classList.add('complete');
else if (i === step) dot.classList.add('active');
});
var pct = { 1: 0, 2: 50, 3: 100, 4: 100 };
var fill = document.getElementById('vvProgressFill');
if (fill) fill.style.width = (pct[step] || 0) + '%';
}
function vvColIndex(q1, q2, q3) {
if (q1 === 'advanced' && q2 === 'power' && q3 === 'windows') return 2; // VV7
if (q1 === 'advanced' && (q2 === 'power' || q2 === 'mobile') && q3 === 'phone') return 2; // VV7
return 1; // Market Launchpad (all other paths)
}
/* ---- Show result ---- */
window.vvReveal = function() {
document.querySelectorAll('.vv-question-panel').forEach(function(p) {
p.classList.remove('vv-active');
});
[1, 2, 3].forEach(function(i) {
var dot = document.getElementById('vvDot' + i);
if (dot) { dot.classList.remove('active'); dot.classList.add('complete'); }
});
var fill = document.getElementById('vvProgressFill');
if (fill) { fill.style.width = '100%'; fill.classList.add('vv-fill-done'); }
var resultEl = document.getElementById('vvResult');
resultEl.innerHTML = vvRoute(ans.q1, ans.q2, ans.q3);
var col = vvColIndex(ans.q1, ans.q2, ans.q3);
document.querySelectorAll('#vv-selector .vv-table tr').forEach(function(row) {
var cells = row.querySelectorAll('th, td');
if (cells[col]) cells[col].classList.add('vv-col-highlight');
});
resultEl.classList.add('vv-active');
resultEl.scrollIntoView({ behavior: 'smooth', block: 'start' });
};
/* ---- Restart quiz ---- */
window.vvRestart = function() {
ans = { q1: null, q2: null, q3: null };
document.querySelectorAll('#vv-selector .vv-col-highlight').forEach(function(el) {
el.classList.remove('vv-col-highlight');
});
var fill2 = document.getElementById('vvProgressFill');
if (fill2) fill2.classList.remove('vv-fill-done');
var resultEl = document.getElementById('vvResult');
resultEl.classList.remove('vv-active');
resultEl.innerHTML = '';
[1, 2, 3].forEach(function(q) {
var opts = document.getElementById('vvQ' + q + 'Opts');
if (opts) opts.querySelectorAll('.vv-option').forEach(function(o) { o.classList.remove('vv-selected'); });
var btn = document.getElementById('vvBtn' + q);
if (btn) btn.disabled = true;
});
vvGoTo(1);
};
/* ==========================================================
ROUTING LOGIC
==========================================================
Priority order:
1. Mac/browser โ always Market Launchpad
(with "trap" note if they wanted advanced power)
2. Advanced + power + Windows โ VectorVest 7
3. Advanced + (power or mobile) + Phone โ VV7 + Advisory App
4. Phone + simple/guided โ Market Launchpad (browser now)
+ ML Mobile App coming soon note
5. Everything else โ Market Launchpad
========================================================== */
function vvRoute(q1, q2, q3) {
/* --- Mac/Browser: always Market Launchpad --- */
if (q3 === 'mac') {
if (q2 === 'power' || q1 === 'advanced') {
/* Mac trap: they wanted advanced/power but are on Mac */
return vvBuild({
tag: 'Heads-Up for Mac Users',
tagColor: '#EF8200',
tagBg: '#fff3e0',
heading: 'Important: VectorVest 7 is Windows-only.',
subheading: 'The good news โ Market Launchpad delivers the same core VSTโข analysis in your browser, on any device, including Mac.',
name: 'Market Launchpad',
nameSub: 'Browser-Based ยท Mac & Any Device',
desc: 'VectorVest 7 is a Windows desktop application and cannot run on a Mac. Market Launchpad brings the same proven VSTโข engine into a sleek, full-featured web app โ no software to install. Get stock ratings, market timing signals, curated screeners, and built-in education from any browser.',
why: 'Why not VectorVest 7? VV7 is Windows-only and will not run natively on a Mac. Market Launchpad gives you equivalent core analysis power optimized for the browser โ accessible on any device, always up to date, no install required.',
features: ['VSTโข Stock Ratings on 9,500+ Stocks', 'One Clear Market Timing Signal', '3 Proven Curated Screeners', 'Works in Any Browser (Mac, iPad, etc.)', 'Built-In Real-Time Education'],
price: '$49.99/month',
trial: { url: 'https://www.vectorvest.com/mlp-trial/', label: 'Start 30-Day Trial โ $0.99' },
learn: { url: 'https://www.vectorvest.com/market-launchpad/', label: 'Learn More' },
companion: null
});
}
/* Simple Mac user */
return vvBuild({
tag: 'Your Match',
heading: 'Market Launchpad is built for you.',
subheading: 'Simple, powerful, and fully browser-based โ no downloads, no Windows required.',
name: 'Market Launchpad',
nameSub: 'Browser-Based ยท Mac, iPad, Any Device',
desc: 'Market Launchpad distills 30+ years of VectorVest research into one clear daily signal: Safe to Buy, Get Ready, Hold, or Be Defensive. Three curated top strategies surface the best stock picks automatically. Spend 10 minutes a day โ and invest with confidence.',
why: 'Why Market Launchpad? You want a guided, proven strategy on a Mac โ and Market Launchpad is the perfect fit. It runs entirely in your browser with no installation and delivers the full power of VectorVest\'s VSTโข engine in a clean, intuitive interface.',
features: ['One Clear Market Timing Signal', '3 Proven Screener Strategies', 'VSTโข Ratings on 9,500+ Stocks', 'Built-In Real-Time Education', 'No Download ยท Any Browser'],
price: '$49.99/month',
trial: { url: 'https://www.vectorvest.com/mlp-trial/', label: 'Start 30-Day Trial โ $0.99' },
learn: { url: 'https://www.vectorvest.com/market-launchpad/', label: 'Learn More' },
companion: null
});
}
/* --- Advanced + Power + Windows โ VectorVest 7 --- */
if (q1 === 'advanced' && q2 === 'power' && q3 === 'windows') {
return vvBuild({
tag: 'Your Match',
heading: 'VectorVest 7 is built for you.',
subheading: 'You\'re an experienced investor on Windows who wants the full analytical toolkit. VV7 is VectorVest\'s most powerful platform.',
name: 'VectorVest 7',
nameSub: 'Windows Desktop ยท Full Analytical Power',
desc: 'VectorVest 7 is the flagship desktop platform for serious investors. Analyze 16,000+ stocks with 41 proprietary parameters, build unlimited custom screeners, automate your strategy with AutoTimer, and connect directly to TradeStation, Interactive Brokers, or Questrade for seamless execution.',
why: 'Why VV7? You want depth, customization, and automation โ not a curated experience. VV7 puts every tool in your hands: 380+ screeners, a custom screener builder, advanced charting, RealTime Derby, RoboTrader, and direct broker integration.',
features: ['380+ Screeners + Custom Builder', '16,000+ Stocks Analyzed Daily', 'AutoTimer Strategy Automation', 'Brokerage Integration (TradeStation, IBKR)', 'Advanced Charting & Technical Analysis'],
price: '$99/month (Enhanced)',
trial: { url: 'https://www.vectorvest.com/ecomm/', label: 'Start 30-Day Trial โ $0.99' },
learn: { url: 'https://www.vectorvest.com/products/', label: 'Explore VectorVest 7' },
companion: null
});
}
/* --- Advanced + (power or mobile) + Phone โ VV7 + Stock Advisory App --- */
if (q1 === 'advanced' && (q2 === 'power' || q2 === 'mobile') && q3 === 'phone') {
return vvBuild({
tag: 'Your Match',
heading: 'VectorVest 7 + Stock Advisory App.',
subheading: 'You want advanced power tools and mobile access. This combination gives you the full VectorVest experience, desktop and phone.',
name: 'VectorVest 7 + Stock Advisory App',
nameSub: 'Windows Desktop ยท iOS & Android',
desc: 'VectorVest 7 is your power base on Windows โ with 380+ screeners, custom strategy builder, and direct brokerage integration. The Stock Advisory Mobile App keeps you connected on your phone with real-time market timing alerts, stock pick lists, exclusive graphs, and TradeNow broker access.',
why: 'Why this combination? You need the full analytical horsepower of VV7 for building and running strategies, plus real-time mobile access when you\'re away from your desk. The Stock Advisory App is included with your VV7 subscription.',
features: ['Custom Screeners & Strategy Builder', 'AutoTimer Automation', 'Brokerage Integration', 'Mobile Market Timing Alerts', 'TradeNow Mobile Broker Access'],
price: '$99/month (VV7 Enhanced)',
trial: { url: 'https://www.vectorvest.com/ecomm/', label: 'Start 30-Day Trial โ $0.99' },
learn: { url: 'https://www.vectorvest.com/products/', label: 'Explore VectorVest 7' },
companion: {
icon: '๐ฑ',
alert: false,
title: 'Stock Advisory Mobile App',
badge: null,
desc: 'Available on iOS & Android. Included with your VV7 subscription โ get market timing alerts, curated stock pick lists, exclusive price/timing graphs, and TradeNow brokerage access right from your phone.',
link: { url: 'https://www.vectorvest.com/stock-advisory/', label: 'Learn about the App' }
}
});
}
/* --- Phone + simple/guided โ Market Launchpad (browser) + ML App coming soon --- */
if (q3 === 'phone') {
return vvBuild({
tag: 'Your Match',
heading: 'Start with Market Launchpad โ it works on your phone now.',
subheading: 'Market Launchpad is fully browser-based, so it runs in Safari or Chrome on your phone today. The dedicated mobile app is coming soon.',
name: 'Market Launchpad',
nameSub: 'Browser-Based ยท Works in Mobile Browser Now',
desc: 'Market Launchpad is a web app โ which means you can access it right now from your phone\'s browser. Log in, check the single market timing indicator, and see your top stock picks in under 10 minutes. No app install needed to get started.',
why: 'Why Market Launchpad? You want simplicity and mobile access. Market Launchpad works in any mobile browser today, and a dedicated native app is in development โ so your mobile experience will only get better.',
features: ['Works in Mobile Browser Today', 'One Clear Market Timing Signal', '3 Proven Top Screeners', 'VSTโข Ratings on 9,500+ Stocks', 'Built-In Real-Time Education'],
price: '$49.99/month',
trial: { url: 'https://www.vectorvest.com/mlp-trial/', label: 'Start 30-Day Trial โ $0.99' },
learn: { url: 'https://www.vectorvest.com/market-launchpad/', label: 'Learn More' },
companion: {
icon: '๐',
alert: true,
title: 'Market Launchpad Mobile App',
badge: 'Coming Soon',
desc: 'A dedicated native mobile app for Market Launchpad is in development for iOS & Android. It will bring the full Market Launchpad experience to your phone with a native interface optimized for mobile investing.',
link: { url: 'https://www.vectorvest.com/market-launchpad-mobile-app/', label: 'Join the waitlist' }
}
});
}
/* --- Default: Market Launchpad (Windows + simple/guided, or any other combo) --- */
return vvBuild({
tag: 'Your Match',
heading: 'Market Launchpad is your ideal starting point.',
subheading: 'Clear signals, a proven strategy, and a platform designed to make investing simple and confident.',
name: 'Market Launchpad',
nameSub: 'Browser-Based ยท Any Device',
desc: 'Market Launchpad distills VectorVest\'s 30+ years of stock analysis into one clear daily signal. Three curated top strategies surface the best stock picks. Built-in real-time education teaches you as you go. All from your browser โ no software install, 10 minutes a day.',
why: 'Why Market Launchpad? You want a proven, guided approach โ not the complexity of 380+ screeners and custom strategy builders. Market Launchpad gives you everything you need to make confident decisions, on any device, with a clear next step every day.',
features: ['One Clear Market Timing Signal', '3 Proven Screener Strategies', 'VSTโข Ratings on 9,500+ Stocks', 'Built-In Real-Time Education', 'Any Device ยท No Download Required'],
price: '$49.99/month',
trial: { url: 'https://www.vectorvest.com/mlp-trial/', label: 'Start 30-Day Trial โ $0.99' },
learn: { url: 'https://www.vectorvest.com/market-launchpad/', label: 'Learn More' },
companion: null
});
}
/* ---- Build result HTML ---- */
function vvBuild(d) {
var tagStyle = d.tagColor
? 'background:' + d.tagBg + ';color:' + d.tagColor + ';'
: 'background:#e0f8ee;color:#00C064;';
var features = (d.features || []).map(function(f) {
return '' + f + '';
}).join('');
var companion = '';
if (d.companion) {
var badgeHtml = d.companion.badge
? ' ' + d.companion.badge + ''
: '';
var linkHtml = d.companion.link && !d.companion.badge
? ' ' + d.companion.link.label + ' โ'
: '';
companion =
'