// JavaScript Document
var slideShowSpeed = 4000
var crossFadeDuration = 3
var Pic = new Array()
Pic[0] = '1.jpg'
Pic[1] = '2.jpg'
Pic[2] = '3.jpg'
Pic[3] = '4.jpg'
Pic[4] = '5.jpg'
Pic[5] = '6.jpg'
Pic[6] = '7.jpg'
var t
var j = 0
var p = Pic.length
var preLoad = new Array()
for (i = 0; i < p; i++){
   preLoad[i] = new Image()
   preLoad[i].src = Pic[i]
}

function runSlideShow(){
   if (document.all){
      document.images.SlideShow.style.filter="blendTrans(duration=4)"
      document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.SlideShow.filters.blendTrans.Apply()      
   }
   document.images.SlideShow.src = preLoad[j].src
   if (document.all){
      document.images.SlideShow.filters.blendTrans.Play()
   }
   j = j + 1
   if (j > (p-1)) j=0
   t = setTimeout('runSlideShow()', slideShowSpeed)
}
function CheckForm () { 
	var errorMsg = "";
	if (document.frmEnquiry.firstName.value == ""){
		errorMsg += "\n\tNombre \t\t- Por favor ingrese su nombre";	
	}
	if (document.frmEnquiry.lastName.value == ""){
		errorMsg += "\n\tApellido \t\t- Por favor ingrese su apellido";
	}
	
	if (document.frmEnquiry.asunto.value == ""){
		errorMsg += "\n\tAsunto \t\t- Ingrese un tema para su e-mail";
	}
	if ((document.frmEnquiry.email.value == "") || (document.frmEnquiry.email.value.length > 0 && (document.frmEnquiry.email.value.indexOf("@",0) == - 1 || document.frmEnquiry.email.value.indexOf(".",0) == - 1))) { 
		errorMsg += "\n\tE-mail \t\t- Ingrese una dirección válida de correo";
	}
	if (document.frmEnquiry.enquiry.value == "") { 
 		errorMsg += "\n\tComentarios \t- Usted no ha ingresado sus comentarios aún";
	}
	if (errorMsg != ""){
		msg = "______________________________________________________________\n\n";
		msg += "Su comentario no ha sido enviado. Hay inconvenientes (s) con el formulario.\n";
		msg += "Por favor revíselo y corrija los campos requeridos.\n";
		msg += "______________________________________________________________\n\n";
		msg += "Los siguientes campos necesitan ser corregidos: -\n";
		
		errorMsg += alert(msg + errorMsg + "\n\n");
		return false;
	}
	
	return true;
}// -->