// JavaScript Document
var xmlhttp

function ajaxRefreshBundle()
{
xmlhttp=GetXmlHttpObjectRefreshBundle();
if (xmlhttp==null)
  {
  alert ("Your browser does not support XMLHTTP!");
  return;
  }
var url="ajax_indexBundleSavings.php";
url=url+"?c=1";
url=url+"&sid="+Math.random();
xmlhttp.onreadystatechange=stateChangedRefreshBundle;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}

function stateChangedRefreshBundle()
{
if (xmlhttp.readyState==4)
  {
  document.getElementById("home_pairings").innerHTML="";	
  document.getElementById("home_pairings").innerHTML=xmlhttp.responseText;
  } else {
	  if (xmlhttp.readyState<4)
  			{
	 document.getElementById("home_pairings").innerHTML="<table style=\"background-color: #fff; width: 98%; height: 225px; margin: 10px 10px 10px 10px;\" cellpadding=\"5\" cellspacing=\"5\"><tr><td style=\"width: 100%; text-align: center;\">refreshing...<br /><img src=\"images/ajax_loader.gif\" /><br /><a onclick=\"ajaxRefreshBundle();\" style=\"cursor: pointer;\">[cancel]</a></td></tr></table>"; 
			}
  }
}

function GetXmlHttpObjectRefreshBundle()
{
if (window.XMLHttpRequest)
  {
  // code for IE7+, Firefox, Chrome, Opera, Safari
  return new XMLHttpRequest();
  }
if (window.ActiveXObject)
  {
  // code for IE6, IE5
  return new ActiveXObject("Microsoft.XMLHTTP");
  }
return null;
}