//-----------------------------------------------------------------------------[ INFO-BULLES ]
var IB=new Object;
var nsx=0;nsy=0;
function AffBulle(texte,evt) {
contenu="<TABLE border=0 cellspacing=0 cellpadding="+IB.NbPixel+"><TR bgcolor='"+IB.ColContour+"'><TD><TABLE border=0 cellpadding=2 cellspacing=0 bgcolor='"+IB.ColFond+"'><TR><TD><FONT size='-2' face='Ms sans Serif' color='"+IB.ColTexte+"'>"+texte+"</FONT></TD></TR></TABLE></TD></TR></TABLE>";
	if (document.layers) {
		document.layers["bulle"].document.write(contenu);
		document.layers["bulle"].document.close();
		document.layers["bulle"].top=nsy+200;
		document.layers["bulle"].left=nsx-20;
		document.layers["bulle"].visibility="show";}
	if (document.all) {
		var f=window.event;
		doc=document.body.scrollTop;
		bulle.innerHTML=contenu;
		document.all["bulle"].style.top=f.clientY+doc-20;
		document.all["bulle"].style.left=f.x-10;
		document.all["bulle"].style.visibility="visible";
	}
	else {
        document.getElementById("bulle").innerHTML=contenu;
        document.getElementById("bulle").style.top=evt.pageY;
        document.getElementById("bulle").style.left=evt.pageX+20;
        document.getElementById("bulle").style.visibility="visible";
	}
}
function ns(e) {
	nsx=e.x;nsy=e.y;
}
function HideBulle() {
	if (document.layers) {document.layers["bulle"].visibility="hide";}
	if (document.all) {document.all["bulle"].style.visibility="hidden";}
	else document.getElementById("bulle").style.visibility="hidden";
}
function InitBulle(ColTexte,ColFond,ColContour,NbPixel) {
	IB.ColTexte=ColTexte;IB.ColFond=ColFond;IB.ColContour=ColContour;IB.NbPixel=NbPixel;
	if (document.layers) {
		window.captureEvents(Event.MOUSEMOVE);window.onMouseMove=ns;
		document.write("<LAYER name='bulle' top=0 left=0 visibility='hide'></LAYER>");
	}
	else {
		document.write("<DIV id='bulle' style='position:absolute;top:0;left:0;visibility:hidden'></DIV>");
	}}

//-----------------------------------------------------------------------------[ FORUM ]
// COntrôle des champs "Sujet" & "message"
// Trouvé sur -> PLF-http://www.jejavascript.net/
function Choixpage(numpage){
var form_err = " "
if (document.formulaire.sujet.value.length <1)
form_err += "Le champ Sujet est vide ! "; 
if (document.formulaire.message.value.length <1)
form_err += "Le champ Message est vide !";
if ( form_err != " ") 
alert(form_err);
else{
document.formulaire.action=""+numpage+"";
document.formulaire.submit();
}
}

//-----------------------------------------------------------------------------[ POPUP ]
function Popup(contentString, width, height, scrollbars, resizable,target) {
	if(target=="") target = 'PopupPage';
	Y = screen.height/2 - height/2;
	X = screen.width/2 - width/2;
	str = "width=" + width + ",height=" + height + ",left=" + X + ",top=" + Y;
	uri = contentString;

	popup = window.open(uri, target, 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars='+scrollbars+',resizable='+resizable+',' + str + '');
}

//-----------------------------------------------------------------------------[ POPUP IMAGE ]
function PopupImage(img) {
	titre="Preview";
	w=open("",'image','width=400,height=400,toolbar=no,scrollbars=no,resizable=no');	
	w.document.write("<HTML><HEAD><TITLE>"+titre+"</TITLE><LINK REL='STYLESHEET' TYPE='text/css' HREF='../../css/styles.css'></HEAD>");
	w.document.write("<SCRIPT language=javascript>function checksize()  { if (document.images[0].complete) {  window.resizeTo(document.images[0].width+42,document.images[0].height+94); window.focus();} else { setTimeout('check()',250) } }</"+"SCRIPT>");
	w.document.write("<BODY onload='checksize()' leftMargin=15 topMargin=15 marginwidth=0 marginheight=0>");
	w.document.write("<TABLE BORDER=0 CELLPADDING=1 CELLSPACING=0 BGCOLOR=#27243C>");
	w.document.write("<TR BGCOLOR=#27243C><TD><IMG src='"+img+"' border=0></TD></TR>");
	w.document.write("</TABLE>");
	w.document.write("");
	w.document.write("</BODY></HTML>");
	w.document.close();
}


//-----------------------------------------------------------------------------[ MENU DEROULANT ]
function Info(form)
{ var newloc=form.menu.options[form.menu.selectedIndex].value;
if (newloc) self.location = newloc;
}

//-----------------------------------------------------------------------------[ NOUVELLE FENETRE ]
function TargetBlank(url) {
	window.open(url);
}

// Redirection par un element Form
// Ex : <input type="radio" onClick="go('http://www.lien1.com')">Lien 1
function go (page){
var gopage=page; //lwf
if ( (gopage != "") && (gopage != null) )
window.location=gopage;
}

//-----------------------------------------------------------------------------[ HORLOGE ]
function HeureCheck()
{
krucial = new Date;
heure = krucial.getHours();
min = krucial.getMinutes();
sec = krucial.getSeconds();
jour = krucial.getDate();
mois = krucial.getMonth()+1;
annee = krucial.getFullYear();
if (sec < 10)
sec0 = "0";
else
sec0 = "";
if (min < 10)
min0 = "0";
else
min0 = "";
if (heure < 10)
heure0 = "0";
else
heure0 = "";
DinaHeure = heure0 + heure + ":" + min0 + min + ":" + sec0 + sec + "&nbsp;&nbsp;";
which = DinaHeure
if (document.all){
dynamic3.innerHTML='<center>00:00:00</center>'
dynamic3.innerHTML=''+which+'';
}
else if (document.layers){
document.dynamic1.document.dynamic2.document.write(''+which+'')
document.dynamic1.document.dynamic2.document.close()
}
tempo = setTimeout("HeureCheck()", 1000)
}
