function fnGoToContact() {
document.location.href="contact_steyl.php";
}

function fnBackToMenu() {
document.location.href = "menu_page.php";
}


function fnShowThis(fldValue) {
document.all.display.innerHTML = "<img src = 'images/" + fldValue + ".jpg' border='0'>";
}

function fnShowBlank() {
document.all.display.innerHTML = "";
}

function fnValidate() {
var form = document.frmContact;
var re = /^[a-zA-Z]+([a-zA-Z0-9\-\._])*@[a-zA-Z0-9\-_]+(\.[a-zA-Z0-9\-_]+)*\.[a-zA-Z]{2,3}$/;
var re2 = /^[A-Z]{2}$/;
var re3 = /^[0-9-]{5,10}$/;
	if (form.txtName.value == "") {
	alert("Please provide your name.");
	form.txtName.focus();
	return false;
	}
	
	if (form.txtEmail.value == "") {
	alert("Please provide your email address.");
	form.txtEmail.focus();
	return false;
	}	
	else {
		if (!re.test(form.txtEmail.value)) {
		alert("Please provide a valide email address.");
		form.txtEmail.select();
		return false;
		}
	}
	if (form.txtMessage.value == "") {
	alert("Please enter a message to proceed.");
	form.txtMessage.focus();
	return false;
	}
	
form.hdnStage.value = "1";
form.submit();
}



// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 3000

// Duration of crossfade (seconds)
var crossFadeDuration = 2

// Specify the image files
var slide = new Array() // don't touch this
// to add more images, just continue the pattern, adding to the array below

slide[0] = "images/steyl_logo_01.jpg";
slide[1] = "images/steyl_logo_02.jpg";
slide[2] = "images/steyl_logo_05.jpg";


var t;
var j = 0;
var p = slide.length;

var preLoad = new Array();
for (i = 0; i < p; i++) {
   preLoad[i] = new Image();
   preLoad[i].src = slide[i];
}

function runSlideShow() {
   if (document.all) {
	  document.images.SlideShow.style.filter="blendTrans(duration=2)";     
      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 = 2;    // this stops the fade after one rotation
// 		j = 0;    // this lets the fade rotate continually
  	}
   	
   t = setTimeout('runSlideShow()', slideShowSpeed);
}
