// Screensaver Showcase JavaScript Document
var xmlHttp

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 randomLatestProducts()
{ 
  if (xmlHttp.readyState==4) {
    document.getElementById('home_content').innerHTML=xmlHttp.responseText;
  }
}

function reDraw(page)
{
  url = '/re_draw.html/-/page/'+page;
  xmlHttp=GetXmlHttpObject();
  if (xmlHttp==null) {
    alert ("Your browser does not support AJAX!");
    return;
  }

  xmlHttp.onreadystatechange = randomLatestProducts;
  xmlHttp.open("GET",url,true);
  xmlHttp.send(null);
}

function showHideDiv(div_id1,div_id2) {
  document.getElementById(div_id1).style.display = 'block';
  document.getElementById(div_id2).style.display = 'none';
}
