<!--

function msieversion() {
	ua = window.navigator.userAgent;
	msie = ua.indexOf( "MSIE " );	retval = 0;
	if ( msie > 0 ) retval = parseFloat ( ua.substring ( msie+5, ua.indexOf ( ";", msie ) ) );
	return  retval;
}

function detectBrowser()	{
	if	( msieversion() < 5.0 )
	{
		str = "U gebruikt een browser die niet wordt ondersteunt door 'Avilas.nl'.\n";
		str += "Avilas.nl is gebouw voor Internet Explorer 5.0 of later.";
		alert( str	);
	}

}

function skipIntro()	{
	if	( msieversion() < 5.0 )
	{
		window.open("avilasmain.html","_top", "");
	}
}

function MouseOver(obj,str)
{
	if	( msieversion()  >= 5.0 )
		obj.className = str + "HoverButton";
}

function MouseOut(obj,str)
{
	if	( msieversion()  >= 5.0 )
		obj.className = str + "FlatButton";
}

function MouseDown(obj,str)
{
	if	( msieversion()  >= 5.0 )
		obj.className = str + "DownButton";
}

function WinLoadImage( ) {
	if	( msieversion()  >= 5.0 )
	{
		str = document.location.search;
		str = str.substr(1);
		MI = document.all("MainImage");
		MI.src = str;
	}
}

var FreeHeight = 0, FreeWidth= 0, DownStop = 0,  InitFinished = false;

function Init( )	{
	if ( InitFinished == false )
	{
		FreeHeight = ( document.body.clientHeight - 350 ) / 2;
		FreeWidth = ( document.body.clientWidth - 568 ) / 2 ;
		DownStop = document.body.clientHeight - FreeHeight -32 ;
		RightStop = document.body.clientWidth - FreeWidth - 188;
		InitFinished = true;
		FreeWidth  -= 20;
		RightStop += 20;
		FreeHeight -= 10;
		DownStop += 10;
	}
}

function MoveUpPart( )	{
	if ( UpPart.style.pixelTop <= FreeHeight )
	{
		UpPart.style.pixelTop += 5;
		retval = true;
	}
	else
		retval = false;
	
	return retval;
}

function MoveDownPart( )	{
	if ( DownPart.style.pixelTop >= DownStop )
	{
		DownPart.style.pixelTop -= 5;
		retval = true;
	}
	else
		retval = false;
		
	return retval;
}

function MoveLeftPart( )	{
	if ( LeftPart.style.pixelLeft <= FreeWidth  )
	{
		LeftPart.style.pixelLeft += 5;
		retval = true;
	}
	else
		retval = false;
		
	return retval;
}

function MoveRightPart( )	{
	if ( RightPart.style.pixelLeft >= RightStop )
	{
		RightPart.style.pixelLeft -= 5;
		retval = true;
	}
	else
		retval = false;
		
	return retval;
}

function AnimateLogo( )	{
	if	( msieversion()  >= 5.0 )
	{
		Init( );
		if ( MoveUpPart( ) == true  || MoveDownPart( ) == true )
	 		setTimeout( "AnimateLogo();", 100 );
		else if ( MoveLeftPart( ) == true || MoveRightPart( ) == true);
			setTimeout( "AnimateLogo();", 100 );
	}
}

function Restart( )	{
	if	( msieversion()  >= 5.0 )
	{
		UpPart.style.pixelTop = -91;
		DownPart.style.pixelTop = document.body.clientHeight;
		LeftPart.style.pixelLeft = -196;
		RightPart.style.pixelLeft  = document.body.clientWidth;
	}
}
-->