

var textarea_n = "textarea16";

function dw(s) {
  document.writeln(s);
}


var ddd = !false;

function showDebug() {
  if (ddd) return;
  window.top.debugWindow =
      window.open("",
                  "Debug",
                  "left=0,top=0,width=700,height=700,scrollbars=yes,"
                  +"status=yes,resizable=yes");
  window.top.debugWindow.opener = self;
  window.top.debugWindow.document.open();
  var m="<HTML><HEAD><TITLE>Debug Window</TITLE></HEAD><BODY>";
  window.top.debugWindow.document.write(m);
}

function debug(text) {
  if (ddd) return; 
 
  if (window.top.debugWindow && ! window.top.debugWindow.closed) {
    window.top.debugWindow.document.write(text);
  }
}

function d2(text) {
  d(text + '<BR>');
}

function hideDebug() {
  if (ddd) return;
  if (window.top.debugWindow && ! window.top.debugWindow.closed) {
    window.top.debugWindow.close();
    window.top.debugWindow = null;
  }
}

function toggleDebug() {
  //if (ddd) return;
  if (document.getElementById("debugOn").checked) {
    ddd = false;
    showDebug();
    d2("Check box checked, switched on debug");
    document.getElementById("checkboxLabel").innerHTML = "The debug window is <b>on</b>";
  } else {
    d2("Check box unchecked, switching off debug");
    hideDebug();
    ddd = true;
    document.getElementById("checkboxLabel").innerHTML = "The debug window is <b>off</b>";
  }
}

// ******************************************************************************************************************************* 

  var xc      = -1;

  var xSleep  = xc--;
  var xDup    = xc--;
  var xPrint  = xc--;
  var xDebug  = xc--;
  var xRand   = xc--;
  var xPic1   = xc--;
  var xPic2   = xc--;
  var xBreak  = xc--;
  var xAdd    = xc--;
  var xSub    = xc--;
  var xMovPic = xc--;

  var xMax    = xc + 1;

  var xNames = new Array();

  xNames[xSleep] = 'xSleep';
  xNames[xDup  ] = 'xDup';
  xNames[xPrint] = 'xPrint';
  xNames[xDebug] = 'xDebug';
  xNames[xRand ] = 'xRand';
  xNames[xPic1 ] = 'xPic1';
  xNames[xPic2 ] = 'xPic2';
  xNames[xBreak] = 'xBreak';
  xNames[xAdd  ] = 'xAdd'; 
  xNames[xSub  ] = 'xSub';
  xNames[xMovPic]= 'xMovPic';

  for (i=-1;i >= xMax ;i--) {
    if (xNames[i] == null) {
       alert('xnames at ' + i);
    }
  }

// ******************************************************************************************************************************* 

  var xc=0;

  var cPencil   = xc++;
  var cCharcoal = xc++;

  var cMax    = xc - 1;
  var cAll    = cMax + 1;

  var cNames = new Array();
  cNames[cPencil]  ='Pencil';
  cNames[cCharcoal]='Charcoal';

  cNames[cAll]='All';

  for (c=0;c <= cMax;c++) {
    if (cNames[c] == null) {
      alert ('cNames at ' + c)
    }
  }

// ******************************************************************************************************************************* 
  
var tic = 0;

// ******************************************************************************************************************************* 

var clocksize=75

// ******************************************************************************************************************************* 

var schedList = new Array();

var sched_running = !false;

// ******************************************************************************************************************************* 

function toggleSched() {
  if (document.getElementById("SchedOn").checked) {
    sched_running=true;
    d2("Check box checked, sched is running");
    document.getElementById("schedOnMsg").innerHTML = "The sched is <b>running</b>";
  } else {
    d2("Check box unchecked, sched has been stopped");
    sched_running=false;
    document.getElementById("schedOnMsg").innerHTML = "The sched has been <b>stopped</b>";
  }
}

// ******************************************************************************************************************************* 

function sched() {

  tic++;

  if (tic == 5000) {tic=0;}

  if (tic > 200) {toggleSched();}

  document.getElementById('TIC').firstChild.nodeValue = tic;

  if ((tic % 5) == 0) d2("tic=" + tic);

  if (tic >= 1) {
    if (sched_running) if ((tic % 1) == 0) {
      d2('n=' + schedList.length);
      var i;
      for (i=0;i < schedList.length;i++) {
        d2('schedList[' + i+']');
        schedList[i].ex();
      }
      d2('done');
    } else {
      if ((tic % 10) == 0) d2("sched=" + sched_running);
    }
  }
}

