// js version uses code to control special feature access
// best practice is to block comment the entire file during site miantenance so that the site layout is accessable

var ReferrerURL = new Array();
ReferrerURL[0] = "http://www.yeoldebarbershop.com"; // The Shop
ReferrerURL[1] = "http://sja-stall.blogspot.com"; // SouthernJackass' Stall
ReferrerURL[2] = "http://issuesfacingbaseball.blogspot.com"; // Issues Facing Baseball
ReferrerURL[3] = "http://www.thoughtsfromcenterfield.com";  // Centerfield
ReferrerURL[4] = "http://www.carolssalon.com"; // Carol's Salon
ReferrerURL[5] = "http://barbershop-recipes.blogspot.com"; // Barbershop' Cookbook
ReferrerURL[6] = "http://theoldbarbershop-lmm.blogspot.com"; // Magic Moments
ReferrerURL[7] = "http://gone-notforgotten.blogspot.com"; // Gone - Not Forgotten
ReferrerURL[8]= "http://www.nonpoliticalpolitics.com"; // Non-Political Politics

var AURL = new Array();  // features with direct access to other features 
AURL[0] = "1"; // The Shop
AURL[1] = "0"; // SouthernJackass' Stall
AURL[2] = "1"; // Issues Facing Baseball
AURL[3] = "1";  // Centerfield
AURL[4] = "1"; // Carol's Salon
AURL[5] = "1"; // Barbershop' Cookbook
AURL[6] = "1"; // Magic Moments
AURL[7] = "1"; // Gone - Not Forgotten
AURL[8] = "1"; // NPP

var Shop = 'http://www.yeoldebarbershop.com';
var RURL =  document.referrer;
var ERUL = RURL.length;
if(ERUL == 0)location.href = Shop;
else 
{
var GoodURL = 0;
var x = 0;
var MaxLoop = ReferrerURL.length;
var TestString1;
var CanAccess;
var T1;

while (x < MaxLoop)
  {
  TestString1 = ReferrerURL[x];
  CanAccess = AURL[x];
  T1 = RURL.indexOf(TestString1);
  if(T1 != -1) {
  	if(CanAccess != 0) GoodURL = 1;
	x = MaxLoop;
  	}
	
  	x++; 
  }
 
if(GoodURL != 1)location.href = Shop;
}


