/* AUTEUR: YVES BRUANT */

/* DATE DE CREATION: 27/05/2000 */

function txst()
{
	document.write("dans txst<br>");
}					  

// script permettant de tester si les champs de saisie sont bien remplis...
function test_form_livredor() 
{																	 
	if (document.getElementById('mess').value=="") 
   	{ 
   		alert('Vous devez tapez un message !')
    	document.getElementById('mess').focus();
		return false 
	}
	if (document.getElementById('expe').value=="") 
	{ 
		alert('Vous devez tapez votre nom !')
       	document.getElementById('expe').focus();
		return false 
	}
	txt = document.getElementById('email').value;	 
	if (txt!="")
	{
		if (txt.indexOf("@")<3)
		{
	  		alert("L'adresse email est incorrecte.");
	       	document.getElementById('email').focus();
			return false 
		}  
		if (txt.length<7)
		{
	  		alert("L'adresse email est incorrecte.");
	       	document.getElementById('email').focus();
			return false 
		}  
	}
   	// il faudrait aussi empêcher la saisie de scripts...	
   	return true
}

function VersionNavigateur(Netscape, Explorer) 

{

  if ((navigator.appVersion.substring(0,3) >= Netscape && navigator.appName == 'Netscape') ||      

      (navigator.appVersion.substring(0,3) >= Explorer && navigator.appName.substring(0,9) == 'Microsoft'))

    return true;

  else 

    return false;

}



function annee()

{

  var aaaa = date.getFullYear();

  // corrige les bugs an 2000 dans les interpréteurs javascripts...

  if (aaaa < 100) {aaaa = 2000 + aaaa};

  if (aaaa < 2000) {aaaa = 2000 + (aaaa % 100)};

  return aaaa;

}



function DateLastModified(langue)

{

  date = new Date(document.lastModified);

  if (langue=="fr")

  {

    var m = date.getMonth() + 1;

    if (m < 10) {m = "0" + m};

    res = "Dernière mise à jour : " + date.getDate() + "/" + m + "/" + annee();

  }

  else

  {

    var d = date.getDate();

    if (d < 10) {d = "0" + d}

    res = "Last updated : " + (date.getMonth() + 1) + "/" + d + "/" + annee();

  }

  var mn = date.getMinutes();

  if (mn < 10) {mn = "0" + mn;}

  var ss = date.getSeconds();

  if (ss < 10) {ss = "0" + ss;}

  return res + " " + date.getHours() + ":" + mn + ":" + ss;

}



function BasDePage(langue)

// affiche le code nécessaire pour le bas de page

{

  ret = '<TABLE WIDTH="100%" HEIGHT="4%" BORDER=0><TR><TD WIDTH="10">&nbsp;</TD><TD WIDTH="10%">&nbsp;</TD><TD WIDTH="75%" VALIGN="TOP"><BR><TABLE WIDTH="100%" BORDER=0><TR><TD BGCOLOR="#FFBF0F"><IMG SRC="/images/spacer.gif" BORDER=0 WIDTH=1 HEIGHT=1></TD></TR></TABLE><CENTER><FONT FACE="Verdana, Arial" SIZE="-2">';

//  if (langue=="fr")

//    {ret = ret + '<A HREF="mailto:webmestre@td-europ.com">Webmestre</A>&nbsp;&nbsp;©&nbsp;2000&nbsp;<B>T&D</B>. Tous droits réservés.<BR>';}

//    else

//    {ret = ret + '<A HREF="mailto:webmestre@td-europ.com">Webmaster</A>&nbsp;&nbsp;©&nbsp;Copyrights&nbsp;2000&nbsp;<B>T&D</B><BR>';}

  return ret + DateLastModified(langue) + '</FONT></CENTER></TD><TD WIDTH="5%">&nbsp;</TD></TR></TABLE>';

}



function TitrePage(textetitre, sousmenu, pathimages)

// affiche le code nécessaire pour le titre de la page avec TD pivotant à gauche.

// si sousmenu = 0, il y a affichage d'un liseré jaune en haut

// pathimages peut être omis, sinon il est ajouté devant /images/...

{ 

  ret = '<TABLE WIDTH="100%" CELLSPACING="2"><TR>';

  if (sousmenu==0) 

    {ret = ret + '<TD BGCOLOR="#FFBF0F" COLSPAN=2><IMG SRC="' + pathimages + '/images/spacer.gif" BORDER=0 WIDTH=1 HEIGHT=3></TD></TR><TR>';}

  return ret + '<TD WIDTH="145" BACKGROUND="' + pathimages + '/images/t&d_drapeau_147_77.gif"><A HREF="http://www.td-europ.com/index.html" TARGET="_parent"><IMG SRC="' + pathimages + '/images/t&dswing22c.gif" BORDER="0" WIDTH="145" HEIGHT="72" ALT="Page d_accueil"></A></TD><TD BGCOLOR="#B3BEC2" WIDTH="100%"><FONT FACE="Verdana, Arial" SIZE="+1"><B><DIV ALIGN="CENTER">' + textetitre + '</DIV></B></FONT></TD></TR></TABLE>';

}

window.onload=montre;
function montre(id) {
var d = document.getElementById(id);
	for (var i = 1; i<=10; i++) {
		if (document.getElementById('smenu'+i)) 
		    {document.getElementById('smenu'+i).style.display='none';}
	}
if (d) {d.style.display='block';
		//d.style.position='absolute';
		//d.style.width='10em';
		}
}

