// JavaScript Document for Ray Engineers, P.S.C.

// Written by Julius Klatte for Emagine Web Design
// Edited by Juan A. Lopez for Ray Engineers, P.S.C.
// url: go.to/emagine

var startopacity = 75; // Set this variable between 1 and 100 as the standard opacity

function fadeIt(obj,direct){ 
if(window.timer) { clearInterval(timer); } 
tobj=obj; drct=direct;
tobj.filters.gray.enabled=false;
timer=setInterval("flowfilter(tobj,drct);",5); 
}

function flowfilter(thing,dct){
if(dct==1) { if (thing.filters.alpha.opacity<100) { thing.filters.alpha.opacity+=5; } else { clearInterval(timer);} }
if(dct==2) { if (thing.filters.alpha.opacity>startopacity) { thing.filters.alpha.opacity-=5; } else { clearInterval(timer); thing.filters.gray.enabled=true;} }
}
