/* Ajout Altrix */


/* defilement message */


var msg="MESSAGE";
var index=0;
var delay=200
function defil() {
	var nb_char=msg.length;
	index++;
	if (index>nb_char) index=0;
	document.forms[0].elements[0].value=msg.substring(index)+msg;
	setTimeout("defil()",delay);
}

function defiler(txt,tps) {
	msg=txt + "   -   ";
	delay=tps;
	defil();
}


/* Pop up centre*/

function PopupCentrer(page,largeur,hauteur,options) {
  var top=(screen.height-hauteur)/2;
  var left=(screen.width-largeur)/2;
  window.open(page,"","top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options);
}


/* Pop up auto size*/

function PopupImage(img) {
	titre="Popup Image - Tout Javascript.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();
}


/* Ouverture fenetre */
 
function fensec(url,name,width,height,scr,st,loc,mn,tl,rz)
{
window.open(url, name, "location="+loc+",menubar="+mn+",toolbar="+tl+",scrollbars="+scr+",status="+st+",width="+width+",height="+height+",resizable="+rz);
}



/* anti clic droit */

if ( document.all ) {
	document.oncontextmenu = clic_droit;
	}
if ( document.layers ) {
	document.captureEvents(Event.MOUSEDOWN);
	document.onmousedown = clic_droit;
	}
function clic_droit(evenement) {
	if ( document.all ) {
		alert('Merci de demander notre autorisation');
		return false;
		}
	else if ( document.layers ) {
		if ( evenement.which == 3 ) {
			alert('Prendre contact avec le webmaster');
			return false;
			}
		if ( evenement.modifiers == 2 ) {
			alert('Prendre contact avec le webmaster');
			return false;
			}
		}
	return true;
	}


/* Ouverture page pour impression */

function fensec(url,name,width,height,scr,st,loc,mn,tl,rz)
{
window.open(url, name, "location="+loc+",menubar="+mn+",toolbar="+tl+",scrollbars="+scr+",status="+st+",width="+width+",height="+height+",resizable="+rz);
}