// ******************************************************************************************************************************* 

function updatePointers() {

  var now = new Date();
	
  secondsPointer.style.rotation = now.getSeconds() *  6; 
  minutesPointer.style.rotation = now.getMinutes() *  6 + now.getSeconds() / 10;
  hoursPointer.style.rotation   = now.getHours()   * 30 + now.getMinutes() /  2;
}

// ******************************************************************************************************************************* 

if (0)
if (document.all&&window.print){
  window.attachEvent("onload", initVMLClock);
  window.attachEvent("onresize", resizeObjects);
}

function sss() {


//document.writeln("
//<STYLE TYPE=\"text/css\" MEDIA=screen>
//.f10{ 
//    font-size: 10pt;
//    line-height: 14pt; 
//    font-family: helvetica; 
//    font-variant: normal;
//    font-style: normal;
//  }
//</STYLE>
//");
}

// ******************************************************************************************************************************* 

function initVMLClock() {
  resizeObjects();
  updatePointers();
  window.setInterval("updatePointers()", 1000);
  window.setInterval("sched()", 1000);
}

// ******************************************************************************************************************************* 

function resizeObjects() {

  var size = Math.min(clocksize, clocksize);

  clock.style.pixelWidth = size - 2*(size * 0.045);
  clock.style.pixelHeight = size - 2*(size * 0.045);
	
  clock.childNodes.item(0).childNodes.item(0).weight = size * 0.01;

  secondsPointer.childNodes.item(0).childNodes.item(0).weight = size * 0.001;
  minutesPointer.childNodes.item(0).childNodes.item(0).weight = size * 0.002;
  hoursPointer.childNodes.item(0).childNodes.item(0).weight = size * 0.004;	
}

// ******************************************************************************************************************************* 

function toggle(sId) {

  var el = document.getElementById(sId);
	
  el.style.display = (el.style.display == "none") ? "block" : "none";
}

// ******************************************************************************************************************************* 

var pictureList = new Array();

function pictureType(title,url,caption) {

  this.title=title;
  this.url=url;
  this.caption=caption;
  this.id = pictureList.length;

  pictureList.push(this);

  d2("picture: id=" + this.id + " title=" + this.title + " url=" +this.url + " cap=" + this.caption);
  
  this.dump = function() {
    for (i=0;i < pictureList.length;i++) {
      d("picture " + i);
    }
  }
}

// ******************************************************************************************************************************* 

function randi(min,max) {
  var i=Math.random();
  var v = i * (max - min) + 1 + min;
  d('i= ',i,' v= ',v);
  return Math.floor (v)
}

// ******************************************************************************************************************************* 

function sleepms(millis) 
{
date = new Date();
var curDate = null;

do { var curDate = new Date(); } 
while(curDate-date < millis);
} 

// ******************************************************************************************************************************* 

function grow_image (image_name,pic_name,n,max,delay) {

  var x = document.images[image_name];

  if (x.height < max) {
    if (x.height < 100) {
      x.height += n;
    } else {
      x.src = pic_name;
      x.height += n;
    }
    var cmd = "grow_image('" + image_name + "','" + pic_name + "'," + n + "," + max + "," + delay + ")"; 
 // x.alt = cmd;
    setTimeout(cmd,delay);
  }
  x.src = pic_name;
} 

// ******************************************************************************************************************************* 

function image_on (image_name,thumb_name,pic_name) {

  var x = document.images[image_name];

  var i = x.src.indexOf(pic_name);
  x.alt = x.src + " - " + pic_name + " " + i;

  if (i == -1) {
    x.height = 100;
    x.src=pic_name;
    sleepms(411);
    grow_image(image_name,pic_name,15,500,50);
  }
}

// ******************************************************************************************************************************* 

