var targetURLs=new Array(
  "home.html",
  "contact.html",
  "gallery.html",
  "directions.html",
  "cottages.html"
);
var navLines=new Array(
  "Return to the Home Page...",
  "Contact details and inquiries...",
  "Photograph gallery...",
  "Directions to Maylodge...",
  "Maylodge Country Cottages..."
);
var currentPage=0;
var navTimer1;
var navTimer2;
var currentFlash=1;

function reset_navbar() {
  for(aloop=0;aloop<targetURLs.length;aloop++) {
    styleName="butt"+aloop;
    top.frames[0].document.all[styleName].style.fontWeight="normal";
    top.frames[0].document.all[styleName].style.color="#008000";
    top.frames[0].document.all[styleName].style.backgroundColor="#FFFFFF";
  }
  styleName="butt"+currentPage;
  top.frames[0].document.all[styleName].style.fontWeight="bold";
  top.frames[0].document.all[styleName].style.color="#FFFFFF";
  top.frames[0].document.all[styleName].style.backgroundColor="#008000";
}
function highlight_nav(navButt) {
  styleName="butt"+navButt;
  top.frames[0].document.all[styleName].style.color="#FFFFFF";
  top.frames[0].document.all[styleName].style.backgroundColor="#008000";
  window.status=navLines[navButt];
  return true
}
function navigate_to(targetPage) {
  top.frames[1].document.location=targetURLs[targetPage];
  currentPage=targetPage;
  reset_navbar();
}

function slide_flash() {
  styleName="flash"+currentFlash;
  document.all[styleName].style.pixelLeft -= 2;
  if(document.all[styleName].style.pixelLeft <= 395) {
    document.all[styleName].style.pixelLeft=395;
    window.clearInterval(navTimer2);
  }
}
function change_flash() {
  styleName="flash"+currentFlash;
  document.all[styleName].style.pixelLeft=document.body.clientWidth;
  currentFlash++;
  if(currentFlash > 4) { currentFlash=1; }
  navTimer2=window.setInterval("slide_flash()",1);
}
function start_nav() {
  for(aloop=2;aloop<=4;aloop++) {
    styleName="flash"+aloop;
    document.all[styleName].style.pixelLeft=document.body.clientWidth;
    document.all[styleName].style.visibility="visible";
  }
  navTimer1=window.setInterval("change_flash()",5000);
}


function startit(statusLine) {
  window.defaultStatus="Maylodge > "+statusLine;  
}

