// JavaScript Document
<!--
function getElement (obj)
{
	if (document.all)
		return document.all[obj];

	if (document.getElementById)
		return document.getElementById(obj);
}

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

function rollover (name, status)
{
	var swap = (status == 1) ? 'ON' : 'OFF';
	var last = (status == 1) ? 3 : 2;

	if (document.all)	//image swap for Internet Explorer
	{
		var img = document.images[name].src;
		var ext = img.substr(img.length-4);
		var adj = img.length - last - 4;
		var raw = img.substr(0, adj);
		document.images[name].src = raw + swap + ext;
	}
	 else if (document.getElementById)	//image swap for Mozilla, Firefox, Netscape, Opera
	{
		var img = document.getElementById(name);
		var fulltext = img.src;
		var ext = img.src.substr(-4);
		var adj = fulltext.length - last - 4;
		var raw = fulltext.substr(0, adj);
		img.src = raw + swap + ext;
	}

	return true;
}

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

window.onload = function()
{
	getElement("home").onmouseover = function() { rollover("home", 1); }
	getElement("home").onmouseout = function() { rollover("home", 0); }
	getElement("about").onmouseover = function() { rollover("about", 1); }
	getElement("about").onmouseout = function() { rollover("about", 0); }
	getElement("portfolio").onmouseover = function() { rollover("portfolio", 1); }
	getElement("portfolio").onmouseout = function() { rollover("portfolio", 0); }
	getElement("contact").onmouseover = function() { rollover("contact", 1); }
	getElement("contact").onmouseout = function() { rollover("contact", 0); }			
};
-->