// 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;

// this section avoids use of closures by discovering the data attached to the visible link
var floatdiv = null

function emit_poplink( album, pathtopic, link, text, title ) // emit_poplink( 99, 'images/IMBA', 'link text' )

{
document.write( "<a title='",title,"' id=",album," href='",link,"'>",text,"</a>" )
var ob = document.getElementById(album)
ob.picname = pathtopic
ob.onmouseover = popover
ob.onmouseout = popout
}

function popover(ev)
{
var e = ev || window.event;
if ( window.event ) ob = e.srcElement
else ob = e.target
floatdiv.firstChild.src = ob.picname
floatdiv.style.visibility="visible"
ob.onmousemove = popdrag
}

function popdrag(ev)

{
var e = ev || window.event;
//if ( window.event ) ob = e.srcElement
//else ob = e.target
floatdiv.style.left = e.clientX + offx + document.body.scrollLeft
floatdiv.style.top = e.clientY + offy + document.body.scrollTop
}

function popout()
{
floatdiv.firstChild.src = 'favicon.jpg'
floatdiv.style.visibility="hidden"
ob.onmousemove = null
}

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 mapmousething(e)
{
if ( ie5) e=window.event
window.status=e.clientX+','+e.clientY
cc = document.getElementById("mfloat")
s = cc.style
s.left = e.clientX + offx + document.body.scrollLeft - 300
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 e = evt || window.event;

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 streethit(evt,index)
{
var e = evt || window.event;

//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("mfloat")
div.style.visibility="visible"
div.innerHTML = dump_map( maps[index] )
document.onmousemove = mapmousething
}

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 mapunhit()
{
//l=document.getElementById("thelink")
//aa=document.getElementById("fimage")
//aa.src="favicon.jpg"
offx = 10
offy = 10
div=document.getElementById("mfloat")
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;
var postcodething

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 floatmap( placename, linktext, dont )
{
// uses closures to access the object context for the mouse functions
var thiss = this; // private member function accessible to internal methods later
var initob = maps[placename]
if ( ! initob ) { /*document.write( linktext + ' :-( ' + placename ); */ return 0; }
this.initstuff = initob
// now emit the link object
var nameofowner = 'floatmaplink' + floatmap.prototype.linknum++
this.nameofowner = nameofowner
var postcode = ''
//alert( placename + ',' + this.nameofowner )
if ( ! dont )
       {
       if ( initob.length == 10 )
	       {
	       if ( typeof initob[9].postcode != 'undefined' ) postcode = initob[9].postcode
	       if ( ! linktext ) linktext = initob[9].name;
	       document.write( '<a title="', postcode, '" id="',nameofowner,'" href="',initob[9].url,'">',linktext,'</a>' )
	       //alert( postcodething + ' : ' + postcode );
	       //if ( postcodething ) postcodething.innerHTML = postcode
	       }
       else document.write( '<a title="', postcode, '" id="',nameofowner,'" href="',initob[0].url,'">',linktext,'</a>' )
       this.ownlink = document.getElementById( nameofowner )
       }
//this.ownlink.floatmap = this // may not be required due to closures - CORRECT!


this.mo = function(ev) { thiss.mof(ev,placename) }// mouseover
this.mm = function(ev) { thiss.mmf(ev) }// mousemove
this.mx = function() { thiss.mxf() }// mouseout
this.scrolly = function() { thiss.scrollfun() }

if ( this.ownlink )
{
this.ownlink.onmouseover = this.mo
this.ownlink.onmouseout = this.mx
}
}

var imgcache = new Image()
imgcache.src = 'blank150.gif'

floatmap.prototype.linknum = 0
floatmap.prototype.timer = 0
floatmap.prototype.scroll_up = 0
floatmap.prototype.scrolltimer = 0

floatmap.prototype.mof = function(ev,place)
{
this.mfloat.style.visibility="visible"
var x, ob, row, col
//this.mfloat.innerHTML = dump_map( this.initstuff )
var tab = this.mfloat.childNodes[0] // was 0 or firstChild

if ( this.mfloat.prevmap != place )
    {
    //alert( place +',' +this.mfloat.prevmap )
    this.mfloat.prevmap = place
    for ( x = 0; x < 9; x ++ )
          {
          //x = plain[xx]
          col = x % 3
          row = ( x - col ) / 3
          tab.rows[row].cells[col].firstChild.src = imgcache.src
          }
    }

//var plain = [0,1,2,3,5,7,8]
//for ( var xx in plain )
for ( x = 0; x < 9; x ++ )
     {
     //x = plain[xx]
     col = x % 3
     row = ( x - col ) / 3
     //alert( row+','+col )
     ob = this.initstuff[x]
     tab.rows[row].cells[col].firstChild.src = 'http://www.streetmap.co.uk/image.dll?ShowImage&image='+ob.gif+'.gif&road=Y&loc2='+ob.loc2+'&type=O'
     }

//ob = this.initstuff[6]
//tab.rows[2].cells[0].firstChild.src = 'http://www.streetmap.co.uk/image.dll?ShowImage&image='+ob.gif+'.gif&road=Y&logo=copyright4.gif&loc2='+ob.loc2+'&type=O'
//ob = this.initstuff[4]
pos = this.initstuff[9]
if ( postcodething ) postcodething.innerHTML = pos.postcode
//tab.rows[1].cells[1].firstChild.src = 'http://www.streetmap.co.uk/image.dll?ShowImage&image='+ob.gif+'.gif&road=Y&arrow=y&x='+pos.x+'&y='+pos.y+'&loc2='+ob.loc2+'&type=O'
this.ownlink.onmousemove = this.mm
// now position the blob
//var blob = document.getElementById("little")
//alert( blob.left )
this.floatblob.style.left = 200 + pos.x - 10
this.floatblob.style.top = -200 - pos.y - 10
//this.timer = setInterval( this.flash, 500 )
//var e = ev || window.event;
offx = -300
offy = 10;
//var scrollamount = e.clientY + 600 - screen.availHeight
//if ( scrollamount > 0 ) offy = -630
//if ( screen.availWidth - e.client < 300 ) offx = -500
//else if ( e.client < 300 ) offx = 500
//alert( e.clientY + ' ' + screen.availHeight )

this.mmf(ev)
}

floatmap.prototype.scrollfun = function()

{
//alert( this.scroll_up )
if ( this.scroll_up > 0 )
     {
     var amount = this.scroll_up
     if ( amount > 2 ) amount = 2;
     this.scroll_up -= amount;
     if ( this.scroll_up == 0 ) clearInterval( this.scrolltimer )
     window.scrollBy(0,amount )
     }
}

floatmap.prototype.mmf = function(ev) // mousemove
    {
    var e = ev || window.event;
    //window.status=e.clientX+','+e.clientY
    //cc = document.getElementById("mfloat")
    var s = this.mfloat.style
    s.left = e.clientX + offx + document.body.scrollLeft
    s.top = e.clientY + offy + document.body.scrollTop
    return true
    }

/*var e = ev || window.event;
//if ( window.event ) ob = e.srcElement
//else ob = e.target
floatdiv.style.left = e.clientX + offx + document.body.scrollLeft
floatdiv.style.top = e.clientY + offy + document.body.scrollTop*/

floatmap.prototype.mxf = function() // mouseout
    {
    //l=document.getElementById("thelink")
    //aa=document.getElementById("fimage")
    //aa.src="favicon.jpg"
    offx = 10
    offy = 10
    this.mfloat.style.visibility="hidden"
    this.ownlink.onmousemove = null
    //clearInterval( this.timer )
    //this.floatblob.style.visibility = 'hidden'

    }

floatmap.prototype.omof = function() // mouseout
    {
    aa=document.getElementById("fimage")
    aa.src=this.initstuff[0]
    div=document.getElementById("float")
    div.style.visibility="visible"
    this.ownlink.onmousemove = this.mm

    //l=document.getElementById("thelink")
    //aa=document.getElementById("fimage")
    //aa.src="favicon.jpg"
    //offx = 10
    //offy = 10
    //this.mfloat.style.visibility="hidden"
    //this.ownlink.onmousemove = null
    }
floatmap.prototype.flash = function()
    {
    var blob = floatmap.prototype.floatblob
    if ( blob.style.visibility == "hidden" ) blob.style.visibility = 'visible'
    else blob.style.visibility = 'hidden'
    }

ofloatmap.prototype = new floatmap( 0, 0, true )

function ofloatmap( placename )
{
//ofloatmap.prototype = new floatmap( placename, true )
// uses closures to access the object context for the mouse functions
var thiss = this; // private member function accessible to internal methods later
//this.mfloat = document.getElementById( 'float' )
var initob = maps[placename]
this.initstuff = initob
var nameofowner = 'ofloatmaplink' + floatmap.prototype.linknum++
this.nameofowner = nameofowner
document.write( '<a id="',this.nameofowner,'" href="',this.initstuff[1],'">',this.initstuff[2],'</a>' )
this.ownlink = document.getElementById( this.nameofowner )

this.mo = function() { thiss.omof() }// mouseover
this.mm = function(ev) { thiss.mmf(ev) }// mousemove
this.mx = function() { thiss.mxf() }// mouseout

if ( this.ownlink )
{
this.ownlink.onmouseover = this.mo
this.ownlink.onmouseout = this.mx
}
}

floatmap.prototype.gmof = function() // mouseout
    {
    aa=document.getElementById("gmap")
    var parts = aa.src.split( '.org/' )
    var previous = parts[1]
    if ( previous != this.initstuff[0].url )
    	{
    	//alert( 'current='+previous+' url='+this.initstuff[0].url )
        aa.src=this.initstuff[0].url
        }
    aa.style.visibility="visible"
    //aa.src = 'gmap.php?lat=
    //div=document.getElementById("float")
    //div.style.visibility="visible"
    this.ownlink.onmousemove = this.mm

    }

gfloatmap.prototype = new floatmap( 0, 0, true )

var gmaps = new Array()

function gfloatmap( placename, full )
{
// uses closures to access the object context for the mouse functions
var thiss = this; // private member function accessible to internal methods later
gmaps.push(this)
var initob = maps[placename]
this.initstuff = initob
var nameofowner = 'gfloatmaplink' + floatmap.prototype.linknum++
this.nameofowner = nameofowner
if ( typeof full == 'undefined' ) full = this.initstuff[0].name
this.initstuff[0].url += '&id=' + this.initstuff[0].id
document.write( '<a title="',this.initstuff[0].postcode,'" id="',this.nameofowner,'" href="',this.initstuff[0].url,'">',full,'</a>' )
this.ownlink = document.getElementById( this.nameofowner )

this.mo = function() { thiss.gmof() }// mouseover
this.mm = function(ev) { thiss.mmf(ev) }// mousemove
this.mx = function() { thiss.mxf() }// mouseout

if ( this.ownlink )
	{
	this.ownlink.onmouseover = this.mo
	this.ownlink.onmouseout = this.mx
	}
}

function output_map_link( name )

{
/*
echo "<a href=show_album.php?album_id=$album name='$dirname.jpg' ";
echo "onMouseOver='thumbhit(event)'  onMouseOut='unhit(event)' >";
*/
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 )
    if ( bling.length == 3 ) new ofloatmap( chunk )
    else if ( bling.length == 10 ) new floatmap( chunk )
    else new gfloatmap( chunk )
    }
}
}

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]
//bb=document.getElementById("maplink")
//bb.href=maps[id][1]
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"

