Index: src/main/webapp/newtournament.xhtml
===================================================================
--- src/main/webapp/newtournament.xhtml	(revision 7)
+++ src/main/webapp/newtournament.xhtml	(revision 8)
@@ -30,11 +30,15 @@
 	<br />
 	<div id="box" class="box">
-		Session Protocol settings <br /> Session Protocol: <select>
+		Session Protocol settings <br /> Session Protocol: 
+		<select id="protocolselection">
 			<option value="SAOP">SAOP</option>
-		</select> <br /> Deadline: <input type="number" id="deadlinevalue"
+			<option value="SHAOP">SHAOP</option>
+		</select> 
+		
+		<br /> Deadline: <input type="number" id="deadlinevalue"
 			name="deadline" min="1" max="10000" value="10" /> <select
 			id="deadlinetype">
+			<option value="ROUNDS">rounds</option>
 			<option value="TIME">seconds</option>
-			<option value="ROUNDS">rounds</option>
 		</select>
 	</div>
@@ -52,5 +56,8 @@
 		Profile: <select id="profileselection">
 			<!-- <option>Waiting for partiesserver</option> -->
-		</select> <br /> <br />
+		</select> 
+		 Filter: <input type="text" id="filter" value="" maxlength="40" /> 
+		
+		<br /> <br />
 
 		<table id="profiles">
@@ -304,10 +311,15 @@
 	function addProfile() {
 		var profilecombo = document.getElementById("profileselection");
-		
+
 		if (profilecombo.options.length==0) {
 			alert("Please set domain/profile server and select a domain and a profile");
 			return;
 		}
-		profiles.push(profilecombo.options[profilecombo.selectedIndex].value)
+		var filteroptions = document.getElementById("filter").value;
+		if (filteroptions!="") {
+			filteroptions="?"+filteroptions;
+		}
+
+		profiles.push(profilecombo.options[profilecombo.selectedIndex].value + filteroptions)
 		updateProfileTable(); // what, MVC?
 	}
@@ -327,7 +339,6 @@
 	/**
 	start the tournament as currently set on this page.
-	We need to send a TournamentSettings object to the server, which typically looks like this
-	but is protocol dependent (currently we do SAOP)
-	
+	We need to send a TournamentSettings object to the server, which typically looks like this with SAOP
+	<code>
 	{"AllPermutationsSettings":{"parties":["party1","party2"],
 		"profiles":["profile1","profile2","profile3"],
@@ -335,6 +346,21 @@
 		"partiesPerSession":2,
 		"sessionsettings":{"SAOPSettings":{"participants":[],"deadline":{"deadlinetime":{"durationms":10}}}}}}
-	
+	</code>
 	participants are already in the global partyprofiles dictionary
+	
+	With SHAOP, it looks like this
+	<code>
+	{
+		"AllPermutationsSettings": {
+			"parties": [ { "partyref": "classpath:geniusweb.exampleparties.simpleshaop.ShaopParty", "parameters": { } },
+				{ "partyref": "classpath:geniusweb.exampleparties.randomparty.RandomParty",	"parameters": {	}}
+			],
+			"reuseParties": false,
+			"profiles": [ 	"prof1?partial=10", "prof2?partial=15"],
+			"partiesPerSession": 2,
+			"sessionsettings": { 	"SHAOPSettings": {
+					"participants": [ ], 
+					"deadline": { "deadlinerounds": {	"rounds": 10, "durationms": 10000	} } } } } }
+	</code>
 	*/
 	function start() {
@@ -380,7 +406,12 @@
 			deadline["deadlinerounds"] = {"rounds": value, "durationms": 10000};
 		}
-		
 		var reuseParties  = document.getElementById("reuseparties").checked;
-		var sessionSettings = {"SAOPSettings":{"participants":[],"deadline":deadline}};
+		
+		var protocolcombobox = document.getElementById("protocolselection");
+		var protocol = protocolcombobox.options[protocolcombobox.selectedIndex].value;
+		var header=protocol+"Settings";
+	
+		// create S(H)AOPSettings. [header] is a weird ECMA script workaround for javascript issue.
+		var sessionSettings = { [header]:{"participants":[],"deadline":deadline}};
 		return JSON.stringify({"AllPermutationsSettings":{"parties":parties,"profiles":profiles,"reuseParties":reuseParties,"partiesPerSession":2,"sessionsettings":sessionSettings}});
 	}
@@ -390,6 +421,6 @@
 	*/
 	function init() {
-		document.getElementById("partiesserverurl").value =window.location.hostname+":8080/partiesserver-1.1.0"
-		document.getElementById("profilesserverurl").value =window.location.hostname+":8080/profilesserver-1.1.0"
+		document.getElementById("partiesserverurl").value =window.location.hostname+":8080/partiesserver-1.1.0";
+		document.getElementById("profilesserverurl").value =window.location.hostname+":8080/profilesserver-1.1.0";
 
 
