function getClassicHTML() {
var WA_classicHTML =
'<FORM NAME="WebsAlbum">' +
'  <table border="0" align="center" cellpadding="0" cellspacing="0">' +
'    <tr> ' +
'      <td width="50%" rowspan="2" align="right" valign="middle">' +
'	    <table border="0" cellspacing="0" cellpadding="0" width="370" align="right" id="tb">' +
'          <tr> ' +
'            <td width="25%" valign="top" align="center">' +
'			  <table border="0" cellspacing="0" cellpadding="0">' +
'' +
'                <tr> ' +
'                  <td width="18" align="right"><img border="0" src="http://images.freewebs.com/Images/WebsAlbum/tleft.gif" width="18" height="30"></td>' +
'' +
'                  <td width="100%" background="http://images.freewebs.com/Images/WebsAlbum/top.gif"> <p align="center"> <font face="Verdana" color="#FFFFFF" size=1> ' +
'                      <b><big>'+WebsAlbum.title+'</big></b> </font> </p></td>' +
'                  <td width="18"><img border="0" src="http://images.freewebs.com/Images/WebsAlbum/tright.gif" width="18" height="30"></td>' +
'                </tr>' +
'                <tr> ' +
'                  <td width="18" align="right" background="http://images.freewebs.com/Images/WebsAlbum/left.gif"></td>' +
'' +
'                  <td width="100%" bgcolor="#FFFFFF" valign="Center" align="Center" id="tbimg"><br> ' +
'                    <div id="Image" style="position:absolute; visibility:hidden;" valign="Center" align="Center"> ' +
'<a onClick="javascript:viewImage();"> <img name="PicShowing" src=' + document.imageArray[current].src + ' height=' + document.imageArray[current].height + ' width=' + document.imageArray[current].width + ' border=0 style="cursor:hand;filter:revealTrans(duration=2,transition=23)"></a>' +
'                    </div>' +
'                    <div id="blink" style="position:static; visibility:visible;">' +
'                      <div align="Left"><b>Loading</b><br></div>' +
'                      <div align="Right">0%</div>' +
'                    </div>' +
'' +
'                    <div id="prel" style="position:static; visibility:visible;"> ';


                        var prelbar = '';
                        for (var jloop=0; jloop < _WebsAlbum.length; jloop++) {
                          prelbar += '<img src="' + document.borderArray[0].src + '" height=20 width=' + maxWidth/_WebsAlbum.length + ' name="img' + jloop + '">';
                        }
                        prelbar += '<img src="' + document.borderArray[0].src + '" height=20 width=' + maxWidth/_WebsAlbum.length + ' name="img' + jloop + '">';
                        WA_classicHTML+=prelbar;


WA_classicHTML+= 
'                    </div>' +
'                  </td>' +
'                  <td width="18" background="http://images.freewebs.com/Images/WebsAlbum/right.gif"></td>' +
'                </tr>' +
'                <tr> ' +
'                  <td width="18" align="right"><img border="0" src="http://images.freewebs.com/Images/WebsAlbum/bleft.gif" width="18" height="30"></td>' +
'                  <td width="100%" background="http://images.freewebs.com/Images/WebsAlbum/bot.gif"></td>' +
'' +
'                  <td width="18"><img border="0" src="http://images.freewebs.com/Images/WebsAlbum/bright.gif" width="18" height="30"></td>' +
'                </tr>' +
'' +
'              </table>' +
'			</td>' +
'          </tr>' +
'        </table>' +
'	  </td>' +
'      <td width="30%" align="center" valign="top"> ' +
'' +
'        <table width="150" height="100" border="0" align="center" cellpadding="15" cellspacing="15">' +
'          <tr> ' +
'            <td width="25%" valign="top" align="center">' +
'' +
'			  <table border="0" align="center" cellpadding="0" cellspacing="0">' +
'                                        <tr> ' +
'                  <td width="18" align="right"><img border="0" src="http://images.freewebs.com/Images/WebsAlbum/tleft.gif" width="18" height="30"></td>' +
'                  <td width="100%" background="http://images.freewebs.com/Images/WebsAlbum/top.gif">' +
'				    <p align="center"><font face="Verdana" color="#FFFFFF" size=1> ' +
'                      <b><big> Control Panel</big></b>' +
'' +
'				    </font></p>' +
'				  </td>' +
'' +
'                  <td width="18"><img border="0" src="http://images.freewebs.com/Images/WebsAlbum/tright.gif" width="18" height="30"></td>' +
'                </tr>' +
'                <tr> ' +
'                  <td width="18" align="right" background="http://images.freewebs.com/Images/WebsAlbum/left.gif"><div align="center"></div></td>' +
'                  <td width="100%" bgcolor="#FFFFFF" valign="top" align="left"> ' +
'                    <p align="Center"> ' +
'					  <img src="http://images.freewebs.com/Images/WebsAlbum/white.gif" style="visibility:hidden;" height=0 width=150>' +
'<br><img src="' + document.borderArray[11].src + '" onClick="PreviousWebsAlbumPic();" id="imBut" style="visibility:hidden;" hspace="0" vspace="0" border="0">' +
'' +
'                      <br>' +
'' +
'<img src="' + document.borderArray[15].src + '" onClick="RandomWebsAlbumPic();" id="imBut2" style="visibility:hidden;" hspace="0" vspace="0" border="0">' +
'                      <br>' +
'<img src="' + document.borderArray[13].src + '" onClick="NextWebsAlbumPic();" id="imBut3" style="visibility:hidden;" hspace="0" vspace="0" border="0">' +
'                      <br>' +
'<a id="SSs"><img src="' + document.borderArray[17].src + '" onClick="runS();" id="imBut4" style="visibility:hidden;" hspace="0" vspace="0" border="0"><br></a>' +
'<img src="' + document.borderArray[19].src + '" onClick="javascript:Remote();" id="imBut5" style="visibility:hidden;" hspace="0" vspace="0" border="0">' +
'' +
'                    </p>' +
'				  </td>' +
'                  <td width="18" background="http://images.freewebs.com/Images/WebsAlbum/right.gif"><div align="center"></div></td>' +
'                </tr>' +
'                <tr> ' +
'                  <td width="18" height="30" align="right"><img border="0" src="http://images.freewebs.com/Images/WebsAlbum/bleft.gif" width="18" height="30"></td>' +
'                  <td width="100%" background="http://images.freewebs.com/Images/WebsAlbum/bot.gif"></td>' +
'                  <td width="18"><img border="0" src="http://images.freewebs.com/Images/WebsAlbum/bright.gif" width="18" height="30"></td>' +
'                </tr>' +
'' +
'              </table>' +
'			</td>' +
'          </tr>' +
'        </table>' +
'	  </td>' +
'    </tr>' +
'    <tr> ' +
'      <td height="150" align="left" valign="top"> ' +
'' +
'' +
'        <div id="tText" style="position:absolute; visibility:hidden"> ' +
'          <table border="0" cellspacing="0" cellpadding="0" width="275" align="left"> ' +
'            <tr> ' +
'              <td width="275" valign="top" align="center">' +
'                <table border="0" cellspacing="0" cellpadding="0" width="280">' +
'                  <tr> ' +
'                    <td width="18" align="right"><img border="0" src="http://images.freewebs.com/Images/WebsAlbum/tleft.gif" width="18" height="30"></td>' +
'                    <td width="275" background="http://images.freewebs.com/Images/WebsAlbum/top.gif">' +
'                      <p align="center"><font face="Verdana" color="#FFFFFF" size=1><b><big>' +
'                        <a id="titl"> ' +
_WebsAlbum[current].TitVal +
'                        </a>' +
'                      </big></b></font></p>' +
'                    </td>' +
'                    <td width="18"><img border="0" src="http://images.freewebs.com/Images/WebsAlbum/tright.gif" width="18" height="30"></td>' +
'                  </tr>' +
'                  <tr> ' +
'                    <td width="18" align="right" background="http://images.freewebs.com/Images/WebsAlbum/left.gif"></td>' +
'                    <td width="275" bgcolor="#FFFFFF" valign="top" align="left" noresize>' +
'                      <div id="Text"> ' +
'&nbsp;<b>' + _WebsAlbum[current].DatVal + '</b><div style="text-align:justify; text-indent:25px">' + _WebsAlbum[current].TxtVal + '</div>' +
'                      </div>' +
'                    </td>' +
'                    <td width="18" background="http://images.freewebs.com/Images/WebsAlbum/right.gif"></td>' +
'                  </tr>' +
'                  <tr> ' +
'                    <td width="18" align="right"><img border="0" src="http://images.freewebs.com/Images/WebsAlbum/bleft.gif" width="18" height="30"></td>' +
'                    <td width="275" background="http://images.freewebs.com/Images/WebsAlbum/bot.gif"></td>' +
'                    <td width="18"><img border="0" src="http://images.freewebs.com/Images/WebsAlbum/bright.gif" width="18" height="30"></td>' +
'                  </tr>' +
'                </table>' +
'              </td>' +
'            </tr>' +
'          </table>' +
'        </div>' +
'      </td>' +
'    </tr>' +
'' +
'  </table>' +
'' +
'</FORM>';
return WA_classicHTML;
}

