function openwinxy(url,x,y) 
{open(url,"","width=x,height=y,toolbar=no,scrollbars=yes,resizable=yes menubar=no");}


function closewin() 
{close();}

	/* met le focus dans le champ de saisie */

function metfocus(form,nom)
 {
 document.form.nom.focus(); 
 }

// ferme la fenetre url après tps milliseconde 
function fermeauto(tps) 
{
var Tempo;
Tempo= setTimeout("close()",tps);
}

// ouvre une fenetre quand on tente de fermer le navigateur
var exit=true;
function whenexit(url){
if (exit)
open(url,"goto_window");
}

/* fonction qui affiche la date et heure courante */
function HeureDate() {
        maintenant = new Date();
		   // date actuelle
		  jour= maintenant.getDate();
        mois= maintenant.getMonth()+1;
        annee= maintenant.getYear();
        // heure actuelle :
        heure = maintenant.getHours();
        minute = maintenant.getMinutes();
        seconde = maintenant.getSeconds();
document.write(" date : ",jour," : ",mois," : ",annee,"<BR>");
document.write("heure :",heure," : ",minute," : ",seconde,"<BR>");
}		  

/* fonction copier presse papier */
function copy(text2copy) {
  if (window.clipboardData) {
    window.clipboardData.setData("Text",text2copy);
  } else {
    var flashcopier = 'flashcopier';
    if(!document.getElementById(flashcopier)) {
      var divholder = document.createElement('div');
      divholder.id = flashcopier;
      document.body.appendChild(divholder);
    }
    document.getElementById(flashcopier).innerHTML = '';
    var divinfo = '<embed src="/plugins/_clipboard.swf" FlashVars="clipboard='+escape(text2copy)+'" width="0" height="0" type="application/x-shockwave-flash"></embed>';
    document.getElementById(flashcopier).innerHTML = divinfo;
    }
}			  


/* hotel-pa */



function namosw_init_scrolltext()
{
  list = new Array();
  for (var i = 0, top = 0; i < namosw_init_scrolltext.arguments.length; i += 2) {
    obj = eval('document.'+namosw_init_scrolltext.arguments[i]);
    if (obj == null) continue;
    list[top++] = obj;
    for (str = '', j = 0; j < namosw_init_scrolltext.arguments[i+1]; j++)
      str += ' ';
    str += obj.value;
    obj.value = str;
  }
  if (top > 0) {
    document.namosw_scrolltext_list = list;
    setTimeout('namosw_scrolltext()', 100);
  }
}

function namosw_scrolltext()
{
  for (i = 0; i < document.namosw_scrolltext_list.length; i++) {
    obj   = document.namosw_scrolltext_list[i];
    str   = obj.value.substring(1, obj.value.length);
    str  += obj.value.substring(0, 1);
    obj.value = str;
  }
  setTimeout('namosw_scrolltext()', 100);
}





function namosw_exchange_src(name, rpath, nsdoc) 
{ 
  str = (navigator.appName == 'Netscape') ? nsdoc+'.'+name : 'document.all.'+name;
  img = eval(str);
  if (img) {
    if (img.altsrc == null) {
      img.altsrc = img.src;
      img.src    = rpath;
    } else {
      var temp   = img.src;
      img.src    = img.altsrc;
      img.altsrc = temp;
    }
  } 
}

function namosw_preload_img()
{ 
  var img_list = namosw_preload_img.arguments;
  if (document.preloadlist == null) 
    document.preloadlist = new Array();
  var top = document.preloadlist.length;
  for (var i=0; i < img_list.length; i++) {
    document.preloadlist[top+i]     = new Image;
    document.preloadlist[top+i].src = img_list[i];
  } 
}



function telecharge(fichier)
{
self.location.href=fichier;
}

function test_intranet(url)
{
var test_intranet=0;
switch (url)
{ case "http://192.168.253.10" :  test_intranet=1; break;
  case "192.168.253.10" : test_intranet=1; break;                         // nouvelle page : page02.htm
  case "http://192.168.254.14" : test_intranet=1; break;                  // met page03.htm dans la même fenêtre
  case "192.168.254.14" : test_intranet=1; break;                  // met page03.htm dans la même fenêtre
  case "http://12.0.1.7" : test_intranet=1; break;                  // met page03.htm dans la même fenêtre
  case "12.0.1.7" : test_intranet=1; break;                  // met page03.htm dans la même fenêtre
  case "" : alert("mauvaise URL"); break;
}
return test_intranet;

}


