<!--
// scripts communs
var userAgent = window.navigator.userAgent ;

function JStoPhpWeights(iscrop,custWidth,custHeight) {
	// envoye taille fenetre
	var widthscreen = WindowValues('onX');
	var heightscreen = WindowValues('onY');
	var features = "width=10,height=10" ;
	if(iscrop == 'iscrop')  { myWscreen = custWidth ;  } else { myWscreen = widthscreen ; }
	if(iscrop == 'iscrop') { myHscreen = custHeight ; } else { myHscreen = heightscreen ; } 	
	var argW = "widthscreen="+myWscreen ;
	var argH = "heightscreen="+myHscreen ;
    var urlphp = "init.php?"+argW+"&"+argH ;
    var urliframe = '<iframe name="init" src="' + urlphp + '" width="10" height="10"></iframe>';
	//window.open(urlphp,"nopb",features);
}

function CropBrowser(movie,zoneWidth,zoneHeight) {
	//if(movie) { // faire qqchoz ; }
	window.focus() ;

	var DuckBrowser = false ;
	if(userAgent.search("MSIE") > 0) {
		DuckBrowser = true ;		
	}
	if(userAgent.search("Safari") > 0) {
		DuckBrowser = true ;
	}
	var grafixL = 20 ;
	var grafixR = 20 ;
	var grafixT = 43 ;
	var grafixB = 10 ;
	
	var xWidth = parseInt(zoneWidth)+parseInt(grafixL)+parseInt(grafixR) ;
	var xHeight = parseInt(zoneHeight)+parseInt(grafixT)+parseInt(grafixB) ;
	
	var MoveX = ( window.screen.availWidth - parseInt(xWidth) )/2;
	var MoveY = ( window.screen.availHeight - parseInt(xHeight) )/3;
	window.moveTo(parseInt(MoveX),parseInt(MoveY));

	var DeltaW = 0 ;
	var DeltaH = 0 ;
	
	if(userAgent.search("Safari") > 0) {
		DeltaW = 0 ;
		DeltaH = 112 ;
	}
	if(userAgent.search("Camino") > 0) {
		DeltaW = 0 ;
		DeltaH = 116 ;
	}
	if(userAgent.search("MSIE") > 0) {
		if(userAgent.search("Mac") > 0) {
			DeltaW = 37 ;
			DeltaH = 124 ;
		} else {
			DeltaW = 29 ;
			DeltaH = 147 ;
		}
	}
	var totalWidth = parseInt(xWidth)+parseInt(DeltaW) ;
	var totalHeight = parseInt(xHeight)+parseInt(DeltaH) ;
	
	if ( DuckBrowser ){
		if (window.screen.availHeight > xHeight || window.screen.availWidth > xWidth){
			window.resizeTo(totalWidth,totalHeight);
		} else {
			window.resizeTo(window.screen.availWidth,window.screen.availHeight);
		} 
	} else {
		if (window.screen.availHeight > xHeight || window.screen.availWidth > xWidth){
			window.innerWidth = xWidth;
			window.innerHeight = xHeight ;
		} else {
			window.outerWidth = window.screen.availWidth;
			window.outerHeight = window.screen.availHeight;
		}
		window.menubar.visible = false;
		window.statusbar.visible =false;
		window.toolbar.visible = true;
		window.locationbar.visible = false;
		window.personalbar.visible = false;
		window.scrollbars.visible = true;
	}	
}
//
function WindowValues(coordXorY) {
	var ns6 = (!document.all && document.getElementById);
	var ie4 = (document.all);
	var ns4 = (document.layers);
	var posvalue ;
	
	if(ie4) {	
		if(coordXorY == 'onX') {
			posvalue = document.body.clientWidth + document.body.scrollLeft ;
		} else {
			posvalue = document.body.clientHeight + document.body.scrollTop ;
		}
	} else {    
		if(coordXorY == 'onX') {
			posvalue = window.innerWidth ;
		} else {
			posvalue = window.innerHeight ;
		}
	}
	return posvalue ;
}
//
function changeclass(id, newClass) {
	identity=document.getElementById(id);	
	identity.className=newClass;
}
//
function multichangesubmit(position,fix,classic) {
	if (version >= 3) {
		changeclass(fix, classic+' roll'+position+'submit');
		changeimage(position,'left'+fix,'submit_left');
		changeimage(position,'right'+fix,'submit_right');
	}
}
//
function multichangemenu(position,fix,num,left,right) {
	if (version >= 3) {
		changeclass(fix+''+num,'touchbar roll'+position+fix);
		changeimage(position, 'left-'+fix+'-'+num,left);
		changeimage(position,'right-'+fix+'-'+num,right);
	}
}
// Determine la version du navigateur
var version;
	 if (parseInt(navigator.appVersion) >=4)
         version=4;
else if (navigator.appName=="Netscape" && parseInt(navigator.appVersion) >=3)
         version=3;
         else
         version=2;
//
//change les images
function changeimage(position,name,img) {
	document.images[name].src = chemin + position + repertoire + img + extension ;
}
//-->