/* Date de création: 27/08/2002 */
function NoError() {return true;} window.onerror=NoError;
// --- date du jour ---
navvers = navigator.appVersion.substring(0,1);
if (navvers > 3)
	navok = true;
else
	navok = false;
today = new Date;
jour = today.getDay();
numero = today.getDate();
if (numero<10)
	numero = "0"+numero;
mois = today.getMonth();
if (navok)
	annee = today.getFullYear();
else
	annee = today.getYear();
TabJour = new Array("Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi");
TabMois = new Array("Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre");
messageDate = "&nbsp;" + TabJour[jour] + " " + numero + " " + TabMois[mois] + " " + annee;

// --- opacité de l'image ---
function makevisible(cur,which){
if (which==0) cur.filters.alpha.opacity=94
else cur.filters.alpha.opacity=70 }

// --- filtre pour le titre ---
function ejs_img_fx(img){	
	if(img && img.filters && img.filters[0]){
		img.filters[0].apply();
		img.filters[0].play();
	}
}
		
// --- 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.cash-lover.com";
		titre_site = "C@$H LoVER ~~ Ressources pour webmasters ~~";
		document.write('<A HREF="#" onClick="window.external.AddFavorite(url_site, titre_site);return(false);" style="font-family:verdana;font-size:7.5pt">Ajouter aux favoris</a> - ')
	}
	else {
		document.write('<font style="font-family:verdana;font-size:7.5pt">Site Réalisé par le Willy \'s GanG</font> - ')
	}
}
	
// --- mettre en page de démarrage ---
function AfficheHomePage() {
	if (document.all && document.getElementById) {
		document.write('<a HREF="#" onClick="HomePage(this);return(false);" style="font-family:verdana;font-size:7.5pt">Mettre en page de démarrage</a> - ');
	}
}
function HomePage(obj) {
	obj.style.behavior='url(#default#homepage)';
	obj.setHomePage('http://www.cash-lover.com');
}
// --- Le texte qui clignote en bleu ---
col1 = new Array()
col1[0]="375365"
col1[1]="44677E"
col1[2]="5D8CAC"
col1[2]="6EA6CA"
col1[4]="88CDFB"
col1[5]="6EA6CA"
col1[6]="5D8CAC"
col1[7]="44677E"
col1[8]="375365"

i_col1=0
doani=1
var timer1
var thislink

function animatelink1() {
if (document.all) {
if (doani==1) {
if (i_col1<=col1.length-1) {
thislink.color=col1[i_col1]
i_col1++
timer1=setTimeout("animatelink1()",50)
}
else {
i_col1=0
timer1=setTimeout("animatelink1()",50)
}
}
else {
clearTimeout(timer1)
}
}
}
function stopanimation1() {
clearTimeout(timer1)
thislink.color="375365"
doani1=0
} 
function startanimation1(mylink) {
clearTimeout(timer1)
thislink=eval("document.all."+mylink+".style")
doani=1
animatelink1()
} 
// le message de la barre de status
texte2 = '                         ';
x = texte2.length-1;
place = 0;
function defilStat()
	{
	if (place == texte2.length)
		{
		place = 0;
		}
if (place <= x)
		{
		texteDef = texte2.substring((texte2.length-(x-place)),texte2.length) + texte2.substring(0,place);
		place++;
		}
	window.status = texteDef;
	tempo22 = setTimeout("defilStat()", 150);
	}
// calendrier avec jours fériés
var ferie=new Array("01/01","01/04","01/05","08/05","09/05","20/05","14/07","15/08","01/11","11/11","25/12");
var mois=new Array("JANVIER","FEVRIER","MARS","AVRIL","MAI","JUIN","JUILLET","AOÛT","SEPTEMBRE","OCTOBRE","NOVEMBRE","DECEMBRE");

