// off buttons
var offImgArray = new Array();
offImgArray[0] = new Image(34,15);
offImgArray[1] = new Image(76,15);
offImgArray[2] = new Image(66,15);
offImgArray[3] = new Image(51,15);
offImgArray[4] = new Image(73,15);
offImgArray[5] = new Image(81,15);
offImgArray[6] = new Image(87,15);
offImgArray[7] = new Image(83,15);
offImgArray[8] = new Image(80,15);
offImgArray[9] = new Image(34,15);
offImgArray[10] = new Image(63,15);

// off image array path
offImgArray[0].src = "/topnav/images/top_nav/home_off.gif";
offImgArray[1].src = "/topnav/images/top_nav/where_we_fly_off.gif";
offImgArray[2].src = "/topnav/images/top_nav/travel_facts_off.gif";
offImgArray[3].src = "/topnav/images/top_nav/about_us_off.gif";
offImgArray[4].src = "/topnav/images/top_nav/check_flights_off.gif";
offImgArray[5].src = "/topnav/images/top_nav/where_to_stay_off.gif";
offImgArray[6].src = "/topnav/images/top_nav/getting_around_off.gif";
offImgArray[7].src = "/topnav/images/top_nav/cover_yourself_off.gif";
offImgArray[8].src = "/topnav/images/top_nav/treat_yourself_off.gif";
offImgArray[9].src = "/topnav/images/top_nav/log_in_off.gif";
offImgArray[10].src = "/topnav/images/top_nav/timetables_off.gif";

// on buttons
var onImgArray = new Array();
onImgArray[0] = new Image(34,15);
onImgArray[1] = new Image(76,15);
onImgArray[2] = new Image(66,15);
onImgArray[3] = new Image(51,15);
onImgArray[4] = new Image(73,15);
onImgArray[5] = new Image(81,15);
onImgArray[6] = new Image(87,15);
onImgArray[7] = new Image(83,15);
onImgArray[8] = new Image(80,15);
onImgArray[9] = new Image(34,15);
onImgArray[10] = new Image(63,15);

// on image array path
onImgArray[0].src = "/topnav/images/top_nav/home_on.gif";
onImgArray[1].src = "/topnav/images/top_nav/where_we_fly_on.gif";
onImgArray[2].src = "/topnav/images/top_nav/travel_facts_on.gif";
onImgArray[3].src = "/topnav/images/top_nav/about_us_on.gif";
onImgArray[4].src = "/topnav/images/top_nav/check_flights_on.gif";
onImgArray[5].src = "/topnav/images/top_nav/where_to_stay_on.gif";
onImgArray[6].src = "/topnav/images/top_nav/getting_around_on.gif";
onImgArray[7].src = "/topnav/images/top_nav/cover_yourself_on.gif";
onImgArray[8].src = "/topnav/images/top_nav/treat_yourself_on.gif";
onImgArray[9].src = "/topnav/images/top_nav/log_in_on.gif";
onImgArray[10].src = "/topnav/images/top_nav/timetables_on.gif";


//-- open a popup window 
function popup(link, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(link) == 'string')
   href=link;
else
   href=link.href;
window.open(href, windowname, 'width=440,height=400,left=20,top=20,scrollbars=yes');
return false;
}


/* open a popup centred in browser window*/
function CentreWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',toolbar=no,resizable=no,status=no'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}


/* open a popup centred in browser window*/
// open new window
function openWindow(url, name, w, h) {
  popupWin = window.open(url, name, 'resizable,scrollbars,menubar,width=' + w + ',height=' + h);
}
function openWindowEx3(url, name, w, h) {
  // initialize winX and winY to default values
  // for cases where Screen object isn't supported
  var winX = 0;
  var winY = 0;

  // only set new values if 4.0 browser
  if (parseInt(navigator.appVersion) >= 4) {
    winX = (screen.availWidth - w)*.5;
    winY = (screen.availHeight - h)*.5;
  }

  popupWin = window.open(url, name, 'width=' + w + ',height=' + h + ',left=' + winX + ',top=' + winY);
}


// functions that swap images
function imageOn(i) {
	document.images['nav' + i].src = onImgArray[i].src
}

function imageOff(i) {
	document.images['nav' + i].src = offImgArray[i].src
}


// function that displays status bar messages

function dm(msgStr) {
    window.status = msgStr;
    document.MM_returnValue = true;
}

