function opacity(id, opacStart, opacEnd, millisec) {
	//speed for each frame
	var speed = Math.round(millisec / 100);
	var timer = 0;

	//determine the direction for the blending, if start and end are the same nothing happens
	if(opacStart > opacEnd) {
		for(i = opacStart; i >= opacEnd; i--) {
			setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
			timer++;
		}
	} else if(opacStart < opacEnd) {
		for(i = opacStart; i <= opacEnd; i++)
			{
			setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
			timer++;
		}
	}
}

//change the opacity for different browsers
function changeOpac(opacity, id) {
	var object = document.getElementById(id).style; 
	object.opacity = (opacity / 100);
	object.MozOpacity = (opacity / 100);
	object.KhtmlOpacity = (opacity / 100);
	object.filter = "alpha(opacity=" + opacity + ")";
}

function shiftOpacity(id, millisec) {
	//if an element is invisible, make it visible, else make it ivisible
	if(document.getElementById(id).style.opacity == 0) {
		opacity(id, 0, 100, millisec);
	} else {
		opacity(id, 100, 0, millisec);
	}
}

function blendimage(divid, imageid, imagefile, millisec) {
	var speed = Math.round(millisec / 100);
	var timer = 0;
	
	//set the current image as background
	document.getElementById(divid).style.backgroundImage = "url(" + document.getElementById(imageid).src + ")";
	
	//make image transparent
	changeOpac(0, imageid);
	
	//make new image
	document.getElementById(imageid).src = imagefile;

	//fade in image
	for(i = 0; i <= 100; i++) {
		setTimeout("changeOpac(" + i + ",'" + imageid + "')",(timer * speed));
		timer++;
	}
}

function currentOpac(id, opacEnd, millisec) {
	//standard opacity is 100
	var currentOpac = 100;
	
	//if the element has an opacity set, get it
	if(document.getElementById(id).style.opacity < 100) {
		currentOpac = document.getElementById(id).style.opacity * 100;
	}

	//call for the function that changes the opacity
	opacity(id, currentOpac, opacEnd, millisec)
}


    var xpos1=-320;
    var Id1=0;

 function movemenu1(){
xpos1++;
xpos1++;
xpos1++;
if(document.layers){
document.mainpage.top=xpos1;
}
if(document.getElementById){
document.getElementById("mainpage").style.top=xpos1+"px";
}
if (xpos1>= 20){
window.clearTimeout(Id1);Id1=0;
}else{
Id1 = window.setTimeout("movemenu1();",1);
}
}
    

 function movemenu2(){

if(document.layers){
document.mainpage.top=xpos2;
}
if(document.getElementById){
document.getElementById("mainpage").style.top=-374+"px";
}

}



function go() {
	 movemenu1();
setTimeout("opacity('test',1,100 ,1000)",3200);

}
function goback() {
opacity('test',100,0 ,1000)
setTimeout("movemenu2()",1800);
}
function CheckContactForm() {
	 	


			if(document.mailform.vname.value == ""){
				alert('U heeft geen naam ingevoerd');
				
			} 
			
			if(document.mailform.aname.value == ""){
				alert('U heeft geen achternaam ingevoerd');
				
			} 
			
			if(document.mailform.email.value == ""){
				alert('U heeft geen emailadres ingevoerd');
				
			} 
			
			if(document.mailform.phone.value == ""){
				alert('U heeft geen telefoonnummer ingevoerd');
				
			} 
			else {
				document.mailform.submit();
			}
		
			
}

function RunFlashBanner()
{
   document.write('<param name="allowScriptAccess" value="sameDomain" />\n');
document.write('<param name="wmode" value="transparent">          \n');
document.write('<param name="movie" value="banner_lease.swf" />  \n');
document.write('<param name="quality" value="high" />     \n');
document.write('<embed src="banner_lease.swf" quality="high" wmode="transparent" width="400" height="84" name="banner_lease" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n');
document.write('</object>\n');
}

function RunFlashBannerVespa()
{
   document.write('<param name="allowScriptAccess" value="sameDomain" />\n');
document.write('<param name="wmode" value="transparent">          \n');
document.write('<param name="movie" value="banner_vespa.swf" />  \n');
document.write('<param name="quality" value="high" />     \n');
document.write('<embed src="banner_vespa.swf" quality="high" wmode="transparent" width="400" height="84" name="banner_vespa" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n');
document.write('</object>\n');
}
	
function RunFlashClock()
{
  document.write(' <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="120" height="40" id="klok-digitaal" align="middle">\n');
document.write('<param name="allowScriptAccess" value="sameDomain" />\n');
document.write('<param name="wmode" value="transparent">       \n');
document.write('<param name="movie" value="klok-digitaal.swf" />\n');
document.write('<param name="quality" value="high" />\n');
document.write('<embed src="klok-digitaal.swf" quality="high" wmode="transparent" width="120" height="40" name="klok-digitaal" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n');
document.write('</object>\n');
}


