
var aFx = new Array();

function bildleiste_over(id) {
	// darf nicht 0.0 sein!
	$('bild_' + id + '_schatten').setOpacity(0.01);
	//$('bild_' + id + '_popup').setOpacity(0.8);
	
	if (aFx[id]) {
		aFx[id].stop();
	}
	aFx[id] = $('bild_' + id + '_popup').effects({
		duration: 400,
		transition: Fx.Transitions.linear
	});
	aFx[id].start({
		opacity: 0.8
	});
}

function bildleiste_out(id) {
	$('bild_' + id + '_schatten').setOpacity(0.3);
	//$('bild_' + id + '_popup').setOpacity(0.0);

	if (aFx[id]) {
		aFx[id].stop();
	}
	aFx[id] = $('bild_' + id + '_popup').effects({
		duration: 400,
		transition: Fx.Transitions.linear
	});
	aFx[id].start({
		opacity: 0.0
	});

}



function _gw_AC_Generateobj(objAttrs, params, embedAttrs)
{
    var str = '';
    if (isIE && isWin && !isOpera)
    {
  		str += '<object ';
  		for (var i in objAttrs)
  			str += i + '="' + objAttrs[i] + '" ';
  		for (var i in params)
  			str += '><param name="' + i + '" value="' + params[i] + '" /> ';
  		str += '></object>';
    } else {
  		str += '<embed ';
  		for (var i in embedAttrs)
  			str += i + '="' + embedAttrs[i] + '" ';
  		str += '> </embed>';
    }

    return str;
}

function _gw_getFlashCode(){
  var ret =
    AC_GetArgs
    (  arguments, "", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
     , "application/x-shockwave-flash"
    );
  return _gw_AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}


function gw_showFlash(nodeId, flashFile, width, height) {
	var code = _gw_getFlashCode(
		"movie", flashFile,
		"width", width,
		"height", height,
		"quality", "high",
		"wmode", "transparent",
		"menu", "false",		
		"type", "application/x-shockwave-flash",
		"codebase", "http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab",
		"pluginspage", "http://www.adobe.com/go/getflashplayer"
	);
	$(nodeId).innerHTML = code;
}




	
window.addEvent('domready', function(){

	for (var id = 1; id <= 5; id++) {
		//$('bild_' + id + '_schatten').setOpacity(0.3);
		$('bild_' + id + '_popup').setOpacity(0.0);
		$('bild_' + id + '_popup').setStyle('display', 'block');
		
		aFx[id] = $('bild_' + id + '_schatten').effects({
			duration: 2000,
			transition: Fx.Transitions.linear
		});
		aFx[id].start({
			opacity: [0.8, 0.3]
		});
		
	}

	$('bild_1_schatten').addEvents({
		mouseenter: function(){bildleiste_over(1);},
		mouseleave: function(){bildleiste_out(1);}
	});
	$('bild_2_schatten').addEvents({
		mouseenter: function(){bildleiste_over(2);},
		mouseleave: function(){bildleiste_out(2);}
	});
	$('bild_3_schatten').addEvents({
		mouseenter: function(){bildleiste_over(3);},
		mouseleave: function(){bildleiste_out(3);}
	});
	$('bild_4_schatten').addEvents({
		mouseenter: function(){bildleiste_over(4);},
		mouseleave: function(){bildleiste_out(4);}
	});
	$('bild_5_schatten').addEvents({
		mouseenter: function(){bildleiste_over(5);},
		mouseleave: function(){bildleiste_out(5);}
	});
	

});


