	
	// WebSite Name ------------------------------------------------------------------------------------------------------------------------------ //
	// Ajax.js ----------------------------------------------------------------------------------------------------------------------- by: muriLLo //
	
	// Object Ajax ------------------------------------------------------------------------------------------------------------------------------- //
	var obXHR;
	try {
		obXHR=new XMLHttpRequest();
	} catch(err) {
		try {
			obXHR=new ActiveXObject("Msxml2.XMLHTTP");
		} catch(err) {
			try {
				obXHR=new ActiveXObject("Microsoft.XMLHTTP");
			} catch(err) {
				obXHR=false;
			}
		}
	}
	
	// Delete Section ---------------------------------------------------------------------------------------------------------------------------- //
	function delSub(id){
		if (confirm("Está seguro que desea eliminar este apartado ? Se eliminarán también sus subapartados.")){
				
			obXHR.open("GET", "../admin/php/ajaxOut.php?delSub="+true+"&id="+id);
			obXHR.onreadystatechange = function() {
				if (obXHR.readyState == 4 && obXHR.status == 200)
					window.location.href=window.location.href;
			}
			obXHR.send(null);
		}
	}
	
	// Delete SubSection ------------------------------------------------------------------------------------------------------------------------- //
	function delSub2(id){
		if (confirm("Está seguro que desea eliminar este subapartado ? ")){
				
			obXHR.open("GET", "../admin/php/ajaxOut.php?delSub2="+true+"&id="+id);
			obXHR.onreadystatechange = function() {
				if (obXHR.readyState == 4 && obXHR.status == 200)
					window.location.href=window.location.href;
			}
			obXHR.send(null);
		}
	}
	
	// Delete new -------------------------------------------------------------------------------------------------------------------------------- //
	function delNew(id){
	
		if (confirm("Está seguro que desea eliminar esta noticia ?")){
				
			obXHR.open("GET", "../admin/php/ajaxOut.php?delNew="+true+"&new="+id);
			obXHR.onreadystatechange = function() {
				if (obXHR.readyState == 4 && obXHR.status == 200)
					window.location.href=window.location.href;
			}
			obXHR.send(null);
		}
	}
	
	function contactar(){
		
		var nombre = document.getElementById("nombre").value;
		var empresa = document.getElementById("empresa").value;
		var direccion = document.getElementById("direccion").value;
		var poblacion = document.getElementById("poblacion").value;
		var provincia = document.getElementById("provincia").value;
		var cp = document.getElementById("cp").value;
		var pais = document.getElementById("pais").value;
		var email = document.getElementById("email").value;
		var tel = document.getElementById("tel").value;
		var fax = document.getElementById("fax").value;
		
		var div = document.getElementById("resultadoContacto");
		
		if ( nombre == '' || email == '' || tel == '')
			alert("Es necesario rellenar los campos marcados con *");
		else {
			obXHR.open("GET", "php/ajaxOut.php?contacto="+true+"&nombre="+nombre+"&empresa="+empresa+"&direccion="+direccion+"&poblacion="+poblacion+"&provincia="+provincia+"&cp="+cp+"&pais="+pais+"&email="+email+"&tel="+tel+"&fax="+fax);
			obXHR.onreadystatechange = function() {
				if (obXHR.readyState == 4 && obXHR.status == 200)
					div.innerHTML=obXHR.responseText;
			}
			obXHR.send(null);
		}
	}