/* preload images */
nav_home = new Image();
nav_home.src = "/images/nav_home_up.gif";
nav_about = new Image();
nav_about.src = "/images/nav_about_up.gif";
nav_careers = new Image();
nav_careers.src = "/images/nav_careers_up.gif";
nav_news = new Image();
nav_news.src = "/images/nav_news_up.gif";
nav_projects = new Image();
nav_projects.src = "/images/nav_projects_up.gif";



/* menu swap functions */
function MenuOn(id)
{
	//if this image is already in the on state then it's the active page
	if ($(id.id).src.indexOf('/images/' + id.id + '_up.gif') >= 0)
	{
		//kill mouseover functions, it should stay lit
		$(id.id).onmouseover = null;
		$(id.id).onmouseout = null;
	}
	else
		$(id.id).src = '/images/' + id.id + '_up.gif';
}

function MenuOff(id)
{
	$(id.id).src = '/images/' + id.id + '_dwn.gif';
}

function FCKSave(fck)
{
	var oEditor = FCKeditorAPI.GetInstance(fck);
	oEditor.ResetIsDirty();
}

function CheckDirty()
{
	if (needToConfirm)
	{
		var oEditor = FCKeditorAPI.GetInstance('Content');
		if (oEditor.IsDirty())
		{
			return 'Changes to the content have not been saved.';
		}
	}
}