function refreshOldSignal(id,idSemaforo,prefijo){ document.getElementById('semaforo_'+prefijo+id).innerHTML=document.getElementById('oldSemaforo'+idSemaforo).innerHTML; } function semaforo(estados, idCampo, variableIdBase, seccion_table, campoEstado, valor, prefijo,maxDes,campFecha){ jQuery("#semaforo_"+prefijo+idCampo).html( '' ); var pref=prefijo.split('/'); jQuery.ajax({ url: "includes/_semaforo.php", data: "idCampo="+idCampo+"&variableIdBase="+variableIdBase +"&seccion_table="+seccion_table +"&campoEstado="+campoEstado +"&valor="+valor +"&prefijo="+ prefijo+"&estados="+ estados+"&maxDes="+ maxDes+"&campFecha="+ campFecha, cache: false, success: function(html){ jQuery("#semaforo_"+prefijo+idCampo).html( html ); } }); } function video(archi,id, widthVideo,heightVideo) { flashembed("playerContent"+id, {src:'swf/FlowPlayerDark.swf',width: widthVideo,height: heightVideo, wmode: 'transparent'}, { config: { hideControls: false, controlsOverVideo:'yes', usePlayOverlay:true, autoPlay:false, showPlayButton:true, initialScale:'scale', videoFile: archi } } ); } function audio(archi ) { if(document.getElementById('audio').innerHTML!=''){ document.getElementById('audio').innerHTML=''; } flashembed("audio", { src:'swf/FlowPlayerDark.swf', width: 250, height: 28, wmode: 'transparent' },{ config: { hideControls: false, controlsOverVideo:'yes', usePlayOverlay:true, autoPlay:true, showPlayButton:true, initialScale:'scale', videoFile: archi } } ); } function cargarCombo(val,nro){ loadPage("soCombo.php?idc="+val+"&com="+nro,"tdCombo"+nro); } function loadPage(url,div){ $("#"+div).load(url, function(responseText) { document.getElementById(div).innerHTML = responseText; }); } function loadPageBlockUI(url,div,msg){ if(!msg)msg='Cargando..'; $.blockUI({ message: '

'+msg+'

', css: { border: 'none', padding: '15px', backgroundColor: '#000', '-webkit-border-radius': '10px', '-moz-border-radius': '10px', opacity: .5, color: '#fff' } }); $("#"+div).load(url, function(responseText) { document.getElementById(div).innerHTML = responseText; $.unblockUI(); }); } function actualizarValorCombo(nroCombo,nombreCombo){ // alert(nroCombo);alert(nombreCombo); if(document.getElementById(nombreCombo+"_"+ nroCombo).value == 1){ document.getElementById(nombreCombo+"_"+ nroCombo).value = 0; //alert(documnent.getElementById("div_combo1_"+ nroCombo).style.backgroundColor); document.getElementById("div_"+nombreCombo+"_"+ nroCombo).style.backgroundColor = "#fff"; document.getElementById("div_"+nombreCombo+"_"+ nroCombo).style.color = "#000"; }else{ document.getElementById(nombreCombo+"_"+ nroCombo).value = 1; document.getElementById("div_"+nombreCombo+"_"+ nroCombo).style.backgroundColor = "#666"; document.getElementById("div_"+nombreCombo+"_"+ nroCombo).style.color = "#FFF"; } var nroCombo = nroCombo || 0;//pone nroCombo en 0 (valor por defecto) si este no existe var str = 0; for(i=1;document.getElementById(nombreCombo+"_"+ i) != null;i++){ if(document.getElementById(nombreCombo+"_"+ i) && document.getElementById(nombreCombo+"_"+ i).value == true){ if(str == 0) { str = document.getElementById(nombreCombo+"_"+ i).name.replace("f", ""); } else { str += "," + document.getElementById(nombreCombo+"_"+ i).name.replace("f", ""); } }else{ document.getElementById(nombreCombo+"_"+ i).value = false; } } if(str == 0){ document.getElementById(nombreCombo).value = ''; }else{ document.getElementById(nombreCombo).value = str; } } function actualizarValorComboGrupos(nombreCombo){ if(document.getElementById(nombreCombo).value == 1){ document.getElementById(nombreCombo).value = 0; //alert(documnent.getElementById("div_combo1_"+ nroCombo).style.backgroundColor); document.getElementById("div_"+nombreCombo).style.backgroundColor = "#fff"; document.getElementById("div_"+nombreCombo).style.color = "#000"; }else{ document.getElementById(nombreCombo).value = 1; document.getElementById("div_"+nombreCombo).style.backgroundColor = "#666"; document.getElementById("div_"+nombreCombo).style.color = "#FFF"; } //var nroCombo = nroCombo || 0;//pone nroCombo en 0 (valor por defecto) si este no existe nombreComboOriginal = nombreCombo.substring(0, nombreCombo.length - 2); var str = document.getElementById(nombreComboOriginal).value; //alert(str); if(str != '') { str = document.getElementById(nombreCombo).name.replace("f", ""); document.getElementById(nombreComboOriginal).value += ','+str; } else { str = document.getElementById(nombreCombo).name.replace("f", ""); document.getElementById(nombreComboOriginal).value = str; } //document.getElementById(nombreComboOriginal).value += str; } function loadVideoThumb(url,size,id){ document.getElementById(id).src = getScreen(url,size); } function getScreen( url, size ){ if(url === null){ return ""; } size = (size === null) ? "big" : size; var vid; var results; results = url.match("youtu.be/([^&#]*)"); if(results === null) { results = url.match("[\\?&]v=([^&#]*)"); } vid = ( results === null ) ? url : results[1]; if(size == "small"){ return "http://img.youtube.com/vi/"+vid+"/2.jpg"; } else { return "http://img.youtube.com/vi/"+vid+"/0.jpg"; } } function dobleClickOrden(idEntidad, parametros){ jQuery("#bannerFormId_"+idEntidad).hide(); jQuery("#outBannerFormId_"+idEntidad).show().load("_ordenPersonalizedForm.php", parametros); } function deleteRow(id,mess,url,par){ jConfirm(mess, '', function(r){if(r){doDelete(id,url,par);}}); } function doDelete(id,url,par){ $("#accion_"+id).wrapInner('
'); $("#botones_"+id).hide(); $("#botones_"+id).before(''); jQuery.ajax({ url: url, data: par, cache: false, success: function(html){ $('#test').html(html); html=html.split('/'); estado=html[0]; html=html[1]; if(html == ''){ location.href='index.php'; }else{ if(estado=='true'){ $("#row_"+id+" .text2").css("background-color","#F00"); $("#accion_"+id).html(html); }else{ $("#accion_"+id).html($("#botones_"+id).html()); alert(html); } } } }); } function alert(texto, titulo){ if(typeof titulo === 'undefined'){ titulo = 'Mensaje'; } jAlert(texto, titulo); } function strip(html) { var tmp = document.createElement("DIV"); tmp.innerHTML = html; return tmp.textContent||tmp.innerText; } function agregarJugador(idPartido, idJugador, cantidad) { r = confirm("NO KEY:add_q"); if (r == true) { $.ajax({ type: "POST", url: "aj/_agregarJugador.php", data: {idPartido: idPartido, idJugador: idJugador, cant: cantidad}}) .done(function() { alert("NO KEY:add_success"); location.reload(); }); } } function agregarJugador(idPartido, idJugador, cantidad) { r = confirm("NO KEY:add_q"); if (r == true) { $.ajax({ type: "POST", url: "aj/_agregarJugador.php", data: {idPartido: idPartido, idJugador: idJugador, cant: cantidad}}) .done(function() { alert("NO KEY:add_success"); location.reload(); }); } }