/* ---------- Fader ----------- */


var fi;
var act;

var aList;

function initIntersect() {

   act =  fScript.getChildrenByTagName('*', document.getElementById('intersect_control')).length-1;

	fi = new fIntersect('intersect_container');
	fi.setSimpleSpeed(5, 5);

	var io = {
		interset : fi
	};
   aList = fScript.getChildrenByTagName('*', document.getElementById('intersect_control'));

   var interval = window.setInterval("loop()", 4000);
               
	for (var x = 0; x < aList.length; x++) {

		io.o = aList[x];
		fScript.registerEvent('click', function(e, p, n, i) {
               if (interval) { 
                  clearInterval(interval);
                  aList[act].className = '';
                  interval = null;
               }
					i.o.className = '';
					i.interset.show(p);
					i.o = n;
					i.o.className = 'active';
				}, aList[x], x, aList[x], io);
	}

}

function loop() {

	aList[act].className = '';   
   act--;
   if (act == -1) {
      act = aList.length-1;
   }      
	fi.show(act);
   aList[act].className = 'active';

}

/* ---------- Slider ----------- */

var slider = null;

function sliderInit(){
    slider = new fSlide('slide_content', 210, 0, 2, 0);
    slider.slideStep = 7;
    slider.loopStep = 10;
};

/* ---------- Grow Form -------- */

function growForm(ref) {
   var container = document.getElementById('request_form');
   var form = container.getElementsByTagName('form')[0];
   var mask = container.getElementsByTagName('div')[0];
   mask.style.height = (form.clientHeight + 30) + 'px';
   ref.parentNode.removeChild(ref);
   return false;
}

