function make_scrollable3(_root,_items,_item,_root_wrapper,_root_addclass,_items_addclass,_item_addclass,_root_visible_items,_indice,_vertical,_nav_btn)
{
	
	$(_root).each(function(){
		
		var root=$(this);
		var regexp_1=/[0-9]+/;
		var tabo_match=regexp_1.exec(root.attr('id'));
		var indice=tabo_match[0];

		var scrollable_wrapper=$("<div>").addClass(_root_wrapper).attr("id",_root_wrapper+"_"+indice);
		$(root).wrapAll(scrollable_wrapper);
		//wrap all item of root inside div.items
		root.addClass(_root_addclass);
		$(_items,root).addClass(_items_addclass);
		$(_item,root).each(function(){
				$(this).addClass(_item_addclass);
		});
	
		//cree prev and next page
		if(_nav_btn==1){
		var prevPage=$("<a class='prevPage browse left'></a>");
		var nextPage=$("<a class='nextPage browse right'></a>");
		
		$("#"+_root_wrapper+"_"+indice).prepend(prevPage);
		$("#"+_root_wrapper+"_"+indice).append(nextPage);
		}
		
		//var api=root.scrollable({items:_items,item:_item,size:_root_visible_items,vertical:_vertical}).autoscroll({autoplay:true,interval:5000,api:true});
		var api=root.scrollable({items:_items,item:_item,size:_root_visible_items,vertical:_vertical});
		$(".navigation_box",root).remove();	
		
		
	});
}



function make_scrollable2(_root,_root_addclass,_root_wrapper,_root_width,_root_visible_items,_items_wrapper,_item,_item_wrapper,_conf_items,_conf_item,_indice)
{
	//addClass scrollable to _root
	if(_root_addclass!="")
	{
	$(_root).addClass(_root_addclass).width(_root_width);
	}
	if(_root_wrapper!=""){
	var scrollable_wrapper=$("<div>").addClass(_root_wrapper).attr("id",_root_wrapper+_indice);
	$(_root).wrapAll(scrollable_wrapper);
	}
	
	//wrap all item of root inside div.items
	if(_items_wrapper!=""){
	$(_item,_root).wrapAll("<div class="+_items_wrapper+" ></div>");
	}
	
	
	if(_item_wrapper!=""){
		$(_item,_root).each(function(){
		$(this).wrap("<div class="+_item_wrapper+"></div>");
		});
	}
	
	var api=$(_root).scrollable({items:_conf_items,item:_conf_item,size:_root_visible_items}).circular({api:true});
	
return api;	
}

function make_scrollable(_root,_item,_visible_items,_width_scrollable_root,_width_item,_indice)
{
	
	/*
	var regexp_1=/[0-9]+/;
	var tabo_match=regexp_1.exec(_root);
	var indice=tabo_match[0];
	*/
	
	//var h1_titre=$("H1.structure_content_titre",_root).html();
	//h1_titre=$("<h3></h3>").html(h1_titre);
	//addClass scrollable to _root
	$(_root).addClass("scrollable_root").width(_width_scrollable_root);
	//wrapp root elt into div.scrollable_wrapper
	var scrollable_wrapper=$("<div>").addClass("scrollable_root_wrapper").attr("id","scrollable_root_wrapper_"+_indice);
	$(_root).wrapAll(scrollable_wrapper);
	
	
	//wrap all item of root inside div.items
	$(_item,_root).wrapAll("<div class='scrollable_root_items' ></div>");
	$(_item,_root).each(function(){
	$(this).width(_width_item);
	$(this).wrap("<div class='scrollable_root_items_item'></div>").width(_width_item);	
	});
	
	
	//$("#scrollable_wrapper_"+indice).prepend(h1_titre);
	//
	//cree prev and next page
	//var prevPage=$("<a class='prevPage browse left' ></a>");
	//var nextPage=$("<a class='nextPage browse right' ></a>");
	//$(".scrollable_wrapper").prepend(prevPage);
	//scrollable_wrapper append next
	//$(".scrollable_wrapper").append(nextPage);
	
	//$(_root).scrollable({items:'.items',item:'div.scrollable_item',size:5});
	$(_root).scrollable();
	
	$(".navigation_box",_root).remove();
	
}

