function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i'+ ''+pie+'
'+ '  '+ '' ajax.showModal(contenido); } function paginado(orden) { pag_orden=orden; var imgs=document.getElementsByName('img_galerias'); if (orden==0) document.getElementById('img_ant').style.visibility='hidden'; else document.getElementById('img_ant').style.visibility='visible'; if (orden==imgs.length-1) document.getElementById('img_sig').style.visibility='hidden'; else document.getElementById('img_sig').style.visibility='visible'; img=imgs[orden].src.replace('_pq','_gr'); pie=imgs[orden].alt; document.getElementById('img_ampliada').src=img; document.getElementById('img_pie').innerHTML=pie; } function abrirMapa(id) { ajax.showModalURL('/v4/php/map.php?itop='+id,540,460); } function abrirMapaAg(id) { ajax.showModalURL('/v4/php/map.php?iagenda='+id,540,460); } function enviarAmigo(id) { ajax.showModalURL('/v4/php/envio.php?itop='+id,540,460); } function enviarComentario(id) { ajax.showModalURL('/v4/php/comentario.php?itop='+id,540,460); } function enviarAmigoAg(id) { ajax.showModalURL('/v4/php/envio.php?iagenda='+id,540,460); } function enviarMinotodo() { ids=document.getElementById('enviar_minotodo').value; ajax.showModalURL('/v4/php/envio.php?imini='+ids,540,460); } function imprimir(id) { if(document.all) window.open('/v4/php/imprimetelotop.php?itop='+id); else document.getElementById('imprime').src='/v4/php/imprimetelotop.php?itop='+id; } function imprimirAg(id) { if(document.all) window.open('/v4/php/imprimeteloagenda.php?iagenda='+id); else document.getElementById('imprime').src='/v4/php/imprimeteloagenda.php?iagenda='+id; } function abrirVideoPortada() { ajax.showModalURL('/v4/php/video.php',600,380); } function siTeGusta(id) { document.getElementById('gusto').style.display='block'; } function noticiasRelacionadas(id) { document.getElementById('relacionadas').style.display='block'; } //registro function limpiarRegistro(obj,cadena) { if(obj.value==cadena) obj.value=''; } function escribirRegistro(obj,cadena) { if(obj.value=='') obj.value=cadena; } function registrate() { email=document.getElementById('registro_notodo'); if (validaEmail(email)) { window.open('http://www.notodo.com/cgi/php/altasbajasnew.php?site=notodo&email='+email.value); } } function buscar() { var busca=document.getElementById('buscador').value; location.href="/v4/php/busca.php?cadena="+escape(busca); } function validaEmail(obj) { /* comienzo a validar el email si lo hay*/ if(obj.value!="") { var checkTLD=1; var knownDomsPat=/^(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum|cat)$/; var emailPat=/^(.+)@(.+)$/; var specialChars="\\(\\)><@,;:\\\\\\\"\\.\\[\\]"; var validChars="\[^\\s" + specialChars + "\]"; var quotedUser="(\"[^\"]*\")"; var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/; var atom=validChars + '+'; var word="(" + atom + "|" + quotedUser + ")"; var userPat=new RegExp("^" + word + "(\\." + word + ")*$"); var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$"); var matchArray=obj.value.match(emailPat); if (matchArray==null) { alert("La dirección de email parece incorrecta (comprueba @ y .)"); obj.focus(); return false; } var user=matchArray[1]; var domain=matchArray[2]; for (i=0; i127) { alert("El nombre de usuario contiene caracteres incorrectos en la dirección de correo."); obj.focus(); return false; } } for (i=0; i127) { alert("El dominio contiene caracteres incorrectos en la dirección de correo."); obj.focus(); return false; } } if (user.match(userPat)==null) { alert("El nombre de usuario no es válido en la dirección de correo."); obj.focus(); return false; } var IPArray=domain.match(ipDomainPat); if (IPArray!=null) { for (var i=1;i<=4;i++) { if (IPArray[i]>255) { alert("La IP de destino no es válida en la dirección de correo."); obj.focus(); return false; } } return true; } var atomPat=new RegExp("^" + atom + "$"); var domArr=domain.split("."); var len=domArr.length; for (i=0;i'+html+''; document.body.style.height = '100%' $(idventana).style.top = getScrollY() + 'px' /*if(document.all) document.body.style.overflow = 'hidden'; else window.onscroll = function(){ if($(idventana)){ $(idventana).style.top = getScrollY(); } }*/ } // Ventana modal centrada que carga un iframe con el contenido url con ancho y alto this.showModalURL = function(url,ancho,alto){ this.showModal(''); } // Ocultar ventanas modales this.hideModal = function(){ visionCombos('visible'); if($('_ajax_modal2_'+this.id+'_'+indicemodal)){ document.body.removeChild($('_ajax_modal2_'+this.id+'_'+indicemodal)); document.body.removeChild($('_ajax_trans_'+this.id+'_'+indicemodal)); indicemodal--; }else if($('_ajax_modalcontent_'+this.id+'_'+indicemodal)){ document.body.removeChild($('_ajax_modalcontent_'+this.id+'_'+indicemodal)); document.body.removeChild($('_ajax_trans_'+this.id+'_'+indicemodal)); indicemodal--; } if(indicemodal>0 && $('_ajax_modalcontent_'+this.id+'_'+indicemodal)) $('_ajax_modalcontent_'+this.id+'_'+indicemodal).style.top = getScrollY(); } function bgTrans(){ if(!$('_ajax_trans_'+self.id+'_'+indicemodal)) { var modal = document.createElement('DIV'); if(document.all) modal.style.filter = 'Alpha(Opacity=95)'; else modal.style.MozOpacity='0.95'; /* modal.style.backgroundColor = 'transparent'; modal.style.backgroundImage = 'url(/images/px.gif)'; modal.style.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader (src="/images/px.png", sizingMethod="scale")'; */ /* modal.style.backgroundImage = 'url(/images/px.png)'; */ //modal.style.backgroundColor = self.transBgColor; modal.style.position = 'absolute'; //modal.style.height = (document.body.scrollHeight?document.body.scrollHeight:document.documentElement.scrollHeight)+'px'; modal.style.height = '2600px'; modal.style.top = '0px'; modal.style.left = '0px'; modal.style.zIndex = 1000*indicemodal; modal.style.width = '100%'; modal.className = 'ajax_trans'; modal.id = '_ajax_trans_'+self.id+'_'+indicemodal; document.body.appendChild(modal); visionCombos('hidden'); } } function visionCombos(opcion){ if(document.all){ if(indicemodal<=1) var arr = document.getElementsByTagName('select'); else if($('_ajax_modal2_'+self.id+'_'+(indicemodal-1))) var arr = $('_ajax_modal2_'+self.id+'_'+(indicemodal-1)).getElementsByTagName('select'); else if($('_ajax_modalcontent_'+self.id+'_'+(indicemodal-1))) var arr = $('_ajax_modalcontent_'+self.id+'_'+(indicemodal-1)).getElementsByTagName('select'); for(i = 0; i < arr.length; i++) arr[i].style.visibility = opcion; } // También para flash if(document.all) var arr = document.getElementsByTagName('object'); else var arr = document.getElementsByTagName('embed'); for(i = 0; i < arr.length; i++) arr[i].style.visibility = opcion; } function getScrollY(){ var scrollY = 0; if ( document.documentElement && document.documentElement.scrollTop ) { scrollY = document.documentElement.scrollTop; }else if ( document.body && document.body.scrollTop ){ scrollY = document.body.scrollTop; }else if ( window.pageYOffset ){ scrollY = window.pageYOffset; }else if ( window.scrollY ){ scrollY = window.scrollY; } return scrollY; } function $(id){return document.getElementById(id);} // Necesario para poder instanciar la clase en el onreadystatechange self = this; }