var active_onglet=0;var no_hide=0;var sous_menu_actived=0;var stop_hide=0;function loadOnglet(){var lien=document.getElementsByTagName('A');for(var i=lien.length-1;i>=0;--i){if(lien[i].className.indexOf('onglet')!=-1){lien[i].onmouseover=OngletHoverIn;lien[i].onmouseout=OngletHoverOut;id=lien[i].id.replace('onglet','');if(document.getElementById('onglet_menu'+id)){lien[i].onclick=OngletSelect;}}}}
function OngletHoverIn(){var id=this.id.replace('onglet','');select_onglet(id);}
function OngletHoverOut(){var id=this.id.replace('onglet','');if(!document.getElementById('onglet_menu'+id)||document.getElementById('onglet_menu'+id).style.display!='block'){unselect_onglet(id);}}
function select_onglet(num){if(document.getElementById('befor'+num)&&!document.getElementById('onglet_menu'+num)){select_onglet_sub(num);}
if(active_onglet!=num){hide_all_menu();}
glisse_menu(num);}
function unselect_onglet(num){if(document.getElementById('befor'+num)&&document.getElementById('onglet'+num).className=='ongletonmouseover'){document.getElementById('befor'+num).className='beforonglet';document.getElementById('onglet'+num).className='onglet';document.getElementById('after'+num).className='afteronglet';}}
function select_onglet_sub(num){if(document.getElementById('onglet'+num).className=='onglet'){document.getElementById('befor'+num).className='beforongletsel';document.getElementById('onglet'+num).className='ongletonmouseover';document.getElementById('after'+num).className='afterongletsel';}}
function hide_all_menu(){if(no_hide==0){var div=document.getElementsByTagName('DIV');for(var i=div.length-1;i>=0;--i){if(div[i].id.indexOf('onglet_menu')!=-1&&div[i].style.display!='none'){div[i].style.display='none';var id=div[i].id.replace('onglet_menu','');unselect_onglet(id);}}}
no_hide=0;}
function glisse_menu(num){if(sous_menu_actived==1){if(document.getElementById('onglet_menu'+num)){document.getElementById('onglet_menu'+num).style.display='block';select_onglet_sub(num);tabs_menu_shadow('onglet_menu'+num);}
active_onglet=num;}}
getOffsetPositionMenu=function(oObj,inTYPE){var iVal=0;var sType='oObj.offset'+inTYPE;while(oObj&&oObj.tagName!='BODY'){iVal+=eval(sType);oObj=oObj.offsetParent;}
return iVal;}
function OngletSelect(){var id=this.id.replace('onglet','');if(document.getElementById('onglet_menu'+id).style.display!='block'){document.getElementById('onglet_menu'+id).style.display='block';select_onglet_sub(id);sous_menu_actived=1;active_onglet=id;stop_hide=1;tabs_menu_shadow('onglet_menu'+id);}else{document.getElementById('onglet_menu'+id).style.display='none';unselect_onglet(id);sous_menu_actived=0;active_onglet=0;stop_hide=1;tabs_hide_menu_shadow('onglet_menu'+id);}
return false;}
function tabs_hide_menu_shadow(obj_id){if(document.getElementById(obj_id+'_shad_top_right')){document.getElementById(obj_id+'_shad_top_right').style.display='none';}
if(document.getElementById(obj_id+'_shad_right')){document.getElementById(obj_id+'_shad_right').style.display='none';}
if(document.getElementById(obj_id+'_shad_bottom_right')){document.getElementById(obj_id+'_shad_bottom_right').style.display='none';}
if(document.getElementById(obj_id+'_shad_bottom')){document.getElementById(obj_id+'_shad_bottom').style.display='none';}
if(document.getElementById(obj_id+'_shad_bottom_left')){document.getElementById(obj_id+'_shad_bottom_left').style.display='none';}}
function tabs_menu_shadow(obj_id){if(md_tabs_menu_shadow==0)return false;var left_corner=getOffsetPositionMenu(document.getElementById(obj_id),'Left');var border_width=getOffsetPositionMenu(document.getElementById(obj_id),'Width');var top_corner=getOffsetPositionMenu(document.getElementById(obj_id),'Top');var border_height=getOffsetPositionMenu(document.getElementById(obj_id),'Height');if(!document.getElementById(obj_id+'_shad_top_right')){var shadow1=document.createElement('div');shadow1.style.position='absolute';shadow1.style.width='15px';shadow1.style.height='15px';shadow1.style.backgroundImage='url('+md_url_img_shadow+'/shadow/shadow_top_right.png)';shadow1.id=obj_id+'_shad_top_right';document.body.appendChild(shadow1);}
document.getElementById(obj_id+'_shad_top_right').style.left=parseInt(left_corner+border_width)+'px';document.getElementById(obj_id+'_shad_top_right').style.top=parseInt(top_corner)+'px';document.getElementById(obj_id+'_shad_top_right').style.display='block';if(!document.getElementById(obj_id+'_shad_right')){var shadow2=document.createElement('div');shadow2.style.position='absolute';shadow2.style.width='15px';shadow2.style.height=parseInt(border_height-15)+'px';shadow2.style.backgroundImage='url('+md_url_img_shadow+'/shadow/shadow_right.png)';shadow2.id=obj_id+'_shad_right';document.body.appendChild(shadow2);}
document.getElementById(obj_id+'_shad_right').style.left=parseInt(left_corner+border_width)+'px';document.getElementById(obj_id+'_shad_right').style.top=parseInt(top_corner+15)+'px';document.getElementById(obj_id+'_shad_right').style.display='block';if(!document.getElementById(obj_id+'_shad_bottom_right')){var shadow3=document.createElement('div');shadow3.style.position='absolute';shadow3.style.width='15px';shadow3.style.height='15px';shadow3.style.backgroundImage='url('+md_url_img_shadow+'/shadow/shadow_bottom_right.png)';shadow3.id=obj_id+'_shad_bottom_right';document.body.appendChild(shadow3);}
document.getElementById(obj_id+'_shad_bottom_right').style.left=parseInt(left_corner+border_width)+'px';document.getElementById(obj_id+'_shad_bottom_right').style.top=parseInt(top_corner+border_height)+'px';document.getElementById(obj_id+'_shad_bottom_right').style.display='block';if(!document.getElementById(obj_id+'_shad_bottom')){var shadow4=document.createElement('div');shadow4.style.position='absolute';shadow4.style.width=parseInt(border_width-15)+'px';shadow4.style.height='15px';shadow4.style.backgroundImage='url('+md_url_img_shadow+'/shadow/shadow_bottom.png)';shadow4.id=obj_id+'_shad_bottom';document.body.appendChild(shadow4);}
document.getElementById(obj_id+'_shad_bottom').style.left=parseInt(left_corner+15)+'px';document.getElementById(obj_id+'_shad_bottom').style.top=parseInt(top_corner+border_height)+'px';document.getElementById(obj_id+'_shad_bottom').style.display='block';if(!document.getElementById(obj_id+'_shad_bottom_left')){var shadow5=document.createElement('div');shadow5.style.position='absolute';shadow5.style.width='15px';shadow5.style.height='15px';shadow5.style.backgroundImage='url('+md_url_img_shadow+'/shadow/shadow_bottom_left.png)';shadow5.id=obj_id+'_shad_bottom_left';document.body.appendChild(shadow5);}
document.getElementById(obj_id+'_shad_bottom_left').style.left=parseInt(left_corner)+'px';document.getElementById(obj_id+'_shad_bottom_left').style.top=parseInt(top_corner+border_height)+'px';document.getElementById(obj_id+'_shad_bottom_left').style.display='block';}
function hideMenu(){if(stop_hide==0){hide_all_menu();sous_menu_actived=0;}
stop_hide=0;}
if(window.attachEvent){window.attachEvent('onload',loadOnglet);document.attachEvent('onclick',hideMenu);}else if(window.addEventListener){window.addEventListener('load',loadOnglet,false);document.addEventListener('click',hideMenu,false);}else if(window.onload!=null){OL=window.onload;window.onload=function(){loadOnglet();OL();}
document.onclick=hideMenu;}else{window.onload=loadOnglet;document.onclick=hideMenu;}