[113] | 1 | // |
---|
| 2 | // |
---|
| 3 | var WCONF1b = 'scrollbars=yes,addressbar=no, toolbar=no,location=no,directories=no,' + |
---|
| 4 | 'status=no,menubar=no,resizable=no,width=550,height=290'; |
---|
| 5 | |
---|
| 6 | var WCONF1 = 'scrollbars=yes,addressbar=no, toolbar=no,location=no,directories=no,' + |
---|
| 7 | 'status=no,menubar=no,resizable=no,width=550,height=600'; |
---|
| 8 | var WCONF2 = 'scrollbars=yes,toolbar=yes,location=no,directories=no,' + |
---|
| 9 | 'status=no,menubar=no,resizable=yes,width=600,height=700'; |
---|
| 10 | var 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) |
---|
| 14 | var WCONF3 = 'scrollbars=yes,toolbar=yes,location=no,directories=yes,' + |
---|
| 15 | 'status=yes,menubar=yes,resizable=yes,width=850,height=750'; |
---|
| 16 | |
---|
| 17 | var WCONF4 = 'scrollbars=yes,toolbar=yes,location=no,directories=yes,' + |
---|
| 18 | 'status=yes,menubar=yes,resizable=yes,width=1000'; |
---|
| 19 | |
---|
| 20 | var WCONF5 = 'scrollbars=yes,toolbar=no,location=no,directories=yes,' + |
---|
| 21 | 'status=yes,menubar=yes,resizable=yes,width=1000'; |
---|
| 22 | |
---|
| 23 | |
---|
| 24 | var NWIN1 = 'NWin1'; |
---|
| 25 | var 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 |
---|
| 45 | function 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 |
---|
| 57 | function 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 |
---|
| 75 | function OuvrirPageBis (Url) { |
---|
| 76 | openW (Url, NWIN2, WCONF2); |
---|
| 77 | } |
---|
| 78 | |
---|
| 79 | function OuvrirPage4 (Url) { |
---|
| 80 | openW (Url, NWIN2, WCONF4); |
---|
| 81 | } |
---|
| 82 | |
---|
| 83 | // ouvrir une fenetre secondaire pour les BDD (GEISA) |
---|
| 84 | function OuvrirFeuille (Url) { |
---|
| 85 | openW (Url, NWIN1, WCONF3); |
---|
| 86 | } |
---|
| 87 | |
---|
| 88 | //ouvrir une fenetre secondaire pour les BDD (GEISA) |
---|
| 89 | function OuvrirFeuilleDynW (Url, w, h) { |
---|
[183] | 90 | var windowbib = window.open (Url, 'w', "dependent=no,menubar=no,resizable=none,scrollbars=yes,toolbar=no,left=100,top=100,width="+w+",height="+h); |
---|
[113] | 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) |
---|
| 96 | function OuvrirFeuilleDyn (Url) { |
---|
[183] | 97 | var windowbib = window.open (Url, 'd', "dependent=yes,menubar=no,resizable=none,scrollbars=yes,toolbar=yes,left=100,top=100,width=1100,height=600"); |
---|
[113] | 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) |
---|
[183] | 103 | function OuvrirFeuilleDynM (Url) { |
---|
| 104 | var windowbib = window.open (Url, 'm', "dependent=yes,resizable=none,scrollbars=yes,toolbar=yes,left=100,top=100,width=760,height=600"); |
---|
| 105 | //windowbib.document.getElementById('pif').getElementsByTagName("img")[0].setAttribute('src', 'resources/images/en.jpg'); |
---|
| 106 | |
---|
| 107 | } |
---|
| 108 | |
---|
| 109 | //ouvrir une fenetre secondaire pour les BDD (GEISA) |
---|
[113] | 110 | function OuvrirFeuilleDynPL (Url) { |
---|
| 111 | |
---|
[183] | 112 | var windowbib = window.open (Url, 'pl', "dependent=no,menubar=no,resizable=none,scrollbars=yes,toolbar=yes,left=100,top=100,width=700,height=900"); |
---|
[113] | 113 | //windowbib.document.getElementById('pif').getElementsByTagName("img")[0].setAttribute('src', 'resources/images/en.jpg'); |
---|
| 114 | |
---|
| 115 | } |
---|
| 116 | |
---|
| 117 | function OuvrirFeuilleDynSp (Url) { |
---|
[183] | 118 | var windowbib = window.open (Url, 'sp', "dependent=no,menubar=no,resizable=none,scrollbars=yes,toolbar=no,left=100,top=100,width=1300,height=600"); |
---|
[113] | 119 | //windowbib.document.getElementById('pif').getElementsByTagName("img")[0].setAttribute('src', 'resources/images/en.jpg'); |
---|
| 120 | |
---|
| 121 | } |
---|
| 122 | |
---|
| 123 | function loadVisus() { |
---|
| 124 | |
---|
| 125 | mois=document.getElementById("month").value; |
---|
| 126 | annee=document.getElementById("year").value; |
---|
| 127 | document.getElementById("di").value=annee+mois+'01'; |
---|
| 128 | document.thisForm.submit(); |
---|
| 129 | |
---|
| 130 | } |
---|
| 131 | |
---|
| 132 | function OuvrirFeuille2 (Url) { |
---|
| 133 | openW (Url, NWIN1, WCONF5); |
---|
| 134 | } |
---|
| 135 | |
---|
| 136 | function openW (url, wName, conf) { |
---|
| 137 | |
---|
| 138 | var w = window.open (url, wName, conf); |
---|
| 139 | |
---|
| 140 | if (w) |
---|
| 141 | w.focus (); |
---|
| 142 | else |
---|
| 143 | alert ('Impossible de creer une nouvelle fenetre: ' + wName + ' !!'); |
---|
| 144 | } |
---|
| 145 | |
---|
| 146 | var NAV_WIND_NAME_EXP = "navigExp"; |
---|
| 147 | var NAV_WIND_NAME = "navig"; |
---|
| 148 | |
---|
| 149 | //maj automatique de la navigation |
---|
| 150 | function majNav () { |
---|
| 151 | var NAV_WIND_SNUM = "4"; |
---|
| 152 | var urlInf = window.document.URL; |
---|
| 153 | var re = /(type=)\d/; |
---|
| 154 | var urlNav = urlInf.replace (re, "$1" + NAV_WIND_SNUM); |
---|
| 155 | window.open (urlNav, NAV_WIND_NAME); |
---|
| 156 | if (typeof (parent.frames[NAV_WIND_NAME_EXP]) != "undefined") { |
---|
| 157 | var wNExp = parent.frames[NAV_WIND_NAME_EXP].document; |
---|
| 158 | wNExp.write (navigPageClear ()); |
---|
| 159 | wNExp.close(); |
---|
| 160 | } |
---|
| 161 | } |
---|
| 162 | |
---|
| 163 | // maj de la navigation secondaire (cas des experiences), frame 'navigExp' |
---|
| 164 | function setNavUrl (wName, id, lang) { |
---|
| 165 | if (typeof (parent.frames[NAV_WIND_NAME_EXP]) != "undefined") { |
---|
| 166 | var wNExp = parent.frames[NAV_WIND_NAME_EXP].document; |
---|
| 167 | wNExp.write (navigPageGenerate (wName, id, lang)); |
---|
| 168 | wNExp.close(); |
---|
| 169 | } |
---|
| 170 | } |
---|
| 171 | |
---|
| 172 | // regeneration complete de la page (ne contient que la navigation secondaire) |
---|
| 173 | function navigPageGenerate (wName, id, lang) { |
---|
| 174 | var s = "<html><head><link href='fileadmin/template/ether/frames/etherTypo.css' rel='stylesheet' type='text/css'/></head>\n<body class='navGene'>"; |
---|
| 175 | s += "<table width=100%><tr><td align='left' valign='middle'>" |
---|
| 176 | s += "<P class='navi'> <font size='-1'>></font> <A HREF='/etherTypo/index.php?id=" + id + "&type=1&L=" + |
---|
| 177 | lang + "' + target='information' class='navig'>" + |
---|
| 178 | wName + "</A></P>"; |
---|
| 179 | s += "</td></tr></table>"; |
---|
| 180 | s += "</body></html>"; |
---|
| 181 | return s; |
---|
| 182 | } |
---|
| 183 | |
---|
| 184 | // raz navig secondaire |
---|
| 185 | function navigPageClear () { |
---|
| 186 | var s = "<html><head><link href='fileadmin/template/ether/frames/etherTypo.css' rel='stylesheet' type='text/css'/></head>\n<body class='navGene'>"; |
---|
| 187 | s += "</body></html>"; |
---|
| 188 | return s; |
---|
| 189 | } |
---|
| 190 | |
---|
| 191 | function extractUrlParams () { |
---|
| 192 | |
---|
| 193 | var t = location.search.substring(1).split('&'); |
---|
| 194 | |
---|
| 195 | var f = []; |
---|
| 196 | |
---|
| 197 | for (var i=0; i<t.length; i++) { |
---|
| 198 | |
---|
| 199 | var x = t[i].split('='); |
---|
| 200 | |
---|
| 201 | f[x[0]]=x[1]; |
---|
| 202 | |
---|
| 203 | |
---|
| 204 | } |
---|
| 205 | |
---|
| 206 | return f; |
---|
| 207 | |
---|
| 208 | } |
---|
| 209 | |
---|
[125] | 210 | |
---|
| 211 | function majMenu(nb) { |
---|
| 212 | |
---|
| 213 | /*var nom = window.location.pathname; |
---|
| 214 | nom = nom.split("/"); |
---|
| 215 | nom = nom[nom.length - 1]; |
---|
| 216 | alert(nom);*/ |
---|
| 217 | document.getElementById('menu'+nb).className='menuselect'; |
---|
| 218 | /*document.getElementById('menu2').className='menuout'; |
---|
| 219 | document.getElementById('menu3').className='menuout'; |
---|
| 220 | document.getElementById('menu4').className='menuout'; |
---|
| 221 | document.getElementById('menu5').className='menuout';*/ |
---|
[183] | 222 | |
---|
[125] | 223 | |
---|
| 224 | } |
---|
| 225 | |
---|
| 226 | |
---|
[518] | 227 | function closeInfo() { |
---|
| 228 | // |
---|
| 229 | document.getElementById("info").style.visibility ="hidden"; |
---|
| 230 | /*document.getElementById("tooltip").style.left = mouseX +"px"; |
---|
| 231 | document.getElementById("tooltip").style.top = mouseY +"px"; |
---|
| 232 | document.getElementById("texts").style.visibility ="visible"; |
---|
| 233 | document.getElementById("texts").style.left = mouseX+5 +"px"; |
---|
| 234 | |
---|
| 235 | if (im == '' || im == null) { |
---|
| 236 | document.getElementById("texts").style.top = mouseY+"px"; |
---|
| 237 | document.getElementById("tooltip").style.visibility ="hidden"; |
---|
| 238 | document.getElementById("ims").src = ""; |
---|
| 239 | |
---|
| 240 | } |
---|
| 241 | else { |
---|
| 242 | document.getElementById("texts").style.top = mouseY+80 +"px"; |
---|
| 243 | document.getElementById("ims").src = "resources/images/"+im; |
---|
| 244 | } |
---|
| 245 | |
---|
| 246 | document.getElementById("texts").innerHTML=msg;*/ |
---|
| 247 | |
---|
| 248 | |
---|
| 249 | } |
---|
| 250 | |
---|
| 251 | function showInfo() { |
---|
| 252 | // |
---|
| 253 | document.getElementById("info").style.visibility ="visible"; |
---|
| 254 | /*document.getElementById("tooltip").style.left = mouseX +"px"; |
---|
| 255 | document.getElementById("tooltip").style.top = mouseY +"px"; |
---|
| 256 | document.getElementById("texts").style.visibility ="visible"; |
---|
| 257 | document.getElementById("texts").style.left = mouseX+5 +"px"; |
---|
| 258 | |
---|
| 259 | if (im == '' || im == null) { |
---|
| 260 | document.getElementById("texts").style.top = mouseY+"px"; |
---|
| 261 | document.getElementById("tooltip").style.visibility ="hidden"; |
---|
| 262 | document.getElementById("ims").src = ""; |
---|
| 263 | |
---|
| 264 | } |
---|
| 265 | else { |
---|
| 266 | document.getElementById("texts").style.top = mouseY+80 +"px"; |
---|
| 267 | document.getElementById("ims").src = "resources/images/"+im; |
---|
| 268 | } |
---|
| 269 | |
---|
| 270 | document.getElementById("texts").innerHTML=msg;*/ |
---|
| 271 | |
---|
| 272 | |
---|
| 273 | } |
---|
| 274 | |
---|
| 275 | |
---|
[183] | 276 | function defDivTab() { |
---|
[125] | 277 | |
---|
[183] | 278 | browserName=navigator.appVersion; |
---|
| 279 | pos=browserName.indexOf('Chrome', 0); |
---|
| 280 | |
---|
| 281 | if (pos >= 0 ) { // Chrome |
---|
| 282 | document.getElementById("divtab").className='tabChrome'; |
---|
| 283 | } |
---|
| 284 | else { // Autre |
---|
| 285 | document.getElementById('divtab').className='tabMozilla'; |
---|
| 286 | } |
---|
| 287 | |
---|
| 288 | |
---|
| 289 | } |
---|
| 290 | |
---|
| 291 | |
---|
| 292 | |
---|
[125] | 293 | function changeMenu(lmenu,type) { |
---|
| 294 | if (document.getElementById(lmenu).className != 'menuselect') { |
---|
| 295 | if (type == 'over') { |
---|
| 296 | document.getElementById(lmenu).className='menuover'; |
---|
| 297 | } |
---|
| 298 | else { |
---|
| 299 | document.getElementById(lmenu).className='menuon'; |
---|
| 300 | } |
---|
| 301 | } |
---|
| 302 | |
---|
| 303 | } |
---|
| 304 | |
---|
| 305 | function changeMenuOut() { |
---|
| 306 | //alert("ok"); |
---|
| 307 | document.getElementById("menu1").className='menuon'; |
---|
| 308 | } |
---|
| 309 | |
---|
| 310 | |
---|
[113] | 311 | function loadImage(annee) { |
---|
| 312 | var tab; |
---|
| 313 | tab=extractUrlParams(); |
---|
| 314 | |
---|
| 315 | var station=tab['station']; |
---|
| 316 | |
---|
| 317 | var fichier1; |
---|
| 318 | var fichier2; |
---|
| 319 | |
---|
| 320 | if ( annee == 'lt' ) { |
---|
| 321 | fichier1='plot_lt_'+station+'_dobson_o3.jpg'; |
---|
| 322 | } |
---|
| 323 | else { |
---|
| 324 | |
---|
| 325 | fichier1='plot_'+annee+'_'+station+'_dobson_o3.jpg'; |
---|
| 326 | } |
---|
| 327 | |
---|
| 328 | document.getElementById("im1").src="./visu/"+station+"/dobson/"+fichier1; |
---|
| 329 | } |
---|
| 330 | |
---|
| 331 | function openNDACC() { |
---|
| 332 | |
---|
| 333 | return true; |
---|
| 334 | } |
---|
| 335 | |
---|