var intval;
var fadeOut;
var valid;
var valid2;

function load_talent(id,total, module_id ) {
	clearInterval(intval);
	clearTimeout(fadeOut);
	
	//alert(module_id);
	
	new Ajax.Updater(
		'talenten_overview',
		'site/talenten_show.php',
		{
			method: 'post',
			parameters: 'id='+id+'&total='+total+'&module_id='+module_id,
			requestHeaders: ['Expires', 'Thu, 17 May 2001 10:17:17 GMT', 'Cache-Control', 'no-cache, must-revalidate', 'Pragma', 'no-cache']
		}
	);	
}


function load_talentInt(id) {
	intval = setInterval("talentShowRandom('"+id+"');", 8000);
}


function talentShowRandom (id) {
	
	new Ajax.Updater(
		'talenten_overview',
		'site/talenten_show.php',
		{
			method: 'post',
			parameters: 'id='+id,
			requestHeaders: ['Expires', 'Thu, 17 May 2001 10:17:17 GMT', 'Cache-Control', 'no-cache, must-revalidate', 'Pragma', 'no-cache'],
			onComplete: function() {
				Effect.Appear('talenten_overview', {duration: 1});
				fadeOut = setTimeout("Effect.Fade('talenten_overview', {duration: 1})",6500)
			}
		}
	);
}

function ikdoemee2(oldform,newform,dataform,page) {
	if(valid.validate()) {
		new Ajax.Updater(
			newform,
			'site/'+page,
			{
				method: 'post',
				parameters: Form.serialize(dataform),
				requestHeaders: ['Expires', 'Thu, 17 May 2001 10:17:17 GMT', 'Cache-Control', 'no-cache, must-revalidate', 'Pragma', 'no-cache'],
				evalScripts:true,
				onComplete: function() {
					Effect.SlideUp(oldform);
				}				
			});
			
		
	}
}