//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 )
{
if ( pic ) document.write( '<td align="',align,'" width=',wid,' class="',style,'"><a href="',url,'"><img border=0 title="',tip,'" class="noborders" src=images/',pic,'.gif></a></td>' )
else document.write( '<td align="',align,'" width=',wid,' class="',style,'"><a href="',url,'" title="',tip,'"><div class="ww">',text,'</div></a></td>' )
}

function display_album_shot( picnum, pictures, pic_url, pic_caption, border_class, show_report )
{
document.write( '<table width=100% cellpadding=10 cellspacing=0 bgcolor=black border=0><tr><td><table width=85% align=center border=1  class="wt" cellpadding=2 cellspacing=0><tr>' )

nav_tab( 20, 'nav_first', 'rwborder',0, shift_url + '1', 'first' )
if ( picnum > 2 ) nav_tab( 20, 'nav_prev', 'rwborder',0, shift_url + (picnum - 1 ), 'previous' )
if ( report_url != "" ) nav_tab( 20, 'report', 'rwborder',0, report_url, 'view ride report' )
nav_tab( '90%', false, 'noborders', picnum + ' of ' + pictures, shift_url + '0', 'gallery', 'center' )
if ( picnum < pictures - 1 ) nav_tab( 20, 'nav_next', 'lwborder',0, shift_url + (picnum + 1 ), 'next' )
nav_tab( 20, 'nav_last', 'lwborder',0, shift_url + pictures, 'last' )

document.write( '</tr></table></td></tr></table><table width=100% border=0 cellpadding=100 cellspacing=0 bgcolor=black border=0><tr><td align=center>' )
document.write( "<img class='",border_class,"' src='",pic_url,"' name='peeoo' ><div width=600 height=10>.</div><div class=ww>",pic_caption,"</div></td></tr></table>" )
}

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")'

