function affaide(n){
	if(n!=''){
		if(autoJS){
			document.getElementById('claidex').style.left=Xpos+10;
			document.getElementById('claidex').style.top=Ypos+10;
			document.getElementById('claidex').style.visibility='visible';
			afan.affaide(n);
		}
	}else{
		document.getElementById('claidex').style.visibility='hidden';
	}
}
function va(f,n,c){
	document.fm.xloc.value=n;
	var u;
	switch(f){
		case 0:
			u="http://www.odispo.com/administration/tarifs-abonnements.php";
			if(c==1){document.fm.mdm.value="abom";}
			break;
		case 1:u="http://www.odispo.com/administration/maj-dispo.php";break;
		case 2:u="http://www.odispo.com/administration/tarif.php";break;
		case 3:if(c){u="http://www.odispo.com/administration/promo.php?m=1";}else{u="http://www.odispo.com/administration/dispo.php?m=n";}break;
		case 4:u="http://www.odispo.com/administration/photo.php";break;
		case 5:u="http://www.odispo.com/administration/gestion.php";break;
		case 6:u="http://www.odispo.com/administration/part.php";break;
		case 7:u="http://www.odispo.com/administration/tag.php";break;
		case 8:u="http://www.odispo.com/administration/tarification.php";break;
	}
	document.fm.action=u;document.fm.submit();
}
function prlg(f,n,z){
	if(f){
		if(z){
			var txt="Etes vous sûr de vouloir prolonger votre parution de 1 mois ?\nVotre compte sera débité de "+z+" unité";
			if(z>1){txt+="s";}
		}else{
			var txt="Etes vous sûr de vouloir prolonger gratuitement votre parution de 1 mois ?";
		}
		if(confirm(txt)){document.fm.xloc.value=n;document.fm.act.value="pro";document.fm.submit();}
	}else{
		alert("Vous ne pouvez pas prolonger votre parution de plus de 3 mois !\nProlongation possible à partir du mois prochain.");
	}
}
var DrapCliStWeb=0;	
var DrapCliColor=0;
var CntCliColor=0;
function cliStWeb(){
	if(DrapCliStWeb){
		if(!DrapCliColor){
			document.getElementById('banstweb').style.color="#3399FF";DrapCliColor=1;
		}else{
			document.getElementById('banstweb').style.color="black";DrapCliColor=0;
		}
		if(CntCliColor<2){DrapCliStWeb=1;}else{DrapCliStWeb=0;DrapCliColor=0;CntCliColor=-1;}
		var tmp=250;CntCliColor++;
	}else{
		DrapCliStWeb=1;
		document.getElementById('banstweb').style.color="black";
		var tmp=1000;
	}
	setTimeout("cliStWeb();",tmp);
}
var HdlTime;
var RegHdlTime=0;
function vsst(n){if(n){document.getElementById('viscib').style.top=Ypos;document.getElementById('viscib').style.visibility='visible';if(flgfenval){document.getElementById('comp'+flgfenval).style.visibility='hidden';flgfenval=0;}calvu(1);}else{calvu(0);document.getElementById('viscib').style.visibility='hidden';}}
function calvu(n){
	var txt;
	if(n){
		RegHdlTime=0;
		if(Number(document.fm.ptst1.value)=="NaN"){document.fm.ptst1.value=0;}
		if(Number(document.fm.ptst2.value)=="NaN"){document.fm.ptst2.value=0;}
		txt=(document.fm.ptst1.value*tbctvuport[0])+(document.fm.ptst2.value*tbctvuport[1]);
		if(txt>1){txt+=" unités";}else{txt+=" unité";}
		document.fm.resvu.value=txt;
		HdlTime=setTimeout("calvu(1);",100);
		RegHdlTime=1;
	}else{if(RegHdlTime){clearTimeout(HdlTime);}}	
}
function achvu(){
	var txt;var cout=0;var drp=0;
	if(document.fm.ptst1.value>0){txt=" - "+document.fm.ptst1.value+" visiteur";if(document.fm.ptst1.value>1){txt+="s";}txt+=" pour Odispo.com\n";cout=document.fm.ptst1.value*tbctvuport[0];drp=1;}
	if(document.fm.ptst2.value>0){txt+=" - "+document.fm.ptst2.value+" visiteur";if(document.fm.ptst2.value>1){txt+="s";}txt+=" pour vivementlesvacances.com\n";cout=cout+(document.fm.ptst2.value*tbctvuport[1]);drp=1;}
	if(drp){
		if(totcred>=cout){
			txt+="\nCoût total "+cout+" unité";if(cout>1){txt+="s";}
			if(confirm("Vous etes sur le point d'acheter:\n\n"+txt+"\nConfirmez vous cet achat ? ")){
				document.fm.ptstact.value="cre";document.fm.submit();			
			}else{vsst(0);}
		}else{if(confirm("Vous devez créditer votre compte pour effectuer cet achat.\nVoulez vous le créditer maintenant ?")){window.location="comm.php?m=l";}else{vsst(0);}}
	}else{alert("Aucun achat n'est renseigné !");}
}
function noymnuNouv(n){
	if(n){n=0;document.getElementById('btnouvact').style.backgroundColor="white";}else{n=1;document.getElementById('btnouvact').style.backgroundColor="red";}
	setTimeout("noymnuNouv("+n+");",1000);	
}
function InCntns(){
	ctrl.cntnous();
	document.getElementById('ctns').style.left=10;
	document.getElementById('ctns').style.top=150;
	document.getElementById('ctns').style.visibility="visible";
	document.fm.obj.value="Changement adresse courriel";
	document.fm.reponse.focus();
}
var DrpCdy=0;
var HandleCdy=0;
function ccddy(n){
	if(n){
		if(n==1){
			if(HandleCdy){clearTimeout(HandleCdy);}
			DrpCdy=1;
			document.getElementById('caddy').style.visibility="visible";
		}else{
			DrpCdy=0;
			document.getElementById('caddy').style.visibility="hidden";
		}
	}else{if(HandleCdy){clearTimeout(HandleCdy);}HandleCdy=setTimeout("ccddy(2);",1000);}
}
var NumSelCdy=0;
function selCdy(n,th){
	if(th){
		if(NumSelCdy){document.getElementById('cdy'+NumSelCdy).style.backgroundColor="white";document.getElementById('cdy'+n).style.color="black";}
		NumSelCdy=n;
		document.getElementById('cdy'+n).style.backgroundColor="navy";
		document.getElementById('cdy'+n).style.color="white";
		ccddy(1);
	}else{
		if(NumSelCdy){document.getElementById('cdy'+NumSelCdy).style.backgroundColor="white";document.getElementById('cdy'+n).style.color="black";}
		NumSelCdy=0;
		ccddy(0);
	}
}
function ClkCdy(n){
	if(!n){
		document.fm.action="http://www.odispo.com/administration/comm.php?m=q";
	}else if(n==1){
		document.fm.action="http://www.odispo.com/administration/comm.php?m=l";
	}else if(n==2){
		document.fm.action="http://www.odispo.com/administration/comm.php?m=l";
	}else if(n==3){
		document.fm.action="http://www.odispo.com/administration/comm.php?m=a";
	}else{document.fm.action="http://www.odispo.com/administration/comm.php?m=o";}
	document.fm.submit();
}
function modCrd(n){var s="";if(n>1){s="s";}document.getElementById('crdtxt').innerHTML=n+"<br />Unité"+s;}
function cloAnn(n){
	if(n){
		document.getElementById('txann').style.visibility="visible";
		document.getElementById('txann').style.top=Ypos+5;
		document.getElementById('txann').style.left=Xpos+5;
	}else{document.getElementById('txann').style.visibility="hidden";}
}