function make_tabsable_bottom(_items,_tab,_indice,_h3)
{
//_items is jquery object	
	
var panes=_items;	
var pane ;	
var li;
var libelle;
var tabs;
var tabs_wrapper;
var structure_contents;
var a;			
			if(panes.size)
			{
				tabs=$("<ul class='tabs_bis'></ul>");
					panes.each(function(i){
					pane=$(this);
					var regexp_1=/[0-9]+/;
					var tabo_match=regexp_1.exec(pane.attr('id'));
					var indice=tabo_match[0];
					li=$("<li></li>").attr("id","tab_"+indice);		
					libelle=$(_tab,pane).html();
							/*if(i==0)
							{
								a=$("<a href='#' class='active' >"+libelle+"</a>");
							}
							else
							{
								a=$("<a href='#'>"+libelle+"</a>");
							}*/
							
					a=$("<a href='#'>"+libelle+"</a>");
					li.append(a);
					tabs.append(li);
					});
				
				tabs_wrapper=$("<div class='contents_header_tab_down'></div>").attr("id","contents_header_tab_down_"+_indice);
				tabs_wrapper.append(tabs);
				
				structure_contents=$("<div class='structure_contents'></div>").attr("id","structure_contents_"+_indice);
				panes.wrapAll(structure_contents);
				
				$("#structure_contents_"+_indice).append(tabs_wrapper);
				$("#structure_contents_"+_indice).prepend("<h3>"+_h3+"</h3>");
				//structure_contents.prepend(tabs_wrapper);
				tabs.tabs(panes,{tabs:'li',current:'active',effect:'fade'});
		}	
}



function make_tabsable_structure_overview(_structure_overview,_indice,_h3)
{
//_items is jquery object	
	
var overviews=_structure_overview;	
var pane ;	
var li;
var libelle;
var tabs;
var tabs_wrapper;
var structure_contents;
var a;			



overviews.each(function(){

	var overview=$(this);
	var structure_tops=$(".structure_content_top",overview)
	tabs=$("<ul class='tabs_bis'></ul>");
	structure_tops.each(function(i){
	pane=$(this);	
	li=$("<li></li>");	
	libelle=$("h3",pane).html();
	/*
	if(i==0)
	{
	a=$("<a href='#' class='active' >"+libelle+"</a>");
	}
	else
	{
	a=$("<a href='#'>"+libelle+"</a>");
	}
	*/
	a=$("<a href='#'>"+libelle+"</a>");
	li.append(a);
	tabs.append(li);
	});
	libelle=$("h3",overview).html();$("h3",overview).css("display","none");
	tabs_wrapper=$("<div class='contents_header_tab tabs_wrapper'><h3>"+libelle+"</h3></div>");
	tabs_wrapper.append(tabs);
	
	//structure_contents=$("<div class='structure_contents'></div>").attr("id","structure_contents_"+_indice);
	//overview.wrapAll(structure_contents);
	
	//$("#structure_contents_"+_indice).before(tabs_wrapper);
	//structure_contents.prepend(tabs_wrapper);
	overview.prepend(tabs_wrapper);
	tabs.tabs(structure_tops,{tabs:'li',current:'active',effect:'fade'});				
				
				
				
});		
			
			
}

function make_tabsable(_items,_tab,_indice,_h3)
{
//_items is jquery object	

//make_tabsable($("#structure_content_126").add("#structure_content_129"),"H1","123","Sociétés de Gestion des Participations (SGP)");

//make_tabsable($("#structure_content_67").add("#structure_content_74").add("#structure_content_68"),"H1","123","La Promotion Immobilière Bessa Ouled Fayat");
var panes=_items;	
var pane ;	
var li;
var libelle;
var tabs;
var tabs_wrapper;
var structure_contents;
var a;			
			if(panes.size)
			{
				tabs=$("<ul class='tabs_bis'></ul>");
					panes.each(function(i){
					pane=$(this);	
					
					
							
					//if(regexp_1.test($(_tab).attr('id')))
					//{//}
					var regexp_1=/[0-9]+/;
					var tabo_match=regexp_1.exec(pane.attr('id'));
					var indice=tabo_match[0];
					li=$("<li></li>").attr("class","tab_"+indice);	
					
					libelle=$(_tab,pane).html();
					
					a=$("<a href='#'>"+libelle+"</a>");
					li.append(a);
					tabs.append(li);
					});
				
				tabs_wrapper=$("<div class='contents_header_tab tabs_wrapper'></div>");
				tabs_wrapper.append(tabs);
				var h3=$("<h3>"+_h3+"</h3>");
				
				structure_contents=$("<div class='structure_contents'></div>").attr("id","structure_contents_"+_indice);
				panes.wrapAll(structure_contents);
				
				$("#structure_contents_"+_indice).before(h3);
				$("#structure_contents_"+_indice).before(tabs_wrapper);
				//structure_contents.prepend(tabs_wrapper);
				
				tabs.tabs(panes,{tabs:'li',current:'active',effect:'fade'});
		}	
}




