  //============================================================
  function InsertCT(bid, cid, sText)
    {
    var id = "toc"+bid
    var table = document.getElementById(id);
    if(table)
      {
      for(var i=0;i<table.rows.length;i++)
      if(table.rows[i].id=="C"+cid)
        {
        var img1 = table.rows[i].cells[1].childNodes.item(0)
        var img2 = table.rows[i].cells[1].childNodes.item(1)
        var img3 = table.rows[i].cells[1].childNodes.item(2)
        img1.style.display = 'none'
        img2.style.display = 'none'
        img3.style.display = 'inline'
        var newrow = table.insertRow(i+1)
        newrow.insertCell(0)
        var newcell = newrow.insertCell(1)
        newcell.colSpan =4
        newcell.innerHTML += sText;
        break
        }
      }
    }
  //============================================================
  function Expand(bid, cid)
    {
    var param = "?svc=3"
    var cstable = document.getElementById("CS"+cid)
    var table = document.getElementById("toc"+bid)
    var cbmtable =  document.getElementById("CBM"+cid)
        
    if(cstable == null)
      {
      for(var i=0;i<table.rows.length;i++)
        if(table.rows[i].id=="C"+cid)
        {
        var img1 = table.rows[i].cells[1].childNodes.item(0)
        var img2 = table.rows[i].cells[1].childNodes.item(1)
        var img3 = table.rows[i].cells[1].childNodes.item(2)
        img1.style.display = 'none'
        img2.style.display = 'inline'
        img3.style.display = 'none'
        break;
        }
      param += "&data="+bid+"&data="+cid
//      window.frames["dataframe"].location.href = "data.asp"+param;
      var dataSource =  "data.asp" + param; 
      XMLHttpRequestObject.open("GET", dataSource);
      XMLHttpRequestObject.onreadystatechange = function()
      {
          if (XMLHttpRequestObject.readyState == 4 &&
              XMLHttpRequestObject.status == 200) {
                  InsertCT(bid,cid, XMLHttpRequestObject.responseText);
              }
          if (XMLHttpRequestObject.readyState == 4 &&
              XMLHttpRequestObject.status == 403) {
                  if (XMLHttpRequestObject.responseText.indexOf("errorcode='1'") != -1) {
                      window.location.reload();
                  }
                  else if (XMLHttpRequestObject.responseText.indexOf("errorcode=\"1\"") != -1) {
                      window.location.reload();
                  }
                  else if (XMLHttpRequestObject.responseText.indexOf("errorcode=1") != -1) {
                      window.location.reload();
                  }
                  else {
                      InsertCT(bid,cid, XMLHttpRequestObject.responseText);
                  }
              }
      }
      XMLHttpRequestObject.send(null);
      }
    else
      {
      cstable.style.display = 'inline'
      for(var i=0;i<table.rows.length;i++)
        if(table.rows[i].id=="C"+cid)
          {
        var img1 = table.rows[i].cells[1].childNodes.item(0)
        var img2 = table.rows[i].cells[1].childNodes.item(1)
        var img3 = table.rows[i].cells[1].childNodes.item(2)
        img1.style.display = 'none'
        img2.style.display = 'none'
        img3.style.display = 'inline'
          }
     }
    //      if(cbmtable)
    //    cbmtable.style.display = 'none' 
    }  
  //==========================================================
  function HideCT(bid, cid)
    {
    var id = "toc"+bid
    var table = document.getElementById(id);
    var cstable = document.getElementById("CS"+cid)
    var cbmtable =  document.getElementById("CBM"+cid)
    if(table)
      {
      for(var i=0;i<table.rows.length;i++)
        if(table.rows[i].id=="C"+cid)
          {
        var img1 = table.rows[i].cells[1].childNodes.item(0)
        var img2 = table.rows[i].cells[1].childNodes.item(1)
        var img3 = table.rows[i].cells[1].childNodes.item(2)
        img1.style.display = 'inline'
        img2.style.display = 'none'
        img3.style.display = 'none'
          cstable.style.display = 'none'
          }
      }
      if(cbmtable)
        cbmtable.style.display = 'inline' 
    }
