<!--
function TogglePreloader(bShow, imgWidth, imgHeight, PIVAlign)
{
  var objPreloader, objPreloaderCntr;
  if(document.getElementById)
  {
    objPreloader = document.getElementById('divPreloader');
    objPreloaderCntr = document.getElementById('divPreloaderCntr');
  }
  else
  {
    objPreloader = document.all('divPreloader');
    objPreloaderCntr = document.all('divPreloaderCntr');
  }
  if (!bShow)
  {
    // hide
    objPreloader.style.display = objPreloaderCntr.style.display = 'none';
    bPreloaderVisible = false;
    return;
  }
  // show
  var wndWidth = 0, wndHeight = 0, scrollX = 0, scrollY = 0;
  //var wndWidth = document.body.scrollWidth;
  //var wndHeight = document.body.scrollHeight;
  if(typeof(window.innerWidth) == 'number') {
    //Non-IE
    wndWidth = window.innerWidth;
    wndHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    wndWidth = document.documentElement.clientWidth;
    wndHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    wndWidth = document.body.clientWidth;
    wndHeight = document.body.clientHeight;
  }
  if( window.scrollX || window.scrollY) {
    scrollX = window.scrollX;
    scrollY = window.scrollY;
  }
  else if( window.pageXOffset || window.pageYOffset) {
    scrollX = window.pageXOffset;
    scrollY = window.pageYOffset;
  }
  else if( document.documentElement && (document.documentElement.scrollLeft || document.documentElement.scrollTop) ) {
    scrollX = document.documentElement.scrollLeft;
    scrollY = document.documentElement.scrollTop;
  }
  else if( document.body && (document.body.scrollLeft || document.body.scrollTop) ) {
    scrollX = document.body.scrollLeft;
    scrollY = document.body.scrollTop;
  }
  var cLeft = scrollX + Math.ceil((wndWidth  - imgWidth)  / 2); //
  switch(PIVAlign)
  {
    case 1:
    default:
      var cTop = (wndHeight > (600 + imgHeight) ? 300 : Math.ceil((wndHeight - imgHeight) / 2));    //
      break;
    case 2:
      // center
      var cTop = scrollY + Math.ceil((wndHeight - imgHeight) * 0.46);
      break;
  }
  objPreloader.style.top = cTop + "px";
  objPreloader.style.left = cLeft + "px";
  //objPreloaderCntr.style.top = scrollY + "px";
//  objPreloader.style.display = objPreloaderCntr.style.display = "inline";
  objPreloader.style.display = "inline";
  bPreloaderVisible = true;
}
//-->