Index: src/main/webapp/newtournament.xhtml
===================================================================
--- src/main/webapp/newtournament.xhtml	(revision 3)
+++ src/main/webapp/newtournament.xhtml	(revision 6)
@@ -20,22 +20,19 @@
 	<br />
 	<br />
-	<input type="number" id="partiespersession" name="tentacles" min="2" max="10" value="2"/>
-	Number of parties in each session
-	<br />
-
-	<input type="checkbox" id="reuseparties"/> Pick
-	parties with return when creating sessions
+	<input type="number" id="partiespersession" name="tentacles" min="2"
+		max="10" value="2" /> Number of parties in each session
+	<br />
+
+	<input type="checkbox" id="reuseparties" /> Pick parties with return
+	when creating sessions
 	<br />
 
 	<br />
 	<div id="box" class="box">
-		Session Protocol settings
-		<br />
-		Session Protocol: <select>
+		Session Protocol settings <br /> Session Protocol: <select>
 			<option value="SAOP">SAOP</option>
-		</select>
-		<br />
-		Deadline: <input type="number" id="deadlinevalue" name="deadline"
-			min="1" max="10000" value="10" /> <select id="deadlinetype">
+		</select> <br /> Deadline: <input type="number" id="deadlinevalue"
+			name="deadline" min="1" max="10000" value="10" /> <select
+			id="deadlinetype">
 			<option value="TIME">seconds</option>
 			<option value="ROUNDS">rounds</option>
@@ -45,23 +42,15 @@
 
 	<div id="box" class="box">
-		<br />
-		Domain/Profile Server: <input type="url" name="url"
+		<br /> Domain/Profile Server: <input type="url" name="url"
 			id="profilesserverurl" value="localhost:8080/profilesserver-1.0.0"
 			pattern=".*:[0-9]+/profilesserver" size="30"
-			onchange="connectDomain()"> </input>
-		<br />
-		Domain: <select id="domainselection" onchange="selectDomain()">
+			onchange="connectDomain()"> </input> <br /> Domain: <select
+			id="domainselection" onchange="selectDomain()">
 			<!-- <option>Waiting for profiles server</option> -->
-		</select>
-
-		<br />
-		<br />
+		</select> <br /> <br />
 		<button onclick="addProfile()">Add</button>
 		Profile: <select id="profileselection">
 			<!-- <option>Waiting for partiesserver</option> -->
-		</select>
-		<br />
-
-		<br />
+		</select> <br /> <br />
 
 		<table id="profiles">
@@ -79,20 +68,19 @@
 	<br />
 	<div id="box" class="box">
-		<br />
-		Parties Server: <input type="url" name="url" id="partiesserverurl"
-			value="localhost:8080/partiesserver-1.0.0"
+		<br /> Parties Server: <input type="url" name="url"
+			id="partiesserverurl" value="localhost:8080/partiesserver-1.0.0"
 			pattern=".*:[0-9]+/partiesserver" size="30"
-			onchange="connectParties()"> </input>
-		<br />
-		<br />
-		<button onclick="addParty()">Add</button>
+			onchange="connectParties()"> </input> <br /> <br />
 		Party: <select id="partyselection">
 			<!-- <option>Waiting for partiesserver</option> -->
-		</select>
-
-		<br />
+		</select> <br /> Parameters: { <input type="text" id="parameters"
+			onchange="updateParameters()" value="" maxlength="100" /> } <br />
+		<button onclick="addParty()">Add</button>
+			
+		<br /> <br />
 		<table>
 			<thead>
-				<th align="left">Selected Parties</th>
+				<th align="left">Party</th>
+				<th align="left">Parameters</th>
 			</thead>
 			<tbody id="partiesList">
@@ -106,8 +94,10 @@
 	<br />
 	<form>
-		<input id="startbutton" type="button" value="Start Tournament" onclick="start()" />
+		<input id="startbutton" type="button" value="Start Tournament"
+			onclick="start()" />
 	</form>
-	<div id="started" style="visibility:hidden">
-	Your tournament started. Click <a href="" id="logref">here</a> to view the log file.
+	<div id="started" style="visibility: hidden">
+		Your tournament started. Click <a href="" id="logref">here</a> to view
+		the log file.
 	</div>
 
@@ -115,4 +105,5 @@
 
 <script type="application/javascript">
+	
 	
 	
@@ -147,4 +138,6 @@
         var parties=[];
         var profiles=[]
+        // current setting of parameters
+        var parameters = {};
 
  	
@@ -245,4 +238,16 @@
 
 
+    /**
+    updates parameters field to match the given text.
+    */
+	function updateParameters() {
+		var text="{"+document.getElementById("parameters").value+"}";
+    	try {
+			parameters=JSON.parse(text);
+    	} catch(e) {
+    		alert("Parameters can not be parsed. "+e);
+    		return;
+    	}
+	}
 
 	/**
@@ -276,5 +281,5 @@
 			return;
 		}
-		parties.push(partycombo.options[partycombo.selectedIndex].value)
+		parties.push({"partyref":partycombo.options[partycombo.selectedIndex].value, "parameters":parameters})
 		updatePartyTable();
 	}
@@ -287,5 +292,7 @@
 			var row = table.insertRow(-1);
 			var cell1 = row.insertCell(-1);
-			cell1.innerHTML = parties[party];
+			var cell2 = row.insertCell(-1);
+			cell1.innerHTML = parties[party]["partyref"];
+			cell2.innerHTML = JSON.stringify(parties[party]["parameters"]);
 		}
 
@@ -397,4 +404,5 @@
 
 
+
 </script>
 
