var head = document.getElementById("header-right")
if (head)
	head.className += " visual" + Math.round(Math.random() * 3);

/*
 * search
 */
var advTabHeight = 0; // filled automatically

function switchSearch()
{
	var $form = $('#advancedform')
	var $tab = $('#advancedtab')

	if ($form.is(':hidden')){
		advTabHeight = $tab.css('height')
		$tab.css("border-bottom","0px").css('background-position', '0px -35px')
		$tab.animate({"height":"30px"}, 200)
		$form.animate({"opacity":"show","height":"show"}, 200)
                $('#edit-adv').val(1);
	} else {
		$tab.css("border-bottom","").css('background-position', '0px 0px')
		$tab.animate({"height":advTabHeight}, 200)
		$form.animate({"opacity":"hide","height":"hide"}, 200)
                $('#edit-adv').val(0);
	}
}
