window.location.search.substr(1); //substr(1) removes the leading ? number in the parameter.
function getQuery(para){
var reg = new RegExp("(^|&)" para "=([^&]*)(&|$)");
var r = window.location.search.substr(1).match( reg);
if(r!=null){
return unescape(r[2]);
}
return null;
}