function loadMovie(movie) {
	if (movie == 1) {
		movie = "/flash/filmpjes_NiQuitin10.swf";
	}
	else if (movie == 2) {
		movie = "/flash/filmpjes_Love-Stinks.swf";
	}
	else if (movie == 3) {
		movie = "/flash/filmpjes_cheat.swf";
	}
	else if (movie == 4) {
		movie = "/flash/filmpjes_Split-Personality.swf";
	}
	
	var flashvars = {};
	var params = {
			wmode: "transparent"
	};
	var attributes = {};
	swfobject.embedSWF(movie, "filmpje", "550", "400", "9.0.0", "/flash/expressInstall.swf", flashvars, params, attributes);
	return false;
}

function printResult() {
	var disp_setting = "toolbar=yes,location=no,directories=yes,menubar=yes,scrollbars=yes,width=650,height=600,left=100,top=25"; 
	var content_vlue = $("#stoptestCompleteResult").html(); 
	
	var docprint = window.open("", "", disp_setting); 
	docprint.document.open(); 
	docprint.document.write('<html><head><title>Stoppen met Roken met NiQuitin: Stoptest</title><link type="text/css" rel="stylesheet" href="/css/stoptest.css"'); 
	docprint.document.write('</head><body onload="window.print()">');          
	docprint.document.write(content_vlue);          
	docprint.document.write('</body></html>'); 
	docprint.document.close(); 
	docprint.focus(); 
}

$(document).ready(function() {
	$(".top ul li.cur").children("ul").css("left", "10px").show();
	$(".top ul li.cur").children(":first-child").css("color", "#0095d8");
	
	// Author - Tommy Cheung
	$(".top ul li").hover(function() {
		if (this.className.indexOf("cur") == -1) {
			getCurrent = $(this).parent().children("li.current:eq(0)");
			if (this.className.indexOf("top") != -1) {
				$(this).children("a:eq(0)").css("color","#00447a");
			}
			else {
				$(this).children("a:eq(0)").css("color","#00447a");
			}
			
			if (getCurrent = 1 ) {
				$(this).parent().children("li.cur:eq(0)").children("ul").hide();;
			}
			
			$(this).children("ul:eq(0)").css("left", "10px").show();
		}
	},
	function() {
		if (this.className.indexOf("cur") == -1) {
			getCurrent = $(this).parent().children("li.cur:eq(0)");
			if(this.className.indexOf("top") != -1) {
				$(this).children("a:eq(0)").css("color","#00447a");
			}
			else {
				$(this).children("a:eq(0)").css("color","#00447a");
			}
			
			if (getCurrent = 1 ) {
				$(this).parent().children("li.cur:eq(0)").children("ul").show();;
			}
			
			$(this).children("ul:eq(0)").css("left", "-99999px").hide();
		}
	});

	$("#slider").easySlider({
		prevText: '',
		nextText: '',
		orientation: 'horizontal'
	});
	
	// Zelftesten
	if (document.location.href.indexOf("/zelftest.aspx?") > 0) {
		var testId = $(document).getUrlParam("test");
		if (testId == "30" || testId == "31" || testId == "33" || testId == "34") {
			$("#zelftestFrame").attr("src", "http://gsk-niquitin.gezondheid.exed.nl/tests/?testid=" + testId);
		}
		else {
			window.location = "/index.aspx";
		}
	}
	
	// Tem de beesten
	$("#btnGame img").hover(function() {
		$(this).attr("src", "../images/tdb-speeldegame-mo.gif");
	},
	function() {
		$(this).attr("src", "../images/tdb-speeldegame.gif");
	});
	
	// Stoptest banner
	if ($('.javaBanner').length > 0) {
		$('.javaBanner').cycle({
			fx: 'fade', // choose your transition type, ex: fade, scrollUp, shuffle, etc...
			random:  0
		});
	}
});

	