function openwinxy(url,x,y) 
{open(url,"","width=x,height=y,toolbar=no,scrollbars=yes,resizable=yes menubar=no");}

function openwin(url) 
{open(url,"","width=580,height=400,toolbar=no,scrollbars=yes,resizable=no menubar=no");}

function openwin1(url) 
{open(url,"","width=580,height=400,toolbar=yes,scrollbars=yes,resizable=no menubar=no");}

function openwin2(url) 
{open(url,"","width=300,height=200,toolbar=no,scrollbars=no,resizable=no menubar=no");}

function openwin3(url) 
{open(url,"","width=420,height=490,toolbar=no,scrollbars=no,resizable=yes menubar=no");}

function openwin4(url) 
{open(url,"","width=370,height=350,toolbar=no,scrollbars=no,resizable=yes menubar=no");}

function openinscr(url) 
{open(url,"","width=780,height=550,toolbar=yes,scrollbars=yes,resizable=yes,menubar=no");}

function openwin5(url) 
{
//open(url,"","width=400,height=300,toolbar=no,scrollbars=no,resizable=no,menubar=no");
open(url,"_blank","width=800,height=600,toolbar=1,scrollbars=1,resizable=1,menubar=1,status=1,location=1");

}

function openwin6(url) 
{open(url,"","width=780,height=550,toolbar=yes,scrollbars=yes,resizable=yes,menubar=no");}

function open_login_mail(url) 
{
/*open(url,"","width=800,height=600,toolbar=yes,scrollbars=yes,resizable=yes,menubar=yes"); */
open(url,"_blank","width=800,height=600,toolbar=1,scrollbars=1,resizable=1,menubar=1,status=1,location=1");

}

function open_webmaster(url) 
{
open(url,"","width=800,height=600,toolbar=no,scrollbars=yes,resizable=yes,menubar=no");
}

function open_plansite(url) 
{
open(url,"","width=600,height=400,toolbar=no,scrollbars=yes,resizable=no,menubar=no");
}


function openmessagerie(url) 
{open(url,"","width=430,height=330,toolbar=no,scrollbars=no,resizable=no menubar=yes");}


function openintranet(url) 
{
parent.close();
open(url,"","width=800,height=600,toolbar=yes,scrollbars=yes,resizable=yes,menubar=yes");
}

function openwin_real(url) 
{open(url,"","width=240,height=270,toolbar=no,scrollbars=no,resizable=no menubar=no");}

function openwin_mpeg(url) 
{open(url,"","width=300,height=320,toolbar=no,scrollbars=no,resizable=yes menubar=no");}



function openinternet(url_admis) 
{
parent.close();
window.open(url_admis);
}

function closewin() 
{close();}

	/* met le focus dans le champ de saisie */

function metfocus(form,nom)
 {
 document.form.nom.focus(); 
 }

	/* fait défiler un texte dans la barre d'état */

function scroll_barre()
{
  var str = '';
  if (scroll_barre.arguments.length > 0) {
    var i;
    for (str = '', i = 0; i < 100; i++)
      str += ' ';
    for (i = 0; i < scroll_barre.arguments.length; i++)
      str += scroll_barre.arguments[i] + ' ';
    document.scroll_barre = str;
  } else {
    var src_str = document.scroll_barre;
    str  = src_str.substring(1, src_str.length);
    str += src_str.substring(0, 1);
    document.scroll_barre = str;
  }
  window.status = str;
  setTimeout('scroll_barre()', 100);
}

function OuvreDerniereMinute(url1) 
{ 
open(url1,"","width=730,height=300,toolbar=no,scrollbars=yes,resizable=no,menubar=no");
}



// ouvre une fenetre url après tps milliseconde par dessus la fenetre courante
function DerniereMinute(url2,tps) 
{
var Tempo;
url=url2;
Tempo= setTimeout("OuvreDerniereMinute(url)",tps);
}

function OuvreInfoSCD(url1) 
{ 
open(url1,"","width=450,height=500,toolbar=no,scrollbars=no,resizable=no,menubar=no");
}

function OuvreInfoEntrer(url1) 
{ 
open(url1,"","width=450,height=500,toolbar=no,scrollbars=no,resizable=no,menubar=no");
}


function OuvreInfoRelInt(url1) 
{ 
open(url1,"","width=450,height=400,toolbar=no,scrollbars=no,resizable=no,menubar=no");
}

// ouvre une fenetre url après tps milliseconde par dessus la fenetre courante
function InfoRelInt(url2,tps) 
{
var Tempo;
url=url2;
Tempo= setTimeout("OuvreInfoRelInt(url)",tps);
}


