// Préchargement des images
function preloadImages() {
	var preloaded = new Array();
    for (var i = 0; i < arguments.length; i++){
        preloaded[i] = document.createElement('img');
        preloaded[i].setAttribute('src',arguments[i]);
    };
};

function changeCurrentSubPageSession (Name, Value) {
	$.post(
		"/"+DirFrontend + WebSiteVersion + "/controller/common/ajax.php",
		{AdminMode: AdminMode, ToDo: 'changeCurrentSubPageSession', CurrentPageId: CurrentPageId, Name: Name, Value: Value}
	);
};

function loadCommonTagId(TagIdToLoad) {
	$('#' + TagIdToLoad).html('<div class="ajaxWaitingLayer"></div>').load(
		"/"+DirFrontend + WebSiteVersion + "/controller/common/ajax.php",
		{AdminMode: AdminMode, ToDo:"loadCommonElement", CurrentPageId: CurrentPageId, TagIdToLoad: TagIdToLoad}
	);
};

function goToPage (url)
{
	var functionToExecute = function () {
		location.href = url;
	};
	if (AdminMode) adminFilterLinkExecution(functionToExecute, 'Menu');
	else functionToExecute();
};
