function getPrm(Name, url){ url = url || window.location.href; var m = RegExp(Name + '=([^?&#]*)').exec(url); return m ? m[1] : ''; }