// JavaScript Document

/**FUNCTION shows/hides html elements due to the id*/
function show_hide(id)
{
  var object = document.getElementById(id);
  object.style.display = (object.style.display == "none") ? '' : 'none';
}

/**FUNCTION redirect the site to the target site after confirm.
 * Martin Modl.
 */
function confirmation_redirection(url, text) {
  var question = confirm(text);
  if (question == true) {
    window.location.href = url;
  }
}

/**FUNCTION for the main jQuery parts.
 * Martin Modl.
 */
function jQueryMainFunctions() {
  jQuery(function() {
    // ------------------------------
    //SHOW/HIDE display - rel parametter
    jQuery(".showHide").click(function() {
      var id = jQuery(this).attr("rel");      
      if(jQuery("#" + id).is(":visible")) {
         jQuery("#" + id).hide("slow");
      } else {
         jQuery("#" + id).show("slow");
      }
    });
    // ------------------------------
    //SHOW/HIDE display - id parametter
    jQuery(".showHideID").click(function() {
      var id = jQuery(this).attr("id");
      if(jQuery("#" + id + "ShowHide").is(":visible")) {
         jQuery("#" + id + "ShowHide").hide("slow");
      } else {
         jQuery("#" + id + "ShowHide").show("slow");
      }
    });
  });
}



