/*
 * Tag History
 */
function doTagHistory()
{
	// Check if valid option
	if ($F('tag_h') != '' || $F('tag_h') != '...')
	{
		// Append tag to listing
		$('tag').value = (($F('tag') != '') ? ($F('tag') + ' ') : ('')) + $F('tag_h');
		
		// Clear selected tag/option
		$('tag_h').options[$('tag_h').selectedIndex] = null;
		// Move select to start
		$('tag_h').selectedIndex = 0;
	}
}

/*
 * Search
 */
function doJrnSearch()
{
	// Set search URL
	var fnd_url = $F('jrn_fnd_url') + '/keyword';
	
	if ($F('jrn_fnd_q') == '')
	{
		alert('To search this blog, enter a keyword.');
		
		return(false);
	}
	else
	{
		// Search type
		// All blogs
		if ($('jrn_fnd_typ_all').checked == true)
		{
			fnd_url = $F('jrn_fnd_all_url');
		}
		// edZone
		else if ($('jrn_fnd_typ_edz').checked == true)
		{
			fnd_url = $F('jrn_fnd_edz_url');
		}
		
		// Redirection to search
		location.href = fnd_url + '/' + $F('jrn_fnd_q');
	}
	
	/*
	// Search type
	var jrn_fnd_typ = '';
	
	// Empty search?
	if ($F('jrn_fnd_q') == '')
	{
		alert('To search this blog, enter a keyword.');
		
		return(false);
	}
	else
	{
		// Search type
		if ($('jrn_fnd_typ_keyword').checked == true)
		{
			jrn_fnd_typ = 'keyword';
		}
		else
		{
			jrn_fnd_typ = 'fulltext';
		}
		
		// Redirection
		location.href = $F('jrn_fnd_url') + jrn_fnd_typ + '/' + $F('jrn_fnd_q');
	}
	*/
}

//[GC]
/*
 * Search for the manage area
 */
function doJrnMngSearch()
{
	// Set search URL
	var fnd_url = $F('jrn_fnd_url') + '/keyword';
	
	if ($F('jrn_fnd_q') == '')
	{
		alert('To search this blog, enter a keyword.');
		
		return(false);
	}
	else
	{
		// Redirection to search
		location.href = fnd_url + '/' + $F('jrn_fnd_q');
	}
}
//[GC]