//ie6 flickering bug
try {
  document.execCommand("BackgroundImageCache", false, true);
} catch(err) { }  


function statusHover() {

   if (document.getElementById && 0) {
		var navItem = document.getElementById("nav05");
    var sBox = document.getElementById("tbSBox");

    if(sBox.className.substring(sBox.className.length-2, sBox.className.length) != "_v") {
      navItem.onmouseover = function() {
        sBox.className+="_v";
         
   
      }
      navItem.onmouseout = function() {
        sBox.className = sBox.className.replace("_v", "");
      }

      if(document.getElementById("nav05href")) {
        var anchor = document.getElementById("nav05href");
        sBox.onmouseover = function() {
          anchor.className = "nav05x";
        }
        sBox.onmouseout = function() {
          anchor.className = "nav05a";
        }
      }
   }
}

  var button = document.getElementById("nav01href");
  var dropDown = document.getElementById("dropdown");

  dropDown.onmouseover = function() {
    button.className = "nav01x";
    
  }
  dropDown.onmouseout = function() {
    button.className = "nav01a";
    
    }
}

//ABOUT SECTION ONLY - styles about section left nav

function aboutLeftNav(section) {
  var singleLIA = document.getElementById(section).childNodes[0];
  var subMenu = document.getElementById(section).childNodes[2];
  var currentWindow = window.location.href;
  var anchorTags = document.getElementsByTagName("a");
  
  //highlight sub-page in which URL does not match link to be highlighted
  switch (currentWindow) {
  case 'http://www.jetblue.com/about/whyyoulllike/about_whysnacks.html':
    currentWindow = 'http://www.jetblue.com/about/whyyoulllike/about_why2.html';
    break;
  case 'http://www.jetblue.com/about/whyyoulllike/about_whyshuteye.html':
    currentWindow = 'http://www.jetblue.com/about/whyyoulllike/about_why3.html';
    break;
  case 'http://www.jetblue.com/about/whyyoulllike/about_WhyXMRadio.html':
    currentWindow = 'http://www.jetblue.com/about/whyyoulllike/about_why8.html';
    break;
  case 'http://www.jetblue.com/about/whyyoulllike/about_WhyMoviesandMore.html':
    currentWindow = 'http://www.jetblue.com/about/whyyoulllike/about_why9.html';
    break;
  case 'http://www.jetblue.com/about/whyyoulllike/about_betablue.html':
    currentWindow = 'http://www.jetblue.com/about/whyyoulllike/about_why10.html';
    break;
  case 'http://www.jetblue.com/about/whyyoulllike/about_WhyWireless.html':
    currentWindow = 'http://www.jetblue.com/about/whyyoulllike/about_why10.html';
    break;
  case 'http://www.jetblue.com/green/footprint.asp':
    currentWindow = 'http://www.jetblue.com/green/whatweredoing.asp';
    break;
  case 'http://www.jetblue.com/green/onething.asp':
    currentWindow = 'http://www.jetblue.com/green/whatweredoing.asp';
    break;
  case 'http://www.jetblue.com/about/whyyoulllike/directv/guide/TribuneTVFront/':
    currentWindow = 'http://www.jetblue.com/about/whyyoulllike/about_why7.html';
    break;
  case 'http://www.jetblue.com/about/jfk/events.asp?intcmp=HPLive-at-T520090625':
    currentWindow = 'http://www.jetblue.com/about/jfk/events.asp';
    break;
  }
    
  //Make the correct sub-UL visible based on parameter passed in onLoad handler
  if (subMenu) {subMenu.style.display = 'block';}
    
  //apply selected class to childless LIs
  singleLIA.className='selected';
  
  //Highlight selected nav item based on URL of page
  for (var i = 0; i < anchorTags.length ; i++) {
    if (anchorTags[i].href == currentWindow) {
	  anchorTags[i].style.fontWeight = 'bold';
	  anchorTags[i].style.color = '#004a91';
    }	
  }
}
