function openWin(win)
{
	var title;
	var url;

	if(win == 1)
	{
		var window_width = 660;
		var window_height = 610;

		url = "../messages/";
		title = "Messages";
	}

	
	else if(win == 2)
	{
		var window_width = 660;
		var window_height = 610;

		url = "highscore.php";
		title = "Statistics";
	}

	else if(win == 3)
	{
		var window_width = 1024;
		var window_height = 700;

		url = "introduction.php";
		title = "Introduction";
	}

	else if(win == 4 || win == 16)
	{
		var window_width = 660;
		var window_height = 635;

		url = "/register.php";
		title = "Registration";
	}

	else if(win == 5)
	{
		var window_width = 600;
		var window_height = 480;

		url = "contact.php";
		title = "Contact";
	}

	else if(win == 6)
	{
		var window_width = 800;
		var window_height = 700;

		url = "rules.php?rules=true";
		title = "Rules";
	}

	else if(win == 7)
	{
		var window_width = 600;
		var window_height = 480;

		url = "contact.php?jobs=true";
		title = "Contact";
	}

	else if(win == 8)
	{
		var window_width = 1024;
		var window_height = 768;

		url = "screenshots.php";
		title = "Screenshots";
	}

	else if(win == 9)
	{
		var window_width = 780;
		var window_height = 600;

		url = "chat.php";
		title = "Chat";
	}

	else if(win == 10)
	{
		var window_width = 660;
		var window_height = 635;

		url = "new_password.php";
		title = "Password";
	}

	else if(win == 11)
	{
		var window_width = 1024;
		var window_height = 768;

		url = "vote.php";
		title = "Vote";
	}

	else if(win == 12)
	{
		var window_width = 660;
		var window_height = 610;

		url = "my_profile.php";
		title = "Profile";
	}

	else if(win == 13)
	{
		var window_width = 400;
		var window_height = 500;

		url = "updates.php?show=true";
		title = "Updates";
	}

	else if(win == 14)
	{
		var window_width = 660;
		var window_height = 610;

		url = "assignments.php";
		title = "Assignments";
	}

	else if(win == 15)
	{
		var window_width = 660;
		var window_height = 630;

		url = "hero.php";
		title = "Hero";
	}

	// Volgende is 17, 16 wordt bij 4 gebruikt

	else
	{
		url = "";
		title = "";
	}

	// Het chat venster wordt helemaal rechts in het scherm geplaatst
	if(win == 9)
	{
		window_posx = (screen.availWidth - window_width); 
		window_posy = (screen.availHeight - window_height) / 2;
	}

	// De rest in het midden
	else
	{
		window_posx = (screen.availWidth - window_width) / 2; 
		window_posy = (screen.availHeight - window_height) / 2;
	}
	
	window.open(url, title, "screenX="+window_posx+",left="+window_posx+",screenY="+window_posy+",top="+window_posy+", width="+window_width+",height="+window_height+",scrollbars=1");

	// Het inlog formulier wordt nu gesubmit naar het register venster
	if(win == 16)
	{
		document.inlog.action = "register.php"
	    document.inlog.target = title;				// Zorg ervoor dat het formulier gesubmit wordt naar het nieuwe venster

		document.inlog.submit();					// Submit het formulier
	}
}