/*
	####################################################################################

	File Name 			:	product.js
	Scope Of program 		:       Displaying Brand combo using AJAX
	Created On			:	03-02-2007

	####################################################################################

*/

var root ="../../";

/* The variable http will hold our new XMLHttpRequest object. */
var http = createRequestObject();
  //alert(http);
/* The following function creates an XMLHttpRequest object... */
function createRequestObject()
{
    if(typeof ActiveXObject!="undefined")
    {

      try
      {
        return new ActiveXObject("Msxml2.XMLHTTP");
      }
      catch(a)
      {
          try
          {
        return new ActiveXObject("Microsoft.XMLHTTP");
          }
          catch(a){}
      }
    }
    if(typeof XMLHttpRequest!="undefined")
    {

      request_o = new XMLHttpRequest();
      //request_o.overrideMimeType('text/xml');
      return request_o;
    }
}

function readFile(fileName)
{
	if(fileName!="")
	{
		http.open('get', './readFile.jsp?FileName='+fileName);
		http.onreadystatechange = handleFile;

		/* Send the data. We use something other than null when we are sending using the POST
		  method. */

		http.send(null);
	}
}
function readFileAdmin(fileName)
{
	if(fileName!="")
	{
		http.open('get', './../readFile.jsp?FileName='+fileName);
		http.onreadystatechange = handleFile;

		/* Send the data. We use something other than null when we are sending using the POST
		  method. */

		http.send(null);
	}
}
function handleFile()
{
  if (http.readyState == 4)
  {
    /* We have got the response from the server-side script,
      let's see just what it was. using the responseText property of
      the XMLHttpRequest object. */

     var response = http.responseText;
          
     document.getElementById('FileId').innerHTML = response;
     return;
   }
}

