//funcion contra el spam
function antispam(cuenta,clase)
{
	var dominio = "cemalsa.com"
	document.write("<a class='"+ clase +"' href=\"mailto:" + cuenta + "@" + dominio + "\">" + cuenta + "@" + dominio + "</a>");
}

//desplegar botones y formularios
function desplegarbotones(accion){
    var botonera,formu1,formu2
	var b1,b2
    botonera = document.getElementById("botonera_formularios");
    formu1 = document.getElementById("formulario1");
    formu2 = document.getElementById("formulario2");  
	b1 = document.getElementById("bot1");  
	b2 = document.getElementById("bot2");
	
    if (accion =="abrir1"){
        //botonera.style.display = 'none';
		b1.src = "imagenes/boton_formulariocontacto_off.png";
		b2.src = "imagenes/boton_trabaja.png";
        formu1.style.display = '';
        formu2.style.display = 'none';
    }
	
	if (accion =="abrir2"){
        //botonera.style.display = 'none';
		b1.src = "imagenes/boton_formulariocontacto.png";
		b2.src = "imagenes/boton_trabaja_off.png";
        formu1.style.display = 'none';
        formu2.style.display = '';
    }
}

function fecha(){
	var mydate=new Date();
	var year=mydate.getYear();
	if (year < 1000)
		year+=1900;
	var day=mydate.getDay();
	var month=mydate.getMonth();
	var daym=mydate.getDate();
	if (daym<10)
	daym="0"+daym;
	var dayarray=new Array("Domingo","Lunes","Martes","Miercoles","Jueves","Viernes","Sábado");
	var montharray=new Array("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre");
	document.write( daym + " " + montharray[month] + "." + year + ".");
}
function hora(){
	if (!document.layers&&!document.all&&!document.getElementById)
	return
	var Digital=new Date()
	var hours=Digital.getHours()
	var minutes=Digital.getMinutes()
	var seconds=Digital.getSeconds()
	var dn="AM" 
	/*if (hours>12){
	dn="PM"
	hours=hours-12
	}*/
	/*if (hours==0)
	hours=12*/
	if (minutes<=9)
	minutes="0"+minutes
	if (seconds<=9)
	seconds="0"+seconds
	//change font size here to your desire
	myclock=hours+":"+minutes+":"+seconds
	if (document.layers){
	document.layers.liveclock.document.write(myclock)
	document.layers.liveclock.document.close()
	}
	else if (document.all)
	liveclock.innerHTML=myclock
	else if (document.getElementById)
	document.getElementById("liveclock").innerHTML=myclock
	setTimeout("hora()",1000)
}	

