<?php
/**
* @version		1.7.0 / September 2011
* @package		mod_gsr.php
* @copyright	Copyright (C) 2008 - 2011 medienstroeme | Michael Olk - All rights reserved
* @license		GNU/GPL
*/

/** ensure this file is being included by a parent file */
defined('_JEXEC') or die('Direct Access to this location is not allowed.');

// map selected by country (to be set in module params)
$tld  = $params->get( 'tld' );
// define a target (no target by default / to be set in module params)
$target  = $params->get( 'target' );
// destination address (to be set in module params / hidden in the form)
$intro  = $params->get( 'intro' );
$street =  $params->get( 'street' );
$zip  = $params->get( 'zip' );
$city  = $params->get( 'city' );
$outro  = $params->get( 'outro' );
// formfield text (to be set in module params)
$frmtxt  = $params->get( 'frmtxt' );
// button text (to be set in module params)
$btntxt  = $params->get( 'btntxt' );
// styles (to be set in module params)
$margin  = $params->get( 'margin' );
$padding  = $params->get( 'padding' );
$width  = $params->get( 'width' );
$align  = $params->get( 'align' );
?>


<?php if ($params->get( 'intro' )) : ?>
<p style="margin:<?php echo $params->get( 'margin' ); ?>;padding:<?php echo $params->get( 'padding' ); ?>;text-align:<?php echo $params->get( 'align' ); ?>;">
<?php echo $params->get( 'intro' ); ?>
</p>
<?php endif; ?>
<form style="margin:<?php echo $params->get( 'margin' ); ?>;padding:<?php echo $params->get( 'padding' ); ?>;text-align:<?php echo $params->get( 'align' ); ?>;" action="http://maps.google.<?php echo $params->get( 'tld' ); ?>/maps" method="get" target="<?php echo $params->get( 'target' ); ?>">
<input style="width:<?php echo $params->get( 'width' ); ?>" type="text" name="saddr" value="<?php echo $params->get( 'frmtxt' ); ?>" onfocus="this.value = ''" />
<input type="hidden" name="daddr" value="<?php echo $params->get( 'street' ); ?> <?php echo $params->get( 'zip' ); ?> <?php echo $params->get( 'city' ); ?> <?php echo $params->get( 'country' ); ?>" />
<input type="submit" value="<?php echo $params->get( 'btntxt' ); ?>" />
</form>
<?php if ($params->get( 'outro' )) : ?>
<p style="margin:<?php echo $params->get( 'margin' ); ?>;padding:<?php echo $params->get( 'padding' ); ?>;text-align:<?php echo $params->get( 'align' ); ?>;">
<?php echo $params->get( 'outro' ); ?>
</p>
<?php endif; ?>