var dir = location.href.substring(0,location.href.lastIndexOf('/')+1);
//alert(dir)
var dot_html = location.href.substring(dir.length,location.href.length+1).toUpperCase();
//alert(dot_html)
var doc_idx = dot_html.substring(0,2)
var doc_idx2 = dot_html.substring(0,4)
//alert(doc_idx)
if (doc_idx == '  ')
  {doc_idx = 'HO'}
if (doc_idx == ' ')
  {doc_idx = 'HO'}
if (doc_idx == '')
  {doc_idx = 'HO'}
if (dot_html == 'INDEX.HTML')
  {doc_idx = 'HO'}
if (dot_html == 'INDEX2.HTML')
  {doc_idx = 'HO'}
//alert(doc_idx)
var urlupper = location.href.toUpperCase()
//alert(urlupper)
var which_site_n = urlupper.indexOf('PRINCESS')
//alert(which_site_n)
if (which_site_n > 0){which_site = 'Princess Tiger Lily'}
else {which_site = 'Yellow Bear Journey'}
var last_slash = location.href.lastIndexOf('/')+1
//alert(last_slash)
var prev_slash = location.href.substring(0,last_slash-1).lastIndexOf('/')+1
//alert(prev_slash)
var subdir = location.href.substring(prev_slash,last_slash-1).toUpperCase()
//alert(subdir)
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'+'YS.COM')
  {subdir = 'YELLOWBEARJOURNE'+'YS'}
//alert(urlupper.indexOf(':'))
//alert(urlupper)
if (urlupper.indexOf('YELLOWBEARJOURNE'+'YS.COM') > 0)
  {}
else
if (urlupper.indexOf('FILE:') == 0)
  {}
else
  {document.write('<font size=+3><b>Please check to make sure you are at YellowBearJourne'+'ys.com. Otherwise, this website may have been stolen</b></font>')}
ha=32
hb=22
hc=14
document.write('<table cellpadding=0 cellspacing=0>')
document.write('<tr><td width=6></td><td height=8></td></tr>')
// PREFIXES USED=A, C, G, H, J, L, N, R, T
// A=ABOUT
// C=CONSULTING
// G=GALLERIES
// H=HOME (INDEX)
// J=JOURNEYS
// L=LINK TO US
// N=NEWSLETTER
// R=RESOURCES, GEAR (RESOURCES->GEAR)
// T=TERMS
//
// HO=HOME (INDEX)
x=write_button_first(doc_idx,'HO', 'H_', 'x', 'y', 'z')
document.write('<a href="'+urlbase+'index.html">Home</a>')
x=write_button_last()
// GO Deep
x=write_button_first(doc_idx,'a', 'b', 'x', 'y', 'z')
document.write('<a href="'+urlbase+'godeep/index.html">Go Deep!</a>')
x=write_button_last()
// JO=JOURNEYS
JOdoc_idx = doc_idx
if (urloly == '' | urlwa == '' | urlhi == '')
     {JOdoc_idx = 'J_'}
x=write_button_first(JOdoc_idx,'JO', 'J_', 'x', 'y', 'z')
document.write('<a href="'+urlbase+'journeys.html">EcoTours</a>')
x=write_button_last()
// RE_GE=RESOURCES - GEAR
x=write_button_first(doc_idx2,'R_GE', 'R_G_', 'x', 'y', 'z')
document.write('<a href="'+urlbase+'r_gear.html">Gear</a>')
x=write_button_last()
// NE=NEWSLETTER
x=write_button_first(doc_idx,'NE', 'N_', 'x', 'y', 'z')
document.write('<a href="'+urlbase+'newsletter.html">Newsletter</a>')
x=write_button_last()
// TE=TERMS
x=write_button_first(doc_idx,'TE', 'T_', 'x', 'y', 'z')
document.write('<a href="'+urlbase+'terms.html">Terms/FAQ</a>')
x=write_button_last()
// AB=ABOUT
x=write_button_first(doc_idx,'AB', 'A_', 'x', 'y', 'z')
document.write('<a href="'+urlbase+'about.html">About</a>')
x=write_button_last()
// GA=GALLERIES
x=write_button_first(doc_idx,'GA', 'G_', 'x', 'y', 'z')
document.write('<a href="'+urlbase+'galleries/index.html">Pictures</a>')
x=write_button_last()
// RE=RESOURCES
x=write_button_first(doc_idx,'RE', 'R_', doc_idx2, 'R_GE', 'R_G_')
document.write('<a href="'+urlbase+'resources.html">Resources</a>')
x=write_button_last()
// C_CA Careeers
x=write_button_b_first(doc_idx2,'C_CA', 'C_AF', 'C_SP', 'y', 'z')
document.write('<a href="'+urlbase+'c_careers.html">Careers<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Affiliates<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sponsors</a>')
x=write_button_b_last()
// C_CO Contact Us
x=write_button_first(doc_idx2,'C_CO', 'a', 'x', 'y', 'z')
document.write('<a href="'+urlbase+'c_contact_us.html">Contact Us</a>')
x=write_button_last()
document.write('</table>')

function write_button_first(idx, idx_comparea, idx_compareb, idx2, idx_compare2a, idx_compare2b) {
if (idx == idx_comparea | idx == idx_compareb)
  {if (idx2 == idx_compare2a | idx2 == idx_compare2b)
    {var my_img = 'spacer'}
  else
    {var my_img = 'bear_paw_rt'}}
else
  {var my_img = 'spacer'}
if (idx_comparea == 'GA')
  {if (subdir == 'GALLERIES')
     var my_img = 'bear_paw_rt'}
document.write('<tr><td></td><td background="'+urlbase+'menu/buttons/')
document.write('sand2.jpg" height=32 width=230>&nbsp;<img src="'+urlbase+'menu/buttons/')
document.write(my_img)
document.write('.gif" alt="EcoTours" width=23 height=22>&nbsp;&nbsp;')
document.write('<font class="ybjbutton">')
}
function write_button_last(){
document.write('</font><br></td></tr>')
document.write('<tr><td> </td><td height=8></td></tr>')
}
function write_button_b_first(idx, idx_comparea, idx_compareb, idx2, idx_compare2a, idx_compare2b) {
if (idx == idx_comparea | idx == idx_compareb | idx == idx2 | idx == idx_compare2a | idx == idx_compare2b)
    {var my_img = 'bear_paw_rt'}
else
    {var my_img = 'spacer'}
document.write('<tr><td></td><td valign=center background="'+urlbase+'menu/buttons/')
document.write('sand2.jpg" height=48 width=230><font size=-1>&nbsp;&nbsp;</font><img src="'+urlbase+'menu/buttons/')
document.write(my_img)
document.write('.gif" alt="Careers, Affiliates, Sponsors" width=23 height=22>')
document.write('<font class="ybjbutton" size=-1>&nbsp;&nbsp;&nbsp;')
}
function write_button_b_last(){
document.write('</font><br></td></tr>')
document.write('<tr><td> </td><td height=8></td></tr>')
}
