var global, global2;

function confver(t1, t2)
{
document.getElementById("confver").innerHTML="<br><br>CONFRONTO ENTRE "+t1+" E "+t2;  
}

function confrontos(str, opcao)
{
xmlhttp=GetXmlHttpObject();
if (xmlhttp==null)
  {
  alert ("O seu browser não suporta AJAX!");
  return;
  }
  
  global = str;
var url="confrontos2.asp?id=" + str + "&opcao=" + opcao;
xmlhttp.onreadystatechange=Changed;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}

function Changed()
{
if (xmlhttp.readyState==4)
  {
  document.getElementById("confronto").innerHTML=xmlhttp.responseText;
 
  }
}

function jogos(time1, time2, opcao)
{
xmlhttp=GetXmlHttpObject();
if (time2 > 0){
if (xmlhttp==null)
  {
  alert ("O seu browser não suporta AJAX!");
  return;
  }
  
  document.getElementById("jogos").innerHTML= "<table width='570' border='0' cellspacing='0' cellpadding='0'>                  <tr>                <td><table width='570' border='0' cellspacing='0' cellpadding='0'>                  <tr>                    <td width='12' background='imagens/tabela/topo.jpg' bgcolor='#022F1B'>&nbsp;</td>                    <td width='393' background='imagens/tabela/topo.jpg' class='branco'>CONFRONTOS<br>                      <br></td>                    <td width='165' align='right' bgcolor='#022F1B'><img src='imagens/tabela/topo.png' width='165' height='50'></td>                  </tr>                  </table>                  </td>                  </tr>        <tr>        <td  bgcolor='#022F1B' class='branco'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Carregando...</TD> </TR> <tr>        <td ><table width='570' border='0' cellspacing='0' cellpadding='0'>                <tr>                  <td width='165' align='left' bgcolor='#022F1B'><img src='imagens/tabela/baixo.png' width='165' height='50'></td>                <td background='imagens/tabela/baixo.jpg' bgcolor='#022F1B'>&nbsp;</td>                  </tr>                  </table>                  </td>                  </tr>                  <tr>                <td bgcolor='#022F1B'><img src='imagens/tabela/linha.jpg' width='570' height='2'></td>                </tr></table> ";  
var url="confrontos3.asp?time1=" + time1 + "&time2=" + time2 + "&opcao=" + opcao;
xmlhttp.onreadystatechange=Changed2;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}
}

function Changed2()
{
if (xmlhttp.readyState==4)
  {
  document.getElementById("jogos").innerHTML=xmlhttp.responseText;
  }
}

function maisjogos(str, rod, t1, t2)
{
xmlhttp=GetXmlHttpObject();
if (xmlhttp==null)
  {
  alert ("O seu browser não suporta AJAX!");
  return;
  }
  
  global2 = str;
var url="maisjogos.asp?rod="+ rod + "&id=" + str + "&t1=" + t1 + "&t2=" + t2;
xmlhttp.onreadystatechange=Changed3;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}

function Changed3()
{
if (xmlhttp.readyState==4)
  {
  document.getElementById(global2).innerHTML=xmlhttp.responseText;
  }
}


function jogosc(p1, p2, usu1, usu2, rod)
{
xmlhttp=GetXmlHttpObject();
if (xmlhttp==null)
  {
  alert ("O seu browser não suporta AJAX!");
  return;
  }


var url="jogo1_clubes.asp?p1="+ p1 + "&p2=" + p2 + "&usu1=" + usu1 + "&usu2=" + usu2 + "&rod=" + rod;
xmlhttp.onreadystatechange=Changed5;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}

function jogoregulamento()
{
xmlhttp=GetXmlHttpObject();
if (xmlhttp==null)
  {
  alert ("O seu browser não suporta AJAX!");
  return;
  }


var url="jogo3_clubes.asp";
xmlhttp.onreadystatechange=Changed5;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}

function jogochance(jogo)
{
xmlhttp=GetXmlHttpObject();
if (xmlhttp==null)
  {
  alert ("O seu browser não suporta AJAX!");
  return;
  }

var url="jogo2_clubes_chance.asp?jogo="+jogo;
xmlhttp.onreadystatechange=Changed5;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}

function Changed5()
{
if (xmlhttp.readyState==4)
  {
  document.getElementById("jogosc").innerHTML=xmlhttp.responseText;
  }
}

