var Ajax = new sack();

function onComplete() {
	if (Ajax.responseStatus && Ajax.responseStatus[0] == '200') {
        Ajax.runResponse();
	} else {
		alert('Erreur durant le chargement des archives.');
	}
}

function getContent(type, lastid, id) {
    if((type != "photos" && type != "videos") || lastid < 7 || (id != 0 && id != 1 && id != 2 && id != 3)) return false;
    
    Ajax.setVar('type', type);
    Ajax.setVar('lastid', lastid);
    Ajax.setVar('id', id);
    Ajax.requestFile = 'ajax.php';
    Ajax.method = 'POST';
    Ajax.onCompletion = onComplete;
    Ajax.runAJAX();
}
