﻿var url = "";
 <!--//var url = "http://www.integratedsports.net/diving/live/";//-->
  
 
  var xmlhttp_load;
  var t_live = '';
  var h1 = "";
  var h2 = "";
  var h3 = 5000;
  
  function startlive (p,w,t) {
    h1 = p;
    h2 = w;
    h3 = t;
    load(p,w);
  }
  
  function load(page, where) {
       window.status = 'Updating...'; 
        xmlhttp_load=null;
        if (window.XMLHttpRequest)
          {// code for Firefox, Opera, IE7, etc.
            xmlhttp_load=new XMLHttpRequest();
             
          }
        else if (window.ActiveXObject)
          {// code for IE6, IE5
            xmlhttp_load=new ActiveXObject("Microsoft.XMLHTTP");
          }
            
         if (xmlhttp_load!=null)
           {
             
             xmlhttp_load.onreadystatechange=state_Change_load;
             xmlhttp_load.open("GET",url + page + ".aspx?s={" + Math.random() + "}&w=" + where ,true);
             xmlhttp_load.send(null); 
                          
           }
         else
           {
             alert("Your browser does not support XMLHTTP.");
           }
           
   }       
        function state_Change_load()
            {
            
            if (xmlhttp_load.readyState==4)
             {// 4 = "loaded"
               if (xmlhttp_load.status==200)
                {// 200 = "OK"
                 document.getElementById('displayarea').innerHTML= xmlhttp_load.responseText; 
                 window.status = 'Done.';
                 
                }
                setTimeout("startlive('" + h1 + "','" + h2 + "')",10000);
             }
            
            }
            
     


     
     function setcolor_do(color,whois,diver,t) {
        document.getElementById(whois).style.backgroundColor = color;
        if (t==0) {
          document.getElementById(diver).style.visibility = 'visible';
        }
        if (t==1) {
          document.getElementById(diver).style.visibility = 'hidden';
        }
     }
     
     function setcolor_d(color,whois,diver,t) {
        document.getElementById(whois).style.backgroundColor = color;
        if (t==0) {
          document.getElementById(diver).style.visibility = 'visible';
        }
        if (t==1) {
          document.getElementById(diver).style.visibility = 'hidden';
        }
     }
  
  
  