function disp(txt) { document.write(txt) }
function estFerie(j,m) {
	var nb=ferie.length;
	var test=false;
	for(var i=0;i<nb;i++) {
		if ((ferie[i].substring(0,2)==j)&&(ferie[i].substring(3,5)==m)) return true;
	}
	return false;
}
function calendar(colFond,colTitre,colTexte,colFerie,colOn) {
	var d_jour=new Date();
	var a=d_jour.getYear(); if (a<1970) {a=1900+a}
	var m=d_jour.getMonth()+1;
	var d=new Date(a,m-1,1);
	var dfin=new Date(a,m-1,1);
	var nb_jour=31;
	var aff_j="";
	for(var k=32;k>27;k--) {
		dfin.setMonth(m-1);
		dfin.setDate(k);
		if (dfin.getMonth()!=m-1) {nb_jour=k-1;}
	}
	var j1=d.getDay(); if (j1==0) j1=7;
	var jour=0;
	disp("<CENTER><table border='0' cellpadding='4' cellspacing='0'><tr><td valign='bottom'><font style='font-family:verdana;font-size:9pt;color:#FFA704'><b>"+mois[m-1]+" "+a+"</b></font></td></tr></table>");
	disp("<table width='147' border='0' cellpadding='0' cellspacing='0'><tr><td><center><TABLE border=0 cellspacing='1' cellpadding='2' style='font-family:verdana;font-size:7.5pt'>");
	disp("<TR align='center' bgcolor='"+colTitre+"' style='color:#FFFFFF;'><TD width='10'><b>Lu</b></TD><TD width='10'><b>Ma</b></TD><TD width='10'><b>Me</b></TD><TD width='10'><b>Je</b></TD><TD width='10'><b>Ve</b></TD><TD width='10'><b>Sa</b></TD><TD width='10'><b>Di</b></TD></TR>");
	for(var i=0;i<6;i++) {
		disp("<TR>");
		for (j=0;j<7;j++) {
			jour=7*i+j-j1+2; 
			aff_j=jour;
			if ((jour==d_jour.getDate())&&(m==d_jour.getMonth()+1)) {aff_j="<table cellpadding='0' cellspacing='0'><tr><td style='font-family:verdana;'><FONT color='"+colOn+"'><b>"+jour+"</b></FONT></td></tr></table>";}
			if ((7*i+j>=j1-1)&&(jour<=nb_jour)) {
				if ((j==6)||(estFerie(jour,m))) disp("<TD width='10' bgcolor='"+colFerie+"' align='right'><FONT color='#FFFFFF'>"+aff_j+"</FONT></TD>");
				else disp("<TD width='10' bgcolor='"+colFond+"' align='right'><FONT color='"+colTexte+"'>"+aff_j+"</FONT></TD>");
			}
			else disp("<TD width='10' bgcolor='"+colFond+"'>&nbsp;</TD>");
		}
		disp("</TR>");
	}
	disp("</TABLE></center></td></tr></table></CENTER>");
}

// messsage alléatoire qui défile ...
function defilmsg() {
var quotes=new Array()

quotes[0]='POUR TOUT SAVOIR SUR NOS SERVICES... CLIQUEZ CE MESSAGE !!!'
quotes[1]='POUR TOUT CONNAITRE DE NOS SERVICES... CLIQUEZ SUR CE MESSAGE !!!'
quotes[2]='POUR CONNAITRE TOUTE L\'ETENDUE DE NOS SERVICES... CLIQUEZ CE MESSAGE !!!'
quotes[3]='POUR SAVOIR COMMENT UTILISER AU MIEUX NOS SERVICES... CLIQUEZ CE MESSAGE !!!'
quotes[4]='POUR BENEFICIER DE TOUS LES AVANTAGES DE NOS SERVICES... CLIQUEZ CE MESSAGE !!!'
quotes[5]='POUR TOUT SAVOIR SUR LE FONCTIONNEMENT DE NOS SERVICES... CLIQUEZ CE MESSAGE !!!'
quotes[6]='INFOS UTILES... AVANTAGES... FONCTIONNEMENT DE NOS SERVICES... CLIQUEZ CE MESSAGE !!!'
quotes[7]='POUR SAVOIR COMMENT BENEFICIER DE TOUS LES AVANTAGES DE NOS SERVICES... CLIQUEZ CE MESSAGE !!!'

var whichquote=Math.floor(Math.random()*(quotes.length))
document.write(quotes[whichquote])
}