//==========================================================
function showdiv(img,code)
  {
  var thisdoc = document;
  var elepos = getPosition(img);
  var viewportdem = getViewportSize(thisdoc);
  var scrollpos = getScrollingPosition(thisdoc);
  var relobjpos = elepos[1] - scrollpos[1]; 
  var halfviewport = Math.round(viewportdem[1]/2);
  var tailgoes = ((relobjpos<halfviewport) || (location.href.indexOf("toc.asp")>=0) || (location.href.indexOf("viewer_r.asp")>=0))? "up" :  (relobjpos>halfviewport)? "down" : null;
  var thebubblediv = (thisdoc.getElementById("thebubblediv")!=null)? thisdoc.getElementById("thebubblediv") : null;
  var bubbletable = (thisdoc.getElementById("bubble"+tailgoes)!=null)? thisdoc.getElementById("bubble"+tailgoes) : null;
  var otherbubble = (tailgoes=="up")? thisdoc.getElementById("bubbledown") : thisdoc.getElementById("bubbleup")
  var icontable = (thisdoc.getElementById("bubble"+tailgoes+"icons"))? thisdoc.getElementById("bubble"+tailgoes+"icons") : null;
  
  if(thebubblediv && bubbletable && icontable)
    {
    thebubblediv.style.display = "";
    bubbletable.style.display = "";
    otherbubble.style.display = "none"; 
    for(var x=1;x<icontable.rows.length;x++)
      {
      tr = thisdoc.getElementById(icontable.rows[x].id);
      var rowid = tr.id.substr(1);
      if(code & rowid)
        icontable.rows[x].style.display = "";
      else
        icontable.rows[x].style.display = "none";
      }
    var bubbleheight = bubbletable.offsetHeight;
    if(tailgoes=="up")
     poptop = elepos[1] + 10;
    else 
      poptop = elepos[1] - bubbleheight + 6;
    thebubblediv.style.top = poptop;
    thebubblediv.style.left = elepos[0] - 76;
    } 
  }
//=========================================================
function hidediv()
  {
  pausecomp(1500);
  var thebubblediv = document.getElementById("thebubblediv");
  if(thebubblediv)
    thebubblediv.style.display = "none"; 
  }
//=========================================================
function pausecomp(millis)
{
var date = new Date();
var curDate = null;

do { curDate = new Date(); }
while(curDate-date < millis);
} 
//=========================================================
function ShowDown(id, chk)
{
  var bid = (id && isNaN(id))? null : id;
  var cid = (chk && isNaN(chk))? null : chk;
  if(bid==null) return;
  var param = "?svc=down";
  var framed = false;
  var thisdoc = document;
  var contentframe = top.frames["Content"];
  if (contentframe != null) 
  {
    framed = true;
    thisdoc = contentframe.document;
    }
  var scrollpos = getScrollingPosition(thisdoc);
  //var clouddem = getViewportSize(thisdoc);
  var cloud = thisdoc.getElementById('overlay');
  var bubble = thisdoc.getElementById('download');
  if (bubble.style.display == "inline" && bubble.className == "b24-download_bubble") {
      SunDown();
      return;
  }
  bubble.innerHTML = null;
  
  param += "&data="+bid;
  if(cid) param +="&data="+cid;
  //window.frames["dataframe"].location.href = "data.asp"+param;
  var dataSource =  "data.asp" + param; 
  XMLHttpRequestObject.open("GET", dataSource);
  XMLHttpRequestObject.onreadystatechange = function()
  {
    if (XMLHttpRequestObject.readyState == 4 &&
        XMLHttpRequestObject.status == 200) {
            bubble.innerHTML = XMLHttpRequestObject.responseText;
  }
  if (XMLHttpRequestObject.readyState == 4 &&
      XMLHttpRequestObject.status == 403) {
          if (XMLHttpRequestObject.responseText.indexOf("errorcode='1'") != -1) {
              window.location.reload();
          }
          else if (XMLHttpRequestObject.responseText.indexOf("errorcode=\"1\"") != -1) {
              window.location.reload();
          }
          else if (XMLHttpRequestObject.responseText.indexOf("errorcode=1") != -1) {
              window.location.reload();
          }
          else 
          {
              bubble.innerHTML = XMLHttpRequestObject.responseText;
          }
      }
    }
  XMLHttpRequestObject.send(null);
  bubble.className = "b24-download_bubble";
  bubble.style.width = 380;
  bubble.style.left = 195;
  bubble.style.top = (location.href.indexOf("viewer")>=0)? 10+scrollpos[1] : 130+scrollpos[1];
  bubble.style.display = "inline";
}

