
		    ;
	curimageindex=1;
        // curimageindex=Math.floor(Math.random()*fimages.length);
        setInterval ( "fademe()", 8000 );

        function fademe() {
            // new Effect.Opacity('slideshow', { from: 1.0, to: 0.85, duration: 0.5, queue: 'front', afterFinish: function() { imgsw(); } });
            // new Effect.Opacity('slideshow', { from: 0.85, to: 1.0, duration: 0.5, queue: 'end' });
            fadeout();
        }
        var ftimer =100;
	var fin = 85;
	
	function fadeout() {
	    if(ftimer > 85) {
		ftimer = ftimer -5;
		set_class('slideshow', "opacity_" + ftimer);
		setTimeout("fadeout()", 50);
	    }
	    else {
		ftimer = 100;
		imgsw();
		set_class('slideshow', "opacity_100");
		clearTimeout("fadeout()");
		setTimeout("fadein()", 5);
	    }
	}
	
	function fadein() {
	    if(fin < 100) {
		fin = fin +5;
		set_class('slideshow', "opacity_" + fin);
		setTimeout("fadein()", 50);
	    } else {
		fin = 85;
		clearTimeout("fadein()");
	    }
	
	}
	
        function imgsw() {
            // randurl = Math.floor(Math.random()*fimages.length);
            curimageindex=(curimageindex<fimages.length-1)? curimageindex+1 : 1;
            var slideshowObj = document.getElementById("slideshow");
            slideshowObj.style.background = "url(" +fimages[curimageindex].image +")";
            var slideshowUrlObj = document.getElementById("slideshowurl");
	    slideshowUrlObj.href = fimages[curimageindex].link;
    	    // clearTimeout("imgsw()");
        }

	function set_class(obj, myClass) {
		var myObj = document.getElementById(obj); 
		myObj.setAttribute("class", myClass); 
		myObj.setAttribute( 'className', myClass);
	}
	function return_null() {
	    return null;
	}

