1 2var globalBlack = false; 3var globalPopup = false; 4var updater = null; 5var popupClosed = true; 6 7function ShowHide(psId) 8{ 9 if(document.getElementById(psId).style.display == 'none') 10 { 11 document.getElementById(psId).style.display='block'; 12 } 13 else 14 { 15 document.getElementById(psId).style.display='none'; 16 } 17} 18 19function ShowHideRegister(psId) 20{ 21 if(document.getElementById(psId).style.display == 'none') 22 { 23 document.getElementById(psId).style.display='block'; 24 } 25 else 26 { 27 document.getElementById(psId).style.display='none'; 28 } 29 RegisterByCookie(psId); 30} 31 32 33 34function Show(psId) 35{ 36 document.getElementById(psId).style.display=''; 37} 38 39function Hide(psId) 40{ 41 document.getElementById(psId).style.display='none'; 42} 43 44function showConsole(sHideId1, sHideId2, sHideId3, sShowHide, sRegister1, sRegister2, sRegister3, sRegister4) 45{ 46 Hide(sHideId1); 47 Hide(sHideId2); 48 Hide(sHideId3); 49 ShowHide(sShowHide); 50 RegisterByCookie(sRegister1); 51 RegisterByCookie(sRegister2); 52 RegisterByCookie(sRegister3); 53 RegisterByCookie(sRegister4); 54} 55 56function popUpWinFullScreen (url, win) 57{ 58 var nLeft = 0; 59 var nTop = 0; 60 var nWidth = screen.availWidth - 10; 61 var nHeight = screen.availHeight - 10; 62 63 options = 'width=' + nWidth + ',height=' + nHeight + ',left=' + nLeft + ',top=' + nTop + ',resizable=yes,scrollbars=yes'; 64 return window.open(url, win, options); 65} 66 67function popUpWinMedium (url, win) 68{ 69 var nWidth = 700; 70 var nHeight = 500; 71 var nLeft = (screen.width-nWidth)/2; 72 var nTop = (screen.height-nHeight)/2; 73 74 75 options = 'width=' + nWidth + ',height=' + nHeight + ',left=' + nLeft + ',top=' + nTop + ',resizable=yes,scrollbars=yes'; 76 window.open(url, win, options); 77} 78 79function popUpWinCustom (url, win, pnWidth, pnHeight) 80{ 81 var nLeft = (screen.width-pnWidth)/2; 82 var nTop = (screen.height-pnHeight)/2; 83 84 85 options = 'width=' + pnWidth + ',height=' + pnHeight + ',left=' + nLeft + ',top=' + nTop + ',resizable=yes,scrollbars=yes'; 86 window.open(url, win, options); 87} 88 89var gMenuTimer; 90var gMenuTimerSearch; 91var gsLastOpened = ""; 92var gnTime = 500; 93function ShowMenu (psId, pbShow) 94{ 95 clearTimeout(gMenuTimer); 96 clearTimeout(gMenuTimerSearch); 97 if (pbShow == true) 98 { 99// alert("show "+gsLastOpened); 100 if (gsLastOpened != psId) 101 { 102// alert("LastOpened : "+gsLastOpened); 103 if (gsLastOpened != "") 104 document.getElementById(gsLastOpened).style.display = 'none'; 105 } 106 document.getElementById(psId).style.display = ''; 107 gsLastOpened = psId; 108 109 if (document.getElementById('layer_search') != undefined) 110 document.getElementById('layer_search').style.display = 'none'; 111 } 112 else 113 { 114// alert("hide"); 115 gMenuTimer = setTimeout("document.getElementById('"+psId+"').style.display = 'none'", gnTime); 116 if (document.getElementById('layer_search') != undefined) 117 gMenuTimerSearch = setTimeout("document.getElementById('layer_search').style.display = ''", gnTime); 118 } 119} 120 121 122 123function FillPicker (psDataField, psDataValue, psViewField, psViewValue) 124{ 125 window.opener.document.getElementById(psDataField).value = psDataValue; 126 window.opener.document.getElementById(psViewField).innerHTML = psViewValue; 127 self.close(); 128} 129/* 130function FillPicker (psDataField, psDataValue, psViewField, psViewValue) 131{ 132 top.document.getElementById(psDataField).value = psDataValue; 133 top.document.getElementById(psViewField).innerHTML = psViewValue; 134 //document.getElementById('gal').style.display = 'none'; 135} 136*/ 137function FillMultiPicker (psDataField, psDataValue, psViewField, psViewValue) 138{ 139 window.opener.document.getElementById(psDataField).value += psDataValue; 140 window.opener.document.getElementById(psViewField).innerHTML += psViewValue; 141 self.close(); 142} 143 144function FillRte (psRteId, psPicturePath) 145{ 146 window.opener.rteCommand(psRteId, 'InsertImage', psPicturePath) 147 self.close(); 148} 149 150function FillRteLink (psRteId, psLink) 151{ 152 153 window.opener.addHTML(psRteId, psLink) 154 self.close(); 155} 156 157function FillColorPicker(psId, psIdSquare, psValue) 158{ 159 document.getElementById(psId).value = psValue; 160 document.getElementById(psIdSquare).style.background = psValue; 161} 162 163function FillColorPickerRealTime(psId, psIdSquare, psValue) 164{ 165 document.getElementById(psId).value = psValue; 166 document.getElementById(psIdSquare).style.background = psValue; 167} 168 169function EditToColor(psId, psIdSquare) 170{ 171 var sValue = document.getElementById(psId).value; 172 if (sValue != "") 173 { 174 document.getElementById(psIdSquare).style.background = sValue; 175 } 176} 177 178function FillSelector (psDivId, psDataField, psDataValue, psViewField, psViewValue) 179{ 180 document.getElementById(psDataField).value = psDataValue; 181 document.getElementById(psViewField).value = psViewValue; 182 //document.getElementById(psViewField).innerHTML = psViewValue; 183 document.getElementById(psDivId).style.display='none'; 184} 185 186 187/********************************************/ 188/* Fonctions de gestion des messages return */ 189/********************************************/ 190 191function CloseMessageReturn(psId) 192{ 193 document.getElementById(psId).style.display = 'none'; 194} 195 196function ShowMinus(psId, pnOpacity) 197{ 198 try 199 { 200 document.getElementById(psId).style.opacity = pnOpacity; 201 document.getElementById(psId).style.filter = "alpha(opacity:"+pnOpacity*100+")"; 202 } 203 catch (ex) 204 { 205 } 206} 207 208function HideMessageReturn(psId, pnTime) 209{ 210// setTimeout("CloseMessageReturn('"+psId+"')", pnTime); 211 try 212 { 213 var i = 1; 214 var nTimer = pnTime; 215 for (i = 1 ; i>=0 ; i=i-0.1) 216 { 217 nTimer = nTimer + 100; 218 setTimeout("ShowMinus('"+psId+"', "+i+")", nTimer); 219 } 220 nTimer = nTimer + 100; 221 setTimeout("CloseMessageReturn('"+psId+"')", nTimer); 222 } 223 catch (ex) 224 { 225 } 226} 227 228function UpdateDate(psField, psFieldYYYY, psFieldMM, psFieldDD) 229{ 230 var Year = document.getElementById(psFieldYYYY).value; 231 var Month = document.getElementById(psFieldMM).value; 232 var Day = document.getElementById(psFieldDD).value; 233 234 document.getElementById(psField).value = Year + "-" + Month + "-" + Day; 235} 236 237function product_zoom_show(psDivId) 238{ 239 document.getElementById("product_div_desc").style.display = 'none'; 240 document.getElementById("product_div_benefits").style.display = 'none'; 241 document.getElementById("product_div_composition").style.display = 'none'; 242 document.getElementById("product_div_application").style.display = 'none'; 243 244 document.getElementById(psDivId).style.display = ''; 245 246} 247 248function newsletterChangeAction(pbValue, psElementId, psActionTrue, psActionFalse) 249{ 250 if (pbValue) 251 document.getElementById(psElementId).value = psActionTrue; 252 else
253 document.getElementById(psElementId).value = psActionFalse; 254} 255 256function waitForm() 257{ 258 document.getElementById('form_back').style.visibility = 'visible'; 259 document.getElementById('form_wait').style.visibility = 'visible'; 260} 261 262function WriteCookie(psName, psValue) 263{ 264 var argv = WriteCookie.arguments; 265 var argc = WriteCookie.arguments.length; 266 var expires = (argc > 2) ? argv[2] : null; 267 var path = (argc > 3) ? argv[3] : null; 268 var domain = (argc > 4) ? argv[4] : null; 269 var secure = (argc > 5) ? argv[5] : false; 270 document.cookie=psName+"="+escape(psValue)+ 271 ((expires==null) ? "" : ("; expires="+expires.toGMTString()))+ 272// ((path==null) ? "" : ("; path="+path))+ 273 ((domain==null) ? "" : ("; domain="+domain))+ 274 ((secure==true) ? "; secure" : ""); 275} 276 277function getCookieValue(offset) 278{ 279 var endstr=document.cookie.indexOf (";", offset); 280 if (endstr==-1) endstr=document.cookie.length; 281 return unescape(document.cookie.substring(offset, endstr)); 282} 283 284function ReadCookie(psName) 285{ 286 var arg=psName+"="; 287 var alen=arg.length; 288 var clen=document.cookie.length; 289 var i=0; 290 while (i<clen) 291 { 292 var j=i+alen; 293 if (document.cookie.substring(i, j)==arg) return getCookieValue(j); 294 i=document.cookie.indexOf(" ",i)+1; 295 if (i==0) break; 296 } 297 return null; 298} 299 300function RegisterByCookie(psDiv) 301{ 302 if (document.getElementById(psDiv).style.display == 'none') 303 WriteCookie(psDiv, 0); 304 else 305 WriteCookie(psDiv, 1); 306} 307/* 308var gasCheckbox = new Array(); 309var gnIndiceCheckbox = 0; 310function addSelectionCheckbox(psCheckBoxId) 311{ 312// alert("Ajout " + psCheckBoxId); 313 gasCheckbox[gnIndiceCheckbox] = psCheckBoxId; 314 gnIndiceCheckbox++; 315} 316 317function checkAll() 318{ 319 if () 320 for (nIndice = 0; nIndice < gnIndiceCheckbox; nIndice++) 321 { 322 var sId = gasCheckbox[nIndice]; 323// alert("->" + sId); 324 document.getElementById(sId).checked = true; 325 } 326}*/ 327 328function changeClass(psDivId, psClass) 329{ 330 document.getElementById(psDivId).className = psClass; 331} 332 333 334function counter(psHourId, psMinuteId, psSecondId) 335{ 336 setTimeout('counter("'+psHourId+'", "'+psMinuteId+'", "'+psSecondId+'")', 1000); 337 338 var nIncrement = -1; 339 var nHour = parseInt(document.getElementById(psHourId).innerHTML); 340 var nMinute = parseInt(document.getElementById(psMinuteId).innerHTML); 341 var nSecond = parseInt(document.getElementById(psSecondId).innerHTML); 342 343 var nNewHour = nHour; 344 var nNewMinute = nMinute; 345 var nNewSecond = nSecond; 346 347 if (nSecond > 0) 348 { 349 nNewSecond = nSecond - 1; 350 } 351 else 352 { 353 nNewSecond = 59; 354 if (nMinute > 0) 355 { 356 nNewMinute = nMinute - 1; 357 } 358 else 359 { 360 nNewMinute = 59; 361 if (nHour > 0) 362 { 363 nNewHour = nHour -1; 364 } 365 else 366 { 367 nNewHour = 0; 368 nNewMinute = 0; 369 nNewSecond = 0; 370 } 371 } 372 } 373 374 if (nNewHour <= 9) nNewHour = "0"+nNewHour; 375 if (nNewMinute <= 9) nNewMinute = "0"+nNewMinute; 376 if (nNewSecond <= 9) nNewSecond = "0"+nNewSecond; 377 378 document.getElementById(psHourId).innerHTML = nNewHour; 379 document.getElementById(psMinuteId).innerHTML = nNewMinute; 380 document.getElementById(psSecondId).innerHTML = nNewSecond; 381 382 383} 384 385 386function blink(psId, pnInterval) 387{ 388 setTimeout('blink("'+psId+'", '+pnInterval+')', pnInterval); 389 390 if (document.getElementById(psId).style.display == 'none') 391 document.getElementById(psId).style.display = ''; 392 else 393 document.getElementById(psId).style.display = 'none'; 394} 395 396 397function screenSwitch(psIdHide, psIdShow, psUrl, pbReturn) 398{ 399 if (!pbReturn) 400 { 401 displayScreen(psUrl, psIdHide, psIdShow); 402 } 403 else 404 { 405 destroyScreen(psIdHide); 406 } 407 408 // show 409 Effect.Appear(psIdShow, { duration: 1.0, from: 0.0, to: 1.0}); 410 //hide 411 Effect.Appear(psIdHide, { duration: 0.5, from: 1.0, to: 0.0}); 412} 413 414 415function blackScreen() 416{ 417 /*$('blackScreen_container').style.top = 'Opx'; 418 $('blackScreen_container').style.left = 'Opx';*/ 419// $('blackScreen_container').style.width = '10O%'; 420 //$('blackScreen_container').style.height = '10O%'; 421 $('blackScreen_container').style.backgroundColor = '#000'; 422 423 Effect.Appear('blackScreen_container', { duration: 1.0, from: 0.0, to: 0.75}); 424 425 $('body').style.overflow = 'hidden'; 426 setTimeout('changeBlackScreenStatus(true)', 1000); 427 428 popupClosed = false; 429 430} 431 432 433function whiteScreen(bForce) 434{ 435 if ((globalBlack || globalPopup) && updater != null) 436 { 437 updater.stop(); 438 updater = null; 439 } 440 441 if (globalBlack || bForce) 442 { 443 Effect.Fade('blackScreen_container'); 444 changeBlackScreenStatus(false); 445 } 446 447 448 if (globalPopup || bForce) 449 { 450 Effect.Fade('ajax_container'); 451 changePopupStatus(false); 452 popupClosed = true; 453 } 454} 455 456 457function displayAjaxPopup(psId, psTitle) 458{ 459 $('ajax_container').style.top = '250px'; 460 $('ajax_container').style.left = '50%'; 461 $('ajax_container').style.width = '540px'; 462 $('ajax_container').style.height = '250px'; 463 $('ajax_container').style.backgroundColor = '#fff'; 464 $('ajax_container').style.marginLeft = '-270px'; 465 $('ajax_container').style.zIndex = '10'; 466 467 setTimeout('changePopupStatus(true)', 1000); 468 469 $('ajax_container_title').innerHTML = psTitle; 470 471 Effect.Appear('ajax_container', { duration: 1.0, from: 0.0, to: 1.0}); 472 473 popupClosed = false; 474} 475 476 477function changeBlackScreenStatus(pbStatus) 478{ 479 globalBlack = pbStatus; 480} 481 482 483function changePopupStatus(pbStatus) 484{ 485 globalPopup = pbStatus; 486} 487 488 489function stopAjaxPopupLoader() 490{ 491 $('ajax_container_loader').innerHTML = ''; 492} 493 494function hideColumn(psTableId, pnIndice) 495{ 496 var sCookie; 497 sCookie = ReadCookie(psTableId); 498 var sCookieFinal = sCookie+pnIndice+";"; 499 WriteCookie(psTableId, sCookieFinal); 500 501 502 var allRows = document.getElementById(psTableId).rows; 503 504 if (!allRows) return false; 505 506 for (var i=0; i<allRows.length; i++) 507 { 508 if (allRows[i].cells[pnIndice]) 509 { 510 if (allRows[i].cells[pnIndice].className!='footer') 511 allRows[i].cells[pnIndice].style.display = 'none'; 512 } 513 } 514} 515 516 517function showColumn(psTableId, pnIndice) 518{ 519 var sCookie; 520 sCookie = ReadCookie(psTableId); 521 522 if (sCookie) 523 sCookie = sCookie.replace(pnIndice+";", ""); 524 525 WriteCookie(psTableId, sCookie); 526 527 528 var allRows = document.getElementById(psTableId).rows; 529 if (!allRows) return false; 530 531// if (!allRows) alert('Tableau introuvable : '+psTableId); 532 533 for (var i=0; i<allRows.length; i++) 534 { 535 if (allRows[i].cells[pnIndice]) 536 { 537 allRows[i].cells[pnIndice].style.display = ''; 538 } 539 } 540} 541 542function addToBookmark(psLabel, psURL) 543{ 544 if ( navigator.appName != 'Microsoft Internet Explorer' ) 545 {
546 window.sidebar.addPanel(psLabel, psURL,""); 547 } 548 else 549 { 550 window.external.AddFavorite(psURL, psLabel); 551 } 552} 553 554 555var bStatus = true; 556 557function checkBoxAll(psFormId) 558{ 559 560 var checkboxes = []; 561 checkboxes = $$('input').each 562 ( 563 function(e) 564 { 565 if(e.type == 'checkbox') 566 checkboxes.push(e); 567 } 568 ); 569 570 checkboxes.each(function(e){ e.checked = bStatus }); 571 572 bStatus = !bStatus; 573}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.