  var W3CDOM = (document.getElementsByTagName && document.createElement);
  
  function validate() {

    var $success = true;
    firstError = null;

    if (document.main_form.require_contact.value == 'yes') {
      if (document.main_form.affiliation[0].checked == true || 
          document.main_form.affiliation[1].checked == true) {
        // Upstate mode
        if (document.main_form.upstate_id.value == '') {
          writeError(document.main_form.upstate_id,"You must enter your employee ID.");
          $success = false;
        }
        if (document.main_form.upstate_last_name.value == '') {
          writeError(document.main_form.upstate_last_name,"You must enter your last name.");
          $success = false;
        }
        if (document.main_form.upstate_email.value == '') {
          writeError(document.main_form.upstate_last_name,"We could not find a match for this ID and Last Name.");
        }
      } else if (document.main_form.affiliation[2].checked == true) {
        // Patient mode
        if (document.main_form.patient_name.value == '') {
          writeError(document.main_form.patient_name,"You must enter your name.");
          $success = false;  
        }  
        if (document.main_form.patient_email.value == '') {
          writeError(document.main_form.patient_email,"You must enter you email address.");
          $success = false;
        } else {
          if (document.main_form.patient_email.value.indexOf('@') == -1 ||
              document.main_form.patient_email.value.indexOf('.') == -1) {
            writeError(document.main_form.patient_email,"You must enter your valid email address.");
            $success = false;  
          }
        }
        if (document.main_form.patient_phone.value == '') {
          writeError(document.main_form.patient_phone,"You must enter your phone number");
          $success = false;
        }
        if (document.main_form.patient_address.value == '') {
          writeError(document.main_form.patient_address,"You must enter your address.");
          $success = false;
        }
      } else if (document.main_form.affiliation[3].checked == true) {
        // Guest mode
        if (document.main_form.guest_name.value == '') {      
          writeError(document.main_form.guest_name,"You must enter your name.");
          $success = false;
        }
        if (document.main_form.guest_email.value == '') {
          writeError(document.main_form.guest_email,"You must enter your email address.");
          $success = false;
        } else {
          if (document.main_form.guest_email.value.indexOf('@') == -1 ||
              document.main_form.guest_email.value.indexOf('.') == -1) {
            writeError(document.main_form.guest_email,"You must enter your valid email address.");
            $success = false;
          }
        }
      } else {
        //alert("You must select your affiliation");
        writeError(document.main_form.affiliation[3],"You must select your affiliation.");
        $success = false;
      }
    }

    if (document.main_form.whattodo[0].checked == true) {
      // ################################
      // ## frequently asked questions ##
      // ################################
    } else if (document.main_form.whattodo[1].checked == true) { 
      // ################################
      // ## ask a librarian a question ##
      // ################################
      if (document.main_form.question.value == '') {
        writeError(document.main_form.question,"You must enter your question.");
        $success = false;
      }
      // ################################
    } else if (document.main_form.whattodo[2].checked == true) {
      // ######################
      // ## request training ##
      // ######################
      if (document.main_form.training_description.value == '') {
        writeError(document.main_form.training_description,"You must enter a description of your request.");
        $success = false;
      }
    } else if (document.main_form.whattodo[3].checked == true) { 
      // #################################
      // ## request a literature search ##
      // #################################
      if (document.main_form.litsearch_exclude_before.value != '') {
        if (!isNumeric(document.main_form.litsearch_exclude_before.value)) {
          writeError(document.main_form.litsearch_exclude_before,"You must enter a number.");
          $success = false;
        } else if (document.main_form.litsearch_exclude_before.value.length != 4) {
          writeError(document.main_form.litsearch_exclude_before,"You must enter a 4 digit year.");
        }
      }
      if (document.main_form.litsearch_exclude_after.value != '') {
        if (!isNumeric(document.main_form.litsearch_exclude_after.value)) {
          writeError(document.main_form.litsearch_exclude_after,"You must enter a number.");
          $success = false;   
        } else if (document.main_form.litsearch_exclude_after.value.length != 4) {
          writeError(document.main_form.litsearch_exclude_after,"You must enter a 4 digit year.");
        }
      }
      if (document.main_form.litsearch_language[2].checked == true &&
          document.main_form.litsearch_language_onlythese.value == '') {
        writeError(document.main_form.litsearch_language_onlythese,"You must enter at least one language.");
        $success = false;
      }
      if (document.main_form.litsearch_description.value == '') {
        writeError(document.main_form.litsearch_description,"You must enter a detailed description.");
        $success = false;
      }
      // #################################
    } else if (document.main_form.whattodo[4].checked == true) {
      // ########################
      // ## request a purchase ##
      // ########################
      if (document.main_form.request_type[0].checked == true) {
        if (document.main_form.journal_title.value == '') {
          writeError(document.main_form.journal_title,"You must enter a title.");
          $success = false;
        }
      } else if (document.main_form.request_type[1].checked == true) {
        if (document.main_form.database_title.value == '') {
          writeError(document.main_form.database_title,"You must enter a title.");
          $success = false;
        }
      } else if (document.main_form.request_type[2].checked == true) {
        if (document.main_form.book_title.value == '') {
          writeError(document.main_form.book_title,"You must enter a title.");
          $success = false;
        }
        if (document.main_form.book_author.value == '') {
          writeError(document.main_form.book_author,"You must enter an author.");
          $success = false;
        }
      } else if (document.main_form.request_type[3].checked == true) {
        if (document.main_form.multimedia_title.value == '') {
          writeError(document.main_form.multimedia_title,"You must enter a title.");
          $success = false;
        }
      } else {
        $success = false;
        alert("You must select a purchase type.");
      }
      // ########################
    } else if (document.main_form.whattodo[5].checked == true) {
      // ########################
      // ## request a reserve ##
      // ########################
      // ########################
    } else if (document.main_form.whattodo[6].checked == true) {
      // ######################
      // ## report a problem ##
      // ######################
      if (document.main_form.problem_description.value == '') {
        writeError(document.main_form.problem_description,"You must enter a detailed description of the problem.");
        $success = false;
      }
      // ######################
    } else if (document.main_form.whattodo[7].checked == true) {
		// ##########
		// ## leap ##
		// ##########
		if (document.main_form.leap_phone.value == '') {
			writeError(document.main_form.leap_phone,"You must enter your phone or beeper number.");
			$success = false;
		}
		if (document.main_form.leap_action[0].checked == false &&
			document.main_form.leap_action[1].checked == false) {
			writeError(document.main_form.leap_action[1],"You must select an action.");
			$success = false;
		}
		// ##########

    } else if (document.main_form.whattodo[8].checkked == true) {
	
      // ####################
      // ## leave feedback ##
      // ####################
      if (document.main_form.feedback.value == '') {
        writeError(document.main_form.feedback,"You must enter your question.");
        $success = false;
      }
      // ####################	
	}

    if ($success == false) {
      return $success;
    }

  }

  function isNumeric(strString) {
    var strValidChars = "0123456789";
    var strChar;
    var blnResult = true;
    if (strString.length == 0) return false;
    for (i = 0; i < strString.length && blnResult == true; i++) {
      strChar = strString.charAt(i);
      if (strValidChars.indexOf(strChar) == -1) {
        blnResult = false;
      }
    }
    return blnResult;
  }

  function enable_whattodo() {
    document.getElementById("whattodo").style.display = "";
  }

  function disable_whattodo() {
    document.getElementById("whattodo").style.display = "none";
  }

  function enable_faq() {
    document.getElementById("faq").style.display = "";  
  }

  function disable_faq() {
    document.getElementById("faq").style.display = "none";
  }

  function enable_form() {
    document.getElementById("submit").style.display = "";
  }

  function disable_form() {
    document.getElementById("submit").style.display = "none";
  }

  function enable_contact() {
    document.main_form.require_contact.value = 'yes';
    document.getElementById("contact").style.display = "";
    document.main_form.affiliation[0].checked = false;
    document.getElementById("contact_upstate").style.display = "none";  
    document.main_form.affiliation[1].checked = false;
    document.getElementById("contact_upstate").style.display = "none";
    document.main_form.affiliation[2].checked = false;
    document.getElementById("contact_patient").style.display = "none";
    document.main_form.affiliation[3].checked = false;
    document.getElementById("contact_guest").style.display = "none";
  }

  function disable_contact() {
    document.main_form.require_contact.value = 'no';
    document.getElementById("contact").style.display = "none";
    document.main_form.affiliation[0].checked = false;
    document.getElementById("contact_upstate").style.display = "none";
    document.main_form.affiliation[1].checked = false;
    document.getElementById("contact_upstate").style.display = "none";
    document.main_form.affiliation[2].checked = false;
    document.getElementById("contact_patient").style.display = "none";
    document.main_form.affiliation[3].checked = false;
    document.getElementById("contact_guest").style.display = "none";
  }

  function enable_question() {
    document.getElementById("question").style.display = "";
  }

  function disable_question() {
    document.getElementById("question").style.display = "none";
  }

  function enable_purchase() {
    document.getElementById("purchase").style.display = "";
    document.getElementById("journal").style.display = "none";
    document.main_form.request_type[0].checked = false;
    document.getElementById("database").style.display = "none";
    document.main_form.request_type[1].checked = false;
    document.getElementById("book").style.display = "none";
    document.main_form.request_type[2].checked = false;
    document.getElementById("multimedia").style.display = "none";
    document.main_form.request_type[3].checked = false;
  }

  function disable_purchase() {
    document.getElementById("purchase").style.display = "none";
    document.getElementById("journal").style.display = "none";
    document.main_form.request_type[0].checked = false;
    document.getElementById("database").style.display = "none";
    document.main_form.request_type[1].checked = false;
    document.getElementById("book").style.display = "none";
    document.main_form.request_type[2].checked = false;
    document.getElementById("multimedia").style.display = "none";
    document.main_form.request_type[3].checked = false;

  }

  function enable_reserve() {
    document.getElementById("requestreserve").style.display = "";
  }
    
  function disable_reserve() {
    document.getElementById("requestreserve").style.display = "none";
  }

  function enable_training() {
    document.getElementById("training").style.display = "";
  }
  
  function disable_training() {
    document.getElementById("training").style.display = "none";
  }

  function enable_litsearch() {
    document.getElementById("litsearch").style.display = "";
  }
    
  function disable_litsearch() {
    document.getElementById("litsearch").style.display = "none";
  }

  function enable_problem() {
    document.getElementById("problem").style.display = "";
  }
  
  function disable_problem() {
    document.getElementById("problem").style.display = "none";
  }

  function enable_feedback() {
    document.getElementById("feedback").style.display = "";
  }
  
  function disable_feedback() {
    document.getElementById("feedback").style.display = "none";
  }
  
  function enable_leap() {
	  document.getElementById("leap").style.display = "";
  }
  
  function disable_leap() {
	  document.getElementById("leap").style.display = "none";
  }

  function show_faq() {
    enable_faq();
    disable_form();
    disable_contact();
    disable_question();
    disable_purchase();
    disable_reserve();
    disable_training();
    disable_litsearch();
    disable_problem();
    disable_feedback();
	disable_leap();
  }

  function show_question() {
    disable_faq();
    enable_form();
    enable_contact(); 
    enable_question();
    disable_purchase();
    disable_reserve();
    disable_training();
    disable_litsearch();
    disable_problem();
    disable_feedback();
	disable_leap();
  }

  function show_purchase() {
    disable_faq();
    enable_form();
    enable_contact();
    disable_question();
    enable_purchase();
    disable_reserve();
    disable_training();
    disable_litsearch();
    disable_problem();
    disable_feedback();
	disable_leap();
  }

  function show_reserve() {
    disable_faq();
    enable_form();
    enable_contact();
    disable_question();
    disable_purchase();
    enable_reserve();
    disable_training();
    disable_litsearch();
    disable_problem();
    disable_feedback();
	disable_leap();
  }

  function show_training() {
    disable_faq();
    enable_form();
    enable_contact();
    disable_question();
    disable_purchase();
    disable_reserve();
    enable_training();
    disable_litsearch();
    disable_problem();
    disable_feedback();
	disable_leap();
  }

  function show_problem() {
    disable_faq();
    enable_form();
    enable_contact();
    disable_question();
    disable_purchase();
    disable_reserve();
    disable_training();
    disable_litsearch();
    enable_problem();
    disable_feedback();
	disable_leap();
  }

  function show_feedback() {
    disable_faq();
    enable_form();
    enable_contact();
    disable_question();
    disable_purchase();
    disable_reserve();
    disable_litsearch();
    disable_training();
    disable_problem();
    enable_feedback();
	disable_leap();
  }

  function show_litsearch() {
    disable_faq();
    enable_form();
    enable_contact(); 
    disable_question();
    disable_purchase();
    disable_reserve();
    enable_litsearch();
    disable_training();
    disable_problem();
    disable_feedback();
	disable_leap();
  }
  
  function show_leap() {
    disable_faq();
    enable_form();
    enable_contact(); 
    disable_question();
    disable_purchase();
    disable_reserve();
    disable_litsearch();
    disable_training();
    disable_problem();
    disable_feedback();
	enable_leap();
  }

  function show_journal() {
    document.getElementById("journal").style.display = "";
    document.getElementById("database").style.display = "none";
    document.getElementById("book").style.display = "none";  
    document.getElementById("multimedia").style.display = "none";
  }

  function show_database() {
    document.getElementById("journal").style.display = "none";
    document.getElementById("database").style.display = "";
    document.getElementById("book").style.display = "none";
    document.getElementById("multimedia").style.display = "none";
  }

  function show_book() {
    document.getElementById("journal").style.display = "none";
    document.getElementById("database").style.display = "none";
    document.getElementById("book").style.display = "";
    document.getElementById("multimedia").style.display = "none";
  }

  function show_multimedia() {
    document.getElementById("journal").style.display = "none";
    document.getElementById("database").style.display = "none";
    document.getElementById("book").style.display = "none";
    document.getElementById("multimedia").style.display = "";
  }

  function show_upstate() {
    document.getElementById("contact_upstate").style.display = "";
    document.getElementById("contact_patient").style.display = "none";
    document.getElementById("contact_guest").style.display = "none";
  }

  function show_patient() {
    document.getElementById("contact_upstate").style.display = "none";
    document.getElementById("contact_patient").style.display = "";
    document.getElementById("contact_guest").style.display = "none";
  }

  function show_guest() {
    document.getElementById("contact_upstate").style.display = "none";
    document.getElementById("contact_patient").style.display = "none";
    document.getElementById("contact_guest").style.display = "";
  }

  function writeError(obj,message) {
    validForm = false; 
    if (obj.hasError) return;
    if (W3CDOM) {
      obj.className += ' error';
      obj.onchange = removeError;
      var sp = document.createElement('span');
      sp.className = 'error';
      sp.appendChild(document.createTextNode(message));
      obj.parentNode.appendChild(sp);
      obj.hasError = sp;   
    } else {
      errorstring += obj.name + ': ' + message + '\n';   
      obj.hasError = true;
    }
    if (!firstError) {
      firstError = obj;
    }
  }
          
  function removeError() {   
    this.className = this.className.substring(0,this.className.lastIndexOf(' '));
    this.parentNode.removeChild(this.hasError);
    this.hasError = null;
    this.onchange = null;  
  }

  function autofillUpstate() {
    if (document.main_form.upstate_id.value.length > 1 &&
        document.main_form.upstate_last_name.value.length > 1) {
      var xmlHttp;
      try {
        // Firefox, Opera 8.0+, Safari
        xmlHttp=new XMLHttpRequest();
      } catch (e) {
        // Internet Explorer
        try {
          xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
        } catch (e) {
          try {
            xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
          } catch (e) {
            alert("Your browser does not support AJAX!");
            return false;
          }
        }
      }
      xmlHttp.onreadystatechange=function() {
        if(xmlHttp.readyState==4) {
          var xmlDoc=xmlHttp.responseXML.documentElement;

          document.main_form.upstate_name.value = "";
          document.main_form.upstate_email.value = "";
          document.main_form.upstate_dept.value = "";
          document.main_form.upstate_office.value = "";
          document.main_form.upstate_phone.value = "";

          if (xmlDoc.getElementsByTagName("Name").length > 0 &&
              xmlDoc.getElementsByTagName("Name")[0].childNodes.length > 0) {
            document.main_form.upstate_name.value =
              xmlDoc.getElementsByTagName("Name")[0].childNodes[0].nodeValue;
          }

          if (xmlDoc.getElementsByTagName("Email").length > 0 &&
              xmlDoc.getElementsByTagName("Email")[0].childNodes.length > 0) {
            document.main_form.upstate_email.value =
              xmlDoc.getElementsByTagName("Email")[0].childNodes[0].nodeValue;
          }

          if (xmlDoc.getElementsByTagName("Department").length > 0 &&
              xmlDoc.getElementsByTagName("Department")[0].childNodes.length > 0) {
            document.main_form.upstate_dept.value =
              xmlDoc.getElementsByTagName("Department")[0].childNodes[0].nodeValue;
          }

          if (xmlDoc.getElementsByTagName("Office").length > 0 &&
              xmlDoc.getElementsByTagName("Office")[0].childNodes.length > 0) {
            document.main_form.upstate_office.value =
              xmlDoc.getElementsByTagName("Office")[0].childNodes[0].nodeValue;
          }

          if (xmlDoc.getElementsByTagName("Phone").length > 0 &&
              xmlDoc.getElementsByTagName("Phone")[0].childNodes.length > 0) {
            document.main_form.upstate_phone.value =
              xmlDoc.getElementsByTagName("Phone")[0].childNodes[0].nodeValue;
          }

        }   
      }
      var url = "xml_employee.php";
      url = url + "?empid=" + document.main_form.upstate_id.value;
      url = url + "&last=" + document.main_form.upstate_last_name.value;
      xmlHttp.open("GET",url,true);
      xmlHttp.send(null);
    }
  }

  function autofillISBN_book() {
    var xmlHttp;
    try {  // Firefox, Opera 8.0+, Safari
      xmlHttp=new XMLHttpRequest();
    } catch (e) {  // Internet Explorer
      try {
        xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
      } catch (e) {
        try {
          xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
        } catch (e) { // no ajax
          return false;
        }
      }  
    }
    xmlHttp.onreadystatechange=function() {
      if(xmlHttp.readyState==4) {
        var xmlDoc=xmlHttp.responseXML.documentElement;
        if (xmlDoc.getElementsByTagName("TitleLong").length > 0 &&
            xmlDoc.getElementsByTagName("TitleLong")[0].childNodes.length > 0) {
          document.main_form.book_title.value =
            xmlDoc.getElementsByTagName("TitleLong")[0].childNodes[0].nodeValue;
        } else if (xmlDoc.getElementsByTagName("Title").length > 0 &&
            xmlDoc.getElementsByTagName("Title")[0].childNodes.length > 0) {
          document.main_form.book_title.value =
            xmlDoc.getElementsByTagName("Title")[0].childNodes[0].nodeValue;
        } else {
          document.main_form.book_title.value = "";
        }
        if (xmlDoc.getElementsByTagName("AuthorsText").length > 0 &&
            xmlDoc.getElementsByTagName("AuthorsText")[0].childNodes.length > 0) {
          document.main_form.book_author.value =
            xmlDoc.getElementsByTagName("AuthorsText")[0].childNodes[0].nodeValue;
        } else {
          document.main_form.book_author.value = "";
        }
        if (xmlDoc.getElementsByTagName("PublisherText").length > 0 &&
            xmlDoc.getElementsByTagName("PublisherText")[0].childNodes.length > 0) {
          document.main_form.book_publisher.value =
            xmlDoc.getElementsByTagName("PublisherText")[0].childNodes[0].nodeValue;
        } else {
          document.main_form.book_publisher.value = "";
        }
      }
    }
    var url = "xml_isbn.php";
    url = url + "?isbn=" + document.main_form.book_isbn.value;
    xmlHttp.open("GET",url,true);
    xmlHttp.send(null);
  }

  function autofillISBN_multimedia() {
    var xmlHttp;
    try {  // Firefox, Opera 8.0+, Safari
      xmlHttp=new XMLHttpRequest();
    } catch (e) {  // Internet Explorer
      try {
        xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
      } catch (e) {
        try {
          xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
        } catch (e) { // no ajax 
          return false;
        }
      }     
    }
    xmlHttp.onreadystatechange=function() {
      if(xmlHttp.readyState==4) {
        var xmlDoc=xmlHttp.responseXML.documentElement;
        if (xmlDoc.getElementsByTagName("TitleLong").length > 0 &&
            xmlDoc.getElementsByTagName("TitleLong")[0].childNodes.length > 0) {
          document.main_form.multimedia_title.value =
            xmlDoc.getElementsByTagName("TitleLong")[0].childNodes[0].nodeValue;
        } else if (xmlDoc.getElementsByTagName("Title").length > 0 &&
            xmlDoc.getElementsByTagName("Title")[0].childNodes.length > 0) {
          document.main_form.multimedia_title.value =
            xmlDoc.getElementsByTagName("Title")[0].childNodes[0].nodeValue;
        } else {
          document.main_form.multimedia_title.value = "";
        }
        if (xmlDoc.getElementsByTagName("AuthorsText").length > 0 &&
            xmlDoc.getElementsByTagName("AuthorsText")[0].childNodes.length > 0) {
          document.main_form.multimedia_author.value =
            xmlDoc.getElementsByTagName("AuthorsText")[0].childNodes[0].nodeValue;
        } else {
          document.main_form.multimedia_author.value = "";
        }
        if (xmlDoc.getElementsByTagName("PublisherText").length > 0 &&
            xmlDoc.getElementsByTagName("PublisherText")[0].childNodes.length > 0) {
          document.main_form.multimedia_publisher.value =
            xmlDoc.getElementsByTagName("PublisherText")[0].childNodes[0].nodeValue;
        } else {
          document.main_form.multimedia_publisher.value = "";
        }
      }
    }
    var url = "xml_isbn.php";
    url = url + "?isbn=" + document.main_form.multimedia_isbn.value;
    xmlHttp.open("GET",url,true);
    xmlHttp.send(null);
  }

  function autofillISSN_journal() {
    var xmlHttp;
    try {  // Firefox, Opera 8.0+, Safari
      xmlHttp=new XMLHttpRequest();
    } catch (e) {  // Internet Explorer
      try {
        xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
      } catch (e) {
        try {
          xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
        } catch (e) { // no ajax
          return false;
        }
      }
    }
    xmlHttp.onreadystatechange=function() {
      if(xmlHttp.readyState==4) {
        var xmlDoc=xmlHttp.responseXML.documentElement;
        if (xmlDoc.getElementsByTagName("Title").length > 0 &&
            xmlDoc.getElementsByTagName("Title")[0].childNodes.length > 0) {
          document.main_form.journal_title.value =
            xmlDoc.getElementsByTagName("Title")[0].childNodes[0].nodeValue;
        } else {
          document.main_form.journal_title.value = "";
        }
        if (xmlDoc.getElementsByTagName("DatabaseName").length > 0 &&
            xmlDoc.getElementsByTagName("DatabaseName")[0].childNodes.length > 0) {
          document.main_form.journal_database.value =
            xmlDoc.getElementsByTagName("DatabaseName")[0].childNodes[0].nodeValue;
        } else {
          document.main_form.journal_database.value = "";
        }
        if (xmlDoc.getElementsByTagName("CitationBegin").length > 0 &&
            xmlDoc.getElementsByTagName("CitationBegin")[0].childNodes.length > 0) {
          document.main_form.journal_citationbegin.value =
            xmlDoc.getElementsByTagName("CitationBegin")[0].childNodes[0].nodeValue;
        } else {
          document.main_form.journal_citationbegin.value = "";
        }
        if (xmlDoc.getElementsByTagName("CitationMostRecent").length > 0 &&
            xmlDoc.getElementsByTagName("CitationMostRecent")[0].childNodes.length > 0) {
          document.main_form.journal_citationrecent.value =
            xmlDoc.getElementsByTagName("CitationMostRecent")[0].childNodes[0].nodeValue;
        } else {
          document.main_form.journal_citationrecent.value = "";
        } 
        if (xmlDoc.getElementsByTagName("TotalIssues").length > 0 &&
            xmlDoc.getElementsByTagName("TotalIssues")[0].childNodes.length > 0) {
          document.main_form.journal_totalissues.value =
            xmlDoc.getElementsByTagName("TotalIssues")[0].childNodes[0].nodeValue;
        } else {
          document.main_form.journal_totalissues.value = "";
        } 
      }
    }
    var url = "xml_issn.php";
    url = url + "?issn=" + document.main_form.journal_issn.value;
    xmlHttp.open("GET",url,true);
    xmlHttp.send(null);
  }
