/* This first part is a conditional server check */

// Get the host name
var host = window.location.host;
// Get the index of the string "orca"
// We're checking to see if we're on
// the test server or live server
var index = host.indexOf("orca");

if (index != -1) {
 // If the index is not -1, we're on orca server
 var thisdir = 'http://' + window.location.host + '/yalequash.org/public_html/';
} else {
 // If not, we're on the live server
 var thisdir = 'http://' + window.location.host + '/';
}

// This is a constant
var thisurl = 'http://' + window.location.host + window.location.pathname;



function changeMenu(id, type, currentQuery)
{
 
 if (id) {
  
  // Set the new url and pass the ID through the GET string
  var newurl = thisurl + currentQuery + '&' + type + '=' + id;
   
  // Reload the page with the new ID
  window.location.href = newurl;
    
 } else {
  return false;
 }

}
