// javascript & css base format for website


var dom = (document.getElementById) ? true : false;
var ns5 = ((navigator.userAgent.indexOf("Gecko")>-1) && dom) ? true: false;
var ie5 = ((navigator.userAgent.indexOf("MSIE")>-1) && dom) ? true : false;
var ns4 = (document.layers && !dom) ? true : false;
var ie4 = (document.all && !dom) ? true : false;
var nodyn = (!ns5 && !ns4 && !ie4 && !ie5) ? true : false;

var thispicnum
var this_album_max
var in_admin = false

function newtab( width )
{
document.write( "<table align=center border=0 cellpadding=0 cellspacing=0" )
if ( width!=0 ) { document.write( " width=", width ) }
document.write( ">" )
}
function newrow() { document.write( "<tr><td>" ) }
function endrow() { document.write( "<\/td><\/tr>" ) }

var offx = 10, offy = 10, rad = 20

function mousething(e)
{
if ( ie5) e=window.event
window.status=e.clientX+','+e.clientY
cc = document.getElementById("float")
s = cc.style
s.left = e.clientX + offx + document.body.scrollLeft
s.top = e.clientY + offy + document.body.scrollTop
return true
}


function hitt(e)
{
var id
if ( ie5) { e=window.event; id = e.srcElement.id; }
else id = e.target.id
id = id.substring( 1, 5 )
x = parseInt(id) - 1
aa=document.getElementById("fimage")
aa.src=document.pload[x].src //"2004/16oct/thumb/crop.jpg"
bb=document.getElementById("texbox3")
wid = document.pload[x].width
bb.innerHTML = wid
div=document.getElementById("float")
div.style.visibility="visible"

// see if there is a comma
comma = id.indexOf( "," )
if ( comma == -1 ) return
clock=parseInt(id.substring(comma+1,20))
var ang = 0.01 + Math.PI / 2 - ( clock * Math.PI / 6 ) // convert clock time to angle = small val to prevent divide by zero
a = 75 / Math.cos( ( Math.PI / 2 ) - ang )                                                      // distance to horiz side
b = wid / ( 2 * Math.cos( ang ) )                                          // distance to vertical side
if ( a < 0 ) a = -a         // convert to magnitude
if ( b < 0 ) b = -b
diag = Math.min(a, b) + rad
offx = diag * Math.cos(ang) - wid / 2
offy = diag * Math.sin(-ang) - 75
document.onmousemove = mousething


}

function thumbhit(e)
{
var id
if ( ie5) { e=window.event; id = e.srcElement.name; }
else id = e.target.name

aa=document.getElementById("fimage")
aa.src=id
div=document.getElementById("float")
div.style.visibility="visible"
document.onmousemove = mousething
}

function facehit(e)
{
var id
if ( ie5) { e=window.event; id = e.srcElement.name; }
else id = e.target.name

aa=document.getElementById("fimage")
aa.src="/rides/images/members/"+id+".jpg"
aa.style.height = 150
aa.style.width = 150
div=document.getElementById("float")
div.style.visibility="visible"
document.onmousemove = mousething
}

function toolhit(e)
{
var id
if ( ie5) { e=window.event; trg = e.srcElement; id = e.srcElement.name; }
else { id = e.target.name; trg = e.target }
/*var t = ""
for (var i in trg) {
        if ( ( typeof( trg[i] ) != "object" ) && ( typeof( trg[i] ) != "number" ) )
    t += " # " + i + " = " + "(" + typeof trg[i]+ ")"
    }
alert( t )*/
aa=document.getElementById("fimage")
aa.src="/images/pixel_trans.gif"
aa.style.height = 1
aa.style.visibility="hidden"
div=document.getElementById("float")
div.style.visibility="visible"
div=document.getElementById("tiptext")
div.style.visibility="visible"
div.innerHTML = "&nbsp;" + id + "&nbsp;"
document.onmousemove = mousething
}