function OuvreInfoFormer(url1) 
{ 
open(url1,"","width=450,height=360,toolbar=no,scrollbars=no,resizable=no,menubar=no");
}

// ouvre une fenetre url après tps milliseconde par dessus la fenetre courante
function InfoSCD(url2,tps) 
{
var Tempo;
url=url2;
Tempo= setTimeout("OuvreInfoSCD(url)",tps);
}

function InfoEntrer(url2,tps) 
{
var Tempo;
url=url2;
Tempo= setTimeout("OuvreInfoEntrer(url)",tps);
}

// ouvre une fenetre url après tps milliseconde par dessus la fenetre courante
function InfoFormer(url2,tps) 
{
var Tempo;
url=url2;
Tempo= setTimeout("OuvreInfoFormer(url)",tps);
}


function ouvrepage01()
{
parent.page00.window.location="page01.htm";
}

function ouvrepage02()
{
parent.page00.window.location="page02.htm";
}

function ouvrepage03()
{
parent.page00.window.location="page03.htm";
}

function affichepage00()
{
var temp01, temp02, temp03;
Temp01= setTimeout("ouvrepage01()",2000);
Temp02= setTimeout("ouvrepage02()",4000);
Temp03= setTimeout("ouvrepage03()",6000);
/* parent.page00.window.location="page00.htm"; */
}

// ferme la fenetre url après tps milliseconde 
function fermeauto(tps) 
{
var Tempo;
Tempo= setTimeout("close()",tps);
}

// ouvre une fenetre quand on tente de fermer le navigateur
var exit=true;
function whenexit(url){
if (exit)
open(url,"goto_window");
}

/* fonction qui affiche la date et heure courante */
function HeureDate() {
        maintenant = new Date();
		   // date actuelle
		  jour= maintenant.getDate();
        mois= maintenant.getMonth()+1;
        annee= maintenant.getYear();
        // heure actuelle :
        heure = maintenant.getHours();
        minute = maintenant.getMinutes();
        seconde = maintenant.getSeconds();
document.write(" date : ",jour," : ",mois," : ",annee,"<BR>");
document.write("heure :",heure," : ",minute," : ",seconde,"<BR>");
}		  
		  
 /* test du nom s'il y  a au moins un caractère sinon affichage dans une fenêtre alerte */
function test1(form) {
  if (form.text1.value == "")
    alert("Entrez votre nom s'il-vous-plait!")
  else { 
   alert("Salut "+form.text1.value+" ! ");
  }
}

  /* test e-mail, si @ est dans la phrase après au moins 1 caractère */
function test2(form) {
  if (form.text2.value == "" || 
      form.text2.value.indexOf('@', 1) == -1) 
        alert("Adresse électronique non valide!");
  else alert("OK!");
}

                                             /* test d'un mot avec lien vers d'autres pages  */
                        /* utilisation de la commande switch : ( pourrait être remplacé par une suite de if ) */
function test3(form) 
{
switch (form.text3.value)
{ case "beau":  window.open('page01.htm'); break;                         // nouvelle page : page01.htm
  case "Beau": window.open('page02.htm'); break;                         // nouvelle page : page02.htm
  case "BEAU": window.location="page03.htm"; break;                  // met page03.htm dans la même fenêtre
  case "" : alert("mauvaise répoonse"); break;
}
}

             /* test d'un menu à choix multiples et renvoi vers d'autres pages */
function menu(choix) 
{
if (choix==0)
open_login_mail('http://courrier.alsace.iufm.fr') 
if (choix==1)
openwin5('/connect_intranet/connect.php?url=http://appli2.alsace.iufm.fr/ww70awp/ww70awp.exe/connect/intranet7?param1=');
if (choix==2)
openwin6('/web/connaitr/sigles.htm');
if (choix==3)
openwin6('/web/travailler/formul/page01.htm');
 
}



/* ancien menu test d'un menu à choix multiples et renvoi vers d'autres pages 
function menu(choix) 
{
if (choix==0)
open_login_mail('http://courrier.alsace.iufm.fr') 
if (choix==1)
openwin5('http://www.alsace.iufm.fr/travailler/intranet_web/login_intranet_webdev.html');
if (choix==2)
openwin6('connaitr/Sigles.htm');
if (choix==3)
openwin6('http://www.alsace.iufm.fr/travailler/Formul/PAGE01.htm');
 
}

*/

// test si le navigateur est > à IE4.01 Netscape 4.5
function testNomNavi()
{document.write("navigateur = ",navigator.appName,"<P>");
document.write("version du navigateur = ",navigator.appVersion,"<P>");}

