function displayHTML(target, content)
{
    document.getElementById(target).innerHTML = content;
}

function galleryFunction(image)
{
    imageArray = new Array('rocky','chris','james','damian','bear','steven-red','walter');
    target = 'mainbody';
    content = '';
    i = 0;
    nextimage = eval(image) + 1;
    lastimage = eval(image) - 1;
    if (lastimage >= 0) 
    {
        content = content + '<a href="#" class = "nav" onClick = "galleryFunction(\'' + lastimage + '\')\;" >Back</a>';
        i++;
     }
    if (nextimage < imageArray.length) 
    {
        i++;
        if (i >= 2) content = content + ' | ';
        content = content + '<a href="#" class = "nav" onClick = "galleryFunction(\'' + nextimage + '\')\;" >Next</a>';
    }
    content = content + '<br /><img src="./images/' + imageArray[image] + '.jpg">';
    displayHTML(target, content);
}

function servicesFunction()
{
    target = 'mainbody';
    content = '<p>Adult Portrait,<br /> Fashion, <br /> Boudoir, and <br /> Catalog Imaging</p>\n<p>Specializing in <br /> male fitness and art models, <br /> ages 21-40, <br /> interested in contract opportunities <br /> for still and video.';
    displayHTML(target, content);
}
function contactFunction()
{
    target = 'mainbody';
    content = '<b>David/Mike</b><br /> Photographer</p>  P: 415 425-4327<br /> 3435 Cesar Chavez #206<br /> San Francisco, CA<br /> 94110<br /><a href="mailto:david@greenthing.com" class="nav">david@greenthing.com</a>';
    displayHTML(target, content);
}
