Find var position in array

Hi there,

Is it possible to call a function to tell me if a var string is in my array. And if so, what position it is in?

I pictured it to look something a little like this:

var pages:Array=['index','services','about','testimonials','contact'];
var pageName:String;
	
pageName="services";

if (pageName==pages*) {
	main.gotoAndStop(*);
}

Cheers