var w = window.innerWidth; var h = window.innerHeight; var menuHeight = 600; var orgOffset = 284; var isSecure = location.pathname.toLowerCase().indexOf("secure") >= 0; if (isSecure) { menuHeight += 48; orgOffset += 48; } function isMobile() { return false; } //console.log(isSecure); $(function () { $('#mainLayout').w2layout({ name: 'mainLayout', panels: [ { type: 'top', size: 40 }, { type: 'left', size: 300, resizable: false }, { type: 'main' }, { type: 'bottom', size: 20, resizable: false } ] }); }); function initPage() { var head = '
'; head += '
'; head += ' '; head += '
'; head += '
'; head += '    SECOND AND GOAL SOFTWARE'; head += '
'; head += '
'; head += '
'; head += 'PUBLISHERS '; head += 'OF '; head += 'SCOREMASTER '; head += 'LEAGUE '; head += 'MANAGEMENT '; head += 'SERVICE '; head += '
'; var src = 'Home.aspx'; if (isSecure) { src = 'HomeSecure.aspx'; } w2ui.mainLayout.content('top', head); w2ui.mainLayout.content('left', '
'); w2ui.mainLayout.content('main', '' ); var currentYear = (new Date).getFullYear(); w2ui.mainLayout.content('bottom', ''); ResizeElements('init'); buildMenu(); } function ResizeElements(action) { w = window.innerWidth; h = window.innerHeight; w -= 20; h -= 20; document.getElementById('mainLayout').style.minWidth = (w.toString() + 'px'); document.getElementById('mainLayout').style.minHeight = (h.toString() + 'px'); w -= 318; h -= 72; document.getElementById('menu').style.minHeight = ((h - 20).toString() + 'px'); document.getElementById('menu').style.maxHeight = ((h - 20).toString() + 'px'); document.getElementById('mainContent').style.minHeight = (h.toString() + 'px'); document.getElementById('mainContent').style.minWidth = (w.toString() + 'px'); document.getElementById('mainContent').style.maxWidth = ((w + 1).toString() + 'px'); } function buildMenu() { $('#menu').w2sidebar({ name: 'sidebar', img: null, nodes: [ { id: 'mnu-1', text: 'Second and Goal', expanded: true, group: true, nodes: [ ] } ], onClick: function (event) { var act = event.target; var page = act.split("-"); var target = ''; //console.log(page[page.length - 1]); //console.log(page[page.length - 1].indexOf("none")); if (page[page.length - 1].indexOf("none") < 0) { target = page[page.length - 1] + '.aspx'; if (target != '' && target != '.aspx') { console.log(target); document.getElementById('mainContent').setAttribute("src", target); } } }, onExpand: function (event) { if (isSecure) { //collapseOthers(event.target, 'sidebar'); } } }); w2ui['sidebar'].add('mnu-1', { id: 'mnu-1-Home', text: 'Home', icon: 'fa-cog' }); w2ui['sidebar'].add('mnu-1', { id: 'mnu-1-none1', text: 'ScoreMaster', icon: 'fa-cog', expanded: true }); w2ui['sidebar'].add('mnu-1-none1', { id: 'mnu-1-Product', text: 'Product Info', icon: 'fa-search' }); w2ui['sidebar'].add('mnu-1-none1', { id: 'mnu-1-Testimonials', text: 'Testimonials', icon: 'fa-search' }); w2ui['sidebar'].add('mnu-1-none1', { id: 'mnu-1-Access', text: 'Scoremaster Access', icon: 'fa-plus' }); w2ui['sidebar'].add('mnu-1', { id: 'mnu-1-none2', text: 'Company', icon: 'fa-cog', expanded: true }); w2ui['sidebar'].add('mnu-1-none2', { id: 'mnu-1-About', text: 'About Us', icon: 'fa-search' }); w2ui['sidebar'].add('mnu-1-none2', { id: 'mnu-1-Contact', text: 'Contact Us', icon: 'fa-plus' }); }