/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \
|		
|		Copyright (c) 2005 Les Éditions Du Cerf
|		
\ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */

/*function SmartMenuRoll() {
	args=SmartMenuRoll.arguments;
	for (n=0;n<args.length;n++) {
		if(document.getElementById(args[n])) {
			el=document.getElementById(args[n]).childNodes;
			for (a=0;a<el.length;a++) {
				if (el[a].nodeName=="LI") {
					el[a].onmouseover=function() {
						this.className+=" over";
					}
					el[a].onmouseout=function() {
						this.className=this.className.replace(new RegExp(" over\\b"), "");
						this.className="";
					}
				}
			}
		}
	}
}*/

function SmartMenuRoll(cible) {
	args=SmartMenuRoll.arguments;
	for (n=0;n<args.length;n++) {
		if(document.getElementById(args[n])) {
			el=document.getElementById(args[n]).childNodes;
			for (a=0;a<el.length;a++) {
				if (el[a].nodeName=="LI") {
					sel=el[a].childNodes;
					for (b=0;b<sel.length;b++) {
						if (sel[b].nodeName=="A") {
							sel[b].onmouseover=function() {if (this.firstChild.nextSibling&&this.firstChild.nextSibling.nodeName=="IMG") roll(this.firstChild.nextSibling);}
							sel[b].onmouseout=function() {if (this.firstChild.nextSibling&&this.firstChild.nextSibling.nodeName=="IMG")roll(this.firstChild.nextSibling);}
						}
					}
				}
			}
		}
	}
}

// Merci à Chris Heilmann de http://www.onlinetools.org/
// pour findimg() et roll(o). Thanx goes to Chris Heilmann
// from http://www.onlinetools.org/
function findimg() {
	var imgs,i;
	imgs=document.getElementsByTagName('img');
	for(i=0;i<imgs.length;i++) {
		if (/roll/.test(imgs[i].className)) {
			imgs[i].onmouseover=function(){roll(this);};
			imgs[i].onmouseout=function(){roll(this);};
		}
	}
}

function roll(o) {
	var src,ftype,newsrc;
	src=o.src;
	ftype=src.substring(src.lastIndexOf('.'), src.length);
	if(/_on/.test(src)) {
		newsrc=src.replace('_on','');
	} else {
		newsrc=src.replace(ftype, '_on'+ftype);
	}
	o.src=newsrc;
}

window.onload=function() {
	findimg();
	SmartMenuRoll("MarqueUL","ThemeUL");
}

function verif_recherche() {
var mot=false;
var longueur=false;

if (document.myform_recherche.mot.value=='')
{
alert("Merci de saisir un titre")
document.myform_recherche.mot.focus()
}
else
{
mot=true
}

if (document.myform_recherche.mot.value.length < 2)
{
alert("Merci de saisir au minimum 3 caractères")
document.myform_recherche.mot.focus()
 }
else
{
longueur=true
}

if (mot & longueur)
{
document.myform_recherche.submit(); 
}

} 

