var isFullScreen = false;
function changeBackground(item){
    try{
      	$('div-frame').className = '';
      	$('div-frame').getElementsByTagName('iframe')[0].className = '';
      	if(item == 'concerts'){
      		$('div-frame').className = 'frame-concerts';
      		$('div-frame').getElementsByTagName('iframe')[0].className = 'reduce-frame';
      	} else if(item == 'concerts-passes'){
      		$('div-frame').className = 'frame_old_prog';
      		$('div-frame').getElementsByTagName('iframe')[0].className = 'reduce-frame2';
      	}else if(item == 'coverflow'){
      		$('div-frame').className = 'frame-cover';
      		$('div-frame').getElementsByTagName('iframe')[0].className = 'reduce-cover';
      	}
      	openFrame();
    }catch(e){
        isFullScreen = true;
    }
}

function closeFrame(){
	if($('spiral').hasClass('hidden'))
		$('spiral').removeClass('hidden');
	$('div-frame').className = '';
	$('div-frame').getElementsByTagName('iframe')[0].src='/blank';
}

function openFrame(){
	$('div-frame').className += ' frame-over';
	if(!$('spiral').hasClass('hidden'))
		$('spiral').addClass('hidden');
}

function getReflex(){
	var obj = $("last-boot").getElementsByTagName('img');
	if(obj.length){
		obj[0].addClass('reflect');
		obj[0].reflect({height:.2, opacity:.6});
	}
}

function hideCont(){
	if(!$('contact2').hasClass('hidden'))
		$('contact2').addClass('hidden');
}

function showCont(){
	if($('contact2').hasClass('hidden'))
		$('contact2').removeClass('hidden');
}

function generateMail(nom, domain){
	var mail = nom + '@' + domain;
	var chaine_mail = "mailto:?subject=Dj Moule&to="+mail;
	document.location.href = chaine_mail;
}

function getLB(item){
	$$('.' + item + ' img').each(function(item){
		var i= item.getParent();
		if(i && i.tagName.toLowerCase() == 'a'){
			Element.addClass(i, 'smoothbox');
		}

	})
}


function showList(n){
	if(n==1){
		if($('icon1').hasClass('icon1-off')){
			$('icon1').removeClass('icon1-off')
		}
		if($('icon2').hasClass('icon2-on')){
			$('icon2').removeClass('icon2-on')
		}
		$('icon1').addClass("icon1-on");
		$('icon2').addClass("icon2-off");
		$('__cvfl-coverflow').style.display='none';
		$$('.boot').each(function(item){
			item.style.display='';
		})

	}else{
		if($('icon2').hasClass('icon2-off')){
			$('icon2').removeClass('icon2-off')
		}
		if($('icon1').hasClass('icon1-on')){
			$('icon1').removeClass('icon1-on')
		}
		$('icon2').addClass("icon2-on");
		$('icon1').addClass("icon1-off");
		$$('.boot').each(function(item){
			item.style.display='none';
		})
		$('__cvfl-coverflow').style.display='';
	}
}

