var groupId = Math.floor(Math.random()*1000000000); var error_message = "Une erreur est survenue !!\n\nRaffraichissez votre navigateur..."; var block1_content = ''; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// function findObj(theObj, theDoc) { var p, i, foundObj; if(!theDoc) theDoc = document; if( (p = theObj.indexOf("?")) > 0 && parent.frames.length) { theDoc = parent.frames[theObj.substring(p+1)].document; theObj = theObj.substring(0,p); } if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj]; for (i=0; !foundObj && i < theDoc.forms.length; i++) foundObj = theDoc.forms[i][theObj]; for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++) foundObj = findObj(theObj,theDoc.layers[i].document); if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj); return foundObj; } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// function myCallBackOnFinishUp(obj){ document.getElementById('block1').innerHTML = block1_content; //Cookie.set('ma_une_perso_active',1); //initBlock(); //new Effect.BlindDown(obj.element.id,{duration:3,afterFinish: myCallBackOnFinishDown}); } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// function myCallBackOnFinishDown(obj){ //alert(block1_content); } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// function active_votre_une() { var opt = { method: 'get', onSuccess: function(t) { block1_content = t.responseText; //new Effect.BlindUp('block_votre_une',{duration:3,afterFinish: myCallBackOnFinishUp}); document.getElementById('block_votre_une').innerHTML = block1_content; Cookie.set('ma_une_perso_active',1); initBlock(); }, // Handle 404 on404: function(t) { alert(error_message); }, // Handle other errors onFailure: function(t) { alert(error_message); } } new Ajax.Request('/static/your_block.php', opt); } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// function desactive_votre_une() { var opt = { method: 'get', // Handle successful response onSuccess: function(t) { block1_content = t.responseText; //new Effect.BlindUp('block_votre_une',{duration:3,afterFinish: myCallBackOnFinishUp}); Sortable.destroy('thelist'); Cookie.set('ma_une_perso_active',0); document.getElementById('block_votre_une').innerHTML = block1_content; }, // Handle 404 on404: function(t) { alert(error_message); }, // Handle other errors onFailure: function(t) { alert(error_message); } } new Ajax.Request('', opt); } var configAllOpened = false; //////////////////////////////////////////////////////////////////////////////// function openConfigAll() { var opt = { method: 'get', // Handle successful response onSuccess: function(t) { document.getElementById('config_all').innerHTML = t.responseText; if(!forConfig) new Effect.BlindDown('config_all'); configAllOpened = true; forConfig = 0; document.getElementById("block_list").innerHTML = ""; for(var i=0;i
"+tabBlocks[i]['title']+" ("+tabBlocks[i]['limit']+" article)
X
"; } Sortable.create('block_list',{onUpdate:getNewConfig}); }, // Handle 404 on404: function(t) { alert(error_message); }, // Handle other errors onFailure: function(t) { alert(error_message); } } if(!configAllOpened) new Ajax.Request('/static/your_block_config.php', opt); else close_config_all(); } //////////////////////////////////////////////////////////////////////////////// function delBlock(id) { var tmpData = new Array(); for(var i=0;i
"+tabBlocks[i]['title']+" ("+tabBlocks[i]['limit']+" article)
X
"; } Sortable.create('block_list',{onUpdate:getNewConfig}); } if(!reloadNotAllblock) initBlock(); reloadNotAllblock = 0; } //////////////////////////////////////////////////////////////////////////////// function close_config_all(){ configAllOpened = false; new Effect.BlindUp('config_all'); } //////////////////////////////////////////////////////////////////////////////// function serialize_tabBlocks(data) { var str_serialize = ''; for(var i=0;i0) str_serialize+='|NEWLINE|'; str_serialize+=escape(data[i]['id'])+'|SEPARATOR|'; str_serialize+=escape(data[i]['title'])+'|SEPARATOR|'; str_serialize+=escape(data[i]['collection'])+'|SEPARATOR|'; str_serialize+=escape(data[i]['limit']); } return str_serialize; } ////////////////////////////////////// function unserialize_tabBlocks(str) { var str = new String(str); var data = new Array(); var data_0 = str.split('|NEWLINE|'); for(var i=0;i 0) { sousMenu = UL[0].style; if(sousMenu.display == 'none' || sousMenu.display == '') { sousMenu.display = 'block'; if(document.all) { for(var i=0;i mouseover var tab = document.getElementById('articleVignetteUne').getElementsByTagName('a'); for(var i = 0; i < tab.length; i++) { tab[i].index = i; tab[i].onmouseover = function(){ var index = this.index; posXend = (width*(index)*-1); //Animation + décélération jQuery('#articleUne').animate({left: posXend - 20}, {queue: false, duration: 150}).animate({left: posXend }, {queue: false, duration: 250}); posXstart = posXend; //Réinitiasation de nextNews clearInterval(timerNews); timerNews = setInterval('nextNews()', timerInterval); } } timerNews = setInterval("nextNews()", timerInterval); }; function nextNews(){ var size = jQuery('#articleUne').css('width'); var width = jQuery('#maskUne').css('width'); max = size.length - 2; size = size.substring(0, max); max = width.length - 2; width = width.substring(0, max); posXend -= width; if(posXend <= size*-1) posXend = 0; jQuery('#articleUne').animate({left: posXend -20}, {queue: false, duration: 150}).animate({left: posXend}, {queue: false, duration: 250}); posXstart = posXend; }; var thisPage = 1; function nextVideos(){ var heightMask = jQuery('#scrollVignette').css('height'); heightMask = parseInt(heightMask.substring(0, heightMask.length - 2)); var heightContent = document.getElementById('scrollVignetteContent').offsetHeight; var nbPage = Math.round(heightContent/heightMask); if(heightContent%heightMask > 5) nbPage++; if(thisPage < nbPage) thisPage++; else thisPage = 1; posXendVideo = (Math.round(thisPage*heightMask) - heightMask)*-1; jQuery('#scrollVignetteContent').animate({top: posXendVideo -20}, {queue: false, duration: 500}).animate({top: posXendVideo}, {queue: false, duration: 850}); }; function previousVideos(){ var heightMask = jQuery('#scrollVignette').css('height'); heightMask = parseInt(heightMask.substring(0, heightMask.length - 2)); var heightContent = document.getElementById('scrollVignetteContent').offsetHeight; var nbPage = Math.round(heightContent/heightMask); if(heightContent%heightMask > 5) nbPage++; if(thisPage > 1) thisPage--; else thisPage = nbPage; posXendVideo = (Math.round(thisPage*heightMask) - heightMask)*-1; jQuery('#scrollVignetteContent').animate({top: posXendVideo-20}, {queue: false, duration: 500}).animate({top: posXendVideo}, {queue: false, duration: 850}); }; var brouilleURL = { _base16: "0A12B34C56D78E9F", encode: function (str) { var retour=""; for(var i=0;i>4; var cl=cc-(ch*16); retour+=this._base16[ch]+this._base16[cl]; } return "concierge"+retour; }, decode: function (str) { var retour=""; for(var i=0;i 3) { var tmp = this.decode(tagsA[i].className.substring(3)).split('|:|'); var url = tmp[0]; var nlink = document.createElement("a"); nlink.href = url; if(tmp[1]) nlink.target = tmp[1]; if(tmp[2]) nlink.className = tmp[2]; nlink.innerHTML = tagsA[i].innerHTML; tagsA[i].innerHTML = ""; tagsA[i].appendChild(nlink); } } } }