var xmlhttp=false;
var moz;
var ie;
var isIE = (window.navigator.userAgent.indexOf("MSIE") > 0);

function adjHeight()
{ 
 //alert("ajd height");
 //debugger;
 //alert(document.getElementById("td00").childNodes.length);
	//if (browser.isIE)
	//    var cnodecount=2;
	//else
	//    var cnodecount=2;  
	//if (bNeveDone)
	//   {bNeveDone=false;    
	//    var icn=document.getElementById("td00").childNodes.length;
 	//    var bDivFound=false;
        //    if (!findchildren("td00"))           
        //    //if (document.getElementById("td00").childNodes.length==cnodecount)
        //        document.getElementById("div00").style.height=document.getElementById("td00").offsetHeight; 
        //    else
        //        document.getElementById("div00").style.height="1px"; 
        //    if (!findchildren("td01"))  
        //    //if (document.getElementById("td01").childNodes.length==cnodecount)
        //        document.getElementById("div01").style.height=document.getElementById("td01").offsetHeight; 
        //    else
        //        document.getElementById("div01").style.height="1px";   
        //  }
   if (gExitAdjHeader==1)
        return;
                
   if (!tabref[0])
      {     var oNodeslist=document.getElementsByTagName("td");
           var j = 0;
           for (i = 0; i < oNodeslist.length; i++)
              { if (oNodeslist[i].id=="tabid")
                   {
                         tabarr[j] = getCoordinates(oNodeslist[i]);
                         tabarr[j].bc = oNodeslist[i].style.background;
                         tabarr[j].ol = false;
                         tabref[j] = oNodeslist[i];
                         j = j + 1;
                   }
              }
      }
   if (!stabref[0])
      {     var oNodeslist=document.getElementsByTagName("td");
           var j = 0;
           gSubTabcount=0;
           for (i = 0; i < oNodeslist.length; i++)
              { if (oNodeslist[i].id=="stabid")
                   {     gSubTabcount=gSubTabcount+1;
                         stabarr[j] = getCoordinates(oNodeslist[i]);
                         stabarr[j].bc = oNodeslist[i].style.background;
                         stabref[j] = oNodeslist[i];
                         stabarr[j].ol = false;
                         j = j + 1;
                   }
              }
      }   
}

function Browser() {

  var ua, s, i;

  this.isIE    = false;
  this.isNS    = false;
  this.version = null;

  ua = navigator.userAgent;

  s = "MSIE";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isIE = true;
    this.version = parseFloat(ua.substr(i + s.length));
    return;
  }

  s = "Netscape6/";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isNS = true;
    this.version = parseFloat(ua.substr(i + s.length));
    return;
  }

  // Treat any other "Gecko" browser as NS 6.1.

  s = "Gecko";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isNS = true;
    this.version = 6.1;
    return;
  }
}

function set_moz_ie()
{
        moz = (typeof document.implementation != 'undefined') && (typeof
        document.implementation.createDocument != 'undefined');
        ie = (typeof window.ActiveXObject != 'undefined');
}
function set_http()
{
        try
        {
                xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
        }
        catch (e)
        {
                try
                {
                        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
                }
                catch (E)
                {
                        xmlhttp = false;
                }
        }
        if (!xmlhttp && typeof XMLHttpRequest!='undefined')
        {
                xmlhttp = new XMLHttpRequest();
        }
}

set_http();
set_moz_ie();

if(! isIE )
    {
      XMLDocument.prototype.selectNodes = function(cXPathString, xNode)
      {
              if( !xNode )
              {
                      xNode = this;
              }
              var oNSResolver = this.createNSResolver(this.documentElement)
              var aItems = this.evaluate(cXPathString, xNode, oNSResolver,
              XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null)
              var aResult = [];
              for( var i = 0; i < aItems.snapshotLength; i++)
              {
                      aResult[i] = aItems.snapshotItem(i);
              }
              return aResult;
      }
      Element.prototype.selectNodes = function(cXPathString)
      {
              if(this.ownerDocument.selectNodes)
              {
                      return this.ownerDocument.selectNodes(cXPathString, this);
              }
              else
              {
                      throw "For XML Elements Only";
              }
      }
    }
if ( !isIE)
{
    XMLDocument.prototype.selectSingleNode = function(cXPathString, xNode)
    {
            if( !xNode )
            {
                    xNode = this;
            }
            var xItems = this.selectNodes(cXPathString, xNode);
            if( xItems.length > 0 )
            {
                    return xItems[0];
            }
            else
            {
                    return null;
            }
    }
    Element.prototype.selectSingleNode = function(cXPathString)
    {
            if(this.ownerDocument.selectSingleNode)
            {
                    return this.ownerDocument.selectSingleNode(cXPathString, this);
            }
            else
            {
                    throw "For XML Elements Only";
            }
    }
}
if (!isIE)
{
   HTMLElement.prototype.__defineGetter__("innerText",
                   function ()
                   {
                           return(this.textContent);
                   }
   );
   HTMLElement.prototype.__defineSetter__("innerText",
                   function (txt)
                   {
                           this.textContent = txt;
                   }
   );
}