//   
// %%%-KRUST-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% last modified 00/00/98 %%%%%%%%
//
//         This JAVASCRIPT is used to show messages on the Browser's
//                                Status Bar.
//
//     if you wanna use this code - you have to ask the permission first
//
//                   krust@axess.com or tomasd@axess.com
//         http://www.geocities.com/SoHo/Studios/4407/krust.html
//
//                (c) 1998 Thomas Robert de Massy - KRUST
//
//          You cannot use any of these codes without permission
//
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%-KRUST-%%%


<!--


 // ***************************************************************************************************
 // ***************************************************************************************************
 // *                                                                                                 *
 // *                                Window Status bar Messages Functions                             *
 // *                                                                                                 *
 // *                                  Thomas R. de Massy - KRUST (1998)                              *
 // *                             if you wanna use this code - please ask the                         *
 // *                                permission first at tomasd@axess.com                             *
 // *                                       or krust@axess.com                                        *
 // ***************************************************************************************************

 // Global (in this HTML doc) Variables Declarartion
 // ------------------------------------------------

 var timerID      = null
 var timerRunning = false
 var mspeed      = 1

 var decalNumber  = 150

 var upperLowerCase    = 0  // This var is either 0 or 1, it's use with the Upper/Lower Case Alternate Option
 var currentcasechange = 0

 var currentObjectNo = 0  // The StatusBar No to display
 var objectNumber    = 0  // The Total number of Objects
 var globalObject    = "" // Use to keep a copy of the StatusBar object Array available for all functions

 var tempmessageon   = false // Use by show/stopTempMessage()
 var stringtoshow    = ""    // Use in showstatus
 var stringtoshow2   = ""    // Use in showstatus
 var leftdecalNumber = 0

 //////////////////////////////////////////////////////////////////////////////////////////////////////
 // The object for the Status bar messages
 //////////////////////////////////////////////////////////////////////////////////////////////////////
 function commandString ()
 {
   number = 0
   mode   = ""
   string = ""
   align  = 0
   pause  = false
   end    = ""
   casechange = 0
   casechangespace = 0
 }
 //////////////////////////////////////////////////////////////////////////////////////////////////////




 //////////////////////////////////////////////////////////////////////////////////////////////////////
 // Creates <no> commandString objects - with the objectname Array
 //////////////////////////////////////////////////////////////////////////////////////////////////////
 function registerStatusObject (objectname,no)
 {
  // objectNumber = no  The Total number of object
  obj = objectname  

  for (var fois = 0; fois <= no-1; fois++)
   {
    obj[fois] = new commandString()
 
    // Declare the Default value of the object
    obj[fois].mode   = "LEFT"
    obj[fois].string = "Message no " + (fois+1) + " : No String Entered Yet !!"
    obj[fois].align  = 0
    obj[fois].pause  = false
    obj[fois].end    = "CLEAR"
    obj[fois].number = no
    obj[fois].casechange = 0
    obj[fois].casechangespace = 1
   }
  objectname = obj
 }
 //////////////////////////////////////////////////////////////////////////////////////////////////////




 //////////////////////////////////////////////////////////////////////////////////////////////////////
 // Stop the message
 //////////////////////////////////////////////////////////////////////////////////////////////////////
 function stopMessageClock()
 {
   if (timerRunning) { clearTimeout(timerID) }
   timerRunning = false
 }
 //////////////////////////////////////////////////////////////////////////////////////////////////////




 //////////////////////////////////////////////////////////////////////////////////////////////////////
 // Start the Clock for the message
 //////////////////////////////////////////////////////////////////////////////////////////////////////
