function Footlink(t,p,w)
{
    this.text = t;
    this.page = p;
    this.win = w;
}
function Footlink_toString()
{
    // Generate a link based on where we are
    if (window.location.href.indexOf(this.page.substr(1)) == -1) {
        return '<a class="footer" href="' + this.page + '"' + (this.win!=null ? ' target="' + this.win + '"' : '') + '>' + this.text + '</a>';
    } else {
        return '<span class="footer">' + this.text + '</span>';
    }
}
Footlink.prototype.toString = Footlink_toString;
    
var footlinks = new Array(
    new Footlink('About the Foundation','./about.html'),
    new Footlink('Making a Contribution','./contribute.html'),
    new Footlink('Application','./application.html'),
    new Footlink('Recipients','./recipients.html'),
    new Footlink('Contributors','./contributors.html'),
    new Footlink('Newsletter','./newsletter.pdf','_blank'),
    new Footlink('Contact Us','./contact.html'),
    new Footlink('Home','./index.html')
    );
var SPLIT = 4;          // Where the line split occurs

function atHome(p)
{
    if (p.indexOf('index.html') == -1 && p.charAt(p.length-1) != '/') return false;
    return true;
}

document.write('[ ');
for (var i=0; i<SPLIT; i++) {
    document.write(footlinks[i].toString());
    if (i+1 < SPLIT) document.write(' | ');
}
document.writeln(' ]<br>');
document.write('[ ');
for (i=SPLIT; i<footlinks.length; i++) {
    document.write(footlinks[i].toString());
    if (i+1 < footlinks.length) document.write(' | ');
}
document.writeln(' ]');

// Include logo if not on home page
//if (!atHome(window.location.href)) {
    document.writeln('<div style="width:100%; background-color:#d7c88e; margin-top:0px;">');
    document.writeln('<img src="./images/logo1_tanbg.gif" border="0" alt="Carlsen Cello Foundation" style="margin-top:10px; margin-bottom:5px;"></div>');
//}
//document.writeln('<br><br>');



