//Ajoutez aux favoris

nav = navigator.appName.substring(0,3);
ver = navigator.appVersion.substring(0,1)
function addFav()
	{
	if (nav == "Mic" && ver >= 4)
		{
		url_site="http://www.passe-simple.com";
		titre_site = "passe-simple";
		document.write('<A HREF="#" onClick="window.external.AddFavorite(url_site, titre_site);return(false);" class="footfont">Ajouter ce site \à vos favoris</A><BR>')
		}
	else
		{
		document.write('Faites CTRL+D pour ajouter ce site &agrave; vos favoris!')
		}
	}


// popup image redimentionnable automatiquement 

function PopupImage(img) {
	titre="http://www.passe-simple.com";
	w=open("",'image','width=400,height=400,toolbar=no,scrollbars=no,resizable=yes');	
	w.document.write("<HTML><HEAD><TITLE>"+titre+"</TITLE></HEAD>");
	w.document.write("<SCRIPT language=javascript>function checksize()  { if (document.images[0].complete) {  window.resizeTo(document.images[0].width+12,document.images[0].height+30); window.focus();} else { setTimeout('check()',250) } }</"+"SCRIPT>");
	w.document.write("<BODY onload='checksize()' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0><IMG src='"+img+"' border=0>");
	w.document.write("");
	w.document.write("</BODY></HTML>");
	w.document.close();
}



// infobulle 

IE4 = (document.all) ? 1 : 0;
NS4 = (document.layers) ? 1 : 0;
VERSION4 = (IE4 | NS4) ? 1 : 0;
if (!VERSION4) event = null;
function helpGetOffset(obj, coord) {
	var val = obj["offset"+coord] ;
	if (coord == "Top") val += obj.offsetHeight;
	while ((obj = obj.offsetParent )!=null) {
		val += obj["offset"+coord];
		if (obj.border && obj.border != 0) val++;
}
return val;
}
function helpDown () {
	if (IE4) document.all.helpBox.style.visibility = "hidden";
	if (NS4) document.helpBox.visibility = "hidden";
}
function helpOver (event,texte) {
	if (!VERSION4) return;
	var ptrObj, ptrLayer;
if (IE4) {
		ptrObj = event.srcElement;
		ptrLayer = document.all.helpBox;
}
if (NS4) {
		ptrObj = event.target;
		ptrLayer = document.helpBox;
}
	if (!ptrObj.onmouseout) ptrObj.onmouseout = helpDown;
	var str = '<DIV CLASS="helpBoxDIV">'+texte+'</DIV>';
if (IE4) {
		ptrLayer.innerHTML = str;
		ptrLayer.style.top  = helpGetOffset (ptrObj,"Top") + 2;
		ptrLayer.style.left = helpGetOffset (ptrObj,"Left");
		ptrLayer.style.visibility = "visible";
}
if (NS4) {
		ptrLayer.document.write (str);
		ptrLayer.document.close ();
		ptrLayer.document.bgColor = "#FFFFCF";
		ptrLayer.top  = ptrObj.y + 20;
		ptrLayer.left = ptrObj.x;
		ptrLayer.visibility = "show";
}
}



//effet de brouillage 

function ejs_img_fx(img){	
	if(img && img.filters && img.filters[0]){
		img.filters[0].apply();
		img.filters[0].play();
	}
}


// horloge 

function HorlogeDynamique() {
	var DateActuel = new Date();
	var heure = DateActuel.getHours();
	var minutes = DateActuel.getMinutes();
	var secondes = DateActuel.getSeconds();

	if (heure == 0) {
		heure = "0" + heure;
		}
	if (minutes <= 9) {
		minutes = "0" + minutes;
		}
	if (secondes <= 9) {
		secondes = "0" + secondes;
		}
	
	Horloge = "<b>"+ heure + ":" + minutes + ":" + secondes + "</b>" + "&nbsp;&nbsp;&nbsp;";
	

	if (document.getElementById) {
		document.getElementById("clock").innerHTML = Horloge;
		
		}

	if (document.layers) { 
    		document.clock.document.write("&nbsp;&nbsp;"+Horloge); 
		document.clock.document.close(); 
  		}

	if ((document.all)&&(!document.getElementById)) { 
    		document.all["clock"].innerHTML = Horloge;
 		}

	setTimeout("HorlogeDynamique()", 1000)
	}
	
window.onload = HorlogeDynamique;

//administratif
function administratif ()
	{
		document.write('<p class="footfont">&copy;2003 passe-simple.com | Association Fusion | <a href="http://site.voila.fr/webtechnicien" target="_blank" class="footfont">artwork by Artmaker</a> |')
	}

//menuup	
function menuup ()
	{
		document.write('<table width="150" border="0" align="right" cellpadding="0" cellspacing="0"><tr><td align="center" ><a href="constructionpage.htm" class="menuup">Forum</a></td></tr><tr><td align="center" class="menuup"><a href="constructionpage.htm" class="menuup">Plan </a></td></tr><tr><td align="center" class="menuup"><a href="constructionpage.htm" class="menuup">Contact</a></td></tr></table>')
	}	

