function backToExsay(){
	etatUp=false;
	fxMain.start(0);
	fxUp.start(docWidth);
	//document.getElementById("upform").innerHTML='retour...';
}
function goUpload(pIdUp,pLc,pSi,pS,pLim){
	loadUpContent(pIdUp,pLc,pSi,pS,pLim);
}
function goUploadNext(){
	etatUp=true;
	// swf object ecrase completement l'element il faut donc a nouveau tout redefinir: (ce n'est pas le cas pour le contenu principal swfobject se declenchant avant toute definition ici.
	elup = $('ctupform');
	fxUp = new Fx.Tween(elup, {property:'left'}); 
	//
	elup.setStyle('left',(docWidth/2-divUpWidth/2)+docWidth);
	elup.setStyle('top',(docHeight/2-divUpHeight/2));
	fxMain.start(-docWidth);
	fxUp.start(elup.getStyle('left').toInt()-docWidth);
}
function loadUpContent(pIdUp,pLc,pSi,pS,pLim){
	swfobject.embedSWF("superUpload"+pIdUp+".swf", "upform", "800", "600", "10.0.0","expressInstall.swf",{ilc:pLc,psi:pSi,ispe:pS,limit:pLim},{menu:"false",allowscriptaccess:"always"},{styleclass:"cssModUpFl"},goUploadNext);
}
function onloadResize(){
	docWidth=getWindowWidth();
	docHeight=getWindowHeight();
	elflreal = $('flashcontent');
	elfl = $('ctflashcontent');
	elup = $('ctupform');
	fxMain = new Fx.Tween(elfl, {property:'left'});
	fxUp = new Fx.Tween(elup, {property:'left'});
	elfl.setStyle('width',docWidth);
	elfl.setStyle('height',docHeight);
}
function funcResize() {
	docWidth=getWindowWidth();
	docHeight=getWindowHeight();
	elfl.setStyle('width',docWidth);
	elfl.setStyle('height',docHeight);
	if(etatUp){
		elfl.setStyle('left',-docWidth);
		elup.setStyle('left',(docWidth/2-divUpWidth/2));
		elup.setStyle('top',(docHeight/2-divUpHeight/2));
	}
}

/////////

function getWindowHeight() { // vive les normes...
	var windowHeight=0;
	if (typeof(window.innerHeight)=='number') {
		windowHeight=window.innerHeight;
	}else {
		if (document.documentElement && document.documentElement.clientHeight) {
			windowHeight = document.documentElement.clientHeight;
		}else {
			if (document.body && document.body.clientHeight) {
				windowHeight=document.body.clientHeight;
			}
		}
	}
	return windowHeight;
}
function getWindowWidth() { // vive les normes...
	var windowWidth=0;
	if (typeof(window.innerWidth)=='number') {
		windowWidth=window.innerWidth;
	}else {
		if (document.documentElement && document.documentElement.clientWidth) {
			windowWidth = document.documentElement.clientWidth;
		}else {
			if (document.body && document.body.clientWidth) {
				windowWidth=document.body.clientWidth;
			}
		}
	}
	return windowWidth;
}
var docWidth=getWindowWidth();
var docHeight=getWindowHeight();
var divUpWidth=800;
var divUpHeight=450;
var etatUp=false;
var soUp;
var fxMain;
var fxUp;
window.onresize=funcResize;
window.onload=onloadResize;