//-----------------------------------------------------------------
// Name:.......njf.js
// Version:....1.5
// Date:.......2000-154
// Desc:.......(n)eatech (j)avascript (f)unction Library  
// Company.....Neatech Web Sites @ www.neatech.com
// Codejock:...Patrick Nelson @ pnelsonsr@neatech.com
//-----------------------------------------------------------------
//  *** Copyright © 2000 Neatech, Inc.  All Rights Rreserved. ***  
//-----------------------------------------------------------------
// It is distributed strictly as a learning aid and Neatech, Inc. 
// disclaims all warranties- including but not limited to:          
// fitness for a particular purpose, merchantability, loss of       
// business, harm to your system, etc... ALWAYS BACK UP YOUR        
// SYSTEM BEFORE INSTALLING ANY SCRIPT OR PROGRAM FROM ANY          
// SOURCE!
//-----------------------------------------------------------------

function ImageSwap()
//------------------------------------------------------------------
//- Called for Image swaping on mouse event.  Unlimited changes per
//- call, first arg is image object name, second is object status.
//- Company: www.neatech.com - Codejock: pnelson@neatech.com
//------------------------------------------------------------------
//  *** Copyright © 2000 Neatech, Inc.  All Rights Rreserved. ***  
//------------------------------------------------------------------
{
if (document.images)
{
 for (i = 0 ; i < ImageSwap.arguments.length ; i += 2)
 {
  document[ImageSwap.arguments[i]].src = eval(ImageSwap.arguments[i] + ImageSwap.arguments[i + 1] + ".src") ;
 }
}
}//#### end of ImageSwap() ####

function ShowInfo(cURL,nWidth,nHeight,cOptions) 
//------------------------------------------------------------------
//- Called to bring up a new window of cURL formated more like a
//- Info window then a full web browser window.
//- Company: www.neatech.com - Codejock: pnelson@neatech.com
//- Calling Examples
//- <A HREF        = "JAVASCRIPT:ShowInfo('domhlp.html',640,630,'cr')" 
//-    TITLE       = "Domain Name Help">Domain Name</A>
//- <A HREF        = "JAVASCRIPT:ShowInfo('domhlp.html',640,630,'cr')" 
//-    ONMOUSEOUT  = "oOpenWin.close();" 
//-    TITLE       = "Domain Name Help">Domain Name</A>
//- <A HREF        = "JAVASCRIPT:ShowInfo('domhlp.html',640,630,'cr')" 
//-    ONMOUSEOVER = "ShowInfo('domhlp.html',640,630,'cr');return true;" 
//-    ONMOUSEOUT  = "oOpenWin.close();" 
//-    TITLE       = "Domain Name Help">Domain Name</A>
//- cOptions Codes (Case sensitive)
//- t Toolbar   l Location   d Directory   s Status   m Menu
//- c Scrollbar r Resizable  
//------------------------------------------------------------------
//  *** Copyright © 2000 Neatech, Inc.  All Rights Rreserved. ***  
//------------------------------------------------------------------
{
cWinOptn = ""  ; oRET = /t/ ; oREL = /l/ ; oRED = /d/ ; 
oRES     = /s/ ; oREM = /m/ ; oREC = /c/ ; oRER = /r/ ;
if (cURL == null) 
{ cURL = "/help/general/index.html" ; }
if (nWidth == null) 
{ nWidth  = 350 ; }
if (nHeight == null) 
{ nHeight = 300 ; }
if (nWidth > screen.availWidth) 
{ nWidth = screen.availWidth - 50 ; }
if (nHeight > screen.availHeight) 
{ nHeight = screen.availHeight - 50 ; }
if (cOptions == null || cOptions == "") 
{ cOptions = "" ; }
if (oRET.test(cOptions)) { cWinOptn = cWinOptn + "toolbar,"     ; }
if (oREL.test(cOptions)) { cWinOptn = cWinOptn + "location,"    ; }
if (oRED.test(cOptions)) { cWinOptn = cWinOptn + "directories," ; }
if (oRES.test(cOptions)) { cWinOptn = cWinOptn + "status,"      ; }
if (oREM.test(cOptions)) { cWinOptn = cWinOptn + "menubar,"     ; }
if (oREC.test(cOptions)) { cWinOptn = cWinOptn + "scrollbars,"  ; }
if (oRER.test(cOptions)) { cWinOptn = cWinOptn + "resizable,"   ; }
cWinOptn = cWinOptn + "width="  + nWidth + "," ;
cWinOptn = cWinOptn + "height=" + nHeight      ;
oOpenWin = window.open(cURL,"win",cWinOptn)    ;
if (navigator.appName == "NN" || navigator.appVersion > 4) 
{ this.oOpenWin.focus() ; }
}//#### end of ShowInfo() #### 

