// Names and Descriptions

// document.title = 'Southern California LEGO Train Club'
SCLTCText = 'SCLTC ASP v1.0 - Designed by Thomas Michon'

window.status = SCLTCText

// Locations

locationSite = '/' // locationSite = location.href.slice(0, location.href.lastIndexOf('pages/'))

locationPage = location.href.slice(location.href.lastIndexOf('pages/') + 6, location.href.lastIndexOf('/') + 1)

locationPreviousPage = locationSite + 'pages/' + location.href.slice(location.href.lastIndexOf('pages/') + 6, location.href.lastIndexOf('/')) +'.asp'

idPage = location.href.slice(location.href.lastIndexOf('/') + 1, location.href.lastIndexOf('.htm'))

// Titles

if (location.href.indexOf('pages/') > -1) {
  string1 = location.href.slice(location.href.lastIndexOf('pages/') + 6)
  if (string1.indexOf('/') > -1) {
    titleSection = string1.slice(0, string1.indexOf('/'))
    string2 = string1.slice(string1.indexOf(titleSection + '/') + titleSection.length + 1)
    if (string2.indexOf('/') > 1) {
      titlePage = string2.slice(0, string2.indexOf('/'))
    } else {
      titlePage = string2.slice(0, string2.indexOf('.asp'))
    }
    subDirectory = titleSection + '/'
  } else {
    titleSection = string1.slice(0, string1.indexOf('.asp'))
    subDirectory = ''
    titlePage = 'index'
  }
} else {
  titleSection = ''
}