// JavaScript Document

function update(c,modid)
	{
	var feld = 'c' + c;
	new Effect.Fade('' + feld, {duration: 0.6, to: 0.01,
					afterFinish: function() {
						new Ajax.Updater('' + feld, 'include/ajaxphp.php', {parameters: {func: 1, modid: ''+modid, c: ''+c},
								onComplete:  function () {
									new Effect.Appear('' + feld, {duration: 0.6, from: 0.01});
											  			 }
										   			});
											}
						});
	};
	

function load_anmeldung_dat()
	{
	counter = document.getElementById('counter').value;
	counter++;
	new Ajax.Updater('amdat', 'include/anmeldung_daten.php', { method: 'get', parameters:{counter: ''+counter}, insertion: Insertion.Bottom});
	document.getElementById('counter').value = counter;
	};
	

function init_captcha()
	{
	document.getElementById('b1').disabled = true;
	document.getElementById('b1').value = "Sicherheitscode fehlt oder falsch";
	};
	
function check_captcha()
	{
	c = document.getElementById('captcha').value;
	new Ajax.Request('captcha/ajaxcheck.php', {method:'post', parameters: {c: ''+c},
					 onComplete:  function(transport)
					 			{
								if (transport.responseText=='ja')
								   {
									   document.getElementById('b1').disabled = false;
									   document.getElementById('b1').value = "Anmelden";
									 };
								}});
	};