function unhit()
{
//l=document.getElementById("thelink")
aa=document.getElementById("fimage")
aa.src="/favicon.jpg"
offx = 10
offy = 10
div=document.getElementById("float")
div.style.visibility="hidden"
div=document.getElementById("tiptext")
div.style.visibility="hidden"
document.onmousemove = null
}

function hide()
{
window.clearTimeout()
unhit()
}

//document.onmousemove = mousething //"window.status=ClientX+','+ClientY"

var srcdir = "2004/21nov/thumb/"

function preloadimages()

{
var i,j,a,d=document;
if (d.images)
        {
        if(!d.pload) d.pload=new Array();
    j=d.pload.length
        a=preloadimages.arguments;
        for(i=0; i<a.length; i++)
                {
                d.pload[j]=new Image;
                d.pload[j].id = a[i]
                d.pload[j++].src=srcdir+a[i]+'.jpg';
                }
        }
}

function fillareas()
{
map=document.getElementById("mymap")
a=map.areas
for ( x = 0; x < a.length; x ++ )
        {
        area = a[x]
        area.onmouseover=hitt
        area.onmouseout=unhit
        area.idx = x
        }
}

var maps = new Array()
var mapcount = 0;


function addmap( name, pic, link, text )

{
maps[name] = new Array( pic, link, text )
}

addmap( "HI", "holidayc.jpg", "#", "Holiday Inn" )
addmap( "RA", "rat_asdab.jpg", "#", "Ratcliffe ADSA" )

function output_map_link( name )

{
mapcount ++
// <a href='#' name=name>text_of_link</a>
while ( name.length )
{
index = name.indexOf( "[" )
eindex = name.indexOf( "]" )
chunk = name
if ( ( index > -1 ) && ( eindex > -1 ) )
   {
   document.write( name.substr( 0, index ) )
   chunk = name.substr( index + 1, eindex - index - 1 )
   name = name.substr( eindex + 1, name.length )
   }
else name = ""
bling = maps[chunk]
if ( typeof bling == "undefined" ) document.write( chunk )
else
         {
         //alert( name+':'+bling )
         document.write( "<a href='#' name=",chunk," id='m",mapcount,"' onMouseOver='maphit(event)'  onMouseOut='unhit(event)' >",bling[2],"</a>" )
         }
}
}

function maphit(e)

{
var id
if ( ie5) { e=window.event; id = e.srcElement.name; }
else id = e.target.name
aa=document.getElementById("fimage")
aa.src=maps[id][0] //document.pload[x].src //"2004/16oct/thumb/crop.jpg"
bb=document.getElementById("maplink")
bb.href=maps[id][1] //document.pload[x].src //"2004/16oct/thumb/crop.jpg"
div=document.getElementById("float")
div.style.visibility="visible"
document.onmousemove = mousething
}

function menuitem( link, name )
{
document.write( '<td><a class="menuboldyel" href="',link,'">',name,'<\/a> .&nbsp;</td>' )
}

var page_name = "Member's Area"
var in_members = false
var copy_text = ''
var title_align = 'right'
var edit_page = ""
var in_php = false
var random_pic_name = ""
var random_pic_link = ""
var suppress_grey_background = false
var bold_title = true
var table_width=900
var shift_url = ""
var report_url = "/show_album.php?srcdir=2005/2jan&show_report=yes"
var route_num = 0;
var nav_object = 'picture'
var nav_container = 'album'
var page_title_url = ""
var slide_url = ""
var slide_image = ""
var slide_direction = 0

//menu_row( "/index.shtml", "Home", "/about.shtml", "About Us", "/links.shtml", "Links", "/members/library.shtml", "Library", "/contact.shtml", "Contact", "/members.shtml", "Meet the Club!", "/rides/gallery", "Gallery" )

