/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

function CustomBrowserXMLObject()
{
   var ieVersions = ["Microsoft.XmlDom","MSXML.DOMDocument","MSXML2.DOMDocument","MSXML3.DOMDocument","MSXML4.DOMDocument"];
   var xmlHttp = null;
   var xmlDoc = null;
   var client = "";

   function initialize()
   {
      try
      {
         // Firefox, Opera 8.0+, Safari
         xmlHttp = new XMLHttpRequest();
         xmlDoc = document.implementation.createDocument("", "", null);
         client = navigator.userAgent.toLowerCase().indexOf('chrome')>-1?"chrome":"mozilla";
      }
      catch (e)
      {
         // Internet Explorer [Except - IE.8]
         try
         {
            xmlDoc = xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
         }
         catch (e)
         {
            try
            {
               xmlDoc = xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
            }
            catch (e)
            {
               // Something went wrong
               alert("Your browser broke!");
               return false;
            }
         }
      }
   }

   this.getXMLHttpObject = function()
   {
      if(xmlHttp == null)
      {
         initialize();
      }
      return xmlHttp;
   }

   this.getXMLDocObject = function(url)
   {
      if(xmlDoc == null)
      {
         initialize();
      }
      return xmlDoc;
   }

   this.getClient = function()
   {
      if(xmlDoc == null)
      {
         initialize();
      }
      return client;
   }
   this.changeOpacity = function(obj,val)
   {
      if(this.getClient() == "id")
      {
         obj.filters.alpha.opacity = val;
      }
      else
      {
         obj.style.opacity = parseFloat(val/100);
      }
   }
}

function isIEBrowser()
{
   if(navigator.appName == "Microsoft Internet Explorer")
   {
      return true;
   }
   else
   {
      return false;
   }
}

