/* BLOQUES ANTERIOR SIGUIENTE */

	/*
	function captureLinks(){
		$$('.link_aumenta').each(function(el) {
			el.addEvent('click',function(e) {			
				changeStyle(+1,'');
			})
			
			
		})
		
		$$('.link_disminuye').each(function(el) {
			el.addEvent('click',function(e) {			
				changeStyle(-1,'');
			})
			
			
		})
	}*/
	
	
	function borrar(num){
                seguro = confirm('¿Está seguro de querer borrar el anuncio?');
              
                if(seguro) {
                        //window.location.replace('nuevoLugar.php?borrar=');
                        // o, con prototype.js, por ejemplo:
                        new Request({
                                method: 'get',
                                url: './../../es/services/anuncios',
                                data: 'action=delete&id='+num,
                                onSuccess: function(t) {ocutardiv('anuncio_'+num)},
                                onFailure: function(t) {alert('Error al borrar el archivo, puede que se haya borrado igualmente o haya un error de programación o de comunicación. Inténtelo de nuevo')}
                                }).send();
                }
        }
        
        function ocutardiv(name){
                if (document.getElementById){ //se obtiene el id
                        var el = document.getElementById(name); //se define la variable "el" igual a nuestro div
                        el.style.display = (el.style.display == 'none') ? 'block' : 'none'; //damos un atributo display:none que oculta el div
                }
        }
	
	
	//funcion para el nuevaVentana
	/*
	function reescribirEnlaces(){
	
		className = "nuevaVentana";
		features='toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=no';
	
		if (!document.getElementsByTagName) return;
		var anchorsEnlac = document.getElementsByTagName('a');
		r=new RegExp("(^| )"+className+"($| )");
	
		for (var i=0; i<anchorsEnlac.length; i++) {
			var enlace = anchorsEnlac[i];
			if (r.test(enlace.className)) {			
				enlace.title = enlace.title + " (se abre en una nueva ventana)";
				enlace.onclick = function(){
					window.open(this.href, 'nuevaVentana', features);
					return false;
				}
			}
		}
	}*/

	/*
        window.addEvent('domready', function() {        	
               
	        var cookie = readCookie("style");
                
                if (cookie == null){
			var h = '';
		}
		else {
                        //alert('cookie not null');
                        var title = cookie ? cookie : getPreferredStyleSheet();	
                        //setActiveStyleSheet(title);
                
                }

        	
        });*/

/*window.addEvent('domready', function()
{
   // var cookie = readCookie("style");
    
    //var title = cookie ? cookie : getPreferredStyleSheet();	
    //setActiveStyleSheet(title);
    
    //captureLinks();
	
});*/
