// JavaScript Document
function toggledisplay(div_id){
	var div1 = document.getElementById(div_id)
	if (div1.style.display == 'none') {
		div1.style.display = 'block'
	} else {
		div1.style.display = 'none'
	}
}

function myrequest( myform , erfolg )
{
	//var inputs = [];
	//$(':input', myform ).each(function(){ inputs.push(this.name + '=' + encodeURIComponent(this.value)); })
	jQuery.ajax({
		data: $(myform).serialize(),
		url: myform.action,
		type: "POST",
		timeout: 10000,
		error: function(){ console.log("25:Fehler"); },
		success: function(ret){ 
					 	$('#'+erfolg).html(ret);			
				}	
	});
}
	
function ajaxlink( user_id ,erfolg,wat,check )
{
	
	if(check==1)
	{
		if (!confirm('are you sure?') ) return;
	}
	jQuery.ajax({
	
		
		data: 'id='+user_id,
		url: site_url+'ajax/'+wat+'/'+user_id,
		type: "POST",
		timeout: 10000,
		error: function(){ console.log("25:Fehler"); },
		success: function(ret){
			$('#'+erfolg).html(ret);
		
			}
	});
			
}





