home *** CD-ROM | disk | FTP | other *** search
/ Online Praxis 1998 March / Image.iso / CD-ROM / NETSCAPE / CCK / INSTBLDR.Z / asw.jar / clayer2.js < prev    next >
Encoding:
Text File  |  1998-02-27  |  22.2 KB  |  789 lines

  1. <!--  to hide script contents from old browsers
  2.  
  3.  
  4.  
  5. // globals
  6. var theToolBar = null;                     // a global pointer to our toolbar - should it exist
  7. var helpWindow = null;
  8. var preLoaded = false;
  9.  
  10.  
  11.  
  12. compromisePrincipals();
  13.  
  14.  
  15.  
  16. function preLoadImages()
  17. {
  18.     if (preLoaded == false)    {
  19.         //img[0] is the normal image
  20.         //img[1] is the mouseover
  21.         //img[2] is the mousedown
  22.          
  23.         backImages        = new Array;
  24.         helpImages        = new Array;
  25.         exitImages        = new Array;
  26.         nextImages        = new Array;
  27.         connectImages    = new Array;
  28.         doneImages        = new Array;
  29.         ffImages        = new Array;
  30.         rebootImages    = new Array;
  31.  
  32.         backImages[0] = new Image(32,32);
  33.         backImages[0].src = "images/bk_up.gif";
  34.         backImages[1] = new Image(32,32);
  35.         backImages[1].src = "images/bk_mo.gif";
  36.         backImages[2] = new Image(32,32);
  37.         backImages[2].src = "images/bk_down.gif";
  38.  
  39.         helpImages[0] = new Image(32,32);
  40.         helpImages[0].src = "images/hlp_up.gif";
  41.         helpImages[1] = new Image(32,32);
  42.         helpImages[1].src = "images/hlp_mo.gif";
  43.         helpImages[2] = new Image(32,32);
  44.         helpImages[2].src = "images/hlp_down.gif";
  45.  
  46.         exitImages[0] = new Image(32,32);
  47.         exitImages[0].src = "images/ext_up.gif";
  48.         exitImages[1] = new Image(32,32);
  49.         exitImages[1].src = "images/ext_mo.gif";
  50.         exitImages[2] = new Image(32,32);
  51.         exitImages[2].src = "images/ext_down.gif";
  52.  
  53.         nextImages[0] = new Image(32,32);
  54.         nextImages[0].src = "images/nxt_up.gif";
  55.         nextImages[1] = new Image(32,32);
  56.         nextImages[1].src = "images/nxt_mo.gif";
  57.         nextImages[2] = new Image(32,32);
  58.         nextImages[2].src = "images/nxt_down.gif";
  59.  
  60.         rebootImages[0] = new Image(32,32);
  61.         rebootImages[0].src = "images/rb_up.gif";
  62.         rebootImages[1] = new Image(32,32);
  63.         rebootImages[1].src = "images/rb_mo.gif";
  64.         rebootImages[2] = new Image(32,32);
  65.         rebootImages[2].src = "images/rb_down.gif";
  66.  
  67.         connectImages[0] = new Image(32,32);
  68.         connectImages[0].src = "images/cn_up.gif";
  69.         connectImages[1] = new Image(32,32);
  70.         connectImages[1].src = "images/cn_mo.gif";
  71.         connectImages[2] = new Image(32,32);
  72.         connectImages[2].src = "images/cn_down.gif";
  73.  
  74.         doneImages[0] = new Image(32,32);
  75.         doneImages[0].src = "images/dn_up.gif";
  76.         doneImages[1] = new Image(32,32);
  77.         doneImages[1].src = "images/dn_mo.gif";
  78.         doneImages[2] = new Image(32,32);
  79.         doneImages[2].src = "images/dn_down.gif";
  80.  
  81.         ffImages[0] = new Image(32,32);
  82.         ffImages[0].src = "images/ff_up.gif";
  83.         ffImages[1] = new Image(32,32);
  84.         ffImages[1].src = "images/ff_mo.gif";
  85.         ffImages[2] = new Image(32,32);
  86.         ffImages[2].src = "images/ff_down.gif";
  87.  
  88.         preLoaded = true;
  89.         }
  90. }
  91.  
  92.  
  93.  
  94. function generateControls()
  95. {
  96.     var    editMode                =    false;
  97.     var    showAcctsetEdit            =    false;
  98.     var    showRegFileEdit            =    false;
  99.     var    showISPFileEdit            =    false;
  100.     var showExit                =    true;
  101.     var    showHelp                =    true;
  102.     var    showBack                =    true;
  103.     var    showNext                =    true;
  104.     var    showConnectServer        =    false;
  105.     var    showConnectNow            =    false;
  106.     var    showConnectLater        =    false;
  107.     var    showAgain                =    false;
  108.     var    showDone                =    false;
  109.     var    showRestart                =    false;
  110.     var showSetupShortcut        =    false;
  111.     var    showInternet            =    false;
  112.     var    showScreenToggle        =    false;
  113.     var    screenVisible            =    true;
  114.     var showScreenOptions        =    false;
  115.  
  116.     netscape.security.PrivilegeManager.enablePrivilege("AccountSetup");
  117.  
  118.     if (parent && parent.parent && parent.parent.globals)    {
  119.         editMode=(parent.parent.globals.document.vars.editMode.value.toLowerCase() == "yes") ? true:false;
  120.         }
  121.  
  122. //    var formName = parent.content.location.toString();
  123.     var formName = "" + parent.content.location;
  124.     if (formName != null && formName != "" && formName != "about:blank")    {
  125.         if ((x=formName.lastIndexOf("/"))>0)    {
  126.             formName=formName.substring(x+1,formName.length);
  127.             }
  128.  
  129.         if (editMode==true)    {
  130.             var section=null;
  131.             var variable=null;
  132.             var pageNum=findPageOffset(formName);
  133.             if (pageNum>=0)    {
  134.                 section=pages[pageNum][0].section;
  135.                 variable=pages[pageNum][0].variable;
  136.                 if (section!=null && section!="" && variable!=null && variable!="")    {
  137.                     showScreenToggle=true;
  138.                     var theFile = parent.parent.globals.getAcctSetupFilename(self);
  139.                     var theFlag = parent.parent.globals.GetNameValuePair(theFile,section, variable);
  140.                     theFlag = theFlag.toLowerCase();
  141.                     if (theFlag == "no")    screenVisible=false;
  142.                     }
  143.                 }
  144.             }
  145.  
  146.         if (formName == "main.htm")    {
  147.             showBack=false;
  148.             showNext=false;
  149.             if (navigator.javaEnabled()==false)    {
  150.                 showNext=false;
  151.                 editMode=false;
  152.                 showAcctsetEdit=false;
  153.                 showISPFileEdit=false;
  154.                 showRegFileEdit=false;
  155.                 document.writeln("<CENTER><STRONG>Java support is disabled!<P>\n");
  156.                 document.writeln("Choose Options | Network Preferences and enable Java, then try again.</STRONG></CENTER>\n");
  157.                 }
  158.             else if (!navigator.mimeTypes["application/x-netscape-autoconfigure-dialer"])    {
  159.                 showNext=false;
  160.                 editMode=false;
  161.                 showAcctsetEdit=false;
  162.                 showISPFileEdit=false;
  163.                 showRegFileEdit=false;
  164.                 document.writeln("<CENTER><STRONG>The 'Account Setup Plugin' is not installed!<P>\n");
  165.                 document.writeln("Please install the plugin, then run 'Account Setup' again.</STRONG></CENTER>\n");
  166.                 }
  167.             else if (parent.parent.globals.document.setupPlugin == null)    {
  168.                 showNext=false;
  169.                 editMode=false;
  170.                 }
  171.             if (editMode == true)    {
  172.                 showAcctsetEdit=true;
  173.                 showScreenOptions=true;
  174.                 }
  175.             }
  176.         else if (editMode==true && formName == "useAcct.htm")    {
  177.             showScreenOptions=true;
  178.             }
  179.         else if (editMode==true && formName == "servers.htm")    {
  180.             showScreenOptions=false;
  181.             }
  182.         else if (editMode==true && formName == "billing.htm")    {
  183.             showScreenOptions=true;
  184.             }
  185.         else if (formName == "accounts.htm")    {
  186.             showNext=false;
  187.             }
  188.         else if (formName == "connect1.htm")    {
  189.             showNext=false;
  190.             showConnectServer=true;
  191.             if (editMode==true)    {
  192.                 showScreenOptions=true;
  193.                 }
  194.             }
  195.         else if (formName == "connect2.htm")    {
  196.             showNext=false;
  197.             showExit=false;
  198.             showConnectNow=true;
  199.             showConnectLater=true;
  200.             }
  201.         else if (formName == "register.htm")    {
  202.             showHelp=false;
  203.             showBack=false;
  204.             showNext=false;
  205.             if (editMode==true)    {
  206.                 showBack=true;
  207.                 }
  208.             }
  209.         else if (formName == "ok.htm")    {
  210.             showScreenOptions=true;
  211.             showBack=false;
  212.             showExit=false;
  213.             showNext=false;
  214.             showInternet=true;
  215.             showDone=true;
  216.             if (editMode==true)    {
  217.                 showBack=true;
  218.                 }
  219.             }
  220.         else if (formName == "okreboot.htm")    {
  221.             showScreenOptions=true;
  222.             showBack=false;
  223.             showNext=false;
  224.             showExit=false;
  225.             showDone=false;
  226.             showRestart=true;
  227.             if (editMode==true)    {
  228.                 showBack=true;
  229.                 }
  230.             }
  231.         else if (formName == "error.htm")    {
  232.             showBack=true;
  233.             showExit=true;
  234.             showNext=false;
  235.             showAgain=true;
  236.             showDone=false;
  237.             if (editMode==true)    {
  238.                 showBack=true;
  239.                 }
  240.             }
  241.         else if (formName == "later.htm")    {
  242.             showBack=false;
  243.             showExit=false;
  244.             showNext=false;
  245.             showDone=true;
  246.             if (editMode==true)    {
  247.                 showBack=true;
  248.                 }
  249.             }
  250.         else if (formName == "intro1.htm")    {
  251.             showSetupShortcut=true;
  252.             }
  253.         else if (formName == "settings.htm")    {
  254.             showBack=true;
  255.             showNext=false;
  256.             editMode=false;
  257.             }
  258.         else if (formName == "editregs.htm")    {
  259.             showBack=true;
  260.             showNext=false;
  261.             editMode=false;
  262.             }
  263.         else if (formName == "editisps.htm")    {
  264.             showBack=true;
  265.             showNext=false;
  266.             editMode=false;
  267.             }
  268.         else if (formName == "aboutbox.htm")    {
  269.             showHelp=false;
  270.             showNext=false;
  271.             showBack=true;
  272.             }
  273.         else if (formName == "namepw.htm")        {
  274.             showScreenOptions=true;
  275.             }
  276.         else if ((formName == "asktty.htm"))     {
  277.             showScreenOptions=false;
  278.             showBack=true;
  279.             showNext=false;
  280.             editMode=false;
  281.             }
  282.         else if (formName == "askserv.htm")        {
  283.             showScreenOptions=false;
  284.             showBack=true;
  285.             showNext=false;
  286.             editMode=false;
  287.             }
  288.         else if (formName == "asksvinf.htm")    {
  289.             showScreenOptions=false;
  290.             showBack=true;
  291.             showNext=false;
  292.             editMode=false;
  293.             }
  294.         else if (formName == "showphon.htm")    {
  295.             showScreenOptions=false;
  296.             showBack=true;
  297.             showNext=false;
  298.             editMode=false;
  299.             }
  300.         else if (formName == "editcc.htm")    {
  301.             showBack=true;
  302.             showNext=false;
  303.             editMode=false;
  304.             }
  305.         else if (formName == "addnci.htm")        {
  306.             showBack=true;
  307.             showNext=false;
  308.             editMode=false;
  309.             }
  310.         else if (formName == "addias.htm")        {
  311.             showBack=true;
  312.             showNext=false;
  313.             editMode=false;
  314.             }
  315.         else if (formName == "editfour.htm")        {
  316.             showBack=true;
  317.             showNext=false;
  318.             editMode=false;
  319.             }
  320.  
  321.         if (document && document.layers && document.layers["controls"] && document.layers["controls"].document && document.layers["controls"].document.layers && document.layers["controls"].document.layers.length>0)    {
  322.             document.layers["controls"].layers["help"].visibility = ((showHelp==true) ? "show":"hide");            
  323.             document.layers["controls"].layers["exit"].visibility = ((showExit==true) ? "show":"hide");            
  324.             document.layers["controls"].layers["back"].visibility = ((showBack==true) ? "show":"hide");            
  325.             document.layers["controls"].layers["next"].visibility = ((showNext==true) ? "show":"hide");            
  326.             document.layers["controls"].layers["connectnow"].visibility = ((showConnectNow==true) ? "show":"hide");            
  327.             document.layers["controls"].layers["connectserver"].visibility = ((showConnectServer==true) ? "show":"hide");            
  328.             document.layers["controls"].layers["connectagain"].visibility = ((showAgain==true) ? "show":"hide");            
  329.             document.layers["controls"].layers["done"].visibility = ((showDone==true) ? "show":"hide");            
  330.             document.layers["controls"].layers["restart"].visibility = ((showRestart==true) ? "show":"hide");            
  331.             document.layers["controls"].layers["connectlater"].visibility = ((showConnectLater==true) ? "show":"hide");            
  332.             document.layers["controls"].layers["setup"].visibility = ((showSetupShortcut==true) ? "show":"hide");            
  333.  
  334.             //NEW - Generate the controls for the toolbar, if it exists
  335.             if ((!theToolBar) || (theToolBar==null) || (!theToolBar.location) || (theToolBar.closed))
  336.                 {
  337.                 //alert("opening toolbar");
  338.                 theToolBar = openToolBar();
  339.                 }
  340.             else
  341.                 {
  342.                 //alert("toolbar open, generating controls" + theToolBar);
  343.                 generateToolBarControls();    
  344.                 }
  345.             }
  346.         else    {
  347.             setTimeout("generateControls()",1000);
  348.             }
  349.         
  350.  
  351.         }
  352.     else    {
  353.         setTimeout("generateControls()",1000);
  354.         }
  355. }
  356.  
  357.  
  358.  
  359. function doHelp(formName)
  360. {
  361.         var thePlatform;
  362.  
  363.     netscape.security.PrivilegeManager.enablePrivilege("AccountSetup");
  364.  
  365.     helpFile = "./help/ashelp.htm";
  366.  
  367.     var helpPath = "";
  368.     if (parent && parent.parent && parent.parent.globals)    {
  369.         helpPath = "" + parent.parent.globals.getFolder(self);
  370.  
  371.         thePlatform = new String(navigator.userAgent);
  372.         var x=thePlatform.indexOf("(")+1;
  373.         var y=thePlatform.indexOf(";",x+1);
  374.         thePlatform=thePlatform.substring(x,y);
  375.         if (thePlatform == "Macintosh")    {                        // Macintosh support
  376.             helpPath = helpPath + "help:";
  377.             }
  378.         else    {                                                // Windows support
  379.             helpPath = helpPath + "help/";
  380.             }
  381.  
  382.         if (thePlatform != "Macintosh") {
  383.  
  384.             var hpath=unescape(location.pathname);
  385.             hpath = hpath.substring(0, hpath.lastIndexOf('/'));
  386.             helpFile = hpath + "/help/ashelp.htm";
  387.  
  388.             // get rid of the return char at the end of .htm
  389.             formName = formName.substring(0, formName.indexOf('.htm')+4);
  390.             // next, get rid of sub folders in formName
  391.             while (formName.indexOf('/') > 0)
  392.                 formName = formName.substring(formName.indexOf('/')+1, formName.length);
  393.         }
  394.  
  395.         var theList = parent.parent.globals.document.setupPlugin.GetFolderContents(helpPath,".htm");
  396.         if (theList != null)    {
  397.             for (var i=0; i<theList.length; i++)    {
  398.                 if (formName == theList[i])    {
  399.                     if (thePlatform != "Macintosh") {
  400.                         var currentpath=unescape(location.pathname);
  401.                         currentpath = currentpath.substring(0, currentpath.lastIndexOf('/'));
  402.                         helpFile = currentpath + "/help/" + formName;
  403.                     } else { 
  404.                         helpFile = "./help/" + formName;
  405.                     }
  406.                     break;
  407.                     }
  408.                 }
  409.             }
  410.         }
  411.  
  412.     if (helpFile != null && helpFile != "")    {
  413.         if (helpWindow == null || helpWindow.closed)    {
  414.             helpWindow=window.open("about:blank","Documentation","width=328,height=328,alwaysRaised=yes,dependent=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes");
  415.             }
  416.         if (helpWindow && helpWindow != null)    {
  417.             helpWindow.focus();
  418.             helpWindow.location = helpFile;
  419.             }
  420.         }
  421. }
  422.  
  423.  
  424.  
  425. //here are a bunch of functions for the floating toolbar
  426.  
  427.  
  428.  
  429. function openToolBar()
  430. {
  431.  
  432.         var thePlatform = new String(navigator.userAgent);
  433.         var x=thePlatform.indexOf("(")+1;
  434.         var y=thePlatform.indexOf(";",x+1);
  435.         thePlatform=thePlatform.substring(x,y);
  436.  
  437.         var    editMode = false;
  438.  
  439.     if (parent && parent.parent && parent.parent.globals)    {
  440.         editMode=(parent.parent.globals.document.vars.editMode.value.toLowerCase() == "yes") ? true:false;
  441.         }
  442.  
  443.     if (editMode == true)    
  444.     {
  445.         if (!(theToolBar) || (theToolBar == null) || !(theToolBar.location)) 
  446.         {
  447.             if (thePlatform == "Macintosh")    
  448.                 theToolBar = top.open("../../Tools/Kit/config.htm","Configurator","width=400,height=104,dependent=yes,alwaysraised=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no");
  449.             else
  450.                 theToolBar = top.open("../../../AccountSetupTools/Kit/config.htm","Configurator","width=400,height=104,dependent=yes,alwaysraised=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no");
  451.                 
  452.         }
  453.     }
  454.     else
  455.     {
  456.         theToolBar = null;
  457.     }
  458.     return theToolBar;
  459. }
  460.  
  461.  
  462.  
  463. function showLayer(layerName, showIfTrue)
  464. {    
  465.     //alert("showLayer "+showIfTrue);
  466.     //parent.parent.globals.debug("showing layer: " + layerName + " " + showIfTrue + " layers: " + theToolBar.document.layers.length + " " + theToolBar.document.layers[layerName]);
  467.     if ((theToolBar) && (theToolBar!=null)  && (theToolBar.location) && (theToolBar.finishedLoading()))
  468.     {
  469.                 var gLayerName = "g_" + layerName;
  470.                 //var theLayer = eval("theToolBar.document.layers." + layerName);
  471.                 //parent.parent.globals.debug("theLayer: "+theLayer+ " but t.d.l.l: " + theToolBar.document.layers[layerName]);
  472.                 //var gLayer = eval("theToolBar.document.layers.g_" + layerName);
  473.                 
  474.                 //if (theLayer)
  475.                 {
  476.                     if (showIfTrue == true)
  477.                     {
  478.                         //theToolBar.document.layers[layerName].visibility ="show";
  479.                         theToolBar.showlayer(layerName);
  480.                         theToolBar.hidelayer(gLayerName);
  481.                         //theLayer.visibility="show";
  482.                         //if (gLayer) gLayer.visibility="hide";
  483.                     }
  484.                     else
  485.                     {
  486.                         theToolBar.hidelayer(layerName);
  487.                         theToolBar.showlayer(gLayerName);
  488.                         //theToolBar.document.layers[layerName].visibility ="hide";    
  489.                         //theLayer.visibility="hide";
  490.                         //if (gLayer) gLayer.visibility="show";
  491.                     }
  492.                 }
  493.                 //else
  494.                     //theToolBar.history.go(0);
  495.  
  496.     }
  497. }
  498.  
  499. function screenVisible()
  500. {
  501.     var isVisible = true;
  502.     var formName = parent.content.location.toString();
  503.     if (formName!=null && formName!="")    {
  504.         if ((x=formName.lastIndexOf("/"))>0)    {
  505.             formName=formName.substring(x+1,formName.length);
  506.             }
  507.             var section=null;
  508.             var variable=null;
  509.             var pageNum=findPageOffset(formName);
  510.             if (pageNum>=0)    {
  511.                 section=pages[pageNum][0].section;
  512.                 variable=pages[pageNum][0].variable;
  513.                 if (section!=null && section!="" && variable!=null && variable!="")    {
  514.                     var theFile = parent.parent.globals.getAcctSetupFilename(self);
  515.                     var theFlag = parent.parent.globals.GetNameValuePair(theFile,section, variable);
  516.                     theFlag = theFlag.toLowerCase();
  517.                     if (theFlag == "no")    
  518.                         isVisible=false;    
  519.                     }
  520.                 }
  521.     //alert("clayer: screenVisible = : " + isVisible + "flag (" + variable + ") = " + theFlag);
  522.     }
  523.     return isVisible;
  524. }
  525.  
  526. function showScreen(inValue)
  527. {
  528.     //alert("in showscreen");
  529.     var formName = parent.content.location.toString();
  530.     
  531.     if (formName!=null && formName!="")    
  532.     {
  533.         if ((x=formName.lastIndexOf("/"))>0)    {
  534.         formName=formName.substring(x+1,formName.length);
  535.         }
  536.  
  537.         //alert("formName: " + formName);
  538.         var pageNum=findPageOffset(formName);
  539.         if (pageNum>=0)    
  540.         {
  541.             var section=pages[pageNum][0].section;
  542.             var variable=pages[pageNum][0].variable;
  543.             //alert("sec: " + section + " var: "+variable); 
  544.             if (section!=null && section!="" && variable!=null && variable!="")    {
  545.                 var theFile = parent.parent.globals.getAcctSetupFilename(self);
  546.                 var theFlag; // = parent.parent.globals.GetNameValuePair(theFile,section, variable);
  547.  
  548.  
  549.                 //theFlag = theFlag.toLowerCase();
  550.                 //if (theFlag == "no")    theFlag="yes";
  551.                 //else            theFlag="no";
  552.                 
  553.                 if (inValue == false)
  554.                     theFlag = "no";
  555.                 else
  556.                     theFlag = "yes";
  557.                 
  558.                 //alert("Setting flag " + variable + " to " + theFlag + " invalue: " + inValue);
  559.                 parent.parent.globals.SetNameValuePair(theFile,section, variable,theFlag);
  560.                 return (theFlag == "yes");
  561.                 }
  562.         }        
  563.         else
  564.         {
  565.             alert("This screen cannot be suppressed");
  566.             return true;    //forces the checkbox back on
  567.         }
  568.     }
  569. }
  570.  
  571.  
  572. function generateToolBarControls()
  573. {
  574.     var editMode                =    false;
  575. //    var    editMode                =    parent.parent.editMode();
  576.     var    showScreenToggle        =    false;    
  577.     var showScreenOptions        =    false;
  578.     var isScreenVisible            =    true;
  579.     var showEditHelp            =     true;
  580.     
  581.     //var    showAcctsetEdit            =    false;
  582.     //var    showRegFileEdit            =    false;
  583.     //var    showISPFileEdit            =    false;
  584.  
  585.     if (parent && parent.parent && parent.parent.globals)    {
  586.         editMode=(parent.parent.globals.document.vars.editMode.value.toLowerCase() == "yes") ? true:false;
  587.         }
  588.  
  589. //    var formName = parent.content.location.toString();
  590.     var formName = "" + parent.content.location;
  591.  
  592.     if (formName!=null && formName!="")    
  593.     {
  594.         if ((x=formName.lastIndexOf("/"))>0)    {
  595.             formName=formName.substring(x+1,formName.length);
  596.             }
  597.  
  598.         // this decides whether we should show the checkbox
  599.         var pageNum=findPageOffset(formName);
  600.         if (pageNum>=0)    
  601.         {
  602.             section=pages[pageNum][0].section;
  603.             variable=pages[pageNum][0].variable;
  604.             if (section!=null && section!="" && variable!=null && variable!="")    {
  605.                 showScreenToggle=true;
  606.                 //var theFile = parent.parent.globals.getAcctSetupFilename(self);
  607.                 //var theFlag = parent.parent.globals.GetNameValuePair(theFile,section, variable);
  608.                 //theFlag = theFlag.toLowerCase();
  609.                 //if (theFlag == "no")    screenVisible=false;
  610.                 }
  611.         }
  612.  
  613.  
  614.         if (formName == "main.htm")    {
  615.             showScreenOptions=true;
  616.             }
  617.         else if (formName == "useAcct.htm")    {
  618.             showScreenOptions=true;
  619.             }
  620.         else if (formName == "servers.htm")    {
  621.             showScreenOptions=false;
  622.             }
  623.         else if (formName == "billing.htm")    {
  624.             showScreenOptions=true;
  625.             }
  626.         else if (formName == "connect1.htm")    {
  627.                 showScreenOptions=true;
  628.             }
  629.         else if (formName == "connect2.htm")    {
  630.             }
  631.         else if (formName == "register.htm")    {
  632.             }
  633.         else if (formName == "ok.htm")    {
  634.             showScreenOptions=true;
  635.             }
  636.         else if (formName == "okreboot.htm")    {
  637.             showScreenOptions=true;
  638.             }
  639.         else if (formName == "error.htm")    {
  640.             }
  641.         else if (formName == "later.htm")    {
  642.             }
  643.         else if (formName == "settings.htm")    {
  644.             editMode = false;
  645.             }
  646.         else if (formName == "editregs.htm")    {
  647.             editMode=false;
  648.             }
  649.         else if (formName == "editisps.htm")    {
  650.             editMode=false;
  651.             }
  652.         else if (formName == "aboutbox.htm")    {
  653.             }
  654.         else if (formName == "namepw.htm")        {
  655.             showScreenOptions=true;
  656.             }
  657.         else if ((formName == "asktty.htm"))     {
  658.             showScreenOptions=false;
  659.             editMode=false;
  660.             }
  661.         else if (formName == "askserv.htm")        {
  662.             showScreenOptions=false;
  663.             editMode=false;
  664.             }
  665.         else if (formName == "asksvinf.htm")    {
  666.             showScreenOptions=false;
  667.             editMode=false;
  668.             }
  669.         else if (formName == "showphon.htm")    {
  670.             showScreenOptions=false;
  671.             editMode=false;
  672.             }
  673.         else if (formName == "editcc.htm")    {
  674.             showScreenOptions=false;
  675.             editMode=false;
  676.             }
  677.         else if (formName == "addnci.htm")        {
  678.             showScreenOptions=false;
  679.             editMode=false;
  680.             }
  681.         else if (formName == "addias.htm")        {
  682.             showScreenOptions=false;
  683.             editMode=false;
  684.             }
  685.         else if (formName == "editfour.htm")        {
  686.             showScreenOptions=false;
  687.             editMode=false;
  688.             }
  689.  
  690.  
  691.         if (theToolBar && theToolBar != null && (theToolBar.location) && (theToolBar.document.layers) && !(theToolBar.closed)
  692.             && (theToolBar.ready) && (theToolBar.ready == true))
  693.         {
  694.  
  695.             if (theToolBar.finishedLoading())
  696.             {
  697.                 showLayer("reload", editMode);
  698.                 showLayer("edit", editMode);
  699.                 showLayer("chooseed", editMode);
  700.                 showLayer("edithelp", editMode);
  701.                 showLayer("options", showScreenOptions);
  702.                 showLayer("showscreen", showScreenToggle);
  703.                 if (showScreenToggle == true)
  704.                     theToolBar.setShowScreenBox();
  705.                 
  706.                 theToolBar.updateLayersLayer();
  707.                 //alert("found toolbar! - setting help location");
  708.                 theToolBar.setHelpLocation();
  709.                 
  710.             }
  711.             else
  712.             {
  713.                 //alert("Found toolbar, without reloadlayer!");
  714.                 theToolBar.history.go(0);    
  715.             }
  716.         }
  717.         //else
  718.             //alert("warning: toolbar not found");
  719.     }
  720. }
  721.  
  722. function showDocumentLayer(inLayerName, inDoShow)
  723. {
  724.     if (inDoShow == "hide")
  725.         inDoShow = false;
  726.     else if (inDoShow != false)
  727.         inDoShow = true;
  728.     
  729.     if (parent.content && parent.content.document.layers[inLayerName])
  730.     {
  731.         if (inDoShow == true)
  732.         {
  733.             parent.content.document.layers[inLayerName].visibility = "show";
  734.             //alert("showing layer: " + inLayerName);
  735.         }
  736.         else
  737.         {
  738.             parent.content.document.layers[inLayerName].visibility = "hide";
  739.             //alert("hiding layer: " + inLayerName);
  740.         }
  741.     }
  742.  
  743. }
  744.  
  745.  
  746. function countDocumentLayers()
  747. {
  748.     if (parent.content.document.layers)
  749.         return parent.content.document.layers.length;
  750.     else
  751.         return 0;
  752. }
  753.  
  754. function getLayerName(inIndex)
  755. {
  756.     if (parent.content.document.layers && parent.content.document.layers[inIndex])
  757.         return parent.content.document.layers[inIndex].name;
  758.     return null;
  759. }
  760.  
  761. function getLayerSrc(inIndex)
  762. {
  763.     if (parent.content.document.layers && parent.content.document.layers[inIndex])
  764.         return parent.content.document.layers[inIndex].src;
  765.     return null;
  766. }
  767.  
  768. function getDocumentLocation()
  769. {
  770.     return parent.content.document.location;
  771. }
  772.  
  773. function getDocumentLayerVisibility(inLayerName)
  774. {
  775.     if (parent.content.document.layers && parent.content.document.layers[inLayerName])
  776.         return parent.content.document.layers[inLayerName].visibility;
  777.     else 
  778.         return null;
  779.  
  780. }
  781.  
  782. function reloadDocument()
  783. {
  784.     top.globals.debug("RELOADING DOCUMENT!!!!" + parent.content.history);
  785.     if (parent.content.history)
  786.         parent.content.history.go(0);
  787. }
  788. // end hiding contents from old browsers  -->
  789.