<!--
// .----------------------------------------------------------------------------.
// |.--------------------------------------------------------------------------.|
// || This script is the private property of                                   ||
// ||          Mobilit-e Limited (Company Registration Number: 351410)         ||
// ||          Dublin, Ireland                                                 ||
// ||                                                                          ||
// || No use/reuse is permitted without prior written permission of Mobilit-e. ||
// || Written permission is only valid in the form of a legally binding        ||
// ||      software licence contract with Mobilit-e.                           ||
// ||                                                                          ||
// ||                Copyright: 2002,2003,2004                                 ||
// |'--------------------------------------------------------------------------'|
// '----------------------------------------------------------------------------'
//
      LcW_Debug = 0;
      LcW_Popup_top= 0;
      LcW_Popup_left= 0;
      LcW_Dashboard_heartbeat = 15000;
      LcW_StoreIsVisible = false;
      LcW_LoggedIn = false;
      LcW_SessionIn = false;
      LcW_DeskMode = '';
      LcW_DashLocation = '';
      LcW_LogForm = '';
      LcW_PopupUrl = '';
      LcW_SiteBuildUrl = '';

      function LcW_Redirect(spUrl)
        {DashIsOff=false;
         LcW_LoggedIn = true;
         if (LcW_DeskMode == 'dash') 
           {eval("ObjDashboard = (Tzv_dom)?document.getElementById('LcWDashboard') : Tzv_ie? document.all.LcWDashboard: document.LcWDashboard");
            ObjDashboard.src = 'http://' + LcW_Home
                     + 'zsignon.php?dashboard=' + LcW_DashMode + '&autoLogin=yes&autoOrg=' + LcW_Organisation + '&usebgcolor=gold&useDashPadding=32'
                     + '&useDashCSS=PCMS&useDashListCSS=PCMS&useDashPopupCSS=PCMS&DashLocation=' + LcW_DashLocation;

           }
         InitUrlSplit = spUrl.split(',')
         var currentTime = new Date();
         for (Initi=0; Initi<InitUrlSplit.length; Initi++)
           {InitUrlSeq = parseInt(InitUrlSplit[Initi]);
            InitDestSplit = LcW_UrlDest[InitUrlSeq].split(',');
            InitDest = InitDestSplit[0];
            if (InitDestSplit.length == 2) 
              {InitFrame = InitDestSplit[1];
               eval("ObjUrl = (Tzv_dom)?document.getElementById('" + InitFrame + "').contentWindow.document.getElementById('" + InitDest + "') : Tzv_ie? document.frames('" + InitFrame + "').document.all." + InitDest + ": document.frames('" + InitFrame + "').document." + InitDest + "");
              }
                else
                  {eval("ObjUrl = (Tzv_dom)?document.getElementById('" + InitDest + "') : Tzv_ie? document.all." + InitDest + ": document." + InitDest + "");
                  }
            Dx4Prefix = '?';
            if (LcW_Url[InitUrlSeq].indexOf('?') > 0) {Dx4Prefix = '';}     
            ObjUrl.src = LcW_Url[InitUrlSeq] + Dx4Prefix + '&Dx4=' + currentTime.getTime();
           }
         if (!LcW_SessionIn && (LcW_DeskMode == 'dash'))
           {eval("ObjPopup = (Tzv_dom)?document.frames('" + LcW_PopupForm + "') : Tzv_ie? document.all." + LcW_PopupForm + ": document." + LcW_PopupForm + "");
            ObjPopup.src = 'http://' + LcW_Home + 'zsignonclear.php?Mode=Assign&autoOrg=' + LcW_Organisation;  
           }
         LcW_SessionIn = true;
        }

      function LcW_RedirectTo(spUrl,spBase)
        {InitUrlSplit = spUrl.split(',');
         for (Initi=0; Initi<InitUrlSplit.length; Initi++)
           {InitUrlSeq = parseInt(InitUrlSplit[Initi]);
            InitDestSplit = LcW_UrlDest[InitUrlSeq].split(',');
            InitDest = InitDestSplit[0];
            if (InitDestSplit.length == 2) 
              {InitFrame = InitDestSplit[1];
               eval("ObjUrl = (Tzv_dom)?document.getElementById('" + InitFrame + "').contentWindow.document.getElementById('" + InitDest + "') : Tzv_ie? document.frames('" + InitFrame + "').document.all." + InitDest + ": document.frames('" + InitFrame + "').document." + InitDest + "");
              }
                else
                  {alert(InitDest);eval("ObjUrl = (Tzv_dom)?document.getElementById('" + InitDest + "') : Tzv_ie? document.all." + InitDest + ": document." + InitDest + "");
                  }
            ObjUrl.src = LcW_Url[InitUrlSeq];
           }
        }

      function LcW_StaticBlock(spBlock,spDest)
        {eval("ObjUrl = (Tzv_dom)?document.getElementById('" + spDest + "') : Tzv_ie? document.all." + spDest + ": document." + spDest + "");
        ObjUrl.src= LcW_SiteBuildUrl + '&BuildHTMLStaticConstant=yes&HTMLContext=Dynamic&HTMLStatic=' + spBlock;  
        }

      function LcW_PopupForm(spForm)
        {eval("ObjUrl = (Tzv_dom)?document.getElementById('" + LcW_PopForm + "') : Tzv_ie? document.all." + LcW_PopForm + ": document." + LcW_PopForm + "");
         ObjUrl.src= LcW_PopupUrl + '&popupContext=' + spForm;  
        }

      function LcW_PopupBase(spForm)
        {eval("ObjUrl = (Tzv_dom)?document.getElementById('" + LcW_PopBase + "') : Tzv_ie? document.all." + LcW_PopBase + ": document." + LcW_PopBase + "");
         ObjUrl.src= LcW_PopupUrl + '&popupContext=' + spForm + '&autoResize=no&useCSS=' + LcW_Popup_CSS;  
        }

      function LcW_LoginPanel(spLoginUrl,spDest)
        {eval("ObjUrl = (Tzv_dom)?document.getElementById('" + spDest + "') : Tzv_ie? document.all." + spDest + ": document." + spDest + "");
         ObjUrl.src= spLoginUrl;  
        }

      function LcW_ResetHome(spHomeUrl,spDest)
        {if (LcW_DeskMode == 'secure')
           {eval("ObjLog = (Tzv_dom)?document.getElementById('" + LcW_LogForm + "') : Tzv_ie? document.all." + LcW_LogForm + ": document." + LcW_LogForm);
            ObjLog.src = 'http://' + LcW_Home + 'zsignonsetautocookie.php?autoOrg='+ LcW_Organisation;
           }
         setTimeout('LcW_Redirect(LcW_HomeInitUrl)',1000);
        }

      function LcW_RedirectOff()
        {DashIsOff=true;
         LcW_LoggedIn = false;
         eval("ObjDashboard = (Tzv_dom)?document.getElementById('LcWDashboard') : Tzv_ie? document.all.LcWDashboard: document.LcWDashboard");
         ObjDashboard.src = 'http://' + LcW_Home + 'nodashavailable.html';  
         if (LcW_DeskMode == 'dash') 
           {eval("ObjDash = (Tzv_dom)?document.getElementById('LcWDash') : Tzv_ie? document.all.LcWDash: document.LcWDash");
            ObjDash.src = 'http://' + LcW_Login_Home;  
           }
          else if (LcW_DeskMode != 'dash') 
           {InitUrlSplit = spUrl.split(',');
            for (Initi=0; Initi<InitUrlSplit.length; Initi++)
              {InitUrlSeq = parseInt(InitUrlSplit[Initi]);
               eval("ObjUrl = (Tzv_dom)?document.getElementById('" + LcW_UrlDest[InitUrlSeq] + "') : Tzv_ie? document.all." + LcW_UrlDest[InitUrlSeq] + ": document." + LcW_UrlDest[InitUrlSeq] + "");
               ObjUrl.src = LcW_Url[InitUrlSeq];  
              }
            eval("ObjLog = (Tzv_dom)?document.getElementById('" + LcW_LogForm + "') : Tzv_ie? document.all." + LcW_LogForm + ": document." + LcW_LogForm);
            ObjLog.src = 'http://' + LcW_Login_Home;  
           }
        }

      function LcW_Initialise(spLogForm,spClearMode)
        {if (!window.LcW_DeskMode) {LcW_DeskMode = 'secure';}
         if (spLogForm == undefined) {spLogForm = LcW_PopForm;}
         if (spClearMode == undefined) {spClearMode = 'Clear';}
         LcW_LogForm  = spLogForm;
         LcW_PopupUrl = 'http://' + LcW_Home
                     + 'popupcue2act.php?x4173=n'
                     + '&autoLogin=yes&CyTh-autoLogin=yes'
                     + '&Repl-xcmshome=' + LcW_CMS_Home + '&CyTh-Repl-xcmshome=' + LcW_CMS_Home
                     + '&popupHTMLArea=yes&CyTh-popupHTMLArea=yes'
                     + '&autoResize=yes&popupNextResize=yes&popupNext1Resize=no&popupNext2Resize=no'
                     + '&popupTarget=' + LcW_PopForm 
                     + '&popupInLine=yes&popupNextInLine=yes'
                     + '&AtEnd=hide&popupNextAtEnd=hide'
                     + '&autoCSS=no&popupNextCSS=no&popupNext1CSS=no'
                     + '&SyncMode=sync&popupNextSync=sync'
                     + '&autoFormTop=' + LcW_Popup_top + '&autoFormLeft=' + LcW_Popup_left
                     + '&autoOrg=' + LcW_Organisation + '&CyTh-autoOrg=' + LcW_Organisation
                     + '&Repl-autoOrg=' + LcW_Organisation + '&CyTh-Repl-autoOrg=' + LcW_Organisation
                     + '&xsiteconfig=' + LcW_SiteConfig + '&CyTh-xsiteconfig=' + LcW_SiteConfig
                     + '&xsitebuild=' + LcW_SiteBuild + '&CyTh-xsitebuild=' + LcW_SiteBuild
                     + '&Repl-xlogout=' + LcW_Logout_Home
                     + '&CyTh-pcmsRDBInit=SET+ARITHABORT,CONCAT_NULL_YIELDS_NULL,ANSI_WARNINGS, ANSI_PADDING+ON'
                     + '&CyTh-pcmsRDB=' + LcW_pcmsRDB + '&CyTh-pcmsRDBLimit=TOP+100'
                     + '&xsitebuilder=' + LcW_SiteBuild + '%26xsiteconfig=' + LcW_SiteConfig
                     + '&useCSS=' + LcW_Popup_CSS + '&popupNextuseCSS=' + LcW_Popup_CSS + '&popupNext1useCSS=' + LcW_Popup_CSS;
          LcW_SiteBuildUrl = LcW_SiteBuild
                     + 'CyTh-autoLogin=yes'
                     + '&autoOrg=' + LcW_Organisation + '&CyTh-autoOrg=' + LcW_Organisation
                     + '&xsiteconfig=' + LcW_SiteConfig + '&CyTh-xsiteconfig=' + LcW_SiteConfig
                     + '&xsitebuild=' + LcW_SiteBuild + '&CyTh-xsitebuild=' + LcW_SiteBuild
                     + '&CyTh-pcmsRDBInit=SET+ARITHABORT,CONCAT_NULL_YIELDS_NULL,ANSI_WARNINGS, ANSI_PADDING+ON'
                     + '&CyTh-pcmsRDB=' + LcW_pcmsRDB + '&CyTh-pcmsRDBLimit=TOP+100';
         if (LcW_Debug == 99){alert(LcW_PopupUrl);}

         if (LcW_DeskMode == 'secure')
           {eval("ObjLog = (Tzv_dom)?document.getElementById('" + spLogForm + "') : Tzv_ie? document.all." + spLogForm + ": document." + spLogForm);
            ObjLog.src = 'http://' + LcW_Home + 'zsignonclear.php?Mode=' + spClearMode + '&autoOrg=' + LcW_Organisation;
           }
         return false;
        }

//-->