function QuickInfo(cURL,nWidth,nHeight) 
//------------------------------------------------------------------
//- Called to bring up a new window of cURL formated more like a
//- Info window then a full web browser window. Coded to be faster
//- then ShowInfo.
//- Company: www.neatech.com - Codejock: pnelson@neatech.com
//- Calling Example
//- <A HREF        = "JAVASCRIPT:QuickInfo('domhlp.html',640,630)" 
//-    ONMOUSEOVER = "QuickInfo('domhlp.html',640,630);return true;" 
//-    ONMOUSEOUT  = "oQuickWin.close();" 
//-    TITLE       = "Domain Name Help">Domain Name</A>
//------------------------------------------------------------------
//  *** Copyright © 2000 Neatech, Inc.  All Rights Rreserved. ***  
//------------------------------------------------------------------
{
if (cURL == null)   
{ cURL = "/about/help.html" ; }
if (nWidth == null) 
{ nWidth  = 350 ; }
if (nHeight == null) 
{ nHeight = 300 ; }
if (nWidth > screen.availWidth) 
{ nWidth = screen.availWidth - 50 ; }
if (nHeight > screen.availHeight) 
{ nHeight = screen.availHeight - 50 ; } 
oQuickWin = window.open(cURL,"win","width=" + nWidth + "," + "height=" + nHeight)    ;
if (navigator.appName == "NN" || navigator.appVersion > 4) 
{ this.oQuickWin.focus()  ; }
}//#### end of QuickInfo() ####

function DocDate ()
//------------------------------------------------------------------
//- Called to display the document last saved date and time
//- Company: www.neatech.com - Codejock: pnelson@neatech.com
//- Calling Example
//- <SCRIPT>document.write(DocDate());</SCRIPT>
//------------------------------------------------------------------
//  *** Copyright © 2000 Neatech, Inc.  All Rights Rreserved. ***  
//------------------------------------------------------------------
{
var sDoc = "" ;
var lBad = 0 ;
var sTmp = "" ;
if (document.lastModified == "January 1, 1970 GMT")
{ 
 var dDoc = new Date() ; 
 lBad     = 1 ; 
} 
else
{ var dDoc = new Date(document.lastModified) ; }
sTmp  = dDoc.getMonth() + 1 ;
sDoc += sTmp < 10 ? "0" + sTmp : sTmp ;
sDoc += "/" ;
if (lBad)
{ sTmp = dDoc.getDate() - 1 ; }
else
{ sTmp = dDoc.getDate() ; }
sDoc += sTmp < 10 ? "0" + sTmp : sTmp ; 
sDoc += "/" ;
sDoc += dDoc.getFullYear() ; 
if (lBad)
{ sDoc += " at 14:13:31" ; }
else
{ 
 sDoc += " at " ;
 sTmp  = dDoc.getHours() ;
 sDoc += sTmp < 10 ? "0" + sTmp : sTmp ;
 sDoc += ":" ;
 sTmp  = dDoc.getMinutes() ;
 sDoc += sTmp < 10 ? "0" + sTmp : sTmp ;
 sDoc += ":" ;
 sTmp  = dDoc.getSeconds() ;
 sDoc += sTmp < 10 ? "0" + sTmp : sTmp ;
}
return sDoc ;
}//#### end of DocDate() ####

