1 2 3var ClickDown = false; 4 5var PosY = 0; 6 7var obj = null; 8 9var Hauteur = 0; 10 11var url = "http://chu-poitiers.ovh/wp-content/themes/CHU-Poitier"; 12 13 14function Move() 15 16{ 17 18 if(ClickDown == true) 19 20 { 21 22 var taille = event.y - PosY + Hauteur; 23 24 taille = taille + "px"; 25 26 obj.style.height= taille; 27 28 } 29 30} 31 32 33 34function Down(Num) 35 36{ 37 38 document.body.style.cursor='s-resize'; 39 40 obj = document.getElementById("MyDiv"+ Num); 41 42 ClickDown=true; 43 44 PosY = event.y; 45 46 var height = obj.style.height +" "; 47 48 var pos = height.indexOf('px'); 49 50 if(pos == -1) 51 52 pos = height.length; 53 54 height = height.substring(0,pos); 55 56 if(height == '' || height == ' ') 57 58 height = "50"; 59 60 Hauteur = parseInt(height); 61 62} 63 64function Up() 65 66{ 67 68 ClickDown=false; 69 70 71 72 try 73 74 { 75 76 if( obj.style.display != 'none') 77 78 document.body.style.cursor = 'default'; 79 80 } 81 82 catch(ex) 83 84 { 85 86 } 87 88} 89 90function Click(Num) 91 92{ 93 94 var vis = 'block'; 95 96 var pasvis = 'none'; 97 98 if( document.getElementById("ImgUp"+ Num).style.display != 'none') 99 100 { 101 102 pasvis = vis; 103 104 vis = 'none'; 105 106 } 107 108 document.getElementById("MyDiv"+ Num).style.display=vis; 109 110 document.getElementById("ImgUp"+ Num).style.display = vis; 111 112 document.getElementById("ImgDown"+ Num).style.display = pasvis; 113 114 if(document.getElementById("resize_bas"+ Num) != null) 115 116 document.getElementById("resize_bas"+ Num).style.display = vis; 117 118} 119 120function MouseOver(Num) 121 122{ 123 124 if(document.getElementById("MyDiv"+ Num).style.display == 'none') 125 126 document.body.style.cursor='default'; 127 128 else 129 130 { 131 132 if(ClickDown == true) 133 134 document.body.style.cursor='s-resize'; 135 136 else 137 138 document.body.style.cursor='pointer'; 139 140 } 141 142 143 144 145 146} 147 148function MouseOut() 149 150{ 151 152 153 document.body.style.cursor=''; 154 155} 156 157 158 159 160 161 162 163var scrollerheight=300 164 165/*Le temps de pause entre les message (en millisecondes).*/ 166 167var arret=3000 168 169var step=1 170 171var pause=10 172 173var NumStop= -1; 174 175 176 177var timer = new Array() 178 179var height = new Array() 180 181var cliptop = new Array() 182 183var clipbottom = new Array() 184 185var totalheight= new Array() 186 187 188 189function initiate(num, nbLignes, scrollHeight, withArret) 190 191{ 192 193 scrollerheight = scrollHeight; 194 195 if(withArret == 1) 196 197 arret = 3500; 198 199 else 200 201 arret = 500; 202 203 totalheight[num]= scrollerheight*(nbLignes+1); 204 205 height[num]=0; 206 207 cliptop[num]=0; 208 209 clipbottom[num]=scrollerheight 210 211 212 213 214 215 if (document.all) { 216 217 document.getElementById("scrollertext"+ num).style.posTop=0 218 219 document.getElementById("scrollertext"+ num).style.posLeft=0 220 221 } 222 223 else if (document.layers) { 224 225 document.getElementById("scrollertext"+ num).top=0 226 227 document.getElementById("scrollertext"+ num).left=0 228 229 } 230 231 else 232 233 { 234 235 document.getElementById("scrollertext"+ num).style.top="0px"; 236 237 document.getElementById("scrollertext"+ num).style.left="0px"; 238 239 } 240 241 242 243 scroll(num) 244 245} 246 247 248 249function scroll(num) 250 251{ 252 253 254 255 if(NumStop == num) 256 257 { 258 259 clearTimeout(timer[num]); 260 261 timer[num]=setTimeout("scroll("+ num +")",pause) 262 263 } 264 265 else 266 267 { 268 269 270 271 272 if (document.all) 273 274 { 275 276 if (height[num]<scrollerheight) 277 278 { 279 280 height[num]+=step 281 282 cliptop[num]+=step 283 284 clipbottom[num]+=step 285 286 287 document.getElementById("scrollertext"+ num).style.posTop-=step 288 289 clearTimeout(timer[num]) 290 291 timer[num]=setTimeout("scroll("+ num +")",pause) 292 293 } 294 295 else 296 297 { 298 299 if (document.getElementById("scrollertext"+ num).style.posTop<=-(totalheight[num])) 300 301 { 302 303 document.getElementById("scrollertext"+ num).style.posTop=0 304 305 cliptop[num]=0 306 307 clipbottom[num]=scrollerheight 308 309 310 height[num]=0 311 312 clearTimeout(timer[num]) 313 314 timer[num]=setTimeout("scroll("+ num +")",pause) 315 316 317 318 } 319 320 else 321 322 { 323 324 height[num]=0 325 326 clearTimeout(timer[num]) 327 328 timer[num]=setTimeout("scroll("+ num +")",arret) 329 330 } 331 332 } 333 334 } 335 336 else if (document.layers) 337 338 { 339 340 if (height[num]<scrollerheight) 341 342 { 343 344 height[num]+=step 345 346 cliptop[num]+=step 347 348 clipbottom[num]+=step 349 350 351 document.getElementById("scrollertext"+ num).top-=step 352 353 clearTimeout(timer[num]) 354 355 timer[num]=setTimeout("scroll("+ num +")",pause) 356 357 } 358 359 else 360 361 { 362 363 if (document.scrollertext.top<=-(totalheight[num])) 364 365 { 366 367 document.getElementById("scrollertext"+ num).top=0 368 369 cliptop[num]=0 370 371 clipbottom[num]=scrollerheight 372 373 374 height[num]=0 375 376 clearTimeout(timer[num]) 377 378 timer[num]=setTimeout("scroll("+ num +")",pause) 379 380 } 381 382 else 383 384 { 385 386 height[num]=0 387 388 clearTimeout(timer[num]) 389 390 timer[num]=setTimeout("scroll("+ num +")",arret) 391 392 } 393 394 } 395 396 } 397 398 else 399 400 { 401 402 if (height[num]<scrollerheight) 403 404 { 405 406 height[num]+=step 407 408 cliptop[num]+=step 409 410 clipbottom[num]+=step 411 412 document.getElementById("scrollertext"+ num).style.top = parseInt(document.getElementById("scrollertext"+ num).style.top)-step+'px'; 413 414 415 416 clearTimeout(timer[num]) 417 418 timer[num]=setTimeout("scroll("+ num +")",pause) 419 420 } 421 422 else 423 424 { 425 426 if (parseInt(document.getElementById("scrollertext"+ num).style.top) <=-(totalheight[num])) 427 428 { 429 430 document.getElementById("scrollertext"+ num).style.top = '0px' 431 432 cliptop[num]=0 433 434 clipbottom[num]=scrollerheight 435 436 height[num]=0 437 438 clearTimeout(timer[num]) 439 440 timer[num]=setTimeout("scroll("+ num +")",pause) 441 442 } 443 444 else 445 446 { 447 448 height[num]=0 449 450 clearTimeout(timer[num]) 451 452 timer[num]=setTimeout("scroll("+ num +")",arret) 453 454 } 455 456 } 457 458 } 459 460 } 461 462} 463 464 465 466function Stopper(num) 467 468{ 469 470 NumStop = num; 471 472} 473 474 475 476function GoOn(num) 477 478{ 479 480 NumStop=-1; 481 482} 483 484 485 486 487 488 489
490var delay = 3000; 491 492var maxsteps=30; 493 494var stepdelay=40; 495 496 497var startcolor= new Array(255,255,255); 498 499var endcolor=new Array(0,0,0); 500 501 502var fcontent=new Array(); 503 504var fadecounter=new Array(); 505 506 507 508 509 510var ie4=document.all&&!document.getElementById; 511 512var DOM2=document.getElementById; 513 514var faderdelay=0; 515 516var index=0; 517 518 519 520 521 522function changecontent(num){ 523 524 525 526 if(NumStop == num) 527 528 { 529 530 clearTimeout(fadecounter[num]); 531 532 fadecounter[num]=setTimeout("changecontent("+num+")",100) 533 534 } 535 536 else 537 538 { 539 540 var begintag='<div style="font: normal 14px Arial; padding: 5px;" onmouseover=Stopper('+num+') onmouseout=GoOn('+num+')>'; 541 542 if (index>=fcontent[num].length) 543 544 index=0 545 546 if (DOM2){ 547 548 document.getElementById("fscroller"+num).innerHTML=begintag+fcontent[num][index]+'</div>' 549 550 linkcolorchange(1,num); 551 552 colorfade(1, num); 553 554 } 555 556 else if (ie4) 557 558 document.getElementById("fscroller"+num).innerHTML=begintag+fcontent[num][index]+'</div>'; 559 560 index++ 561 562 } 563 564 AfficheCompteur(num); 565 566} 567 568 569 570function linkcolorchange(step, num){ 571 572 var obj=document.getElementById("fscroller"+num).getElementsByTagName("A"); 573 574 if (obj.length>0){ 575 576 for (i=0;i<obj.length;i++) 577 578 obj[i].style.color=getstepcolor(step); 579 580 } 581 582} 583 584 585 586function colorfade(step,num) { 587 588 if(step<=maxsteps) { 589 590 document.getElementById("fscroller"+num).style.color=getstepcolor(step); 591 592 linkcolorchange(step,num); 593 594 step++; 595 596 fadecounter[num]=setTimeout("colorfade("+step+","+num+")",stepdelay); 597 598 }else{ 599 600 clearTimeout(fadecounter[num]); 601 602 document.getElementById("fscroller"+num).style.color="rgb("+endcolor[0]+", "+endcolor[1]+", "+endcolor[2]+")"; 603 604 setTimeout("changecontent("+num+")", delay); 605 606 607 608 } 609 610} 611 612 613 614function getstepcolor(step) { 615 616 var diff 617 618 var newcolor=new Array(3); 619 620 for(var i=0;i<3;i++) { 621 622 diff = (startcolor[i]-endcolor[i]); 623 624 if(diff > 0) { 625 626 newcolor[i] = startcolor[i]-(Math.round((diff/maxsteps))*step); 627 628 } else { 629 630 newcolor[i] = startcolor[i]+(Math.round((Math.abs(diff)/maxsteps))*step); 631 632 } 633 634 } 635 636 return ("rgb(" + newcolor[0] + ", " + newcolor[1] + ", " + newcolor[2] + ")"); 637 638} 639 640 641 642function AfficheCompteur(num) 643 644{ 645 646 var piCpt = document.getElementById("PostItCpt" + num); 647 648 if(piCpt!=null) 649 650 { 651 652 653 var txt = ""; 654 655 var lien = ""; 656 657 for(var i=1;i<=fcontent[num].length;i++) 658 659 { 660 661 if(index==i) 662 663 txt += lien + "<img border=\"0\" src=\"" + url + "/images/PostIt_PuceRouge.png\" style=\"margin-left: 15px\">"; 664 665 666 else 667 668 txt += lien + "<a href=javascript:ChangeInfo(" + num + "," + i + ")><img border=\"0\" src=\"" + url + "/images/PostIt_PuceBleu.png\" style=\"margin-left: 15px\"></a>"; 669 670 671 } 672 673 674 675 piCpt.innerHTML = txt; 676 677 } 678 679} 680 681function ChangeInfo(num,i) 682 683{ 684 685 NumStop=-1; 686 687 index = i-1; 688 689 clearTimeout(fadecounter[num]); 690 691 changecontent(num); 692 693} 694 695 696 697function StartPading(num,nb) 698 699{ 700 701fcontent[num]=new Array(); 702 703for(var i=0;i<nb;i++) 704 705{ 706 707 fcontent[num][i]=document.getElementById("fcontent"+num+'-'+i).innerHTML 708 709} 710 711if (ie4||DOM2) 712
713 document.write('<div id="fscroller'+num+'" ></div>'); 714 715changecontent(num); 716 717} 718
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.