// JavaScript Document

function ouvrirmentions()
{
	void(window.open('mentions-legales-site.php','','width=400,height=500,scrollbars=1,status=0'));
}
function redirection(page) {

}

function emailvalide(adresse)
{
	var str = new String(adresse);
	var point = str.lastIndexOf('.');
	var arobase = str.lastIndexOf('@');
	var espace = str.indexOf(' ');
	var lgtotal = str.length;
	
	if( (lgtotal-point <3) || point == -1 || arobase == -1 || espace != -1 || point < arobase)
		return false;
	else return true;
}
function imprimer_calculette()
{
	window.print();
}

function arrow_cycle(){
	$("#push-arrow").animate({"left": "-=100px"}, { queue:true, duration:1700 })
					.animate({opacity: '1'}, { queue:true, duration:2000 })
					.animate({"top": "-=40px","left": "-=20px"}, { queue:true, duration:1600 })
					.animate({opacity: '0'}, { queue:true, duration:40 })
					.animate({opacity: '1'}, { queue:true, duration:20 })
					.animate({opacity: '0'}, { queue:true, duration:30 })
					.animate({opacity: '1'}, { queue:true, duration:20 })
					.animate({"top": "+=40px","left": "+=120px"}, { queue:true, duration:1600})
					.fadeOut({duration: 1000})
					.animate({opacity: '0'}, { queue:true, duration:500 })
					.animate({opacity: '1'}, { queue:true, duration:20 })
					.fadeIn({duration: 800, complete: arrow_cycle});
}