class Rectangle { constructor(dataPath, logo) { this.dataPath = dataPath; this.logo = logo; this.name = ""; this.intro = ""; this.features = ""; this.specs = ""; this.videos = ""; this.purchase = ""; this.faq = ""; } } function dsp(loc){ if(document.getElementById){ var foc=loc.firstChild; foc=loc.firstChild.innerHTML? loc.firstChild: loc.firstChild.nextSibling; foc.innerHTML=foc.innerHTML=='+'?'-':'+'; foc=loc.parentNode.nextSibling.style? loc.parentNode.nextSibling: loc.parentNode.nextSibling.nextSibling; foc.style.display=foc.style.display=='block'?'none':'block'; } } function showLogin() { return; if (document.getElementById('loginRow').style.display == '') { document.getElementById('loginRow').style.display = 'none'; } else { document.getElementById('loginRow').style.display = ''; } adjustProductBar(0,1); // document.getElementById('loginHighlight').style.backgroundColor = 'transparent'; } function isMobile() { return false;} function loginIsShowing() { return false; } function handleInitProductPage(url) { } function getProductMenuContent() { var menu = ""; menu += ''; menu += ''; menu += '
'; menu += ''; return menu; } function loadSupportItem(url) { url = url + "?dynamic=true"; $("#mainContentDiv").load(url); } function makeFunctionCall(url) { var u = "loadSupportItem('" + url + "');" return u; } function loadForum() { location.href = "forum/index.php"; } function getSupportMenuContent() { var menu = ""; //nclick="location.href = 'www.yoursite.com';" menu += 'Forums'; menu += 'Contact Support'; menu += 'Activate'; menu += 'Register'; menu += ''; return menu; } function goHome() { removeAllSelected(); $("#mainContentDiv").load("index.php?dynamic=true"); } function hideSubMenu(item) { removeAllHighlighted(); if (item.id == "forumsLink" || item.id == "downloadsLink" || item.id == "loginLink" || item.id == "cartLink") return; if (item.id == 'subMenu') { if (!item.classList.contains('productMenu')) { //document.getElementById('subMenu').innerHTML = productMenuContents; //document.getElementById('subMenu').classList.add('productMenu'); //document.getElementById('forumsLink').classList.remove('selected'); //document.getElementById('downloadsLink').classList.remove('selected'); //document.getElementById('productMenuLink').classList.remove('selected'); //document.getElementById('supportMenuLink').classList.remove('selected'); //document.getElementById('loginLink').classList.remove('selected'); } } else { if (typeof productMenuContents === 'undefined') { if (item.id == 'forumsLink') item.classList.remove('selected'); if (item.id == 'downloadsLink') item.classList.remove('selected'); if (item.id == 'loginLink') item.classList.remove('selected'); } else { if (item.id == 'forumsLink') item.classList.remove('selected'); if (item.id == 'downloadsLink') item.classList.remove('selected'); if (item.id == 'loginLink') item.classList.remove('selected'); if (item.id != 'productMenuLink' && item.id != 'supportMenuLink') { document.getElementById('subMenu').innerHTML = productMenuContents; document.getElementById('subMenu').classList.add('productMenu'); } } } } function removeClassFromID(id, classToRemove) { var el = document.getElementById(id); if (el) { if (el.classList.contains(classToRemove)) el.classList.remove(classToRemove); } } function removeAllSelected() { removeClassFromID('productMenuLink', 'selected'); removeClassFromID('downloadsLink', 'selected'); removeClassFromID('forumsLink', 'selected'); removeClassFromID('supportMenuLink', 'selected'); removeClassFromID('loginLink', 'selected'); removeClassFromID('cartLink', 'selected'); } function removeAllHighlighted() { removeClassFromID('productMenuLink', 'highlighted'); removeClassFromID('downloadsLink', 'highlighted'); removeClassFromID('forumsLink', 'highlighted'); removeClassFromID('supportMenuLink', 'highlighted'); removeClassFromID('loginLink', 'highlighted'); removeClassFromID('cartLink', 'highlighted'); } function highlightItem(item) { removeAllHighlighted(); item.classList.add('highlighted'); } window.addEventListener('popstate', e => { window.location.replace(e.state); }); function handleShowSubMenu() { if (typeof productMenuContents !== 'undefined') { document.getElementById('subMenu').style.opacity = 1; } else { document.getElementById('subMenu').style.opacity = 0; } } function showSubMenu(item) { if (item.id == 'productMenuLink') { if (item.classList.contains('selected')) { item.classList.remove('selected'); if (typeof productMenuContents !== 'undefined' && productMenuContents) { document.getElementById('subMenu').innerHTML = productMenuContents; document.getElementById('subMenu').classList.add('productMenu'); } else { document.getElementById('subMenu').style.opacity = 0; } } else { removeAllSelected(); document.getElementById('subMenu').classList.remove('productMenu'); document.getElementById('subMenu').innerHTML = getProductMenuContent(); item.classList.add('selected'); handleShowSubMenu(); } } if (item.id == 'supportMenuLink') { if (item.classList.contains('selected')) { item.classList.remove('selected'); if (typeof productMenuContents !== 'undefined' && productMenuContents) { document.getElementById('subMenu').innerHTML = productMenuContents; document.getElementById('subMenu').classList.add('productMenu'); } else { document.getElementById('subMenu').style.opacity = 0; } } else { removeAllSelected(); document.getElementById('subMenu').classList.remove('productMenu'); document.getElementById('subMenu').innerHTML = getSupportMenuContent(); item.classList.add('selected'); handleShowSubMenu(); } } if (item.id == 'downloadsLink') { $("#mainContentDiv").load("downloads.php?dynamic=true"); removeAllSelected(); item.classList.add('selected'); document.getElementById('subMenu').style.opacity = 0; } if (item.id == 'forumsLink') { removeAllSelected(); item.classList.add('selected'); if (productMenuContents == "") document.getElementById('subMenu').style.opacity = 0; } if (item.id == 'loginLink') { if (item.classList.contains('selected')) { item.classList.remove('selected'); if (typeof productMenuContents !== 'undefined' && productMenuContents) { document.getElementById('subMenu').innerHTML = productMenuContents; document.getElementById('subMenu').classList.add('productMenu'); } else { document.getElementById('subMenu').style.opacity = 0; } } else { removeAllSelected(); document.getElementById('subMenu').classList.remove('productMenu'); document.getElementById('subMenu').innerHTML = getLoginMenuContent(); item.classList.add('selected'); handleShowSubMenu(); } //removeAllSelected(); //item.classList.add('selected'); //if (productMenuContents == "") document.getElementById('subMenu').style.opacity = 0; } if (item.id == 'cartLink') { $("#mainContentDiv").load("cart.php?dynamic=true"); removeAllSelected(); item.classList.add('selected'); } } function getMainMenuSize() { var size = 37; if (loginIsShowing()) size += 29; return size; } function menuHasFixedClass() { if (document.getElementById('subMenu')) return document.getElementById("subMenu").classList.contains('fixed-nav'); return false; } function adjustProductBar(pos, forced) { if (document.getElementById("subMenu").classList.contains("productMenu")) { // if (isMobile() == false) { var thresh = getMainMenuSize(); if (pos > thresh - 1) { if (!menuHasFixedClass()) { document.getElementById("subMenu").classList.add('fixed-nav'); if (document.getElementById('spacer')) document.getElementById('spacer').style.height = '30px' } } else if (pos < thresh) { if (menuHasFixedClass()) { document.getElementById("subMenu").classList.remove('fixed-nav'); if (document.getElementById('spacer')) document.getElementById('spacer').style.height = '0px' } } } } function showFooter() { var x = document.getElementById("footer"); if (x) { x.style.display = "block"; x.style.zIndex = "100"; } } function toggleFooter() { var x = document.getElementById("footer"); if (x) { if (x.style.display == "block") x.style.display = "none"; else x.style.display = "block"; x.style.zIndex = "100"; } } function hideFooter() { var x = document.getElementById("footer"); if (x) { if (x.style.display == "block") x.style.display = "none"; } } function isValidEmailAddress(email) { var regex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/; return regex.test(email); } function hideElement(id) { document.getElementById(id).style.display = 'none'; } window.addEventListener('scroll', function(e) { adjustProductBar(window.scrollY, 0); lastScroll = window.scrollY; hideFooter(); });