function AuthorReverse(author) {
    var parts = author.split(' ');
    var splitAt = 0;
    if (parts.length < 2) {
        return author;
    }
    if (parts[1].length == 1 || parts[1].indexOf('.') > 0) {
        splitAt = 2;
    }
    else {
        splitAt = 1;
    }
    var name = "";
    for (var i = splitAt; i < parts.length; i++) {
        if (name.length > 0) {
            name += ' ';
        }
        name += parts[i];
    }
    name += ',';
    for (var i = 0; i < splitAt; i++) {
        name += ' ' + parts[i];
    }
    return name;
}

//=========================================================
function ShowCitation(id, _type, chk, offsetfromclick) {
  var reposition = (offsetfromclick) ? true : false;
  var bid = (id && isNaN(id))? null : id;
  var cid = (chk && isNaN(chk))? null : chk;
  var booktype = (_type == null || isNaN(_type)) ? 1 : _type
  if(bid==null) return;
  var param = "?svc=down";
  var framed = false;
  var thisdoc = document;
  var bubble = thisdoc.getElementById('download');
  if (bubble == null) {
      var contentframe = top.frames["Content"];
      if (contentframe != null)  {
          framed = true;
          thisdoc = contentframe.document;
      }
      bubble = thisdoc.getElementById('download');
  }
  var scrollpos = getScrollingPosition(thisdoc);
  //var clouddem = getViewportSize(thisdoc);
  var bubble = thisdoc.getElementById('download');
  if (bubble.style.display == "inline" && bubble.className == "b24-citation_bubble") {
      SunDown();
      if (!reposition) {
          return;
      }
  }
  bubble.innerHTML = null;
  bubble.className = "b24-citation_bubble";
  bubble.style.left = 195;
  bubble.style.top = (location.href.indexOf("viewer")>=0)? 10+scrollpos[1] : 130+scrollpos[1];
  if (reposition) {
      var linkpos = document.getElementById("citelink" + bid);
      if (linkpos) {
          var elepos = getPosition(linkpos);
          bubble.style.top = elepos[1] + 10;
      }
  }
  bubble.style.width = 380;
  bubble.style.display = "inline";
  var focuser = new Focuser("focusitem1");
  focuser.SetIntervalID(setInterval(focuser.SetFocus, 2000));
  var bookSpan = thisdoc.getElementById('b24-booktype-' + bid);
  if (bookSpan) {
      if (bookSpan.innerText) {
          booktype = bookSpan.innerText;
      }
      else {
          booktype = bookSpan.textContent;
      }
  }
  var html = "<div class='dialog'>";
  html += "<div class='content'>";
  //  html += "<div class='t'><span class='close'><A HREF='javascript:void(0)' onclick='javascript:SunDown();'><IMG align='right' SRC='images/dialog_close.gif' border='0' height='13' width='17' alt='click here to close' onclick='javascript:SunDown();'></A></span></div>";
  html += "<div class='t'></div>";
  //  html += "<div class='r'><LABEL STYLE='display:none' FOR='dialog-close'>Close</LABEL><A ID='dialog-close' HREF='javascript:void(0)' onclick='javascript:SunDown();'>x</A></span></div>";
  html += "<div class='r'><A HREF='javascript:void(0)' onclick='javascript:SunDown();'><IMG SRC='images/bubble_x.gif' border='0' height='7' width='5' alt='click here to close' title='click here to close' onclick='javascript:SunDown();'></A></div>";
  html += "<p class='hd'>Citation for this title:</p>";
  //  html += "<h1>Citation for this title:</h1>";
  html += "<p><div class='b24-citations-content'>";
  if (booktype == 3 || booktype == 7) {
      var authorSpan = thisdoc.getElementById('b24-editor-' + bid);
      if (authorSpan) {
          html += "<span class='b24-citations_'>";
          if (authorSpan.innerText) {
              html += authorSpan.innerText;
          }
          else {
              html += authorSpan.textContent;
          }
          html += " ed";
          html += "</span>";
          html += ". ";
      }
  }
  else {
      var authorSpan = thisdoc.getElementById('b24-bookauthor-' + bid);
      if (authorSpan) {
          var nmAuthors = 0;
          for (var i = 0; i < authorSpan.childNodes.length; i++) {
              var child = authorSpan.childNodes[i];
              if (child.className == 'b24-bookauthor') {
                  nmAuthors++;
              }
          }
          var authors = 0;
          for (var i = 0; i < authorSpan.childNodes.length; i++) {
              var child = authorSpan.childNodes[i];
              if (child.className == 'b24-bookauthor') {
                  authors++;
                  if (authors > 1 && authors == nmAuthors) {
                      html += ", and ";
                  }
                  else if (authors > 1) {
                      html += ", ";
                  }
                  html += "<span class='b24-citations_author'>";
                  var name = "";
                  for (var j = 0; j < child.childNodes.length; j++) {
                      name += child.childNodes[j].nodeValue;
                  }
                  if (authors == 1) {
                      html += AuthorReverse(name); 
                  }
                  else {
                      html += name;
                  }
                  html += "</span>";
              }
          }
          html += ". ";
      }
  }
  bookSpan = thisdoc.getElementById('b24-chaptertitle');
  if (bookSpan) {
      html += "\"<span class='b24-citations_chaptertitle'>";
      if (bookSpan.innerText) {
          html += bookSpan.innerText;
      }
      else {
          html += bookSpan.textContent;
      }
      html += "</span>\"";
      html += ". ";
  }
  bookSpan = thisdoc.getElementById('b24-booktitle-'+bid);
  if (bookSpan) {
      html += "<span class='b24-citations_title'>";
      if (bookSpan.innerText) {
          html += bookSpan.innerText;
      }
      else {
          html += bookSpan.textContent;
      }
      html += "</span>";
      html += ". ";
  }
  if (booktype == 3 || booktype==7) {
      bookSpan = thisdoc.getElementById('b24-soundview-copyright');
      var authorSpan = thisdoc.getElementById('b24-bookauthor-' + bid);
      if (authorSpan) {
          var first = true;
          html += "by ";
          for (var i = 0; i < authorSpan.childNodes.length; i++) {
              var child = authorSpan.childNodes[i];
              if (child.className == 'b24-bookauthor') {
                  if (first) {
                      first = false;
                  }
                  else if (i + 1 == authorSpan.childNodes.length) {
                      html += " and ";
                  }
                  else {
                      html += ", ";
                  }
                  html += "<span class='b24-citations_author'>";
                  for (var j = 0; j < child.childNodes.length; j++) {
                      html += child.childNodes[j].nodeValue;
                  }
                  html += "</span>";
              }
          }
          html += ". ";
      }
  }

  bookSpan = thisdoc.getElementById('b24-bookimprint-'+bid);
  if (bookSpan) {
      html += "<span class='b24-citations_bookimprint'>";
      if (bookSpan.innerText) {
          html += bookSpan.innerText;
      }
      else {
          html += bookSpan.textContent;
      }
      html += "</span>";
      html += ". ";
  }
  bookSpan = thisdoc.getElementById('b24-bookrights-' + bid);
  if (bookSpan) {
      html += "<span class='b24-citations_bookrights'>";
      if (bookSpan.innerText) {
          html += bookSpan.innerText;
      }
      else {
          html += bookSpan.textContent;
      }
      html += "</span>";
      html += ". ";
  }

  if (booktype == "8") {
      html += "<span class='b24-citations_type'>Online Video Clip</span>, ";
  }
  else if (booktype =="9") {
      html += "<span class='b24-citations_type'>Online Audio File</span>, ";
  }
  
  if (booktype == "3" || booktype=="7") {
      bookSpan = thisdoc.getElementById('b24-product-' + bid);
      if (bookSpan) {
          html += "<span class='b24-citations_bookimprint'>";
          if (bookSpan.innerText) {
              html += bookSpan.innerText;
          }
          else {
              html += bookSpan.textContent;
          }
          html += "</span>";
          html += ". ";
      }
  }
  html += "<span class='b24-citation_resource'>Books24x7</span>. ";
  html += "&lt;<span class='b24-citations_link'>http://common.books24x7.com/book/id_" + bid + "/book.asp</span>&gt;";
  html += " (accessed <span class='b24-citations_date'>";

  var m_names = new Array("January", "February", "March", 
                          "April", "May", "June", "July", "August", "September", 
                          "October", "November", "December");  
  var d = new Date();
  var curr_date = d.getDate();
  var curr_month = d.getMonth();
  var curr_year = d.getFullYear();
  html += m_names[curr_month] + " " + curr_date + ", " + curr_year;
  html += "</span>)  ";
  html += "</div></p>";
  html += "</div>";
  html += "<div class='b'><div></div></div>";
  html += "</div>";
  /* example */
  /*
  html ="<div class='dialog'>";
  html +=" <div class='content'>";
  html +="  <div class='t'></div>";
  html +="  <!-- Your content goes here -->";
  html +="  <h1>Even <em>More</em> Rounded Corners With CSS</h1>";
  html +="  <p>Here is a very simple example dialog.</p>";
  html +="  <p>Note that if gradients are used, you will need a 'min-height' (or fixed height) rule on the body of the dialog. If these examples appear funny at the bottom, it is because they do not enforce the min-height rule.</p>";
  html +=" </div>";
  html +=" <div class='b'><div></div></div>";
  html +="</div>";
  */
  bubble.innerHTML = html;

}

