/** $Id: styles.js 116 2006-07-12 19:51:35Z garrett $ **/

/**
 * these are our behaviour styles
 */
 
var bRules = {
	'.hide_from_ie' : function(el)
	{
		el.onmouseover = function()
		{
			if (isIE)
			{
				el.firstChild.firstChild.nextSibling.nextSibling.style.display = 'inline';
			}
		}
		el.onmouseout = function()
		{
			if (isIE)
			{
				el.firstChild.firstChild.nextSibling.nextSibling.style.display = 'none';
			}
		}
	},
	'#showSearch' : function(el)
	{
		el.onclick = function()
		{
			if (search_div.style.display == 'block')
			{
				clearSearch();
			}
			else
			{
				search_div.style.display = 'block';
			}
		}
	},
	'#showTags' : function(el)
	{
		el.onclick = function()
		{
			results_wrapper_div.style.display = 'none';
			about_blurb.style.display = 'none';
			dashboard_div.style.visibility = 'visible';
			tag_block.style.display = 'block';
		}
	},
	'#showAbout' : function(el)
	{
		el.onclick = function()
		{
			results_wrapper_div.style.display = 'none';
			tag_block.style.display = 'none';
			about_blurb.style.display = 'block';
			dashboard_div.style.visibility = 'visible';
			
		}
	},
	'#close' : function(el)
	{
		el.onclick = function()
		{
			clearSearch();
		}
	},
	'#showAuthors' : function(el)
	{
		el.onclick = function()
		{
			if (author_block.style.display == 'block')
			{
				author_block.style.display = 'none';
			}
			else
			{
				author_block.style.display = 'block';
			}
		}
	},
	'#q' : function(el)
	{
		el.onfocus = function()
		{
			el.style.color = active_search_text_color;
			if (el.value == default_field_value)
			{
				el.value = '';
			}
		}
	}
};
Behaviour.register(bRules);