function openNewWindow(url,widthx,heightx) { var dir = url; var busca = "http://www.HHGroups.com/"; var donde = dir.indexOf(busca); var buscaM = "http://www.hhgroups.com/"; var dondeM = dir.indexOf(buscaM); var buscaMP3 = "http://mp3.hhgroups.com/";	var dondeMP3 = dir.indexOf(buscaMP3); if((donde == -1) && (dondeM == -1) && (dondeMP3 != 0)){ url = "http://www.HHGroups.com/" + url; } newWindow = window.open(url,"Hiphopgroups", "width="+widthx+", height="+heightx); newWindow.focus(); }
function verLaNoticia(url){ location.href=url; }
function downTheme(url,form){ location.href=url+form.choseTheme.value; }
function ponDia(form,digito,mes,ano){ if(digito<10){ digito = '0'+digito; } if(mes<10){ mes = '0'+mes; }document.nuevoConcierto.conciertoFecha.value=digito+'/'+mes+'/'+ano; document.nuevoConcierto.conciertoFechaOrd.value=ano+'-'+mes+'-'+digito; }
function pregunta(){ var pregunta = window.confirm("¿Estás seguro?"); if(pregunta==true){ return true; }else{ return false; } }
function keyValidate(objeto){ var charCode; var key = (objeto.which) ? objeto.which : objeto.keyCode; charCode = objeto.keyCode; if (charCode > 32 && (charCode < 65 || charCode >122) && (charCode < 48 || charCode >57) && (charCode != 46)){ return false; } objeto = (objeto) ? objeto : event; if ( key > 31 && (key < 65 || key > 122 ) && (key < 48 || key > 57) && (key != 46) && (key != 32)){ return false; }	return true; }
function keyValidateT(objeto){ var charCode; var key = (objeto.which) ? objeto.which : objeto.keyCode; charCode = objeto.keyCode; if (charCode > 32 && (charCode < 65 || charCode >122) && (charCode < 48 || charCode >57) && (charCode != 46) && (charCode != 44)){ return false; } objeto = (objeto) ? objeto : event; if ( key > 31 && (key < 65 || key > 122 ) && (key < 48 || key > 57) && (key != 46) && (key != 32)){ return false; }	return true; }
function keyValidateN(objeto){ var charCode; var key = (objeto.which) ? objeto.which : objeto.keyCode; charCode = objeto.keyCode; if (charCode > 32 && (charCode < 65 || charCode >122) && (charCode < 48 || charCode >57) && (charCode != 46)){ return false; } objeto = (objeto) ? objeto : event; if ( key > 31 && (key < 65 || key > 122 ) && (key < 48 || key > 57) && (key != 46)){ return false; } if(key == 32) {return false;}	return true; }
function voteTheme(form,tema,tipo){ form.action = "http://www.HHGroups.com/temas.php?votar=true&puntos=" + form.numeroPuntos.value + "&tema=" + tema + "&tipoTema="+tipo; form.submit(); }
function voteMaqueta(form,tema){ form.action = "http://www.HHGroups.com/maquetas.php?votar=true&puntos=" + form.numeroPuntos.value + "&tema=" + tema; form.submit(); }
function voteMaquetaF(form,tema){ form.action = "http://www.HHGroups.com/verMaqueta.php?votar=true&puntos=" + form.numeroPuntos.value + "&tema=" + tema; form.submit(); }
function ordenarPor(form){ form.campoOrdenar.value = form.ordenacion.value; form.submit(); }
function moveHilo(form,accion){ form.action = accion + "&newId=" + form.moverHilo.value; form.submit(); }
function confirmFormTema(form,num){var i; for(i=1;i<=num;i++){ if(document.getElementById('colaboracion'+i+'Ident').value == ""){ alert("Debes rellenar la colaboración "+i+", o borrarla"); return false; }	} if(form.archivo.value == ""){ alert("Debes examinar y seleccionar el archivo en tu disco."); return false; } if(form.uTemaTitulo.value == ""){ alert("Debes rellenar el campo del título del tema."); return false; } if(form.uTemaAutor.value == ""){ alert("Debes rellenar el campo del autor del tema."); return false; } form.action = "http://mp3.hhgroups.com/sysBack.php?action=uploadTema"; setTimeout("upTheme()", 1000); return true; }
function confirmFormBase(form){ if(form.archivo.value == ""){ alert("Debes examinar y seleccionar el archivo en tu disco."); return false; } if(form.uTemaTitulo.value == ""){ alert("Debes rellenar el campo del título del tema."); return false; } if(form.uTemaAutor.value == ""){ alert("Debes rellenar el campo del autor del tema."); return false; } form.action = "http://mp3.hhgroups.com/sysBack.php?action=uploadBase"; setTimeout("upTheme()", 1000); return true; }
function confirmFormVideo(form){ if(form.codigoVideo.value == ""){ alert("Debes pegar el código que aparece en Youtube."); return false; } if(form.uTemaTitulo.value == ""){ alert("Debes rellenar el campo del título del vídeo."); return false; } if(form.descVideo.value == ""){ alert("Debes rellenar el campo descripción del vídeo."); return false; } if(form.cat.value == "0"){ alert("Debes seleccionar la categoría."); return false; } form.action = "http://www.HHGroups.com/sysBack.php?action=uploadVideo"; setTimeout("upTheme()", 1000); return true; }
function confirmFormTemaL(form){ if(form.archivo.value == ""){ alert("Debes examinar y seleccionar el archivo en tu disco."); return false; } if(form.uTemaTituloL.value == ""){ alert("Debes rellenar el campo del título del tema."); return false; } if(form.uTemaAutorL.value == ""){ alert("Debes rellenar el campo del autor del tema."); return false; } form.action = "http://mp3.hhgroups.com/sysBack.php?action=uploadTemaLebuque"; setTimeout("upTheme()", 1000); return true; }
function confirmFormTemaCompeti(form,user){ if(form.archivo.value == ""){ alert("Debes examinar y seleccionar el archivo en tu disco."); return false; } if(form.uTemaTitulo.value == ""){ alert("Debes rellenar el campo del título del tema."); return false; } if(form.uTemaAutor.value == ""){ alert("Debes rellenar el campo del autor del tema."); return false; } if(form.uTemaProductor.value == ""){ alert("Debes rellenar el campo del productor del tema."); return false; } form.uTemaTitulo.disabled = false; form.uTemaProductor.disabled = false; form.action = "http://www.HHGroups.com/sysBack.php?competi=true&usr="+user; setTimeout("upTheme()", 1000); return true; }
function confirmFormGraff(form){ if(form.archivo.value == ""){ alert("Debes examinar y seleccionar el archivo en tu disco."); return false; } if(form.uGraffitiAutor.value == ""){ alert("Debes rellenar el campo del autor del graffiti."); return false; } if(form.uGraffitiCiudad.value == ""){ alert("Debes rellenar el campo de la ciudad donde se ubica el graffiti."); return false; } form.action = "http://mp3.hhgroups.com/sysBack.php?action=uploadGraffiti"; setTimeout("upTheme()", 1000); return true;}
function confirmFormLetra(form){ if(form.textLetra.value == ""){ alert("El campo de Letra es obligatorio."); return false; } if(form.uTemaTitulo.value == ""){ alert("Debes rellenar el campo del título del tema."); return false; } if(form.uTemaAutor.value == ""){ alert("Debes rellenar el campo del autor del tema."); return false; } form.action = "http://www.HHGroups.com/sysBack.php?action=uploadLetra"; return true; }
function confirmFormMaqueta(form){ var caracteres = form.descMaqueta.value; if(form.uTemaTitulo.value == ""){ alert("Debes rellenar el campo del título del tema."); return false; } if(form.uTemaAutor.value == ""){ alert("Debes rellenar el campo del autor del tema."); return false; } if(form.descMaqueta.value == ""){ alert("Debes rellenar el campo del descripción del tema."); return false; } if(form.numTemas.value == ""){ alert("Debes rellenar el campo de número de temas."); return false; } if(caracteres.length<200){ alert("La descripción debe tener como mínimo 200 caracteres."); return false; } form.action = "http://mp3.hhgroups.com/subirMaqueta.php"; return true; }
function confirmPreviewFormLetra(form){ if(form.textLetra.value == ""){ alert("El campo de Letra es obligatorio."); return false; } if(form.uTemaTitulo.value == ""){ alert("Debes rellenar el campo del título del tema."); return false; } if(form.uTemaAutor.value == ""){ alert("Debes rellenar el campo del autor del tema."); return false; } form.action = "http://www.HHGroups.com/uploadLetra.php?previewLetra=1"; form.submit(); return true; }
function upTheme(){ var loadingTheme = "<center><table><tr><td align=left valign=top><img src=img/loading.gif></td><td align=left><font class=fontO>Se está enviando el archivo,<br>esta operación puede tardar algunos segundos...</font></td></tr></table></center>"; upTema.innerHTML = loadingTheme; }
function swap(id){ var cambia = "<input type=text name=posFutura value=''><font> <input type=submit value='Cambiar'>"; alert(cambia); id.innerHTML = cambia; }
function comprovaEncuesta(form){ if(form.pregunta.value == ""){ alert("El campo de pregunta es obligatorio."); return false; } if(form.res1.value == ""){ alert("El campo de la primera opción es obligatorio."); return false; } if(form.res2.value == ""){ alert("El campo de la segunda opción es obligatorio."); return false; } form.action = "http://www.HHGroups.com/addEncuesta.php"; form.submit(); return true; }
function goUpTheme(form,num){var i; for(i=1;i<=num;i++){ if(document.getElementById('colabo'+i+'Ident').value == ""){ alert("Debes rellenar la colaboración "+i+", o borrarla"); return false; }	} if(form.archivo.value == ""){ alert("Debes seleccionar el tema de tu máquina."); return false; } if(form.uTemaTitulo.value == ""){ alert("Debes rellenar el campo del título del tema."); return false; } form.action = "http://mp3.hhgroups.com/sysBack.php?upMaqueta=0&numColabos="+num; setTimeout("upTheme()", 1000); return true; }
function activaConfirm(form){ if(form.mailCg.checked){ form.codeCg.disabled = false; form.emailCg.disabled = false; form.okCg.disabled = false; }else{ form.codeCg.disabled = true; form.emailCg.disabled = true; form.okCg.disabled = true; } return false; }
function aceptarConfirm(form){ if (form.codeCg.value == ""){ alert("Debes insertar el código de confirmación que se te envió por e-mail."); return false; }else if (form.emailCg.value == ""){ alert("Debes insertar el e-mail de confirmación que se te envió por e-mail."); return false; }else{ form.action = "http://www.HHGroups.com/sysBack.php?action=newUser&codigo=" + form.codeCg.value + "&email=" + form.emailCg.value; form.submit(); return true; } }
function aOptions(form,accion,nickUser,idUser){ var pregunta = window.confirm("¿Estás seguro?"); if(accion=="delUser"){ form.action = "http://www.HHGroups.com/sysBack.php?action=borrarUser&nick="+nickUser+"&ident="+idUser; } if(accion=="banUser"){ form.action = "http://www.HHGroups.com/sysBack.php?action=banearUser&nick="+nickUser+"&ident="+idUser; } if(accion=="unbanUser"){ form.action = "http://www.HHGroups.com/sysBack.php?action=desbanearUser&nick="+nickUser+"&ident="+idUser; } if(accion=="levelUser"){ form.action = "http://www.HHGroups.com/sysBack.php?action=cambiarNivel&nick="+nickUser+"&ident="+idUser; } if(pregunta == true){ form.submit(); } }
function aTOptions(form,accion){ var pregunta = window.confirm("¿Estás seguro?"); if(pregunta == true){ form.action = accion; form.submit(); } }
function aPreview(form){ form.action = "http://www.HHGroups.com/newAnswerNew.php?action=aPreview"; form.submit(); }
function cPreview(form){ form.action = "http://www.HHGroups.com/newComent.php?action=cPreview"; form.submit(); }
function cNPreview(form){ form.action = "http://www.HHGroups.com/newNComent.php?action=cPreview"; form.submit(); }
function cVPreview(form){ form.action = "http://www.HHGroups.com/newVComent.php?action=cPreview"; form.submit(); }
function cMPreview(form){ form.action = "http://www.HHGroups.com/newMComent.php?action=cPreview"; form.submit(); }
function cGPreview(form){ form.action = "http://www.HHGroups.com/newGraffitiComent.php?action=cPreview"; form.submit(); }
function cFiPreview(form){ form.action = "http://www.HHGroups.com/newFichaComent.php?action=cPreview"; form.submit(); }
function editCPreview(form){ form.action = "http://www.HHGroups.com/editComent.php?action=cPreview"; form.submit(); }
function mpPreview(form){ form.action = "http://www.HHGroups.com/replyMP.php?action=mpPreview"; form.submit(); }
function tPreview(form){ form.action = "http://www.HHGroups.com/newMP.php?action=aPreview"; form.submit(); }
function threadPreview(form){ form.action = "http://www.HHGroups.com/newThreadNew.php?action=aPreview"; form.submit(); }
function openMP(url){ abrirNuevoMensaje = window.open(url,"", "width=300, height=100"); abrirNuevoMensaje.focus(); }
function openConcert(url){ abrirNuevoMensaje = window.open(url,"", "width=600, height=300"); abrirNuevoMensaje.focus(); }
function openRename(url){ Rename = window.open(url,"", "width=800, height=300"); Rename.focus(); }
function openC(url){ up = window.open(url,"", "width=800, height=220"); up.focus(); }
function comprovaEditCamps(form){ var x=1; pass=1; if(form.editUserPass.value != form.editUserRePass.value){ pass = 0; } if((x==1) && (pass==1)){ form.submit(); return true; }else{ if (x==0){ alert("Debes rellenar los campos obligatorios."); } if(pass==0){ alert("Los 2 Password no coinciden. Revísalos."); } return false; } }
function mpComprovar(form){	if(form.mpReceptor.value==""){ alert("Tienes que indicar para quien es el mensaje."); return false; } if(form.mpTitle.value==""){ alert("No es posible enviar un mensaje sin un título."); return false; } if(form.mpMessage.value==""){ alert("No es posible enviar un mensaje sin cuerpo."); return false; } return true; }
function nComprovar(form,accion){ if(form.answerMessage.value==""){ alert("No es posible enviar una noticia sin titulo."); return false; } if(form.tituloNotice.value==""){ alert("No es posible enviar una noticia sin cuerpo."); return false; } form.action = accion; return true; }
function colComprovar(form,accion){ if(form.urlColabo.value==""){ alert("Falta el link."); return false; } if(form.imagenColabo.value==""){ alert("Falta la imagen."); return false; } if(form.tituloColabo.value==""){ alert("Falta el texto alternativo."); return false; } form.action = accion; return true; }
function compComprovar(form){ if(form.FechaCompeti.value=="00/00/2006"){ alert("No han sido rellenados todos los campos!"); return false; } if(form.PlazoCompeti.value==""){ alert("No han sido rellenados todos los campos!"); return false; } if(form.ProductorCompeti.value==""){ alert("No han sido rellenados todos los campos!"); return false; } if(form.URLBaseCompeti.value==""){ alert("No han sido rellenados todos los campos!"); return false; } return true; }
function enComprovar(form,url){ if(form.newEntrEntr.value==""){ alert("No es posible enviar una entrevista sin Entrevistad@."); return false; } if(form.newEntrImg.value==""){ alert("No es posible enviar una entrevista sin imagen."); return false; } if(form.newEntrText.value==""){ alert("No es posible enviar una entrevista sin cuerpo."); return false; } form.action = url; form.submit(); return true; }
function comprovaCamps(form){ var x=1; pass=1; if(form.newUserName.value == ""){ x=0; } if(form.newUserNick.value == ""){ x=0; } if(form.newUserPass.value == ""){ x=0; } if(form.newUserRePass.value == ""){ x=0; } if(form.newUserEmail.value == ""){ x=0; } if((form.newUserPass.value != form.newUserRePass.value) || (form.newUserPass.value == "") || (form.newUserRePass.value == "")){ pass = 0; } if((x==1) && (pass==1)){ form.submit(); return true; }else{ if (x==0){  alert("Faltan campos por rellenar. Rellénalos."); }if(pass==0){ alert("Los 2 Password no coinciden. Revísalos."); } return false; } }
function comprovaSCamps(form){ var x=1; if(form.sName.value == ""){ x=0; } if(form.sCiudad.value == ""){ x=0; } if(form.sIdSorteo.value == ""){ x=0; } if(form.sApellido1.value == ""){ x=0; } if(form.sApellido2.value == ""){ x=0; } if(form.sEmail.value == ""){ x=0; } if(form.sTipo.value == ""){ x=0; } if(form.sDireccion.value == ""){ x=0; } if(form.sNum.value == ""){ x=0; } if(form.sCP.value == ""){ x=0; } if(form.sPais.value == ""){ x=0; }  if (x==0){  alert("Faltan campos por rellenar. Rellénalos."); return false; }else{ form.submit(); return true; } }
function lostComprova(form){ if((form.lostPasswordUser.value == "") || (form.lostPasswordEmail.value == "")){alert("Debes rellenar los dos campos para que se te envia un nuevo password."); return false; }else{ form.submit(); return true; } }
function comprovaLogin(form){ if((form.username.value == "") || (form.password.value == "")){ alert("No es posible la identificación sin rellenar el campo User/Password"); return false; }else{ form.submit(); return true; } }
function comprovaSearcher(form){ if(form.searchUser.value == ""){ alert("Debes introducir la palabra a buscar"); return false; }else{ form.submit(); return true; } }
function validaPass(form,evt){ evt = (evt) ? evt : event; var key = (evt.which) ? evt.which : evt.keyCode; if (key == 13){ form.submit(); } }
function ponerLink(url,text){tinyMCE.execCommand('mceInsertContent', true, '<a href="'+url+'" rel="nofollow" target="_blank"><font class=fontO><b>'+text+'</b></font></a> ');}
function ponerLinkFollow(url,text){tinyMCE.execCommand('mceInsertContent', true, '<a href="'+url+'" target="_blank"><font class=fontO><b>'+text+'</b></font></a> ');}
function ponerDivAct(text){tinyMCE.execCommand('mceInsertContent', true, '<div align="center" style="border: 1px solid #9fc6d2; background-color: #f0ffff; padding:3px;"><font style="font-size:15px; margin:3px;"><b>'+text+'</b></font></div><br> ');}
function muestraLink(){document.getElementById('addlink').style.visibility = "visible";document.getElementById('addlink').innerHTML="<font>Texto que se muestra: <INPUT type=TEXT id=textLink>";document.getElementById('addlink').innerHTML=document.getElementById('addlink').innerHTML + "<br><font>Enlace NoFollow: <INPUT type=TEXT value=\"http://\" id=urlLink>";document.getElementById('addlink').innerHTML=document.getElementById('addlink').innerHTML + "<INPUT onclick=\"javascript:ponerLink(document.getElementById('urlLink').value,document.getElementById('textLink').value);\" TYPE=Button value=\"Aceptar\">";}
function muestraLinkFollow(){document.getElementById('addlink').style.visibility = "visible";document.getElementById('addlink').innerHTML="<font>Texto que se muestra: <INPUT type=TEXT id=textLink>";document.getElementById('addlink').innerHTML=document.getElementById('addlink').innerHTML + "<br><font>Enlace Follow: <INPUT type=TEXT value=\"http://\" id=urlLink>";document.getElementById('addlink').innerHTML=document.getElementById('addlink').innerHTML + "<INPUT onclick=\"javascript:ponerLinkFollow(document.getElementById('urlLink').value,document.getElementById('textLink').value);\" TYPE=Button value=\"Aceptar\">";}
function muestraDivAct(){document.getElementById('addlink').style.visibility = "visible";document.getElementById('addlink').innerHTML="<font>Texto del div: <INPUT type=TEXT id=textDiv>";document.getElementById('addlink').innerHTML=document.getElementById('addlink').innerHTML + "<INPUT onclick=\"javascript:ponerDivAct(document.getElementById('textDiv').value);\" TYPE=Button value=\"Aceptar\">";}