function structure_contents_tabs()
{
	
	$(".structure_contents").each(function(i)
	{
	var catalogue_contents=$(this);
	
			if($(".structure_header_tab", $(this)).size)
			{
			var tabs=$("<ul class='tabs'></ul>");
			var str=$("<div class='structure_header_tab tabs_wrapper'></div>").append(tabs);
				$(".structure_header_tab",catalogue_contents).each(function(i)
				{
				
						var structure_header_tab=$(this);
						var contents_header_tab=$(this);
						var regexp_1=/[0-9]+/;
							
							if(regexp_1.test(structure_header_tab.attr('id')))
							{
							var tabo_match=regexp_1.exec(structure_header_tab.attr('id'));
							var indice=tabo_match[0];
							var link=$("ul li a",$(this));
							var libelle=link.html();
							
								/*
								if(link.attr('class')=='active') 
								{
									var li=$("<li></li>");	
									var a=$("<a href='#' class='active' >"+libelle+"</a>");
									li.append(a);
								}
								else
								{
									var li=$("<li></li>");	
									var a=$("<a href='#' >"+libelle+"</a>");
									li.append(a);	
								}
								*/
								
								var li=$("<li></li>").attr("class","tab_"+indice);		
								var a=$("<a href='#' >"+libelle+"</a>");
								li.append(a);	
							
							//$("ul.tabs",str).append(li);
							tabs.append(li);
							
							
							}
				});
			
			
			catalogue_contents.prepend(str);
			
			
			var catalogue_content_pane=$(".structure_content",$(this));
			
			tabs.tabs(catalogue_content_pane,{tabs:'li',current:'active',effect:'fade'});
			
			
			
			}	
	})
}


function catalogue_contents_tabs()
{
	$(".catalogue_contents").each(function(i)
	{
	var catalogue_contents=$(this);
			if($(".contents_header_tab", $(this)).size)
			{
			var tabs=$("<ul class='tabs'></ul>");
			var str=$("<div class='contents_header_tab tabs_wrapper'></div>").append(tabs);
				$(".contents_header_tab",catalogue_contents).each(function(i)
				{
				
				var contents_header_tab=$(this);
				var regexp_1=/[0-9]+/;
					
					if(regexp_1.test(contents_header_tab.attr('id')))
					{
					var tabo_match=regexp_1.exec(contents_header_tab.attr('id'));
					var indice=tabo_match[0];
					var link=$("ul li a",$(this));
					var libelle=link.html();
					
					/*
					if(link.attr('class')=='active') 
					{
						var li=$("<li></li>");	
						//var a=$("<a href='#' class='active' >"+libelle+"</a>");
						var a=$("<a class='active' >"+libelle+"</a>");
						li.append(a);
					}
					else
					{
						var li=$("<li></li>");	
						//var a=$("<a href='#' >"+libelle+"</a>");
						var a=$("<a >"+libelle+"</a>");
						li.append(a);	
					}
					*/
					
					var li=$("<li></li>").attr("class","tab_"+indice);		
					//var a=$("<a href='#' >"+libelle+"</a>");
					var a=$("<a href='#' >"+libelle+"</a>");
					li.append(a);	
					tabs.append(li);
					}
				});
			
			//var h3_titre=$("h3.catalogue_contents_titre", catalogue_contents);
			//if(h3_titre.size()) 	{h3_titre.after(str);}	else{catalogue_contents.prepend(str);}
			
			catalogue_contents.prepend(str);
			var catalogue_content_pane=$(".catalogue_content",$(this));
			tabs.tabs(catalogue_content_pane,{tabs:'li',current:'active',effect:'fade'});
			
			
			/*
			catalogue_contents.prepend(str);
			var catalogue_content_pane=$(".structure_content",$(this));
			tabs.tabs(catalogue_content_pane,{current:'active',effect:'fade'});
			
			
			*/
			}	
	})
}


