function writeHead(background)
{
    document.write('<P><BR><P><BR><P><BR><A name=skipad></a><table border=0 cellpadding=0 cellspacing=0 width=100% ');
    document.write(background);
    document.write('><td>');
}

function writeTail(parentLink, counterName, docPadding)
{
    writeIconTail(parentLink, counterName, docPadding, "home_ic.gif");
}

function writeIconTail(parentLink, counterName, docPadding, icon)
{
    document.write('<CENTER><TABLE><TD><A HREF="');
    document.write(parentLink);
    document.write('"><IMG ALT="|HOME|" ALIGN=baseline SRC="');
    document.write(icon);
    document.write('"></A></TD>');
    document.write('<TD><I><A HREF="mailto:CJohnYu.96@alum.mit.edu">CJohnYu.96@alum.mit.edu</A></I>');
    document.write(' [<A HREF=http://home.comcast.net/~chtongyu>index</a>]</TD></TABLE>');

    document.write('<A HREF=http://cjyu.tripod.com/counter.html#skipad>');
    document.write('<IMG ALT="|Counter|" SRC="http://www.mit.edu/cgi/counter/cyu/');
    document.write(counterName);
    document.write('" border=0></A>');

    if (docPadding)
    {
        document.write('</table><P><BR><P><BR><P><BR>');
    }
}

function writeTableStyle3(text, link, vlink)
{
    document.write('<STYLE TYPE="text/css">');
    document.write('<!--');
    document.write('.pagetable, .pagetable TD, .pagetable TH');
    document.write('{');
    document.write('   color:');
    document.write(text);
    document.write(';');
    document.write('}');
    document.write('.pagetable a:link{color:');
    document.write(link);
    document.write('}');
    document.write('.pagetable a:visited{color:');
    document.write(vlink);
    document.write('}');
    document.write('-->');
    document.write('</STYLE>');
}

function writeTableStyle2(link, vlink)
{
    writeTableStyle3("#000000", link, vlink);
}

function writeHeadStyle(background)
{
    document.write('<A name=skipad></a><table border=0 cellpadding=0 cellspacing=0 width=100% class="pagetable" ');
    document.write(background);
    document.write('><td>');
}

function writeOutsideColor(bgcolor)
{
    document.write('<STYLE TYPE="text/css">');
    document.write('<!--');
    document.write('body {');
    document.write('   background:');
    document.write(bgcolor);
    document.write(';');
    document.write('}');
    document.write('-->');
    document.write('</STYLE>');
}