self.name = "main";

var maxHeight = 302;
var maxWidth = 302;
var slideShowSpeed = 6000
var crossFadeDuration = 4

var jj=0, running=0, PicVar=0, i=0, xx=0, yy=0, zz=0, plCount=0, st=0, tval="", done=false;
var Remote, View, iss, isss;

function ShowAlbumNew(thisone)
{
  last = current;

  ShowAlbumPic(thisone);
}

function ShowAlbumPic(newpic)
{
  current = newpic;

if (document.images.PicShowing)
{
  if (document.all){
    document.images.PicShowing.filters.revealTrans.Transition=Math.floor(Math.random()*23);
    document.images.PicShowing.filters.revealTrans.stop();
  }
  document.images.PicShowing.src = document.borderArray[10].src;
  document.images.PicShowing.height = document.imageArray[current].height;
  document.images.PicShowing.width = document.imageArray[current].width;
  if (document.all){
    document.images.PicShowing.filters.revealTrans.apply();
  }
  document.images.PicShowing.src = document.imageArray[current].src;

  if (document.all){
    document.images.PicShowing.filters.revealTrans.play();
  }
  document.getElementById("Text").innerHTML = '&nbsp;<b>' + _WebsAlbum[current].DatVal + '</b><div style="text-align:justify; color=black; text-indent:25px">' + _WebsAlbum[current].TxtVal + '</div>';
  document.getElementById("titl").innerHTML = _WebsAlbum[current].TitVal;
}
}

