var dir = location.href.substring(0,location.href.lastIndexOf('\/'));
var baseref="<base href='"+dir+"/'>\n";var url = location.href.substring(dir.length,location.href.length+1); var args = location.search.substr(1).split("?");
if (top.location != self.location && args != "fm" && args != "f") top.location = self.location;
function xx(n) {var a = new RegExp('lga');var d = location.href;c = d.search(a);b = d.search(/^http:/);if (c > 0 && b == 0) {z = unescape(n);var y = "";for (i=0; i<z.length;i++) {y += String.fromCharCode(z.charCodeAt(i)-1);} document.write(unescape(y));}}

document.write('<link rel="home" href="index.html" \/><link rel="index" href="site.htm" \/><link rel="glossary" href="terms.htm" \/><link rel="author" href="http:\/\/www.felgall.com\/steve.htm" \/><link rel="search" href="search.htm" \/><link rel="contents" href="article.htm" \/><link rel="first" href="new.htm" \/>');if (url == '\/index.html' || url == '\/'){document.writeln('<link rel="next" href="article.htm" \/>');}

// test date format and create last updated message
// assumes date is in a format that matches one of the five tested browsers
// copyright September 2000 by Stephen Chapman
function lastMod() {
var thisdir = location.href.substring(0,location.href.lastIndexOf('\/'));
var thisurl = location.href.substring(thisdir.length,location.href.length+1);
if (thisurl.substring(url.length - 3) == 'php') return;
// create last modified on reference
updateText = 'This page was last updated on ';dateStart = 0;var monthname = new Array ('January','February','March','April','May','June','July','August','September','October','November','December');
// test if date in netscape communicator 4.73 format (tested on Windows 95)
if (document.lastModified.substring(6,7) == ',') // Sunday Monday Friday
dateStart = 8;
else if (document.lastModified.substring(7,8) == ',') // Tuesday
dateStart = 9;
else if (document.lastModified.substring(8,9) == ',') // Thursday Saturday
dateStart = 10;
else if (document.lastModified.substring(9,10) == ',') // Wednesday
dateStart = 11;
if (dateStart > 0){var datelen;if (document.lastModified.substring(dateStart+6,dateStart+7) == ',')        // May
datelen = dateStart + 13;
else if (document.lastModified.substring(dateStart+7,dateStart+8) == ',')   // June July
datelen = dateStart + 14;
else if (document.lastModified.substring(dateStart+8,dateStart+9) == ',')   // March April
datelen = dateStart + 15;
else if (document.lastModified.substring(dateStart+9,dateStart+10) == ',')  // August
datelen = dateStart + 16;
else if (document.lastModified.substring(dateStart+10,dateStart+11) == ',') // January October
datelen = dateStart + 17;
else if (document.lastModified.substring(dateStart+11,dateStart+12) == ',') // February November December
datelen = dateStart + 18;
else if (document.lastModified.substring(dateStart+12,dateStart+13) == ',') // September
datelen = dateStart + 19;
writeText = updateText + document.lastModified.substring(dateStart,datelen);
document.writeln(writeText);}
//  test if date in Opera or Netscape 6/7 format (tested on win nt4)
else if (document.lastModified.substring(3,4) == ','){writeText = updateText + document.lastModified.substring(5,16);document.writeln(writeText);}
//  test if date in netscape communicator 4.6 Linux format (tested on redhat 6.1) or netscape communicator 4.04 OS/2 format (tested on merlin)
else if (document.lastModified.substring(7,8) == ' ') {writeText = updateText + document.lastModified.substring(8,10) + ' ' + document.lastModified.substring(4,7) + ', ' + document.lastModified.substring(20,24);document.writeln(writeText);}
// test if date in internet explorer 4.72 format (tested on win nt4)
else if (document.lastModified.substring(8,9) == ' '){monthnum = document.lastModified.substring(0,2) - 1;writeText = updateText + document.lastModified.substring(3,5)+' '+monthname[monthnum]+', 20'+document.lastModified.substring(6,8);document.writeln(writeText);}
// test if date in internet explorer 5.0 format (tested on win nt4)
else  if (document.lastModified.substring(6,8) == '20'){monthnum = document.lastModified.substring(0,2) - 1;writeText = updateText + document.lastModified.substring(3,5)+' '+monthname[monthnum]+', '+document.lastModified.substring(6,10);document.writeln(writeText);}
// otherwise do not display lastmod message
}

// find DOM
var isDHTML = 0;var isLayers = 0;var isAll = 0;var isID = 0;if (document.getElementById) {isID = 1; isDHTML = 1;}else {if (document.all) {isAll = 1; isDHTML = 1;}else { browserVersion = parseInt(navigator.appVersion);if ((navigator.appName.indexOf('Netscape') != -1) && (browserVersion == 4)){isLayers = 1; isDHTML = 1;}}}
function findDOM(objectID,withStyle) {if (withStyle == 1) {if (isID) {return (document.getElementById(objectID).style); } else {if (isAll) {return (document.all[objectID].style); } else {if (isLayers) {return (document.layers[objectID]); }};}} else {if (isID) {return (document.getElementById(objectID)); } else {if (isAll) {return (document.all[objectID]); } else {if (isLayers) {return (document.layers[objectID]); }};}}}
function findLivePageHeight() {return window.innerHeight != null? window.innerHeight: document.body.clientHeight != null? document.body.clientHeight:null;}
function findLivePageWidth() {return window.innerWidth != null? window.innerWidth: document.body.clientWidth != null? document.body.clientWidth:null;}

function locatorWin() {var lwin = window.open('locwin.htm','findit','height=100,width=250,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no');lwin.moveTo(0,0);lwin.focus();}

var awd = new Array;var thisImg = 0;function rotate() {if (document.images) {thisImg++;if (thisImg == awd.length) {thisImg = 0;}document.rotimg.src = awd[thisImg];setTimeout("rotate()",2000);}}

// newwin code
function pw() {if (window.innerWidth != null) return window.innerWidth; if (document.body.clientWidth != null) return document.body.clientWidth; return (null);}
function ph() {if (window.innerHeight != null) return window.innerHeight; if (document.body.clientHeight != null) return document.body.clientHeight; return (null);}
function newWindow(pagename) {browserVersion = parseInt(navigator.appVersion);
if ((navigator.userAgent.indexOf('Opera 5') != -1) || (navigator.userAgent.indexOf('Opera 6') != -1)) {alert('The guestmap does not support Opera 6 or earlier.');
} else if ((navigator.appName.indexOf('Netscape') != -1) && (browserVersion <= 4)) {
alert('The guestmap does not support Netscape 4 or earlier.');
} else {height = ph(); if (height > 675) height = 675;
width = pw(); if (width > 1300) width=1300; var parm = 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,height='
+ height + ',width=' + width; var myWin = window.open(pagename, 'mywin', parm); myWin.moveTo(0,0); myWin.focus();}}

sfh = function() {var sfE = document.getElementById("nav").getElementsByTagName("li"); for (var i=sfE.length-1; i >= 0; i--) {sfE[i].onmouseover=function() { this.className+=" sfh"; }; sfE[i].onmouseout=function() { this.className=this.className.replace(new RegExp(" sfh\\b"), ""); }; }}; if (window.attachEvent) window.attachEvent("onload", sfh);
