﻿// JScript File
function over(id)
{
    nm = document.getElementById(id).src;
    if(nm.match('Images/buttons/Navigation/' + id + '_selected.gif') == null)
    {
        document.getElementById(id).src='Images/buttons/Navigation/' + id + '_over.gif';
    }
}

function out(id)
{
    nm = document.getElementById(id).src;
    if(nm.match('Images/buttons/Navigation/' + id + '_selected.gif') == null)
    {
        document.getElementById(id).src='Images/buttons/Navigation/' + id + '_none.gif';
    }
}

function down(id)
{
    nm = document.getElementById(id).src;
    if(nm.match('Images/buttons/Navigation/' + id + '_selected.gif') == null)
    {
        document.getElementById(id).src='Images/buttons/Navigation/' + id + '_down.gif';
    }
}

function hoverin(objid)
{
    obj = document.getElementById(objid);
    if (obj.className != "stay")
    {
        obj.className = "sidenavin";
    }
}

function hoverout(objid)
{
    obj = document.getElementById(objid);
    if (obj.className != "stay")
    {
        obj.className = "sidenav";
    }
}

function hoverin2(objid)
{
    obj = document.getElementById(objid);
    if (obj.className != "stay2")
    {
        obj.className = "sidenavin2";
    }
}

function hoverout2(objid)
{
    obj = document.getElementById(objid);
    if (obj.className != "stay2")
    {
        obj.className = "sidenav2";
    }
}

function confirmCancel(target)
{
    var answer = confirm("Any changes you have made will not be saved.  Are you sure you would like to continue?");
    if(answer)
    {
         history.back();
    }
}

function HighLightButton()
{
   frmName = document.getElementById('formName').value;
   obj = document.getElementById(frmName);
   if (obj != null)
   {
       if (obj.className.indexOf('2') != -1)
       {
           document.getElementById(frmName).className = "stay2";
       }
       else
       {
           document.getElementById(frmName).className = "stay";
       }
   }
}
function submitOver()
{
        document.getElementById("submit").src='Images/buttons/submit_over.gif';
}

function submitOut()
{
        document.getElementById("submit").src='Images/buttons/submit_up.gif';
}

function submitDown()
{
        document.getElementById("submit").src='Images/buttons/submit_down.gif';
}

function closeOver()
{
        document.getElementById("close").src='Images/buttons/close_over.gif';
}

function closeOut()
{
        document.getElementById("close").src='Images/buttons/close_up.gif';
}

function closeDown()
{
        document.getElementById("close").src='Images/buttons/close_down.gif';
}
