function mo_maindisplay(id) {
  var strPic = document.getElementById(id).src;
  //document.getElementById(id).src='../../images/New/o'+strPic.substring(strPic.lastIndexOf("/")+1,strPic.length);
  document.getElementById(id).src='../../images/Carmel_v5/navi/o'+strPic.substring(strPic.lastIndexOf("/")+1,strPic.length);
}
function mu_maindisplay(id) {
  var strPic = document.getElementById(id).src;
  //document.getElementById(id).src='../../images/New/'+strPic.substring(strPic.lastIndexOf("/o")+2,strPic.length);
  document.getElementById(id).src='../../images/Carmel_v5/navi/'+strPic.substring(strPic.lastIndexOf("/o")+2,strPic.length);
}
function mo_display(id) {
  var strPic = document.getElementById(id).src;
  document.getElementById(id).src='Includes/Images/o'+strPic.substring(strPic.lastIndexOf("/")+1,strPic.length);
}
function mu_display(id) {
  var strPic = document.getElementById(id).src;
  document.getElementById(id).src='Includes/Images/'+strPic.substring(strPic.lastIndexOf("/o")+2,strPic.length);
}
function goTo(strUrl) {
  window.location=strUrl;
}
function memberMenuOn(id) {
  var strPic = document.getElementById(id).src;
  document.getElementById(id).src='Includes/MemberMenu/on_'+strPic.substring(strPic.lastIndexOf("/")+1,strPic.length);
}
function memberMenuOff(id) {
  var strPic = document.getElementById(id).src;
  document.getElementById(id).src='Includes/MemberMenu/'+strPic.substring(strPic.lastIndexOf("/on_")+4,strPic.length);
}

function onAirportChange(elem) {
  if (elem.id == 'jobAirportWW') {
    top.document.getElementById('jobAirport').selectedIndex = 0;
  } else {
    top.document.getElementById('jobAirportWW').selectedIndex = 0;
  }
}

function USA_redirect() {
  var airportCd = document.getElementById('jobAirport').value;
  if (document.getElementById('jobAirport').selectedIndex == 0) {
    airportCd = document.getElementById('jobAirportWW').value;
  }
  if (airportCd.substring(0, 1) == "-" || airportCd.substring(0, 1) == ".") {
    return;
  }
  if (airportCd == "JFK"
      || airportCd == "LGA"
      || airportCd == "EWR"
      || airportCd == "HPN"
      || airportCd == "ISP"
      || airportCd == "TEB") {
      var str = new String(window.location);
      //var appUrl = str.indexOf('JobsApp/')!=-1 ? "" : "JobsApp/";
      var appUrl = "";
      if (str.indexOf('JobsApp/')==-1 && str.indexOf('AffApp/')==-1 && str.indexOf('AffUSA/')==-1) {
        appUrl = "JobsApp/";
      }
      window.location = appUrl + "Job_FromTo.jsp?airportCd=" + airportCd;
    return;
  }

  var acct = "";
  try {
    acct = acctId == null ? "" : ("&acctId=" + acctId);
  } catch (error) {
    acct = "";
  }
  if (acct == "") {
    try {
      acct = affAcctId == null ? "" : ("&affLink=" + affAcctId);
    } catch (error) {
      acct = "";
    }
  }
  var url = "https://carmellimo.com/worldwide/carmel/carmelfares.aspx?airportCd=" + airportCd + acct;
  <!--alert(url);-->
  window.location = url;
  return; // open link in the same window and return. (code below for openning in new window)

  var wOpen;
  var sOptions;
  sOptions = 'status=yes,menubar=yes,scrollbars=yes,resizable=yes,toolbar=yes';
  sOptions = sOptions + ',width=' + (screen.availWidth - 10).toString();
  sOptions = sOptions + ',height=' + (screen.availHeight - 122).toString();
  sOptions = sOptions + ',screenX=0,screenY=0,left=0,top=0';

  wOpen = window.open( '', '', sOptions );
  wOpen.location = url;
  wOpen.focus();
  wOpen.moveTo( 0, 0 );
  wOpen.resizeTo( screen.availWidth, screen.availHeight );
  //window.open(url, "");
}
function USA_showMore() {
  //document.getElementById("divMoreCities").
  //document.getElementById("divMoreCities").
  var div = document.getElementById("divMoreCities");
  div.style.display = "";
  //alert(window.innerWidth + " : " + document.body.clientWidth);
  //alert(document.body.clientWidth + " : " + document.body.clientHeight);
  //alert(div.offsetWidth + " : " + div.offsetHeight);
  var x = (document.body.clientWidth / 2) - (div.offsetWidth / 2);
  var y = (document.body.clientHeight / 2) - (div.offsetHeight / 2);
  div.style.top = y;
  div.style.left = x;
}

function Link_redirect(url) {
  var wOpen;
  var sOptions;
  sOptions = 'status=yes,menubar=yes,scrollbars=yes,resizable=yes,toolbar=yes';
  sOptions = sOptions + ',width=' + (screen.availWidth - 10).toString();
  sOptions = sOptions + ',height=' + (screen.availHeight - 122).toString();
  sOptions = sOptions + ',screenX=0,screenY=0,left=0,top=0';

  wOpen = window.open( '', '', sOptions );
  wOpen.location = url;
  wOpen.focus();
  wOpen.moveTo( 0, 0 );
  wOpen.resizeTo( screen.availWidth, screen.availHeight );
  //window.open(url, "");
}
