/*
----------------------------------------------------------------------
  JavaScript: GoodyearTires.com functions.

  Requires: prototype.js

----------------------------------------------------------------------
*/

// Sets the visibility of all dropdowns with class "taggedElement".
//
var taggedElements = null;
function getTaggedElements() {

	taggedElements = $$( '.taggedElement' );

} // End getTaggedElements().
function setTaggedElementVisibility( b ) {

	if ( document.all == null ) return;

	// If not already done so, get the list of tagged elements.
	if ( taggedElements == null ) getTaggedElements();

	// Set the tagged elements' visibility.
	var val = ( ( b == true ) ? "visible" : "hidden" );
	for ( var i = 0; i < taggedElements.length; i++ ) {
		taggedElements[ i ].style.visibility = val;
	} // End for.

} // End setTaggedElementVisibility();

// Toggles a customized drop down menu.
//
function toggleDropDown( id ) {

	var obj = document.getElementById( id );
	if ( obj != null ) obj.style.display = 'block';

} // End toggleDropDown().

// Closes a customized drop down menu.
//
function closeDropDown( id ) {

	var obj = document.getElementById( id );
	if ( obj != null ) obj.style.display = 'none';

} // End closeDropDown().

// Sets the navigation photo in the Auto Service section.
//
function as_setNavPhoto( src ) {

	var imgObj = document.getElementById( "as_navPhoto" );
	if ( imgObj != null ) imgObj.src = src;

} // End as_setNavPhoto().

// Selects a navigation link in the Auto Service section.
//
function as_selectNavItem( id ) {

	var linkObj = document.getElementById( id );
	if ( linkObj != null ) linkObj.className = "as_nav_on";

} // End as_selectNavItem().



// Legacy function.
//
function MM_openBrWindow(theURL,winName,features) { //v2.0
	window.open(theURL,winName,features);
}
