1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176
|
<html>
<head>
<SCRIPT language="javascript">
<!--
document.write('<style type="text/css">'+
'.rouge {color:#666699; }'+
'.rougeOver {cursor:pointer; color:#CC0000; }'+
' body {cursor:default; }'+
'</style>')
var ns4=document.layers?1:0
var ie4=document.all?1:0
var ns6=document.getElementById&&!document.all?1:0
if(navigator.appName.substring(0,3) == "Net")
document.captureEvents(Event.MOUSEMOVE)
document.onmousemove = get_mouse
var textBull,transp,transpOmbr,Opac=0,OpacOmbr=0,bull=0,afBul=0
var effac=setTimeout('infBul(0)',9000)
if (ie4){
var PolicText = 'Gautami,Square721 BT,Trebuchet MS,System,Arial,Tahoma'
}
else {
var PolicText = 'Arial,Tahoma,Verdana'
}
function get_mouse(e){
x = (navigator.appName.substring(0,3) == "Net") ? e.pageX : event.x+document.body.scrollLeft
y = (navigator.appName.substring(0,3) == "Net") ? e.pageY : event.y+document.body.scrollTop
PosBullHoriz = x
PosBullVerti = y
}
function infBul(arg){
if (arg != 1){
argOp = arg
if (arg != 0 && afBul == 0){
setTimeout('afBul=1',200)
setTimeout('infBul(argOp)',400)
}
if (ie4){
if (afBul == 1 && arg != 0 && Opac < 100){
Opac += 2
transp = 'filter: alpha(opacity='+Opac+')'
if (Opac < 10){
OpacOmbr = 0
transpOmbr = 'filter: alpha(opacity='+OpacOmbr+')'
}
if (OpacOmbr < 20 && Opac > 30){
OpacOmbr += 2
transpOmbr = 'filter: alpha(opacity='+OpacOmbr+')'
}
setTimeout('infBul(argOp)',1)
}
if (arg == 0 && Opac > 0){
Opac -= 2
transp = 'filter: alpha(opacity='+Opac+')'
if (OpacOmbr > 0 && Opac < 80){
OpacOmbr -= 2
transpOmbr = 'filter: alpha(opacity='+OpacOmbr+')'
}
setTimeout('infBul(argOp)',2)
}
scrollPag = document.body.scrollTop
}
else {
if (afBul == 1 && arg != 0 && Opac < 10){
Opac ++
valOpac = '.'+Opac
if (Opac == 10){
valOpac = Opac
}
transp = '-moz-opacity: '+valOpac+''
if (Opac < 2){
OpacOmbr = 0
valOpacOmbr = '.'+OpacOmbr
transpOmbr = '-moz-opacity: '+valOpacOmbr+''
}
if (OpacOmbr < 2 && Opac > 4){
OpacOmbr ++
valOpacOmbr = '.'+OpacOmbr
transpOmbr = '-moz-opacity: '+valOpacOmbr+''
}
setTimeout('infBul(argOp)',50)
}
if (arg == 0 && Opac > 0){
Opac --
valOpac = '.'+Opac
transp = '-moz-opacity: '+valOpac+''
if (OpacOmbr > 0 && Opac < 8){
OpacOmbr --
valOpacOmbr = '.'+OpacOmbr
transpOmbr = '-moz-opacity: '+valOpacOmbr+''
}
setTimeout('infBul(argOp)',60)
}
scrollPag = window.pageYOffset
}
larg_ecran = document.body.clientWidth
haut_ecran = document.body.clientHeight
if (arg != 0){
limitEcran = scrollPag + haut_ecran
PosHoriz = PosBullHoriz + 10
PosVertic = PosBullVerti + 20
textBull = argOp
}
}
else {
Opac = 0
}
leCadr = '<table border="1" cellpadding="1" cellspacing="0" style="border:1px solid #786654; border-collapse: collapse; font-weight: normal; font-family: '+PolicText+'; font-size: 11px; color: #FFFFFF; '+transp+'; " bgcolor=#494B5D><tr><td><nobr> '+textBull+' </nobr></td></tr></table>'
l_Ombr = '<table border="0" cellpadding="0" cellspacing="0" style="border:0px solid #A2A2A2; border-collapse: collapse; font-weight: normal; font-family: '+PolicText+'; font-size: 11px; color: #ffffff; '+transpOmbr+'; " bgcolor=#000000><tr><td><nobr> '+textBull+' </nobr></td></tr></table>'
if (afBul == 1){
if (Opac == 0){
document.getElementById("leTest").innerHTML = ""
document.getElementById("leTest").style.visibility = 'hidden'
document.getElementById("leTestO").innerHTML = ""
document.getElementById("leTestO").style.visibility = 'hidden'
bull = 0
afBul = 0
}
else {
document.getElementById("leTest").innerHTML = leCadr
document.getElementById("leTest").style.visibility = 'visible'
document.getElementById("leTestO").innerHTML = l_Ombr
document.getElementById("leTestO").style.visibility = 'visible'
largBull = document.getElementById("leTest").offsetWidth
hautBull = document.getElementById("leTest").clientHeight
limiteVert = PosBullVerti + hautBull + 26
if (((PosBullHoriz + largBull + 4) > larg_ecran)&&(limiteVert > limitEcran)){
PosHoriz = larg_ecran - (largBull + PosBullHoriz) + (PosBullHoriz - 4)
PosVertic = PosVertic - 50
}
if (((PosBullHoriz + largBull + 4) > larg_ecran)&&(limiteVert <= limitEcran)){
PosHoriz = larg_ecran - (largBull + PosBullHoriz) + (PosBullHoriz - 4)
}
if (((PosBullHoriz + largBull + 4)<= larg_ecran)&&(limiteVert > limitEcran)){
PosVertic = PosVertic - 30
}
if (bull == 0){
document.getElementById("leTest").style.top = PosVertic
document.getElementById("leTest").style.left = PosHoriz
document.getElementById("leTest").style.zIndex = 1000
document.getElementById("leTestO").style.top = PosVertic + 6
document.getElementById("leTestO").style.left = PosHoriz + 7
document.getElementById("leTestO").style.zIndex = 999
bull = 1
clearTimeout(effac)
effac=setTimeout('infBul(0)',9000)
}
}
}
}
function sourisPress(){
infBul(1)
}
document.onmousedown = sourisPress
setTimeout('infBul(0)',600)
document.write('<div ID="leTest" style=position:absolute></div><div ID="leTestO" style=position:absolute></div>')
//-->
</SCRIPT>
</head>
<body>
<p align="right">Pour tester la bulle, passez votre souris sur ce <a class=rouge onmouseover="this.className='rougeOver';infBul('Quelque soit la position du lien, voici une bulle qui ne sort pas du cadre de la fenêtre !')" onmouseout="this.className='rouge';infBul(0)" onclick="this.className='rouge';" >lien</a> !</p>
</body>
</hmtl> |
Partager