2010-01-28 09:32:35 +00:00

264 lines
10 KiB
JavaScript

//<script language="Javascript">
function MM_setTextOfLayer(objName,x,newText) { //v3.0
if ((obj=MM_findObj(objName))!=null) with (obj)
if ((navigator.appName=='Netscape') && (parseInt(navigator.appVersion)<=4)) {document.write(unescape(newText)); document.close();}
else innerHTML = unescape(newText);
}
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr;
for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document;
if(d.images) { if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length;
for(i=0; i<arguments.length; i++)
if (arguments[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=arguments[i];}}
}
function MM_findObj(n, d) { //v3.0
var p,i,x;
if(!d) d=document;
if((p=n.indexOf("?"))>0&&parent.frames.length) {d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if (parseInt(navigator.appVersion)<=4)
{if(!(x=d[n])&&d.all) x=d.all[n];}
else
{x=d.getElementById(n);}
for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x;
document.MM_sr=new Array;
for(i=0;i<(arguments.length-2);i+=3)
if ((x=MM_findObj(arguments[i]))!=null)
if(x.src.indexOf('_in.gif')==-1) {
document.MM_sr[j++]=x;
if(!x.oSrc) x.oSrc=x.src;
x.src=arguments[i+2];
}
}
function MM_showHideLayers() { //v3.0
// param1 = nom du champs contenant l'identifiant (menu contextuel)
// param2 = variable array contenant l'ensemble des layers concerné (ceux des menus, des erreurs )
// param(s) suivant = les layers que l'on souhaite faire apparaître
var i,obj;
for (i=0; i<arguments[1].length;i++) if ((obj=MM_findObj(arguments[1][i]))!=null) {
if (obj.style) {obj.style.visibility='hidden';} else {obj.visibility='hide';}
}
for (i=2; i<arguments.length; i++) if ((obj=MM_findObj(arguments[i]))!=null) {
UpdateMenuItems(arguments[i],arguments[0]);
if (obj.style) {obj.style.visibility='visible';} else {obj.visibility='show';}
}
}
// fonction qui implémente le menu contextuel en fonction de la balise input spécifiée
function UpdateMenuItems(sMenu,sInput) {
var i, sMod, sImgName, iBDFType, objHTML, sId;
objHTML = MM_findObj(sInput);
if (objHTML!=null && (sMenu=='D'||sMenu=='AG'||sMenu=='E'||sMenu=='IB'||sMenu=='DF'||sMenu=='AR')) {
sId = objHTML.value;
if (sId=='') sId = '' + window.sBDFId;
iBDFType = iCheckIdentifiant(sId);
for (i=0;i<arMenuItems[sMenu].length;i++) {
sMod = arMenuItems[sMenu][i];
sImgName = 'MenuItem' + sMod + sMenu;
objHTML = MM_findObj(sImgName);
if ((iBDFType==cstNothing) || ((iBDFType==cstBDFKey) && (cstValidModuleList4BDFKeys.indexOf(sMod)==-1))) {
objHTML.src = cstRoot + '/Images/Menu/' + sMod + '_' + sMenu + '_in.gif';
}
else {
objHTML.src = cstRoot + '/Images/Menu/' + sMod + '_' + sMenu + '_off.gif';
}
}
}
}
// Fonction permettant de générer l'URL pour les intérogations d'informations pour les modules
// Dans le cas d'une confirmation multiple, sModule prend la forme "27|28|29|"
function requestBDFInfos(sModule, sClientRef, sFamily, sBDFId, iConfirmType,bIsFromChildWindow,objLink, sCib, sCogui)
{
var sURL='';
// On initialise les variables avec les valeurs de la page en cours si elles ne sont pas renseignées
if (sModule=='') sModule = ''+window.sModule;
if (sClientRef=='') sClientRef = ''+window.sClientRef;
if (sFamily=='') sFamily = ''+window.sFamily;
if (sBDFId=='') sBDFId = ''+window.sBDFId;
sURL = '?Mod=' + ToQueryString(sModule) + '&Id=' + ToQueryString(sBDFId) + '&RefClient=' + ToQueryString(sClientRef) + '&Famille=' + ToQueryString(sFamily);
if (bIsFromChildWindow)
{
if (sModule=='07')
{
sURL = '?Mod=07&Denom=' + ToQueryString(sBDFId) + '&RefClient=' + ToQueryString(sClientRef);
}
sURL = cstRoot + '/Modules/Module.asp' + sURL;
window.opener.location.href = sURL;
}
else
{
switch (iConfirmType)
{
case cstSimpleConfirm :
sURL = cstRoot + '/confirm.asp' + sURL;
window.open(sURL,'confirmation','scrollbars=no,width=450,height=140,top=200,left=200,xscreen=200,yscreen=200');
break;
case cstMultipleConfirm :
sURL = cstRoot +'/generer.asp' + sURL;
window.open(sURL,'confirmation','scrollbars=no,width=400,height=165,top=200,left=200,xscreen=200,yscreen=200');
break;
}
}
}
// fonction effectuant la mise sous suivi lié au bouton !
function requestAlert(objLink) {
var sUrl = '/FIBEN/demandes/demandes.asp?type=ALERTE&ident=';
sUrl+= window.sBDFId + '&Refint=' + window.sClientRef;
objLink.href = sUrl;
}
// Fonction ouvrant la page d'explication des symboles d'une cotation
function requestVariousInfos(sVarious,iInfosType, sIdent) {
var sURL='';
switch (iInfosType) {
case cstCotation :
if (sVarious!='000' && sVarious!='040' && sVarious!='050' && sVarious!='060' && sVarious!='00')
{
sURL = '?Cotation=<cotation><CA>' + sVarious.charAt(0) + '</CA><CC>' + sVarious.slice(1) + '</CC></cotation>';
sURL=sURL.replace(/\+/g,"%2B")
//sURL = '?Cotation=<cotation><CA>' + sVarious.charAt(0) + '</CA><CC>' + sVarious.charAt(1) + '</CC><CP>' + sVarious.charAt(2) + '</CP></cotation>';
}
else
{
if (isNaN(sIdent.substring(6,7)))
sURL = '?Cotation=<cotation><CD>' + sVarious + '</CD></cotation>';
else
sURL = '?Cotation=<cotation><CE>' + sVarious + '</CE></cotation>';
}
sURL = cstRoot + '/Modules/Cotation.asp' + sURL;
window.open(sURL,'aide','resizable=yes,scrollbars=yes,width=680,height=300,top=200,left=10,xscreen=10,yscreen=200');
break;
case cstWording :
sURL = '?CODE=' + sVarious;
sURL = cstRoot + '/Modules/InfoLibelle.htm' + sURL;
window.open(sURL,'aide','scrollbars=no,width=400,height=140,top=200,left=200,xscreen=200,yscreen=200');
break;
}
}
// Fonction ouvrant une page statique dans une nouvelle occurence de fenêtre
// Pour le cas 'cstHelpModule', la reference correspond au numero de module
// Pour le cas 'cstHelpNavigation', la reference correspond à un numero de grille
function requestStatic(sAnchor, iPageType, sReference) {
var sURL='';
if (sAnchor!='') sURL = '#' + sAnchor;
switch (iPageType) {
case cstAdress :
sURL = cstRoot +'/Aide/succursales.htm' + sURL;
window.open(sURL,'succursales','scrollbars=yes,width=400,height=165,top=200,left=200,xscreen=200,yscreen=200');
break;
case cstHelp :
sURL = cstRoot +'/Aide/accueil.htm' + sURL;
window.open(sURL,'aide','location=yes,menubar=yes,toolbar=yes,resizable=yes,scrollbars=yes,width=700,height=500,top=200,left=100');
break;
case cstInformation :
sURL = cstRoot +'/Information/accueil.htm' + sURL;
window.open(sURL,'information','location=yes,menubar=yes,toolbar=yes,resizable=yes,scrollbars=yes,width=700,height=500,top=200,left=50,xscreen=50,yscreen=200');
break;
case cstFreeInformation :
sURL = cstRoot + sReference + sURL;
window.open(sURL,'information','location=yes,menubar=yes,toolbar=yes,resizable=yes,scrollbars=yes,width=700,height=500,top=200,left=50,xscreen=50,yscreen=200');
break;
case cstSite :
sURL = cstRoot +'/Aide/plan.htm' + sURL;
window.open(sURL,'plan','location=yes,menubar=yes,toolbar=yes,resizable=yes,scrollbars=yes,width=700,height=500,top=200,left=50,xscreen=50,yscreen=200');
break;
case cstContact :
sURL = cstRoot +'/Aide/contacts.htm' + sURL;
window.open(sURL,'contact','scrollbars=yes,width=490,height=355,top=200,left=200,xscreen=200,yscreen=200');
break;
case cstHelpModule :
sURL = cstRoot +'/Aide/Modules/M' + sReference + '/module.htm' + sURL;
window.open(sURL,'aide','location=yes,menubar=yes,toolbar=yes,resizable=yes,scrollbars=yes,width=700,height=500,top=200,left=50,xscreen=50,yscreen=200');
break;
case cstHelpNavigation :
sURL = cstRoot +'/Aide/Navigation/grille' + sReference + '.htm' + sURL;
window.open(sURL,'aide','location=yes,menubar=yes,toolbar=yes,resizable=yes,scrollbars=yes,width=700,height=500,top=200,left=50,xscreen=50,yscreen=200');
break;
case cstContrat :
sURL = cstRoot +'/Information/contrat.htm' + sURL;
window.open(sURL,'information','location=yes,menubar=yes,toolbar=yes,resizable=yes,scrollbars=yes,width=700,height=500,top=200,left=50,xscreen=50,yscreen=200');
break;
case cstSiteBDF :
sURL = 'http://www.banque-france.fr'
if (sReference!=null) sURL = sURL + sReference;
window.open(sURL,'site','location=yes,menubar=yes,toolbar=yes,resizable=yes,scrollbars=yes,width=700,height=500,top=100,left=50,xscreen=50,yscreen=100');
break;
case cstNumSuc :
sURL = cstRoot +'/Aide/succursales.htm' + sURL;
window.open(sURL,'succursales','scrollbars=yes,width=400,height=165,top=200,left=200,xscreen=200,yscreen=200');
break;
}
}
function moduleRequest(sModule, sFamily, sSource, objLink) {
var objHTML = MM_findObj('ident');
var sDirectInput = '' + objHTML.value;
var sRefInt = '';
if (sModule=='') {
if (sDirectInput.length>0) {
if (iCheckIdentifiant(sDirectInput)) {
if (window.sModule =='14') requestBDFInfos('18','','',sDirectInput,false,false,objLink)
else requestBDFInfos('','','',sDirectInput,false,false,objLink)
}
else {
requestBDFInfos('07','','',sDirectInput,cstSimpleConfirm);
}
}
}
else {
objHTML = MM_findObj(sSource);
if (objHTML.src.indexOf('_in.gif')==-1) {
objHTML = MM_findObj('txt_refint');
if (objHTML!=null) sRefInt=objHTML.value;
requestBDFInfos(sModule,sRefInt,sFamily,sDirectInput,false, false, objLink);
}
}
}
function vVoid() {return;}
MM_reloadPage(true);