// fma.js  Licensed for markfitzmarine.com  Copyright 2009 jeblaisdell.com All Rights Reserved.

function hov(itmid, ox) {
	z = document.getElementById(itmid);
	if (ox == 0) {
		z.style.background = 'url(images/'+itmid+'-h.png)';
	} else if (ox == 1) {
		z.style.background = 'url(images/'+itmid+'.png)';
	}
}

var aurl = window.location.href;

if (typeof document.body.style.maxHeight != "undefined") {
  	c = document.getElementById('home');
	if (c.parentNode.nodeName == 'A') {
		c.setAttribute("onmouseover","hov('home',0)");
		c.onmouseover = function() { return hov('home',0)};
		if (aurl.indexOf('index.php') != -1) hov('home',0);
		else { c.setAttribute("onmouseout", "hov('home',1)");
		c.onmouseout = function() { return hov('home',1)}; }
		c.style.cursor = "pointer";
	}
	a = document.getElementById('profiles');
	if (a.parentNode.nodeName == 'A') {
		a.setAttribute("onmouseover","hov('profiles',0)");
		a.onmouseover = function() { return hov('profiles',0)};
		if (aurl.indexOf('profiles.php') != -1) hov('profiles',0);
		else { a.setAttribute("onmouseout", "hov('profiles',1)");
		a.onmouseout = function() { return hov('profiles',1)}; }
		a.style.cursor = "pointer";
	}
	o = document.getElementById('portfolio');
	if (o.parentNode.nodeName == 'A') {
		o.setAttribute("onmouseover","hov('portfolio',0)");
		o.onmouseover = function() { return hov('portfolio',0)};
		if (aurl.indexOf('portfolio.php') != -1) hov('portfolio',0);
		else { o.setAttribute("onmouseout", "hov('portfolio',1)");
		o.onmouseout = function() { return hov('portfolio',1)}; }
		o.style.cursor = "pointer";
	}
	h = document.getElementById('recent');
	if (h.parentNode.nodeName == 'A') {
		h.setAttribute("onmouseover","hov('recent',0)");
		h.onmouseover = function() { return hov('recent',0)};
		if (aurl.indexOf('recent.php') != -1) hov('recent',0);
		else { h.setAttribute("onmouseout", "hov('recent',1)");
		h.onmouseout = function() { return hov('recent',1)}; }
		h.style.cursor = "pointer";
	}
	b = document.getElementById('articles');
	if (b.parentNode.nodeName == 'A') {
		b.setAttribute("onmouseover","hov('articles',0)");
		b.onmouseover = function() { return hov('articles',0)};
		if (aurl.indexOf('articles.php') != -1) hov('articles',0);
		else { b.setAttribute("onmouseout", "hov('articles',1)");
		b.onmouseout = function() { return hov('articles',1)}; }
		b.style.cursor = "pointer";
	}
	l = document.getElementById('links');
	if (l.parentNode.nodeName == 'A') {
		l.setAttribute("onmouseover","hov('links',0)");
		l.onmouseover = function() { return hov('links',0)};
		if (aurl.indexOf('links.php') != -1) hov('links',0);
		else { l.setAttribute("onmouseout", "hov('links',1)");
		l.onmouseout = function() { return hov('links',1)}; }
		l.style.cursor = "pointer";
	}
	n = document.getElementById('contact');
	if (n.parentNode.nodeName == 'A') {
		n.setAttribute("onmouseover","hov('contact',0)");
		n.onmouseover = function() { return hov('contact',0)};
		if (aurl.indexOf('contact.php') != -1) hov('contact',0);
		else { n.setAttribute("onmouseout", "hov('contact',1)");
		n.onmouseout = function() { return hov('contact',1)}; }
		n.style.cursor = "pointer";
	}
}

a = document.getElementById('bucket');
b = a.clientHeight;
if (b < 700) {
	document.getElementById('bodybg').style.height='768px';
}
