<?php
/**
 * @package		com_contactenhanced
 * @copyright	Copyright (C) 2006 - 2010 Ideal Custom Software Development
 * @author		Douglas Machado {@link http://ideal.fok.com.br}
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('_JEXEC') or die;
$script = "
window.addEvent('domready', function(){
	document.mapcpanelSlider = new Fx.Slide($('ce-map-cpanel-container')); 
	document.mapcpanelSlider.toggle();
});";
	$doc =& JFactory::getDocument();
	$doc->addScriptDeclaration($script);
?>
<div id="ce-map-cpanel-switch">
	<?php 
	/*JHtml::_('behavior.modal', 'a.ce-boxed');
	echo JHTML::_('link','#ce-map-cpanel',
			JText::_('CE_GMAPS_GET_DIRECTIONS'),
			array('class'=>'ce-route ce-boxed', 'rel'=>"{size:{x:500,y:350}}")
			); */
	echo JHTML::_('link','javascript:void(0);',
			JText::_('CE_GMAPS_GET_DIRECTIONS'),
			array('class'=>'ce-route ce-boxed', 'onclick'=>"document.mapcpanelSlider.toggle();")
			);
	?>
</div>
<div id="ce-map-cpanel-container">
	<div id="ce-map-cpanel" class="ce-map-cpanel">
	<form action="<?php echo JURI::current(); ?>" onsubmit="return false;">
		<fieldset>
			<legend><?php echo JText::_('CE_GMAPS_ROUTE_OPTIONS'); ?></legend>
			<div>
				<label for="address"><?php echo JText::_('CE_GMAPS_ROUTE_FROM_ADDRESS'); ?></label>
				<input type="text" class="inputbox" id="address" name="address" value="" />
			</div>
			<div>
				<label for="highways" class="labelCheckbox">
					<input type="checkbox" class="inputbox" id="highways" name="highways" />
					<?php echo JText::_('CE_GMAPS_ROUTE_AVOID_HIGHWAYS'); ?></label>
			</div>
			<div>
				<label for="tolls" class="labelCheckbox">
					<input type="checkbox" class="inputbox" id="tolls" name="tolls" />
					<?php echo JText::_('CE_GMAPS_ROUTE_AVOID_TOLLS'); ?></label>
			</div>
			<div class="submit"><div>
				<button type="button" class="button" id="ce-map-submit"
						onclick="ceMap.getDirections();document.mapcpanelSlider.toggle();"	>
						<?php echo JText::_('CE_GMAPS_BUTTON_SUBMIT');?></button>
				<button type="reset"  class="button" id="ce-map-submit" 
						onclick="ceMap.reset();document.mapcpanelSlider.toggle();"	>
						<?php echo JText::_('CE_GMAPS_BUTTON_RESET'); ?></button>
				</div>
			</div>
		</fieldset>
	</form>
	</div>
</div>
<div id="ce-directionsPanel"></div>
