/**
 * @author pdz
 */
function accueilshapedown(){
	
	$('accueilshapedown').setOpacity(0.2);

}
function changelang(lang){


	
	
	var url = 'ajax/lang.php';
	var pars = 'lang='+lang
	new Ajax.Request(url, {
        parameters: pars,		
		method: 'post',
		encoding: 'UTF-8'
	});
	document.location="/index.php";
}
function test(){

//	document.location="/index.php";
}

function accueilSelect(element){
	$(element).setStyle({
							backgroundImage:"url(/images/accueil_fond_section.png)"
				  		});
	
}
function accueilUnSelect(element){
	$(element).setStyle({
				  			backgroundImage:""
  					});
	
}
function shape(image){
	
	  //winW = $('body').getWidth();
	  //winH =$('body').getHeight();
	  winH=document.documentElement.clientHeight;
	  winW=document.documentElement.clientWidth;
	  Offset= document.documentElement.scrollTop;
	  //alert("Width:"+winW + " Height:" +winH+" Offset"+Offset+ " WindowW:"+windowW+" WindowH:"+windowH);
	  
	$('shapeBck').setStyle({
		height:(Offset+winH)+'px',
		width:winW+'px',
		backgroundColor:'black',
		opacity:0.5,
		display:'block'
		
	})	
	milieu=480/2;
	if(winH<milieu){
		
		ttop=(0+(Offset/2));
	}
	else{
		
		ttop=(winH-480);
		ttop=ttop/2;
//		alert(top)
		ttop=ttop+Offset
		
	}
	if(winW<(640/2)){
		lleft='0px';
	}
	else{
		lleft=(winW-640)/2;
	}
//	alert('beforeshapeimage')		
	$('shapeImg').setStyle({
		top:ttop+'px',
		left:lleft+'px',		
		opacity:1,
		backgroundColor:'white',
		position:'absolute',
		padding: '5px',
		margin:'auto',
		display:'block'
		})
//	alert('Aftershapeimage')		
	$('photo').setStyle({
		display:'block'
	})
//	alert(image)
	$('photo').src='/'+image;
}
function hideShape(){
	$('shapeImg').setStyle({
		display:'none'
	})
	$('shapeBck').setStyle({
		display:'none'
	})
	$('photo').src='';
}
function shapeimageon(idObjet){
	$(idObjet).setStyle({
		backgroundColor:'#B3CC00'
	})
}
function shapeimageoff(idObjet){
	$(idObjet).setStyle({
		backgroundColor:''
	})
}
function shapeflagon(idObjet){
	$(idObjet).setStyle({
		backgroundColor:'#B3CC00'
	})
}
function shapeflagoff(idObjet){
	$(idObjet).setStyle({
		backgroundColor:''
	})
}