function catalogue_contents_tabs_specifique(_id_catalogue_contents)
{
	$(_id_catalogue_contents).each(function(i)
	{
	var catalogue_contents=$(this);
	
			if($(".contents_header_tab", $(this)).size)
			{
			var tabs=$("<ul class='tabs'></ul>");
			var str=$("<div class='contents_header_tab tabs_wrapper'></div>").append(tabs);
				$(".contents_header_tab",catalogue_contents).each(function(i)
				{
				
				var contents_header_tab=$(this);
				var regexp_1=/[0-9]+/;
					
					if(regexp_1.test(contents_header_tab.attr('id')))
					{
					var tabo_match=regexp_1.exec(contents_header_tab.attr('id'));
					var indice=tabo_match[0];
					var link=$("ul li a",$(this));
					var libelle=link.html();
					
					/*
					if(link.attr('class')=='active') 
					{
						var li=$("<li></li>");	
						var a=$("<a href='#' class='active' >"+libelle+"</a>");
						li.append(a);
					}
					else
					{
						var li=$("<li></li>");	
						var a=$("<a href='#' >"+libelle+"</a>");
						li.append(a);	
					}
					*/
					
					var li=$("<li></li>").attr("class","tab_"+indice);	
					var a=$("<a href='#' >"+libelle+"</a>");
					li.append(a);	
					tabs.append(li);
					
					
					}
				});
				
			catalogue_contents.prepend(str);
			//var h3_titre=$("<h3></h3>");
			//h3_titre.html(_h3);
			//catalogue_contents.prepend(h3_titre);
			var catalogue_content_pane=$(".catalogue_content",$(this));
			tabs.tabs(catalogue_content_pane,{tabs:'li',current:'active',effect:'fade'});
	
			
			}	
	})
}

/******** old  code *****/



function wrap_marron(_elt)
{
$(_elt).wrap("<div class='form_marron_wrap1'></div>").wrap("<div class='form_marron_wrap2'></div>").wrap("<div class='form_marron_wrap3'></div>").wrap("<div class='form_marron_wrap4'></div>");

}


function wrap_pub_left(_elt)
{
$(_elt).wrap("<div id='module_pub_left' class='module_pub'></div>").wrap("<div class='module_pub_content'></div>");


}


function wrap_portlet_bleu_tabs(_elt)
{
//var top=$("<div  class='portlet_top_l'><div class='portlet_top_r'><div class='portlet_top_c'><h3></h3></div></div></div>");	
var bottom=$("<div class='portlet_bottom_l'><div class='portlet_bottom_r'><div class='portlet_bottom_c'></div></div></div>");

var portlet_bleu=$("<div class='portlet_bleu'></div>");

var tabs=$("ul#tabs_1").clone();
//$("ul#tabs_1").remove();

$(_elt).wrap("<div class='portlet_bleu'></div>").wrap("<div class='portlet_middle_l'></div>").wrap("<div class='portlet_middle_r'></div>").wrap("<div class='portlet_emp'></div>");

//$(_elt).parents(".portlet_bleu").prepend(tabs);
$(_elt).parents(".portlet_bleu").append(bottom);



}




function wrap_portlet_bleu_clair(_elt)
{
var top=$("<div  class='portlet2_top_l'><div class='portlet2_top_r'><div class='portlet2_top_c'><h3>&nbsp;</h3></div></div></div>");	
var bottom=$("<div class='portlet_bottom_l'><div class='portlet_bottom_r'><div class='portlet_bottom_c'></div></div></div>");

var portlet_bleu=$("<div class='portlet_bleu_clair'></div>");
$(_elt).wrap("<div class='portlet_bleu_clair'></div>").wrap("<div class='portlet_middle_l'></div>").wrap("<div class='portlet_middle_r'></div>").wrap("<div class='portlet_emp'></div>");

$(_elt).parents(".portlet_bleu_clair").prepend(top);
$(_elt).parents(".portlet_bleu_clair").append(bottom);
$(".portlet_bleu_clair .portlet_emp").append($("<br style='clear:both;'>"));
}



