home *** CD-ROM | disk | FTP | other *** search
/ NetObjects Fusion 7 / Fusion7.iso / NetObjects Fusion / data1.cab / Fsi / lib / Ritz / Ritz.js
Encoding:
Text File  |  2002-10-18  |  2.4 KB  |  82 lines

  1.  
  2.  
  3. function Ritz_playMovie(name) {
  4.   app.OpenDialog("../../QuickStart/" + name + ".html", '', 
  5.           Math.min(window.screen.availWidth, 772), 
  6.           Math.min(window.screen.availHeight, 646));
  7. }
  8.  
  9. var hasHostingProfile__ = null;
  10. function Ritz_hasHostingProfile() {
  11.  
  12.   if (hasHostingProfile__ == null) {
  13.     var iter = new ActiveXObject("FSI.FSIRegIterator");
  14.     iter.DefineSearch(false, "FSI\\PP", false);
  15.     var name = iter.GetNext();
  16.     hasHostingProfile__ =  (name != "");
  17.   }
  18.   
  19.   return hasHostingProfile__;
  20. }
  21.  
  22. function Ritz_openWebServiceDlg(ws, args) {
  23.  
  24.   var baseURL = "https://nof7.webservices.websitepros.com/nof7/Ritz/";
  25.  
  26.   var wsURL = baseURL + ws;
  27.   var isOnline = app.OnlineMode(wsURL + "_event=reset", true) == 0;
  28.   if (isOnline) {
  29.  
  30.     var window = (args.length > 0 ? args[0] : null);
  31.     var initialLaunch = (args.length > 1 ? args[1] : false);
  32.     
  33.     var url = wsURL + "?_event=init" +
  34.           "&sn=" + app.GetRegistryString(true, "SerialNumber") +
  35.           "&pid=" + app.GetRegistryString(true, "PartnerCode") +
  36.           "&hb=" + (app.GetRegistryString(true, "BusinessName").length ? "true" : "false") +
  37.           (initialLaunch ? "&il=true" : "");
  38.     if (window != null) {
  39.       window.location = url;
  40.     }
  41.     else {
  42.       app2.BrowserNoCtrl(url, "", 700, 600);
  43.     }
  44.   }
  45.   
  46.   return true;
  47. }
  48.  
  49. function Ritz_openAccountSetupDlg(/* window, initialLaunch */) {
  50.   return Ritz_openWebServiceDlg("as.ixs", arguments);
  51. }
  52.  
  53. function Ritz_openProfileSyncDlg(/* window, initialLaunch */) {
  54.   return Ritz_openWebServiceDlg("psync.ixs", arguments);
  55. }
  56.  
  57. function Ritz_openEmailUserInfoDlg(/* window, initialLaunch */) {
  58.   return Ritz_openWebServiceDlg("eui.ixs", arguments);
  59. }
  60.  
  61. function Ritz_openHostingControlPanel() {
  62.  
  63.   var url = "https://nof7.webservices.websitepros.com/siteadmin/index.html";
  64.   var mode = app.OnlineMode(url, true);
  65.   if (mode == 0) {
  66.     app2.OpenBrowser(url, "", Math.min(window.screen.availWidth, 700), window.screen.availHeight);
  67.   }
  68. }
  69.  
  70. function Ritz_NS() {
  71.   this.__proto__ = Ritz_NS.prototype;
  72.   
  73.   this.playMovie = Ritz_playMovie;
  74.   this.hasHostingProfile = Ritz_hasHostingProfile;
  75.   this.openAccountSetupDlg = Ritz_openAccountSetupDlg;
  76.   this.openProfileSyncDlg = Ritz_openProfileSyncDlg;
  77.   this.openEmailUserInfoDlg = Ritz_openEmailUserInfoDlg;
  78.   this.openHostingControlPanel = Ritz_openHostingControlPanel;
  79. }
  80.  
  81. var Ritz = new Ritz_NS();
  82.