<SCRIPT LANGUAGE="JavaScript">
<!--
//D'autres script,applet,images sur webgraf.Com
//Mathieu Gros, webmaster@webgraf.Com
AvailableChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789âàçêèéïôù'@ !?.:/-,_~";
caracteres = new Array();
for ( var i = 0; i < 83; i++) {
filename = "font/c" + i + ".gif";
caracteres[i] = new Image();
caracteres[i].src = filename;
}
for ( var i = 100; i < 157; i++) {
filename = "font/c" + i + ".gif";
caracteres[i] = new Image();
caracteres[i].src = filename;
}
function LedBlink(Texte,LeLien,LedSize,Vitesse,Fonction) {
this.BlinkTexte = " " + Texte + " ";
this.BlinkSpeed= Vitesse;
this.Font = LedSize;
this.fonction = Fonction + '.Blink()';
this.Size = this.BlinkTexte.length;
this.Lien = LeLien;
this.timeout = null;
this.basename = Fonction;
this.show = true;
this.datas = new Array(this.Size);
this.decalage = 0;
this.Init = Initialise;
this.Draw = DrawBoard;
this.GoUrl = Go;
this.Blink = TheBlink;
this.SetMessage = SetMsg;
this.SetSpeed = SetSpd;
this.SetLink = SetLnk;
this.Stop = StopAll;
this.Draw();
this.Init();
this.Blink();
}
function DrawBoard() {
document.write('<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0>');
document.write('<TR>');
if (this.Font == "small") {
this.decalage = 74;
for (var x = 0; x < this.Size; x++) {
document.write('<TD WIDTH=10 HEIGHT=17><A HREF="" TARGET="_self" onClick="this.href='+this.basename+'.GoUrl();"><IMG SRC="font/c147.gif" WIDTH=11 HEIGHT=17 BORDER=0 NAME="'+this.basename+x+'"></A></TD>');
}
}
else {
this.decalage = 0;
for (var x = 0; x < this.Size; x++) {
document.write('<TD WIDTH=12 HEIGHT=23><A HREF="" TARGET="_self" onClick="this.href='+this.basename+'.GoUrl();"><IMG SRC="font/c73.gif" WIDTH=13 HEIGHT=23 BORDER=0 NAME="'+this.basename+x+'"></A></TD>');
}
}
document.write('</TR>');
document.write('</TABLE>');
}
function Initialise() {
if (this.Font == "small") {
this.BlinkTexte = this.BlinkTexte.toUpperCase();
}
for (var x = 0; x < this.Size; x++) {
this.datas[x] = caracteres[AvailableChars.indexOf(this.BlinkTexte.charAt(x)) + this.decalage];
}
}
function TheBlink() {
if (this.show) {
for (var x = 0; x < this.Size; x++) {
document.images[this.basename+x].src = this.datas[x].src;
}
}
else {
for (var x = 0; x < this.Size; x++) {
document.images[this.basename+x].src =caracteres[73+this.decalage].src;
}
}
this.show = !this.show;
this.timeout = window.setTimeout(this.fonction,this.BlinkSpeed);
}
function Go() {
return this.Lien;
}
function SetMsg(NewMsg) {
if (NewMsg.length <= this.Size) {
f1 = Math.floor((this.Size - NewMsg.length) / 2);
f2 = Math.floor( ( (this.Size - NewMsg.length) / 2) + ( (this.Size - NewMsg.length) % 2) );
for (var i = 0; i < f1; i++) {
NewMsg = " " + NewMsg;
}
for (var i = 0; i < f2; i++) {
NewMsg = NewMsg + " ";
}
this.BlinkTexte = NewMsg;
this.Init();
}
}
function SetSpd(NewSpd) {
this.BlinkSpeed = NewSpd;
}
function SetLnk(NewLnk) {
this.Lien = NewLnk;
}
function StopAll() {
clearTimeout(this.timeout);
this.timeout = null;
}
//-->
</SCRIPT>
|