window.addEvent('domready', function(){
	// The same as before: adding events
	var subHome= new Fx.Slide('subMenuHome');
	var subAcc = new Fx.Slide('subMenuAcc');
	var subFac= new Fx.Slide('subMenuFac');
	var subPri =new Fx.Slide('subMenuPri');
	var subRes =new Fx.Slide('subMenuRes');
	subHome.hide();
	subAcc.hide();
	subFac.hide();
	subPri.hide();
	subRes.hide();
	$('myOtherElement').addEvents({
		'mouseenter': function(){
			// Always sets the duration of the tween to 1000 ms and a bouncing transition
			// And then tweens the height of the element
			this.set('tween', {
				duration: 1000,
				transition: Fx.Transitions.Bounce.easeOut // This could have been also 'bounce:out'
			}).tween('height', '360px');
		},
		'mouseleave': function(){
			// Resets the tween and changes the element back to its original size
			this.set('tween', {}).tween('height', '20px');
		}
	});
	$('menuHome').addEvent('click', function(a){
			a =  new Event(a)
			subHome.toggle();	
			a.stop();
			subAcc.hide();
			subFac.hide();
			subPri.hide();
			subRes.hide();
	});
	$('menuAcc').addEvent('click', function(a){
			a =  new Event(a)
			subAcc.toggle();	
			a.stop();
			subHome.hide();
			subFac.hide();
			subPri.hide();
			subRes.hide();
	});
	$('menuFac').addEvent('click', function(a){
			a =  new Event(a)
			subFac.toggle();	
			a.stop();
			subHome.hide();
			subAcc.hide();
			subPri.hide();
			subRes.hide();
	});
	$('menuPri').addEvent('click', function(a){
			a =  new Event(a)
			subPri.toggle();	
			a.stop();
			subHome.hide();
			subAcc.hide();
			subFac.hide();
			subRes.hide();
	});
	$('menuRes').addEvent('click', function(a){
			a =  new Event(a)
			subRes.toggle();	
			a.stop();
			subHome.hide();
			subAcc.hide();
			subFac.hide();
			subPri.hide();
	});
});
function openWin(url, h, w)
{
	var winprop = "width=" + w + ",height=" + h;
	openwin = window.open(url,'',winprop);
}
