function window.onbeforeprint()
{
// Walk through all the elements in the document with
// CLASS="collapsed" and set it to "expanded" just for printing.
var coll = document.all.tags("DIV");
if (coll!=null)
{
for (i=0; i<coll.length; i++)
if (coll[i].className == "collapsed")
{
coll[i].className = "expanded";
// After printing, make sure to set CLASS="collapsed"
// only for those that were expanded just for printing.
coll[i].bExpandedForPrinting = true;
}
else if (coll[i].className == "expanded")
coll[i].bExpandedForPrinting = false;
}
}
function window.onafterprint()
{
// Walk through all the elements in the doc with CLASS="expanded"
// and set it to "collapsed" if expanded just for
// printing.
var coll = document.all.tags("DIV");
if (coll!=null)
{
for (i=0; i < coll.length; i++)
if ((coll[i].className == "expanded") &&
(coll[i].bExpandedForPrinting))
{
coll[i].className = "collapsed";
coll[i].bExpandedForPrinting = false;
}
}
}