function MasterPageType (title) {

  this.title=title;

  this.project= new Array();
  
  this.menuItem = function(s,f,n) {
    document.writeln("<a class=\"black20\" href=/adriennescott/" + f + ".html#top2>" + s + "</a><span class='linksdivider'></span>");
    if (n == 1) {
      document.writeln("<BR>");
    }
  }

  // *************************************************************************

  this.menu = function(n) {

    if (parseInt(n) == NaN) {
      n=10;
    }

    if (n == 0) {
      n=20;
    }

    for (i=0;i < n;i++) {
            
      document.writeln("<HR>");
      this.menuItem("Home/FTAG"    ,"../index"   ,n);
      this.menuItem("Art"          ,"art"        ,n);
      this.menuItem("Contacts"     ,"../contacts",n);
      document.writeln("<HR><BR>");

      this.menuItem("Pencil"     ,"p_pencil"  ,n);
      this.menuItem("Charcoal"   ,"p_charcoal",n);
     
      document.writeln("<BR>");
      this.menuItem("All Projects" ,"art_all"    ,n);

      document.writeln("<br><A HREF='http://ftag.org:2082/frontend/x/index.html' target='_blank' >Login</A>");
      document.writeln("<A HREF='http://dictionary.reference.com/search?q=richard'>Dictonary</A>");
      document.writeln("<A HREF='http://thesaurus.reference.com/search?q=richard'>Thesaurus</A>");

      document.writeln("<BR><BR><BR>");
    }
  }

  // *************************************************************************

  this.show_project = function(cclass) {
    // document.writeln("<DIV id='image_2' class='imageitem'><img src='images/rts1.gif' border=1 width=300 ></DIV>"); 
 
    for (i=0;i < 2;i++) {
      document.writeln("<BR>");
    }

    document.writeln("<A NAME='TOP2'><BR><BR>"); 
    document.writeln("<P CLASS=gray50 >&nbsp;&nbsp;" + cNames[cclass] + " "); 
    document.writeln("<P CLASS=black50>" + cNames[cclass] + " "); 
    dw("<BR><BR><BR><BR><BR>");
    document.writeln("<HR WIDTH=600 COLOR=BLACK ALIGN=LEFT>");      

    document.writeln("<TABLE>");

    var c = cMax + 10;
    var p;
    for (p=0; p < this.project.length;p++) {
      
      pp=this.project[p];

      if ((cclass == pp.cclass) | (cclass == cAll)) {
        if (c != pp.cclass) {
         c=pp.cclass;
         document.writeln("<BR><TR VALIGN='TOP' CLASS='" + textarea_n + "'><TD CLASS='menulinks'>" + cNames[c] + "<TD>");
        }
        document.writeln("<A HREF='#P" + p + "'>" + pp.title + "</A><BR>");
      //document.writeln("<P > <FONT COLOR=WHITE>" + pp.title + "</FONT><BR>"); 
      }  
    }
   
    document.writeln("</TABLE>");

    var image_num = 0;

    var p;
    for (p=0; p < this.project.length;p++) {

      dw("<FONT COLOR=BLACK>"); 
 
      pp=this.project[p];

      if ((cclass == pp.cclass) | (cclass == cAll)) {
     
        dw("<A NAME='P" + p + "'>");
        dw("<BR><BR>");
// xxx

        dw("<TABLE WIDTH='100%' COLOR=BLACK>");
        dw("<TR><TD COLSPAN=10><FONT COLOR=BLACK>" + pp.title + "</FONT>");
        dw("<TR><TD COLSPAN=" + pp.view.length+1 + "><HR ALIGN='LEFT' WIDTH='130%' ROWSPAN=3>");
        dw("<TR><TD CLASS=" + textarea_n + ">" + pp.date + "<TR><TD>");
        dw("<TR><TD VALIGN='TOP' COLSPAN=3 >");
        dw("<DIV CLASS=" + textarea_n +">");

        for (t=0;t < pp.text.length;t++) {
          dw(pp.text[t]);
        }           

        dw("</DIV>");
      
        if (pp.view.length >= 5) {
          dw("<TR>");    
        }

        var image_name = "image_" + image_num;

        var td = 0;
        var v;
        for (v=0;v < pp.view.length;v++) {
          var vv = pp.view[v];
          dw("<TD>");    
          td++;

          var moo = " onMouseOver=\"image_on('" + image_name + "','" + vv.pic_t.url + "','" + vv.pic_l.url + "')\"";
         
          dw("<A HREF=" + vv.pic_t.url + ">");
          dw("<IMG" + moo + " SRC=" + vv.pic_t.url + " height= " + 100 + " alt= '" + pp.title + '\n' + vv.title + "\n\nClick to enlarge in new window' " + ">")    
          dw("</A>");
       // dw("moo= " + moo);
          

          dw("<TD CLASS=" + textarea_n + ">");
          td++;
          var t;
          for (t=0;t < vv.text.length;t++) {
            dw(vv.text[t]);
          } 

          if (vv.thumb == vv.large) {
            dw("<DIV CLASS=R20>Need Thumb as thumb and large images are the same</DIV>");
          }
          
          if (td >= 5) {
           td=0;
           dw("<TR>");    
          }

        }  
        dw("</TABLE>");

        image_num++;

        dw("<P CLASS=" + textarea_n +"> Place mouse over image to view in more detail.");

     // dw("<p>image_name= " + image_name);
        dw("<P><img alt= \"" + image_name + "\" name=\"" + image_name + "\" xsrc=\"images/selectanimage1.gif\" height=0 border=0>");

        document.images[image_name].visibility="hidden";
      }
      dw("<FONT COLOR=BLACK>"); 
    }

    for (i=0;i <30;i++) {
      dw("<BR>");
    }
    dw("<P> End of Page");
    for (i=0;i <30;i++) {
      dw("<BR>");
    }
     
  //for (property in MasterPage) document.write(property+' has the value '+ MasterPage[property]+'<BR>');

  }  

// *********************************
// *********************************

  this.show = function() {
      

    var cclass = -9;
    var toc = 0;

    var xxxr=0;
    var xxxc=-1;

    var p;
    for (p=0; p < this.project.length;p++) {
 
      xxxc++;
      if (xxxc > 4) {
        xxxr++;
        xxxc=0;
      }

      pp=this.project[p];

      if (cclass != pp.cclass) {
        document.writeln("<P CLASS=B20>" + cNames[pp.cclass]); 
        document.writeln("<HR CLASS=B14 WIDTH=1200 ALIGN=LEFT>");     

        if (toc % 2 == 1) {
          toc++;
        }

        var tocr = toc >> 1;
        cclass = pp.cclass;
        document.getElementById('ID_c'+tocr).firstChild.nodeValue=cNames[pp.cclass] + ":";
      }

      var tocid = "tocid" + toc++;

      document.getElementById(tocid).firstChild.nodeValue=pp.title;
     
      document.writeln("<A NAME='" + tocid + "'>");
      document.writeln("<BR><BR>");
      document.writeln("<TABLE WIDTH='80%'>");
      document.writeln("<TR><TD>" + pp.title);
      document.writeln("<TR><TD xWIDTH='40%'>");
      document.writeln("<TR><TD COLSPAN=" + pp.view.length+1 + "><HR ALIGN='LEFT' WIDTH='100%' ROWSPAN=3>");
      document.writeln("<TR><TD CLASS=f10>" + pp.date);
      document.writeln("<TR><TD VALIGN='TOP'>");
      document.writeln("<DIV CLASS=f9>");
      for (t=0;t < pp.text.length;t++) {
        document.writeln(pp.text[t]);
      }   
      document.writeln("</DIV>");

      pp.slideShow = new threadType('ss' + p,'xxx');
      //var r= randi(1,10);

      var v;
      for (v=0;v < pp.view.length;v++) {
        var vv = pp.view[v];
        dw("<TD>");    
        
        pp.slideShow.add_cmds([xxxr,xxxc,picBlack1.id,xPic2,3,6,xRand,xSleep]);
        pp.slideShow.add_cmds([xxxr,xxxc,0,10,xRand,xPic2,3,6,xRand,xSleep]);
        pp.slideShow.add_cmds([xxxr,xxxc,vv.pic_t.id,xPic2,4,xSleep]);
  
        dw("<A HREF=" + vv.pic_l.url + ">");
        dw("<IMG SRC=" + vv.pic_t.url + " height= " + 100 + " alt= '" + vv.pic_t.url + '\n' + pp.title + '\n' + vv.title + "\nClick to enlarge' " + ">")    
        dw("</A>");

        if (vv.thumb == vv.large) {
          dw("<P CLASS=R20>Need Thumb</P>");
        }
      }  
      document.writeln("</TABLE>");
     pp.slideShow.sleep=2*p % 6;
     schedList.push(pp.slideShow);
    }
  }  
}
 
