  <!--

      // Get the HTTP Object

      function getHTTPObject() {

  var xmlhttp;

  /*@cc_on

  @if (@_jscript_version >= 5)

    try {

      xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");

    } catch (e) {

      try {

        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");

      } catch (E) {

        xmlhttp = false;

      }

    }

  @else

  xmlhttp = false;

  @end @*/

  if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {

    try {

      xmlhttp = new XMLHttpRequest();

    } catch (e) {

      xmlhttp = false;

    }

  }

  return xmlhttp;

}





      // Display the attachment boxes via the attachment field.

      function setOutput(){

      if(httpObject.readyState == 4){

      // Below if outputText is a <input type='text'> in the form then it will receive the response text from intermediate.php.

      //document.getElementById('outputText').value = httpObject.responseText;

      // Below again for txtHint but the given values are retrieved at <span id="attachments">..This is the one primarily being used.


      document.getElementById("attachments").innerHTML=httpObject.responseText;


      }



      }


      // Display the topics option.

      function topicOutput(){

      if(httpObject.readyState == 4){

      document.getElementById("topic").innerHTML=httpObject.responseText;


      }



      }

      
      
      // Display the login type.

      function loginOutput(){

      if(httpObject.readyState == 4){

      document.getElementById("loginop").innerHTML=httpObject.responseText;


      }



      }



      // For multiple attachments

      function doWork(){

      httpObject = getHTTPObject();

      if (httpObject != null) {

      httpObject.open("GET", "intermediate.php?number="

      +document.getElementById('number').value, true);

      httpObject.send(null);

      httpObject.onreadystatechange = setOutput;

      }

      }
      // For topics of the subject passed
      function subject(subject_id){
//Name of fn will always be the name of the table whose select dropbox we have created as seen in fn searchselectdropbox()
      httpObject = getHTTPObject();

      if (httpObject != null) {

      httpObject.open("GET", "intermediate.php?subject_id="

      +subject_id, true);

      httpObject.send(null);

      httpObject.onreadystatechange = topicOutput;

      }

      }
      
      
   // For login type passed by radio button selection in login fn of class.session.php
      function login(login_type){
      httpObject = getHTTPObject();

      if (httpObject != null) {

      httpObject.open("GET", "intermediate.php?login_type="

      +login_type, true);

      httpObject.send(null);

      httpObject.onreadystatechange = loginOutput;

      }

      }



      var httpObject = null;



      //-->
