/***********************************************
 copyright : (C) 2009 - DesignBox ShopSoft      
 Web: www.designbox.nl  Mail: info@designbox.nl 
 change date : 27 - 04- 2011                    
 **********************************************/

// Roll overs people.
function SwapImage_1() {
document.image_1.src="jpg/expertise_webdesign_2.jpg"
}
 
function SwapImage_1Back() {
document.image_1.src="jpg/expertise_webdesign_1.jpg"
}

//************************

function SwapImage_2() {
document.image_2.src="jpg/cms_webdesign_2.jpg"
}
 
function SwapImage_2Back() {
document.image_2.src="jpg/cms_webdesign_1.jpg"
}

//************************

function SwapImage_3() {
document.image_3.src="jpg/creativiteit_webdesign_2.jpg"
}
 
function SwapImage_3Back() {
document.image_3.src="jpg/creativiteit_webdesign_1.jpg"
}

//************************

function SwapImage_4() {
document.image_4.src="jpg/serieuze_e-commerce_2.jpg"
}
 
function SwapImage_4Back() {
document.image_4.src="jpg/serieuze_e-commerce_1.jpg"
}

/* =============================================== SLIDESHOW =============================================== */

name="SlideShow"

var SlideShowSpeed = 3000
var crossFadeDuration = 5
var Pic = new Array()

Pic[0] = 'jpg/slide_1.jpg'
Pic[1] = 'jpg/slide_2.jpg'
Pic[2] = 'jpg/slide_3.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=2)"
      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)
}

/* =============================================== CONTACT FORM CHECK =============================================== */

function checkNaam(oForm){
	if(oForm.naam.value=="") {
		alert("Vul a.u.b. uw naam in.");
		oForm.naam.focus();
		return false;
	} return true;
}

function checkMail(oForm){
	if(oForm.email.value==""){
		alert("Vul a.u.b. uw emailadres in.");
		oForm.email.focus();
		return false;
	}
	if(oForm.email.value.indexOf('@')==-1 || oForm.email.value.indexOf('@')==0 || oForm.email.value.indexOf('@')==(oForm.email.value.length-1)){
		alert("Het emailadres is niet correct, probeer het nog eens.");
		oForm.email.focus();
		return false;
	}
	if(oForm.email.value.indexOf('.')==-1 || oForm.email.value.indexOf('.')==0 || oForm.email.value.indexOf('.')==(oForm.email.value.length-1)){
		alert("Het emailadres is niet correct, probeer het nog eens.");
		oForm.email.focus();
		return false;
	}
	return true;
}

function checkContactpersoon(oForm){
	if(oForm.contactpersoon.value=="") {
		alert("Vul a.u.b. de contactpersoon in.");
		oForm.contactpersoon.focus();
		return false;
	} return true;
}

function checkNorobot(oForm){
	if(oForm.norobot.value=="") {
		alert("Vul a.u.b. de anti spam code in.");
		oForm.norobot.focus();
		return false;
	} return true;
}

function Verstuur(oForm){
	if(!checkNaam(oForm)) return false;
	if(!checkMail(oForm)) return false;
	if(!checkContactpersoon(oForm)) return false;
	if(!checkNorobot(oForm)) return false;
	return true;
}