var MasterPage;

// ******************************************************************************************************************************* 

function d(s) {
  debug(s);
}

function wx(n) {

  if (n >= 0) {
    debug(n);
  } else {
    if (xNames[n] != null) {
      debug(xNames[n]);
    } else {
      debug('wx??=');
      debug(n);
    }
  }
  debug(",");
}

function wxa(t) {
  debug('<br>&nbsp;&nbsp;&nbsp;&nbsp;');
  for (i=0;i < t.length;i++) { 
    wx(t[i]);
    if (t[i] == xBreak) {
      debug('<br>&nbsp;&nbsp;&nbsp;&nbsp;'); 
    }
  }
  debug('<BR>')
}

// ******************************************************************************************************************************* 

function threadType(title,addr) {

  this.title = title;
  this.addr  = addr;

  this.stack = new Array();

  for (i=0;i < 100;i++) {
    this.stack[i] = 0;
  }
  this.tos = 0;

  this.cmds = new Array();

  this.pc = 0;
  this.sleep = 0;
  
  this.add_cmds = function(t) {
    d(this.title);
    d(": adding cmds: ");
    
    for (i=0;i < t.length;i++) {
      this.cmds.push(t[i]);
    };
    wxa(t);
    d('<BR>');
  }

  this.dump = function() {
    d(this.title + ": dump " + this.cmds.length);
    wxa(this.cmds);
  } 

  this.pop = function() {
    this.tos--;
    var x = this.stack[this.tos];
    return x;
  } 
  
  this.push = function(x) {
    this.stack[this.tos++] = x;
  } 

  this.ex = function() {

    if (this.sleep > 0) {
      d2('sleeping ' + this.sleep);
      this.sleep--;
      return;
    } else {
      this.sleep = 0;
    }

    d2('ex ' + this.title);
    d2('pc=' + this.pc);

    for (i=0;i < 100;i++) {
      d('pc=' + this.pc + " ");

      var c = this.cmds[this.pc];

      wx(c);
      d2('  ');

      this.pc++;
      this.pc = this.pc % this.cmds.length;

      if (c >= 0) {
        this.push(c);
      } else {

        if (c == xBreak) {
          this.tos = 0;
          return;
        } else if (c == xSleep) {
          var p1 = this.pop();
          if (p1 > 0) {
            this.sleep = p1 - 1;
            return;
          }
        } else if (c == xDebug) {
          d2('stack ' + this.tos + " " + this.stack[this.tos]);
          var i;
          for (i=0;i < 10;i++) { 
            d2('stack ' + i + " " + this.stack[i]);
          }
        } else if (c == xPic2) {
          var p1 = this.pop();
          var p2 = this.pop();
          var p3 = this.pop();
          d2('xPic2 ' + p1 + ', ' + p2 + ', ' + p3);
      
          var name = this.addr + p3 + p2;

          var ximg= document.getElementById(name);
          //if (tic > 20) document.writeln('p1 = ',p1);
          if (p1 < 0) {p1=-p1};
          if (ximg != null) {
            if (p1 < pictureList.length) {
              ximg.src = pictureList[p1].url;
              ximg.alt = pictureList[p1].title;
            }
          }
        } else if (c == xAdd) {
          var p1 = this.pop();
          var p2 = this.pop();
          this.push(p1 + p2);
        } else if (c == xSub) {
          var p1 = this.pop();
          var p2 = this.pop();
          this.push(p1 - p2);
        } else if (c == xRand) {
          var p1 = this.pop();
          var p2 = this.pop();
          this.push(randi(p1,p2));
        }
      }    
    }
  }
} 

