function clearInput(m) { if (m.value == 'Recherche par mots-clefs') m.value = ''; } function toogle(id, type, flag) { $(id).style.backgroundPosition = (type == 'in') ? 'bottom' : 'top'; $(id).style.color = (type == 'in') ? 'white' : 'black'; if (flag == 1) $(id + '-menu').style.display = (type == 'in') ? 'block' : 'none'; } function mmenu(id, pos, out) { if (pos >= 0) $(id).style.backgroundPosition = pos + '%'; else $(id).style.backgroundPosition = out + '%'; } function ici_func(id, show) { $(id).style.display = show; } function multim(id, show) { do { if (!flag) var flag = 0; var tab = id.split('_'); var i = 0; var str = ""; while (i < tab.length - 1) { if (i != 0) str += '_'; str += tab[i]; i++; } var last = tab[i]; if (tab.length == 1) { $(id).style.backgroundPosition = (show == 'on') ? 'bottom' : 'top'; $(id).style.color = (show == 'on') ? 'white' : 'black'; $(id + '_menu').style.display = (show == 'on') ? 'block' : 'none'; flag= 1; } else if (last == 'menu') { if ($(str + '_' + last)) $(str + '_' + last).style.display = (show == 'on') ? 'block' : 'none'; } else { if ($(str + '_' + last)) { $(str + '_' + last).style.color = (show == 'on') ? '#4297d0' : 'black'; $(str + '_' + last).style.backgroundColor = (show == 'on') ? 'white' : '#e5f1f8'; if ($(str + '_' + last + '_menu')) $(str + '_' + last + '_menu').style.display = (show == 'on') ? 'block' : 'none'; } } id = str; } while (flag == 0); } function rech(id) { var tab = Array('facade', 'menuiserie', 'decoration'); var i = 0; while (tab[i]) { if (id != tab[i]) $(tab[i]).style.display = 'none'; i++; } $(id).style.display = 'block'; $$('.inputRech').each( function(m){m.checked = "";}); } function show_rech(id) { $(id).style.display = ($(id).style.display == 'block') ? 'none' : 'block'; } function app(opacite) { if(i == images.length){i = 0;} if(opacite < 100) { opacite = parseInt(opacite + 5); document.getElementById('fondu').style.opacity = (opacite / 100); document.getElementById('fondu').style.MozOpacity = (opacite / 100); document.getElementById('fondu').style.KhtmlOpacity = (opacite / 100); document.getElementById('fondu').style.filter = "alpha(opacity=" + opacite + ")"; document.getElementById('fondu').style.display = 'inline'; setTimeout('app('+opacite+')',50); } else { setTimeout('fondre(100)',3000); } } function fondre(opacite) { if(opacite > 0) { opacite = parseInt(opacite - 5); document.getElementById('fondu').style.opacity = (opacite / 100); document.getElementById('fondu').style.MozOpacity = (opacite / 100); document.getElementById('fondu').style.KhtmlOpacity = (opacite / 100); document.getElementById('fondu').style.filter = "alpha(opacity=" + opacite + ")"; setTimeout('fondre('+opacite+')',50); } else { i++; if(i == images.length){i = 0;} document.getElementById('diaporama').innerHTML = ''; app(0); } } var stockTime; function diaporama() { document.getElementById('diaporama').innerHTML = 'diapo'; stockTime = setTimeout('fondre(100)',3000); } function superFunc(scat, nb) { $('diaporama').style.display = "none"; clearTimeout(stockTime); $('contentImg').innerHTML = ""; $('contentImg').style.display = "block"; new Ajax.Updater('contentImg', ''+scat+'', { method: 'get', insertion: Insertion.Top }); //Element.update('contentImg', scat); } function abcd(id) { if(id == 'deco') { $('faca').style.color = '#c1cfe5'; $('menuise').style.color = '#9fddac'; $('deco').style.color = '#bd7014'; } if(id == 'faca') { $('faca').style.color = '#094197'; $('menuise').style.color = '#9fddac'; $('deco').style.color = '#f1cf8c'; } if(id == 'menuise') { $('faca').style.color = '#c1cfe5'; $('menuise').style.color = '#017439'; $('deco').style.color = '#f1cf8c'; } } function ADDfavoris() { if ( navigator.appName != 'Microsoft Internet Explorer' ){ window.sidebar.addPanel("Corona Batiment","http://www.coronabatiment.net",""); } else { window.external.AddFavorite("http://www.coronabatiment.net","Corona Batiment"); } }