var numberOfSeconds = 31

var timeoutObject;
var timePeriod = numberOfSeconds * 1000; // 20 seconds

function resetTimeout()
{
  	x = numberOfSeconds;
}

if ($('clock')) {
	var x = numberOfSeconds
	var y = 1
	function startClock(){

		x = x-y
		$('clock').innerHTML= x + ' seconden';
		timeoutObject = setTimeout("startClock()", 1000);

		if (x==0) { 
			jumpMovie();
			clearTimeout(timeoutObject);
			
			/*
			var scroll = new Fx.Scroll(window, { wait: false, duration: 2500, transition: Fx.Transitions.Quad.easeInOut });
			scroll.toElement('idleVideo');
			*/
			
			var fxCounter = new Fx.Slide('idleCounter', {mode: 'vertical'});
			fxCounter.slideOut();
			
			
		
			
		}
	}

	startClock();

	var fo = new SWFObject("fileadmin/video/player_idle.swf", "player_idle", "350", "197", "8", "#ffffff");
	// need this next line for local testing, it's optional if your swf is on the same domain as your html page
	//fo.addParam("allowScriptAccess", "always");
    var test = '<embed height="197" width="350" flashvars="file=/fileadmin/video/idle.flv&amp;controlbar=none&amp;autostart=true" allowfullscreen="true" allowscriptaccess="always" src="/fileadmin/video/player.swf" name="player2" id="player2" type="application/x-shockwave-flash">'
	fo.write("flashcontent");
    var content = document.getElementById("flashcontent");
    content.innerHTML = test;
}


//once the DOM is ready...
		window.addEvent('domready', function() { 
			//smooooooth scrolling enabled
			new SmoothScroll({ duration:700 }, window); 
		});
		
	
				
	
		
		window.addEvent('load', function() {  
		    
		});















    
  
