function headimg() {
  if (document.getElementById) {
     // TODO: disable links in sidebar that match current URL - usability
     // Rotate the header img:
     var el = document.getElementById('mastheadimg');
     var randomnumber = Math.floor(Math.random()*71);
     var desc = imglocations[randomnumber];
     el.innerHTML = '<img src="/images/headers/' +
        randomnumber + '.jpg" width="640" height="113" alt="" title="' +
        (desc ? desc : "") + '">';
  }
}
window.onload = headimg;

var imglocations = {
0: "Museum and L&N depot in Lynch (see Cumberland to Benham and Lynch line)",
1: "Orkney Tunnel (see Martin to Wheelwright line)",
2: "ROW beside KY 1635 near Tip Top, Dawkins Line",
3: "CSX/Lexington Big Sandy abandonment at Pine Grove, Clark County",
4: "Morehead North Fork",
5: "Wingo Railtrail",
6: "Railroad Street roadsign, Flemingsburg",
//6old - ??? possibly muhlenburg ???
7: "RR bridge over Triplett Creek near Lee Clay Ave and KY 519 in Morehead",
8: "1 of 3 iron trestle bridges on E K Railroad Drive on ROW, Carter County",
9: "ROW at Evanston, KY 542, looking west, Dawkins Line",
10: "Rowland branch Tunnel",
11: "Aden Tunnel, winter time",
12: "New railtrail near Mammoth Cave",
13: "Right of way near Hartford, Ohio County",
14: "Former L&N RR Depot in Stanford",
15: "Near Laketon, Carlisle County (see Winford Junction to TN line)",
16: "End of the line, Carter County",
17: "Example of reuse as auto road (see chapter 3)",
//18old - "Example of clear path, non-auto use (see chapter 3)",
18: "C&O caboose",
19: "Yamacraw bridge (See Worley to Bell Farm)",
20: "Depot in Eminence, Henry County",
21: "L&N Caboose in Lynch, Harlan County",
//21old - Along the ROW of Big South Fork Scenic Railway, Stearns !!!Not abandoned",
22: "Abandoned Rails, unknown location",
23: "Rails on the ground in Lynch, Harlan County",
//24old - Weedy right of way near Island, Muhlenburg County !!Poor Quality",
24: "Bridge near Orkney Tunnel (See Martin to Wheelwright)",
25: "Covered bridge on rail trail in Greenville, Muhlenburg County",
26: "Obvious sign of abandonment, likely near Wheelwright, Ky (see chapter 3)",
27: "Right of way near Dekoven and River (See Morganfield to Sullivan)",
28: "Orkney Tunnel (See Martin to Wheelwright line)", // (Other entrance of header 1) 
29: "Depot, Morehead",
30: "Olive Hill Depot",
31: "Retaining Embankment to ROW, eastern Carter County",
32: "RR Bridge, Rush, KY 864, Carter County",
33: "CSX/Lexington Big Sandy line, from Combs Ferry Rd, Clark County",
34: "Young's High Bridge, Tyrone",
35: "Railroad Lane roadsign, near Lexington Big Sandy. From National Trail Ride Day 2003",
36: "Muhlenburg county rail trail",
37: "Automobile road through Nada Tunnel, Powell County",
38: "Hawesville railroad station, Hancock County, KY",
39: "Near Worley and Yamacraw bridge (See Worley to Bell Farm line)",
40: "Yamacraw bridge (See Worley to Bell Farm line)",
41: "Abandonment, likely near city of Benham (see Cumberland to Benham and Lynch)",
42: "Bridge across the Tradewater River in Blackford, near Weston",
43: "Tracks left near Worley (See Worley to Bell Farm line)",
44: "Uniontown Trail with Paducah and Louisville Caboose in background, Union County",
45: "Rider on the Muhlenburg County railtrail",
//46old - Riders near 1st trestle bridge on access road/ROW near Fultz (Lex to Ashland Relay 2005)",
46: "Right of way between Owensboro and Moorman", // (also see header 51)
47: "Riders on Hwy 542 near Dawkins line",
48: "Right of way along KY 542, Dawkins line",
//49old - Unknown location, from KRTC website header rotation !!Poor Quality",
49: "Tunnel south of Burnside on former CNO&TP",
50: "Right of way looking South from Bee Tree Rd & KY 1635, Dawkins line",
51: "Right of way between Owensboro and Moorman",
52: "Walking trail near depot in Stanford",
53: "Non-motorized railtrail path in National Wildlife Refuge, Benton (See Hardin to Paducah)",
54: "Spur off the Wilderness Road Trail, some is railtrail, Cumberland Gap, TN/VA", // !!Not Railtrail?
55: "Depot, Fordsville, KY", // !!POOR Quality, but nice
56: "Tracks on the ground at Clearfield, Rowan County",
57: "Depot at Evarts, Harlan County",
58: "Depot, Stanford, Ky",
59: "Riney B Way roadsign, (Richmond, Nicholasville, Irvine and Beattyville RR)",
//60old - Unknown abadonment, perhaps in PA?",
60: "Unknown kentucky abandonment",
61: "Railroad Bed roadsign, near Olive Hill, Carter County",
62: "Posted, private property sign, near william witney house, (See New Hope to Mt Vernon)",
//Extras, not on original site *********",
63: "Sign (No Motorized Vehicles Allowed) along Muhlenberg County railtrail",
64: "Bridge supports and abutment on former Lebanon Branch near Crab Orchard",
65: "Remains of bridge near Madisonville",
66: "Yamacraw bridge", // (perhaps should replace header 19, quite similar)
67: "Unknown ky abandonment",
68: "Unknown ky abandonment (possibly cathy crockett trail)",
69: "Unknown ky abandonment",
70: "iron trestle bridge on E K Railroad Drive on ROW, Carter County",
71: "Unknown ky abandonment"
}
