// Changes the size of the "q" element (the Google custom search box) on click
// By Tyler Young, of Laminar Research, 12 December 2011
var q;

function expand()
{
	q.size = 30;
}

function contract()
{
	q.size = 20;
}

function register()
{
	q = document.getElementById('q');
	q.size = 20;
	if( q.addEventListener )
	{
		q.addEventListener('focus', expand, false);
		q.addEventListener('blur', contract, false);
	}
	else if( q.attachEvent )
	{
		q.attachEvent('onfocus', expand);
		q.attachEvent('onblur', contract); 
	}
}

window.onload=register;

