// JavaScript Document

//==========================//
//=== VARIABLES GLOABLES ===//
//==========================//
var MYSCROLLBAR = null;

/*********************************/
/*** FONCTION D'INITIALISATION ***/
/*********************************/

function init_load(){
	if (navigator.appName == "Microsoft Internet Explorer" && window.attachEvent) {
			window.attachEvent("onload", Dinit);
	}else if(window.addEventListener){
		window.addEventListener("load", Dinit, false);
	}
}

init_load();

// FONCTION APPELEE PAR L'EVENEMENT ONLOAD 
function Dinit(){
	//Initialisation de la taille de la scroll bar
	initScrollBar();
}


/****************************************/
/*** FONCTIONS LIEES A LA "SCROLLBAR" ***/
/****************************************/

function initScrollBar(){
	var el = document.getElementById('bloc_scroll');
	if(el){
		MYSCROLLBAR = createScrollBar();
		updateScrollBar();
	}
}

/*******************************************/
/*** INITALISATION DES CHAMPS DE SAISIS ***/
/*******************************************/

	function checkDefaultText(mytext){
		if(this.value == '')
			this.value = mytext;
	}
	function clearDefaultText(mytext){
		if(this.value == mytext)
			this.value = '';
	}
    function copyFieldValue(mytext){
        var el = document.getElementById(this.id.replace("$Display", ""));
        if(el)
            if(el.value != mytext)
                el.value = this.value;
    }
    
        function copyFieldValuePassword(mytext){
        var el = document.getElementById(this.id.replace("$Password", ""));
        if(el)
            if(el.value != mytext)
                el.value = this.value;
    }

