/** * Copyright (c) 2004-2017 Omnitracs, LLC. All rights reserved. * Confidential and Proprietary - Omnitracs, LLC. * This software may be subject to U.S. and international export, re-export, or transfer * ("export") laws. * Diversion contrary to U.S. and international laws is strictly prohibited. */ function openwin(filename, section) { // window.iWeb.help.path is defined in sharedWeb\WebContent\tiles\imports.jsp if (window.iWeb && window.iWeb.help && window.iWeb.help.path) { filename = window.iWeb.help.path + filename; } //if "section" was passed, then add section to the URL to link to specific location on page if (window.iWeb && window.iWeb.help && section) { filename += section; } var width = 800; var height = 600; c_openwin(filename, width, height); } function c_openwin(filename, width, height) { if (isMobileUser == 'true') { openMobileWindow(filename); } else { var winRef; winRef = window.open(filename, 'MyNewWindowName', 'fullscreen=no, toolbar=yes, status=no, menubar=no, scrollbars=yes, resizable=yes, directories=no, location=no, width=' + width + ', height=' + height + ', left=100, top=200'); try { winRef.focus(); } catch (exception) { // winRef is sometimes null? } } } // Creates a new tab for the file for mobile devices function openMobileWindow(filename) { // Create a new link with the appropriate target and location var helpAnchor = document.createElement('a'); helpAnchor.id = 'helpAnchor'; helpAnchor.target = '_blank'; helpAnchor.href = filename; helpAnchor.className = 'hidden'; document.body.insertBefore(helpAnchor, document.body.firstChild); // Click the help link helpAnchor.click(); // Remove the link from the page. helpAnchor.parentNode.removeChild(helpAnchor); }