function GetUrlParams()
{
   var map = new Object();
   var split = location.search.split(/[?&]/);

   for (idx in split)
   {
      var pair = split[idx].split(/=/);
      map[unescape(pair[0])] = unescape(pair[1]);
   }

   return map;
}

function CreateJavascriptElement(doc, src)
{
   var s = doc.createElement("script");

   s.type = "text/javascript";
   s.src = src;

   doc.appendChild(s);
}

function LoadJavascript(src)
{
   var h = document.getElementsByTagName("head")[0];
   var s = document.createElement("script");

   s.type = "text/javascript";
   s.src = src;

   h.appendChild(s);
}

function LoadSharedJavascript(src)
{
   LoadJavascript(top.external.HtmlRootDir + "../SharedScripts/" + src);
}
