qs = location.search.substr(1);
coppie = qs.split("&");
for (i=0; i<coppie.length; i++) {
par = coppie[i].substr(0, coppie[i].indexOf("="));
val = coppie[i].substr(coppie[i].indexOf("=") + 1);
}