// BROWSER DETECTION function Is() { var agent = navigator.userAgent.toLowerCase(); this.major = parseInt(navigator.appVersion); this.minor = parseFloat(navigator.appVersion); this.ns = ((agent.indexOf('mozilla') != -1) && (agent.indexOf('spoofer') == -1) && (agent.indexOf('compatible') == -1) && (agent.indexOf('opera') == -1) && (agent.indexOf('webtv') == -1)); this.ns2 = (this.ns && (this.major == 2)); this.ns3 = (this.ns && (this.major == 3)); this.ns4 = (this.ns && (this.major == 4)); this.ns6 = (this.ns && (this.major >= 5)); this.opera = (agent.indexOf("opera") != -1); this.opera5 = (this.opera && (agent.indexOf("msie 6") != -1)); this.ie = (agent.indexOf("msie") != -1) && ! this.opera; this.ie3 = (this.ie && (this.major < 4)); this.ie4 = (this.ie && (this.major == 4) && (agent.indexOf("msie 5") == -1 && agent.indexOf("msie 6") == -1)); this.ie5 = (this.ie && (this.major == 4) && (agent.indexOf("msie 5") != -1)); this.ie6 = (this.ie && (this.major == 4) && (agent.indexOf("msie 6") != -1)); this.ieX = (this.ie && !this.ie3 && !this.ie4); this.win = (agent.indexOf("win")!= -1); this.mac = (agent.indexOf("mac")!= -1); this.unix = (agent.indexOf("x11")!= -1); } var is = new Is(); // Create a browser detection object if (is.ie5) { document.write('') } //footer function getWindowHeight() { var windowHeight = 0; if (typeof(window.innerHeight) == 'number') { windowHeight = window.innerHeight; } else { if (document.documentElement && document.documentElement.clientHeight) { windowHeight = document.documentElement.clientHeight; } else { if (document.body && document.body.clientHeight) { windowHeight = document.body.clientHeight; } } } return windowHeight; } function setFooter() { if (document.getElementById) { var windowHeight = getWindowHeight(); if (windowHeight > 0) { var headerHeight = document.getElementById('divHeader').offsetHeight; var contentHeight = document.getElementById('divContentArea').offsetHeight; var footerHeight = document.getElementById('footer').offsetHeight; var footerElement = document.getElementById('footer'); if ((windowHeight - headerHeight - contentHeight - footerHeight) >= 0) { footerElement.style.position = 'relative'; footerElement.style.top = (windowHeight - headerHeight - contentHeight - footerHeight) + 'px'; } else { footerElement.style.position = 'static'; } } } } window.onload = function() { if (location.href.indexOf('direct2drive.com') >= 0) { setFooter(); } } window.onresize = function() { if (location.href.indexOf('direct2drive.com') >= 0) { setFooter(); } } function terms(SiteSKUSuffix) { window.open('Sites/'+ SiteSKUSuffix + '/staticpage/tos.htm', 'terms', 'width=500, height=600, resizable=yes, scrollbars=yes'); } function screenViewer(path) { window.open('/screenviewer.aspx?p=' + path, '', 'width=1045, height=768, resizable=yes, scrollbars=yes'); } var punctuation = '.,;!? '; function trunc(s, size) { if (!size) size=20; if (s.length <= size) return s; var p = -1; for (var i = 0; i < size; i++) if (punctuation.indexOf(s.charAt(i)) != -1) p = i; if (p == -1) p = size - 1; return '' + s.substr(0,p) + '...'; }