<!--
/* includes code created by Juxtaprose - http://www.juxtaprose.com
(c) 2004. Licensed for use under
Creative Commons Attribution-NonCommercial-ShareAlike 2.0
http://creativecommons.org/licenses/by-nc-sa/2.0/
Please preserve this notice as a means of attribution. Thanks!
*/

var highlightColor = '#9D0042';
var lowlightColor = '#2750A6';
var rollImages = true;
var AlwaysOn = '';

function RollTag(tag,clas)
{
	this.tag = tag;
	this.clas = clas;
}

var tagLen=2;
var tags = new Array(tagLen);
tags[0] = new RollTag('a', 'nav1');
tags[1] = new RollTag('img', 'rollimg');

for (var k=0;k<tagLen;k++)
{
	var p=document.getElementsByTagName(tags[k].tag);
	var pLen = p.length;
	for (var i=0;i<pLen;i++)
	{
		if (p[i].className == tags[k].clas)
		{
			p[i].onmouseover=Highlight;
			p[i].onmouseout=Lowlight;
		}
	}
}

function Highlight()
{
	Turn(this,'on');
}

function Lowlight()
{
	Turn(this,'off');
}

function Turn(onobject, mode)
{
	id = onobject.id;
	idx = id.indexOf('_img');
	if (idx==-1)
	{
		a_ID = id;
		img_ID = id+'_img';
	} else
	{
		img_ID = id;
		a_ID = id.substring(0,idx);
	}
	if (mode=='on')
		RollEm(a_ID, highlightColor,'none',img_ID,mode);
	else	
		RollEm(a_ID, lowlightColor,'none',img_ID,mode);
}


function RollEm(aID, acolor, adecorate, imgID, rollMode)
{
	if (rollMode=='on' | aID != AlwaysOn)
	{
		document.getElementById(aID).style.color=acolor;
		document.getElementById(aID).style.textDecoration=adecorate;
	}
	imgSrc = document.getElementById(imgID).src;
	mdx = imgSrc.indexOf('_off.jpg');
	if (rollImages && rollMode=='on' && mdx !=-1)
	{
		document.getElementById(imgID).src = imgSrc.substring(0,mdx)+'.jpg';
	} else if (rollImages && rollMode=='off' && mdx==-1 && aID !=AlwaysOn)
	{
		document.getElementById(imgID).src = imgSrc.substring(0,imgSrc.indexOf('.jpg'))+'_off.jpg';	
	}
}

function AimHigh(navid)
{
	navid = 'nav_'+navid;
	AlwaysOn=navid;
	Turn(document.getElementById(navid),'on');	
}


// -->