// pour le formulaire -- bloque le bouton de validation si le reglement n'est pas accepté
var checkobj

function agreesubmit(el){
checkobj=el
if (document.all||document.getElementById){
for (i=0;i<checkobj.form.length;i++){  //hunt down submit button
var tempobj=checkobj.form.elements[i]
if(tempobj.type.toLowerCase()=="submit")
tempobj.disabled=!checkobj.checked
}
}
}

function defaultagree(el){
if (!document.all&&!document.getElementById){
if (window.checkobj&&checkobj.checked)
return true
else{
alert("ATTENTION :\nVous devez cocher la case qui confirme que vous avez bien lu notre règlement et que vous l'acceptez !")
return false
}
}
}

// --- le TR des TABLE qui change de couleur
function setPointer(theRow, theAction, theDefaultColor, thePointerColor, theMarkColor) {
    var theCells = null;
	
    // 1. Pointer and mark feature are disabled or the browser can't get the
    //    row -> exits
    if ((thePointerColor == '' && theMarkColor == '')
        || typeof(theRow.style) == 'undefined') {
        return false;
    }

    // 2. Gets the current row and exits if the browser can't get it
    if (typeof(document.getElementsByTagName) != 'undefined') {
        theCells = theRow.getElementsByTagName('td');
    }
    else if (typeof(theRow.cells) != 'undefined') {
        theCells = theRow.cells;
    }
    else {
        return false;
    }

    // 3. Gets the current color...
    var rowCellsCnt  = theCells.length;
    var domDetect    = null;
    var currentColor = null;
    var newColor     = null;
    // 3.1 ... with DOM compatible browsers except Opera that does not return
    //         valid values with "getAttribute"
    if (typeof(window.opera) == 'undefined'
        && typeof(theCells[0].getAttribute) != 'undefined') {
        currentColor = theCells[0].getAttribute('bgcolor');
        domDetect    = true;
    }
    // 3.2 ... with other browsers
    else {
        currentColor = theCells[0].style.backgroundColor;
        domDetect    = false;
    } // end 3

    // 4. Defines the new color
    // 4.1 Current color is the default one
    if (currentColor == ''
        || currentColor.toLowerCase() == theDefaultColor.toLowerCase()) {
        if (theAction == 'over' && thePointerColor != '') {
            newColor = thePointerColor;
        }
        else if (theAction == 'click' && theMarkColor != '') {
            newColor = theMarkColor;
        }
    }
    // 4.1.2 Current color is the pointer one
    else if (currentColor.toLowerCase() == thePointerColor.toLowerCase()) {
        if (theAction == 'out') {
            newColor = theDefaultColor;
        }
        else if (theAction == 'click' && theMarkColor != '') {
            newColor = theMarkColor;
        }
    }
    // 4.1.3 Current color is the marker one
    else if (currentColor.toLowerCase() == theMarkColor.toLowerCase()) {
        if (theAction == 'click') {
            newColor = (thePointerColor != '')
                     ? thePointerColor
                     : theDefaultColor;
        }
    } // end 4

    // 5. Sets the new color...
    if (newColor) {
        var c = null;
        // 5.1 ... with DOM compatible browsers except Opera
        if (domDetect) {
            for (c = 0; c < rowCellsCnt; c++) {
                theCells[c].setAttribute('bgcolor', newColor, 0);
            } // end for
        }
        // 5.2 ... with other browsers
        else {
            for (c = 0; c < rowCellsCnt; c++) {
                theCells[c].style.backgroundColor = newColor;
            }
        }
    } // end 5

    return true;
} // end of the 'setPointer()' function

