// Logo Image Hover
if (document.images)
{
    pic1on= new Image(696,58);
    pic1on.src="/image/SECLogoSubOn.jpg";  

    pic1off= new Image(696,58);
    pic1off.src="/image/SECLogoSub.jpg";
    
}

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;
    }
}


// Form Input Clear - All
function RemoveUsername()
{
    document.LoginForm.Username.value = "";
}
function RemovePassword()
{
    document.LoginForm.Password.value = "";
    document.LoginForm.Password.type = "password";
}

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


// Validate Form - All
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;
	}
}

function LoginValidate()
{
	if (document.getElementById("Username").value.length <= 1)
	{
		alert("Login Username - Please provide a valid entry");
		return false;
	}
	else if (document.getElementById("Username").value == 'User Name')
	{
		alert("Login Username - Please provide a valid entry");
		return false;
	}
	else if (document.getElementById("Password").value.length <= 1)
	{
		alert("Login Password - Please provide a valid entry");
		return false;
	}
	else if (document.getElementById("Password").value == 'Password')
	{
		alert("Login Password - Please provide a valid entry");
		return false;
	}
	else
	{
		return true;
	}
}


// Leaving Site Alert
function Leaving(address)
{
    var r = confirm("You are now leaving Santee Electric Cooperative's web site and are going to a web site that is not operated by the cooperative. Santee Electric Cooperative is not responsible for the content or availability of linked sites. Please be advised that Santee Electric Cooperative 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 Santee Electric Cooperative.");

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