
function toggleNewsStory(story) {
	Element.toggle('rm_'+story);
	Element.toggle('story_'+story);
}

function toggleService(serv) {
	if ( $('versionLink'+serv).visible() ) {
		//hide others, show it
		hideServiceDetails(serv);
		showServiceLinks(serv);
		$('versionLink'+serv).hide();
		$('versions'+serv).show();		
	} else {
		//hide it
		$('versionLink'+serv).show();
		$('versions'+serv).hide();
	}
}

function hideServiceDetails(skip) {
	boxes = document.getElementsByClassName('serviceVersions');
	for (i=0; i<boxes.length; i++) {
		if ( boxes[i].id != skip ) Element.hide(boxes[i]);
	}
}

function showServiceLinks(skip) {
	links = document.getElementsByClassName('serviceLink');
	for (i=0; i<links.length; i++) {
		if ( links[i].id != skip ) Element.show(links[i]);
	}
}

function showPlan(id) {
	hidePlanInfo();
	//showPlanLink();
	//$('planLink'+id).hide();
	new Effect.BlindDown($('planInfo'+id));		
}

function hidePlanInfo() {
	infos = document.getElementsByClassName('planInfo');
	for (i=0; i<infos.length; i++) {
		Element.hide(infos[i]);
	}
}

/*
function showPlanLink() {
	links = document.getElementsByClassName('planLink');
	for (i=0; i<links.length; i++) {
		Element.show(links[i]);
	}
}
*/

function getDirections(to) {
	from = $F('from');
	$('map_canvas').style.width='435px';
	$('directions').show();
	setDirections(from, to, "en_US");
}

function clearZip() {
	if($F('zip')=='Zipcode')$('zip').value='';
}

function setZip() {
		if($F('zip')=='')$('zip').value='Zipcode';
}

function clearLocZip() {
	if($F('locZip')=='Zipcode')$('locZip').value='';
}

function setLocZip() {
		if($F('locZip')=='')$('locZip').value='Zipcode';
}


var moviePlaying = false;
var movieEverPlayed = false;

function toggleMovie(movie) {
	if(moviePlaying) {
		var movie_switch='stop';
		moviePlaying=false;
		$('movieButtonImage').src="/images/playMovie.png";
		$('movieButtonImage').alt="Play Movie";
	}
	else {
		var movie_switch='play';
		moviePlaying=true;
		$('movieButtonImage').src="/images/stopMovie.png";
		$('movieButtonImage').alt="Stop Movie";
	}
	new Ajax.Updater('movieCell','/video.php?switch='+movie_switch,{evalScripts:true});

/*
	if ( moviePlaying ) {
		$('adMovie').Stop();
		$('movieButton').innerHTML = 'Play Movie';
		moviePlaying = false;	
	} else {
		if ( !movieEverPlayed ) {
			$('adMovie').SetURL($('adMovie').GetHREF());
			movieEverPlayed = true;
		}
		$('adMovie').Play();
		$('movieButton').innerHTML = 'Stop Playing';
		moviePlaying = true;
	}
	//movieML =  QT_GenerateOBJECTText_XHTML('/media/'+movie,)
*/
}

/*
// Initialize and render the menu bar when it is available in the DOM
YAHOO.util.Event.onContentReady("menu", function () {
		// Instantiate and render the menu bar
		var oMenuBar = new YAHOO.widget.MenuBar("menu", { autosubmenudisplay: true, hidedelay: 750, lazyload: true, submenualignment:['tl','bl']});
		oMenuBar.render();
		updateMenuWidths(oMenuBar);
		//hilight(ACTIVE_TAB);
});
//YAHOO.util.Event.onContentReady("container",positionLogo());
*/