

//---------------------------------------------------
//function stopError() { return true ;}
//window.onError = stopError ;
//---------------------------------------------------



function fonctn_exchange_src(name, rpath, nsdoc) 
{ 
	str = (navigator.appName == 'Netscape') ? nsdoc+'.'+name : 'document.all.'+name;
	img = eval(str);
	if (img) {
		if (img.altsrc == null) {
			img.altsrc = img.src;
			img.src    = rpath;
		} else {
			var temp   = img.src;
			img.src    = img.altsrc;
			img.altsrc = temp;
    	}
	} 
	status = '' ;
}

function fonctn_preload_img()
{ 
	var img_list = fonctn_preload_img.arguments;
	if (document.preloadlist == null) document.preloadlist = new Array();
	
	var top = document.preloadlist.length;

	for (var i=0; i < img_list.length; i++) {
		document.preloadlist[top+i]     = new Image;
		document.preloadlist[top+i].src = img_list[i];
	} 
}


function fonctn_resize_screen(x_max, y_max) {
	if(typeof XJS_VER_12 == 'undefined' || XJS_VER_12 == '') return false ;

	if(typeof x_max == 'undefined') var x_max  = 800 ; // optimal 800 x 600
	if(typeof y_max == 'undefined') var y_max  = 1200 ;
	
	var marge = 0 ;

    marge = screen.availWidth - x_max ;
    marge = marge / 2 ;
    marge = parseInt(marge) ;
    if(marge < 1) marge = 0 ;
	window.moveTo(marge, 0) ; // x, y
	if (screen.availHeight < y_max) y_max = screen.availHeight ;
	if (screen.availWidth < x_max) x_max = screen.availWidth ;

	if (document.all) {
		window.resizeTo(x_max, y_max) ;
	}else if (document.layers){
		if (window.outerHeight < y_max || window.outerWidth < x_max) {
			window.outerHeight = y_max ;
			window.outerWidth = x_max ;
		}
	}
return true ; }


//---------- init écran : --------------------------
fonctn_resize_screen() ;
if (self!=top) top.location=self.location ;
//---------------------------------------------------

