if (typeof _jaRootPath != "undefined") {
 
  var _jaServer = "jalbum.net";
  var _jaHost = "http://" + _jaServer + "/widgetapi/";
  var _jaWidgetContainer = document.getElementById("jalbumwidgetcontainer");
  var _jaIsPreview = location.href.indexOf("http://") != 0 && location.href.indexOf("https://") != 0;
  
  if (_jaWidgetContainer != null && !_jaIsPreview && typeof _jaUserName != "undefined") {
      var _jaLoadScriptSrc = _jaHost + "load/LoadWidgets.action?url=" + encodeURIComponent(document.location) + "&skin=" + encodeURIComponent(_jaSkin) + "&style=" + encodeURIComponent(_jaStyle) + "&version=" + encodeURIComponent(_jaVersion) + "&pageType=" + _jaPageType  + "&rootPath=" + encodeURIComponent(_jaRootPath) + "&timeStamp=" + new Date().getTime();
          _jaLoadScriptSrc += "&username=" + encodeURIComponent(_jaUserName);
      var _jaLoadScript = document.createElement("script");
      _jaLoadScript.type = "text/javascript";
      _jaLoadScript.src = _jaLoadScriptSrc;
      _jaLoadScript.charset = "utf-8";
      _jaWidgetContainer.appendChild(_jaLoadScript);
   }
}

