<!--
function rolloverBehaviours()
{
	if (getElement('home'))
	{
		getElement('home').onmouseover = function() { rollover('home', 1); subnavActivate('subhome'); }
		getElement('home').onmouseout = function() { rollover('home', 0); }
		getElement('portfolio').onmouseover = function() { rollover('portfolio', 1); subnavActivate('subportfolio'); }
		getElement('portfolio').onmouseout = function() { rollover('portfolio', 0); }
		getElement('pastimes').onmouseover = function() { rollover('pastimes', 1); subnavActivate('subpastimes'); }
		getElement('pastimes').onmouseout = function() { rollover('pastimes', 0); }
		getElement('links').onmouseover = function() { rollover('links', 1); subnavActivate('sublinks'); }
		getElement('links').onmouseout = function() { rollover('links', 0); }
		getElement('guestbook').onmouseover = function() { rollover('guestbook', 1); subnavActivate('subguestbook'); }
		getElement('guestbook').onmouseout = function() { rollover('guestbook', 0); }
		getElement('credits').onmouseover = function() { rollover('credits', 1); subnavActivate(''); }
		getElement('credits').onmouseout = function() { rollover('credits', 0); }
		getElement('sitemap').onmouseover = function() { rollover('sitemap', 1); subnavActivate(''); }
		getElement('sitemap').onmouseout = function() { rollover('sitemap', 0); }
	}
}

/*---------------------------------------------------------------------------------------------------*/

function portfolioSplashBehaviours()
{
	if (getElement('resume'))
	{
		getElement('resume').onmouseover = function() { rollover('resume', 1); };
		getElement('resume').onmouseout = function() { rollover('resume', 0); };
		getElement('highlights').onmouseover = function() { rollover('highlights', 1); };
		getElement('highlights').onmouseout = function() { rollover('highlights', 0); };
		getElement('interfaces').onmouseover = function() { rollover('interfaces', 1); };
		getElement('interfaces').onmouseout = function() { rollover('interfaces', 0); };
		getElement('landscapes').onmouseover = function() { rollover('landscapes', 1); };
		getElement('landscapes').onmouseout = function() { rollover('landscapes', 0); };
		getElement('logos').onmouseover = function() { rollover('logos', 1); };
		getElement('logos').onmouseout = function() { rollover('logos', 0); };
		getElement('websites').onmouseover = function() { rollover('websites', 1); };
		getElement('websites').onmouseout = function() { rollover('websites', 0); };
	}
}

/*---------------------------------------------------------------------------------------------------*/

function pastimesSplashBehaviours()
{
	if (getElement('pdev'))
	{
		getElement('pmusic').onmouseover = function() { rollover('pmusic', 1); };
		getElement('pmusic').onmouseout = function() { rollover('pmusic', 0); };
		getElement('ptransformers').onmouseover = function() { rollover('ptransformers', 1); };
		getElement('ptransformers').onmouseout = function() { rollover('ptransformers', 0); };
		getElement('pbooks').onmouseover = function() { rollover('pbooks', 1); };
		getElement('pbooks').onmouseout = function() { rollover('pbooks', 0); };
		getElement('pvideogames').onmouseover = function() { rollover('pvideogames', 1); };
		getElement('pvideogames').onmouseout = function() { rollover('pvideogames', 0); };
		getElement('pdev').onmouseover = function() { rollover('pdev', 1); };
		getElement('pdev').onmouseout = function() { rollover('pdev', 0); };
	}
}

/*---------------------------------------------------------------------------------------------------*/

function parseUrl()
{
	var url = window.document.location.toString().split('/');
	return url;
}

/*---------------------------------------------------------------------------------------------------*/

function subnavActivate (id)
{
	var divs = Array(5);
	divs[0] = "subhome";
	divs[1] = "subportfolio";
	divs[2] = "subpastimes";
	divs[3] = "sublinks";
	divs[4] = "subguestbook";

	for (var i = 0; i < divs.length; i++)
	{
		if (getElement(divs[i]))
			getElement(divs[i]).style.display = (divs[i] == id) ? 'block' : 'none';
	}
}

/*---------------------------------------------------------------------------------------------------*/

function viewDefaultSubnav()
{
	var prefix = "sub";
	var pieces = parseUrl();

	switch (pieces[3])
	{
		case 'portfolio':
		case 'pastimes':
		case 'links':
		case 'guestbook':
			prefix += pieces[3];
		break;

		case 'credits':
		case 'sitemap':
			prefix = null;
		break;

		default:
			prefix += 'home';
		break;
	}

	if (prefix != null)
		subnavActivate(prefix);
}

