Index: src/main/webapp/newsession.xhtml
===================================================================
--- src/main/webapp/newsession.xhtml	(revision 25)
+++ src/main/webapp/newsession.xhtml	(revision 26)
@@ -17,4 +17,5 @@
 		<option value="MOPAC">MOPAC (Multiple Offers Partial
 			Consensus)</option>
+		<option value="MOPAC2">MOPAC2 (MOPAC but with values for each vote)</option>
 		<option value="AMOP">AMOP (Alternating Multiple Offers
 			Protocol)</option>
@@ -29,4 +30,10 @@
 		</select>
 	</div>
+	<div id="votingevaluator2">
+		<br /> Voting Evaluator: <select id="selectedevaluator2">
+			<option value="LargestAgreementWithValue">Largest Agreement with Values</option>
+		</select>
+	</div>
+
 	
 	<br /> Deadline:
@@ -40,5 +47,5 @@
 	<br /> Domain/Profile Server:
 	<input type="url" name="url" id="profilesserverurl"
-		value="localhost:8080/profilesserver-1.5.8"
+		value="localhost:8080/profilesserver-1.5.9"
 		pattern=".*:[0-9]+/profilesserver.*" size="30"
 		onchange="connectDomain()"> </input>
@@ -54,5 +61,5 @@
 		<br /> <b>Participants</b> <br /> Parties Server: <input type="url"
 			name="url" id="partiesserverurl"
-			value="localhost:8080/partiesserver-1.5.8"
+			value="localhost:8080/partiesserver-1.5.9"
 			pattern=".*:[0-9]+/partiesserver.*" size="30"
 			onchange="connectParties()"> </input> <br /> <br /> <b>Party
@@ -204,4 +211,7 @@
     	document.getElementById("votingevaluator").style.display=(evaluatorvisible ? 'block': 'none');
 		
+    	var evaluator2visible=getSelectedProtocol() == "MOPAC2";
+    	document.getElementById("votingevaluator2").style.display=(evaluator2visible ? 'block': 'none');
+
     }   
         
@@ -294,13 +304,13 @@
 	 refresh table: copy all parties elements in there.
 	 Typically parties is something like
-	 [{"uri":"http:130.161.180.1:8080/partiesserver/run/randomparty-1.5.8",
+	 [{"uri":"http:130.161.180.1:8080/partiesserver/run/randomparty-1.5.9",
 		 "capabilities":{"protocols":["SAOP"]},
 		 "description":"places random bids until it can accept an offer with utility >0.6",
-		 "id":"randomparty-1.5.8",
+		 "id":"randomparty-1.5.9",
 		 "partyClass":"geniusweb.exampleparties.randomparty.RandomParty"},
 		 		 ...]
 	 */
 	function updateParties(parties) {
-		 updatePartiesCombobox(parties, document.getElementById("partyselection"),['SAOP','AMOP','SHAOP','MOPAC']);
+		 updatePartiesCombobox(parties, document.getElementById("partyselection"),['SAOP','AMOP','SHAOP','MOPAC', 'MOPAC2']);
 		 updatePartiesCombobox(parties, document.getElementById("cobpartyselection"),['COB']);
 	}
@@ -561,4 +571,6 @@
 		case "MOPAC":
 			return makeMopacRequest();			
+		case "MOPAC2":
+			return makeMopac2Request();			
 		} 
 	}
@@ -581,4 +593,15 @@
 		extended['votingevaluator'] = { [evaluator]: {} };
 		return JSON.stringify({"MOPACSettings": extended });
+	}
+
+	/**
+	* @ereturn MOPAC2 request. Almost standard but extra 'votingEvaluator'.
+	*/
+	function makeMopac2Request() {
+		var extended = standardHeader();
+		var combo = document.getElementById("selectedevaluator2");
+		var evaluator = combo.options[combo.selectedIndex].value;
+		extended['votingevaluator'] = { [evaluator]: {} };
+		return JSON.stringify({"MOPAC2Settings": extended });
 	}
 	
@@ -596,5 +619,9 @@
 			deadline["deadlinerounds"] = {"rounds": value, "durationms":10000};
 		}
-		return  { "participants": partyprofiles, "deadline":deadline }
+		var parties=[];
+		for (let i=0; i< partyprofiles.length; i++) {
+			parties.push( {"TeamInfo":{"parties": [ partyprofiles[i] ] }} );
+		}
+		return  { "participants": parties, "deadline":deadline }
 	}
 	
@@ -617,9 +644,6 @@
 		var parties=[];
 		for (let i=0; i< partyprofiles.length; i++) {
-			var group={};
-			group['shaop'] = partyprofiles[i];
-			group['cob'] = cobpartyprofiles[i];
-			
-			parties.push(group);
+			var team=[ partyprofiles[i] , cobpartyprofiles[i]  ];
+			parties.push( {"TeamInfo":{"parties":  team }} );
 		}
 		return JSON.stringify({"SHAOPSettings": { "participants": parties, "deadline":deadline }});
@@ -632,6 +656,6 @@
 	function init() {
 		selectProtocol();
-		document.getElementById("partiesserverurl").value =window.location.hostname+":8080/partiesserver-1.5.8"
-		document.getElementById("profilesserverurl").value =window.location.hostname+":8080/profilesserver-1.5.8"
+		document.getElementById("partiesserverurl").value =window.location.hostname+":8080/partiesserver-1.5.9"
+		document.getElementById("profilesserverurl").value =window.location.hostname+":8080/profilesserver-1.5.9"
 		connectDomain();
 		connectParties();
