var imagenames = new Array(
"bi.gif"
, "bot.jpg"
, "l.gif"
, "logo.jpg"
, "lt.jpg"
, "mt.jpg"
, "sprite.gif"
);
document.write('<style type="text/css">#hi{visibility:hidden}</style><table id="t" style="width:100%;height:100%;position:absolute"><tr><td align="center" valign="middle"><font face="Comic Sans MS" color="006600" size="2">'+document.getElementById('pretxt').value+'</font><br><img style="border:none" src="'+document.getElementById('path').value+'inc/loading.gif" alt=""></td></tr></table>');
var imagesdone = false;
var loaded = 0, images = new Array();
function dispbars(){
  loaded++;
}
function checkload(index){
  (images[index].complete)? dispbars() : setTimeout('checkload('+index+')', 100);
}
function loadimages(){
  for(var i = 0; i < imagenames.length; i++){
    images[i] = new Image();
    images[i].src = imagenames[i];
    setTimeout('checkload('+i+')', i*100);
  }
  document.getElementById('t').style.display = 'none';
  document.getElementById('hi').style.visibility = 'visible';
}
function fseAddLoadEvent(func) {
  var oldonload = window.onload;
  if(typeof window.onload != 'function') window.onload = func;
  else {
    window.onload = function(){
      func();
      if(oldonload) oldonload();
    }
  }
}fseAddLoadEvent(function(){loadimages()});