function randpic()
{
if ( ! in_php ) document.write( "<IFRAME class=tight FRAMEBORDER=0 SRC='/randompicx.php' width=300 height=50 scrolling=no align=top marginwidth=0 marginheight=0></IFRAME>" )
else
        {
        if ( random_pic_link !== '' )
                 {
                document.write( "<map name='galmap'>" )
                document.write( "<area href='",random_pic_link,"' title='picture' shape='rect' coords='0,0,300,25'>" )
                document.write( "<area href='/rides/gallery' title='gallery' shape='rect' coords='0,25,300,50'>" )
                document.write( "</map><img src='/images/bannerimages/",random_pic_name,"' WIDTH='300' HEIGHT='50' BORDER='0' USEMAP='#galmap'>" )
                }
        else document.write( "<A HREF='/rides/gallery'><img src='/images/bannerimages/",random_pic_name,"' class=tight WIDTH='300' HEIGHT='50' BORDER=0 title='Main gallery'></a>" )
        }
}

function nav_tab( wid, pic, style, text, url, tip, align )
{
document.write( '<td align="',align,'" width=',wid,' class="',style,'"><a class = "goyellow" href="',url,'" title="',tip,'">' )
if ( text ) document.write( text ) // '<span class="ww"><u>',text,'</span>'
if ( pic ) document.write( '<img border=0 title="',tip,'" class="noborders" src=/images/',pic,'.gif>' )
document.write( '</a></td>' )
}

function display_navbar( picnum, pictures )

{
document.write( '<table width=100% cellpadding=10 cellspacing=0 bgcolor=black border=0>' )
document.write( '<tr><td><table width=700 align=center border=1  class="wt" cellpadding=2 cellspacing=0><tr>' )
rplay = (picnum - 1 )
if ( rplay == 0 ) rplay = 1
if ( nav_object == "picture" )
   {
   rim = 'rplay'; fim = 'fplay';
   if ( slide_image != "" )
       {
           if ( slide_direction == -1 ) rim = 'rrplay';
           if ( slide_direction == 1 ) fim = 'rfplay';
           }
   nav_tab( 20, rim, 'rwborder',0, shift_url + rplay + "&slideshow=-1", 'rev slideshow' )
   }
nav_tab( 20, 'nav_first', 'rwborder',0, shift_url + '1', 'first ' + nav_object )
if ( picnum > 1 ) nav_tab( 20, 'nav_prev', 'rwborder',0, shift_url + (picnum - 1 ), 'previous ' + nav_object )
if ( report_url != "" ) nav_tab( 20, 'report', 'rwborder',0, report_url, 'view ride report' )
if ( route_num > 0 ) nav_tab( 30, 'route', 'rwborder', 0, '/route/showrouteframe.php?route=' + route_num, 'route map' )
else if ( route_num < 0 ) nav_tab( 30, 'xroute', 'rwborder', 0, '/route/showrouteframe2.php?route=' + (-route_num), 'simple route map' ) // show_overlay.php?album
if ( typeof gpx != 'undefined' ) nav_tab( 20, 'gpx', 'rwborder', 0, gpx, 'download GPX (right click, save link/target as)' )
nav_tab( '90%', 'nav_home', 'noborders', nav_object + ' ' + picnum + ' of ' + pictures, album_url, nav_container, 'center' )
if ( picnum < pictures ) nav_tab( 20, 'nav_next', 'lwborder',0, shift_url + (picnum + 1 ), 'next ' + nav_object )
nav_tab( 20, 'nav_last', 'lwborder',0, shift_url + pictures, 'last ' + nav_object )
if ( nav_object == "picture" ) nav_tab( 20, fim, 'lwborder',0, shift_url + (picnum + 1 ) + "&slideshow=1", 'slideshow' )
document.write( '</tr></table>' )
document.write( '</td></tr></table>' )
// STYLE="position: relative; top:-3px"> position:absolute;
}

function navpic( shot )

{
paf = window.location.pathname
//srch = window.location.search
//at = srch.indexOf( "" )
//qury = srch.substring( 0, at + 11 )
qury = '?album_id=' + album_ident + '&pic_ident='
window.location = paf + qury + shot
}

function showprompt( shot, ext )

