function flashBoxGenerate(swf){
	vh = document.viewport.getHeight();
	v = document.viewport.getScrollOffsets();
	vTop = v[1];
	flashWrap = new Element('div',{id:'flashWrap'});
	flashBox = new Element('div',{id:'flashBox'});
	flashWrap.setStyle({
		position:'absolute',
		left:0,
		right:0,
		top:(vTop+20)+'px'
	});
	fh = (vh*0.8);
	fw = fh/(0.6);

	flashBox.setStyle({
		margin:'0 auto',
		width:'100%'
	});

	flashStr = '<object id="swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+(fw-30)+'px" height="'+(fh-90)+'px" style="display:block;margin:0 auto;border-left:1px solid #333;border-right:1px solid #333;border-bottom:1px solid #333;overflow:hidden;"><param name="movie" value="flash/'+swf+'"><!--[if !IE]>--><object type="application/x-shockwave-flash" data="flash/'+swf+'" width="'+(fw-30)+'px" height="'+(fh-90)+'px" ><!--<![endif]--><div style="background-color:white;width:'+(fw-30)+'px;height:200px;padding-top:50px;margin:0 auto;text-align:center;overflow:hidden;">Adobe Flash Player is required to view this animation.<br><br><br><a href="http://get.adobe.com/flashplayer/" title="Get Flash">Click here to download</a><!--[if !IE]>--></object><!--<![endif]--></object>';
	topBar = new Element('div', { style:'height:20px;margin:0 auto;width:'+(fw-30)+'px;background:url(images/topBar.jpg) repeat-x;border:1px solid #333;' });
	closeIcon = new Element('img', { id:'closeIcon', src:'images/closeIcon.jpg', style:'cursor:pointer', alt:''});
	topBar.appendChild(closeIcon);
	Event.observe(closeIcon, 'click', function(){
		flashWrap.remove();
	});
	flashBox.appendChild(topBar);
	flashBox.insert(flashStr);
	flashWrap.appendChild(flashBox);
	document.body.appendChild(flashWrap);

}

Event.observe('trigger1', 'mouseover', function(){
	$('trigger1').src = 'images/special367rollOn.jpg';
});
Event.observe('trigger1', 'click', function(){
	flashBoxGenerate('spacingMovie.swf');
});
Event.observe('trigger1', 'mouseout', function(){
	$('trigger1').src = 'images/special367rollOff.jpg';
});

Event.observe('trigger2', 'mouseover', function(){
	$('trigger2').src = 'images/special028rollOn.jpg';
});
Event.observe('trigger2', 'click', function(){
	flashBoxGenerate('waterRecycling.swf');
});
Event.observe('trigger2', 'mouseout', function(){
	$('trigger2').src = 'images/special028rollOff.jpg';
});