/*---------------------------------------------------------------------------------------------------*/

function setAutoLinks()
{
	var url = parseUrl();

	if (url[3] == 'links')
		setLinkBehaviours();
}

/*---------------------------------------------------------------------------------------------------*/

function fireOffLinkClick()
{
	var url = parseUrl();

	if (url[3] == 'links')
	{
		var querystring = unescape(window.document.location.toString().split('?')[1]);

		if (querystring != null && querystring != undefined)
		{
			var qs = querystring.split('&');
			var tmp;
			var linkTypeID = 0;
			
			for (var key in qs)
			{
				tmp = qs[key].split('=');

				if (tmp[0] == 'auto')
				{
					linkTypeID = parseInt(tmp[1]);
					break;
				}
			}			
		}
	}

	if (linkTypeID > 0)
		getLinksByLinkTypeID(linkTypeID);
}

/*---------------------------------------------------------------------------------------------------*/

function fireOffComputerBooks()
{
	var url = parseUrl();

	if (url[3] == 'pastimes' && url[4].indexOf('books') != -1)
		getComputerBookLibrary();
}

/*---------------------------------------------------------------------------------------------------*/

function setTransFormersAllegiance()
{
	var url = parseUrl();
	
	if (url[3] == 'pastimes' && url[4].indexOf('transformers') != -1)
	{
		getElement('getautobots').onclick = function() { getAllegiance('autobots'); }
		getElement('getdecepticons').onclick = function() { getAllegiance('decepticons'); }
		getElement('favoritetransformer').onclick = greatestTransFormerOfAllTime;
	}
}

/*---------------------------------------------------------------------------------------------------*/

function setMusicArtistNavigation()
{
	var url = parseUrl();
	
	if (url[3] == 'pastimes' && url[4].indexOf('music') != -1)
	{
		musicArtistNavigation();
		musicInformation();
	}
}

/*---------------------------------------------------------------------------------------------------*/

function setPortfolioWebsitesBehaviours()
{
	var url = parseUrl();
	
	if (url[3] == 'portfolio' && url[4].indexOf('websites') != -1)
	{
		var counter = 0;

		while (++counter)
		{
			if (getElement("WN" + counter))
			{
				getElement("WN" + counter).onmouseover = function() { return nostatus(); }
			}
			else
			{
				break;	
			}
		}
	}
}

/*---------------------------------------------------------------------------------------------------*/

function setPortfolioItemsBehaviours()
{
	var url = parseUrl();

	if (url[3] == 'portfolio' && url[4].indexOf('item') != -1)
	{
		var maxValue = 60;
		var counter = 0;

		while (++counter <= maxValue)
		{
			if (getElement("PN" + counter))
				getElement("PN" + counter).onmouseover = function() { return nostatus(); }

			continue;
		}
	}
}

/*---------------------------------------------------------------------------------------------------*/

function setMessageCounter()
{
	var url = parseUrl();
	
	if (url[3] == 'guestbook' && url[4].indexOf('sign') != -1)
	{
		getElement('message').onkeyup = characountdown;
		characountdown();
	}
}

/*---------------------------------------------------------------------------------------------------*/

function setPortfolioSplashRollovers()
{
	var url = parseUrl();
	
	if (url[3] == 'portfolio' && (url[4].indexOf('index') != -1 || url[4] == ""))
		portfolioSplashBehaviours();
}

/*---------------------------------------------------------------------------------------------------*/

function setPastimesSplashRollovers()
{
	var url = parseUrl();
	
	if (url[3] == 'pastimes' && (url[4].indexOf('index') != -1 || url[4] == ""))
		pastimesSplashBehaviours();
}

/*---------------------------------------------------------------------------------------------------*/

function pageInit()
{
	viewDefaultSubnav();
	externalLinks();
	rolloverBehaviours();
	fireOffLinkClick();
	fireOffComputerBooks();
	setAutoLinks();
	setTransFormersAllegiance();
	setMusicArtistNavigation();
	setPortfolioWebsitesBehaviours();
	setPortfolioItemsBehaviours();
	setMessageCounter();
	setPortfolioSplashRollovers();
	setPastimesSplashRollovers();
}

/*---------------------------------------------------------------------------------------------------*/

window.onload = pageInit;
-->