// JavaScript Document// Open PDF & Word in New Window var isOpera = false; var agt = navigator.userAgent.toLowerCase(); if(agt.indexOf("opera") != -1) { isOpera = true; } function onloadDocuments(){ if(document.getElementById && isOpera == false) { TJKpopAppPdf(); } } function TJKpopAppPdf(){ //var zA=document.getElementsByTagName("a"); if(document.getElementById("homeContent") || document.getElementById("content")) { if(document.getElementById("homeContent")){ var zA = document.getElementById("homeContent").getElementsByTagName("a"); } else if(document.getElementById("content")){ var zA = document.getElementById("content").getElementsByTagName("a"); } for (var i=0;i= 0 || zA[i].getAttribute("href").toUpperCase().indexOf("PDF/") >= 0)){ zA[i].title+=" This is a link to a PDF document and will open in a new browser window"; if(!zA[i].className) zA[i].className = "pdf"; zA[i].onclick=function() { newWin=window.open(this.href,"TJKWin","scrollbars=yes,menubar=yes,toolbar=yes,address=yes,location=yes,resizable=yes,status=yes"); if( window.focus){ newWin.focus() } return false; } } else if (zA[i].getAttribute("href") != null && (zA[i].getAttribute("href").toUpperCase().indexOf(".DOC") >= 0 || zA[i].getAttribute("href").toUpperCase().indexOf("DOC/") >= 0)){ zA[i].title+=" This is a link to a Microsoft Word document and will open in a new browser window"; if(!zA[i].className) zA[i].className = "doc"; zA[i].onclick=function() { newWin=window.open(this.href,"TJKWin","scrollbars=yes,menubar=yes,toolbar=yes,address=yes,location=yes,resizable=yes,status=yes"); if( window.focus){ newWin.focus() } return false; } } else if (zA[i].getAttribute("href") != null && (zA[i].getAttribute("href").toUpperCase().indexOf(".XLS") >= 0 || zA[i].getAttribute("href").toUpperCase().indexOf("XLS/") >= 0)){ zA[i].title+=" This is a Microsoft Excel document and will open in a new browser window"; if(!zA[i].className) zA[i].className = "xls"; zA[i].onclick=function() { newWin=window.open(this.href,"TJKWin","scrollbars=yes,menubar=yes,toolbar=yes,address=yes,location=yes,resizable=yes,status=yes"); if( window.focus){ newWin.focus() } return false; } } else if (zA[i].getAttribute("href") != null && (zA[i].getAttribute("href").toUpperCase().indexOf(".TR5") >= 0 || zA[i].getAttribute("href").toUpperCase().indexOf("TR5/") >= 0)){ zA[i].title+=" This is a Trim pointer and will open Trim desk drawer"; if(!zA[i].className) zA[i].className = "trim"; zA[i].onclick=function() { newWin=window.open(this.href,"TJKWin","scrollbars=yes,menubar=yes,toolbar=yes,address=yes,location=yes,resizable=yes,status=yes"); if( window.focus){ newWin.focus() } return false; } } else if(zA[i].getAttribute("href") != null && zA[i].getAttribute("href").indexOf("mailto:") >= 0 ) { zA[i].title+=" This is a email link"; if(!zA[i].className) zA[i].className = "email"; } } if(document.getElementById("footerCentre")) { var footerLinks = document.getElementById("footerCentre").getElementsByTagName("a"); for(i=0; i<=footerLinks.length-1; i++) { if(footerLinks[i].getAttribute("href") != null && footerLinks[i].getAttribute("href").indexOf("mailto:") >= 0 ) { if(!footerLinks[i].className) { footerLinks[i].title += " This is a email link"; footerLinks[i].className = "emailL"; } } } } if(document.getElementById("footerCenterHome")) { var footerLinks = document.getElementById("footerCenterHome").getElementsByTagName("a"); for(i=0; i<=footerLinks.length-1; i++) { if(footerLinks[i].getAttribute("href") != null && footerLinks[i].getAttribute("href").indexOf("mailto:") >= 0 ) { if(!footerLinks[i].className) { footerLinks[i].title += " This is a email link"; footerLinks[i].className = "emailL"; } } } } } } window.onload=function(){ onloadDocuments(); }