function fileLinks() { var fileLink; if (document.getElementsByTagName('a')) { for (var i = 0; (fileLink = document.getElementsByTagName('a')[i]);i++) { if (fileLink.href.indexOf('.pdf') != -1) { fileLink.setAttribute('target', '_blank'); fileLink.className = 'pdfLink'; } if (fileLink.href.indexOf('.doc') != -1) { fileLink.setAttribute('target', '_blank'); fileLink.className = 'docLink'; } if (fileLink.href.indexOf('.zip') != -1) { fileLink.className = 'zipLink'; } } } } function tableruler() { if (document.getElementById && document.createTextNode) { var tables=document.getElementsByTagName('table'); for (var i=0;i= 0 ) { oImgBlockElem.className = oImgBlockElem.className + " leftjust"; oImgElem.className = oImgElem.className.replace("leftjust",""); } if( oImgElem.className.search("rightjust") >= 0 ) { oImgBlockElem.className = oImgBlockElem.className + " rightjust"; oImgElem.className = oImgElem.className.replace("rightjust",""); } var oHandle = oImgElem; if( oImgElem.parentNode.tagName == "A" ) { oHandle = oImgElem.parentNode; } var oPhotoShadowElem = document.createElement("div"); oPhotoShadowElem .className = "photoshadow"; var oOldHandle = oHandle.parentNode.replaceChild(oImgBlockElem,oHandle); if( false ) { oImgBlockElem.appendChild(oPhotoShadowElem); oPhotoShadowElem.appendChild(oOldHandle); } else { oImgBlockElem.appendChild(oOldHandle); } oHandle=null; var oCaptionElem = document.createElement("div"); oCaptionElem.className = "caption"; oCaptionElem.style.marginLeft = oImgElem.style.marginLeft; var oCaptionTextElem = document.createElement("div"); oCaptionTextElem.className = "caption-text"; var oCaptionText = document.createTextNode( oImgElem.alt ); oCaptionTextElem.appendChild(oCaptionText ); oCaptionElem.appendChild(oCaptionTextElem); oImgBlockElem.appendChild(oCaptionElem); with(oImgElem.style) { oCaptionElem.style.width = (oImgElem.scrollWidth)+"px"; } oImgBlockElem.style.width = (oImgElem.scrollWidth)+"px"; return true; } function addCaps() { var i=0; var oImg; for( i=0; i= 0 ) { addCaption(oImg,true); } } return true; } function addEvent(obj, evType, fn){ if (obj.addEventListener){ obj.addEventListener(evType, fn, false); return true; } else if (obj.attachEvent){ var r = obj.attachEvent("on"+evType, fn); return r; } else { return false; } } var newWindow = null; function closeWin(){ if (newWindow != null){ if(!newWindow.closed) newWindow.close(); } } function popUpWin(url, type, strWidth, strHeight){ closeWin(); type = type.toLowerCase(); if (type == "fullscreen"){ strWidth = screen.availWidth; strHeight = screen.availHeight; } var tools=""; if (type == "standard") tools = "resizable,toolbar=yes,location=yes,scrollbars=yes,menubar=yes,width="+strWidth+",height="+strHeight+",top=0,left=0"; if (type == "tour") tools = "resizable,toolbar=no,location=no,scrollbars=no,menubar=yes,width="+strWidth+",height="+strHeight+",top=0,left=0"; if (type == "elastic") tools = "resizable,toolbar=no,location=no,scrollbars=yes,menubar=yes,width="+strWidth+",height="+strHeight+",top=0,left=0"; if (type == "console" || type == "fullscreen") tools = "resizable,toolbar=no,location=no,menubar=no,scrollbars=no,width="+strWidth+",height="+strHeight+",left=0,top=0"; newWindow = window.open(url, 'newWin', tools); newWindow.focus(); } function doPopUp(e) { var t = "standard"; var w = "800"; var h = "600"; //look for parameters attribs = this.rel.split(" "); if (attribs[1]!=null) {t = attribs[1];} if (attribs[2]!=null) {w = attribs[2];} if (attribs[3]!=null) {h = attribs[3];} //call the popup script popUpWin(this.href,t,w,h); //cancel the default link action if pop-up activated if (window.event) { window.event.returnValue = false; window.event.cancelBubble = true; } else if (e) { e.stopPropagation(); e.preventDefault(); } } function findPopUps() { var popups = document.getElementsByTagName("a"); for (i=0;i