Index: /main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/js/eurovision.js
===================================================================
--- /main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/js/eurovision.js	(revision 34917)
+++ /main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/js/eurovision.js	(revision 34918)
@@ -1,2 +1,3 @@
+
 // The following needs to be kept in sync with the .voting-countries & .voting-points widths in css/eurovision.css
 var glob_voting_country_and_points_width = (180+35); 
@@ -41,8 +42,6 @@
 
 	var library_name = gs.xsltParams["library_name"];
-	//var site_name = gs.xsltParams["site_name"];
 	var coll_name = gs.cgiParams["c"];
 	
-	//var collect_http_path = gs.collectionMetadata["httpPath"];
 	var collect_doc_prefix_url = library_name + "/collection/" + coll_name + "/document/";
 
@@ -53,5 +52,6 @@
 	    var $to_country_name = $('<div>').attr("class","voting voting-country").append("");
 	    var $to_country_points = $('<div>').attr("class","voting voting-points").append("");
-
+	    var $a_from_country = $('<span>');
+	    
 	    // check to see if trans_i position is within array, otherwise default to filler
 	    if (trans_i < num_countries) {
@@ -62,5 +62,5 @@
 		if (typeof from_country_points !== 'undefined') {
 		    var from_country_base = from_country.replace(/-(T|J)$/,"");
-		    var pp_from_country = from_country_base; // in future look to spacing back in for countries like United Kingdom
+		    var pp_from_country = from_country_base; // in future look to putting spacing back in for countries like United Kingdom
 
 		    var hyphen_vote_type = from_country.match(/-(?:T|J)$/);
@@ -68,15 +68,23 @@
 		    var href_from_country = collect_doc_prefix_url + from_country_id;
 	    
-		    var $a_from_country = $('<a>').attr("href",href_from_country).append(pp_from_country);
+		    //var $a_from_country = $('<a>').attr("href",href_from_country).append(pp_from_country);
+		    var $a_from_country = $('<a>').attr("href",href_from_country);
 		    
-		    $from_country_name = $('<div>').attr("class","voting voting-country").append($a_from_country).append(":")
-		    //$from_country_name = $('<div>').attr("class","voting voting-country").append(pp_from_country + ":");
-		    $from_country_points = $('<div>').attr("class","voting voting-points").append(from_country_points);		    
+		    //$from_country_name = $('<div>').attr("class","voting voting-country").append($a_from_country).append(":")
+		    $from_country_name = $('<div>').attr("class","voting voting-country").append(pp_from_country).append(":");
+		    $from_country_points = $('<div>').attr("class","voting voting-points").append(from_country_points);
 		}
 	    }
-	    
+
+	    /*
 	    $('#to-country-votes')
 		.append($from_country_name)
 		.append($from_country_points);
+*/
+	    $a_from_country
+		.append($from_country_name)
+		.append($from_country_points);
+	    $('#to-country-votes')
+		.append($a_from_country);
 		
 	}
@@ -106,5 +114,5 @@
 }
 
-function append_from_country_votes(from_country_year_id,vote_type)
+function append_from_country_votes(vote_type)
 {
     if (vote_type != "") {
@@ -135,4 +143,11 @@
 	from_country_votes.sort(compare_countries);
 
+	var library_name = gs.xsltParams["library_name"];
+	var coll_name = gs.cgiParams["c"];
+	
+	var collect_doc_prefix_url = library_name + "/collection/" + coll_name + "/document/";
+
+	var year = gs.documentMetadata["FromCountryYear"];
+	
 	for (var i=0; i<num_cells; i++) {
 
@@ -141,21 +156,43 @@
 	    var $to_country_name = $('<div>').attr("class","voting voting-country").append("");
 	    var $to_country_points = $('<div>').attr("class","voting voting-points").append("");
-
+	    var $a_to_country = $('<span>');
+	    
 	    // check to see if trans_i position is within array, otherwise default to filler	    
 	    if (trans_i < num_countries) {
-		var to_country  = from_country_votes[trans_i].Country;
+		var pp_to_country  = from_country_votes[trans_i].Country;
+		var to_country = pp_to_country.replace(/\s+/g,"");
+
 		var to_country_points = from_country_votes[trans_i].Points;
 		
 		if (typeof to_country_points !== 'undefined') {
+
+		    //var doc_id = gs.cgiParams["d"];
+		    //var hyphen_vote_type = doc_id.match(/-(?:T|J)$/);
+		    var to_country_id = to_country + year;
+		    var href_to_country = collect_doc_prefix_url + to_country_id;
+	    
+		    //$a_to_country = $('<a>').attr("href",href_to_country).append(pp_to_country);
+		    $a_to_country = $('<a>').attr("href",href_to_country)
 		    
-		    $to_country_name = $('<div>').attr("class","voting voting-country").append(to_country + ":");
-		    $to_country_points = $('<div>').attr("class","voting voting-points").append(to_country_points);		    
+		    $to_country_name = $('<div>').attr("class","voting voting-country").append(pp_to_country).append(":");
+		    //$to_country_name = $('<div>').attr("class","voting voting-country").append($a_to_country).append(":");
+		    $to_country_points = $('<div>').attr("class","voting voting-points").append(to_country_points);
 		}
 	    }
-	    
-	    $('#from-country-votes')
-		.append($to_country_name)
-		.append($to_country_points);
-
+
+	    //if ($a_to_country) {
+		$a_to_country
+		    .append($to_country_name)
+		    .append($to_country_points);
+		$('#from-country-votes')
+		    .append($a_to_country);
+	    ///}
+	    /*
+	    else {
+		$('#from-country-votes')
+		    .append($to_country_name)
+		    .append($to_country_points);
+	    }
+*/
 	}
     }
Index: /main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/transform/pages/document.xsl
===================================================================
--- /main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/transform/pages/document.xsl	(revision 34917)
+++ /main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/transform/pages/document.xsl	(revision 34918)
@@ -175,5 +175,5 @@
     <div id="from-country-votes">
       <gsf:script>	
-	append_from_country_votes(gs.documentMetadata["Identifier"],gs.documentMetadata["FromCountryType"]);
+	append_from_country_votes(gs.documentMetadata["FromCountryType"]);
       </gsf:script>
     </div>    
