source: ether_ndacc/trunk/web/resources/css/etherTypo.js @ 113

Last change on this file since 113 was 113, checked in by rboipsl, 13 years ago

Import du projet NDACC _ module web

File size: 6.8 KB
Line 
1//
2//
3var WCONF1b = 'scrollbars=yes,addressbar=no, toolbar=no,location=no,directories=no,' +
4              'status=no,menubar=no,resizable=no,width=550,height=290';
5
6var WCONF1 = 'scrollbars=yes,addressbar=no, toolbar=no,location=no,directories=no,' +
7'status=no,menubar=no,resizable=no,width=550,height=600';
8var WCONF2 = 'scrollbars=yes,toolbar=yes,location=no,directories=no,' +
9              'status=no,menubar=no,resizable=yes,width=600,height=700';
10var WCONF2b = 'scrollbars=yes,toolbar=yes,location=no,directories=no,' +
11'status=no,menubar=no,resizable=yes,width=600,height=800';
12
13//Parametres d'ouverture de fenetre secondaire pour les BDD (GEISA)
14var WCONF3 = 'scrollbars=yes,toolbar=yes,location=no,directories=yes,' +
15              'status=yes,menubar=yes,resizable=yes,width=850,height=750';
16
17var WCONF4 = 'scrollbars=yes,toolbar=yes,location=no,directories=yes,' +
18'status=yes,menubar=yes,resizable=yes,width=1000';
19
20var WCONF5 = 'scrollbars=yes,toolbar=no,location=no,directories=yes,' +
21'status=yes,menubar=yes,resizable=yes,width=1000';
22
23
24var NWIN1 = 'NWin1';
25var NWIN2 = 'NWin2';
26     
27
28
29 function url(param) {
30         var chaine=window.location.search;
31         chaine=chaine.substring(1);
32         var dz=chaine.indexOf("#",0);
33         if(dz!=-1) {
34         chaine=chaine.substring(0,dz);}
35         chaine=chaine+"&";
36         if(chaine.indexOf(param,0)!=-1){left=100,top=100
37         var pos=chaine.indexOf(param,0);
38         var pos2=chaine.indexOf("=",pos);
39         var pos3=chaine.indexOf("&",pos);
40         contenu=chaine.substring(pos2+1,pos3);}
41         return contenu
42} 
43
44// ouvrir une fenetre secondaire
45function OuvrirPage (Url) {
46       
47                var width  = 550;
48                var height = 600;
49                var top=(screen.height-height)/2;
50                var left=(screen.width-width)/2;
51                var params = WCONF1+', top='+top+', left='+left;
52        openW (Url, NWIN1, params);
53}
54
55
56//ouvrir une fenetre secondaire
57function OuvrirPageWD (page,Url) {
58        var width  = 500;
59         var height = 290;
60
61                var left   = (screen.width  - width)/2;
62                var top    = (screen.height - height)/2;
63                var params = WCONF1b+', top='+top+', left='+left;
64
65
66                var w = window.open (page+"?adr="+Url, 'DISCLAIMER', params);
67                //w.getElementsByName("ad").value=Url;
68                //windowbib.document.getElementById('ch').getElementsByTagName("a")[0].setAttribute('href', Url);
69                //w.focus();
70               
71}
72
73
74// ouvrir une autre fenetre secondaire
75function OuvrirPageBis (Url) {
76        openW (Url, NWIN2, WCONF2);
77}
78
79function OuvrirPage4 (Url) {
80    openW (Url, NWIN2, WCONF4);
81}
82
83// ouvrir une fenetre secondaire pour les BDD (GEISA)
84function OuvrirFeuille (Url) {
85        openW (Url, NWIN1, WCONF3);
86}
87
88//ouvrir une fenetre secondaire pour les BDD (GEISA)
89function OuvrirFeuilleDynW (Url, w, h) {
90                var windowbib = window.open (Url, 'bibs', "dependent=no,menubar=no,resizable=yes,scrollbars=yes,toolbar=no,left=100,top=100,width="+w+",height="+h);
91                //windowbib.document.getElementById('pif').getElementsByTagName("img")[0].setAttribute('src', 'resources/images/en.jpg');
92               
93}
94
95//ouvrir une fenetre secondaire pour les BDD (GEISA)
96function OuvrirFeuilleDyn (Url) {
97                var windowbib = window.open (Url, 'bib', "dependent=yes,menubar=no,resizable=yes,scrollbars=yes,toolbar=yes,left=100,top=100,width=1100,height=600");
98                //windowbib.document.getElementById('pif').getElementsByTagName("img")[0].setAttribute('src', 'resources/images/en.jpg');
99               
100}
101
102//ouvrir une fenetre secondaire pour les BDD (GEISA)
103function OuvrirFeuilleDynPL (Url) {
104               
105                var windowbib = window.open (Url, 'bob', "dependent=no,menubar=no,resizable=yes,scrollbars=yes,toolbar=yes,left=100,top=100,width=700,height=900");
106                //windowbib.document.getElementById('pif').getElementsByTagName("img")[0].setAttribute('src', 'resources/images/en.jpg');
107               
108}
109
110function OuvrirFeuilleDynSp (Url) {
111        var windowbib = window.open (Url, 'bob', "dependent=no,menubar=no,resizable=yes,scrollbars=yes,toolbar=no,left=100,top=100,width=1300,height=600");
112        //windowbib.document.getElementById('pif').getElementsByTagName("img")[0].setAttribute('src', 'resources/images/en.jpg');
113       
114}
115
116function loadVisus() {
117
118        mois=document.getElementById("month").value;
119        annee=document.getElementById("year").value;
120        document.getElementById("di").value=annee+mois+'01';
121        document.thisForm.submit();
122
123}
124
125function OuvrirFeuille2 (Url) {
126    openW (Url, NWIN1, WCONF5);
127}
128
129function openW (url, wName, conf) {
130       
131  var w = window.open (url, wName, conf);
132
133  if (w)
134    w.focus ();
135  else
136    alert ('Impossible de creer une nouvelle fenetre: ' + wName + ' !!');
137}
138
139var NAV_WIND_NAME_EXP = "navigExp";
140var NAV_WIND_NAME = "navig";
141
142//maj automatique de la navigation
143function majNav () {
144        var NAV_WIND_SNUM = "4";
145        var urlInf = window.document.URL;
146        var re = /(type=)\d/;
147        var urlNav = urlInf.replace (re, "$1" + NAV_WIND_SNUM);
148        window.open (urlNav, NAV_WIND_NAME);
149        if (typeof (parent.frames[NAV_WIND_NAME_EXP]) != "undefined") {
150                var wNExp = parent.frames[NAV_WIND_NAME_EXP].document;
151                wNExp.write (navigPageClear ());
152                wNExp.close();
153        }
154}
155
156// maj de la navigation secondaire (cas des experiences), frame 'navigExp'
157function setNavUrl (wName, id, lang) {
158        if (typeof (parent.frames[NAV_WIND_NAME_EXP]) != "undefined") {
159                var wNExp = parent.frames[NAV_WIND_NAME_EXP].document;
160                wNExp.write (navigPageGenerate (wName, id, lang));
161                wNExp.close();
162        }
163}
164
165// regeneration complete de la page (ne contient que la navigation secondaire)
166function navigPageGenerate (wName, id, lang) {
167        var s = "<html><head><link href='fileadmin/template/ether/frames/etherTypo.css' rel='stylesheet' type='text/css'/></head>\n<body class='navGene'>";
168        s += "<table width=100%><tr><td align='left' valign='middle'>"
169        s += "<P class='navi'>&nbsp;<font size='-1'>&gt;</font>&nbsp;<A HREF='/etherTypo/index.php?id=" + id + "&type=1&L=" + 
170                        lang + "' + target='information' class='navig'>" + 
171                        wName + "</A></P>";
172        s += "</td></tr></table>";
173        s += "</body></html>";
174        return s;
175}
176
177// raz navig secondaire
178function navigPageClear () {
179        var s = "<html><head><link href='fileadmin/template/ether/frames/etherTypo.css' rel='stylesheet' type='text/css'/></head>\n<body class='navGene'>";
180        s += "</body></html>";
181        return s;
182}
183
184function extractUrlParams () {
185
186        var t = location.search.substring(1).split('&');
187
188        var f = [];
189
190        for (var i=0; i<t.length; i++) {
191
192        var x = t[i].split('=');
193
194        f[x[0]]=x[1];
195       
196
197        }
198
199        return f;
200
201}
202
203function loadImage(annee) {
204        var tab;
205        tab=extractUrlParams();
206
207        var station=tab['station'];
208
209        var fichier1;
210        var fichier2;
211
212        if ( annee == 'lt' ) {
213                fichier1='plot_lt_'+station+'_dobson_o3.jpg';   
214        }
215        else {
216
217                fichier1='plot_'+annee+'_'+station+'_dobson_o3.jpg';   
218        }
219
220        document.getElementById("im1").src="./visu/"+station+"/dobson/"+fichier1;
221}
222
223function openNDACC() {
224
225        return true;
226}
227
Note: See TracBrowser for help on using the repository browser.