function page_top()

{
document.write( '<title>', page_name,'</title>' );

document.write( '<body bgcolor="#006699" text="#000000" link="#006699" vlink="#5493B4" ' )
if ( onloadfun != "" ) document.write( "onload='",onloadfun,"'>" )
else document.write( ">" )
document.write( '<a name="top"></a>' )
document.write( '<table 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="home" src=images/btlogo.jpg border=0>' )
//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 -->

menu_row( "/index.shtml", "Home", "/about.shtml", "About Us", "/links.shtml", "Links",
  "/rideslist.php", "Rides List", "/contact.shtml", "Contact", "/members.shtml", "Meet the Club!",
  "/rides/gallery", "Gallery", "/members/", "Member's Area" )

if ( in_members ) menu_row( "/members/download", "Downloads", "/members/booksx.php", "Accounts", "/members/library.shtml", "Library",
  "http://lists.bogtrotters.org/mailman/listinfo/chat", "Chat", "http://lists.bogtrotters.org/mailman/listinfo/news", "News",
  "http://www.bogtrotters.org:8080", "New Stats", "/php/bbclone", "Statistics" )


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
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 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 = \"http://www.bogtrotters.org/admin/' + edit_page + '\" '
else click = ''
document.write( "<span style='color: #ffffff;' onclick='",click,"'>&copy;</span>" )
document.write( "<span style='color: #ffffff;'> 1997 - 2008 <i>",copy_text,copy_text != "" ? " &amp; " : "","Bog Trotters Mountain Bike Club</i></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;\" ><img id='fimage' src=favicon.jpg border=1><div id='tiptext' style='font: 10pt Helvetica; background : lemonchiffon; visibility:hidden;' >some text</div></div>" )
document.write( "<div id='mfloat' style='position:absolute; top:1700; z-index:100; border: 1px white; background-color:transparent; visibility:hidden;' >\
<TABLE BORDER='0' CELLSPACING='0' CELLPADDING='0' >\
<tr><td class='maptd'><IMG class='maptd' SRC='images/space.gif'><td class='maptd'><IMG class='maptd' SRC='images/space.gif'><td class='maptd'><IMG class='maptd' SRC='images/space.gif'></tr>\
<tr><td class='maptd'><IMG class='maptd' SRC='images/space.gif'><td class='maptd'><IMG class='maptd' SRC='images/space.gif'><td class='maptd'><IMG class='maptd' SRC='images/space.gif'></tr>\
<tr><td class='maptd'><IMG class='maptd' SRC='images/space.gif'><td class='maptd'><IMG class='maptd' SRC='images/space.gif'><td class='maptd'><IMG class='maptd' SRC='images/space.gif'></tr>\
</TABLE>\
<div id=little style='z-index:110;position:relative;top:-200;left:200;width:20;height:20;background-color:transparent;'><img src=mapblock.gif></div>\
<div id=copyr >&copy; Crown copyright; Ordnance Survey</div>\
<div id=postcodebox>postcode</div></div>" )
floatmap.prototype.mfloat = document.getElementById("mfloat")
floatmap.prototype.floatblob = document.getElementById("little")
floatdiv = document.getElementById("float")
ofloatmap.prototype.mfloat = floatdiv
postcodething = document.getElementById("postcodebox")

}