{
paf = window.location.pathname
srch = window.location.search
at = srch.indexOf( "&pic_ident=" )
qury = srch.substring( 0, at )
url = paf + qury
//content = "[img]http://www.bogtrotters.org"+shot+"[/img].."
if ( ext ) shot = 'http://148.88.53.14' + shot
else shot = 'http://www.bogtrotters.org' + shot

content = "[url=http://www.bogtrotters.org/show_album.php?album_id="+album_ident+"][img]"+shot+"[/img] click pic for more[/url]"
prompt("STW code", content )

}
function showpromptb( shot, ext )

{
paf = window.location.pathname
srch = window.location.search
at = srch.indexOf( "&pic_ident=" )
qury = srch.substring( 0, at )
url = paf + qury
//content = "[img]http://www.bogtrotters.org"+shot+"[/img].."
if ( ext ) shot = 'http://148.88.53.14' + shot
else shot = 'http://www.bogtrotters.org' + shot

content = "[url=http://www.bogtrotters.org/"+pic_jump+"][img]"+shot+"[/img] click pic for bigger[/url]"
prompt("STW pic code", content )

}
// navigation subsystem:
//at = window.location.search.indexOf( "&pic_ident=" ) // pathname
// base = ; <!--", ends with "-->
// <!-- srch?srcdir=2005/7aug&pic_ident=7,path=/show_album.php -->
//document.write ( "<!-- srch", window.location.search , ",path=", window.location.pathname, " -->" )
//<MAP NAME=mymap>
//<AREA HREF="/reference/" ALT="HTML and CSS Reference" COORDS="5,5,95,195">
//<AREA HREF="/design/" ALT="Design Guide" COORDS="105,5,195,195">
//<AREA HREF="/tools/" ALT="Tools" COORDS="205,5,295,195">
//</MAP>
//<IMG SRC="sitemap.gif" ALT="Site map" USEMAP="#mymap" WIDTH=300 HEIGHT=200>
//  COORDS="left, top, right, bottom"

var picmapareas = "<map name='clicker'>"

function display_album_shot( picnum, pictures, pic_url, pic_caption, border_class, widhi, extra, instead, author, grid, extern )
{
if ( typeof extern == 'undefined' ) extern = 0
thispicnum = picnum;
this_album_max = pictures
display_navbar( picnum, pictures )
//document.writeln(  )
parts = widhi.split( '"' ) // width is part 1 and height is part 3
halfw = parts[1] / 2
high = parts[3]
if ( typeof list_of_areas != 'undefined' ) picmapareas += list_of_areas
if ( ! is_a_form )
	{
	picmapareas += "<area href='javascript: parent.showprompt("+'"'+pic_url+'"'+","+extern+");' coords='0,0,20,20' title='STW code'>"
    picmapareas += "<area href='javascript: parent.showpromptb("+'"'+pic_url+'"'+","+extern+");' coords='30,0,50,20' title='STW pic code'>"
	}
if ( picnum > 1 ) picmapareas += "<area href='javascript: parent.navpic("+(picnum-1)+");' coords='0,10,"+halfw+","+high+"' title='back'>"
if ( picnum < pictures ) picmapareas += "<area href='javascript: parent.navpic("+(picnum+1)+");' coords='"+halfw+",0,"+halfw*2+","+high+"' title='forward'>"

picmapareas +="</map>"

//document.write( '<table width=100% border=0 cellpadding=100 cellspacing=0 bgcolor=black border=0><tr><td align=center>' )
document.write( '<div id=picdiv class="float">' )
//document.write( "<img usemap='#clicker' class='",border_class,"' src='",pic_url,"' name='peeoo' ",widhi,">" ) // <div width=600 height=10>.</div>
document.write( "<IFRAME class='",border_class,"'name=subb FRAMEBORDER=0 SRC='/singlepic.php?pic=",pic_url,"&ext=",extern,"' ",widhi," scrolling=no align=middle marginwidth=0 marginheight=0></IFRAME>" )
document.write( "<span id=hint class=hnt style='display:none;border:solid white 1px; position:relative;top:-20;left:0'>foo</span><div class=ww>",pic_caption,"</div></div>" ) // </td></tr></table>
//document.write( "</td></tr>" )
}


function begin_thumb_line()
{
document.write( "<table cellpadding=0 cellspacing=7 align=center bgcolor = #000000><tr>" )
}

