<!--
 function comprobaCampo(campo) { 
 	if(campo.value=="") { 
  	campo.value=campo.defaultValue; 
 	}
}
 function borraCampo(campo) { 
	if (campo.value==campo.defaultValue) { 
  		campo.value=""; 
	} 
} 
function MuestraTexto(texto) {
		if (document.layers){
			document.layers.textoIconos.document.write(texto);
			document.layers.textoIconos.document.close();
		}else if (document.all) {
			textoIconos.innerHTML=texto;
		}else if (document.getElementById) {
			document.getElementById("textoIconos").innerHTML=texto;
		} 
}

function ValidaDatos(){
     var Nombre       = document.formContactar.Nombre.value;
     var lNombre      = Nombre.length;
	 var Localidad       = document.formContactar.Localidad.value;
     var lLocalidad      = Localidad.length;
	 var Provincia       = document.formContactar.Provincia.value;
     var lProvincia      = Provincia.length;
	 var Pais       = document.formContactar.Pais.value;
     var lPais      = Pais.length;
	 var Asunto       = document.formContactar.Asunto.value;
     var lAsunto      = Asunto.length;
     var Email        = document.formContactar.EMail.value;
     var lEmail       = Email.length;    
	 var Consulta     = document.formContactar.Comentarios.value;
     var lConsulta    = Consulta.length;
     var ok = true;
     var cnt = 0;

     if (lNombre==0){
		alert ("Debe introducir el nombre");
      	document.getElementById('Nombre').style.backgroundColor = '#ffff00';
		return false;
	 } else {
		 	document.getElementById('Nombre').style.backgroundColor = '';
     }
	 
	 if (lLocalidad==0){
		alert ("Debe introducir la localidad");
      	document.getElementById('Localidad').style.backgroundColor = '#ffff00';
		return false;
	 } else {
		 	document.getElementById('Localidad').style.backgroundColor = '';
     }
	 
	 if (lProvincia==0){
		alert ("Debe introducir la Provincia");
      	document.getElementById('Provincia').style.backgroundColor = '#ffff00';
		return false;
	 } else {
		 	document.getElementById('Provincia').style.backgroundColor = '';
     }
	 
	 if (lPais==0){
		alert ("Debe introducir el Pais");
      	document.getElementById('Pais').style.backgroundColor = '#ffff00';
		return false;
	 } else {
		 	document.getElementById('Pais').style.backgroundColor = '';
     }
	 
	 if (lAsunto==0){
		alert ("Debe introducir el Asunto");
      	document.getElementById('Asunto').style.backgroundColor = '#ffff00';
		return false;
	 } else {
		 	document.getElementById('Asunto').style.backgroundColor = '';
     }
	 
     if (lEmail==0){
		alert ("Debe introducir un correo electr\ónico");
		document.getElementById('EMail').style.backgroundColor = '#ffff00';
		return false;
     }

    for (var i=0; i<lEmail; i++){
       var oneChar = Email.charAt(i);
       if (oneChar == '@'){
			if (cnt == 0){
				cnt++;
				document.getElementById('EMail').style.backgroundColor = '';
			} else{
				alert ("¡Direcci\ón de correo electr\ónico Inv\álida!");
				document.getElementById('EMail').style.backgroundColor = '#ffff00';
				return false;
			}
		} 
	}

    if (!cnt){
       alert ("¡Direcci\ón de correo electr\ónico Inv\álida!");
	   document.getElementById('EMail').style.backgroundColor = '#ffff00';
       return false;
    } else {
		document.getElementById('EMail').style.backgroundColor = '';
	}
	 
	 
	if (lConsulta==0){
		alert ("Debe introducir una consulta v\álida.");
		document.getElementById('Comentarios').style.backgroundColor = '#ffff00';
		return false;
	}

	return true;
}

