var agent=navigator.userAgent.toLowerCase();
var ver=parseInt(navigator.appVersion);
if (navigator.userAgent.indexOf('Win')!=-1){
if ((agent.indexOf("mozilla")!=-1) && (ver>=4) && (navigator.appName.indexOf("Netscape")!=-1))
document.write('<LINK HREF="/hatier/media/FeuillesDeStyle/stylesNS.css" REL="stylesheet" TYPE="text/css">');
else
document.write('<LINK HREF="/hatier/media/FeuillesDeStyle/styles.css" REL="stylesheet" TYPE="text/css">');
}else{
document.write('<LINK HREF="/hatier/media/FeuillesDeStyle/stylesMac.css" REL="stylesheet" TYPE="text/css">');
}
rnd.today=new Date();
rnd.seed=rnd.today.getTime();
var MyNewWindow=null;
var ns4=(document.layers);
var ie4=(document.all);
ns4=(document.layers)?true:false
ie4=(document.all)?true:false
function PopUpSize(url,name,width,height) {
settings="toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width="+width+",height="+height;
MyNewWindow=window.open('',name,settings);
MyNewWindow.document.write('<html><head><title>Image</title></head><body bgcolor="white" leftmargin=0 topmargin=0 marginheight=0 marginwidth=0><img src="'+url+'" width="'+width+'" height="'+height+'" border=0> </body></html>');
}
function PopUpSizeNoScroll(PageURL,strName,iwidth,iheight) {
strProp='width='+iwidth+',height='+iheight+',left=100,top=100,directories=0,hotkeys=1,location=0,menubar=0,resizable=1,scrollbars=0,status=0,titlebar=0,toolbar=0';
MyNewWindow=window.open(PageURL,strName,strProp);
}
function popupCentree(width,height,url,nomFenetre) {
var sw=screen.width;
var sh=screen.height;
var x=(sw-width)/2;
var y=(sh-height)/2;
var settings='toolbar=NO,status=NO,resizable=NO,scrollbars=NO,width='+width+',height='+height+',left='+x+',top='+y;
var fenetre=window.open(url,nomFenetre,settings);
fenetre.focus();
return true;
}
function rand(number) {
return Math.ceil(rnd()*number);
}
function rnd() {
rnd.seed=(rnd.seed*9301+49297)%233280;
return rnd.seed/(233280.0);
}
function afficherNs(layerns) {
hideNs1();
hideNs2();
if (layerns!="") show(layerns);
}
function hideNs2() {
hide('divEcole');
hide('divCollege');
hide('divLycee');
hide('divDocu');
hide('divBcd');
}
function hideNs1() {
hide('pourVous');
hide('echanger');
hide('editions');
hide('apropos');
}
image1=new Image;
image1.src="/hatier/media/images/PRI01_ACC0_40.gif";
image2=new Image;
image2.src="/hatier/media/images/pictoecole2.gif";
image3=new Image;
image3.src="/hatier/media/images/pictocollege2.gif";
image4=new Image;
image4.src="/hatier/media/images/pictolycee2.gif";
image5=new Image;
image5.src="/hatier/media/images/pictodocu2.gif";
image6=new Image;
image6.src="/hatier/media/images/pictopedagogie2.gif";
image7=new Image;
image7.src="/hatier/media/images/pictobdc2.gif";
function hidelayer() {
hide('ecolinter');
hide('coleinter');
hide('lyceinter');
hide('docuinter');
hide('bcdinter');
hide('extrinter');
}
function posterecherche() {
if(verifcaractere(document.rechercheRapide.motsCles.value)){
return true;
} else
return false;
}
function verifcaractere(chaine) {
var conte=0;
var conta=0;
if(chaine.length<3){
alert("Vous devez saisir plus de deux caractères dans le champ recherche.");
return false;
}
if(chaine.length<6){
for(var i=0;i<chaine.length;i++){
if(chaine.charAt(i)==" "){
alert('Saisie incorecte.');
return false;
}
}
return true;
}else{
for(var i=0;i<chaine.length;i++){
if(chaine.charAt(i)==" "){
if(i-conte<4){
conta++;
}
conte=i;
}
}
if(conta>2){
alert('Saisie incorecte.');
return false;}
return true;
}
}
var timeInterval;
var timercounter=0;
var timerstarted=0;
xMousePos=0;
yMousePos=0;
xMousePosMax=0;
yMousePosMax=0;
function show(id) {
if (id!="") {
if (ns4) {
if (document.layers[id]) document.layers[id].visibility="show"
} else if (ie4) {
if (document.all[id]) document.all[id].style.visibility="visible"
} else {
if (document.getElementById(id)) document.getElementById(id).style.visibility="visible";
}
timercounter=0;
if (!timerstarted)
{
timeInterval=setInterval('timercallback()', 1000);
timerstarted=1;
if (document.layers) {
document.captureEvents(Event.MOUSEMOVE);
document.onmousemove=captureMousePosition;
} else if (document.all) {
document.onmousemove=captureMousePosition;
} else if (document.getElementById) {
document.onmousemove=captureMousePosition;
}
}
}
}
function captureMousePosition(e) {
if (document.layers) {
xMousePos=e.pageX;
yMousePos=e.pageY;
xMousePosMax=window.innerWidth+window.pageXOffset;
yMousePosMax=window.innerHeight+window.pageYOffset;
} else if (document.all) {
xMousePos=window.event.x+document.body.scrollLeft;
yMousePos=window.event.y+document.body.scrollTop;
xMousePosMax=document.body.clientWidth+document.body.scrollLeft;
yMousePosMax=document.body.clientHeight+document.body.scrollTop;
} else if (document.getElementById) {
xMousePos=e.pageX;
yMousePos=e.pageY;
xMousePosMax=window.innerWidth+window.pageXOffset;
yMousePosMax=window.innerHeight+window.pageYOffset;
}
}
function timercallback() {
timercounter=timercounter+1;
if (timercounter>1 && ((xMousePos>330 && yMousePos>200) || (yMousePos>410) || (xMousePos>760) || (xMousePos<190 && yMousePos<250)))
{
afficherNs('');
clearInterval(timeInterval);
timerstarted=0;
timercounter=0;
}
}
function hide(id) {
if (id!="") {
if (ns4) {
if (document.layers[id]) document.layers[id].visibility="hide"
} else if (ie4) {
if (document.all[id]) document.all[id].style.visibility="hidden"
} else {
if (document.getElementById(id)) document.getElementById(id).style.visibility="hidden";
}
}
}
test = false;
function isBlank(strSaisie) {
var iSaisie=0;
var strBlank=""
if (strSaisie!="") {
for (i=0;i<strSaisie.length;i++) if (strSaisie.charAt(i)!=' ') iSaisie=1;
if (iSaisie==1) return false;
}
return true;
}
function FormCheck(obj) {
if (!test) {
if (isBlank(obj.motsCles.value)) return true;
else {
test=true;
obj.submit();
return true;
}
} else {
alert('Validation déjà effectuée');
return false;
}
}

