var mySlideshows = new Array(); window.addEventListener?window.addEventListener("load",start,false):window.attachEvent("onload",start); function start(){ if(Body = document.getElementById("body")){ elements = Body.getElementsByTagName("div"); var count = 0; for (i=0; i
 
 
 
 
 
"; nav = slideshow.getElementsByTagName("div"); nav[0].style.top = (slideshow.offsetHeight/2)-25+"px"; nav[0].style.opacity = "0"; nav[0].style.filter = "alpha(opacity=0)"; count ++; } } } if(logo = document.getElementById("logo")){ logo.addEventListener?logo.addEventListener("click",yellow,false):logo.attachEvent("onclick",yellow); } cleanForm(); } /* TEXTAREA */ function countLines(strtocount, cols) { var hard_lines = 1; var last = 0; while ( true ) { last = strtocount.indexOf("\n", last+1); hard_lines ++; if ( last == -1 ) break; } var soft_lines = Math.round(strtocount.length / (cols-1)); var hard = eval("hard_lines " + unescape("%3e") + "soft_lines;"); if ( hard ) soft_lines = hard_lines; return soft_lines; } function cleanForm() { var the_form = document.forms[0]; for ( var x in the_form ) { if ( ! the_form[x] ) continue; if( typeof the_form[x].rows != "number" ) continue; the_form[x].rows = countLines(the_form[x].value,the_form[x].cols) +1; } setTimeout("cleanForm();", 50); } /* SLIDESHOW */ function Slideshow(nbr,id,imgs,current){ this.previous=function(){ if(current > 0){ this.Switch(current-1,current,id,imgs); current--; } } this.next=function(){ if(current < imgs-1){ this.Switch(parseInt(current)+1,current,id,imgs); current++; } } this.over=function(){ this.concern = document.getElementById(id); this.nav = this.concern.getElementsByTagName("div"); navv = this.nav[0]; if($(navv).fx){ $(navv).fx.stop(); } $(navv).fx = $(navv).effect('opacity', {duration: 100}); $(navv).fx.start(1); } this.out=function(){ this.concern = document.getElementById(id); this.nav = this.concern.getElementsByTagName("div"); navv = this.nav[0]; if($(navv).fx){ $(navv).fx.stop(); } $(navv).fx = $(navv).effect('opacity', {duration: 500}); $(navv).fx.start(0); } // this.outNext=function(){ this.concern = document.getElementById(id); this.nav = this.concern.getElementsByTagName("div"); this.nav[3].style.width = "0"; this.nav[4].style.width = "205px"; this.nav[5].style.width = "0"; } this.inNext=function(){ this.concern = document.getElementById(id); this.nav = this.concern.getElementsByTagName("div"); this.nav[3].style.width = "205px"; this.nav[4].style.width = "0"; this.nav[5].style.width = "0"; } this.outPrevious=function(){ this.concern = document.getElementById(id); this.nav = this.concern.getElementsByTagName("div"); this.nav[1].style.width = "0"; this.nav[2].style.width = "255px"; this.nav[5].style.width = "0"; } this.outPreviousAlt=function(){ this.concern = document.getElementById(id); this.nav = this.concern.getElementsByTagName("div"); this.nav[1].style.width = "0"; this.nav[3].style.width = "0"; this.nav[5].style.width = "460px"; } this.inPrevious=function(){ this.concern = document.getElementById(id); this.nav = this.concern.getElementsByTagName("div"); this.nav[1].style.width = "255px"; this.nav[2].style.width = "0"; this.nav[5].style.width = "0"; } // this.Switch=function(nextImage,previousImage,id,total){ this.concern = document.getElementById(id); this.imgs = this.concern.getElementsByTagName("img"); this.imgs[nextImage].style.display ="block"; hh = this.imgs[nextImage].offsetHeight; ohh = this.imgs[previousImage].offsetHeight; vDiv = this.imgs[nextImage]; tDiv = this.imgs[previousImage]; var grow = new Fx.Style($(id),'height', {duration: 300}); this.nav = this.concern.getElementsByTagName("div"); this.nav = this.nav[0]; var navPos = new Fx.Style($(this.nav),'top', {duration: 300}); if($(tDiv).fx){ $(tDiv).fx.stop(); } $(tDiv).fx = $(tDiv).effect('opacity', {duration: 300}); if($(vDiv).fx){ $(vDiv).fx.stop(); } $(vDiv).fx = $(vDiv).effect('opacity', {duration: 300}); if(hh > ohh){ $(tDiv).fx.start(0).chain(function(){grow.start(hh).chain(function(){$(vDiv).fx.start(1)});navPos.start((hh/2)-25);}); }else{ $(tDiv).fx.start(0).chain(function(){grow.start(hh).chain(function(){$(vDiv).fx.start(1)});navPos.start((hh/2)-25);}); } // if(nextImage<(total-1)){ this.inNext(); }else{ this.outNext(); } if(nextImage<=0){ this.outPreviousAlt(); }else{ this.inPrevious(); } this.nav = this.concern.getElementsByTagName("div"); } // this.concern = document.getElementById(id); this.concern.addEventListener?this.concern.addEventListener("mouseover",function(){overSlideshow(nbr)},false):this.concern.attachEvent("onmouseover",function(){overSlideshow(nbr)}); this.concern.addEventListener?this.concern.addEventListener("mouseout",function(){outSlideshow(nbr)},false):this.concern.attachEvent("onmouseout",function(){outSlideshow(nbr)}); } function previous(nbr){ mySlideshows[nbr].previous(); } function next(nbr){ mySlideshows[nbr].next(); } function overSlideshow(nbr){ mySlideshows[nbr].over(); } function outSlideshow(nbr){ mySlideshows[nbr].out(); } /* YELLOW */ var logo; function yellow(){ growDiv = document.getElementById("yellow"); growDiv.style.display = "block"; if($(growDiv).fx){ $(growDiv).fx.stop(); } $(growDiv).fx = $(growDiv).effect('height', {duration: 2000, transition: Fx.Transitions.Elastic.easeOut}); $(growDiv).fx.start(200); // marginInfos = document.getElementById("infos"); if($(marginInfos).fx){ $(marginInfos).fx.stop(); } $(marginInfos).fx = $(marginInfos).effect('margin-top', {duration: 800}); $(marginInfos).fx.start(0); // if($(logo).fx){ $(logo).fx.stop(); } $(logo).fx = $(logo).effect('top', {duration: 200}); $(logo).fx.start(55); // logo.removeEventListener?logo.removeEventListener("click",yellow,false):logo.detachEvent("onclick",yellow); logo.addEventListener?logo.addEventListener("click",closeYellow,false):logo.attachEvent("onclick",closeYellow); setTimeout("openYellow()", 1400); } function openYellow(){ Content = ""; document.getElementById("yellow").innerHTML = Content; } function closeYellow(){ growDiv = document.getElementById("yellow"); if($(growDiv).fx){ $(growDiv).fx.stop(); } $(growDiv).fx = $(growDiv).effect('height', {duration: 1000}); $(growDiv).fx.start(0) // marginInfos = document.getElementById("infos"); if($(marginInfos).fx){ $(marginInfos).fx.stop(); } $(marginInfos).fx = $(marginInfos).effect('margin-top', {duration: 1000, transition: Fx.Transitions.Quad.easeInOut}); $(marginInfos).fx.start(105); // if($(logo).fx){ $(logo).fx.stop(); } $(logo).fx = $(logo).effect('top', {duration: 1000, transtition: Fx.Transitions.Quad.easeInOut}); $(logo).fx.start(45); // logo.removeEventListener?logo.removeEventListener("click",closeYellow,false):logo.detachEvent("onclick",closeYellow); logo.addEventListener?logo.addEventListener("click",yellow,false):logo.attachEvent("onclick",yellow); setTimeout("checkheight()", 30); } function checkheight(){ hhh = growDiv.offsetHeight; if (hhh<5){ document.getElementById("yellow").innerHTML = "-"; growDiv.style.display = "none"; }else { setTimeout("checkheight()", 30); } }