//Bateau mouche specifique 


function confirmDelete(){
	resulta = confirm('Voulez-vous supprimer cette primeur');
	if (resulta == 1) return true;
	else return false;
}

function pastille(sect){
	//alert(racine + '<?=selfUrl(false)?>image/pastille/titre/' + sect + '.png')
document.getElementById('sectionTitle').innerHTML = '';
document.getElementById('sectionTitle').innerHTML = sect;

	
	}


function showPath(){
	//var currentopa = 00;
	document.getElementById('deux').style.visibility = 'visible';
	document.getElementById('shadowWrapper').style.visibility = 'visible';
	document.getElementById('shadowWrapper').style.opacity = 0
	document.getElementById('shadowWrapper').style.filter='alpha(opacity='+(currentopa*0)+')'
	
	
	fade()
}
var currentopa = (0);

function fade(){
	currentopa = currentopa + .1
	
	if (currentopa < '.8'){
		document.getElementById('shadowWrapper').style.opacity = currentopa
		document.getElementById('shadowWrapper').style.filter='alpha(opacity='+(currentopa*100)+')'	
		anime =  window.setTimeout("fade()",0.1);
		
	}
	else{
		currentopa = (0);
		
		map1()
	}
}
function fadeC(){
	currentopa = currentopa + .1
	
	if (currentopa < '.8'){
		document.getElementById('shadowWrapper').style.opacity = currentopa
		document.getElementById('shadowWrapper').style.filter='alpha(opacity='+(currentopa*100)+')'	
		anime =  window.setTimeout("fadeC()",0.1);
		
	}
	else{
		currentopa = (0);
		document.getElementById('showEdit').style.display = "block";
	}
}
function map1(){
	
	var monswf2 = window.document.mapun;
	monswf2.Play();
	
}


function map1b(){
var monswf2 = window.document.mapun;
monswf2.Rewind();
document.getElementById('deux').style.visibility = 'hidden';
document.getElementById('shadowWrapper').style.visibility = 'hidden';
}

function hidden(){
var monswf2 = window.document.mapun;
monswf2.Rewind();


	document.getElementById('deux').style.visibility = 'hidden';
	document.getElementById('shadowWrapper').style.visibility = 'hidden';
	}
	
	
	
	
	
function showAlain(){
	//var currentopa = 00;
	document.getElementById('flottan_alain').style.visibility = 'visible';
	document.getElementById('shadowWrapper').style.visibility = 'visible';
	document.getElementById('shadowWrapper').style.opacity = 0
	document.getElementById('shadowWrapper').style.filter='alpha(opacity='+(currentopa*0)+')'
	
	fade2();
}
var currentopa = (0);

function fade2(){
	currentopa = currentopa + .1
	
	if (currentopa < '.8'){
		document.getElementById('shadowWrapper').style.opacity = currentopa
		document.getElementById('shadowWrapper').style.filter='alpha(opacity='+(currentopa*100)+')'	
		anime =  window.setTimeout("fade2()",0.1);
		
	}
	else{
		currentopa = (0);
		
		//alain()
	}
}


function closeA(){
	document.getElementById('flottan_alain').style.visibility = 'hidden';
	document.getElementById('shadowWrapper').style.opacity = 0
		document.getElementById('shadowWrapper').style.filter='alpha(opacity='+(0)+')'
		document.getElementById('shadowWrapper').style.visibility = 'hidden';
	/*var monswf2 = window.document.mapun;
monswf2.Rewind();
var monswf1 = window.document.mapdeux;
monswf1.Rewind();*/
	}
	
	
	
	
	
	
	
function showSeme(){
	//var currentopa = 00;
	document.getElementById('flottan_seme').style.visibility = 'visible';
	document.getElementById('shadowWrapper').style.visibility = 'visible';
	document.getElementById('shadowWrapper').style.opacity = 0
	document.getElementById('shadowWrapper').style.filter='alpha(opacity='+(currentopa*0)+')'
	
	
	fade2()
}
var currentopa = (0);


function closeB(){
	document.getElementById('flottan_seme').style.visibility = 'hidden';
	document.getElementById('shadowWrapper').style.opacity = 0
		document.getElementById('shadowWrapper').style.filter='alpha(opacity='+(0)+')'	
		document.getElementById('shadowWrapper').style.visibility = 'hidden';
		/*	var monswf2 = window.document.mapun;
monswf2.Rewind();
var monswf1 = window.document.mapdeux;
monswf1.Rewind();*/
	}
	
	
function showPromo(){
	//var currentopa = 00;
	//var hauteurAlerte = document.body.clientHeight;
	
	document.getElementById('flottan_promo').style.visibility = 'visible';
	document.getElementById('shadowWrapper').style.visibility = 'visible';
	document.getElementById('shadowWrapper').style.opacity = 0
	document.getElementById('shadowWrapper').style.filter='alpha(opacity='+(currentopa*0)+')'
	
	
	fade2()
}
var currentopa = (0);


function closePromo(){
	document.getElementById('flottan_promo').style.visibility = 'hidden';
	document.getElementById('shadowWrapper').style.opacity = 0
		document.getElementById('shadowWrapper').style.filter='alpha(opacity='+(0)+')'	
		document.getElementById('shadowWrapper').style.visibility = 'hidden';
		/*	var monswf2 = window.document.mapun;
monswf2.Rewind();
var monswf1 = window.document.mapdeux;
monswf1.Rewind();*/
	}
	
function callAjax(variable,target,id,type,vphp) {
	if (typeof(type) == 'undefined' || type == '') type = 'POST';
	if (typeof(id) == 'undefined' || id == '') id = 'kContent';
	if (typeof(target) == 'undefined' || target == '') target = root+'process.php';
	if (typeof(vphp) == 'undefined' || vphp == '') vphp = 'vphp';
	x = document.getElementById(id);
	if (variable == '[object HTMLFormElement]') {
		list = new Array();
		var url = '';
		for (var i=0;i<variable.length;i++) {
			if (i < variable.length-1) opt = '&'; else opt = '';
			url += variable[i].name+'='+variable[i].value+opt;
		}
		variable = url;
	} else {
		//variable.replace(/&amp\;/, "&");
		variable = variable.replace(/amp;/gi, "");
		variable = unescape(variable);
	}
	//alert(variable);
	var xmlhttp = false;
	/** Special IE only code ... */
	/*@cc_on
	  @if (@_jscript_version >= 5)
		  try {
			  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
		  } catch (e) {
			  try {
				  xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
			  } catch (E) {
				  xmlhttp = false;
			  }
		 }
	  @else
		 xmlhttp = false;
	@end @*/
	if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
		try {
			xmlhttp = new XMLHttpRequest();
		} catch (e) {
			xmlhttp = false;
		}
	}
	xmlhttp.open(type,target,true);
	xmlhttp.onreadystatechange = function () {
		if(xmlhttp.readyState == 4){
			if (document.getElementById('sub'+id)) {
				y = document.getElementById('sub'+id);
				y.innerHTML = '';
				y.innerHTML = xmlhttp.responseText;
			}
			z = document.getElementById(vphp);
			if (z.innerHTML == 'true') x.innerHTML = xmlhttp.responseText;
		}
	}
	xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
	//xmlhttp.setRequestHeader("Content-Type","text/html; charset=utf-8");
	xmlhttp.send(variable);
	showPath();
	return false;
}

function removeTB(){
	document.self.parent.tb_remove();
}