// ******************************************************************************************************************************* 

function ViewType(title,url,thumb,large) {
  this.title = title;
  this.url   = url;
  this.thumb = thumb;
  this.large = large;
  this.text  = new Array();

  if (thumb == large) {
   // alert('same images for view ' + title);
  }
  
  this.pic_t = new pictureType(title,url + '/' + thumb,title);
  this.pic_l = new pictureType(title,url + '/' + large,title);
}

// ******************************************************************************************************************************* 

function ProjectType(title,date,cclass) {

  this.t = function(s) {
    if (this.view.length == 0) {
      this.text.push(s);
    } else {
      //dw("xxx" + this.view.length);
      if (1) {
        var v = this.view[this.view.length - 1];
       // dw(v.title);
       // this.text.push(v.title);
       // this.text.push(s);
        v.text.push(s);
      }
    }
  }

  if (date == null) {
    date="Unknown";
    alert('no date for ' + title);
  }

  if (cclass == null) {
    cclass=cMisc;
    alert('no class for ' + title);
  }

  this.title = title;
  this.date  = date;
  this.cclass= cclass;
  this.view  = new Array();
  this.text  = new Array();

  
}

// ******************************************************************************************************************************* 
function xinit1()
{

  MasterPage = new MasterPageType("Richard Taggart Scott");
}

