// JavaScript Document
if (document.images) {
  var boton1 = new Image();
  var boton11 = new Image();
  var boton2 = new Image();
  var boton22 = new Image();
  var boton3 = new Image();
  var boton33 = new Image();
  var boton4 = new Image();
  var boton44 = new Image();
  var boton5 = new Image();
  var boton55 = new Image();
  var boton6 = new Image();
  var boton66 = new Image();
  var boton7 = new Image();
  var boton77 = new Image();
  var boton8 = new Image();
  var boton88 = new Image();
  var boton9 = new Image();
  var boton99 = new Image();
  boton1.src = "./upload/servicio1.jpg";
  boton11.src = "./upload/servicio1m.jpg";
  boton2.src = "./upload/servicio2.jpg";
  boton22.src = "./upload/servicio2m.jpg";
  boton3.src = "./upload/servicio3.jpg";
  boton33.src = "./upload/servicio3m.jpg";
  boton4.src = "./upload/servicio4.jpg";
  boton44.src = "./upload/servicio4m.jpg";
  boton5.src = "./upload/servicio5.jpg";
  boton55.src = "./upload/servicio5m.jpg";
  boton6.src = "./upload/servicio6.jpg";
  boton66.src = "./upload/servicio6m.jpg";
  boton7.src = "./upload/servicio7.jpg";
  boton77.src = "./upload/servicio7m.jpg";
  boton8.src = "./upload/servicio8.jpg";
  boton88.src = "./upload/servicio8m.jpg";
}
// Carga de imagen cuando el ratón pasa por encima
function entra(boton) {
  if (document.images) {
    if (boton == 'opcion1') {
      document.images[boton].src = boton11.src;
    }
	if (boton == 'opcion2') {
      document.images[boton].src = boton22.src;
    }
	if (boton == 'opcion3') {
      document.images[boton].src = boton33.src;
    }
	if (boton == 'opcion4') {
      document.images[boton].src = boton44.src;
    }
	if (boton == 'opcion5') {
      document.images[boton].src = boton55.src;
    }
	if (boton == 'opcion6') {
      document.images[boton].src = boton66.src;
    }
	if (boton == 'opcion7') {
      document.images[boton].src = boton77.src;
    }
	if (boton == 'opcion8') {
      document.images[boton].src = boton88.src;
    }
  }
}

// Carga de imagen cuando el ratón abandona el área de la imagen
function sale(boton) {
  if (document.images) {
    if (boton == 'opcion1') {
      document.images[boton].src = boton1.src;
	}
	if (boton == 'opcion2') {
      document.images[boton].src = boton2.src;
	}
	if (boton == 'opcion3') {
      document.images[boton].src = boton3.src;
	}
	if (boton == 'opcion4') {
      document.images[boton].src = boton4.src;
	}
	if (boton == 'opcion5') {
      document.images[boton].src = boton5.src;
	}
	if (boton == 'opcion6') {
      document.images[boton].src = boton6.src;
	}
	if (boton == 'opcion7') {
      document.images[boton].src = boton7.src;
	}
	if (boton == 'opcion8') {
      document.images[boton].src = boton8.src;
	}
  }
}

function ConvertAcentos(input) {
	var output = '';
	for (var i = 0; i < input.length; i++) {
		if ((input.charAt(i) == 'á')) {
			output += '&aacute;';
		}else if((input.charAt(i) == 'é')){
			output += '&eacute;';
		}else if((input.charAt(i) == 'í')){
			output += '&iacute;';
		}else if((input.charAt(i) == 'ó')){
			output += '&oacute;';
		}else if((input.charAt(i) == 'ú')){
			output += '&uacute;';
		}else if((input.charAt(i) == 'Á')){
			output += '&Aacute;';
		}else if((input.charAt(i) == 'É')){
			output += '&Eacute;';
		}else if((input.charAt(i) == 'Í')){
			output += '&Iacute;';
		}else if((input.charAt(i) == 'ó')){
			output += '&Oacute;';
		}else if((input.charAt(i) == 'Ú')){
			output += '&Uacute;';
		}else if((input.charAt(i) == 'ñ')){
			output += '&ntilde;';
		}else if((input.charAt(i) == 'Ñ')){
			output += '&Ntilde;';
		}else if ((input.charAt(i) == '©')){
			output += '&copy;';
		}else if((input.charAt(i) == '"')){
			output += '&quot;';
		}else if((input.charAt(i) == '¿')){
			output += '&iquest;';
		}else if((input.charAt(i) == 'º')){
			output += '&deg;';
		}else if((input.charAt(i) == '\'')){
			output += '&#39;';
		}else if((input.charAt(i) == '¡')){
			output += '&iexcl;';
		}else if((input.charAt(i) == '”')){
			output += '&#148;';
		}else if((input.charAt(i) == '“')){
			output += '&#147;';
		}else if((input.charAt(i) == '­')){
			output += '&shy;';
		}else if((escape(input.charAt(i)) == "%u2013")){
			output += '&ndash;';
		}else if((escape(input.charAt(i)) == "%u2014")){
			output += '&mdash;';
		}else if((escape(input.charAt(i)) == "%u2026")){
			output += '&hellip;';
		}else if((input.charAt(i) == 'ü')){
			output += '&uuml;';
		}else if((input.charAt(i) == 'Ü')){
			output += '&Uuml;';
		}else if((input.charAt(i) == 'ª')){
			output += '&ordf;';
		}else if((input.charAt(i) == '«')){
			output += '&laquo;';
		}else if((input.charAt(i) == '»')){
			output += '&raquo;';
		}else if((input.charAt(i) == '’')){
			output += '&rsquo;';
		}else if((input.charAt(i) == '‘')){
			output += '&lsquo;';
		}else {
			output += input.charAt(i);
		}
	}
	return output;
}