//var streetmap = new Array()

/*
function dump_map( ob ) // dump_map maps['BLA']
{
var op = '<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" >'
op += dump_row( ob, 0 )
op += dump_row( ob, 3 )
op += dump_row( ob, 6 )
op +=  '</TABLE>' //<br>&copy; Ordnance Survey &amp; www.streetmap.co.uk'
return op
}

function dump_row( ob, id )

{
var op = '<tr>'
if ( id == 6 ) op += dump_copy_tile( ob[id] )
else op += dump_tile( ob[id] )
if ( id == 3 ) op += dump_middle_tile( ob[id + 1], ob[9] )
else op += dump_tile( ob[id + 1] )
op += dump_tile( ob[id + 2] )
op +=  '</tr>'
return op
}

function dump_tile( ob )
{
return '<td><IMG SRC="http://www.streetmap.co.uk/image.dll?ShowImage&image='+ob.gif+'.gif&road=Y&loc2='+ob.loc2+'&type=O" BORDER="0" HEIGHT="200" WIDTH="200" ISMAP></TD>'
}

function dump_copy_tile( ob ) //
{
return '<td><IMG SRC="http://www.streetmap.co.uk/image.dll?ShowImage&image='+ob.gif+'.gif&road=Y&logo=copyright4.gif&loc2='+ob.loc2+'&type=O" BORDER="0" HEIGHT="200" WIDTH="200" ISMAP></TD>'
}

function dump_middle_tile( ob, pos )
{
return '<td><IMG SRC="http://www.streetmap.co.uk/image.dll?ShowImage&image='+ob.gif+'.gif&road=Y&arrow=y&x='+pos.x+'&y='+pos.y+'&loc2='+ob.loc2+'&type=O" BORDER="0" HEIGHT="200" WIDTH="200" ISMAP></TD>'
}
*/