function RandomWebsAlbumPic()
{
if(done){

  stopS();

  randompic = Math.floor(Math.random()*PicVar);
  last = current;
  ShowAlbumPic(randompic);
}
}

function PreviousWebsAlbumPic()
{
if(done){

  stopS();

  last = current;
  current--;
  if(current<0){current = PicVar - 1;}
  ShowAlbumPic(current);
}
}

function NextWebsAlbumPic()
{
if(done){

  stopS();

  last = current;
  current++;
  if (current>=PicVar){current = 0;}
  ShowAlbumPic(current);
}
}

function runS()
{
if(done){
  if (running == 1)
  {
    stopS();
  }
  else
  {
    running = 1;
    document.getElementById("SSs").innerHTML = "<img src=\"" + document.borderArray[18].src + "\" onClick=\"runS();\" id=\"imBut4\" hspace=\"0\" vspace=\"0\" border=\"0\"><br>";
    isss = setTimeout('runSlideShow()', slideShowSpeed);
  }
}
}

function stopS()
{
    running = 0;
    document.getElementById("SSs").innerHTML = "<img src=\"" + document.borderArray[17].src + "\" onClick=\"runS();\" id=\"imBut4\" hspace=\"0\" vspace=\"0\" border=\"0\"><br>";
    clearTimeout(iss);
    clearTimeout(isss);
	return;
}

