/**
********************************************************************************
* scripts.js
********************************************************************************
* @file         scripts.js
*
* @version      S+P Website $Rev: 0 $
* @version      Copyright (C) 2010 S+P LION AG
*
* @brief        Website S+P LION AG
*
* @author       Andreas Christ <andreas.christ@sp-lion.com>
*
* @date         20.12.2010 09:16 / Andreas Christ
*                 - Pfad nach print.php angepasst.
* @date         16.12.2010 14:16 / Andreas Christ
*                 - chk_maps_target().
* @date         14.12.2010 14:24 / Andreas Christ
*                 - Google-Maps scripts ausgelagert.
* @date         29.11.2010 09:54 / Andreas Christ
*                 - check_contact() in contact_form.php ausgelagert.
* @date         18.11.2010 16:50 / Andreas Christ
*                 - check_contact().
* @date         03.11.2010 13:39 / Andreas Christ
*                 - Pilot.
*
**************************************************************************** **/
//==============================================================================

//==============================================================================
// PREDEFINES and CONSTANTS
//==============================================================================


//==============================================================================
// FUNCTIONS
//==============================================================================

//----------------------------------------------------------------------------
function zoom_div()
//----------------------------------------------------------------------------
/**
*
* @author     Andreas Christ
* @date       05.11.2010 14:05 / Andreas Christ
*               - Pilot.
* @date       05.11.2010 14:05 / Andreas Christ
*               - Pilot.
* @brief      Passt die Groesse eines divs an.
* @param      -
*
* @return     -
*/
//----------------------------------------------------------------------------
  {
    var _offset = 80;

    var obj_reference = ( document.getElementById('div_content_rechts_allgemein') )
                        ? document.getElementById('div_content_rechts_allgemein')
                        : document.getElementById('div_content_rechts_leistungen');

    var _height = document.getElementById('div_content').clientHeight - _offset;

    obj_reference.style.height = _height.toString(10) + 'px';

  }  // zoom_div()


//----------------------------------------------------------------------------
function chk_maps_target(obj)
//----------------------------------------------------------------------------
/**
*
* @author     Andreas Christ
* @date       16.12.2010 14:13 / Andreas Christ
*               - Pilot.
* @brief      Checkt auf richtige Eingabe eines Zieles.
* @param      obj : Anchor-Objekt
*
* @return     true  -> Feld hat Inhalt
*             false -> Feld ohne Inhalt
*/
//----------------------------------------------------------------------------
  {
    var maps_target = $('#maps_target').val();

    if(maps_target != '')
      {
        obj.href = '/print.php?target=' + maps_target;
        return(true);
      }
    else
      {
        alert('Target empty');
        return(false);
      }
  }  // chk_maps_target()
