// Logo Image Hover
if (document.images)
{
    pic1on= new Image(183,50);
    pic1on.src="/image/MembershipButtonOn.jpg";  

    pic1off= new Image(183,50);
    pic1off.src="/image/MembershipButtonOff.jpg";

    pic2on= new Image(161,50);
    pic2on.src="/image/SavingsButtonOn.jpg";  

    pic2off= new Image(161,50);
    pic2off.src="/image/SavingsButtonOff.jpg";

    pic3on= new Image(124,50);
    pic3on.src="/image/LoansButtonOn.jpg";  

    pic3off= new Image(124,50);
    pic3off.src="/image/LoansButtonOff.jpg";

    pic4on= new Image(137,50);
    pic4on.src="/image/OnlineButtonOn.jpg";  

    pic4off= new Image(137,50);
    pic4off.src="/image/OnlineButtonOff.jpg";

    pic5on= new Image(166,50);
    pic5on.src="/image/RatesButtonOn.jpg";  

    pic5off= new Image(166,50);
    pic5off.src="/image/RatesButtonOff.jpg";

    pic6on= new Image(179,50);
    pic6on.src="/image/LocationsButtonOn.jpg";  

    pic6off= new Image(179,50);
    pic6off.src="/image/LocationsButtonOff.jpg";
    
    //Logos for Sub Pages
    pic7on= new Image(237,150);
    pic7off= new Image(237,150);

    pic8on= new Image(237,150);
    pic8off= new Image(237,150);

    pic9on= new Image(237,150);
    pic9off= new Image(237,150);

    pic10on= new Image(237,150);
    pic10off= new Image(237,150);

    pic11on= new Image(237,150);
    pic11off= new Image(237,150);

}

function lightup(imgName)
{
    if (document.images)
    {
        imgOn=eval(imgName + "on.src");
        document[imgName].src= imgOn;
    }
}

function turnoff(imgName)
{
    if (document.images)
    {
        imgOff=eval(imgName + "off.src");
        document[imgName].src= imgOff;
    }
}

function showclick(imgName)
{
    if (document.images)
    {
        imgClick=eval(imgName + "click.src");
        document[imgName].src= imgClick;
    }
}

// For Sub Pages
function lightupSub(imgName, imgOnSrc)
{
    if (document.images)
    {
        // imgOn=eval(imgName + "on.src");
        document[imgName].src= imgOnSrc;
    }
}

function turnoffSub(imgName, imgOffSrc)
{
    if (document.images)
    {
        // imgOff=eval(imgName + "off.src");
        document[imgName].src= imgOffSrc;
    }
}


// SAFENet Validation
function SAFENetValidate()
{
    if (document.getElementById("SAFENet").value.length <= 2)
	{
		alert("Username - Please provide a valid entry");
		return false;
	}
	else if (document.getElementById("SAFENet").value == 'User ID')
	{
	    alert("Username - Please provide a valid entry");
	    return false;
	}
	else
	{
		return true;
	}
}

// EZCard Validation
function EZCardValidate()
{
    if (document.getElementById("EZCard").value.length <= 2)
	{
		alert("Username - Please provide a valid entry");
		return false;
	}
	else if (document.getElementById("EZCard").value == 'User ID')
	{
	    alert("Username - Please provide a valid entry");
	    return false;
	}
	else
	{
		return true;
	}
}

// Search Validation
function SearchValidate()
{
    if (document.getElementById("Search").value.length <= 2)
	{
		alert("Search Selection - Please provide a valid entry");
		return false;
	}
	else if (document.getElementById("Search").value == 'Search phrase')
	{
	    alert("Search Selection - Please provide a valid entry");
	    return false;
	}
	else
	{
		return true;
	}
}

// Quicklaunch - Find Validation
function FindValidate()
{
    if (document.getElementById("Find").value == '-1')
	{
		alert("Find Selection - Please provide a valid entry");
		return false;
	}
	else
	{
		return true;
	}
}

// Quicklaunch - Apply Validation
function ApplyValidate()
{
    if (document.getElementById("Apply").value == '-1')
	{
		alert("Apply Selection - Please provide a valid entry");
		return false;
	}
	else
	{
		return true;
	}
}

// Quicklaunch - Calculate Validation
function CalculateValidate()
{
    if (document.getElementById("Calculate").value == '-1')
	{
		alert("Calculate Selection - Please provide a valid entry");
		return false;
	}
	else
	{
		return true;
	}
}

// Quicklaunch - Locate Validation
function LocateValidate()
{
    if (document.getElementById("Locate").value == '-1')
	{
		alert("Locate Selection - Please provide a valid entry");
		return false;
	}
	else
	{
		return true;
	}
}

// ENewsletter Validation
function ENewsletterValidate()
{
    if (document.getElementById("Name").value.length <= 2)
	{
		alert("Name - Please provide a valid entry");
		return false;
	}
	else if (document.getElementById("Name").value == 'Your Name')
	{
	    alert("Name - Please provide a valid entry");
	    return false;
	}
	else if (document.getElementById("Email").value.length <= 2)
	{
		alert("Email Address - Please provide a valid entry");
		return false;
	}
	else if (document.getElementById("Email").value == 'Your Email Address')
	{
	    alert("Email Address - Please provide a valid entry");
	    return false;
	}
	else
	{
		return true;
	}
}


// Form Input Clear - All
function RemoveSAFENet()
{
    document.SAFENetForm.SAFENet.value = "";
}

function RemoveEZCard()
{
    document.EZCardForm.EZCard.value = "";
}

function RemoveSearch()
{
    document.SearchForm.Search.value = "";
}

function RemoveSearchSub()
{
    document.SearchFormSub.Search.value = "";
}

function RemoveLocate()
{
    document.LocateForm.Locate.value = "";
}

function RemoveName()
{
    document.ENewsletterForm.Name.value = "";
}

function RemoveEmail()
{
    document.ENewsletterForm.Email.value = "";
}


// Quicklaunch - Find
function Find_QuickLaunch()
{
    if(document.getElementById('Find').value != "-1")
    {
        location = document.getElementById('Find').value
    }
    else
    {
	alert("Find Selection - Please provide a valid entry");
	return false;
    }
}

// Quicklaunch - Apply
function Apply_QuickLaunch()
{
    if(document.getElementById('Apply').value != "-1")
    {
        location = document.getElementById('Apply').value
    }
}

// Quicklaunch - Calculate
function Calculate_QuickLaunch()
{
    if(document.getElementById('Calculate').value != "-1")
    {
        location = document.getElementById('Calculate').value
    }
}

// Quicklaunch - Locate
function Locate_QuickLaunch()
{
    if(document.getElementById('Locate').value != "-1")
    {
        location = document.getElementById('Locate').value
    }
}


// Leaving Site Alert
function Leaving(address)
{
    var r = confirm("You are now leaving SAFE FCU's web site and are going to a web site that is not operated by the credit union. SAFE FCU is not responsible for the content or availability of linked sites. Please be advised that SAFE FCU does not represent either the third party or you, the member, if you enter into a transaction. Further, the privacy and security policies of the linked site may differ from those practiced by SAFE FCU.");

    if (r == true)
    {
	window.open(address);
    }
    else
    {
	alert("You have chosen not to leave SAFE FCU's web site.");
    }
}