function runSlideShow()
{
  if(running == 1)
  {
    last = current;
    current++;

    if (current>=PicVar){current = 0;}

  if (document.all){
    document.images.PicShowing.filters.revealTrans.Transition=Math.floor(Math.random()*23);
    document.images.PicShowing.filters.revealTrans.stop();
  }
    document.images.PicShowing.src = document.borderArray[10].src;
    document.images.PicShowing.height = document.imageArray[current].height;
    document.images.PicShowing.width = document.imageArray[current].width;

  if (document.all){
    document.images.PicShowing.filters.revealTrans.apply();
  }
    document.images.PicShowing.src = document.imageArray[current].src;

  if (document.all){
    document.images.PicShowing.filters.revealTrans.play();
  }
    document.getElementById("Text").innerHTML = '&nbsp;<b>' + _WebsAlbum[current].DatVal + '</b><div style="text-align:justify; text-indent:25px;color=black;">' + _WebsAlbum[current].TxtVal + '</div>';
    document.getElementById("titl").innerHTML = _WebsAlbum[current].TitVal;

    jj++;
    if (jj > (_WebsAlbum.length-1)){jj=0;}
  }
iss = setTimeout('runSlideShow()', slideShowSpeed);
}

function Remote()
{
if(done){

  stopS();

  Remote[i] = window.open("new.htm","Remote","height=400, width=165, toolbar=0, status=0, menubar=0, resizable=1, scrollbars=1");
  Remote[i].document.write('<head><title>&nbsp;WebsAlbum&nbsp;</title><style type="text/css"><!--body {scrollbar-3dlight-color:#FFFFFF;scrollbar-arrow-color:#000000;scrollbar-base-color:#FFFFFF;scrollbar-darkshadow-color:#FFFFFF;scrollbar-face-color:#C5C5C5;scrollbar-highlight-color:#000000;scrollbar-shadow-color:#000000;scrollbar-track-color:#FFFFFF}--></style></head><body bgcolor=#FFFFFF><FORM NAME="WebsAlbumRemote"><div style="text-align:center; font:8pt verdana"><br><i>WebsAlbum Contents:</i><br>');

  for (loop=0; loop < PicVar ; loop++)
  {
    title = _WebsAlbum[loop].TitVal;
    Remote[i].document.write('<br><br><a href=javascript:ShowAlbumNew(' + loop + '); target="main">' + title);
    Remote[i].document.write('<br><img name="PicRemote" src=' + document.imageArray[loop].src + ' height=50 width=50 border=0></a>');
  }
  Remote[i].document.write('<br><br><br><input type=button value="Close Remote" onClick="javascript:self.close();" style="font:8pt verdana,helvetica,arial; text-align:center"></FORM>');
  i++;

  plB();
  pl();
  resizeImages();

}
}

function viewImage()
{
if(done){

  stopS();

  View = window.open("WebsAlbumImage.htm","View");

  var date = _WebsAlbum[current].DatVal;
  var title = _WebsAlbum[current].TitVal;
  var picsrc = document.imageArray[current].src;
  var desctxt = _WebsAlbum[current].TxtVal;

  View.document.write('<head><title>&nbsp;WebsAlbum&nbsp;</title><style type="text/css"><!--body {scrollbar-3dlight-color:#FFFFFF;scrollbar-arrow-color:#000000;scrollbar-base-color:#FFFFFF;scrollbar-darkshadow-color:#FFFFFF;scrollbar-face-color:#C5C5C5;scrollbar-highlight-color:#000000;scrollbar-shadow-color:#000000;scrollbar-track-color:#FFFFFF}--></style></head><body bgcolor=#FFFFFF>');
  View.document.write('<form name="WebsAlbumImage"><div style="text-align:center; font:10pt verdana">' + title + '<br></div>');
  View.document.write('<div align="Center"><img src="' + picsrc + '"></div>');
  View.document.write('<div style="text-align:center; font:8pt verdana"><br><b>' + date + '</b><br></div>');
  View.document.write('<div style="text-align:center; font:8pt verdana"><br><i>' + desctxt + '</i><br></div>');
  View.document.write('<div align="Center"><br><input type=button value="Close" onClick="javascript:self.close();" style="font:8pt verdana,helvetica,arial; text-align:center"></div></form>');

  plB();
  pl();
  resizeImages();

}
}