function testVersion()
{avertissement="<CENTER/><P><B>Attention ! :</B><BR>Votre navigateur est d'une version inf&eacute;rieure &agrave; 4.1<BR>Nous vous conseillons de le mettre &agrave; jour afin de b&eacute;n&eacute;ficier de toutes les fonctionnalit&eacute;s de ce site.<BR></P></CENTER>"
navigateur=navigator.appName;
texte=navigator.appVersion;  
var v0=texte.charAt(0);
var v1=texte.charAt(2);
var v2=0;
if  ((v1=="1")||(v1=="2")||(v1=="3")||(v1=="4")||(v1=="5")||(v1=="6")||(v1=="7")||(v1=="8")||(v1=="9"))
v2=1;
else v2=0;
var maj0=texte.charAt(24);
var maj1=texte.charAt(25);
var maj2=0;
if  ((maj1=="1")||(maj1=="2")||(maj1=="3")||(maj1=="4")||(maj1=="5")||(maj1=="6")||(maj1=="7")||(maj1=="8")||(maj1=="9"))
maj2=1;
else maj2=0;
if ((v0=="4")&&(v2==0)&&(maj0=="0")&&(maj2==1)&&(navigateur=="Microsoft Internet Explorer"))
iufm();
if ((v0>="4")&&(v2==1)&&(navigateur=="Microsoft Internet Explorer"))
iufm();
if ((v0=="4")&&(v1=="0")&&(maj2==0)&&(navigateur="Microsoft Internet Explorer"))
maj_navigateur();
if ((v0>="4")&&(navigateur=="Netscape"))
iufm();
if (v0<"4")
maj_navigateur();
}

function maj_navigateur()
{window.location="majNavi.htm";}

function iufm()
{window.location="iufm.htm";}

function AjoutFavoris(url,nom) {
 if ((navigator.appName.indexOf("Microsoft",0)>=0) && (parseInt(navigator.appVersion)>=4)) {
  window.external.AddFavorite(url,nom);
 } else {
  alert("Cette fonction n'est proposée que par Internet Explorer 4+")
 }
}


function IUFM(url) 
{
//closewin();
open(url,"_parent","width=800,height=600,toolbar=yes,scrollbars=yes,resizable=yes,menubar=yes");
}

function Ouvre_IUFM(url2,tps) 
{
var Tempo;
url=url2;

Tempo= setTimeout("IUFM(url)",tps);

}


/* retour à la page précédente */
function namosw_goto(url, targetstr)
{
  if (url == 'backward')
    history.back(1);
  else if (url == 'forward')
    history.forward(1);
  else {
     if (targetstr == 'blank') {
       window.open(url, 'win1');
     } else {
       var frameobj;
       if (targetstr == '') targetstr = 'self';
       if ((frameobj = eval(targetstr)) != null)
         frameobj.location = url;
     }
  }
}


function clickHandler(evenement)
{ 
window.document.links[0].handleEvent(evenement); 
}


/* décompte un utilisateur pour la vidéo dès qu'on quitte la page  */
function decompte()
{
var nom_page=document.location.pathname;

var Tempo;

//F1 = window.open("http://editeur.alsace.iufm.fr/editeur_web/ouvre_licence.php","_blank","width=250,height=120,left=400,top=300");
//F1 = window.open("http://editeur.alsace.iufm.fr/editeur_web/ouvre_licence.php?item=2","_blank","width=250,height=120,left=400,top=300");

//history.go(-1);


/*
        parent.frames["cadre_superieur"].location.href = page2;
*/



//document.write(nom_page);

 //parent.frames["page01"].location.href ="http://editeur.alsace.iufm.fr/editeur_web/ouvre_licence.php?item=2";

// history.go(-2);
self.location.href="http://editeur.alsace.iufm.fr/editeur_web/ouvre_licence.php?item=2"; 
//document.write('tagada et flut !');

document.write('<SCRIPT language=Javascript>history.go(-3);</SCRIPT>');

//var delai = setTimeout("gong()", 3000)
//var timeoutID = setTimeout("document.write('')",5000);


//document.write(nom_page);

//history.page01.go(-2);
//history.go(-1);

//F1 = window.open(nom_page,"page01","width=250,height=120,left=400,top=300");

//<? header("Location: http://editeur.alsace.iufm.fr/editeur_web/ouvre_licence.php?item=2"); ?>


//window.location.href=nom_page;

//alert('Vous quittez la page...');
}




