/* Simple Lightbox script (c) Simple IT Solutions 2007 - 2008 */

function lightbox(div, lightW) {
var state = $('filter');
var screenW = screen.width;
if (lightW == null){lightW = 400}
var LightboxW = lightW;
if (state.style.display == 'block')
   {
   new Effect.Fade(state, { duration: 2.0 });
   new Effect.Fade(div, { duration: 2.0 });
   }
else
   {
   state.style.display = 'block';
   $(div).style.width= LightboxW + 'px';
   $(div).style.left= '' + ((screenW / 2) - (LightboxW /2)) + 'px';
   $(div).style.display= 'block';
   }
}

function showHide(show,hide) {
element = $(hide);
Effect.SlideUp(element, { duration: 0.5 });
setTimeout ( "showOnTimer('" +  show +  "')", 500 );
}

function showOnTimer(show) {
var element = $(show);
Effect.SlideDown(element, { duration: 0.5 });
}

function EndLightbox(div) {
setTimeout("lightbox('" + div + "')", 5000);
}