/* function startMessageClock(message,speed)
 {
   stopMessageClock()
   mspeed      = speed
   showmessage = message
   ShowStatus ()
 }*/
 //////////////////////////////////////////////////////////////////////////////////////////////////////




 //////////////////////////////////////////////////////////////////////////////////////////////////////
 // Start the showing of a temporary message (use for buttons & other links objects)
 //////////////////////////////////////////////////////////////////////////////////////////////////////
 function showTempMessage(tempmessage)
 {
   parent.tempmessagestring = tempmessage
   leftdecalNumber = 0
   decalNumber = 50
   tempmessageon     = true
 }
 //////////////////////////////////////////////////////////////////////////////////////////////////////



 //////////////////////////////////////////////////////////////////////////////////////////////////////
 // Start the showing of a temporary message (use for buttons & other links objects)
 //////////////////////////////////////////////////////////////////////////////////////////////////////
 function stopTempMessage(message)
 {
   leftdecalNumber = 0
   decalNumber = 150
   tempmessageon = false
 }
 //////////////////////////////////////////////////////////////////////////////////////////////////////



 //////////////////////////////////////////////////////////////////////////////////////////////////////
 // Start the Clock for the message
 //////////////////////////////////////////////////////////////////////////////////////////////////////
 function startStatusMessage(Strobjectname,speed)
 {
   stopMessageClock()
   mspeed          = speed
   currentObjectNo = 0 // The first string of the Array

   globalObject = Strobjectname // copy the current object in the global object array

   ShowStatus ()
 }
 //////////////////////////////////////////////////////////////////////////////////////////////////////



 //////////////////////////////////////////////////////////////////////////////////////////////////////
 // Do The Upper/Lower Case Calculation
 // Or do nothing if it's disabled
 //////////////////////////////////////////////////////////////////////////////////////////////////////
 function doUpperLowerCase (themessage2)
 {
 
 AltspaceNo = 2                                              // Used to change the space between case alternation change
 Altspace   = globalObject[currentObjectNo].casechangespace  // Used to change the space between case alternation change

 tempmessage = themessage2            // return themessage2 if casechange == 0
 tempUpperLowerCase = upperLowerCase

 if (globalObject[currentObjectNo].casechange != 0) // Exit & return themessage2 if == 0
 {

  tempmessage = ""

  // Calculate the speed of the upper/lower case alternation
  if (currentcasechange <= globalObject[currentObjectNo].casechange)
   currentcasechange++
  else
  {
     currentcasechange = 1
     if (upperLowerCase == 0)
     {    
      tempUpperLowerCase = 0
      upperLowerCase = 1
     }
     else
     {
      tempUpperLowerCase = 1
      upperLowerCase = 0
     }
  }

  // Calculate The Upper/Lower Case on each letters
  for (var fois =0; fois <= themessage2.length; fois++)
   {

    templetter = themessage2.charAt(fois)

    if (tempUpperLowerCase == 0)
     {
      templetter = templetter.toLowerCase()

      // Calculate the Alternation Space
      if (AltspaceNo <= Altspace)
       AltspaceNo++
      else
       {
        tempUpperLowerCase = 1
        AltspaceNo = 2
       }

    }
    else
     {
      templetter = templetter.toUpperCase()

      // Calculate the Alternation Space
      if (AltspaceNo <= Altspace)
       AltspaceNo++
      else
       { 
        tempUpperLowerCase = 0
        AltspaceNo = 2
       }

     }
 
    tempmessage = tempmessage + templetter
   }

 } // End casechange != 0

 return tempmessage // return the unaltered or altered string

 } // End doUpperLowerCase
 //////////////////////////////////////////////////////////////////////////////////////////////////////




 //////////////////////////////////////////////////////////////////////////////////////////////////////
 // Do the Caracters Decal on the String
 //////////////////////////////////////////////////////////////////////////////////////////////////////
 function decalMessage (themessage)
 {

  themessage = doUpperLowerCase (themessage)

  for (var fois = 1; fois <= decalNumber; fois++)
    themessage = " " + themessage


  return themessage
 }
 //////////////////////////////////////////////////////////////////////////////////////////////////////




 //////////////////////////////////////////////////////////////////////////////////////////////////////
 // Do the actual Status bar message showing
 //////////////////////////////////////////////////////////////////////////////////////////////////////
 function ShowStatus ()
 {
 if (parent.statusbarmsgenabled == 1)
 {
   //temp
  if (leftdecalNumber >= stringtoshow.length)
  {
   leftdecalNumber = 0
   decalNumber     = 150
//   if (currentObjectNo != (objectNumber-1)) 
  if (currentObjectNo != (globalObject[currentObjectNo].number-1)) 
    {currentObjectNo++}
   else 
    {currentObjectNo = 0}
  }

   stringtoshow   = globalObject[currentObjectNo].string

   // Used to show a temporary message
   if (tempmessageon)
   { stringtoshow   = window.top.tempmessagestring }

   if (decalNumber <= 0)
    { 
     leftdecalNumber = leftdecalNumber + 1
     stringtoshow2    = stringtoshow.substring (leftdecalNumber,stringtoshow.length)
     for (var spacefois = 0; spacefois <= ((leftdecalNumber+150)*2); spacefois ++)
       { stringtoshow2 = stringtoshow2 + ' ' }
    }
   else
    { 
     stringtoshow2 = stringtoshow 
     for (var spacefois = 0; spacefois <= (150-decalNumber); spacefois ++)
       { stringtoshow2 = stringtoshow2 + ' ' }
    }  

   stringtoshow2   = decalMessage(stringtoshow2)

   window.status  = stringtoshow2
   
   timerID = setTimeout ("ShowStatus()",mspeed)  
   timerRunning = true

//   if (globalObject[currentObjectNo].mode == "LEFT") 
     decalNumber-- 
//   else 
//    { decalNumber++ }
 
 } // end statusbarmsgenabled
 }
 //////////////////////////////////////////////////////////////////////////////////////////////////////



 // ***************************************************************************************************
 // End Window Status bar Messages Functions
 // ***************************************************************************************************


//-->


/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                             all Images,Java Applets,Music,Logos,Textures,
                             Javascript codes found on the site :
                             (c) 1997-1998 Thomas Robert de Massy (KRUST)
                             all rights reserved
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%-KRUST-%%%
*/