   
   var checkAuction = setInterval("ShowAuction()", 10000);
   
   var xmlHttp;

   function ShowAuction()
    { 
     xmlHttp=GetXmlHttpObject();

     if (xmlHttp==null)
      {
       alert ("Your browser does not support AJAX!");
       return;
      } 

     var url="ShowAuction.aspx";

     xmlHttp.onreadystatechange=function () { stateChanged(); };
     xmlHttp.open("GET",url,true);
     xmlHttp.send(null);
    }

   function stateChanged() 
    { 
     if (xmlHttp.readyState==4)
      { 
       var isValid = xmlHttp.responseText;
       
       //alert("xmlHttp.responseText = " + isValid);
       
       var offairDiv = document.getElementById("offair").style;
       var flashDiv = document.getElementById("flash").style;

       if (isValid=="true")
        {
			//alert("returned true - Show Simulcast");
			// Show Simulcast
			offairDiv.display = "none";
			flashDiv.display = "block";
			
			// Simulcast Displayed so stop checking
			clearInterval(checkAuction);
        }
       else
        {
			//alert("returned false - Show Content");
			
			// Hide Simulcast
			offairDiv.display = "block";
			flashDiv.display = "none";
        }
       }
     }

   function GetXmlHttpObject()
    {
     var xmlHttp=null;
     try
      {
       // Firefox, Opera 8.0+, Safari
       xmlHttp=new XMLHttpRequest2();
      }
     catch (e)
      {
       // Internet Explorer
       try
        {
         xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
        }
       catch (e)
        {
         xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
        }
       }
     return xmlHttp;
    }
