/*
 +-------------------------------------------------------------------+
 |                    J S - L O A D E R   (v1.4)                     |
 |                          P a r t   I                              |
 |                                                                   |
 | Copyright Gerd Tentler               www.gerd-tentler.de/tools    |
 | Created: Mar. 26, 2002               Last modified: Mar. 28, 2006 |
 +-------------------------------------------------------------------+
 | This program may be used and hosted free of charge by anyone for  |
 | personal purpose as long as this copyright notice remains intact. |
 |                                                                   |
 | Obtain permission before selling the code for this program or     |
 | hosting this software on a commercial website or redistributing   |
 | this software over the Internet or in any other medium. In all    |
 | cases copyright must remain intact.                               |
 +-------------------------------------------------------------------+

======================================================================================================
 This script was tested with the following systems and browsers:

 - Windows XP: IE 6, NN 7, Opera 7, Firefox 1
 - Mac OS X:   IE 5

 If you use another browser or system, this script may not work for you - sorry.

 NOTE: Safari 1 (Mac OS X) does not support "document.images[].complete", so the progress bar will
       not be shown.
======================================================================================================
*/
//----------------------------------------------------------------------------------------------------
// Configuration
//----------------------------------------------------------------------------------------------------
  var _boxFont = "11px Arial";  // dialog box font (CSS spec: "style size family")
  var _boxFontColor = "#FF791D";               // dialog box font color
  var _boxWidth = 200;                         // dialog box width (pixels)
  var _boxHeight = 100;                        // dialog box height (pixels)
  var _boxBGColor = "#FFFFFF";                 // dialog box background color
  var _boxBorder = "1px solid #AA152C";       // dialog box border (CSS spec: "size style color")

  var _barLength = 150;                        // progress bar length (pixels)
  var _barHeight = 8;                         // progress bar height (pixels)
  var _barColor = "#AA152C";                   // progress bar color
  var _barBGColor = "";                 // progress bar background color

  var _fadeInSpeed = 0;                       // content fade-in speed (0 - 30; 0 = no fading)*

// * Fading was successfully tested only on Windows XP with IE 6, NN 7 and Firefox 1. It seems that
//   other browsers and systems do not support this feature.

//----------------------------------------------------------------------------------------------------
// Build dialog box and progress bar
//----------------------------------------------------------------------------------------------------

  var _safari = (navigator.userAgent.indexOf('Safari') != -1) ? true : false;

  if((document.all || document.getElementById) && !_safari) {
    document.write('<style> .clsBox { ' +
                   'position:absolute; top:50%; left:50%; ' +
                   'width:' + _boxWidth + 'px; ' +
                   'height:' + _boxHeight + 'px; ' +
                   'margin-top:-' + Math.round(_boxHeight / 2) + 'px; ' +
                   'margin-left:-' + Math.round(_boxWidth / 2) + 'px; ' +
                   (_boxBGColor ? 'background-color:' + _boxBGColor + '; ' : '') +
                   (_boxBorder ? 'border:' + _boxBorder + '; ' : '') +
                   'z-index:69; ' +
                   '} .clsBarBG { ' +
                   'width:' + (_barLength + 4) + 'px; ' +
                   'height:' + (_barHeight + 4) + 'px; ' +
                   'background-color:' + _barBGColor + '; ' +
                   'border-top:0px solid black; border-left:0px solid black; ' +
                   'border-bottom:0px solid silver; border-right:0px solid silver; ' +
                   'margin:0px; padding:0px; ' +
                   '} .clsBar { ' +
                   'width:0px; height:' + _barHeight + 'px; ' +
                   'background-color:' + _barColor + '; ' +
                   'border-top:0px solid silver; border-left:0px solid silver; ' +
                   'border-bottom:0px solid black; border-right:0px solid black; ' +
                   'margin:1px; padding:0px; ' +
                   'font-size:1px; ' +
                   '} .clsText { ' +
                   'font:' + _boxFont + '; ' +
                   'color:' + _boxFontColor + '; ' +
                   '} </style> ' +
                   '<div id="divBox" class="clsBox">' +
                   '<table border=0 cellspacing=0 cellpadding=0><tr>' +
                   '<td width=' + _boxWidth + ' height=' + _boxHeight + ' align=center>' +
                   (_boxText ? '<p class="clsText" align=center>' + _boxText + '</p>' : '') +
                   '<table border=0 cellspacing=0 cellpadding=0><tr><td width=' + _barLength + '>' +
                   '<div id="divBarBG" class="clsBarBG"><div id="divBar" class="clsBar"></div></div>' +
                   '</td></tr></table>' +
                   '</td></tr></table></div>' +
                   '<div id="Content" style="width:100%; visibility:hidden">');
  }

//----------------------------------------------------------------------------------------------------
