export function getQuery(name: string, url: string = window.location.search.substr(1)): string | null {
let regex: RegExp = new RegExp('(^|&)' + name + '=([^&]*)(&|$)'),
result: RegExpMatchArray | null = url.match(regex)
if (result !== null) return unescape(result[2])
return null
}