document.write('<script type="text/javascript" src="../resource/js/prototype.js"></script>');
document.write('<script type="text/javascript" src="../resource/js/scriptaculous.js"></script>');
document.write('<script type="text/javascript" src="../resource/js/effects.js"></script>');

function readCookie(cookieName)
{
    var results = parent.document.cookie.match ( cookieName + '=(.*?)(;|$)' );
    if ( results ) return ( unescape ( results[1] ) );
    else return null;
}

function writeCSS()
{
    var theme = readCookie("theme");
    if (null != theme && theme == "light")
    {
        document.write('<link rel="stylesheet" type="text/css" href="../resource/css/screen_light.css?version=7" />');
        document.write('<link rel="stylesheet" type="text/css" href="../resource/css/album_light.css?version=7" />');
    }
    else
    {
        document.write('<link rel="stylesheet" type="text/css" href="../resource/css/screen_dark.css?version=7" />');
        document.write('<link rel="stylesheet" type="text/css" href="../resource/css/album_dark.css?version=7" />');
    }
}


function writePortfolioLinks(pageId)
{    

    document.write('<center><div id="portfolio_nav">');
    
    if (pageId=='highlight')
    {
        document.write('<a class="currentpage" href="../highlight/index.html" title="Highlight Portfolio">Portfolio</a>');
    }
    else
    {
        document.write('<a href="../highlight/index.html" title="Highlight Portfolio">Portfolio</a>');
    }
    
    if (pageId=='seascape')
    {
        document.write('<a class="currentpage" href="../seascape/index.html" title="Seascape Portfolio">Seascape</a>');
    }
    else
    {
        document.write('<a href="../seascape/index.html" title="Seascape Portfolio">Seascape</a>');
    }
        
    if (pageId=='bird')
    {
        document.write('<a class="currentpage" href="../bird/index.html" title="Bird Portfolio">Bird</a>');
    }
    else
    {
        document.write('<a href="../bird/index.html" title="Bird Portfolio">Bird</a>');
    }
    
    if (pageId=='humanlandscape')
    {
	document.write('<a class="currentpage" href="../humanlandscape/index.html" title="The Human Element">Human in Landscape</a>');
    }
    else
    {
	document.write('<a href="../humanlandscape/index.html" title="Human in Landscape Portfolio">Human in Landscape</a>');
    }

    if (pageId=='landscape')
    {
        document.write('<a class="currentpage" href="../landscape/index.html" title="Landscape Portfolio">Landscape</a>');
    }
    else
    {
        document.write('<a href="../landscape/index.html" title="Landscape Portfolio">Landscape</a>');
    }    
    
    if (pageId=='bw')
    {
        document.write('<a class="currentpage" href="../bw/index.html" title="Black and White Portfolio">B&W</a>');
    }
    else
    {
        document.write('<a href="../bw/index.html" title="Black and White Portfolio">B&W</a>');
    }
    
    
    document.write('</div></center>');    
}

function helpOpen()
{
    Effect.SlideUp('portfoliohelp', { duration: 0.75 });
    Effect.SlideDown('portfoliopabout', { duration: 0.75 });
}

function helpClose()
{
    Effect.SlideDown('portfoliohelp', { duration: 0.75 });
    Effect.SlideUp('portfoliopabout', { duration: 0.75 });
}