function pageRefresh() {
  intParish = document.forms[0].fromParish.selectedIndex;
  intParish++;
  window.location = "admin_step1.php?parish=" + intParish;
}
function pageRefresh2(parID, plaID, plaName) {
  intParish = document.forms[0].toParish.selectedIndex;
  intParish++;
  window.location = "admin_step2.php?parish=" + intParish + "&fromParish=" + parID + "&fromPlace=" + plaID + "&fromName=" + plaName;
}
function pageRefresh3() {
  intParish = document.forms[0].fromParish.selectedIndex;
  intParish++;
  window.location = "admin_delstep1.php?parish=" + intParish;
}
function pageRefresh4() {
  intParish = document.forms[1].toParish.selectedIndex;
  intParish++;
  window.location = "schedule.php?parish=" + intParish;
}
function pageRefresh5() {
  intParish = document.forms[0].fromParish.selectedIndex;
  intParish++;
  window.location = "admin_edit_step1.php?parish=" + intParish;
}
function pageRefresh6(parID, plaID) {
  intParish = document.forms[0].toParish.selectedIndex;
  intParish++;
  window.location = "admin_edit_step2.php?parish=" + intParish + "&fromParish=" + parID + "&fromPlace=" + plaID;
}
function pageRefresh7(parID, plaID) {
  intParish = document.forms[0].toParish.selectedIndex;
  intParish++;
  window.location = "admin_delstep2.php?parish=" + intParish + "&fromParish=" + parID + "&fromPlace=" + plaID;
}
function pageRefresh8() {
  intParish = document.forms[0].locParish.selectedIndex;
  intParish++;
  window.location = "admin_loc_edit_step1.php?parish=" + intParish;
}
function pageRefresh9() {
  intParish = document.forms[0].locParish.selectedIndex;
  intParish++;
  window.location = "admin_loc_delstep1.php?parish=" + intParish;
}
function goRoute(busID) {
  window.open("sched_route.php?id=" + busID, "routes", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=250,height=250");
}
function lockPlace() {
  intPlace = document.forms[0].fromPlace.selectedIndex;
  if (intPlace==0) {
    document.forms[0].fromName.disabled = false;
  } else {
    document.forms[0].fromName.disabled = true;
  }
}
function clearMe() {
  if (document.forms[0].fromName.value=="Enter New Place Here") {
    document.forms[0].fromName.value = "";
  }
}
function checkPlace(theForm) {
  //Destination
  if ((theForm.fromPlace.selectedIndex==0) && (theForm.fromName.value.length<=1 || theForm.fromName.value=="Enter New Place Here")) {
    alert("Please enter a Place");
    theForm.fromName.focus();
    return(false);
  }
  if (theForm.fromName.value.indexOf("'")!=-1) {
    alert("Place cannot contain a single quote (')");
    theForm.fromName.focus();
    return(false);
  }
}
function clearMeTo() {
  if (document.forms[0].toName.value=="Enter New Place Here") {
    document.forms[0].toName.value = "";
  }
}
function lockToPlace() {
  intPlace = document.forms[0].toPlace.selectedIndex;
  if (intPlace==0) {
    document.forms[0].toName.disabled = false;
  } else {
    document.forms[0].toName.disabled = true;
  }
}
function checkToPlace(theForm) {
  //Destination
  if ((theForm.toPlace.selectedIndex==0) && (theForm.toName.value.length<=1 || theForm.toName.value=="Enter New Place Here")) {
    alert("Please enter a New Destination");
    theForm.toName.focus();
    return(false);
  }
  if (theForm.toName.value.indexOf("'")!=-1) {
    alert("Place cannot contain a single quote (')");
    theForm.toName.focus();
    return(false);
  }
}