//=========================================================
function SunDown() {
    var framed = false;
    var thisdoc = document;
  // hide the bubble
    var bubble = thisdoc.getElementById('download');
    if (bubble == null) {
        var contentframe = top.frames["Content"];
        if (contentframe != null)   {
            framed = true;
            thisdoc = contentframe.document;
        }
    }
    var bubble = thisdoc.getElementById('download');
    //var cloud = thisdoc.getElementById('overlay');
    bubble.innerHTML = null;
    bubble.style.display = "none";
  //cloud.style.display = "none";
}
//=========================================================
// Function for setting the focus to an element returned
// by AJAX
// Example: 
//  var focuser = new Focuser("downloadtxt");
//  focuser.SetIntervalID(setInterval(focuser.SetFocus, 1000));
//=========================================================
function Focuser(objID)
{
  // Private members
  var id = objID;                   // ID of the element to receive focus
  var intervalID = null;            // This is the id returned by setInterval, used for clearing the intervals

  // Public Members
  
  //----------------------------------------------------
  // Set the focus to object having id "id"
  //----------------------------------------------------
  this.SetIntervalID = function SetIntervalID(intID)
  {
    intervalID = intID;
  }           

  //----------------------------------------------------
  // Set the focus to object having id "id"
  //----------------------------------------------------
  this.SetFocus = function SetFocus()
  {
    var thisdoc = document;
    var contentframe = top.frames["Content"];
    if (contentframe != null) 
      thisdoc = contentframe.document;
    if(id) {
      var focusItem = thisdoc.getElementById(id);
      if(focusItem) {
        focusItem.focus();
        if(intervalID)
          clearInterval(intervalID);
      }
    } 
  } // SetFocus
}

