/** $Id: styles.js 43 2006-05-03 22:31:10Z 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()
		{
			if (tag_block.style.display == 'block')
			{
				tag_block.style.display = 'none';
			}
			else
			{
				tag_block.style.display = 'block';
			}
		}
	},
	'#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);