var currentSection = "actus-pane"; var tabTag = "-tab"; var paneTag = "-pane"; function ScrollSection(link, scrollArea, offset)
{ if (currentSection == link) { return;}
lastSection = currentSection; currentSection = link; sectionTab = currentSection.split("-")[0] + tabTag; document.getElementById(sectionTab).className = "active"; if (lastSection) { lastTab = lastSection.split("-")[0] + tabTag; document.getElementById(lastTab).className = "inactive";}
theScroll = document.getElementById(scrollArea); position = findElementPos(document.getElementById(link)); if (offset != "") { offsetPos = findElementPos(document.getElementById(offset)); position[0] = position[0] - offsetPos[0];}
scrollStart(theScroll, theScroll.scrollLeft, position[0], "horiz");}
var scrollanim = {time:0, begin:0, change:0.0, duration:0.0, element:null, timer:null}; function scrollStart(elem, start, end, direction)
{ if (scrollanim.timer != null) { clearInterval(scrollanim.timer); scrollanim.timer = null;}
scrollanim.time = 0; scrollanim.begin = start; scrollanim.change = end - start; scrollanim.duration = 25; scrollanim.element = elem; if (direction == "horiz") { scrollanim.timer = setInterval("scrollHorizAnim();", 15);}
else { scrollanim.timer = setInterval("scrollVertAnim();", 15);}
}
function scrollHorizAnim()
{ if (scrollanim.time > scrollanim.duration) { clearInterval(scrollanim.timer); scrollanim.timer = null;}
else { move = sineInOut(scrollanim.time, scrollanim.begin, scrollanim.change, scrollanim.duration); scrollanim.element.scrollLeft = move; scrollanim.time++;}
}
function showLargePopup(elem) { var popFullscreen = document.getElementById('fullscreen'); var popLarge = document.getElementById('largepopup'); document.getElementById('start-nav-formation-continue').className = 'show'; getSize(); popFullscreen.style.height = myScrollHeight + 'px'; popFullscreen.style.display = 'block'; popLarge.style.left = ((myWidth - popLarge.offsetWidth) / 2) + 'px'; popLarge.style.top = (((myHeight - popLarge.offsetHeight) / 2) + myScroll) + 'px'; popLarge.style.visibility = 'visible'; refreshTimer = setTimeout("setLocation('"+elem.getAttribute("href")+"')", 1500);}
function setLocation(loc) { window.location = loc;}
function hideLargePopup() { var popFullscreen = document.getElementById('fullscreen'); var popLarge = document.getElementById('largepopup'); popLarge.style.visibility = 'hidden'; popFullscreen.style.display = 'none';}
var dpopTimer = ""; function showFPCPopup(image) { if (image == "1")
{ var btnFPC = document.getElementById('nav-formation-en-alternance'); dpop = 'dpop1'; var popFPC = document.getElementById('dpop1');}
else if (image == "2")
{ var btnFPC = document.getElementById('nav-formation-initiale'); dpop = 'dpop2'; var popFPC = document.getElementById('dpop2');}
else if (image == "3")
{ var btnFPC = document.getElementById('nav-formation-continue'); dpop = 'dpop3'; var popFPC = document.getElementById('dpop3');}
if (moveanim.timer != null) { clearInterval(moveanim.timer); moveanim.timer = null;}
position = findElementPos(btnFPC); popFPC.style.top = (position[1] - (popFPC.offsetHeight - 0)) +"px"; popFPC.style.left = "0" + "px"; if (dpopTimer != "")
{ clearTimeout(dpopTimer); dpopTimer = "";} else { setOpacity(0, dpop); popFPC.style.visibility = 'visible'; moveStart(popFPC, parseInt(popFPC.style.left), parseInt(popFPC.style.left), parseInt(popFPC.style.top) + 0, parseInt(popFPC.style.top), 15); fadeElementSetup(dpop, 0, 100, 13);}
}
function hideFPCPopup1(image) { if (image == "1")
{ var btnFPC = document.getElementById('nav-formation-en-alternance'); dpop = 'dpop1'; var popFPC = document.getElementById('dpop1');}
else if (image == "2")
{ var btnFPC = document.getElementById('nav-formation-initiale'); dpop = 'dpop2'; var popFPC = document.getElementById('dpop2');}
else if (image == "3")
{ var btnFPC = document.getElementById('nav-formation-continue'); dpop = 'dpop3'; var popFPC = document.getElementById('dpop3');}
if (moveanim.timer != null) { clearInterval(moveanim.timer); moveanim.timer = null;}
position = findElementPos(btnFPC); popFPC.style.top = (position[1] - (popFPC.offsetHeight - 0)) +"px"; popFPC.style.left = "0" + "px"; if (dpopTimer != "")
{ clearTimeout(dpopTimer); dpopTimer = "";} else { setOpacity(100, dpop); moveStart(popFPC, parseInt(popFPC.style.left), parseInt(popFPC.style.left), parseInt(popFPC.style.top) + 0, parseInt(popFPC.style.top), 15); fadeElementSetup(dpop, 100, 0, 13, 0);}
}
function hideFPCPopup(az) { sortie = ("dpop" + az); dpopTimer = setTimeout("actuallyHide(sortie)", 0);}
function actuallyHide(dpop) { var popFPC = document.getElementById(dpop); if (dpopTimer != "")
{ dpopTimer = ""; moveStart(popFPC, parseInt(popFPC.style.left), parseInt(popFPC.style.left), parseInt(popFPC.style.top), parseInt(popFPC.style.top) - 0, 15); fadeElementSetup(dpop, 100, 0, 13);}
}
var moveanim = {time:0, beginX:0, changeX:0.0, beginY:0, changeY:0, duration:0.0, element:null, timer:null}; function moveStart(elem, startX, endX, startY, endY, duration)
{ if (moveanim.timer != null) { clearInterval(moveanim.timer); moveanim.timer = null;}
moveanim.time = 0; moveanim.beginX = startX; moveanim.changeX = endX - startX; moveanim.beginY = startY; moveanim.changeY = endY - startY; moveanim.duration = duration; moveanim.element = elem; moveanim.timer = setInterval("moveAnimDo();", 15);}
function moveAnimDo()
{ if (moveanim.time > moveanim.duration) { clearInterval(moveanim.timer); moveanim.timer = null;}
else { moveX = cubicOut(moveanim.time, moveanim.beginX, moveanim.changeX, moveanim.duration); moveY = cubicOut(moveanim.time, moveanim.beginY, moveanim.changeY, moveanim.duration); moveanim.element.style.left = moveX + "px"; moveanim.element.style.top = moveY + "px"; moveanim.time++;}
}
