var COLORS = [["red", "#ff0000"], ["orange", "#ff8800"], ["green", "#008000"], ["blue", "#000080"], ["purple", "#800080"], ["black", "#000000"]];

function getColor(named){
    return COLORS[(colorIndex_++) % COLORS.length][named ? 0 : 1];
}

function getIcon(color){
    var icon = new GIcon();
    icon.image = "http://google.com/mapfiles/ms/micons/" + color + ".png";
    icon.iconSize = new GSize(32, 32);
    icon.iconAnchor = new GPoint(15, 32);
	icon.infoWindowAnchor = new GPoint(0, 0);
    return icon;
}

function toogle_objects( caption, show ){
	
	jQuery.each(gmaps.objects, function() {
		
		if( this.caption == caption ) {
			if( show ) {
				this.object.show();		
			} else {
				this.object.hide();	
			}			
		}
    });
}