//=========================================================
function getScrollingPosition(doc)
{
    var position = [0, 0];

    if (typeof window.pageYOffset != 'undefined')
        {
            position = [
                        window.pageXOffset,
                        window.pageYOffset
            ];
        }

    else if (typeof doc.documentElement.scrollTop
             != 'undefined' && (doc.documentElement.scrollTop > 0 ||
                                doc.documentElement.scrollLeft > 0))
        {
            position = [
                        doc.documentElement.scrollLeft,
                        doc.documentElement.scrollTop
            ];
        }

    else if (typeof doc.body.scrollTop != 'undefined')
        {
            position = [
                        doc.body.scrollLeft,
                        doc.body.scrollTop
            ];
        }

    return position;
}
//=========================================================
function getViewportSize(doc)
{
    var size = [0, 0];

    if (typeof window.innerWidth != 'undefined')
        {
            size = [
                    window.innerWidth,
                    window.innerHeight
            ];
        }
    else if (typeof doc.documentElement != 'undefined'
             && typeof doc.documentElement.clientWidth != 'undefined' 
             && doc.documentElement.clientWidth != 0)
        {
            size = [
                    doc.documentElement.clientWidth,
                    doc.documentElement.clientHeight
            ];
        }
    else
        {
            size = [
                    doc.getElementsByTagName('body')[0].clientWidth,
                    doc.getElementsByTagName('body')[0].clientHeight
            ];
        }

    return size;
}

//=========================================================
function getPosition(theElement)
{
    var positionX = 0;
    var positionY = 0;

    while (theElement != null)
        {
            positionX += theElement.offsetLeft;
            positionY += theElement.offsetTop;
            theElement = theElement.offsetParent;
        }

    return [positionX, positionY];
}
//---- viewer image popping
function PopImage(id, src, width, height)
  {
  if(id)
    {
    var img1 = document.getElementById(id);
    if(img1)
      {
      img1.style.display = 'none';
      var img2 = document.getElementById(id+'$');
        {
        if(img2)
          {
          img2.style.display = 'inline';
          }
        else
          {
          node = img1.parentNode.parentNode
          node.innerHTML += '<IMG ID="'+id+'$" SRC="'+src+'" WIDTH="'+width+'" HEIGHT="'+height+'" ALT="Click to collapse" TITLE="Click to collapse" onClick="UnPopImage(\''+id+'\')" >'
          }
        }
      }
    }
  }

