/* Flash Communication Scripts - Version 1.1
 *
 */

isIE = (navigator.appName.indexOf("Microsoft") != -1);
isMacIE = ((navigator.appVersion.indexOf("Mac") != -1) && isIE);
isNS6 = (navigator.appName == "Netscape" && parseInt(navigator.appVersion) >= 5);
currentSection="home";

function changeSection(sectionID) {
  if (top.header == null) {
    top.location.replace(window.location.hostname);
  } else {
    if(isNS6 || isMacIE) {
      top.header.location.replace(top.header.location.pathname+"?section="+sectionID);
    } else {
      currentSection=sectionID;
      waitUntilLoaded();
    }
  }
}

function waitUntilLoaded() {
  headerMovie = isIE ? top.header.headerMovie : top.header.document.headerMovie;
  if(headerMovie.PercentLoaded() == 100 && !headerMovie.isPlaying()) {
    headerMovie.SetVariable("_root.section",currentSection);
    headerMovie.TCallLabel("_level0",currentSection);
    //headerMovie.TPlay("_level0");
  } else {
    setTimeout('waitUntilLoaded()',10);
  }
}
