var common = { getQueryString : function(name){ var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i'); var r = ''; try{ r = location.href.split('?')[1].match(reg); }catch(err){} if (r != null && r != 'undefined') { return unescape(r[2]); } return null; } }