var globalVars = {
	promoMorph: null,
	bottomMenuSlide: null,
	promoIsSmall: true,
	productSelected: 'Flights',
	accoSelected:null
}
function init(){
	//initAcco(); 
	globalVars.promoMorph = new Fx.Morph('promo_left', {
		duration: 'long', 
		transition: Fx.Transitions.Quint.easeInOut
	});
	//$('left_wide_menu').fade('hide');
	initPromoSlideshow();
	try{
		$('left_wide_menu').style.display = 'none';
	}catch(e){}
	//selPromo('Flights'); 
}
function initPromoSlideshow(){ 
	var data = {
	  '1.png': {href: 'index.html', target:'_blank'},
	  '2.png': {href: '22.html', target:'_blank'},
	  '3.png': {href: '33.html', target:'_blank'},
	  '4.png': {href: '44.html', target:'_blank'}
	};
//	var myShow1 = new Slideshow('bannershow', 
//		null, { 
//		height: 250, hu: 'images/Promos/', 
//		transition: 'back:in:out', 
//		width: 296 
//	});
	if($('slideshow-images') != 'undefined' && $('slideshow-images') != null) {
		var myShow1 = new SlideShow('slideshow-images',{
			delay: 4000,
			autoplay: true
		});
	}
	if($('slideshow-images-right') != 'undefined' && $('slideshow-images-right') != null) {
		var myShow1 = new SlideShow('slideshow-images-right',{
			delay: 4000,
			autoplay: true
		});
	}
	/*var myShow2 = new Slideshow('bannershow',null,{ 
		width: 296,
		height: 250, 
		hu: 'images/Promos/', 
		transition: 'back:in:out'
	});*/
}
function resizePromo(){
	if(globalVars.promoIsSmall){
		globalVars.promoMorph.start({
			'width': [296, 906],  
			'left': [0, -303]  
		});
		new Fx.Morph('bottom_main_menu_pos', {
			duration: 500, 
			transition: Fx.Transitions.Quint.easeInOut,
			onComplete:function(){
				//$('left_wide_menu').fade(1);
				$('left_wide_menu').style.display = 'block';
				$('PromoFlights').style.overflow = 'auto';
				$('PromoHotels').style.overflow = 'auto';
				$('PromoCars').style.overflow = 'auto';
				$('PromoVakanties').style.overflow = 'auto';
				$('PromoGroups').style.overflow = 'auto';
				$('moreResults').innerHTML = 'terug';
				$('moreResultsArrow').src = 'images/arrow_left.png';
				$('aaaa').tween('width',270,879);
			}
		}).start({'height': [0, 56]});	
		
	}else{
		globalVars.promoMorph.start({
			'width': [906, 296],  
			'left': [-303, 0]  
		});	
		$('left_wide_menu').style.display = 'none';
		new Fx.Morph('bottom_main_menu_pos', {
			duration: 500, 
			transition: Fx.Transitions.Quint.easeInOut
		}).start({'height': [56, 0]});	
		$('PromoFlights').style.overflow = 'hidden';
		$('PromoHotels').style.overflow = 'hidden';
		$('PromoCars').style.overflow = 'hidden';
		$('PromoVakanties').style.overflow = 'hidden';
		$('PromoGroups').style.overflow = 'hidden';
		$('moreResults').innerHTML = 'meer info';
		$('moreResultsArrow').src = 'images/arrow_right.png';
		/*new Fx.Morph('left_wide_menu', {
			duration: 500, 
			transition: Fx.Transitions.Quint.easeInOut,
			onComplete:function(){
				new Fx.Morph('bottom_main_menu_pos', {
					duration: 500, 
					transition: Fx.Transitions.Quint.easeInOut
				}).start({'height': [56, 0]});	
				$('PromoFlights').style.overflow = 'hidden';
				$('PromoHotels').style.overflow = 'hidden';
				$('PromoCars').style.overflow = 'hidden';
				$('PromoVakanties').style.overflow = 'hidden';
				$('PromoGroups').style.overflow = 'hidden';
				$('moreResults').innerHTML = 'meer info';
				$('moreResultsArrow').src = 'images/arrow_right.png';
			}
		}).start({'opacity': [1, 0]});	*/
		$('aaaa').tween('width',879,270);
	}
	globalVars.promoIsSmall = !globalVars.promoIsSmall;
}
function initAcco() {
	$('acco_header_1').className = 'acco_active';
	globalVars.accoSelected = 1;
};
function selAcco(i){
	if(i == globalVars.accoSelected) return;
	$('acco_header_'+globalVars.accoSelected).className = 'acco_pos';
	$('acco_panel_'+globalVars.accoSelected).tween('height',296,1);
	globalVars.accoSelected = i;
	$('acco_header_'+globalVars.accoSelected).className = 'acco_active';
	$('acco_panel_'+globalVars.accoSelected).tween('height',1,296);
	
}
function selPromo(product){
	//$('Promo'+globalVars.productSelected).fade(0);
	$('Promo'+globalVars.productSelected).style.display = 'none';
	$('b_'+globalVars.productSelected).style.background = 'url(images/b_'+globalVars.productSelected+'.png)';
	globalVars.productSelected = product;
	//$('Promo'+globalVars.productSelected).fade(1);
	$('Promo'+globalVars.productSelected).style.display = 'block';
	$('b_'+globalVars.productSelected).style.background = 'url(images/b_'+globalVars.productSelected+'_active.png)';	
}
function openInkijkfolder(){	
	var newWindow = window.open("http://www.uniglobe.be/vakantie/magazine/september2010","Inkijkfolder","scrollbars=no,height=596,width=900,left=50,top=50,resizable=yes");
}
