<!-- section for comparision of products -->
function ShowComparisionChart() {
	if(serverString == "") {
		alert("Please select at least two products to compare...");
		return;
	}
	var prdLength = serverString.split(",");
	var count = 0;
	for(var j=0; j<prdLength.length; j++) {
		if(prdLength[j] != "") {
			count++;
		}
	}
	
	if(count < 2) {
		alert("Please select at least two products to compare.");
		return;
	}
	
	var chk = document.getElementById("paging").getElementsByTagName("input");
	
	
	for(var i=0; i < chk.length; i++) {
		if(chk[i].type == "checkbox") {
			if(chk[i].checked == true) {
				chk[i].checked = false;
			}
		}
	}
	
	var url = "http://www.secure-ecommerce-services.com/storeservices/skygeek/concierge/gps-product-compare.php?productids="+serverString;
	win3 = window.open(url, "window");
    serverString = ""; //reset the server string
}

function AddToCompare(id, chk) {
	
	
	if(chk.checked) {
			
		if(serverString == ",") {
			
			serverString = "";
		}
		if(serverString != "") {
			
			serverString = serverString + "," +id;
		} else {
			
			serverString = id;
			
		}
	} else {
			
		if(serverString != "") {
				
			serverString = serverString.replace(id, "").replace(",,", ",");
			if(serverString[0] == ",") {
					
				serverString = serverString.substr(1, serverString.length-1);
			}
		}
	}	
   
}


<!-- section for comparision of products ENDS-->
