// Logo Image Hover
if (document.images)
{
    pic1on= new Image(117,31);
    pic1on.src="/image/OurServiceButtonOn.jpg";  

    pic1off= new Image(117,31);
    pic1off.src="/image/OurServiceButtonOff.jpg";
    
    pic2on= new Image(67,31);
    pic2on.src="/image/TravelButtonOn.jpg";  

    pic2off= new Image(67,31);
    pic2off.src="/image/TravelButtonOff.jpg";
    
    pic3on= new Image(53,31);
    pic3on.src="/image/FaresButtonOn.jpg";  

    pic3off= new Image(53,31);
    pic3off.src="/image/FaresButtonOff.jpg";
    
    pic4on= new Image(88,31);
    pic4on.src="/image/AboutButtonOn.jpg";  

    pic4off= new Image(88,31);
    pic4off.src="/image/AboutButtonOff.jpg";
    
    pic5on= new Image(91,31);
    pic5on.src="/image/InquiriesButtonOn.jpg";  

    pic5off= new Image(91,31);
    pic5off.src="/image/InquiriesButtonOff.jpg";
    
    pic6on= new Image(112,36);
    pic6on.src="/image/TopButtonOn.jpg";  

    pic6off= new Image(112,36);
    pic6off.src="/image/TopButton.jpg";
	
	pic7on= new Image(112, 36);
	pic7on.src="/image/TopButtonSubOn.jpg";
	
	pic7off= new Image(112, 36);
	pic7off.src="/image/TopButtonSub.jpg";

    pic8on= new Image(290,160);
    pic8on.src="/image/PDRTALogoOn.jpg";

    pic8off= new Image(290,160);
    pic8off.src="/image/PDRTALogo.jpg";

    pic9on= new Image(153,36);
    pic9on.src="/image/EmailFriendButtonOn.jpg";

    pic9off= new Image(153,36);
    pic9off.src="/image/EmailFriendButton.jpg";

    pic10on= new Image(141,36);
    pic10on.src="/image/PrintPageButtonOn.jpg";

    pic10off= new Image(141,36);
    pic10off.src="/image/PrintPageButton.jpg";

    pic11on= new Image(136,36);
    pic11on.src="/image/OurFaresButtonOn.png";

    pic11off= new Image(136,36);
    pic11off.src="/image/OurFaresButton.png";

    pic12on= new Image(147,36);
    pic12on.src="/image/OurRoutesButtonOn.png";

    pic12off= new Image(147,36);
    pic12off.src="/image/OurRoutesButton.png";

    pic13on= new Image(166,36);
    pic13on.src="/image/YourContactButtonOn.png";

    pic13off= new Image(166,36);
    pic13off.src="/image/YourContactButton.png";
	
	
	// Translation Image Flips
	pic14on= new Image(101,25);
	pic14on.src="/image/Translation-Chinese.png";
	
	pic15on= new Image(101,25);
	pic15on.src="/image/Translation-French.png";
	
	pic16on= new Image(101,25);
	pic16on.src="/image/Translation-German.png";
	
	pic17on= new Image(101,25);
	pic17on.src="/image/Translation-Italian.png";
	
	pic18on= new Image(101,25);
	pic18on.src="/image/Translation-Japanese.png";
	
	pic19on= new Image(101,25);
	pic19on.src="/image/Translation-Korean.png";
	
	pic20on= new Image(101,25);
	pic20on.src="/image/Translation-Russian.png";
	
	pic21on= new Image(101,25);
	pic21on.src="/image/Translation-Spanish.png";
}

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

// Translation Light Up and Turn Off
function lightupTranslation(imgName,imgDest)
{
    if (document.images)
    {
        imgOn=eval(imgDest + "on.src");
        document[imgName].src= imgOn;
    }
}

function turnoffTranslation(imgName)
{
    if (document.images)
    {
        document[imgName].src= "/image/Translation-English.png";
    }
}


// Form Input Clear - All
function RemoveFirstName()
{
    document.ENewsForm.FirstName.value = "";
}
function AddFirstName()
{
    if (document.ENewsForm.FirstName.value != "")
    {
        
    }
    else
    {
        document.ENewsForm.FirstName.value = "First Name";
    }
}

function RemoveLastName()
{
    document.ENewsForm.LastName.value = "";
}
function AddLastName()
{
    if (document.ENewsForm.LastName.value != "")
    {
        
    }
    else
    {
        document.ENewsForm.LastName.value = "Last Name";
    }
}

function RemoveEmail()
{
    document.ENewsForm.Email.value = "";
}
function AddEmail()
{
    if (document.ENewsForm.Email.value != "")
    {
        
    }
    else
    {
        document.ENewsForm.Email.value = "Email Address";
    }
}

function RemoveSearchPhrase()
{
    if (document.SearchForm.Search.value == "Search Phrase")
    {
    	document.SearchForm.Search.value = "";
    }
}
function AddSearchPhrase()
{
    if (document.SearchForm.Search.value != "")
    {
        
    }
    else
    {
        document.SearchForm.Search.value = "Search Phrase";
    }
}

function RemoveSearchPhrase2()
{
    if (document.SearchForm.Search.value == "Search Phrase")
    {
	document.getElementById("Search").value = "";
    }
}
function AddSearchPhrase2()
{
	if (document.getElementById("Search").value != "")
	{
		
	}
	else
	{
		document.getElementById("Search").value = "Search Phrase";	
	}
}


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


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

    if (r == true)
    {
	window.open(address);
    }
    else
    {
	alert("You have chosen not to leave Pee Dee Regional Transportation Authority's web site.");
    }
}