function ValidaPresupuesto(){
     var Contratante       = document.formContactar.Contratante.value;
     var lContratante      = Contratante.length;
	 var CIF      		 = document.formContactar.CIF.value;
     var lCIF     		 = CIF.length;
	 var Direccion       = document.formContactar.Direccion.value;
     var lDireccion      = Direccion.length;
	 var Localidad       = document.formContactar.Localidad.value;
     var lLocalidad      = Localidad.length;
	 var CP       		= document.formContactar.CP.value;
     var lCP      		= CP.length;
	 var Provincia       = document.formContactar.Provincia.value;
     var lProvincia      = Provincia.length;
	 var Pais       = document.formContactar.Pais.value;
     var lPais      = Pais.length;
	 var sDireccion       = document.formContactar.sDireccion.value;
     var lsDireccion      = sDireccion.length;
	 var sLocalidad       = document.formContactar.sLocalidad.value;
     var lsLocalidad      = sLocalidad.length;
	 var sTipo       = document.formContactar.sTipo.value;
     var lsTipo      = sTipo.length;
	 var sFecha       = document.formContactar.sFecha.value;
     var lsFecha      = sFecha.length;
	 var sDuracion       = document.formContactar.sDuracion.value;
     var lsDuracion      = sDuracion.length;
	 var sDescripcion       = document.formContactar.sDescripcion.value;
     var lsDescripcion      = sDescripcion.length;
     var Email        = document.formContactar.EMail.value;
     var lEmail       = Email.length;    
     var ok = true;
     var cnt = 0;

     if (lContratante==0){
		alert ("Debe introducir el nombre del contratante");
      	document.getElementById('Contratante').style.backgroundColor = '#ffff00';
		return false;
	 } else {
		 	document.getElementById('Contratante').style.backgroundColor = '';
     }
	 
	 if (lCIF==0){
		alert ("Debe introducir el CIF o NIF del contratante");
      	document.getElementById('CIF').style.backgroundColor = '#ffff00';
		return false;
	 } else {
		 	document.getElementById('CIF').style.backgroundColor = '';
     }
	 
	 if (lDireccion==0){
		alert ("Debe introducir la dirección de facturacion");
      	document.getElementById('Direccion').style.backgroundColor = '#ffff00';
		return false;
	 } else {
		 	document.getElementById('Direccion').style.backgroundColor = '';
     }
	 
	 if (lLocalidad==0){
		alert ("Debe introducir la localidad");
      	document.getElementById('Localidad').style.backgroundColor = '#ffff00';
		return false;
	 } else {
		 	document.getElementById('Localidad').style.backgroundColor = '';
     }
	 
	 if (lCP==0){
		alert ("Debe introducir el codigo postal");
      	document.getElementById('CP').style.backgroundColor = '#ffff00';
		return false;
	 } else {
		 	document.getElementById('CP').style.backgroundColor = '';
     }
	 
	 if (lProvincia==0){
		alert ("Debe introducir la Provincia");
      	document.getElementById('Provincia').style.backgroundColor = '#ffff00';
		return false;
	 } else {
		 	document.getElementById('Provincia').style.backgroundColor = '';
     }
	 
	 if (lPais==0){
		alert ("Debe introducir el Pais");
      	document.getElementById('Pais').style.backgroundColor = '#ffff00';
		return false;
	 } else {
		 	document.getElementById('Pais').style.backgroundColor = '';
     }
	 
	 if (lsDireccion==0){
		alert ("Debe introducir la direccion del servicio");
      	document.getElementById('sDireccion').style.backgroundColor = '#ffff00';
		return false;
	 } else {
		 	document.getElementById('sDireccion').style.backgroundColor = '';
     }
	 
	 if (lsLocalidad==0){
		alert ("Debe introducir la poblacion del servicio");
      	document.getElementById('sLocalidad').style.backgroundColor = '#ffff00';
		return false;
	 } else {
		 	document.getElementById('sLocalidad').style.backgroundColor = '';
     }
	 
	 if (lsTipo==0){
		alert ("Debe introducir el tipo de servicio");
      	document.getElementById('sTipo').style.backgroundColor = '#ffff00';
		return false;
	 } else {
		 	document.getElementById('sTipo').style.backgroundColor = '';
     }
	 
	 if (lsFecha==0){
		alert ("Debe introducir la fecha del servicio");
      	document.getElementById('sFecha').style.backgroundColor = '#ffff00';
		return false;
	 } else {
		 	document.getElementById('sFecha').style.backgroundColor = '';
     }
	 
	 if (lsDuracion==0){
		alert ("Debe introducir la duracion del servicio");
      	document.getElementById('sDuracion').style.backgroundColor = '#ffff00';
		return false;
	 } else {
		 	document.getElementById('sDuracion').style.backgroundColor = '';
     }
	 
	 if (lsDescripcion==0){
		alert ("Debe introducir una descripcion del servicio");
      	document.getElementById('sDescripcion').style.backgroundColor = '#ffff00';
		return false;
	 } else {
		 	document.getElementById('sDescripcion').style.backgroundColor = '';
     }
	 
     if (lEmail==0){
		alert ("Debe introducir un correo electr\ónico");
		document.getElementById('EMail').style.backgroundColor = '#ffff00';
		return false;
     }

    for (var i=0; i<lEmail; i++){
       var oneChar = Email.charAt(i);
       if (oneChar == '@'){
			if (cnt == 0){
				cnt++;
				document.getElementById('EMail').style.backgroundColor = '';
			} else{
				alert ("¡Direcci\ón de correo electr\ónico Inv\álida!");
				document.getElementById('EMail').style.backgroundColor = '#ffff00';
				return false;
			}
		} 
	}

    if (!cnt){
       alert ("¡Direcci\ón de correo electr\ónico Inv\álida!");
	   document.getElementById('EMail').style.backgroundColor = '#ffff00';
       return false;
    } else {
		document.getElementById('EMail').style.backgroundColor = '';
	}
	 
	 
	if (lConsulta==0){
		alert ("Debe introducir una consulta v\álida.");
		document.getElementById('Comentarios').style.backgroundColor = '#ffff00';
		return false;
	}

	return true;
}



menucatalogo = function() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("categorias-bloque");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" on";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" on", "");
				}
			}
		}
	}
}
var idobj
var rutaImg
function cambiaRuta(id,rutaImg){
	window.document.getElementById(id).src=rutaImg;
}

function objetoAjax(){  
        var xmlhttp=false;  
        try  
        {  
            xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");  
        } 
        catch(e) 
        {  
            try 
            {  
                xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");  
            }  
            catch(E) { xmlhttp=false; } 
        } 
        if (!xmlhttp && typeof XMLHttpRequest!='undefined') { xmlhttp=new XMLHttpRequest(); }  
        return xmlhttp;  
    } 
 //-->
