
function isEmailAddress(theElement)
{
var s = theElement;
var filter=/^[A-Za-z][A-Za-z0-9_.-]*@[A-Za-z0-9_-]+\.[A-Za-z0-9_.]+[A-za-z]$/;
if (s.length == 0 ) return true;
   if (filter.test(s))
      return true;
   else
     alert("Introduzca una direccion de correo válida.");
//theElement.focus();
return false;
}

/*Validar formulario contacto*/						
function validarcontacta() 
	{ 
		var f = document.getElementById('solicitud'); 
		var d=true;
		var c=new Array(7);
		for (x=0;x<7;x++){c[x]='';}
		var i=0;
		
		<!--// Validar nombre //--> 
		if (f.nombre.value == 'Escriba su nombre' ||f.nombre.value == '' ) 
				{ c[0]='\r ·Nombre';d=false;i=i+1;} 
			
		<!--// Validar apellidos //--> 
		if (f.apellidos.value == 'Escriba sus apellidos' ||f.apellidos.value == '' ) 
				{ c[1]='\r ·Apellidos';d=false;i=i+1;} 
		
		<!--// Validar posición laboral //--> 
		if (f.posicion.value == 'Escriba su puesto actual' ||f.posicion.value == '' ) 
				{ c[2]='\r ·Posición laboral';d=false;i=i+1;} 
				
		<!--// Validar e-mail //--> 
		if (f.email.value == 'E-mail de contacto' ||f.email.value == '' ) 
				{ c[3]='\r ·E-mail';d=false;i=i+1;} 
	
		<!--// Validar nombre empresa //--> 
		if (f.empresa.value == 'Nombre de su empresa' ||f.empresa.value == '' ) 
				{ c[4]='\r ·Nombre empresa';d=false;i=i+1;} 
				
		<!--// Validar asunto del mensaje //--> 
		if (f.asunto.value == 'Tema de su consulta' ||f.asunto.value == '' ) 
				{ c[5]='\r ·Asunto';d=false;i=i+1;}
				
		<!--// Validar mensaje //--> 
		if (f.mensaje.value == 'Mensaje' ||f.mensaje.value == '' ) 
				{ c[6]='\r ·Mensaje';d=false;i=i+1;}	
		
		<!--// Comprobar si hay campos sin rellenar y avisar //--> 	
		if(d==false){
			if(i==1){alert('Debe rellenar el campo: '+c[0]+c[1]+c[2]+c[3]+c[4]+c[5]+c[6]);}
			else{alert('Debe rellenar los campos: '+c[0]+c[1]+c[2]+c[3]+c[4]+c[5]+c[6]);}
			}		
		return d; 
	} 
		
/**
 * OnClick v1.0 - Accessible Onclick Javascript
 * (c) 2008 Alejandro Arco <http://www.alejandroarco.es>
 * MIT-style license
 */
function e(y){y.setAttribute('name','onclick');y.setAttribute('href','#onclick');var o,i,f,p,r='';o=y.getAttribute('rel');i=o.indexOf('[')+1;f=o.indexOf(']');p=o.substring(i,f).split(',');for(i=0;i<p.length;i++){if(i==0)r+=p[i]+'(';else if(i==1)r+=p[i];else r+=','+p[i];if(i==p.length-1)r+=')'}eval(r);}var s=function(){if(!document.getElementsByTagName)return null;var x,i,y,o;x=document.getElementsByTagName('a');for(i=0;i<x.length;i++){y=x[i];o=y.getAttribute('rel');if(o!=''&&o!=null&&o.indexOf('onclick[')==0)y.onclick=function(){e(this);return false;}}return true;}
var a,b;a=window.attachEvent;b=window.addEventListener;if(document.all&&a)a('onload',s);else if(b)b('load',s,false)
	
	
	