Bonjour à tous !
EDIT : Il me semble que c'est la fonction _RSW() dans le .js qui ne fonctionne pas avec Firefox et IE >= 8
EDIT 2 : Je commence à y comprendre plus clair, il y a du code javascript qui adapte au chargement la taille des diapos pour qu'elles s'affichent bien "LoadSld()" et ensuite il y a la fonction "_RSW()" qui adapte la taille des diapos selon le redimensionnement de la fenêtre. Le problème c'est que le css de la div englobant les diapos n'est pas mis à jour par le javascript alors que sous IE 5 le css est bien mis à jour à chaque redimensionnement de la fenêtre.
Je bosse sur un projet que j'ai repris dans lequel un diaporama s'affiche ainsi que son menu, le tout séparé dans deux frames.
Le problème se situe à l'affichage du diaporama entre IE et Firefox. Sous IE 5, le diaporama s'affiche bien, il prend toute la fenête et est centré.
Par contre à partir de IE 8 jusqu'à IE 11 et dans Firefox, il s'affiche collé en haut à gauche en petit (sa taille d'origine), le code javascript pour l'agrandir n'est pas pris en compte.
Je vous soumets le code lié ainsi que des captures d'écrans pour que vous visualisez un peu mieux le problème.
Capture d'écran sous IE 5 (OK) :
Capture d'écran sous Firefox et IE => 8 (PAS OK) :
Code de la page qui appelle le diapo :
<html>
<head>
<meta http-equiv=Content-Type content="text/html; charset=UTF-8">
<meta name=ProgId content=PowerPoint.Slide>
<meta name=Generator content="Microsoft PowerPoint 12">
<link id=Main-File rel=Main-File
href="../EVPT-WEB-2.4%20-%20PR0908173%20-%20User%20Handbook.htm">
<link rel=Preview href=preview.wmf>
<title>EV PLANNING TOOL - WEB MODULE</title>
<![if !ppt]><script src=script.js></script><script>
<!--
var gNavLoaded = gOtlNavLoaded = gOtlLoaded = false;
function Load()
{
str=unescape(document.location.hash),idx=str.indexOf('#')
if(idx>=0) str=str.substr(1);
if(str) PPTSld.location.replace(escape(str));
}
//-->
</script>
<![endif]>
</head>
<frameset rows="*,25" border=0>
<frameset cols="25%,*" onload="Load()" id=PPTHorizAdjust framespacing=1 frameborder=1>
<frame src=outline.htm title="Plan" name=PPTOtl>
<frame src=slide0012.htm title="Diapositive" name=PPTSld>
</frameset>
<frameset cols="25%,*" framespacing=1>
<frame src=outline.htm title="Barre de navigation du plan" name=PPTOtlNav scrolling=no noresize>
<frame src=outline.htm title="Barre de navigation des diapositives" name=PPTNav scrolling=no noresize>
</frameset>
</frameset>
</html>
Code d'une slide :
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:p="urn:schemas-microsoft-com:office:powerpoint"
xmlns:oa="urn:schemas-microsoft-com:office:activation"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=UTF-8">
<meta name=ProgId content=PowerPoint.Slide>
<meta name=Generator content="Microsoft PowerPoint 12">
<link id=Main-File rel=Main-File href="../EVPT-WEB-2.4%20-%20PR0908173%20-%20User%20Handbook.htm">
<link rel=Preview href=preview.wmf>
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
p\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
v\:textbox {display:none;}
</style>
<![endif]-->
<title>EV PLANNING TOOL - WEB MODULE</title>
<meta name=Description content="23/11/2009: EV PLANNING TOOL - WEB MODULE">
<link rel=Stylesheet href="master147_stylesheet.css">
<![if !ppt]>
<style>
.CB
{color:black;}
.CT
{color:white;}
</style>
<style media=print>
<!--.sld
{left:0px !important;
width:6.0in !important;
height:4.5in !important;
font-size:107% !important;}
-->
</style>
<script src=script.js></script>
<script>
<!--
if( !IsNts() ) Redirect( "PPTSld" );
//--></script><!--[if vml]><script>g_vml = 1;
</script><![endif]--><![endif]><o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="13"/>
</o:shapelayout>
</head>
<body lang=FR style='margin:0px;background-color:black'
onclick="DocumentOnClick()" onresize="_RSW()" onload="LoadSld()"
onkeypress="_KPH()">
<div id=SlideObj class=sld style='position:absolute;top:0px;left:0px;
width:534px;height:400px;font-size:16px;background-color:white;clip:rect(0%, 101%, 101%, 0%);
visibility:hidden'>
<p:slide coordsize="720,540"
colors="#ffffff,#000000,#5d5d5d,#c8deee,#ffcc00,#7a2336,#0099cc,#cc0000"
masterhref="master147.xml">
<p:shaperange href="master147.xml#_x0000_s2049"/><![if !ppt]><p:shaperange
href="master147.xml#_x0000_s2050"/><![if !vml]><img border=0
v:shapes="_x0000_s2050" src="master147_image004.png" style='position:absolute;
top:100.0%;left:0%;width:100.56%;height:.5%'><![endif]><p:shaperange
href="master147.xml#_x0000_s2051"/><![if !vml]><img border=0
v:shapes="_x0000_s2051,_x0000_s2052" src="master147_image005.png"
style='position:absolute;top:0%;left:0%;width:100.37%;height:57.25%'><![endif]><p:shaperange
href="master147.xml#Picture_x0020_61"/><![if !vml]><img border=0
v:shapes="Picture_x0020_61" src="master03_image002.png" alt=internal
style='position:absolute;top:87.0%;left:88.2%;width:11.79%;height:13.0%'><![endif]><![endif]><v:shapetype
id="_x0000_t202" coordsize="21600,21600" o:spt="202" path="m,l,21600r21600,l21600,xe">
<v:stroke joinstyle="miter"/>
<v:path gradientshapeok="t" o:connecttype="rect"/>
</v:shapetype><v:shape id="_x0000_s13314" type="#_x0000_t202" style='position:absolute;
left:0;top:522pt;width:7in;height:18pt;visibility:visible;mso-wrap-style:square;
v-text-anchor:middle' filled="f" stroked="f">
<o:lock v:ext="edit" grouping="t"/>
<v:textbox style='mso-rotate-with-shape:t' inset="4mm"/>
</v:shape><p:shaperange href="master147.xml#_x0000_m2055"/><v:shape id="_x0000_s13315"
type="#_x0000_m2055" style='position:absolute;left:6.75pt;top:330.125pt;
width:630pt;height:66pt;visibility:visible;mso-wrap-style:square;
v-text-anchor:bottom' filled="f" stroked="f">
<v:fill o:detectmouseclick="t"/>
<v:stroke o:forcedash="f"/>
<v:path arrowok="f"/>
<o:lock v:ext="edit" rotation="f" aspectratio="f" position="f" selection="f"
verticies="f" text="f" adjusthandles="f" grouping="t" shapetype="f"/>
<v:textbox style='layout-flow:horizontal;mso-rotate-with-shape:t' inset="7.2pt,3.6pt,.5mm,3.6pt"/>
<p:placeholder type="centerTitle" position="-1"/></v:shape><p:shaperange
href="master147.xml#_x0000_m2054"/><v:shape id="_x0000_s13316" type="#_x0000_m2054"
style='position:absolute;left:6.75pt;top:395.875pt;width:630pt;height:60.125pt;
visibility:visible;mso-wrap-style:square;v-text-anchor:top'>
<v:stroke o:forcedash="f"/>
<v:path arrowok="f"/>
<o:lock v:ext="edit" rotation="f" aspectratio="f" position="f" selection="f"
verticies="f" text="f" adjusthandles="f" grouping="t" shapetype="f"/>
<v:textbox style='layout-flow:horizontal;mso-rotate-with-shape:t' inset="7.2pt,3.6pt,.5mm,3.6pt"/>
<p:placeholder type="subTitle" position="-1"/></v:shape><v:shape id="_x0000_s13317"
type="#_x0000_t202" style='position:absolute;left:0;top:0;width:595.125pt;
height:34pt;visibility:visible;mso-wrap-style:square;v-text-anchor:middle'
o:bwmode="grayScale" fillcolor="#7d94ca" strokecolor="#7d94ca"
strokeweight=".5pt">
<v:textbox style='mso-rotate-with-shape:t' inset="4mm,,40mm"/>
</v:shape><v:shape id="_x0000_s13318" type="#_x0000_t202" style='position:absolute;
left:0;top:120.125pt;width:10in;height:186.125pt;visibility:visible;
mso-wrap-style:square;v-text-anchor:top' o:bwmode="grayScale" fillcolor="#7d94ca"
strokecolor="#7d94ca" strokeweight=".5pt">
<v:textbox style='mso-rotate-with-shape:t' inset="1.5mm"/>
</v:shape><v:shape id="_x0000_s13319" type="#_x0000_t202" style='position:absolute;
left:595.25pt;top:0;width:124.75pt;height:34pt;visibility:visible;
mso-wrap-style:square;v-text-anchor:middle' filled="f" stroked="f">
<v:path arrowok="t"/>
<o:lock v:ext="edit" grouping="t"/>
<v:textbox style='mso-rotate-with-shape:t' inset="2.5mm,,2.5mm"/>
</v:shape><v:shapetype id="_x0000_t84" coordsize="21600,21600" o:spt="84"
adj="2700" path="m,l,21600r21600,l21600,xem@0@0nfl@0@2@1@2@1@0xem,nfl@0@0em,21600nfl@0@2em21600,21600nfl@1@2em21600,nfl@1@0e">
<v:stroke joinstyle="miter"/>
<v:formulas>
<v:f eqn="val #0"/>
<v:f eqn="sum width 0 #0"/>
<v:f eqn="sum height 0 #0"/>
<v:f eqn="prod width 1 2"/>
<v:f eqn="prod height 1 2"/>
<v:f eqn="prod #0 1 2"/>
<v:f eqn="prod #0 3 2"/>
<v:f eqn="sum @1 @5 0"/>
<v:f eqn="sum @2 @5 0"/>
</v:formulas>
<v:path o:extrusionok="f" limo="10800,10800" o:connecttype="custom"
o:connectlocs="0,@4;@0,@4;@3,21600;@3,@2;21600,@4;@1,@4;@3,0;@3,@0"
textboxrect="@0,@0,@1,@2"/>
<v:handles>
<v:h position="#0,topLeft" switch="" xrange="0,10800"/>
</v:handles>
<o:complex v:ext="view"/>
</v:shapetype><v:shape id="_x0000_s13320" type="#_x0000_t84" style='position:absolute;
left:371.25pt;top:427.5pt;width:202.5pt;height:39.375pt;visibility:visible;
mso-wrap-style:none;v-text-anchor:middle' o:gfxdata="U[...]A==
" fillcolor="#d9d9d9" strokecolor="black [1]">
<v:stroke joinstyle="round"/>
<v:textbox style='mso-rotate-with-shape:t'/>
</v:shape><![if !vml]><img border=0
v:shapes="_x0000_s13317,_x0000_s13318,_x0000_s13320"
src="slide0012_image006.png" style='position:absolute;top:0%;left:0%;
width:100.37%;height:87.0%'><![endif]>
<div v:shape="_x0000_s13314">
<div class=O1 style='mso-margin-left-alt:468'></div>
<div class=O2 style='mso-margin-left-alt:720'></div>
<div class=O3 style='mso-margin-left-alt:1008'></div>
<div class=O4 style='mso-margin-left-alt:1296'></div>
<div class=O style='mso-char-wrap:1;mso-kinsoku-overflow:1;position:absolute;
top:97.5%;left:1.49%;width:67.6%;height:2.0%'><span style='font-size:44%;
mso-ansi-language:1024'>EV Planning tool - Web module v2.4 : training
reference - PR0908173 </span></div>
</div>
<div v:shape="_x0000_s13315" class=CT style='text-align:right;mso-char-wrap:
1;mso-kinsoku-overflow:1;position:absolute;top:66.75%;left:-.18%;width:88.57%;
height:6.5%'><span style='color:black;mso-color-index:1'>EV PLANNING TOOL -
WEB MODULE</span></div>
<div v:shape="_x0000_s13316">
<div class=CB1 style='mso-margin-left-alt:468;mso-text-indent-alt:288'></div>
<div class=CB2 style='mso-margin-left-alt:720;mso-text-indent-alt:576'></div>
<div class=CB3 style='mso-margin-left-alt:1008;mso-text-indent-alt:864'></div>
<div class=CB4 style='mso-margin-left-alt:1296;mso-text-indent-alt:1152'></div>
<div class=CB style='text-align:right;mso-char-wrap:1;mso-kinsoku-overflow:
1;position:absolute;top:74.25%;left:1.87%;width:86.51%;height:4.0%'><span
style='font-size:75%;color:#5D5D5D;mso-color-index:2'>Training reference
documentation</span></div>
</div>
<div v:shape="_x0000_s13317">
<div class=O1 style='mso-margin-left-alt:468'></div>
<div class=O2 style='mso-margin-left-alt:720'></div>
<div class=O3 style='mso-margin-left-alt:1008'></div>
<div class=O4 style='mso-margin-left-alt:1296'></div>
<div class=O style='position:absolute;top:1.25%;left:1.68%;width:65.35%;
height:4.0%'><span style='color:white;mso-ansi-language:1024'>EV</span></div>
</div>
<div v:shape="_x0000_s13318">
<div class=O1 style='mso-margin-left-alt:468'></div>
<div class=O2 style='mso-margin-left-alt:720'></div>
<div class=O3 style='mso-margin-left-alt:1008'></div>
<div class=O4 style='mso-margin-left-alt:1296'></div>
<div class=O style='mso-margin-left-alt:63;mso-text-indent-alt:63;position:
absolute;top:23.25%;left:1.68%;width:97.37%;height:2.75%'><span
style='font-size:67%;color:white;mso-ansi-language:1024;display:none'>
</span>
</div>
<div class=O style='mso-margin-left-alt:63;mso-text-indent-alt:63;position:
absolute;top:25.75%;left:1.68%;width:97.37%;height:2.75%'><span
style='font-size:67%;color:white;mso-ansi-language:1024'>Presented by
</span>
</div>
<div class=O style='mso-margin-left-alt:63;mso-text-indent-alt:63;position:
absolute;top:28.5%;left:1.68%;width:97.37%;height:2.75%'><span
style='font-size:67%;color:white;mso-ansi-language:1024;display:none'>
</span>
</div>
<div class=O style='mso-margin-left-alt:63;mso-text-indent-alt:63;position:
absolute;top:31.0%;left:1.68%;width:97.37%;height:2.75%'><span
style='font-size:67%;color:white;mso-ansi-language:1024;display:none'>
</span>
</div>
<div class=O style='mso-margin-left-alt:63;mso-text-indent-alt:63;position:
absolute;top:33.75%;left:1.68%;width:97.37%;height:4.0%'><span
style='color:white;mso-ansi-language:1024'>Wilfried MAREK</span><span
style='font-size:67%;color:white;mso-ansi-language:1024;display:none'>
</span>
</div>
<div class=O style='mso-margin-left-alt:63;mso-text-indent-alt:63;position:
absolute;top:37.75%;left:1.68%;width:97.37%;height:2.75%'><span
style='font-size:67%;color:white;mso-ansi-language:1024'>ATOS ORIGIN for EV
& IDN
</span>
</div>
<div class=O style='mso-margin-left-alt:63;mso-text-indent-alt:63;position:
absolute;top:40.5%;left:1.68%;width:97.37%;height:2.75%'><span
style='font-size:67%;color:white;mso-ansi-language:1024;display:none'>
</span>
</div>
<div class=O style='mso-margin-left-alt:63;mso-text-indent-alt:63;position:
absolute;top:43.0%;left:1.68%;width:97.37%;height:2.75%'><span
style='font-size:67%;color:white;mso-ansi-language:1024;display:none'>
</span>
</div>
<div class=O style='mso-margin-left-alt:63;mso-text-indent-alt:63;position:
absolute;top:45.75%;left:1.68%;width:97.37%;height:2.75%'><span
style='font-size:67%;color:white;mso-ansi-language:1024;display:none'>
</span>
</div>
<div class=O style='mso-margin-left-alt:63;mso-text-indent-alt:63;position:
absolute;top:48.5%;left:1.68%;width:97.37%;height:2.75%'><span
style='font-size:67%;color:white;mso-ansi-language:1024;mso-special-format:
lastCR;display:none'>
</span>
</div>
</div>
<div v:shape="_x0000_s13319">
<div class=O1 style='mso-margin-left-alt:468'></div>
<div class=O2 style='mso-margin-left-alt:720'></div>
<div class=O3 style='mso-margin-left-alt:1008'></div>
<div class=O4 style='mso-margin-left-alt:1296'></div>
<div class=O style='text-align:right;mso-char-wrap:1;mso-kinsoku-overflow:
1;position:absolute;top:2.0%;left:83.7%;width:15.54%;height:2.75%'><span
style='font-size:67%;color:white;mso-color-index:0;mso-ansi-language:1024'>Sept
2009</span>
</div>
</div>
<div v:shape="_x0000_s13320">
<div class=O1 style='mso-margin-left-alt:468'></div>
<div class=O2 style='mso-margin-left-alt:720'></div>
<div class=O3 style='mso-margin-left-alt:1008'></div>
<div class=O4 style='mso-margin-left-alt:1296'></div>
<div class=O style='
text-align:center;
mso-line-spacing:"100 50 0";
mso-char-wrap:1;
mso-kinsoku-overflow:1;
position:absolute;
top:81.5%;left:52.62%;
width:26.21%
;height:3.25%'>
<span lang=FR style='font-size:78%'><i>Web version 2.4 (update)</i></span>
</div>
</div>
</p:slide>
</div>
</body>
</html>
Code du .js qui est appelé :
function LoadSld()
{
var sld=GetObj("SlideObj")
if( !g_supportsPPTHTML ) {
sld.style.visibility="visible"
return
}
alert("MakeNotesVis (LoadSld) :"+MakeNotesVis() );
if( MakeNotesVis() ) return
runAnimations = _InitAnimations();
if( IsWin("PPTSld") )
parent.SldUpdated(GetSldId())
g_origSz=parseInt(SlideObj.style.fontSize)
g_origH=sld.style.posHeight
g_origW=sld.style.posWidth
g_scaleHyperlinks=(document.all.tags("AREA").length>0)
if( g_scaleHyperlinks )
InitHLinkArray()
if( g_scaleInFrame||(IsWin("PPTSld") && parent.IsFullScrMode() ) )
document.body.scroll="no"
_RSW()
if( IsWin("PPTSld") && parent.IsFullScrMode() )
FullScrInit();
MakeSldVis();
ChkAutoAdv()
if( runAnimations )
{
if( document.all("NSPlay") )
document.all("NSPlay").autoStart = false;
if( sld.filters && sld.filters.revealtrans )
setTimeout( "document.body.start()", sld.filters.revealtrans.duration * 1000 );
else
document.body.start();
}
}
function MakeSldVis()
{
alert("MakeSldVis()");
var fTrans=g_showAnimation && SldHasTrans()
if( fTrans )
{
if( g_bgSound ) {
idx=g_bgSound.indexOf(",");
pptSound.src=g_bgSound.substr( 0, idx );
pptSound.loop= -(parseInt(g_bgSound.substr(idx+1)));
}
SlideObj.filters.revealtrans.Apply()
}
SlideObj.style.visibility="visible"
if( fTrans )
SlideObj.filters.revealtrans.Play()
}
function MakeNotesVis()
{
alert("MakeNotesVis()");
if( !IsNts() ) return false
SlideObj.style.display="none"
nObj = document.all.item("NotesObj")
parent.SetHasNts(0)
if( nObj ) {
nObj.style.display=""
parent.SetHasNts(1)
}
return 1
}
function ChkAutoAdv()
{
alert("ChkAutoAdv()");
if(SldHasTrans())
SlideObj.onfilterchange=AutoAdv
else
AutoAdv()
}
function AutoAdv()
{
alert("AutoAdv()");
if(!IsWin("PPTSld") || !gUseSldTimings )return
var sld=GetCurSld()
if( (sld.mAdvDelay>0) && !parent.IsFramesMode() )
setTimeout("parent.GoToNextSld()",sld.mAdvDelay)
}
function GetObj(id)
{
// alert("g_supportsPPTHTML":+g_supportsPPTHTML);
// alert("document.all(id):"+document.all(id));
// alert("document.getElementById(id):"+document.getElementById(id));
if(g_supportsPPTHTML) return document.all(id);
else return document.getElementById(id);
}
function SldHasTrans() { alert("SldHasTrans()");return SlideObj.style.filter != ""; }
function GetSldId() { return sId=location.href.substring(location.href.lastIndexOf('/')+1) }
function HideMenu() { alert("HideMenu()");if( frames["PPTSld"] && PPTSld.document.all.item("ctxtmenu") && PPTSld.ctxtmenu.style.display!="none" ) { PPTSld.ctxtmenu.style.display='none'; return true } return false }
function IsWin( name ) { return window.name == name }
function IsNts() { return IsWin("PPTNts") }
function IsSldOrNts() { alert("IsSldOrNts()");return( IsWin("PPTSld")||IsWin("PPTNts") ) }
function SupportsPPTAnimation() { alert("SupportsPPTAnication()");return( navigator.platform == "Win32" && navigator.appVersion.indexOf("Windows")>0 ) }
function SupportsPPTHTML()
{
// alert("SupportsPPTHTML()");
// alert("navigator.appVersion:"+navigator.appVersion);
// alert("msie=appVer.indexOf('MSIE '):"+appVer.indexOf("MSIE "));
// alert("ver=parseInt(appVer):"+parseInt(appVer));
var appVer=navigator.appVersion, msie=appVer.indexOf("MSIE "), ver=0
if( msie >= 0 )
ver=parseFloat( appVer.substring( msie+5, appVer.indexOf(";",msie) ) )
else
ver=parseInt(appVer)
return( ver >= 4 && msie >= 0 )
}
function _RSW()
{
alert("_RSW()");
if( !g_supportsPPTHTML || IsNts() ||
( !g_scaleInFrame && (!IsWin("PPTSld") || !parent.IsFullScrMode()) ) )
return
var padding=0;
if( IsWin("PPTSld") && parent.IsFramesMode() ) padding=6
cltWidth=document.body.clientWidth-padding
cltHeight=document.body.clientHeight-padding
factor=(1.0*cltWidth)/g_origW
if( cltHeight < g_origH*factor )
factor=(1.0*cltHeight)/g_origH
newSize = g_origSz * factor
if( newSize < 1 ) newSize=1
s=SlideObj.style
s.fontSize=newSize+"px"
s.posWidth=g_origW*factor
s.posHeight=g_origH*factor
s.posLeft=(cltWidth-s.posWidth+padding)/2
s.posTop=(cltHeight-s.posHeight+padding)/2
if( g_scaleHyperlinks )
ScaleHyperlinks( factor )
}
function _InitAnimations()
{
alert("_InitAnimations()");
alert("Document.body.localTime (_InitAnimations) :"+document.body.localTime);
animRuntimeInstalled = ''+document.body.localTime != 'undefined';
isFullScreen = (window.name == "PPTSld") && !parent.IsFramesMode();
g_animUseRuntime = g_showAnimation && animRuntimeInstalled && !(isFullScreen && parent.IsSldVisited());
if( g_animUseRuntime ) {
collSeq = document.all.tags("seq");
if( collSeq != null ) {
for(ii=0;ii<collSeq.length;ii++) {
if( collSeq[ii].getAttribute( "p:nodeType" ) == "mainSeq" ) {
g_animMainSequence = collSeq[ii];
break;
}
}
}
if( g_animItemsToHide && document.body.playAnimations != false ) {
for(jj = 0; jj < g_animItemsToHide.length; jj++) {
if( hideObj = GetObj(g_animItemsToHide[jj]) )
hideObj.runtimeStyle.visibility="hidden";
}
}
if( g_animInteractiveItems ){
for(jj = 0; jj < g_animInteractiveItems.length; jj++) {
if( triggerObj = GetObj(g_animInteractiveItems[jj]) )
triggerObj.runtimeStyle.cursor="hand";
}
}
if( gUseSldTimings && ''+g_animSlideTime != 'undefined' ) {
adjustedTime = document.body.calculateAutoAdvanceTimes( g_animSlideTime, g_animEffectTimings );
if( IsWin("PPTSld") && adjustedTime != g_animSlideTime ) {
var sld = GetCurSld();
sld.mAdvDelay = adjustedTime * 1000;
}
}
}
return g_animUseRuntime;
}
gSldJump = 0, gSldJumpTrack = 0, gSldJumpIdx = "";
function _KPH()
{
alert("_KPH()");
if( IsNts() ) return;
if( !parent.IsFramesMode() && event.keyCode == 27 && !HideMenu() )
parent.window.close( self );
else if( event.keyCode == 32 ) {
if( window.name == "PPTSld" )
parent.PPTSld.DocumentOnClick();
else
parent.GoToNextSld();
}
CatchNumKeys( parent, event );
}
function CatchNumKeys( win, event ) {
alert("CatchNumKeys()");
if( win.IsFullScrMode() && (48<=event.keyCode) && (event.keyCode<=57) ) {
gSldJump = 1;
gSldJumpIdx += (event.keyCode-48).toString();
}
if( win.IsFullScrMode() && gSldJump && event.keyCode == 13 ) {
var numSlds = parent.GetSldList().mList.length
if ( gSldJumpIdx > numSlds )
gSldJumpIdx = numSlds;
if ( gSldJumpIdx >= 0 ) {
if ( gSldJumpIdx == 0 )
gSldJumpIdx = 1;
var jumpTo = parseInt(gSldJumpIdx);
gSldJump = 0; gSldJumpIdx = "";
win.GoToSld( parent.GetSldList().mList[jumpTo-1].mSldHref )
}
}
}
function _KDH()
{
alert("_KDH()");
if( event.keyCode == 8 ) {
event.returnValue = 0;
parent.GoToPrevSld();
}
}
function DocumentOnClick()
{
alert("DocumentOnClick()");
if( IsNts() || parent.HideMenu() ) return;
if( ( g_allowAdvOnClick && !parent.IsFramesMode() ) ||
(event && (event.keyCode==32) ) )
parent.GoToNextSld();
}
var g_supportsPPTHTML = SupportsPPTHTML(), g_scaleInFrame = 1, gId="", g_bgSound="",
g_scaleHyperlinks = false, g_allowAdvOnClick = 1, g_showInBrowser = 1, gLoopCont = 0, gUseSldTimings = 1;
var g_showAnimation = g_supportsPPTHTML && SupportsPPTAnimation() && ( (window.name=="PPTSld" && !parent.IsFramesMode()) || g_showInBrowser );var g_animManager = null;
var g_animUseRuntime = false;
var g_animItemsToHide, g_animInteractiveItems, g_animSlideTime;
var g_animMainSequence = null;
var ENDSHOW_MESG="Fin du diaporama, cliquez pour quitter.", SCREEN_MODE="Frames", gIsEndShow=0, NUM_VIS_SLDS=78, SCRIPT_HREF="script.js", FULLSCR_HREF="fullscreen.htm";
var gCurSld = gPrevSld = 1, g_offset = 0, gNtsOpen = gHasNts = gOtlTxtExp = 0, gHasNarration = 0, gOtlOpen = true
window.gPPTHTML=SupportsPPTHTML()
var gMainDoc=new Array(new hrefList("slide0012.htm",1,-1,1),new hrefList("slide0032.htm",1,-1,1),new hrefList("slide0033.htm",1,-1,1),new hrefList("slide0034.htm",1,-1,1),new hrefList("slide0011.htm",1,-1,1),new hrefList("slide0017.htm",1,-1,1),new hrefList("slide0028.htm",1,-1,1),new hrefList("slide0029.htm",1,-1,1),new hrefList("slide0035.htm",1,-1,1),new hrefList("slide0031.htm",1,-1,1),new hrefList("slide0015.htm",1,-1,1),new hrefList("slide0013.htm",1,-1,1),new hrefList("slide0014.htm",1,-1,1),new hrefList("slide0016.htm",1,-1,1),new hrefList("slide0036.htm",1,-1,1),new hrefList("slide0018.htm",1,-1,1),new hrefList("slide0025.htm",1,-1,1),new hrefList("slide0047.htm",1,-1,1),new hrefList("slide0048.htm",1,-1,1),new hrefList("slide0044.htm",1,-1,1),new hrefList("slide0046.htm",1,-1,1),new hrefList("slide0040.htm",1,-1,1),new hrefList("slide0043.htm",1,-1,1),new hrefList("slide0027.htm",1,-1,1),new hrefList("slide0026.htm",1,-1,1),new hrefList("slide0049.htm",1,-1,1),new hrefList("slide0051.htm",1,-1,1),new hrefList("slide0037.htm",1,-1,1),new hrefList("slide0020.htm",1,-1,1),new hrefList("slide0052.htm",1,-1,1),new hrefList("slide0115.htm",1,-1,1),new hrefList("slide0100.htm",1,-1,1),new hrefList("slide0079.htm",1,-1,1),new hrefList("slide0062.htm",1,-1,1),new hrefList("slide0054.htm",1,-1,1),new hrefList("slide0053.htm",1,-1,1),new hrefList("slide0055.htm",1,-1,1),new hrefList("slide0058.htm",1,-1,1),new hrefList("slide0096.htm",1,-1,1),new hrefList("slide0080.htm",1,-1,1),new hrefList("slide0064.htm",1,-1,1),new hrefList("slide0059.htm",1,-1,1),new hrefList("slide0066.htm",1,-1,1),new hrefList("slide0063.htm",1,-1,1),new hrefList("slide0078.htm",1,-1,1),new hrefList("slide0061.htm",1,-1,1),new hrefList("slide0073.htm",1,-1,1),new hrefList("slide0060.htm",1,-1,1),new hrefList("slide0067.htm",1,-1,1),new hrefList("slide0038.htm",1,-1,1),new hrefList("slide0021.htm",1,-1,1),new hrefList("slide0098.htm",1,-1,1),new hrefList("slide0114.htm",1,-1,1),new hrefList("slide0101.htm",1,-1,1),new hrefList("slide0085.htm",1,-1,1),new hrefList("slide0086.htm",1,-1,1),new hrefList("slide0087.htm",1,-1,1),new hrefList("slide0088.htm",1,-1,1),new hrefList("slide0089.htm",1,-1,1),new hrefList("slide0097.htm",1,-1,1),new hrefList("slide0090.htm",1,-1,1),new hrefList("slide0091.htm",1,-1,1),new hrefList("slide0107.htm",1,-1,1),new hrefList("slide0092.htm",1,-1,1),new hrefList("slide0093.htm",1,-1,1),new hrefList("slide0094.htm",1,-1,1),new hrefList("slide0095.htm",1,-1,1),new hrefList("slide0074.htm",1,-1,1),new hrefList("slide0075.htm",1,-1,1),new hrefList("slide0113.htm",1,-1,1),new hrefList("slide0039.htm",1,-1,1),new hrefList("slide0022.htm",1,-1,1),new hrefList("slide0108.htm",1,-1,1),new hrefList("slide0110.htm",1,-1,1),new hrefList("slide0109.htm",1,-1,1),new hrefList("slide0111.htm",1,-1,1),new hrefList("slide0112.htm",1,-1,1),new hrefList("slide0004.htm",1,-1,1));
function FullScrInit()
{
alert("FullScrInit()");
g_allowAdvOnClick = GetCurSld().mAdvOnClk
document.body.style.backgroundColor="black"
document.oncontextmenu=parent._CM;
document.onkeydown = _KDH;
document.ondragstart=Cancel
document.onselectstart=Cancel
self.focus()
}
function Redirect( frmId )
{
var str=document.location.hash,idx=str.indexOf('#'), sId=GetSldId()
if(idx>=0) str=str.substr(1);
if( window.name != frmId && ( sId != str) ) {
obj = GetObj("Main-File")
window.location.href=obj.href+"#"+sId
return 1
}
return 0
}
var MHTMLPrefix = CalculateMHTMLPrefix();
function CalculateMHTMLPrefix()
{
// alert("CalculateMHTMLPrefix()");
// alert("document.location.protocol:"+document.location.protocol);
if ( document.location.protocol == 'mhtml:') {
href=new String(document.location.href)
Start=href.indexOf('!')+1
End=href.lastIndexOf('/')+1
if (End < Start)
return href.substring(0, Start)
else
return href.substring(0, End)
}
return '';
}
function GetTags(base,tag)
{
if(g_supportsPPTHTML) return base.all.tags(tag);
else return base.getElementsByTagName(tag);
}
function UpdNtsPane(){ alert("UpdNtsPane()");if(frames["PPTNts"]) PPTNts.location.replace( MHTMLPrefix+GetHrefObj( gCurSld ).mNtsHref ) }
function UpdNavPane( sldIndex ){ alert("UpdNavPane()");if(gNavLoaded) PPTNav.UpdNav() }
function UpdOtNavPane(){ alert("UpdOtNavPane()");if(gOtlNavLoaded) PPTOtlNav.UpdOtlNav() }
function UpdOtlPane(){ alert("UpdOtlPane()");if(gOtlLoaded) PPTOtl.UpdOtl() }
function SetHasNts( fVal )
{
alert("SetHasNts()");
if( gHasNts != fVal ) {
gHasNts=fVal
UpdNavPane()
}
}
function ToggleOtlText()
{
alert("ToggleOtlText()");
gOtlTxtExp=!gOtlTxtExp
UpdOtlPane()
}
function ClearMedia()
{
alert("ClearMedia()");
if (PPTSld.pptSound) PPTSld.pptSound.loop = 0;
}
function FullScreen()
{
alert("FullScreen()");
if ( PPTSld.g_animUseRuntime )
PPTSld.document.body.pause();
ClearMedia();
var href = ( document.location.protocol == 'mhtml:') ? FULLSCR_HREF : FULLSCR_HREF+"#"+GetHrefObj(gCurSld).mSldHref;
if(PPTNav.event.ctrlKey) {
var w = (window.screen.availWidth * 1.0) / 2.0
var h = w * (PPTSld.g_origH * 1.0) / PPTSld.g_origW
win = window.open( MHTMLPrefix+href,null,"toolbar=0,resizable=1,top=0,left=0," + "width="+ w + ",height=" + h );
if( win.document.body && PPTSld.g_animUseRuntime )
win.document.body.PPTSldFrameset=window;
}
else
{
win = window.open( MHTMLPrefix+href,null,"fullscreen=yes" );
if( win.document.body && PPTSld.g_animUseRuntime )
win.document.body.PPTSldFrameset=window;
}
}
function ToggleVNarration()
{
alert("ToggleVNarration()");
rObj=PPTSld.document.all("NSPlay")
if( rObj && !PPTSld.g_animUseRuntime ) {
if( (rObj.playState == 1)||(rObj.playState == 0) )
rObj.Play()
else if( rObj.playState == 2 )
rObj.Pause()
else
return;
}
else if( PPTSld.g_animUseRuntime )
{
narObj = PPTSld.document.all("narrationID")
if( narObj )
narObj.togglePause()
}
}
function GetCurSldNum()
{
alert("GetCurSldNum()");
obj=GetHrefObj(gCurSld)
if( obj.mOrigVis == 1 )
return obj.mSldIdx
else
return gCurSld
}
function GetNumSlds()
{
alert("GetNumSld()");
if( GetHrefObj(gCurSld).mOrigVis == 1 )
return GetSldList().mNumVisSlds;
else
return GetSldList().mList.length
}
function GetSldNum( href )
{
alert("GetSldNum()");
for(ii=0; ii<GetSldList().mList.length; ii++) {
if ( GetSldList().mList[ii].mSldHref == href )
return ii+1
}
return 1
}
function GetHrefObj( sldIdx ){ alert("GetHrefObj()");return GetSldList().mList[sldIdx-1] }
function IsFramesMode(){ alert("IsFramesMode()");return ( SCREEN_MODE == "Frames" ) }
function IsFullScrMode(){ alert("IsFullScrMode()");return ( SCREEN_MODE == "FullScreen" ) }
function GoToNextSld()
{
alert("GoToNextSld()");
ii=gCurSld + 1
if( GetHrefObj( ii-1 ).mOrigVis == 0 ) {
if( ii<=GetSldList().mList.length ) {
obj=GetHrefObj(ii)
obj.mVis=1
GoToSldNum(ii)
return
}
}
else {
obj=GetHrefObj( ii )
while ( obj && ( obj.mOrigVis == 0 ) )
obj=GetHrefObj(++ii)
if( obj && obj.mOrigVis ) {
GoToSldNum(ii)
return
}
}
if( gSldStack.length > 1 )
PopSldList();
else if( !IsFramesMode() ) {
if( gLoopCont )
GoToFirst()
else
EndShow()
}
}
function GoToPrevSld()
{
alert("GoToPrevSld()");
ii=gCurSld-1
if( ii > 0 ) {
obj=GetHrefObj(ii)
while ( obj && ( obj.mVis == 0 ) && ( ii>0 ) )
obj=GetHrefObj(--ii)
if( ii == 0 ) ii=1
GoToSldNum(ii)
}
}
function GoToFirst(){ alert("GoToFirst()");GoToSld( GetHrefObj(1).mSldHref ) }
function GoToLast()
{
alert("GoToLast()");
ii=GetSldList().mList.length
if( ii != gCurSld )
GoToSld( GetHrefObj(ii).mSldHref )
}
function GoToSldNum( num )
{
alert("GoToSldNum()");
if( PPTSld.event ) PPTSld.event.cancelBubble=true
obj = GetHrefObj( num )
obj.mVis=1
gPrevSld=gCurSld
gCurSld = num;
PPTSld.location.replace(MHTMLPrefix+obj.mSldHref)
if( IsFramesMode() ) {
UpdNavPane(); UpdOtlPane(); UpdNtsPane()
}
}
function GoToSld( href )
{
alert("GoToSld()");
if( PPTSld.event ) PPTSld.event.cancelBubble=true
GetHrefObj( GetSldNum(href) ).mVis=1
PPTSld.location.replace(MHTMLPrefix+href)
}
function SldUpdated( id )
{
alert("SldUpdated()");
if( id == GetHrefObj(gCurSld).mSldHref ) return
gPrevSld=gCurSld
gCurSld=GetSldNum(id)
if( IsFramesMode() ) {
UpdNavPane(); UpdOtlPane(); UpdNtsPane()
}
}
function PrevSldViewed(){ alert("PrevSldViewed()");GoToSld( GetHrefObj(gPrevSld).mSldHref ) }
function HasPrevSld() { alert("HasPrevSld()");return ( gIsEndShow || ( gCurSld != 1 && GetHrefObj( gCurSld-1 ).mVis == 1 )||( GetCurSldNum() > 1 ) ) }
function HasNextSld() { alert("HasNextSld()");return (GetCurSldNum() != GetNumSlds()) }
function CloseWindow() {
alert("CloseWindow()");
if( HideMenu() ) return;
var event = PPTSld.event;
if( !IsFramesMode() && event && (event.keyCode==27 || event.keyCode==32 || event.type=="click" ) )
window.close( self );
CatchNumKeys( self, event );
}
function Unload() { alert("Unload()");gIsEndShow=0; }
function SetupEndShow() {
alert("SetupEndShow()");
gIsEndShow=1;
PPTSld.document.body.scroll="no";
PPTSld.document.onkeypress=CloseWindow;
PPTSld.document.onclick=CloseWindow;
PPTSld.document.oncontextmenu=_CM;
}
function EndShow()
{
alert("EndShow()");
if( IsFramesMode() ) return
if( PPTSld.event ) PPTSld.event.cancelBubble=true
doc=PPTSld.document
var dir = doc.body.dir
if( dir != "rtl" ) dir = "ltr";
doc.open()
doc.writeln('<html><body dir=' + dir + ' bgcolor=black onload=parent.SetupEndShow() onunload=parent.Unload()><center><p><font face=Tahoma color=white size=2><br><b>' + ENDSHOW_MESG + '</b></font></p></center></body></html>')
doc.close()
}
function SetSldVisited(){ alert("SetSldVisited()");GetSldList().mList[gCurSld-1].mVisited=true }
function IsSldVisited(){ alert("IsSldVisited()");return GetSldList().mList[gCurSld-1].mVisited }
function hrefList( sldHref, visible, advDelay, advClk )
{
this.mSldHref= this.mNtsHref = sldHref
this.mOrigVis= this.mVis = visible
this.mVisited= false
this.mAdvDelay= advDelay
this.mAdvOnClk= advClk
}
function SldList(arr,curSld,fEnd)
{
this.mCurSld = curSld;
this.mList = new Array();
var idx = 1;
for(ii=0;ii<arr.length;ii++) {
this.mList[ii] = new hrefList( arr[ii].mSldHref, arr[ii].mOrigVis, arr[ii].mAdvDelay, arr[ii].mAdvOnClk );
if( arr[ii].mOrigVis )
this.mList[ii].mSldIdx = idx++;
}
this.mNumVisSlds = idx-1;
this.fEndShow = fEnd;
}
function GetSldList() {return gSldStack[gSldStack.length-1] }
function GetCurSld() { alert("GetCurSld()");return parent.GetSldList().mList[parent.gCurSld - 1] }
gSldStack = new Array();
gSldStack[0] = new SldList(gMainDoc,gCurSld,1)
function ToggleOtlPane()
{
alert("ToggleOtlPane()");
frmset=document.all("PPTHorizAdjust")
frm=document.all("PPTOtl")
if( gOtlOpen )
frmset.cols="*,100%"
else
frmset.cols="25%,*"
gOtlOpen=!gOtlOpen
frm.noResize=!frm.noResize
UpdOtNavPane()
}
function ToggleNtsPane()
{
alert("ToggleNtsPane()");
frmset=document.all("PPTVertAdjust")
frm=document.all("PPTNts")
if( gNtsOpen )
frmset.rows="100%,*"
else
frmset.rows="*,20%"
gNtsOpen=!gNtsOpen
UpdNtsPane()
}
function ViewCustomShow(idx,fEnd)
{
alert("ViewCustomShow()");
if( !IsFullScrMode() ) return;
var sldList = new Array();
var custShow = custShowList[idx-1];
var jj = 0;
for( ii=0;ii<custShow.length;ii++ ) {
if( custShow[ii] <= gMainDoc.length )
sldList[jj++] = gMainDoc[custShow[ii]-1];
}
if (sldList.length > 0) {
PushSldList(sldList,fEnd);
gCurSld = 1;
}
else
if( PPTSld.event ) PPTSld.event.cancelBubble=true
}
function PushSldList(arr,fEnd) {
alert("PushSldList()");
var ii = gSldStack.length;
gSldStack[ii] = new SldList(arr,gCurSld,fEnd);
GoToSld( gSldStack[ii].mList[0].mSldHref );
}
function PopSldList() {
alert("PopSldList()");
if (gSldStack[gSldStack.length-1].fEndShow)
EndShow()
else {
gCurSld = gSldStack[gSldStack.length-1].mCurSld;
gSldStack[gSldStack.length-1] = null;
gSldStack.length--;
var sldList = gSldStack[gSldStack.length-1];
GoToSld( sldList.mList[gCurSld - 1].mSldHref );
}
}
var custShowList=new Array();
function ImgBtn( oId,bId,w,action )
{
var t=this
t.Perform = _IBP
t.SetActive = _IBSetA
t.SetInactive= _IBSetI
t.SetPressed = _IBSetP
t.SetDisabled= _IBSetD
t.Enabled = _IBSetE
t.ChangeIcon = null
t.UserAction = action
t.ChgState = _IBUI
t.mObjId = oId
t.mBorderId= bId
t.mWidth = w
t.mIsOn = t.mCurState = 0
}
function _IBSetA()
{
alert("_IBSetA()");
if( this.mIsOn ) {
obj=this.ChgState( gHiliteClr,gShadowClr,2 )
obj.style.posTop=0
}
}
function _IBSetI()
{
alert("_IBSetI()");
if( this.mIsOn ) {
obj=this.ChgState( gFaceClr,gFaceClr,1 )
obj.style.posTop=0
}
}
function _IBSetP()
{
alert("_IBSetP()");
if( this.mIsOn ) {
obj=this.ChgState( gShadowClr,gHiliteClr,2 )
obj.style.posLeft+=1; obj.style.posTop+=1
}
}
function _IBSetD()
{
alert("_IBSetD()");
obj=this.ChgState( gFaceClr,gFaceClr,0 )
obj.style.posTop=0
}
function _IBSetE( state )
{
alert("_IBSetE()");
var t=this
GetObj( t.mBorderId ).style.visibility="visible"
if( state != t.mIsOn ) {
t.mIsOn=state
if( state )
t.SetInactive()
else
t.SetDisabled()
}
}
function _IBP()
{
alert("_IBP()");
var t=this
if( t.mIsOn ) {
if( t.UserAction != null )
t.UserAction()
if( t.ChangeIcon ) {
obj=GetObj(t.mObjId)
if( t.ChangeIcon() )
obj.style.posLeft=obj.style.posLeft+(t.mCurState-4)*t.mWidth
else
obj.style.posLeft=obj.style.posLeft+(t.mCurState-0)*t.mWidth
}
t.SetActive()
}
}
function _IBUI( clr1,clr2,nextState )
{
alert("_IBUI()");
var t=this
SetBorder( GetObj( t.mBorderId ),clr1,clr2 )
obj=GetObj( t.mObjId )
obj.style.posLeft=obj.style.posLeft+(t.mCurState-nextState)*t.mWidth-obj.style.posTop
t.mCurState=nextState
return obj
}
function TxtBtn( oId,oeId,action,chkState )
{
var t=this
t.Perform = _TBP
t.SetActive = _TBSetA
t.SetInactive= _TBSetI
t.SetPressed = _TBSetP
t.SetDisabled= _TBSetD
t.SetEnabled = _TBSetE
t.GetState = chkState
t.UserAction = action
t.ChgState = _TBUI
t.mObjId = oId
t.m_elementsId= oeId
t.mIsOn = 1
}
function _TBSetA()
{
alert("_TBSetA()");
var t=this
if( t.mIsOn && !t.GetState() )
t.ChgState( gHiliteClr,gShadowClr,0,0 )
}
function _TBSetI()
{
alert("_TBSetI()");
var t=this
if( t.mIsOn && !t.GetState() )
t.ChgState( gFaceClr,gFaceClr,0,0 )
}
function _TBSetP()
{
alert("_TBSetP()");
if( this.mIsOn )
this.ChgState( gShadowClr,gHiliteClr,1,1 )
}
function _TBSetD()
{
alert("_TBSetD()");
this.ChgState( gFaceClr,gFaceClr,0,0 )
this.mIsOn = 0
}
function _TBSetE()
{
alert("_TBSetE()");
var t=this
if( !t.GetState() )
t.ChgState( gFaceClr,gFaceClr,0,0 )
else
t.ChgState( gShadowClr,gHiliteClr,1,1 )
t.mIsOn = 1
}
function _TBP()
{
alert("_TBP()");
var t=this
if( t.mIsOn ) {
if( t.UserAction != null )
t.UserAction()
if( !t.GetState )
return
if( t.GetState() )
t.SetPressed()
else
t.SetActive()
}
}
function _TBUI( clr1,clr2,lOffset,tOffset )
{
alert("_TBUI()");
SetBorder( GetObj( this.mObjId ),clr1,clr2 )
Offset( GetObj( this.m_elementsId ),lOffset,tOffset )
}
function Offset( obj, top, left ){ alert("Offset()");obj.style.top=top; obj.style.left=left }
function SetBorder( obj, upperLeft, lowerRight )
{
alert("SetBorder()");
s=obj.style;
s.borderStyle = "solid"
s.borderWidth = 1
s.borderLeftColor = s.borderTopColor = upperLeft
s.borderBottomColor= s.borderRightColor = lowerRight
}
function GetBtnObj(){ alert("GetBtnObj()");return gBtnArr[window.event.srcElement.id] }
function BtnOnOver(){ alert("BtnOnOver()");b=GetBtnObj(); if( b != null ) b.SetActive() }
function BtnOnDown(){ alert("BtnOnDown()");b=GetBtnObj(); if( b != null ) b.SetPressed() }
function BtnOnOut(){ alert("BtnOnOut()");b=GetBtnObj(); if( b != null ) b.SetInactive() }
function BtnOnUp()
{
alert("BtnOnUp()");
b=GetBtnObj()
if( b != null )
b.Perform()
else
Upd()
}
function GetNtsState(){alert("GetNtsState()"); return parent.gNtsOpen }
function GetOtlState(){ alert("GetOldState()");return parent.gOtlOpen }
function GetOtlTxtState(){alert("GetOldTxtState()"); return parent.gOtlTxtExp }
function NtsBtnSetFlag( fVal )
{
alert("NtsBtnSetFlag()");
s=document.all.item( this.m_flagId ).style
s.display="none"
if( fVal )
s.display=""
else
s.display="none"
}
function _BSetA_Border(){ alert("_BSetA_Border()");b = gBtnArr[this.mObjId]; if( b != null ) b.SetActive() }
function _BSetI_Border(){ alert("_BSetI_Border()");b = gBtnArr[this.mObjId]; if( b != null ) b.SetInactive() }
function _BSetP_Border(){ alert("_BSetP_Border()");b = gBtnArr[this.mObjId]; if( b != null ) b.SetPressed() }
function _BSetA_BorderImg()
{
alert("_BSetA_BorderImg()");
b = gBtnArr[this.mBorderId]
if( b != null && this.mIsOn && !b.GetState() ) {
obj=this.ChgState( gHiliteClr,gShadowClr,2 )
obj.style.posTop=0
}
}
function _BSetI_BorderImg()
{
alert("_BSetI_BorderImg()");
b = gBtnArr[this.mBorderId]
if( b != null && this.mIsOn && !b.GetState() ) {
obj=this.ChgState( gFaceClr,gFaceClr,1 )
obj.style.posTop=0
}
}
var gHiliteClr="THREEDHIGHLIGHT",gShadowClr="THREEDSHADOW",gFaceClr="THREEDFACE"
var gBtnArr = new Array()
gBtnArr["nb_otl"] = new TxtBtn( "nb_otl","nb_otlElem",parent.ToggleOtlPane,GetOtlState )
gBtnArr["nb_otlElem"] = new TxtBtn( "nb_otl","nb_otlElem",parent.ToggleOtlPane,GetOtlState )
gBtnArr["nb_nts"] = new ImgBtn( "nb_nts","nb_ntsBorder",10,parent.ToggleNtsPane )
gBtnArr["nb_nts"].SetActive = _BSetA_BorderImg;
gBtnArr["nb_nts"].SetInactive = _BSetI_BorderImg;
gBtnArr["nb_ntsBorder"] = new TxtBtn( "nb_ntsBorder","nb_ntsElem",parent.ToggleNtsPane,GetNtsState )
gBtnArr["nb_ntsElem"] = new TxtBtn( "nb_ntsBorder","nb_ntsElem",parent.ToggleNtsPane,GetNtsState )
gBtnArr["nb_prevBorder"] = gBtnArr["nb_prev"]= new ImgBtn( "nb_prev","nb_prevBorder",30,parent.GoToPrevSld )
gBtnArr["nb_nextBorder"] = gBtnArr["nb_next"]= new ImgBtn( "nb_next","nb_nextBorder",30,parent.GoToNextSld )
gBtnArr["nb_sldshw"]= new ImgBtn( "nb_sldshw","nb_sldshwBorder",18,parent.FullScreen )
gBtnArr["nb_sldshwBorder"] = new TxtBtn( "nb_sldshw","nb_sldshwBorder",parent.FullScreen,null )
gBtnArr["nb_sldshwBorder"].SetActive = _BSetA_Border;
gBtnArr["nb_sldshwBorder"].SetInactive = _BSetI_Border;
gBtnArr["nb_sldshwText"] = new TxtBtn( "nb_sldshw","nb_sldshwText",parent.FullScreen,null )
gBtnArr["nb_sldshwText"].SetActive = _BSetA_Border;
gBtnArr["nb_sldshwText"].SetInactive = _BSetI_Border;
gBtnArr["nb_voice"] = gBtnArr["nb_voiceBorder"] = new ImgBtn( "nb_voice","nb_voiceBorder",18,parent.ToggleVNarration )
gBtnArr["nb_otlTxtBorder"] = gBtnArr["nb_otlTxt"]= new ImgBtn( "nb_otlTxt","nb_otlTxtBorder",23,parent.ToggleOtlText )
gBtnArr["nb_ntsBorder"].m_flagId= "nb_nts"
gBtnArr["nb_ntsBorder"].SetFlag = NtsBtnSetFlag
gBtnArr["nb_otlTxt"].ChangeIcon= GetOtlTxtState
var sNext="Suivant",sPrev="Précédent",sEnd="Arrêter le diaporama",sFont="Arial",sArrow="Flèche",sFreeform="Forme libre",sRect="Rectangle",sOval="Ovale"
function ShowMenu()
{
alert("ShowMenu()");
BuildMenu();
var doc=PPTSld.document.body,x=PPTSld.event.clientX+doc.scrollLeft,y=PPTSld.event.clientY+doc.scrollTop
m = PPTSld.document.all.item("ctxtmenu")
m.style.pixelLeft=x
if( (x+m.scrollWidth > doc.clientWidth)&&(x-m.scrollWidth > 0) )
m.style.pixelLeft=x-m.scrollWidth
m.style.pixelTop=y
if( (y+m.scrollHeight > doc.clientHeight)&&(y-m.scrollHeight > 0) )
m.style.pixelTop=y-m.scrollHeight
m.style.display=""
}
function _CM()
{
alert("_CM()");
if( !parent.IsFullScrMode() ) return;
if(!PPTSld.event.ctrlKey) {
ShowMenu()
return false
} else
HideMenu()
}
function BuildMenu()
{
alert("BuilMenu()");
if( PPTSld.document.all.item("ctxtmenu") ) return
var mObj=CreateItem( PPTSld.document.body )
mObj.id="ctxtmenu"
mObj.style.visibility="hidden"
var s=mObj.style
s.position="absolute"
s.cursor="default"
s.width="120px"
SetCMBorder(mObj,"menu","black")
var iObj=CreateItem( mObj )
SetCMBorder( iObj, "threedhighlight","threedshadow" )
iObj.style.padding=2
CreateMenuItem( iObj,sNext,M_GoNextSld,M_True )
CreateMenuItem( iObj,sPrev,M_GoPrevSld,M_HasPrevSld )
CreateSeparator( iObj )
CreateMenuItem( iObj,sEnd,M_End,M_True )
mObj.style.visibility="visible"
}
function Cancel() { alert("Cancel()");window.event.cancelBubble=true; window.event.returnValue=false }
function Highlight() { alert("Highlight()");ChangeClr("activecaption","threedhighlight") }
function Deselect() { alert("Deselect()");ChangeClr("threedface","menutext") }
function Perform()
{
alert("Perfom()");
e=PPTSld.event.srcElement
if( e.type=="menuitem" && e.IsActive() )
e.Action()
else
PPTSld.event.cancelBubble=true
}
function ChangeClr( bg,clr )
{
alert("ChangeClr()");
e=PPTSld.event.srcElement
if( e.type=="menuitem" && e.IsActive() ) {
e.style.backgroundColor=bg
e.style.color=clr
}
}
function M_HasPrevSld() { alert("M_HasPrevSld()");return( parent.HasPrevSld() ) }
function M_GoNextSld() { alert("M_GoNextSld()");if( gIsEndShow ) M_End(); else GoToNextSld() }
function M_GoPrevSld() { alert("M_GoPrevSld()");if( gIsEndShow ) { gIsEndShow=0; history.back(); PPTSld.event.cancelBubble=true; } else GoToPrevSld() }
function M_True() { alert("M_True()");return true }
function M_End() { alert("M_End()");window.close( self ) }
function CreateMenuItem( node,text,action,eval )
{
alert("CreateMenuItem()");
var e=CreateItem( node )
e.type="menuitem"
e.Action=action
e.IsActive=eval
e.innerHTML=text
if( !e.IsActive() )
e.style.color="threedshadow"
e.onclick=Perform
e.onmouseover=Highlight
e.onmouseout=Deselect
s=e.style;
s.fontFamily=sFont
s.fontSize="9pt"
s.paddingLeft=2
}
function CreateSeparator( node )
{
alert("CreateSeparator()");
var sObj=CreateItem( node )
SetCMBorder(sObj,"menu","menu")
var s=sObj.style
s.borderTopColor="threedshadow"
s.borderBottomColor="threedhighlight"
s.height=1
s.fontSize="0px"
}
function CreateItem( node )
{
alert("CreateItem()");
var elem=PPTSld.document.createElement("DIV")
node.insertBefore( elem )
return elem
}
function SetCMBorder( o,ltClr,rbClr )
{
alert("SetCmBorder()");
var s=o.style
s.backgroundColor="menu"
s.borderStyle="solid"
s.borderWidth=1
s.borderColor=ltClr+" "+rbClr+" "+rbClr+" "+ltClr
}
Si vous avez besoin d'autres fichiers ou autre n'hésitez pas à me le dire ! (Je suis désolé du code, j'ai essayé de l'arranger comme je pouvais mais il est pas très propre, c'est du code repris...).
Je vous remercie pour votre aide ! :)
Afficher la suite
25 août 2015 à 16:16
C'est juste que bizarrement, le code s'affiche bien sous IE 5.