// JavaScript Document

// -- PHOTOS ALEATOIRES
function photos_aleatoires() {
var nb_images = 7;//Nombre de bannieres en rotation
var now = new Date()
var sec = now.getSeconds()
var ad = sec % nb_images;
ad +=1;

if (ad==1) {
	url=
	alt="Sports &amp; Brand contents";
	image="images/images_aleatoires/img_01.jpg";//URL DE LA BANNIERE
	width="167";//LARGEUR DE LA BANNIERE
	height="142";//HAUTEUR DE LA BANNIERE
	}

if (ad==2) {
	url=
	alt="Sports &amp; Brand contents";
	image="images/images_aleatoires/img_02.jpg";//URL DE LA BANNIERE
	width="167";//LARGEUR DE LA BANNIERE
	height="142";//HAUTEUR DE LA BANNIERE
	}

if (ad==3) {
	url=
	alt="Sports &amp; Brand contents";
	image="images/images_aleatoires/img_03.jpg";//URL DE LA BANNIERE
	width="167";//LARGEUR DE LA BANNIERE
	height="142";//HAUTEUR DE LA BANNIERE
	}

if (ad==4) {
	url=
	alt="Sports &amp; Brand contents";
	image="images/images_aleatoires/img_04.jpg";//URL DE LA BANNIERE
	width="167";//LARGEUR DE LA BANNIERE
	height="142";//HAUTEUR DE LA BANNIERE
	}

if (ad==5) {
	url=
	alt="Sports &amp; Brand contents";
	image="images/images_aleatoires/img_05.jpg";//URL DE LA BANNIERE
	width="167";//LARGEUR DE LA BANNIERE
	height="142";//HAUTEUR DE LA BANNIERE
	}

if (ad==6) {
	url=
	alt="Sports &amp; Brand contents";
	image="images/images_aleatoires/img_06.jpg";//URL DE LA BANNIERE
	width="167";//LARGEUR DE LA BANNIERE
	height="142";//HAUTEUR DE LA BANNIERE
	}

if (ad==7) {
	url=
	alt="Sports &amp; Brand contents";
	image="images/images_aleatoires/img_07.jpg";//URL DE LA BANNIERE
	width="167";//LARGEUR DE LA BANNIERE
	height="142";//HAUTEUR DE LA BANNIERE
	}

if (ad==8) {
	url=
	alt="Sports &amp; Brand contents";
	image="images/images_aleatoires/img_08.jpg";//URL DE LA BANNIERE
	width="167";//LARGEUR DE LA BANNIERE
	height="142";//HAUTEUR DE LA BANNIERE
	}	

document.write('<img src="' + image + '" width=')
document.write(width + ' height=' + height + ' ');
document.write('alt="' + alt + '" align="top" />');
}

// -- FIN PHOTOS ALEATOIRES


// CONTROLE FORMULAIRE

function controler_nb_caracteres(valeur, limite) {
if (valeur.length > limite) {
alert("Votre texte contient " + valeur.length + " caractères, alors que la limite est de " + limite + " caractères.");
}
//else if (valeur.length == 0) alert("Ce champ doit être rempli");
//else alert("Ce champ est OK");
}

// contrôles 

<!-- Begin
function checkrequired(which) {
var pass=true;
var tempobj;
if (document.images) {
for (i=0;i<which.length;i++) {
tempobj=which.elements[i];
if (tempobj.name)if (tempobj.name.substring(0,8)=="required") {
if (((tempobj.type=="text"||tempobj.type=="textarea")&&
tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&
tempobj.selectedIndex==0)) {
pass=false;
break;
}
}
}
}
if (!pass) {
shortFieldName=tempobj.name.substring(8,30).toUpperCase();
alert("This information is required: "+shortFieldName+".");
return false;
}
else return true;
}
//  End -->
// OBJET FLASH
function objectFlash(theFile, largeur, hauteur, Variable)
{
    document.write('<object type=\"application/x-shockwave-flash\" flashvars=\"' + Variable + '\" data=\"' + theFile + '\" width=\"' + largeur + '\" height=\"' + hauteur + '\">' +
    ' <param name=\"flashvars\" value=\"' + Variable + '\" />' +
    ' <param name=\"movie\" value=\"' + theFile + '\" />' +
	' <param name=\"quality\" value=\"high\" />' +
    ' </object>');

}
// Fin objet Flash -->