<?php
/**	*************************************************************************************************************
*	mgspacer.php                                                                                                 
*	-------------------------------------------------------------------------------------------------------------
*	@author     Mario Gleichmann                                                                                 
*	@package    mod_olark_chat                                                                                   
*	@version    1.1.1                                                                                            
*	@copyright  Copyright (C) 2009 Mario Gleichmann. All rights reserved.                                        
*	@mail       mgleich@orcas-internet.de                                                                        
*	@license    GNU/GPL, see LICENSE.php                                                                         
*	                                                                                                             
*	Joomla! is free software. This version may have been modified pursuant to the GNU General Public License, and
*	as distributed it includes or is derivative of works licensed under the GNU General Public License or other  
*	free or open source software licenses. See COPYRIGHT.php for copyright notices and details.                  
*/

// Check to ensure this file is within the rest of the framework
defined('JPATH_BASE') or die();

//----------------------------------------------------------------------------------------------------------------
/**
 * Renders a spacer element
 *
 * @package 	Joomla.Framework
 * @subpackage	Parameter
 * @since		1.5
 */
class JElementMGSpacer extends JElement
{
	/**
	* Element name
	*
	* @access	protected
	* @var		string
	*/
	var	$_name = 'MGSpacer';

	//------------------------------------------------------------------------------------------------------------
	function fetchTooltip($aLabel, $aDescription, &$aNode, $aControlName, $aName)
	{
		return $aDescription;
	}

	//------------------------------------------------------------------------------------------------------------
	function fetchElement($aName, $aValue, &$aNode, $aControlName)
	{
		$sStyle1=( $aNode->attributes('style') ? 'style="'.$aNode->attributes('style').'"' : 'style="font-weight: bold; text-align: center;"' );
		$sStyle2=( $aNode->attributes('style2') ? 'style="'.$aNode->attributes('style2').'"' : 'style="margin-top: -15px;"' );
		$sStyle3=( $aNode->attributes('style3') ? 'style="'.$aNode->attributes('style3').'"' : 'style="background-color: #F6F6F6; padding-left: 5px; padding-right: 5px;"' );
		$sClass=( $aNode->attributes('class') ? 'class="'.$aNode->attributes('class').'"' : 'class="mgspacer"' );

		return "<div $sClass $sStyle1><hr /><div $sStyle2><span $sStyle3>".JText::_($aValue)."</span></div></div>";
	}
}
