
// used in index.php
function get_info(name)
{
  new Ajax.Request('get_info.php?name=' + name,
				{
					onSuccess: function(t)
					{
            $('response').innerHTML = t.responseText;
					},
					onFailure: function(t)
					{
						alert('Es ist ein Fehler aufgetreten.');
					}
				}
			);
}

// used in index.php
function get_result(name)
{
  new Ajax.Request('get_result.php?name=' + name,
				{
					onSuccess: function(t)
					{
            $('content').style.display = 'none';
            $('ergebnis').innerHTML = t.responseText;
					},
					onFailure: function(t)
					{
						alert('Es ist ein Fehler aufgetreten.');
					}
				}
			);
}

function get_region_result(name)
{
    new Ajax.Request('get_region_result.php?name=' + name,
				{
					onSuccess: function(t)
					{
            $('content').style.display = 'none';
            $('ergebnis').innerHTML = t.responseText;
					},
					onFailure: function(t)
					{
						alert('Es ist ein Fehler aufgetreten.');
					}
				}
			);
}

function get_chapter_by_stat(stat)
{
    new Ajax.Request('get_chapter_by_stat.php?stat=' + stat,
				{
					onSuccess: function(t)
					{
            $('member').innerHTML = t.responseText;
					},
					onFailure: function(t)
					{
						alert('Es ist ein Fehler aufgetreten.');
					}
				}
			);
}

function chapter_stat_down(id)
{
    new Ajax.Request('chapter_stat_down.php?id=' + id,
				{
					onSuccess: function(t)
					{
            location.reload();
					},
					onFailure: function(t)
					{
						alert('Es ist ein Fehler aufgetreten.');
					}
				}
			);
}

function chapter_stat_up(id)
{
    new Ajax.Request('chapter_stat_up.php?id=' + id,
				{
					onSuccess: function(t)
					{
            location.reload();
					},
					onFailure: function(t)
					{
						alert('Es ist ein Fehler aufgetreten.');
					}
				}
			);
}

function get_chapter_info(id)
{
  new Ajax.Request('get_chapter_info.php?id=' + id,
				{
					onSuccess: function(t)
					{
            $('member').innerHTML = t.responseText;
					},
					onFailure: function(t)
					{
						alert('Es ist ein Fehler aufgetreten.');
					}
				}
			);
}

function get_chapter_contactform(id, region)
{
   new Ajax.Request('get_chapter_contactform.php?id=' + id + '&region=' + region,
				{
					onSuccess: function(t)
					{
            $('member').innerHTML = t.responseText;
					},
					onFailure: function(t)
					{
						alert('Es ist ein Fehler aufgetreten.');
					}
				}
			);
}

function get_memberinfo(id)
{
   new Ajax.Request('get_memberinfo.php?id=' + id,
				{
					onSuccess: function(t)
					{
            $('memberinfo_' + id).style.display = 'block';
            $('memberinfo_' + id).innerHTML = t.responseText;
					},
					onFailure: function(t)
					{
						alert('Es ist ein Fehler aufgetreten.');
					}
				}
			);
}

function togglediv(id)
{
    if ($('block_' + id).style.display == 'none')
    {
        //    Effect.Appear($('block_' + id));
        $('block_' + id).style.display = 'block';
        $('mehr_' + id).style.display = 'none';
    }
    else
    {
        $('mehr_' + id).style.display = 'block';
        $('block_' + id).style.display = 'none';
        //        Effect.Fade($('block_' + id));
    }
}

function togglediv2(id)
{
  if ($(id).style.display == 'none'){
	  $(id).style.display = 'block';
  } else {
        $(id).style.display = 'none';
  }
}