function end_thumb_line()
{
document.write( "</tr></table></td></tr><tr><td>" )
}

var is_a_form = false

function go_active(seti)
{
chek = document.getElementById( "sett"+seti );
//alert( chek + ' ' + chek.value+ ' ' + seti )
chek.value = "yes"
//alert( "state is now " + chek.value )
}

function set_active( thing )
{
//alert( "set active " + thing )
chek = document.getElementById( thing );
chek.value = "yes"
}

function show_album_thumb( id, percent, link, clss, thumbsrc, cap, auth, memonly )

{
document.write( "<td valign=top width=",percent," align=center ><a href='",link,"'>" )
if ( is_a_form )
   {
   parts = thumbsrc.split('/')
   picttl = parts[parts.length-1]
   document.write( "<img class='",clss,"' src='",thumbsrc,".jpg' width=",percent," height=150 title='",picttl,"'></a>" )
   document.write( "<br><span class='ww'>",id,":<input type=text name='text",id,"' value=\"",cap,"\" onclick='go_active(",id,")'>" )
   if ( clss == "wt" ) checkt = "CHECKED"
   else checkt = "UNCHECKED"
   document.write( "<input type=checkbox name=border",id," ",checkt," title='",checkt,"' onclick='go_active(",id,")'>" )
   document.write( "<input type=hidden id=sett",id," name=set",id," value=''>" )
   document.write( "<a href='",delete_url,id,"'><img src='/images/button.cut.jpg' title='delete' border=0></a>" )
   if ( memonly == 1 ) checkt = "CHECKED"
   else checkt = "UNCHECKED"
   document.write( "<input type=checkbox name=memonly",id," ",checkt," title='members only' onclick='memcheck(this,",id,")'>" )
   document.write( "</span></td>" )
   }
else
        {
        document.write( "<img class='",clss,"' src='",thumbsrc,".jpg' width=",percent," height=150 ></a>" )
        if ( auth != "" ) cap = cap + " [" + auth + "]"
        document.write( "<br><br><span class='ww'>",cap,"</span></td>" )
        }
}


function menu_row()

{
document.write( "<tr><td><table class='menubold' border='0' align='center' cellpadding='0' cellspacing='0'><tr>" )
for (var i = 0; i < menu_row.arguments.length; i += 2)
        {
        if ( menu_row.arguments[i+1] == page_name ) continue // don't include link to self
        menuitem( menu_row.arguments[i], menu_row.arguments[i+1] )
        }
document.write( "</tr></table></td></tr>" )
}

var onloadfun = '' //'preloadimages("ollersett","descent","wethercotes","dunk")'
var timerthing = 0
var completed = 0

function kpress(e)
{
//alert( ie5 )
if ( ie5) key=window.event.keyCode
else
    {
    key=e.charCode
    if ( key == 0 ) key = e.keyCode
    }
//alert( key +','+thispicnum+','+this_album_max )
//alert( "key = "+ e.keyCode + " char " + e.isChar ) // + " char " + e.charCode )
if ( key == 32 )
    {
        if ( timerthing != 0 )
           {
           window.clearTimeout(timerthing);
           timerthing = 0;
           completed &= 1;
           tg = document.getElementById( "tag" )
           tg.innerHTML = "paused"

           }
        else if ( slide_image != "" ) reloader()
        }
/*else if ( thispicnum )
     {
     //thispicnum = picnum;
     //this_album_max = pictures

     add = 0
     if ( key == 39 ) add = 1
     else if ( key == 37 ) add = 1
     if ( add )
          {
          newpic = thispicnum + add
          if ( ( newpic > 0 ) && ( newpic <= this_album_max ) )
                 {
                 navpic( newpic )
                 }
          }
     }*/
}


function page_top()

