function openContent(element){		
	if(element.offsetHeight=="33"){
		dojo.animateProperty({
			node:element,
			duration: 300,
			properties: {
				height: {start: 33, end: 232},
				marginTop: {start: 0, end: -199, unit:"px"}
			}
		}).play();		
	}
}

function closeContent(element){
	if(element.offsetHeight=="232"){
		dojo.animateProperty({
			node:element,
			duration: 300,
			properties: {
				height: {start: 232, end: 33},
				marginTop: {start: -199, end: 0, unit:"px"}
			}
		}).play();	
	}
}

function openContent(element){		

	if(element.offsetHeight=="33"){
		dojo.animateProperty({
			node:element,
			duration: 300,
			properties: {
				height: {start: 33, end: 232},
				marginTop: {start: 0, end: -199, unit:"px"}
			}
		}).play();		
	}
}

function closeContent(element){
	if(element.offsetHeight=="232"){
		dojo.animateProperty({
			node:element,
			duration: 300,
			properties: {
				height: {start: 232, end: 33},
				marginTop: {start: -199, end: 0, unit:"px"}
			}
		}).play();	
	}
}

function openNews(element2, html, html2){		
	
	element = dojo.byId("content"+element2);
	dojo.byId("imageMore"+element2).innerHTML = html;
	newHeight = dojo.byId("hiddenContent"+element2).offsetHeight;
	
	if(dojo.byId("ouvert"+element2).value==0){
			
		dojo.animateProperty({
			node:element,
			duration: 300,
			properties: {
				height: {end: newHeight, unit:"px"}
			}
		}).play();
		
		dojo.byId("ouvert"+element2).value = 1;
	}else{
		closeNews(element2, html2);
	}
}

function closeNews(element2, html){
	
	element = dojo.byId("content"+element2);
	dojo.byId("imageMore"+element2).innerHTML = html;
	
	if(dojo.byId("ouvert"+element2).value==1){
		dojo.animateProperty({
			node:element,
			duration: 300,
			properties: {
				height: {end: 0, unit:"px"}
			}
		}).play();	
		dojo.byId("ouvert"+element2).value = 0;
	}
}

function openNewsFull(element2, html, html2){		
	element = dojo.byId("content"+element2);
	dojo.byId("imageMore"+element2).innerHTML = html;
	newHeight = dojo.byId("hContent"+element2).offsetHeight;
	if(dojo.byId("ouvert"+element2).value==0){			
		dojo.animateProperty({
			node:element,
			duration: 300,
			properties: {
				height: {end: newHeight, unit:"px"}
			}
		}).play();
		
		dojo.byId("ouvert"+element2).value = 1;
	}else{
		closeNews(element2, html2);
	}
}

function closeNewsFull(element2, html){
	
	element = dojo.byId("content"+element2);
	dojo.byId("imageMore"+element2).innerHTML = html;
	
	if(dojo.byId("ouvert"+element2).value==1){
		dojo.animateProperty({
			node:element,
			duration: 300,
			properties: {
				height: {end: 0, unit:"px"}
			}
		}).play();	
		dojo.byId("ouvert"+element2).value = 0;
	}
}

function toLeft(element2){		
	
	element = dojo.byId(element2);
	margin = element.style.marginLeft;
	newMargin = margin.replace("px"," ");
	theMargin = parseInt(newMargin-130);
	
	width = element.style.width;
	newWidth = margin.replace("px"," ");	
	theWidth = parseInt(newWidth*1)+130;
	
		dojo.animateProperty({
			node:element,
			duration: 1000,
			properties: {
				marginLeft: {end: theMargin, unit:"px"},
				width: {end: theWidth, unit:"px"}
			}
		}).play();		
}

function toRight(element2){		
	
	element = dojo.byId(element2);
	margin =element.style.marginLeft;
	newMargin = margin.replace("px"," ");
	theMargin = parseInt(newMargin*1)+130;
	
	width = element.style.width;
	newWidth = margin.replace("px"," ");
	theWidth = parseInt(newMargin-130);

		dojo.animateProperty({
			node:element,
			duration: 1000,
			properties: {
				marginLeft: {end: theMargin, unit:"px"},
				width: {end: theWidth, unit:"px"}
			}
		}).play();		
}

		
