var loaded=false; var ABS_PATH=this.location.href.substring(0,this.location.href.lastIndexOf('/'))+'/'; function Theme(themeId,name,path,polder1OnLineProductUrl) { window[name]=this;//déclare les variables de top portant le nom des thèmes this.themeId=themeId; this.name=name; this.path=path; this.polder1OnLineProductUrl=polder1OnLineProductUrl; } with (Theme) { prototype.getId=function() { return this.themeId; } prototype.getName=function() { return this.name; } prototype.getLabel=function() { return window.DICO[this.name]; } prototype.getUrl=function(url) { return this.path+url; } prototype.getPath=function() { return this.path; } prototype.getAbsPath=function() { return ABS_PATH+this.path; } prototype.getAbsUrl=function(url) { return this.getAbsPath()+url; } //loadHomePage charge la page d'accueil du thème, // mais ne devient pas le theme courant //c'est la page appelée qui sur le onLoad donne le focus au theme prototype.loadWelcomePage=function(){ frames[1].location.href=this.getUrl('supercontent.htm'); } prototype.loadOnLineProducts=function(){ top.frames[1].frames[0].location.href=(top.IS_INTER)?this.polder1OnLineProductUrl:"/online_products_pages/"+this.getName().toLowerCase()+"/index.htm"; } //takeFocus donne le focus au theme //le theme met à jour le menu et fournit les chemins d'url //takeFocus ne charge la page d'accueil du thème prototype.takeFocus=function(){ selectedTheme=this; if (loaded) { top.frames[0].updateMenu(this); } } } var Themes=[ new Theme(0,'Home',''), new Theme(1,'Level1','themes/level1/','http://smsc.cnes.fr/POLDER/SCIEPROD/geoparam.htm'), new Theme(2,'Ocean','themes/ocean/','http://smsc.cnes.fr/POLDER/SCIEPROD/oc9611.htm'), new Theme(3,'Land','themes/land/','http://smsc.cnes.fr/POLDER/SCIEPROD/ls9611.htm'), new Theme(4,'Aerosols','themes/aerosols/','http://smsc.cnes.fr/POLDER/SCIEPROD/ae9611.htm'), new Theme(5,'Clouds','themes/clouds/','http://smsc.cnes.fr/POLDER/SCIEPROD/rb9611.htm') ]; this.getSelectedTheme=function() { return selectedTheme; } this.getTheme=function(id) { return Themes[id]; } var selectedTheme=Themes[0];