function getParameterByName(key,url) {
name = key.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(url);
if (results) {
results = decodeURIComponent(results[1].replace(/\+/g, " "));
}
else {
results = false;
}
return results;
}