//<![CDATA[
// Baseline 2nd search javascript document © 2007 HDR Visual Communications //

var oldVal = 'null';
var value = $('searchBox').getProperty('value');

if(value == 'Search issue index:')
{
	oldVal = 'SIX';
}else
if(value == 'Search Contributors:')
{
	oldVal = 'SC';
};

$('searchBox').addEvent('focus', function()
{
	value = this.getProperty('value');
	if(value == 'Search issue index:')
	{
		this.setProperty('value', '');
	}else
	if(value == 'Search Contributors:')
	{
		this.setProperty('value', '');
	}else
	{
		this.select();
	}
});

$('searchBox').addEvent('blur', function()
{
	value = this.getProperty('value');
	if(value == '' && oldVal == 'SIX')
	{
		this.setProperty('value', 'Search issue index:');
	}else
	if(value == '' && oldVal == 'SC')
	{
		this.setProperty('value', 'Search Contributors:');
	}
});


	var wc = new Fx.Scroll(window, {
		wait: false,
		duration: 1500,
		transition: Fx.Transitions.Quad.easeInOut
	});
	
	var names = $$('#pagList .letter li');
	names.each(function(name)
	{
		var id = name.getProperty('class');
		id = id.substring('2');
		name.setStyle('cursor','pointer');
		name.setProperty('title','Click to see details');
		name.addEvent('click', function(e)
		{
			var url = siteUrl+'about_contact/contributors/AJAX_get_contributor/'+id;
			new Ajax(url,
			{
				update: $('searchResults'),
				onComplete: function()
				{
					wc.toElement('container');
				}
			}).request();
		});
	});


//]]>
