// ouverture de fenetre 
// P=url de la page
// T=nom ou titre de la fenetre
// W=width H=height
// S= 0 ou 1 pour scrollbars actifs
// R= 0 ou 1 pour fenetre resizable
function OpenW(P,T,W,H,S,R)
{
	window.open(P,T,'toolbar=0,location=0,directories=0,menuBar=0,statusBar=0,scrollbars=' + S + ',resizable=' + R + ',width=' + W + ',height=' + H +',screenX=250,screenY=150,left=150,top=50,statusBar=no');
}



function countpath ( obj ) {

        var name = obj.name ;
	c = obj.value.substr ( obj.value.length - 1, 1 );
        if ( obj.name == "CODE" ) {                         		//CODE
		obj.value = obj.value.toUpperCase() ;
                //if ( obj.value.length == 15 ) position ( "PASSWORD" ) ;                   
        } else if ( obj.name == "OPCODE" ) {                       //OPCODE
		obj.value = obj.value.toUpperCase() ;
                if ( obj.value.length == 30 ) Envoi() ;                   
        } else if ( obj.name == "PASSWORD" ) {                       //PASSWORD
		obj.value = obj.value.toUpperCase() ;
                if ( obj.value.length == 30 ) Envoi() ;                   
        }
}

// Affichage des mentions legales
function afficheChoix( ID , operation)
{
	//operation = cacher / afficher
	if ( operation == 'afficher')
		{window.document.getElementById(ID).style.display= 'block';}
	else
		{window.document.getElementById(ID).style.display= 'none';}
}
// Affichage des informations
function InfosAccueil(Id) 
{       
	if (!Id==0){
	var Pg = "infos.aspx?F=haccueil.xml&id="+Id;         
        window.open(Pg, 'info' ,'toolbar=0,location=0,directories=0,menuBar=0,scrollbars=yes,resizable=1,width=300,height=200,screenX=50,screenY=50,left=50,top=50');
	}
}

// Affichage animation flash
function ShowAnimFlash()
{
	var Pg = "../animation/loader.htm";
	OpenW(Pg, 'animation', 750, 400,0 ,0);
}