{
document.write( '<title>', page_name,'</title>' );
if ( ie5 ) keyact = "kpress()"
else keyact = "kpress(event)"

document.write( '<body bgcolor="#006699" text="#000000" link="#006699" vlink="#5493B4" onkeypress="',keyact,'" ' )
if ( onloadfun != "" ) document.write( "onload='",onloadfun,"'>" )
else document.write( ">" )
document.write( '<a name="top"></a>' )
document.write( '<table id=outsidetable align=center style="border-width:15; border-top-width:1; border-color:#006699; border-style:solid" cellpadding=0 cellspacing=0 width=',table_width,'>' )
//  <!-- top line with curved ends -->
document.write( '<tr><td><table align=center border=0 cellpadding=0 cellspacing=0 width=100%>' )
document.write( '<tr><td><img src="/images/tlc.jpg" alt=""></td><TD BGCOLOR="#21345f" ALIGN=center width="100%"></td><td><img src="/images/trc.jpg" alt=""></td></tr>' )
document.write( '</table>' )
document.write( '</td></tr>' )
//  <!--  everything between the enclosing bars -->
document.write( '<tr><td>' )
document.write( '<table align=center class="sidebars" cellpadding=0 cellspacing=0 width=100% BGCOLOR=#21345f>' )
//<!--  left border -->
//document.write( '<tr><TD ALIGN=left width=4 bgcolor=#21345f></TD>' ) // 5f
document.write( '<td><table align=center border=0 cellpadding=0 cellspacing=0 width=100%>' )
document.write( '<tr><td align=center><A HREF="/"><img title="SAVAGE ENTERTAINMENT!" src=/btwide.jpg border=0 id="logo">' )
//document.write( "</a><A HREF='/rides/gallery'><img src='/images/bannerimages/pic21.jpg' WIDTH='300' HEIGHT='50' BORDER=0 alt='Main gallery'></a>" )
randpic()
document.write( "</td></tr><tr><td>" ) // <!--  first row is strap bar with random pic -->

if ( in_members ) menu_row( "/index.php", "Home", "/about.shtml", "About Us", "/links.shtml", "Links",
  "/rideslist.php", "Rides List", "/contact.shtml", "Contact", "/meet.php", "Meet the Club!",
  "/rides/gallery", "Gallery", "/srchfor.php", "<b>Search</b>" )
else menu_row( "/index.php", "Home", "/about.shtml", "About Us", "/links.shtml", "Links",
  "/rideslist.php", "Rides List", "/contact.shtml", "Contact", "/meet.php", "Meet the Club!",
  "/rides/gallery", "Gallery", "/members/", "Members' Area", "/srchfor.php", "<b>Search</b>" )


if ( in_members )
{
//if ( page_name == "Forum" ) menu_row( "/members/download", "Downloads", "/members/booksx.php", "Accounts",
//  "http://lists.bogtrotters.org/mailman/listinfo/chat", "Chat", "http://lists.bogtrotters.org/mailman/listinfo/news", "News",
//  "/astats", "New Stats", "/members/contriboot.html", "Contriboot", "/members/srchfor.php", "Search", "/members/upload.html", "Upload" )
//else
if ( page_name == "Members' Area" ) page_name = "Forum"
menu_row( "/members/download", "Downloads", "/members/booksx.php", "Accounts",
  "news.html", "Chat", "news.html", "News",
  "/astats", "New Stats", "/members/contriboot.html", "Contriboot", "/members/srchfor.php", "Search", "/members/upload.html", "Upload","/members/index.html", "Forum","/members/meetedit.php", "Edit bios", "/members/future.php", "Ride planning" )

}
if ( in_admin )
{
menu_row( "index.php", "Admin Central", "uploadx.php", "Uploads", "phpshell.php", "Shell",
  "banner.php", "Edit banner", "dir.php?dir=.", "Browse files", "phpinfo.php", "PHP info" )
}

document.write( "<tr><td align=center><img src=/images/headrule.jpg width=97% height=4></td></tr>" ) //<!-- divider bar -->
if ( bold_title ) spantext = "<b>" + page_name
else spantext = page_name
if ( page_title_url ) spantext = "<a class='pghead' href='"+page_title_url+"'>"+spantext+"</a>"
document.write( "<tr><td align=",title_align,"><span class='memarea'><script>document.write(spantext,'&nbsp;')</script></span></td></tr>" )


document.write( "</td></tr>" ) //<!-- end of menus -->


document.write( "<tr><td width=1 height=3 bgcolor=#21345f></td></tr>" ) //<!-- another vertical spacer -->
document.write( "<tr align='center'><td>" )
if ( ! suppress_grey_background )
    {
        document.write( "<table width=100% background='/images/bg.jpg' border=0 cellpadding=0 cellspacing=0>" )
        document.write( "<tr><td width=10 ALIGN=left ></td><td>" ) //<!-- left grey bar  -->
        }

}