function wrap_contents_header_orange(_elt)
{
$(_elt).wrap("<div class='contents_header_tab_orange'></div>");
}


function wrap_contents_header_action_orange(_elt)
{
$(_elt).wrap("<div class='add_action_header_tab_orange'></div>");
}

function wrap_contents_header_action_vert(_elt)
{
$(_elt).wrap("<div class='add_action_header_tab_vert'></div>");
}

function wrap_zoom_marron(_elt)
{
$(_elt).wrap("<div class='zoom_marron_wrap1'></div>").wrap("<div class='zoom_marron_wrap2'></div>").wrap("<div class='zoom_marron_wrap3'></div>").wrap("<div class='zoom_marron_wrap4'></div>");

}

function wrap_left_menu_vert(_elt)
{
$(_elt).wrap("<div class='module_left_vert'></div>");
}


function post_formulaire(_arg)
{
elt=document.getElementsByName('action_recherche');
elt.item(0).value=_arg ;
document.forms.namedItem("moteur_recherche").submit();
return true;
}



function postService(_arg)
{
if(_arg==2)
{
	elt=document.getElementsByName('action');
	elt.item(0).value=_arg ;
	document.forms.namedItem("form_catalogue").submit();
	return true;
}


elt=document.getElementsByName('type_notification');
if(elt.item(0).value==-1)
{
alert('Vous devez renseigner le type de la notification');	
return false;
}

elt=document.getElementsByName('action');
elt.item(0).value=_arg ;
document.forms.namedItem("form_catalogue").submit();
return true;	
}




function supprimer(_arg1,_arg2)
{

	if(!confirm('Voulez vous vraiment supprimer cet élément ?')) 
	{
	return false;
	}
	else
	{
	form=document.getElementById("form_action");
	item_action=document.getElementsByName('item_action').item(0);
	item_action.value=_arg2;
	item_action=document.getElementsByName('item_content').item(0);
	item_action.value=_arg1;
	form.submit();
	}

}



function ouvre_popup(_page,_width,_height) 
{
window.open(_page,"Carrière Algérie","menubar=no, status=no, scrollbars=yes, menubar=no, width="+_width+", height="+_height);
}



function ajaxfy_link(_elts)
{
var pattern=/index.php/;
_elts.each(function(){
var new_href=this.href.replace(new RegExp("index.php", "gi"),"test.php");
this.href=new_href;
$(this).overlay({
color:'#EEEEEE;',
expose:'#333',
target:'.overlaywrap',
onBeforeLoad:function(){
$(".overlaywrap .overlaycontentwrap").load(new_href);
},
onBeforeClose:function(){
$(".overlaywrap .overlaycontentwrap").empty();
}
});
});
	
	
	
}

function ajaxfy_link2(_elts)
{
var pattern=/index.php/;
_elts.each(function(){
var new_href=this.href.replace(new RegExp("index.php", "gi"),"test.php");
this.href=new_href;
$(this).overlay({
color:'#EEEEEE;',
expose:'#333',
target:'.overlaywrap2',
onBeforeLoad:function(){
$(".overlaywrap2 .overlaycontentwrap").load(new_href);
},
onBeforeClose:function(){
$(".overlaywrap2 .overlaycontentwrap").empty();
}
});
});
	
	
	
}


function menu_horiz()
{
	
$("ul.subnav").parent().append("<span></span>"); //Only shows drop down trigger when js is enabled (Adds empty span tag after ul.subnav*)  

$("ul.topnav li span").click(function() { //When trigger is clicked...  

//Following events are applied to the subnav itself (moving subnav up and down)  
$(this).parent().find("ul.subnav").slideDown('fast').show(); //Drop down the subnav on click  

$(this).parent().hover(function() {  
}, function(){  
$(this).parent().find("ul.subnav").slideUp('slow'); //When the mouse hovers out of the subnav, move it back up  
});  

//Following events are applied to the trigger (Hover events for the trigger)  
}).hover(function() {  
$(this).addClass("subhover"); //On hover over, add class "subhover"  
}, function(){  //On Hover Out  
$(this).removeClass("subhover"); //On hover out, remove class "subhover"  
});  


	
}

