function confirmDelete(url)
  {
    if(confirm("Are you sure you wish to delete this record?"))
      {
        document.location = url;
      }
  }

function verifyShowing()
  {
    mls = document.showing.mls_number.value;
    agent1 = document.showing.agent_id[document.showing.agent_id.selectedIndex].value;
    agent2 = document.showing.agent_name.value;

    errormsg = "";

    pass = false;

    if(mls == "")
      errormsg += "Please enter an MLS number.\n";
    else
      pass = true;

    if(agent1 == "0" && agent2 == "")
      {
        errormsg += "Please choose an agent.\n"
        pass = false;
      }
    else
      {
        pass = true;
      }

    if(errormsg != "")
      alert(errormsg);

    return pass;
  }

function donothing()
  {
  }

function changeFileType()
  {
    var type = document.addfile.stype[document.addfile.stype.selectedIndex].value;

    var other = document.getElementById("other");

    if(type == "Other")
      {
        //document.addfile.type.value = type;
        other.style.display = "block";
      }
    else
      {
        document.addfile.type.value = type;
        other.style.display = "none";
      }
  }

function toggleFormatting() {

  var fguide = document.getElementById("formatguide");

  if(fguide.style.display == "none")
    fguide.style.display = "block";
  else
    fguide.style.display = "none";


}

function toggleAdminMenu() {
  var adminmenu = document.getElementById("adminul");
  if(adminmenu.style.display == "none")
    adminmenu.style.display = "block";
  else
    adminmenu.style.display = "none";
}