//	setup.js

var	d=document,
	now=new Date(),
	expires,
	monthNames=['January','February','March','April','May','June','July','August','September','October','November','December'],
	isDOM=d.getElementById?1:0,
	isDOM=d.getElementById?1:0,
	isIE=d.all?1:0,
	isNS4=navigator.appName=='Netscape'&&!isDOM?1:0,
	isIE4=isIE&&!isDOM,
	isOp=self.opera?1:0,
	isDyn=isDOM||isIE||isNS4,
	isWin=navigator.platform.indexOf('Win')!=-1?1:0,
	dirOffset=d.firstChild.innerHTML,
	cookieEnabled,
	urlquery=d.location.toString().split('?'),
	cookieEnabled=(navigator.cookieEnabled)?1:0;

function dw(x){document.write(x)}

//if not IE4+ nor NS6+
if(typeof navigator.cookieEnabled=="undefined"&&!cookieEnabled){ 
	d.cookie="testcookie"
	cookieEnabled=(d.cookie=="testcookie")
	d.cookie=""
}

// find the top directory offset from js call to _library/setup.js
dirOffset = dirOffset.substr(0,dirOffset.indexOf('_library/setup.js'))
dirOffset = dirOffset.substr(dirOffset.lastIndexOf('"')+1)

if(!isDyn) window.open(dirOffset+'_library/browser.htm','warning','toolbar=no,width=500')
if(top.location!=self.location) top.location=self.location

dw('<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">')
dw('<meta http-equiv="Content-Language" content="en-au">')
dw('<link rel="stylesheet" href="'+dirOffset+'_library/main.css" type="text/css">')

function ll(x){dw('<script language="JavaScript1.2" src="'+dirOffset+'_library/'+x+'.js" type="text/javascript"></script>')}
ll('main')
ll('dhtml')
ll('menu')
ll('data')

dw('</head><body onLoad="writeMenus()">')

dw('<table cellSpacing="0" cellPadding="0" width="100%" border="0" bgcolor="#EAFAFF">')
dw('	<tr><td width="45%">&nbsp;</td>')
dw('		<td nowrap width="25%"><form style="display: inline" action="../../cgi-sys/entropysearch.cgi" target="searchwindow"><input style="size="20" name="query"><input type="hidden" value="lon33577" name="user"><input type="hidden" value="http://longevitylibrary.com" name="basehref"><input type="hidden" value="default" name="template"><input style="FONT-SIZE: 0.8em" type="submit" value="Search"></form></td>')
dw('		<td nowrap width="30%"><p align="right"><b><a href="'+dirOffset+'index.htm">&nbsp;&nbsp; welcome</a> | <a href="'+dirOffset+'contact.htm">about us</a> | <a href="'+dirOffset+'help.htm">help</a> &nbsp;&nbsp;</b></p></td>')
dw('	</tr>')
dw('</table>')

if(d.title!='Welcome') dw('<h1>'+d.title+'</h1>')