function imageloaded()

{
completed += 1
if ( timerthing )
   {
   tg = document.getElementById( "tag" )
   tg.innerHTML = "waiting..."
   }

if ( completed ==3 ) window.location = slide_url
}

function reloader()

{
//alert( "target = "+slide_url )
completed += 2
if ( completed ==3 ) window.location = slide_url
}

var piclogo
var tog = 0
var period = new Array( 40000, 5000, 25000, 4000 )
var lnames = new Array( "/btwide.jpg", "/bogus.jpg", "/btwide.jpg", "/dodge.jpg" );
//var lnames = new Array( "/bogus.jpg", "/btwide.jpg", "/bogus.jpg", "/dodge.jpg" );

function randomlogo()

{
var tim = Math.random() * period[tog] + 1000
piclogo.src = lnames[tog]
tog = ( tog + 1 ) & 3
window.setTimeout( "randomlogo()", tim )
}

function page_bottom()

{
if ( ! suppress_grey_background )
    {
    document.write( "</td><td width=10 ALIGN=right ></td></tr></table>" ) //<!-- right grey bar bgcolor=#808080 -->
        }
document.write( "</td></tr></table></td>" )
//<TD ALIGN=right width=4 bgcolor=#21345f></TD></tr>" ) //<!-- right outer bar bar -->
document.write( "</table></td></tr>" )
document.write( "<tr><td>" ) // <!-- bottom curved corner bar -->
document.write( "<table align=center border=0 cellpadding=0 cellspacing=0 width=100%" )
document.write( "<tr><td><img src='/images/blc.jpg'></td>" )
document.write( "<TD BGCOLOR=#21345f class='copyright' ALIGN=left width=100%>" )
if ( edit_page != null ) click = 'window.location = \"/admin/' + edit_page + '\" '
else click = ''
document.write( "<span style='color: #ffffff;' onclick='",click,"'>&copy;</span>" )
document.write( "<span style='color: #ffffff;'> 1997 - 2010 <i>",copy_text,copy_text != "" ? " &amp; " : "","Bog Trotters Mountain Bike Club &nbsp;&nbsp;&nbsp;</i></span>" )
//document.write( "</td><td align=right BGCOLOR=#21345f><span id='droper' align=right class='copyright' style='visibility:hidden; color:white; border: 1px white;'><select name='selfoo' class='copyright' style='color:black; border: 1px white;'><option>1</option><option>2</option><option>3</option><option>5</option></select></span>" )
document.write( "</td><td align=right BGCOLOR=#21345f><span id='tag' align=right class='copyright' style='color:white; border: 1px white;'> </span>" )
document.write( "</TD><td><img src='/images/brc.jpg'></td></table></td></tr></table>" )
document.write( "<div id='float' style=\"position:absolute; z-index:100; border: 1px white; visibility:hidden;\" ><a id='maplink' href='#'><img id='fimage' height=8 src=/favicon.jpg border=1></a><div id='tiptext' style='font: 10pt Helvetica; background : lemonchiffon; visibility:hidden;' >some text</div></div>" )
// position:relative; left:500;
if ( slide_image != "" )
   {
   im = new Image()
   im.onload = imageloaded
   im.src = slide_image
   timerthing=window.setTimeout( "reloader()", 5000 )
   tg = document.getElementById( "tag" )
   tg.innerHTML = "loading..."
   }
else
    {
    //<img src=btwide.jpg id=logo>
    piclogo = document.getElementById("logo")
    randomlogo()
    }

}