

function conPage(msg,page,target,param) {
	if(!msg)
		msg = "Weet u dit zeker ?";
		
    if(!confirm("Let op: "+msg))
		return false;
	
	loadPage(page,target,param)
}

function loadPage(page,target,param) {
	
	var url 	= domain+page;
	var pars 	= param;
	var target 	= target;

	var effect = 0;
	
	if(jquery) {
	
		if(effect) {
			$("#"+target).hide("slide" , {direction : 'right' } , 750 , function() {
				$.get(url+"&"+pars, "", function(data) {
		    		$("#"+target).html(data).show("slide", { direction : 'left' }, 1000);
		  		});
			});
		}
		else {
			$.get(url+"&"+pars, "", function(data) {
				$("#"+target).html(data);   	
	  		});
		}
	}
	else
		if(prototype)
			var myAjax = new Ajax.Updater({success: target},url, {method: 'get', parameters: pars, evalScripts: 'true'});
		
}

function sendForm(page, id, target){
	
	var page = domain+page;
	if(jquery) {
	    // submit the form 
	    tmp = $('#'+id).serializeArray();
	    
	    $.post(page, tmp, function(data) {
	    	$("#"+target).html(data);
	  	});
		

	}
	else {
		if(prototype) {
			var params = Form.serialize($(id));
			new Ajax.Updater(target, page, { method: 'post',asynchronous:true, parameters:params,evalScripts: 'true'});
		}
	}
	
} 



