
window.onload = function ( )
{
	// Check the search input box is in the page as it's not displayed
	// in the various secure areas
	if ( document.getElementById ( 'search_text' ) )
	{
		populate_search ( );	// For forms that use the country field
	}
}

/*----------------------------------------------------------------------------------------*/
function clear_search ( )
/*----------------------------------------------------------------------------------------*/
{
	str_value	= document.getElementById ( 'search_text' ).value;
	
	if ( str_value == 'Search' )
	{
		document.getElementById ( 'search_text' ).value = '';
		document.getElementById ( 'search_text' ).style.color = '#000000';
	}
}

/*----------------------------------------------------------------------------------------*/
function populate_search ( )
/*----------------------------------------------------------------------------------------*/
{
	str_value	= document.getElementById ( 'search_text' ).value;
	
	if ( str_value == '' )
	{
		document.getElementById ( 'search_text' ).value = 'Search';
		document.getElementById ( 'search_text' ).style.color = '#999999';
	}
}

/*-------------------*/
/* Collapsible boxes */
/*-------------------*/
$(document).ready(function(){

 $('#handbookList ul ul').css( 'display','none');
 $('#handbookList ul ul.first').css( 'display','block');
 $('.less').hide();
	
	$(".trigger").toggle(function(){
		$(this).addClass("more");
		}, function () {
		$(this).removeClass("more");
	});
	
	$(".trigger").click(function(){
		$(this).next().slideToggle("slow");
	});
	
	 $(".triggerFirst").toggle(function(){
		$(this).removeClass("more");
		}, function () {
		$(this).addClass("more");
	});
	
	$(".triggerFirst").click(function(){
		$(this).next().slideToggle("slow");
	});
 
 });