var xmlHttpActionArea;
var xmlHttpBrowseArea;
function GetXmlHttpObject()
{
  var xmlHttp=null;
  try
  {
    // Firefox, Opera 8.0+, Safari
    xmlHttp=new XMLHttpRequest();
  }
  catch (e)
  {
    //Internet Explorer
    try
    {
      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
    catch (e)
    {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
  return xmlHttp;
}
function FillActionArea() 
{ 
  if ((xmlHttpActionArea.readyState==4) || (xmlHttpActionArea.readyState=="complete"))
  { 
     document.getElementById("ActionArea").innerHTML=xmlHttpActionArea.responseText;
     toggle_off('hint');  // hide search tips
  } 
}
function ShowActionArea(str)
{ 
  xmlHttpActionArea=GetXmlHttpObject();
  if (xmlHttpActionArea==null)
    return;
  var url="select.php";
  url=url+"?"+str;
  url=url+"&sid="+Math.random();
  xmlHttpActionArea.onreadystatechange=FillActionArea;
  xmlHttpActionArea.open("GET",url,true);
  xmlHttpActionArea.send(null);

  //mv
  var loader = document.getElementById('ActionArea');
  if (loader != null)
    loader.innerHTML = '<br><img src="../images/loading.gif" alt="loading" />';
}

function FillBrowseArea() 
{ 
  if ((xmlHttpBrowseArea.readyState == 4) || (xmlHttpBrowseArea.readyState == "complete"))
  { 
     document.getElementById("BrowseArea").innerHTML=xmlHttpBrowseArea.responseText;
  } 
}
function ShowBrowseArea(str)
{ 
  xmlHttpBrowseArea=GetXmlHttpObject();
  if (xmlHttpBrowseArea==null)
    return;
  //alert("ShowBrowseArea(" + str + ")");
  var url="browse.php";
  url=url+"?"+str;
  url=url+"&sid="+Math.random();
  xmlHttpBrowseArea.onreadystatechange=FillBrowseArea;
  xmlHttpBrowseArea.open("GET",url,true);
  xmlHttpBrowseArea.send(null);
  
  //mv
  var loader = document.getElementById('BrowseArea');
  if (loader != null)
    loader.innerHTML = '<br><img src="../images/loading.gif" alt="loading" />';
}
function ShowRows()
{
  document.getElementById("showrows").submit();
}
function BackToItem(bookmark)
{
  window.location = "#" + bookmark;
}