//<!---------------------------------------------------------------------------->

function plB()
{
  document.borderArray = new Array();
  Srcc = new 
Array("http://images.freewebs.com/Images/WebsAlbum/black.gif",		// 1
      "http://images.freewebs.com/Images/WebsAlbum/blue.gif",		// 2
      "http://images.freewebs.com/Images/WebsAlbum/bleft.gif",		// 3
      "http://images.freewebs.com/Images/WebsAlbum/bot.gif",		// 4
      "http://images.freewebs.com/Images/WebsAlbum/bright.gif",	// 5
      "http://images.freewebs.com/Images/WebsAlbum/left.gif",		// 6
      "http://images.freewebs.com/Images/WebsAlbum/right.gif",		// 7
      "http://images.freewebs.com/Images/WebsAlbum/tleft.gif",		// 8
      "http://images.freewebs.com/Images/WebsAlbum/top.gif",		// 9
      "http://images.freewebs.com/Images/WebsAlbum/tright.gif",	// 10
      "http://images.freewebs.com/Images/WebsAlbum/white.gif",		// 11
      "http://images.freewebs.com/Images/WebsAlbum/b1.gif",		// 12
      "http://images.freewebs.com/Images/WebsAlbum/b12.gif",		// 13
      "http://images.freewebs.com/Images/WebsAlbum/b2.gif",		// 14
      "http://images.freewebs.com/Images/WebsAlbum/b22.gif",		// 15
      "http://images.freewebs.com/Images/WebsAlbum/b3.gif",		// 16
      "http://images.freewebs.com/Images/WebsAlbum/b32.gif",		// 17
      "http://images.freewebs.com/Images/WebsAlbum/b4.gif",		// 18
      "http://images.freewebs.com/Images/WebsAlbum/b5.gif",		// 19
      "http://images.freewebs.com/Images/WebsAlbum/b6.gif",		// 20
      "http://images.freewebs.com/Images/WebsAlbum/b62.gif");		// 21

  for(var ploop=0; ploop < Srcc.length; ploop++)
  {
    document.borderArray[ploop] = new Image;
    document.borderArray[ploop].src = Srcc[ploop];
  }
}
<!------------------------------------------------------------------------------>
function pl()
{
  document.imageArray = new Array(_WebsAlbum.length);
  document.loaded = new Array(_WebsAlbum.length);
  document.loadedd = new Array(_WebsAlbum.length);
  for (var floop=0; floop < _WebsAlbum.length ; floop++)
  {
    document.imageArray[floop] = new Image;
    document.imageArray[floop].src = _WebsAlbum[floop].PicVal;
    document.loaded[floop] = false;
    document.loadedd[floop] = false;
  }
  if (!done)
  {
    cl();
  }
}

function cl()
{
  if(plCount == _WebsAlbum.length)
  {
//  alert("All done.");
    clearTimeout(ccl);
    return;
  }

  for (var ffloop=0; ffloop < _WebsAlbum.length ; ffloop++)
  {
    if(document.loaded[ffloop] == false && document.imageArray[ffloop].complete)
    {
      document.loaded[ffloop] = true;
      document.loadedd[ffloop] = true;

      plCount++;
    }
  }

  var ccl = setTimeout("cl()",10);
}

