/*function resumePresse(url) {
	$('.dialog').dialog('open');
	$(".dialog").load(url);
	$('.dialog').dialog({
		modal:true,
		width:630
	});	
}*/

function checkId(){
	var url= window.location.href ;
	var idTemp =  url.slice(-7);
	var id =  idTemp.substr(0,2);
	
	$(" #actualite"+id).css("border", "solid 2px #f3f3f3");
	$(" #actualite"+id).css("background-image", "url(ui_public/img/fond-transparent.png)"); 
	$(" #actualite"+id).css("padding",  "10px");
	
	
	url= window.location.href ;
	idTemp =  url.slice(-8);
	id =  idTemp.substr(0,3);
	
	$(".presse").css("background-color",  "transparent");
	//BORDURE
	$(".presse td").css("border", "none");
	$("#presse"+id+" .Dategris").css("border-left", "solid 2px #f3f3f3");
	$("#presse"+id+" .derCol").css("border-right", "solid 2px #f3f3f3");
	$("#presse"+id+" td").css("border-top", "solid 2px #f3f3f3");			
	$("#presse"+id).css("background-image", "url(ui_public/img/fond-transparent.png)"); 
	$("#press"+id).css("background-image", "url(ui_public/img/fond-transparent.png)"); 
	$(".press").hide();
	$("#press"+id).show();
	$("#press"+id+" td").attr('colSpan',5);
}




function montreActu(id){

	var css = $("#actu"+id).css("display");
	if(css=="block"){
		
		$("#actu"+id).slideUp('slow');
		
		$("#un_poste"+id).css("border", "none");
		$("#un_poste"+id).css("background-image",  "none");
		$("#actualite"+id).css("border", "none");
		$("#actualite"+id).css("background-image",  "none");
		$("#actualite"+id ).css("padding",  "0");
		$("#actualite"+id).css("margin-left",  "0px");
	

	}else{

		$(".un_poste").css("border", "none");
		$(".un_poste").css("background-image",  "none");
		$("#un_poste"+id).css("border", "solid 2px #f3f3f3");
		$("#un_poste"+id).css("background-image", "url(ui_public/img/fond-transparent.png)"); 
		$("#un_poste"+id).css("margin-top",  "10px");
	
		$(".actualite").css("border", "none");
		$(".actualite").css("background-image",  "none");
		$(".actualite").css("padding",  "0");
		$(".actualite").css("margin-left",  "0px");

		$(" #actualite"+id).css("border", "solid 2px #f3f3f3");
		$(" #actualite"+id).css("background-image", "url(ui_public/img/fond-transparent.png)"); 
		$(" #actualite"+id).css("padding",  "10px");
		$(" #actualite"+id).css("margin-left",  "-10px");

		$(".actu").slideUp('slow');
		$("#actu"+id).slideDown('slow');

	}
	
}

function montreTexte(id){
	var css = $("#press"+id).css("display");
	
	if(css=="table-row"){

		$(".press").hide();
		
		$("#presse"+id+" td").css("border", "none");
		$("#presse"+id).css("background-color",  "transparent");
		
		$(".presse").css("border", "none");
		$(".presse").css("background-color",  "transparent");
		
	}else{
	
		$(".presse").css("background-color",  "transparent");
		//BORDURE
		$(".presse td").css("border", "none");
		$("#presse"+id+" .Dategris").css("border-left", "solid 2px #f3f3f3");
		$("#presse"+id+" .derCol").css("border-right", "solid 2px #f3f3f3");
		$("#presse"+id+" td").css("border-top", "solid 2px #f3f3f3");
			
		$("#presse"+id).css("background-image", "url(ui_public/img/fond-transparent.png)"); 
		$("#press"+id).css("background-image", "url(ui_public/img/fond-transparent.png)"); 

		$(".press").hide();
		$("#press"+id).show();
		$("#press"+id+" td").attr('colSpan',5);
		}
	}

function montreTexteAdmin(id){
	var css = $("#press"+id).css("display");
	
	if(css=="table-row"){

		$(".press").hide();
		
		$("#presse"+id+" td").css("border", "none");
		
		$(".presse").css("border", "none");

		
	}else{
	
		//BORDURE
		$(".presse td").css("border", "none");
		$("#press"+id+" td").css("border", "solid 2px #f3f3f3");
		$(".press .texte_doc").css("padding", "5px 210px 5px 303px");

		$(".press").hide();
		$("#press"+id).show();
		$("#press"+id+" td").attr('colSpan',8);
		
		}
	}


function modifFichierAdmin(){
	document.getElementById('modifFichier').style.display="block";	
	document.getElementById('supprFichier').style.display="none";	
}
function modifImageAdmin(){
	document.getElementById('modifImage').style.display="block";
	document.getElementById('supprImage').style.display="none";		
}
function supprImageAdmin(){
	document.getElementById('supprImage').style.display="block";	
	document.getElementById('modifImage').style.display="none";
}
function supprFichierAdmin(){
	document.getElementById('supprFichier').style.display="block";	
	document.getElementById('modifFichier').style.display="none";	
}

function typeLienRP(){
	document.getElementById('docRP').style.display="block";	
	document.getElementById('docAutre').style.display="none";
	document.getElementById('default').style.display="none";	
	document.getElementById('modifDoc').style.display="none";
}
function typeLienAutre(){
	document.getElementById('docAutre').style.display="block";	
	document.getElementById('docRP').style.display="none";	
	document.getElementById('default').style.display="none";
}
function typeLienNone() {
	document.getElementById('docAutre').style.display="none";	
	document.getElementById('docRP').style.display="none";	
	document.getElementById('modifDoc').style.display="none";
	document.getElementById('default').style.display="block";
}
function modifDocAdmin(){
	document.getElementById('modifDoc').style.display="block";	
	document.getElementById('docAutre').style.display="none";	
}
function origineDocAdmin(){
	document.getElementById('modifDoc').style.display="none";	
	document.getElementById('docAutre').style.display="block";	
}

function changeValueOui(){
	document.getElementById('supprDoc').value="oui";
}
function changeValueNon(){
	document.getElementById('supprDoc').value="non";
}

function changeValueOui2(){
	document.getElementById('supprImage').value="oui";
}
function changeValueNon2(){
	document.getElementById('supprImage').value="non";
}


function marquee(idWrapper,idMarquee,vitesse)
/*
* idWrapper : l'identifiant du div autour du span contenant le texte à faire défiler
*	idMarquee : l'identifiant du span autour du texte
*	vitesse : nombre de millisecondes entre chaque déplacement de 1px
*/
{
var oIdWrapper=$('#'+idWrapper);
var oIdMarquee=$('#'+idMarquee);

var width=oIdMarquee.width();
var width2=oIdWrapper.width();

id_inst=setTimeout(function() {marquee(idWrapper,idMarquee,vitesse)},vitesse);

var l=parseInt(oIdMarquee.css('left'));
oIdMarquee.css({left:(l-1)+'px'});

if((-parseInt(oIdMarquee.css('left')))>=(width))
{
oIdMarquee.css({left:(width2)+'px'});
}
}




