function emailProtect(adresse, dns, txt, classe, style){
	var name = adresse ;
	var domain = dns ;
	//var subject = "subject=Anti spam" ;
	//document.write('<a href=\"mailto:' + name + '@' + domain + ' ?' + subject + '\">') ;
	document.write('<a href=\"mailto:' + name + '@' + domain + '\"') ;
	if(classe != ""){
		document.write(' class=\"' + classe + '\"') ;
	}
	if(style != ""){
		document.write(' style=\"' + style + '\"') ;
	}
	document.write('>') ;
	if(txt != ""){
		document.write(txt + '</a>') ;
	}
	else{
		document.write(name + '@' + domain + '</a>') ;
	}
}


function OnResizeScreen(evt) {
	SetFullScreenObject('animFlash', 1024, 700, true, 984, 1680 );
	document.getElementById('animFlash').style.display = 'block';
}

function initMove (id) {
	document.getElementById(id).style.bottom = '0px';
	document.getElementById('reflet_'+id).style.top = '-10px';
}

function move (id) {
	moveDown(id);
	moveUp ('reflet_'+id);
}

function moveDown (id) {
	var bottom = parseInt(document.getElementById(id).style.bottom);
	if (bottom > -10) {
		document.getElementById(id).style.bottom = bottom-1 + 'px';
		setTimeout("moveDown('"+id+"')",30);
	}
}

function moveUp (id) {
	var top = parseInt(document.getElementById(id).style.top);
	if (top > -20) {
		document.getElementById(id).style.top = top-1 + 'px';
		setTimeout("moveUp('"+id+"')",30);
	}
}


function SetFullScreenObject (idObject, width, height, isProportional, minWidth, maxWidth, minHeight) {
	if (typeof (document.getElementById (idObject)) == null) {
		alert ("L'object id='" + idObject + "' n'existe pas.");
		return false;
	}
	
	var obj = document.getElementById (idObject);
	
	if (typeof (isProportional) == 'undefined') isProportional = false;
	var useMinWidth = typeof (minWidth) != 'undefined';
	var useMinHeight = typeof (minHeight) != 'undefined';
	
	var screenSize = getScreenSize();
	
	if (screenSize[1] < 830) {
	//	alert('ok');
	}
	
	if (screenSize[0] < minWidth) {
		obj.style.width = '1680px';
		obj.style.height = '954px';
		
		obj.style.left = parseInt(-parseFloat(obj.style.width)/2. + parseFloat(minWidth/2.)) + 'px';
		return;
	}
	if (screenSize[0] >= minWidth && screenSize[0] <= maxWidth) {

		obj.style.width = '1680px';
		obj.style.height = '954px';
		obj.style.left = parseInt(-parseFloat(obj.style.width)/2. + parseFloat(screenSize[0])/2.) + 'px';
		return;
	}
	
	var newHeight = 0;
	var newWidth = 0;
	var ratio = parseFloat(height)/parseFloat(width);
	
	if (isProportional) {				
		//Si minWidth non spécifier, toujours retailler proportionnelement en largeur
		if (useMinWidth) {
			newWidth = (screenSize[0] < minWidth ? minWidth : screenSize[0]);
			newHeight = Math.ceil(newWidth*ratio);
			
			if (useMinHeight && newHeight < minHeight) {
				newHeight = minHeight;
				newWidth = Math.ceil(newHeight/ratio);
			}
		}
		else {
			newWidth = screenSize[0];
			newHeight = Math.ceil(newWidth*ratio);
		}
	}
	else {
		if (useMinWidth) {
			newWidth = (screenSize[0] < minWidth ? minWidth : screenSize[0]);
			newHeight = (useMinHeight && screenSize[1] < minHeight ? minHeight : screenSize[1]);
		}
		else {
			newWidth = screenSize[0];
			newHeight = screenSize[1];
		}
	}
	
	obj.style.width = newWidth + 1 + 'px';
	obj.style.height = newHeight - 3 + 'px';
	
	return true;
}

var Timer;
var Pas = 3;
	
function moveLayer(Sens,Max)
{
		
	if(document.getElementById)			
		Objet = document.getElementById("ref_iframe");
	else
		Objet = document.all["ref_iframe"];
		
	if(parseInt(Objet.style.top) + (4*Sens) > 0)
		Objet.style.top = "0px";	
	else
	{
		if(parseInt(Objet.style.top) + (4*Sens) < Max) Objet.style.top = Max + "px";	

		else Objet.style.top = (parseInt(Objet.style.top) + (4*Sens)) + "px";
	}
	Timer = setTimeout("moveLayer(" + Sens + ", " + Max + ");", 20);
	document.write = Objet.style.top;
}


