function ContactoEP(persona,horarios,mail,web,telefono,elemento){
	this.persona = persona;
	this.horarios = horarios;
	this.mail = mail;
	mailx = mail;
	this.web = web;
	this.elemento = elemento;
	this.telefono = telefono;
	telefonox = telefono;
	
	this.isIe = function(){
		var gko = navigator.userAgent.toLowerCase();
		if (gko.indexOf('gecko')!=-1){ //si soporta gecko, es Mozilla, Netscape, Safari, etc
			return false;//elemento.setAttribute('onclick','alert("hola");ret urn false');//hacemos el setAttribute normalmente
		}else{ //es I Explroer
			return true;//elmento['onclick']=new Function('alert("hola");return false;');//creamos en setAttribute de esta forma
		}
	}
	
	var div = elemento.parentNode;
	this.div = div;
		
		var divContacto = document.createElement('div'); // div
			(this.isIe)?divContacto.className='rContacto':divContacto.setAttribute('class','rContacto');
			
			var tCerrar = document.createTextNode('cerrar');
			var aCerrar = document.createElement('a'); // boton cerrar
				aCerrar.setAttribute('href','#');
				(this.isIe)?aCerrar.className='cerrar':aCerrar.setAttribute('class','cerrar');
				aCerrar.obj = this;
				aCerrar.onclick = function(){
					var eliminar = this.obj.div.getElementsByTagName('div')[0];
						this.obj.div.removeChild(eliminar);
						return false;
				}
				aCerrar.appendChild(tCerrar);
			
			var textContacto = document.createTextNode('PERSONA DE CONTACTO');
			var contacto = document.createElement('h4');
				contacto.appendChild(textContacto);
			var pTContacto = document.createTextNode(this.persona);
			var pContacto = document.createElement('p');
				pContacto.appendChild(pTContacto);


			var textHorario = document.createTextNode('HORARIO DE ATENCIÓN AL PÚBLICO');
			var horario = document.createElement('h4');
				horario.appendChild(textHorario);
			var pTHorario = document.createTextNode(this.horarios);
			var pHorario = document.createElement('p');
				pHorario.appendChild(pTHorario);
			
			var textMail = document.createTextNode(this.mail);
			var mail = document.createElement('a'); // boton cerrar
				mail.setAttribute('href','mailto:' + this.mail);
				(this.isIe)?mail.className='btnLinkFlecha mailAndWeb bC1':mail.setAttribute('class','btnLinkFlecha mailAndWeb');
				mail.appendChild(textMail);			
				
			var textWeb = document.createTextNode(this.web);
			var web = document.createElement('a');
				(this.isIe)?web.className='btnLinkFlecha mailAndWeb bC1':web.setAttribute('class','btnLinkFlecha mailAndWeb');
				web.setAttribute('target','_Blank');
				web.setAttribute('href',this.web);
				web.appendChild(textWeb);
			
			var webYMail = document.createElement('p');
				webYMail.appendChild(mail);
				webYMail.appendChild(web);	
			
			var textTelefono = document.createTextNode(this.telefono);
			var telefono = document.createElement('a'); // boton cerrar
//				telefono.setAttribute('href','#');
				(this.isIe)?telefono.className='cerrar telefono':telefono.setAttribute('class','cerrar telefono');
				telefono.obj = this;
/*				telefono.onclick = function(){
					this.innerHTML = telefonox;
					this.removeAttribute('href');
					return false;
				}
*/				telefono.appendChild(textTelefono);


			divContacto.appendChild(aCerrar);
			divContacto.appendChild(contacto);
			divContacto.appendChild(pContacto);
			divContacto.appendChild(horario);
			divContacto.appendChild(pHorario);
			divContacto.appendChild(webYMail);
			divContacto.appendChild(telefono);
			
			div.appendChild(divContacto);
//			alert (divContacto);
			
}




	