function resizeImages()
{
  for (var floop=0; floop < _WebsAlbum.length ; floop++)
  {
    if ( (document.imageArray[floop].height < 200) && (document.imageArray[floop].width < 200) )
    {
      document.imageArray[floop].height = (document.imageArray[floop].height);

      document.imageArray[floop].width = (document.imageArray[floop].width);
    }
    else
    {
      if (document.imageArray[floop].height > document.imageArray[floop].width)
      {
//      ty += "Height is larger...";
        var xx = document.imageArray[floop].height / maxHeight;
        document.imageArray[floop].height = (document.imageArray[floop].height / xx);
        document.imageArray[floop].width = (document.imageArray[floop].width / xx);
      }
      else if (document.imageArray[floop].width > document.imageArray[floop].height)
      {
//      ty += "Width is larger...";
        var yy = document.imageArray[floop].width / maxWidth;
        document.imageArray[floop].width = (document.imageArray[floop].width / yy);
        document.imageArray[floop].height = (document.imageArray[floop].height / yy);
      }
      else
      {
//      ty += "Same...";
        var zz = document.imageArray[floop].width / maxWidth;
        document.imageArray[floop].width = (document.imageArray[floop].width / zz);
        document.imageArray[floop].height = (document.imageArray[floop].height / zz);
      }
	}
  }
  return;
}

function press(imageName, imSrc)
{
  document.images[imageName].src = imSrc;
}


function createImage(DatVal, PicVal, TitVal, TxtVal)
{ 
  this.DatVal = DatVal;
  this.PicVal = PicVal;
  this.TitVal = TitVal;
  this.TxtVal = TxtVal;
}

var _WebsAlbum = new Array();

for(i=0;i<WebsAlbum.TOTAL_PICS;i++) {
  _WebsAlbum[PicVar++] = new createImage("",WebsAlbum.pics[i],WebsAlbum.titles[i],WebsAlbum.captions[i]);
}

last = PicVar - 1;
current = 0;


function blink()
{
  if(tval.length > 3){tval="";}
  document.getElementById("blink").innerHTML = '<div align="Left"><b>Loading' + tval + '</b><br></div><div align="Right">' + Math.round((st/_WebsAlbum.length)*100) + '%</div>';
  tval += ".";
}

function tt()
{
  for (var ffloop=0; ffloop < _WebsAlbum.length; ffloop++)
  {
    if(document.loadedd[ffloop])
    {
      eval('document.img' + st + '.src = "' + document.borderArray[1].src + '";');
      document.loadedd[ffloop] = false;
      st++;
    }
  }

  if (st == _WebsAlbum.length)
  {
    eval('document.img' + st + '.src = "http://images.freewebs.com/Images/WebsAlbum/blue.gif";');
    clearInterval(i1);
    clearInterval(i2);
    
    document.getElementById("prel").style.visibility = "hidden";
    document.getElementById("prel").style.position = "absolute";
    document.getElementById("blink").style.visibility = "hidden";
    document.getElementById("blink").style.position = "absolute";

    resizeImages();

    document.getElementById("imBut").style.visibility = "visible";
    document.getElementById("imBut").src = document.borderArray[11].src;
    document.getElementById("imBut2").style.visibility = "visible";
    document.getElementById("imBut2").src = document.borderArray[15].src;
    document.getElementById("imBut3").style.visibility = "visible";
    document.getElementById("imBut3").src = document.borderArray[13].src;
    document.getElementById("imBut4").style.visibility = "visible";
    document.getElementById("imBut4").src = document.borderArray[17].src;
    document.getElementById("imBut5").style.visibility = "visible";
    document.getElementById("imBut5").src = document.borderArray[19].src;

    document.getElementById("tbimg").height = maxHeight + 30;
    document.getElementById("Image").style.visibility = "visible";
    document.getElementById("Image").style.position = "static";
    document.getElementById("tText").style.visibility = "visible";
    document.getElementById("tText").style.position = "static";

    document.images.PicShowing.src="http://images.freewebs.com/Images/WebsAlbum/white.gif";
    ShowAlbumPic(current);

    done = true;
  }
}

var i1 = setInterval("tt()",100);
var i2 = setInterval("blink()",300);



function drawWebsAlbum() {
  plB();
  pl();
//  document.write(WA_classicHTML);
document.write(getClassicHTML());
}
