
function BlogLink(pHREF, pDesc, pTitle)
{
    this._href  = pHREF;
    this._desc  = pDesc;
    this._title = pTitle;
}

var g_cnt = 0;
var g_Blounge = new Array();

var g_Title        = "Photographer's Blounge";
g_Blounge[g_cnt++] = new BlogLink("http://www.binghott.com/blog/", "bloghott", "Bing Hott Photography's Blog");
g_Blounge[g_cnt++] = new BlogLink("http://dogwooddigital.blogspot.com", "Dogwood Digital", "Dogwood Digital - Pete Springer");
g_Blounge[g_cnt++] = new BlogLink("http://cwphotosblog.blogspot.com", "CrossWorks Photography Blog", "CrossWorks Photography Musings");
g_Blounge[g_cnt++] = new BlogLink("http://trishtunney.blogspot.com/", "I was just thinking...", "Blog of Trish Tunney");
g_Blounge[g_cnt++] = new BlogLink("http://blog.mikelanestudios.com/", "Mike Lane Studios - The Blog", "Mike Lane Studios - The Blog");
g_Blounge[g_cnt++] = new BlogLink("http://www.pnwimages.com", "Pacific Northwest Images", "Blog by Ray Hendricks");
g_Blounge[g_cnt++] = new BlogLink("http://blog.portellimagery.com/", "Portell Imagery -The Blog", "The Blog companion to my photography site www.portellimagery.com");
g_Blounge[g_cnt++] = new BlogLink("http://rainhome.de/blog/", "Sebastian in Leipzig", "every day a new photo");
g_Blounge[g_cnt++] = new BlogLink("http://steven.vorefamily.net/", "Steven's Tech and Photography Notebook", "Steven's Tech and Photography Notebook.");
g_Blounge[g_cnt++] = new BlogLink("http://blog.antonspaans.com/", "Streets of Boston Blog", "Anton Spaans - Pictures from the Streets of Boston");
g_Blounge[g_cnt++] = new BlogLink("http://blog.photoscapedesign.com/", "The Blog @ Photoscape Design", "The Blog @ Photoscape Design");
g_Blounge[g_cnt++] = new BlogLink("http://jen-nyc.blogspot.com", "The Student Photographer", "The story of a girl and her new Rebel XT.");
g_Blounge[g_cnt++] = new BlogLink("http://jamesjweg.blogspot.com/", "The world as I see it.", "A photographic look at the world through my lens.");
g_Blounge[g_cnt++] = new BlogLink("http://chadspectorphoto.blogspot.com/", "Chad Spector", "Truth... The Photography of Chad Spector.");
//g_Blounge[g_cnt++] = new BlogLink("", "", "");
//g_Blounge[g_cnt++] = new BlogLink("", "", "");

var g_aLen   = g_Blounge.length;
var g_idx    = ((new Date()).getTime()) / 3600000.0;
var g_offset = Math.round(g_idx) % g_aLen;
    //alert(g_idx+":"+Math.round(g_idx)+":"+g_offset);

function createLink(pBlogLink)
{
    return '<li><a href="'+pBlogLink._href+
           '" title="'+pBlogLink._title+
           '">'+pBlogLink._desc+'</a></li>';
}

function createBLounge()
{
    var ret = '<h2 class="blounge_title">'+
    '<a href="http://blog.antonspaans.com/2005/05/01/photographers-blounge/87/" title="ADMIN: Please replace the Javascript with PHP script!">'+
    g_Title+'</a></h2>';
    ret += '<ul>';
    for (var i = 0; i < g_aLen; i++)
    {
        var idx = (i + g_offset) % g_aLen;
        ret += createLink(g_Blounge[idx]);
    }
    ret += '</ul>';

    return ret;
}

document.writeln(createBLounge());
