//Ajouter aux favoris
nav = navigator.appName.substring(0,3);
ver = navigator.appVersion.substring(0,1);

function addFav()
{
 if (nav=="Mic"&&ver>=4){
  url_site="http://www.teissier.fr";
  titre_site = "Entreprises TEISSIER - BIENVENUE - Page perso";
  window.external.AddFavorite(url_site, titre_site);
 }else{
  alert('Faites CTRL+D pour ajouter iubito.free.fr &agrave; vos favoris !');
 }
}

/*function Jukebox(id)
{
// window.open('http://iubito.free.fr/jukebox/jukebox.htm','jukebox','toolbar=0,location=0,directories=0,status=0,scrollbars=1,resizable=0,copyhistory=0,menuBar=0,width=400,height=170,top=0,left=0');
 window.open('http://iubito.free.fr/jukebox/jukebox.php?id='+id
	,'jukebox','toolbar=0,location=0,directories=0,status=0,scrollbars=1,resizable=0,copyhistory=0,menuBar=0,width=400,height=170,top=0,left=0');
}*/


/*----------------------------------------------
** FADING SUR LES LIENS AU SURVOL
** http://www.toutpourtonsite.com/article77.html
**/ 
/* CHANGEMENTS A FAIRE */
startColor = "#FFCC66"; // MouseOut link color
endColor = "#6699CC"; // MouseOver link color

stepIn = 15; // delay when fading in
stepOut = 15; // delay when fading out

/*
** set to true or false; true will
** cause all links to fade automatically
***/
autoFade = false;
/*
** set to true or false; true will cause all CSS
** classes with "fade" in them to fade onmouseover
***/
sloppyClass = true;
/* FIN DES CHANGEMENTS A FAIRE */

hexa = new makearray(16); 
for(var i=0;i<10;i++) 
hexa[i]=i;
hexa[10]="a";hexa[11]="b";hexa[12]="c";hexa[13]="d";hexa[14]="e";hexa[15]="f";

//If not Opera
if (navigator.userAgent.toLowerCase().indexOf("opera") == -1) {
	document.onmouseover=domouseover;document.onmouseout=domouseout;
}
startColor=dehexize(startColor.toLowerCase());endColor=dehexize(endColor.toLowerCase());
var fadeId=new Array(); 
function dehexize(Color){
var colorArr=new makearray(3);
for (i=1;i<7;i++){
for (j=0;j<16;j++){
if(Color.charAt(i)==hexa[j]){
if(i%2!=0)
colorArr[Math.floor((i-1)/2)]=eval(j)*16;
else
colorArr[Math.floor((i-1)/2)]+=eval(j);
}}}
return colorArr;}
function domouseover(){
if(document.all){
var srcElement=event.srcElement;
if((srcElement.tagName=="A"&&autoFade)||srcElement.className=="fade"||(sloppyClass&&srcElement.className.indexOf("fade")!=-1))
fade(startColor,endColor,srcElement.uniqueID,stepIn);
}}
function domouseout(){
if(document.all){
var srcElement=event.srcElement;
if((srcElement.tagName=="A"&&autoFade)||srcElement.className=="fade"||(sloppyClass&&srcElement.className.indexOf("fade")!=-1))
fade(endColor,startColor,srcElement.uniqueID,stepOut);
}}
function makearray(n){this.length=n;for(var i=1;i<=n;i++)this[i]=0;return this;} 
function hex(i){
if(i<0)return "00";
else if(i>255)return "ff";
else return ""+hexa[Math.floor(i/16)]+hexa[i%16];}
function setColor(r,g,b,element){
var hr=hex(r);var hg=hex(g); var hb=hex(b);
element.style.color="#"+hr+hg+hb;
}
function fade(s,e,element,step){ 
var sr=s[0];var sg=s[1];var sb=s[2];
var er=e[0];var eg=e[1];var eb=e[2];
if(fadeId[0]!=null&&fade[0]!=element){
setColor(sr,sg,sb,eval(fadeId[0]));
var i=1;
while(i<fadeId.length){clearTimeout(fadeId[i]);i++;}
}
for(var i=0;i<=step;i++){
fadeId[i+1]=setTimeout("setColor(Math.floor("+sr+" *(( "+step+" - "+i+" )/ "+step+" ) + "+er+" * ("+i+"/"+
step+")),Math.floor("+sg+" * (( "+step+" - "+i+" )/ "+step+" ) + "+eg+" * ("+i+"/"+step+
")),Math.floor("+sb+" * (("+step+"-"+i+")/"+step+") + "+eb+" * ("+i+"/"+step+")),"+element+");",i*step);
}
fadeId[0]=element;}



/****** TEXT COLOUR CYCLER v1.1 by Angus Turnbull http://www.twinhelix.com ******/
// Please leave the above line in the source, and a link to my site in your page somewhere.
// After all, if you found these scripts useful, won't your visitors?
// Run the rest of this through my comment trimmer if you want before deploying.

var isDOM=document.getElementById?1:0;
var isIE=document.all?1:0;
var isNS4=(navigator.appName=='Netscape'&&!isDOM)?1:0;
var isIE4=(isIE&&!isDOM)?1:0;
var isDyn=(isDOM||isIE4||isNS4);
function getRef(id,par){
 par=(!par?document:(par.navigator?par.document:par));
 return (isIE?par.all[id]:
  (isDOM?(par.getElementById?par:par.ownerDocument).getElementById(id):
  par.layers[id]));
}
// *** TEXT CYCLING FUNCTIONS ***
function txcCycle(){with(this){
 if(!div) div=getRef(myName+'Layer');
 count=((count-step)%colours.length);
 var str='<span class="'+myName+'">';
 for (var i=0;i<text.length;i++){
  var pos=(count+i)%colours.length;
  if (pos<0)pos+=colours.length;
  str+='<font color="'+colours[pos]+'">'+text.substring(i,i+1)+'</font>';
 }
 str+='</span>';
 if(isNS4) with(div.document){write(str);close()}
 else div.innerHTML=str;
 setTimeout(myName+'.cycle()',interval);
}}
function TextCycler(myName)
{
 this.myName=myName;this.div=null;this.colours=null;
 this.interval=100;this.count=0;this.step=1;this.text='';this.cycle=txcCycle;
}