function defaut()
{

$(".catalogue_content_item:odd","#maincol .catalogue_content").add($(".structure_content_item:odd","#maincol .structure_content")).add($(".structure_content_item:odd","#maincol .structure_content_test")).addClass("odd");


menu_horiz();	
	
}


function defaut2()
{

$(".structure_content_item:odd","#leftcol").add($(".catalogue_content_item:odd","#leftcol")).addClass("odd");
//make_tabsable_structure_overview($(".structure_overview"),"1234","ttt");		
structure_content_overview();
ajaxfy_link($(".field_134 a","#leftcol"));
// menu_horiz();	
	
}

function leftcol_content()
{
	$.ajax({
  	url: "/includes/leftcol_content.php",
  	cache: false,
  	success: function(html)
  	{
	    $("#leftcol .inside").append(html);
	  	defaut2();
	}
	});

}



function structure_content_overview()
{

////make_scrollable3("#contents_header_tab_down_4010","ul","li","scrollable_root_wrapper","scrollable_root","scrollable_root_items","scrollable_root_items_item",4,51623,true);	 	


//var scrollable_wrapper=$("<div>").addClass(_root_wrapper).attr("id",_root_wrapper+"_"+_indice);
//$(_root).wrapAll(scrollable_wrapper);	

////make_tabsable_structure_overview($(".structure_overview"),"1234","ttt");		



$(".structure_overview").each(function(){
	
	var structure_content_overview=$(this);
	$(".structure_content_top",structure_content_overview).wrapAll($("<div>").addClass("structure_content_overview_items"));		
	});

make_scrollable3(".structure_overview",".structure_content_overview_items",".structure_content_top","scrollable_root_wrapper","scrollable_root","scrollable_root_items ","scrollable_root_items_item",1,5432,false);
	
}



function bascule1(_arg,_arg1,_arg2)
{
arg1=document.getElementById(_arg1);
arg2=document.getElementById(_arg2);

if(_arg.value==0)
{
arg1.className='visible';
arg2.className='hidden';
};


if(_arg.value==1)
{
//alert('arg2='+arg2.className);


arg1.className='hidden';
arg2.className='visible';

//alert('arg2='+arg2.className);


};


}


function postAction(_arg)
{
elt=document.getElementsByName('action');
elt.item(0).value=_arg;
// alert(elt.item(0).value);
// return false;
document.forms[0].submit();
return true;
}


function choices_toggle(_arg1,_arg2,_arg3,_arg4,_arg5)
{

var str='';

if(_arg1==1) str='fiche_';
if(_arg1==2) str='rubrique_';
if(_arg1==3) str='colonne_';
if(_arg1==4) str='contenu_';

	
	var choise_visible=str+_arg2+'_choice_'+_arg3;
	elt_visible=document.getElementById(choise_visible);
	elt_visible.setAttribute('class','visible');	

	var choise_hidden=str+_arg2+'_choice_'+_arg4;
	choise_hidden=document.getElementById(choise_hidden);
	choise_hidden.setAttribute('class','hidden');		

	var choise_hidden2=str+_arg2+'_choice_'+_arg5;
	choise_hidden2=document.getElementById(choise_hidden2);
	choise_hidden2.setAttribute('class','hidden');			
	
return true;
}



