function addRowHandlers(tableId, rowClassName, url, paramName1, columnIndex1, paramName2, columnIndex2) {
    var previousClass = null;
    var table = document.getElementById(tableId);
    var rows = table.getElementsByTagName("tr");
    for (i = 1; i < rows.length; i++) {
        rows[i].onmouseover = function () {
            previousClass = this.className;
            this.className = "row-highlighted";
        };

        rows[i].onmouseout = function () {
            this.className = previousClass;
        };

        rows[i].onclick = function () {
            var cell1 = this.getElementsByTagName("td")[columnIndex1];
            var paramValue1 = cell1.innerHTML;
            var cell2 = this.getElementsByTagName("td")[columnIndex2];
            var paramValue2 = cell2.innerHTML;
            var url = "";
            
            if(paramValue2=="D"){
                url = "http://www.potatoeurope.com/328.html";
            } else {
                url = "http://www.potatoeurope.com/331.html";
            }

			post(url, {
				"ADRNR":paramValue1,
				"sprachKz":paramValue2
			})

        };
    }
}

function post(URL, PARAMS) {
	var temp=document.createElement("form");
	temp.action=URL;
	temp.method="POST";
	temp.style.display="none";
	for(var x in PARAMS) {
		var opt=document.createElement("textarea");
		opt.name=x;
		opt.value=PARAMS[x];
		temp.appendChild(opt);
	}
	document.body.appendChild(temp);
	temp.submit();
	return temp;
}
