var dir = location.href.substring(0,location.href.lastIndexOf('/')+1);
var dot_html = location.href.substring(dir.length,location.href.length+1).toUpperCase();
var urlupper = location.href.toUpperCase()
var which_site_n = urlupper.indexOf('PRINCESS')
if (which_site_n > 0){which_site = 'Princess Tiger Lily'}
else {which_site = 'Yellow Bear Journey'}
var last_slash = location.href.lastIndexOf('/')+1
var prev_slash = location.href.substring(0,last_slash-1).lastIndexOf('/')+1
var subdir = location.href.substring(prev_slash,last_slash-1).toUpperCase()
if (subdir == 'AREAS')
  {subdir = 'MCS'}
if (subdir == 'WWTD')
  {subdir = 'MCS'}
// Make website work like PC
if (subdir == 'WWW.PRINCESSTIGERLIL'+'Y.COM')
  {subdir = 'PRINCESSTIGERLIL'+'Y'}
if (subdir == 'WWW.YELLOWBEARJOURNE'+'Y.COM')
  {subdir = 'YELLOWBEARJOURNE'+'Y'}
//document.write(urlupper)
if (urlupper.indexOf('PRINCESSTIGERLIL'+'Y.COM') > 0)
  {}
else
if (urlupper.indexOf('FILE:') == 0)
  {}
else
  {document.write('<font size=+3><b>Please check to make sure you are at PrincessTigerLil'+'y.com. Otherwise, this website may have been stolen</b></font>')}
//outer border
document.write('<table width=100% bgcolor="#ff8000" border=1 bordercolor="#ff0000"><tr><td width=100%>')
document.write('<table width=100% bgcolor="#ffd070" cellpadding=0><tr><td width=*><table width=100% cellpadding=0>')
document.write('<tr><td align=center')
if (which_site_n > 0)
  {if (subdir == 'IDEAS') {document.write(' bgcolor="#ffa050"')}}
document.write('><font size=-1><a href="http://www.princesstigerlily.com/ideas/index.html"><b>Idea Socket</b></a></font></td>')
document.write('<td align=center')
if (which_site_n > 0)
  {if (subdir == 'MCS') {document.write(' bgcolor="#ffa050"')}}
document.write('><font size=-1><a href="http://www.princesstigerlily.com/mcs/index.html"><b>MCS Escape</b></a></font></td>')
document.write('<td align=center')
if (which_site_n > 0)
  {if (subdir == 'SEARCH') {document.write(' bgcolor="#ffa050"')}}
document.write('><font size=-1><a href="http://www.princesstigerlily.com/search/index.html"><b>Search Perch</b></a></font></td>')
document.write('<td align=center><b><font size=-1><a href="http://www.princesstigerlily.com/index.html#house">Mountain House for Sale</a></font></b></td>')
document.write('<td align=center')
if (which_site_n > 0)
  {if (subdir == 'SSS') {document.write(' bgcolor="#ffa050"')}}
document.write('><font size=-1><a href="http://www.princesstigerlily.com/sss/index.html"><b>Short-N-Sweet-N-Succulent Stories</b></a></font></td>')
// line 2
document.write('<tr><td align=center><table width=52% cellpadding=0><tr><td')
if (which_site_n > 0)
  {if (subdir == 'PRINCESSTIGERLILY') 
  {if (dot_html == 'INDEX.HTML') {document.write(' bgcolor="#ffa050"')}
   else {if (dot_html == '') {document.write(' bgcolor="#ffa050"')}}}}
document.write('><font size=-1><a href="http://www.princesstigerlily.com/index.html"><b>Home</b></a></font></td>')
contact = 'a href="mail'
contact = contact + 'to:dal'
contact = contact + 'e@yellowbearjourne'
contact = contact + 'y.com">Contact&nbsp;Me</a'
document.write('<td align=right><b><font size=-1><'+contact+'></font></b></td></tr>')
document.write('<tr>')
document.write('<td align=left')
if (which_site_n > 0)
  {if (subdir == 'PRINCESSTIGERLILY') 
  {if (dot_html == 'SITE_INDEX.HTML') {document.write(' bgcolor="#ffa050"')}}}
document.write('><font size=-1><a href="http://www.princesstigerlily.com/site_index.html"><b>Site&nbsp;Index</b></a></font></td>')
document.write('<td align=right><b><font size=-1><a href="http://www.yellowbearjourneys.com/newsletter.html">Newsletter</a></font></b></td></tr></table>')
document.write('<td align=center><b><font size=-1><a href="http://www.yellowbearjourneys.com">Eco-Tours</a></font></b></td>')
document.write('<td align=center')
if (which_site_n > 0)
  {if (subdir == 'SHOP') {document.write(' bgcolor="#ffa050"')}}
document.write('><font size=-1><b><a href="http://www.princesstigerlily.com/shop/index.html">Shopping Green</a></b></font></td>')
document.write('<td align=center')
if (which_site_n > 0)
  {if (subdir == 'UNDERCURRENT') {document.write(' bgcolor="#ffa050"')}}
document.write('><font size=-1><a href="http://www.princesstigerlily.com/undercurrent/index.html"><b>Prevailing Undercurrent</b></a></font></td>')
document.write('<td align=center><table><tr><td align=center><font size=-1><a href="http://www.yellowbearjourney.com"><b>Consulting</b></a> &#150; Life Voyage,</font></td></tr>')
document.write('<tr><td align=center><font size=-1>Career, Non-Toxic, Travel, Green Car</font></td></tr></table></td>')
document.write('</tr></table>')
document.write('</td><td width=100 align=right>')
document.write('<a href="http://www.dreamhost.com/r.cgi?423616/green.cgi">')
document.write('<img border="0" alt="Green Web Hosting! This site hosted by DreamHost."')
//document.write('src="https://secure.newdream.net/green5.png" height="75" width="75" /></a>')
if (subdir == 'PRINCESSTIGERLIL'+'Y')
  {document.write('src="menu/green2.gif"></a>')}
else
  {document.write('src="../menu/green2.gif"></a>')}
document.write('</td></tr></table>')
document.write('</td></tr></table>')
