window.addEventListener?window.addEventListener("load",Load,false):window.attachEvent("onload",Load); var myCaroussels = new Array(); function Load(){ if(Body = document.getElementById("body")){ showInfoBox(); elements = Body.getElementsByTagName("div"); var count = 0; for (i=0; i 2){ caroussel.innerHTML = "
 
 
"+caroussel.innerHTML+"
 
 
"; } count ++; } } /**/ var accordion = new Accordion('span.menusection', 'div.menusection', {opacity: false, show:8, onActive: function(toggler, element){ toggler.setStyle('outline', 'none'); toggler.setStyle('text-decoration', 'none'); element.setStyle('outline', 'none'); element.setStyle('text-decoration', 'none'); }, onBackground: function(toggler, element){ toggler.setStyle('color', '#ffffff'); element.setStyle('color', '#ffffff'); }}, $('accordion')); /*SLIDESHOW INDEX*/ if(document.getElementById("imagesBoxes")){ goSlideShow(); } } } //CAROUSSEL function Caroussel(count,items,current,alt){ var status = 1; var Alt = alt; this.scroll=function(dif){ if(status == 1){ if(dif<0){ if(current > 0){ var c = current-1; this.Scroll(count,items,c); current--; } } if(dif>0){ if(current < items-1){ var c = current+1; this.Scroll(count,items,c); current++; } } bt_p = document.getElementById("caroussel_previous_"+count); bt_p_off = document.getElementById("caroussel_previous_off_"+count); bt_n = document.getElementById("caroussel_next_"+count); bt_n_off = document.getElementById("caroussel_next_off_"+count); if(Alt == "alt"){ var caritems = items-2; } else { var caritems = items-3; } if(current==0){ bt_p.style.display = "none"; bt_p_off.style.display = "block"; bt_n.style.display = "block"; bt_n_off.style.display = "none"; }else if (current==caritems){ bt_p.style.display = "block"; bt_p_off.style.display = "none"; bt_n.style.display = "none"; bt_n_off.style.display = "block"; }else { bt_p.style.display = "block"; bt_p_off.style.display = "none"; bt_n.style.display = "block"; bt_n_off.style.display = "none"; } } } this.Scroll=function(count,total,j){ status = 0; var c = document.getElementById("caroussel_container_"+count); var myFx = new Fx.Scroll(c, {duration: 400, wait: false, transition:Fx.Transitions.Quart.easeInOut}); if(Alt == "alt"){ myFx.start(180*j,0).chain(function(){status=1;}); }else{ myFx.start(130*j,0).chain(function(){status=1;}); } } } function previous(nbr){ myCaroussels[nbr].scroll(-1); } function next(nbr){ myCaroussels[nbr].scroll(1); } function showCategories(type){ if(type=="sale"){ var sales = document.getElementById("sale"); sales.style.background = "#ffffff"; document.getElementById("categoriesSale").style.display = "block"; var rental = document.getElementById("rental"); rental.style.background = "none"; document.getElementById("categoriesRental").style.display = "none"; //var main = document.getElementById("main"); //main.style.background = "url('/img/body_bkg_homepage_yellow.gif') repeat-y left top"; //var footer = document.getElementById("footer"); //footer.style.background = "url('/img/body_footer_homepage_yellow.gif') no-repeat left top"; }else if (type=="rental"){ var sales = document.getElementById("sale"); sales.style.background = "none"; document.getElementById("categoriesSale").style.display = "none"; var rental = document.getElementById("rental"); rental.style.background = "#ffffff"; document.getElementById("categoriesRental").style.display = "block"; //var main = document.getElementById("main"); //main.style.background = "url('/img/body_bkg_homepage_red.gif') repeat-y left top"; //var footer = document.getElementById("footer"); //footer.style.background = "url('/img/body_footer_homepage_red.gif') no-repeat left top"; } } var t_h = 0; function showBasket(Switch,type){ var basketContent = document.getElementById("basketContent"); if(Switch=="on"){ clearTimeout(t_h); var basket = document.getElementById("basket"); basketContent.style.display = "block"; /*if($(basketContent).fx){ $(basketContent).fx.stop(); } $(basketContent).fx = $(basketContent).effect('opacity',{duration:0}); $(basketContent).fx.start(1);*/ //basketContent.set('tween', {duration: 200}); var myFx = new Fx.Tween(basketContent); myFx.set('opacity','1'); if(type=="homepage"){ var t = 232+basket.offsetHeight+"px"; }else{ var t = 77+basket.offsetHeight+"px"; } basketContent.style.top = t; var guide = document.getElementById("guide"); var w = guide.offsetWidth; if(w>952){ basketContent.style.left = w/2+194+"px"; }else{ basketContent.style.left = "672px"; } }else if (Switch=="off"){ clearTimeout(t_h); t_h = setTimeout("hideBasket()", 300); } } function hideBasket(){ var basketContent = document.getElementById("basketContent"); /*if($(basketContent).fx){ $(basketContent).fx.stop(); } $(basketContent).fx = $(basketContent).effect('opacity',{duration:150}); $(basketContent).fx.start(0).chain(function(){basketContent.style.display = "none";});*/ //basketContent.Tween('tween', {duration: 'long'}); /*basketContent.set('tween', {duration: 200}); basketContent.tween('opacity','0');*/ var myFx = new Fx.Tween(basketContent, {duration: 200}); myFx.start('opacity','0'); } function showPricesLine(id){ var tr = document.getElementById("pricesLine_"+id); var trTwin = document.getElementById("pricesLine_twin_"+id); tr.style.background = "#f4f4f4"; trTwin.style.background = "#f4f4f4"; } function hidePricesLine(id){ var tr = document.getElementById("pricesLine_"+id); var trTwin = document.getElementById("pricesLine_twin_"+id); tr.style.background = "#ffffff"; trTwin.style.background = "#ffffff"; } function showCaracteristicsLine(id){ var tr = document.getElementById("caracteristicsLine_"+id); tr.style.background = "#f4f4f4"; } function hideCaracteristicsLine(id){ var tr = document.getElementById("caracteristicsLine_"+id); tr.style.background = "#ffffff"; } /**/ var newPositionTag; var newPositionValue; var livingTime; var livingTimeImage; var actualIBoxIndex; //var infoBoxes; var actualBoxIndex; var imagesBoxes = 0; //timedOut(); function switchInfoBox() { obj = document.getElementById(imagesBoxes[actualBoxIndex].id); var myFx = new Fx.Tween(obj); myFx.set('opacity','0'); myFx.start(newPositionTag, '0', newPositionValue); obj.fade('in'); a = setTimeout('obj.fade(\'out\');',livingTime); b = setTimeout('var myFx = new Fx.Tween(obj, {transition: Fx.Transitions.Elastic.easeInOut, duration:150});myFx.start(newPositionTag, newPositionValue, \'0\');',livingTime+500); actualBoxIndex++; if(actualBoxIndex >= imagesBoxes.length) actualBoxIndex = 0; x = setTimeout('switchInfoBox()',livingTime+500); } /*ib = setTimeout('showInfoBox',1000);*/ function showInfoBox() { if (document.getElementById("infoBox")){ obj = document.getElementById("infoBox"); obj.style.display = 'block'; /* var myFx = new Fx.Tween(obj); obj.fade('in');*/ } } function switchImagesBox() { obji = document.getElementById(imagesBoxes[actualIBoxIndex].id); var myFx = new Fx.Tween(obji, {transition: Fx.Transitions.Elastic.easeInOut, duration:150}); obji.fade('in'); ai = setTimeout('obji.fade(\'out\');',livingTimeImage); actualIBoxIndex++; if(actualIBoxIndex >= imagesBoxes.length) actualIBoxIndex = 0; xi = setTimeout('switchImagesBox()',livingTimeImage); } function goSlideShow(){ newPositionTag = "left"; newPositionValue = -150; livingTime = 5000; livingTimeImage = livingTime + 500; actualIBoxIndex = 0; imagesBoxes = document.getElementById("imagesBoxes").getElementsByTagName("div"); //infoBoxes = document.getElementById("infoBoxes").getElementsByTagName("div"); actualBoxIndex = 0; for(i=0;i