var tabNames  = new Array ("home", "sites", "contacts", "ew2010");
var tabLabels = new Array ("HOME", "SITES", "CONTACTS", "PHOTOS");

function selectTab(tabName) {
  var doc = parent.frames.TitleAndTabs.document;
  for (tabIndex = 0; tabIndex < tabNames.length; tabIndex++) {
    gate = doc.getElementById(tabNames[tabIndex]);
    if (tabName == tabNames[tabIndex]) {
      gate.className = "lower_open";
    } else {
      gate.className = "lower_closed";
    }
  }
}

function show(index) {
  var name = tabNames[index];
  selectTab(name);
  parent.frames.Content.location = name + ".php";
}