function portlet_toggle(_arg1,_arg2)
{



	if(_arg1==1)
	{
	var entete_str='fiche_portlet_header_'+_arg2;
	var main_str='fiche_portlet_main_'+_arg2;
	
	entete=document.getElementById(entete_str);
	main=document.getElementById(main_str);
	
		if(main.getAttribute("class")=='visible')
		{
		main.setAttribute('class','hidden');	
		entete.setAttribute('src','images/sitemap_plus.gif');	
		}
		else
		{
		main.setAttribute('class','visible');
		entete.setAttribute('src','images/sitemap_minus.gif');
		
		}
	
	}//fin test sur fiche
	
	
	
	if(_arg1==2)
	{
	var entete_str='rubrique_portlet_header_'+_arg2;
	var main_str='rubrique_portlet_main_'+_arg2;
	
	entete=document.getElementById(entete_str);
	main=document.getElementById(main_str);
	
		if(main.getAttribute("class")=='visible')
		{
		main.setAttribute('class','hidden');	
		entete.setAttribute('src','images/sitemap_plus.gif');	
		}
		else
		{
		main.setAttribute('class','visible');
		entete.setAttribute('src','images/sitemap_minus.gif');
		
		}
	
	}//fin test sur rubrique
	
	if(_arg1==3)
	{
	var entete_str='colonne_portlet_header_'+_arg2;
	var main_str='colonne_portlet_main_'+_arg2;
	
	entete=document.getElementById(entete_str);
	main=document.getElementById(main_str);
	
		if(main.getAttribute("class")=='visible')
		{
		main.setAttribute('class','hidden');	
		entete.setAttribute('src','images/sitemap_plus.gif');	
		}
		else
		{
		main.setAttribute('class','visible');
		entete.setAttribute('src','images/sitemap_minus.gif');
		
		}
	
	}//fin test sur colonne
	
	
	if(_arg1==4)
	{
	var entete_str='contenu_portlet_header_'+_arg2;
	var main_str='contenu_portlet_main_'+_arg2;
	
	entete=document.getElementById(entete_str);
	main=document.getElementById(main_str);
	
		if(main.getAttribute("class")=='visible')
		{
		main.setAttribute('class','hidden');	
		entete.setAttribute('src','images/sitemap_plus.gif');	
		}
		else
		{
		main.setAttribute('class','visible');
		entete.setAttribute('src','images/sitemap_minus.gif');
		
		}
	
	}//fin test sur contenu
	
return true;
}


function tableau_action(_arg)
{
document.forms[0].action.value=_arg;
document.forms[0].submit();
}

function galerie_images()
{

/*
 $(".landing_image2").each(function(){
    
    var landing_image=$(this);
    //
    var mon_image=$('<img />').attr('src',landing_image.attr("rel")).attr('width',"600").load(function(){
        landing_image.append($(this));
        
    });

});
*/
	//gallery_root_items
	//make_scrollable3(_root,_items,_item,_root_wrapper,_root_addclass,_items_addclass,_item_addclass,_root_visible_items,_indice,_vertical);
	make_scrollable3("#gallery_root_111","#gallery_root_items",".landing_image2","scrollable_root_wrapper3","scrollable_root3","scrollable_root_items3","scrollable_root_items_item3",1,5432,false,1);

}


function load_album()
{
	$.ajax({
  	url: "/includes/load_album.php",
  	cache: false,
  	success: function(html){
    $("td#leftcol").append(html);
    ajaxfy_link2($(".left_col_album a"));
    }
});
	
}



function load_landing_images()
{
	$.ajax({
  	url: "/landing_images.php",
  	cache: false,
  	success: function(html){
  	$(html).load(function(){alert("koukou")});
  	$("#landing_images").append(html);
    $(".landing_image","#landing_images").each(function(){
    
    var landing_image=$(this);
    //
    var mon_image=$('<img />').attr('src',landing_image.attr("rel")).load(function(){
        landing_image.append($(this));
        // Your other custom code
    });
    
    });
    
    slideshow_landing_images();
    
    }
});
	
}

function slideshow_landing_images()
{
	//find landing_images and wrapall into landing_images_wrap
	//$("#landing_images").wrapAll($("<div>").addClass("structure_content_overview_items"));
	$("#landing_images").wrapAll($("<div id='landing_images_wrap_654321'>"));
	//make_scrollable3(_root,_items,_item,_root_wrapper,_root_addclass,_items_addclass,_item_addclass,_root_visible_items,_indice,_vertical);
	make_scrollable3("#landing_images_wrap_654321","#landing_images",".landing_image","scrollable_root_wrapper","scrollable_root","scrollable_root_items ","scrollable_root_items_item",1,5432,false,1);
	
	
}



function structure_content_61()
{
//make_scrollable3(_root,_items,_item,_root_wrapper,_root_addclass,_items_addclass,_item_addclass,_root_visible_items,_indice,_vertical)	

$("#structure_content_61 .structure_content_item").wrapAll($("<div class='structure_content_items'>"));
$("#structure_content_61 .structure_content_items").wrapAll($("<div id='structure_content_root_5643987' class='structure_content_root'>"));

make_scrollable3("#structure_content_root_5643987",".structure_content_items",".structure_content_item","scrollable_root_wrapper3","scrollable_root3","scrollable_root_items3","scrollable_root_items_item3",1,5432,false);
	
}