function xinit2()
{

  MasterPage = new MasterPageType("Richard Taggart Scott");

  document.writeln("<xUL><UL>");  
  document.writeln("<TABLE VALIGN=TOP>");
  document.writeln("<TR><TD WIDTH='40%' VALIGN=TOP>");

  document.writeln("<TABLE VALIGN=TOP>");
  document.writeln("<TR><TD COLSPAN=3 ALIGN=Left CLASS=B14>Contents");

  var tocid=0;
  for (row=0;row < 25;row++) 
  {
    document.writeln("<TR><TD CLASS=B10 ID=ID_C"+row+">&nbsp;");
    var a = "right";

    a="left";
    for (col=0;col < 2;col++) 
    {
      var id="tocid" + tocid++;
      document.writeln("<TD CLASS=f10 ALIGN='" + a + "'><A HREF=#" + id + ">&nbsp;<SPAN ID="+id+">" + "&nbsp;" + "</SPAN></A>");
      p++;
      a = "left";
      a="right";
    }  
    document.writeln("</TR>");
  }

  document.writeln("</TABLE>");

  document.writeln("<TD><TABLE VALIGN=TOP>");
 
  for (row=0;row < 6;row++) 
  {
    document.writeln("<TR>");
    for (col=0;col < 5;col++) 
    {
      document.writeln("<TD><img id=xxx",row,col," border=0 src=\"misc/black1.jpg\" height=90 width=70 alt='pic' >");
    }  
    document.writeln("</TR>");
  }
  document.writeln("</TABLE>");

  document.writeln("</TABLE>");
  document.writeln("</UL></xUL>");

}

// ******************************************************************************************************************************* 



  showDebug();
  xinit1();

  var picBlack1= new pictureType('black1','misc/black1.jpg','black block');
  var picWhite1= new pictureType('White1','misc/white1.jpg','white block');
  var picRed1  = new pictureType('red1'  ,'misc/red1.jpg'  ,'red block');
  var picBlue1 = new pictureType('blue1' ,'misc/blue1.jpg' ,'blue block');

  var picPb1at = new pictureType('Potting Bench' ,'pottingbench/pb1a_t.jpg' ,'Potting Bench t');
  var picPb1al = new pictureType('Potting Bench' ,'pottingbench/pb1a_l.jpg' ,'Potting Bench l'); 
  var picPb1bt = new pictureType('Potting Bench' ,'pottingbench/pb1b_t.jpg' ,'Potting Bench t');
  var picPb1bl = new pictureType('Potting Bench' ,'pottingbench/pb1b_l.jpg' ,'Potting Bench sl');

  var addr = "xxx";

  var t1 = new threadType('t1',addr)
  t1.add_cmds([2,3,picRed1.id,xPic2,xBreak]);
  t1.add_cmds([2,4,picBlue1.id,xPic2,xBreak]);
  t1.add_cmds([2,3,picBlack1.id,xPic2]);
  t1.add_cmds([2,4,picRed1.id,xPic2,xBreak]);
  t1.dump();

  var t2 = new threadType('t2',addr)
  t2.add_cmds([3,3,2,xPic2,xBreak]);
  t2.add_cmds([3,3,3,xPic2,xBreak]);
  t2.add_cmds([4,1,picPb1at.id,xPic2,xBreak,xBreak]);
  t2.add_cmds([4,1,picPb1bt.id,xPic2,xBreak]);
  t2.dump();

  var t3 = new threadType('t3',addr)
  t3.add_cmds([3,0,picPb1at.id,xPic2,10,xSleep]);
  t3.add_cmds([3,0,picPb1bt.id,xPic2,10,xSleep]);
  t3.dump();

// schedList.push(t1);
// schedList.push(t2);
// schedList.push(t3);

  var c = 0;
  for (c=0;c <= cMax;c++) {

    // ********************************************************************

    if (c == cPencil) {
      var p = new ProjectType("Self portrait 1","Dec 2006",c);
      p.text.push("Self portrait given to my dad for xmas 2006. ");
      var url = "images/";
      p.view.push(new ViewType("Adrienne 1",url,"adrienne1.jpg","adrienne1.jpg"));
      p.t("Pencil on paper.");
      MasterPage.project.push(p);
    }

    // ********************************************************************

    if (c == cCharcoal) {
      var p = new ProjectType("Apple 1","Dec 2006",c);
      p.text.push("Self portrait given to my dad for xmas 2006. ");
      var url = "images/";
      p.view.push(new ViewType("Apple 1",url,"apple1.jpg","apple1.jpg"));
      p.t("Pencil on paper.");
      MasterPage.project.push(p);
    }

    // ********************************************************************

  }

  

