﻿window.onload = function() {
    window.defaultStatus = document.title;
}

function portfolio(description, image, url) {    
    
    document.getElementById('portfolio-image').src = image;
    document.getElementById('portfolio-description').innerHTML = description;
    
    if (url !== undefined) {
        document.getElementById('portfolio-link').href = url;
    }
    
}


function portfolioHit(e)
{

    var items = document.getElementById('pages').getElementsByTagName('li');
    for ( i = 1; i < items.length; i++ ) {
        if ( items[i].className == 'hit') {
            items[i].className = '';
        }
    }

    var targ
    if (!e) var e = window.event
    if (e.target) targ = e.target
    else if (e.srcElement) targ = e.srcElement
    if (targ.nodeType == 3)
        targ = targ.parentNode
    
    targ.parentNode.className = 'hit';

}