// $Id:$var box = img = 1;var portfolios = new Object();var pp;  // The currently active portfolio.var tp = "overview";  // The currently active text block.function textDisp(which){    //alert("textDisp(" + which + ")\ntp = " + tp);    document.images['m_' + tp].src = "graphics/db/tri-left-black.gif";    document.images['m_' + which].src = "graphics/db/tri-left-gray.gif";    document.getElementById(tp).style.display = "none";    document.getElementById(which).style.display = "inline";    tp = which;}function portfolioInit(id, name, dir){    // Variable number of arguments, remaining args are captions    // for the photographs.  Since the captions are used to count    // the number of photographs, there must be at least an empty    // string for each photo.    portfolios[id] = new Object();    portfolios[id].name = name;    portfolios[id].dir = dir;    portfolios[id].captions = new Object();    for (var i = 1; (i + 2) < arguments.length; i++) {	portfolios[id].captions[i] = arguments[i + 2];    }    portfolios[id].numi = i - 1;    //alert("portfolioInit()");}function portfolioLoad(imgid, port){    document.images['m_' + pp].src = "graphics/db/tri-left-black.gif";    document.images['m_' + port].src = "graphics/db/tri-left-gray.gif";    //document.getElementById('m_' + pp).style.color = "black";    //document.getElementById('m_' + port).style.color = "gray";    document.images['up'].src = "graphics/db/tri-up-white.gif";    document.images['down'].src = "graphics/db/tri-down-white.gif";    for (i = 1; i <= 20; i++) {	if (i <= portfolios[port].numi) {	    document.getElementById('b' + i).style.display = "inline";	} else {	    document.getElementById('b' + i).style.display = "none";	}    }    document.images['b' + box].src = "graphics/db/box-gray.gif";    document.images['b' + 1].src = "graphics/db/box-red.gif";    document.images[imgid].src = portfolios[port].dir + "1.jpg";    pp = port;    //portfolioCaption("caption", 1);  // Needs to happen after pp is updated.    box = img = 1;}function portfolioCaption(id, n){    d = document.getElementById(id);    d.innerHTML = portfolios[pp].captions[n];}function upclick() {  if (img > 1) {    --img;    doclick(img);  }}function dnclick() {  if (img < portfolios[pp].numi) {    ++img;    doclick(img);  }}function doclick(n) {    document.images['b' + box].src = "graphics/db/box-gray.gif";    document.images['b' + n].src = "graphics/db/box-red.gif";    box = img = n;    document.images['portimg'].src = portfolios[pp].dir + n + ".jpg";    //portfolioCaption("caption", n);}function pageInit(){    // Called as the onload() handler.    pp = 'recent';  // Must be set for portfolioLoad() to work;    //portfolioLoad("portimg", "recent");}