function spanelads(){
	setInterval("cambiaad()",15000);
}
function cambiaad(){
	ajax('panelads_ajax.php','GET','ac=1',function (oXML) { document.getElementById('panelads').innerHTML=(oXML.responseText); });
}
function leeAJAXc1(jh){
var ruleta1 = 0;
if (document.casino1.ruleta[0].checked){
    ruleta1 = 0;
}
if (document.casino1.ruleta[1].checked){
    ruleta1 = 1;
}
if (document.casino1.ruleta[2].checked){
    ruleta1 = 2;
}
if (document.casino1.ruleta[3].checked){
    ruleta1 = 3;
}
if (document.casino1.ruleta[4].checked){
    ruleta1 = 4;
}
if (document.casino1.ruleta[5].checked){
    ruleta1 = 5;
}
	document.getElementById('jugar2').disabled=true;
	ajax('casino1-ajax.php','GET','ruleta='+ruleta1+'&apuesta1='+document.casino1.apuesta1.value+'&numsolo='+document.casino1.numsolo.value+'',function (oXML) { document.getElementById('dcasino1').innerHTML=(oXML.responseText); });
	setTimeout("document.getElementById('jugar2').disabled=false",500);

}

function leeAJAXc2(jh){
	document.getElementById('jugar1').disabled=true;
	ajax('casino2-ajax.php','GET','jugarh=1',function (oXML) { document.getElementById('dcasino2').innerHTML=(oXML.responseText); });
	setTimeout("document.getElementById('jugar1').disabled=false",500);

}


function XHConn() {
  var xmlhttp, bComplete = false;
  try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); }
  catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); }
  catch (e) { try { xmlhttp = new XMLHttpRequest(); }
  catch (e) { xmlhttp = false; }}}
  if (!xmlhttp) return null;
  this.connect = function(sURL, sMethod, sVars, fnDone) {
    if (!xmlhttp) return false;
    bComplete = false;
    sMethod = sMethod.toUpperCase();

    try {
      if (sMethod == "GET")
      {
        xmlhttp.open(sMethod, sURL+"?"+sVars, true);
        sVars = "";
      }
      else
      {
        xmlhttp.open(sMethod, sURL, true);
        xmlhttp.setRequestHeader("Method", "POST "+sURL+" HTTP/1.1");
        xmlhttp.setRequestHeader("Content-Type",
          "application/x-www-form-urlencoded");
      }
      xmlhttp.onreadystatechange = function(){
        if (xmlhttp.readyState == 4 && !bComplete)
        {
          bComplete = true;
          fnDone(xmlhttp);

        }};
      xmlhttp.send(sVars);
    }
    catch(z) { return false; }
    return true;
  };
  return this;
}

function ajax(archivo, metodo, variables, funcion) {
	var myConn = new XHConn();
	if (!myConn) alert("XMLHTTP not available. Try a newer/better browser.");
	myConn.connect(archivo, metodo, variables + '&Now=' + Date(), funcion);
}

function $(id) { return document.getElementById(id); }



//desabilitar boton derecho
var message="Botón derecho deshabilitado.\n";            
 
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers) 
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")


    