var bugRiddenCrashPronePieceOfJunk = ( navigator.userAgent.indexOf('MSIE 5') != -1 && navigator.userAgent.indexOf('Mac') != -1 ); var W3CDOM = (!bugRiddenCrashPronePieceOfJunk && document.getElementsByTagName && document.createElement); if ((top != self.parent) && !self.disabled) top.location.href = '/index.html'; if (top.navi && top.navi.setNav) top.navi.setNav(location.href,'currentPage'); top.setNav = location.href; window.onload = initialize; /* Why no window.onload = function () {} ? Because NN3 doesn't support the function constructor and gives an error message. This site must be accessible to NN3 */ function initialize () { /* Hide nifty stuff from old browsers */ if (W3CDOM) { /* Go through all links. If any has a type="popup" write the popup function into its onclick Any external link gets a target='ppk'. Any link with a hreflang attribute gets an extra note with its value. */ var langspan = document.createElement('span'); langspan.className = 'smaller lang'; var x = document.getElementsByTagName('a'); for (var i=0;i' + y[i].getAttribute('rel') + ''; } links += '
'; links += 'home'; links += 'sitemap'; links += 'contact'; links += 'copyright'; /* Write navigation bar and last modifier information into p id="header". If the page is not in my frameset, add note and link to that effect. */ if (document.getElementById('header')) { document.getElementById('header').innerHTML = lastMod(); //+ links; if (!top.quirksMode) document.getElementById('header').innerHTML += '
This page is supposed to be in my frameset.'; } /* Write message and navigation bar into div id="footer" */ if (document.getElementById('footer')) { var valid = document.getElementById('validation'); if (valid) { valid = valid.cloneNode(true); valid.onmouseover = function () { this.style.color = '#333333'; } valid.onmouseout = function () { this.style.color = ''; } } document.getElementById('footer').innerHTML = links; if (valid) document.getElementById('footer').appendChild(valid); } /* Add breadcrumb of current page to logo frame */ if (top.logo && top.logo.addBreadCrumb) top.logo.addBreadCrumb(document.title,location.href); /* Add IE version to page title */ var browser = ''; if (document.all) { detect = navigator.userAgent.toLowerCase(); if (checkItLocal('msie')) { browser = "IE " browser += detect.substr(placeOfDetect + thestring.length,3); document.title = browser + ' - ' + document.title; } } /* Create a table of contents */ if (browser != 'IE 5.0') // IE 5.0 Win hides all floats and most long code examples when we run this script createTOC(); // doCompatScore(); /* End hide. This is for all browsers If the page has an init() function, execute it */ } if (self.init) self.init(); } window.onunload = remove; function remove () { if (top.navi && top.navi.setNav) top.navi.setNav(location.href,''); top.setNav = ''; if (self.exit) self.exit(); } // Table of Contents function createTOC() { if (top.bugRiddenCrashPronePieceOfJunk) return; var x = document.body.childNodes; var y = document.createElement('div'); y.id = 'toc'; var a = y.appendChild(document.createElement('span')); a.onclick = showhideTOC; a.className = 'contentheader'; a.innerHTML = 'Contents'; var z = y.appendChild(document.createElement('div')); z.onclick = showhideTOC; var toBeTOCced = getElementsByTagNames('h2,h3,h4'); // for (var i=0;i 730) { daysago = Math.floor(daysago/365); unit = 'years'; } else if (daysago > 60) { daysago = Math.floor(daysago/30); unit = 'months'; } else if (daysago > 14) { daysago="Math.floor(daysago/7);" unit="weeks" } var towrite="Page last changed " ; if (daysago="=" 0) towrite +="today" ; else if (daysago="=" 1) towrite +="yesterday" ; else towrite +="daysago" + ' ' + unit + ' ago'; return towrite; } function takeYear(theDate) { var x="theDate.getYear();" var y="x" % 100; y +="(y" < 38) ? 2000 : 1900; return y; } // Popup var popUp = null; function pop(url) { if (popUp && !popUp.closed) popUp.location.href = url; else popUp = window.open(url,'popUp','height=500,width=700,scrollbars=yes,resizable=yes,toolbar=yes,location=yes'); popUp.focus(); return false; } // Cookies function createCookie(name,value,days) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; } function readCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return null; } function eraseCookie(name) { createCookie(name,"",-1); } function checkItLocal(string) { placeOfDetect = detect.indexOf(string) + 1; thestring = string; return placeOfDetect; } function getElementsByTagNames(list,obj) { if (!obj) var obj = document; var tagNames = list.split(','); var resultArray = new Array(); for (var i=0;i>