function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		fondomf_03_over = newImage("imagenes/fondomf_03-over.jpg");
		fondomf_04_over = newImage("imagenes/fondomf_04-over.jpg");
		fondomf_05_over = newImage("imagenes/fondomf_05-over.jpg");
		fondomf_06_over = newImage("imagenes/fondomf_06-over.jpg");
		fondomf_07_over = newImage("imagenes/fondomf_07-over.jpg");
		preloadFlag = true;
	}
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function validar1() {
var errors="";
  if (document.consulta.nombre.value==""){errors += '- Nombre es un dato obligatorio.\n'; }
  if (document.consulta.email.value=="" && document.consulta.telefono.value==""){errors += '- Si no introduce e-mail debe introducir teléfono.\n'; }
  if (document.consulta.email.value!="" && document.consulta.email.value.indexOf('@')==-1){errors += '- Introduzca una dirección de e-mail correcta.\n'; }
  if (isNaN(document.consulta.telefono.value)){errors += '- Teléfono debe ser un dato numérico.\n'; }
  if (document.consulta.marca.value==""){errors += '- Marca es un dato obligatorio.\n'; }
  if (document.consulta.modelo.value==""){errors += '- Modelo es un dato obligatorio.\n'; }
  if (errors!="") {
  alert('El formulario tiene los siguientes errores:\n'+errors);
  document.MM_returnValue = (errors == '');
 }
 else { alert('Va a proceder a enviar su consulta.\nPulse Aceptar para confirmar.');document.MM_returnValue = (errors == '');}

}