function UnPopImage(id)
  {
  if(id)
    {
    var img1 = document.getElementById(id);
    var img2 = document.getElementById(id+'$');
    if(img2) img2.style.display = 'none';
    if(img1) img1.style.display = 'inline';
    }
  }

//=========================================================
// Start of common code to support AJAX
//=========================================================

/*
coded by Kae - http://verens.com/
use this code as you wish, but retain this notice
*/


var kXHR_instances=0;
var kXHR_objs = new Array();

IFrameXMLHttpRequest=function(){
	var i=0;
	var url='';
	var responseText='';
	var iframe='';
	this.onreadystatechange=function(){
		return false;
	}
  this.abort=function() {  // do nothing.  just don't break IE6
  }
	this.open=function(method,url){
		//TODO: POST methods
		this.i=++kXHR_instances; // id number of this reques
		this.url=url + "&iframe=1";
    var el=document.getElementById('kXHR_iframe_'+this.i);
    if (el != null) {
        el.parentNode.removeChild(el);
    }
    //		document.body.appendChild(document.createElement('<iframe id="kXHR_iframe_'+this.i+'" style="display:none" src="/"></iframe>'));	
    var elm = document.createElement("iframe");
		elm.setAttribute("id",'kXHR_iframe_'+this.i);
    elm.setAttribute("style","display:none");
    elm.setAttribute("height","1");
    elm.setAttribute("width","1");
    //    elm.setAttribute("src","/");
		document.body.appendChild(elm);
  }
	this.send=function(postdata){
		//TODO: use the postdata
		var el = document.getElementById('kXHR_iframe_'+this.i);
    el.setAttribute("src",this.url);
		kXHR_objs[this.i]=this;
		setTimeout('IFrameXMLHttpRequest_checkState('+this.i+',2)',2);
	}
	return true;
}


function IFrameXMLHttpRequest_setErrorCode(responseText) {
    var t = "" + responseText;
    t = t.toLowerCase();
    var span = t.indexOf("span");
    if (span > 0 && span < 5) {
        var cls = t.indexOf("b24-duierror");
        if (cls > 0 && cls < 20) {
            return 403;
        }
    }
    else {
        return 200;
    }
}
IFrameXMLHttpRequest_checkState=function(inst,delay){
	var el=document.getElementById('kXHR_iframe_'+inst);
	if(el.readyState==null) {
      var responseText=document.frames['kXHR_iframe_'+inst].document.body.innerHTML;
      if (responseText != null) {
          kXHR_objs[inst].responseText=responseText;
          kXHR_objs[inst].readyState=4;
          kXHR_objs[inst].status= IFrameXMLHttpRequest_setErrorCode(responseText);
          el.parentNode.removeChild(el);
          kXHR_objs[inst].onreadystatechange();
      }
      else {
          delay*=1.5;
          setTimeout('IFrameXMLHttpRequest_checkState('+inst+','+delay+')',delay);
      }
  }
	else if(el.readyState=='complete'){
    var responseText=document.frames['kXHR_iframe_'+inst].document.body.innerHTML;
		kXHR_objs[inst].responseText=responseText;
		kXHR_objs[inst].readyState=4;
    kXHR_objs[inst].status= IFrameXMLHttpRequest_setErrorCode(responseText);
		el.parentNode.removeChild(el);
		kXHR_objs[inst].onreadystatechange();
	}else{
		delay*=1.5;
		setTimeout('IFrameXMLHttpRequest_checkState('+inst+','+delay+')',delay);
	}
}

var XMLHttpRequestObject;
if (window.XMLHttpRequest) {
    XMLHttpRequestObject = new XMLHttpRequest();
}
else if (window.ActiveXObject){ 
   XMLHttpRequestObject = new IFrameXMLHttpRequest();
}
else {
    XMLHttpRequestObject = new XMLHttpRequest();
    if (XMLHttpRequestObject == null) {
      XMLHttpRequestObject = new IFrameXMLHttpRequest();
    }
}

