function saisiedevise (valeur)
{
if (isNaN(valeur)) 
	{
	nombres=valeur.split(",");
	if (nombres[0]=="") {nombres[0]="0"}
	if ((nombres.length==2) && (nombres[1]=="")) {nombres[1]="0"}
	if ((nombres.length==2) && (parseInt(nombres[0]).toString()==nombres[0]) && (parseInt(nombres[1]).toString()==nombres[1]))
		{
		resultat = parseFloat(eval(nombres[0]+'.'+nombres[1]));
		return Math.round(resultat*100)/100;
		}
		else
		{
		resultat=0;
		return resultat;
		}
	}
else
	{
	return Math.round(valeur*100)/100;
	}
}


function saisieheure (valeur)
{
if (isNaN(valeur)) 
	{
	nombres=valeur.split(",");
	if (nombres[0]=="") {nombres[0]="0"}
	if ((nombres.length==2) && (nombres[1]=="")) {nombres[1]="0"}
	if ((nombres.length==2) && (parseInt(nombres[0]).toString()==nombres[0]) && (parseInt(nombres[1]).toString()==nombres[1]))
		{
		resultat = parseFloat(eval(nombres[0]+'.'+nombres[1]));
		return Math.round(resultat*100000)/100000;
		}
		else
		heures=valeur.split("h");
		if ((heures.length==2) && (heures[1]=="")) {heures[1]="0"}		
		if ((heures.length==2) && (parseInt(heures[1])==0)) {heures[1]="0"}
		if ((heures.length==2) && (parseInt(heures[0]).toString()==heures[0]) && (parseInt(heures[1])<60))
			{
			minutedec = parseInt(heures[1])/60;
			minutedectxt= minutedec.toString();
			decimal=minutedectxt.split(".");
			if (decimal.length==1) {decimal[1]="0"}
			resultat=parseFloat(eval(heures[0]+'.'+decimal[1]));
			return Math.round(resultat*100000)/100000;
			}
		else		
		{
		resultat=0;
		return resultat;
		}
	}
else
	{
	return Math.round(valeur*100000)/100000;
	}
}


function erreurdynacc(ms, ad, lgn)
{
	adhtml=window.open("http://www.monbulletin.com/ADEGEDStatic/accueil/qsn1.htm","adstat");
	self.opener=adhtml;
	window.onerror=null;
	return true
}

function erreurdynfd(ms, ad, lgn)
{
	adhtml=window.open("http://www.monbulletin.com/ADEGEDStatic/fonds_doc/n1n0n0n0.htm","adstat");
	self.opener=adhtml;
	window.onerror=null;
	return true
}

function chargedyn()
{
	self.focus();
	self.status="ADEGED-GESTION";	
	if(typeof pdfurl=="string"){	
	window.location=pdfurl;
	}
	
	if((document.anchors.length>0)&&(typeof etape2=="string")){
	window.location.hash="etape2";
	}

}

function quitte()
{
	self.status="ADEGED vous remercie de votre visite";
}

function lienaccueil()
{
	window.onerror=erreurdynacc;
	if ((self.opener!=null)&&(typeof self.opener.closed!="unknown")&&(!self.opener.closed)&&(typeof self.opener.status!="unknown")&&((self.opener.status=="ADEGED-ACCUEIL")||(self.opener.status=="ADEGED-FD")))
		{
		self.opener.opener=self;
		if (self.opener.status=="ADEGED-FD")
			{self.opener.location="http://www.monbulletin.com/ADEGEDStatic/accueil/qsn1.htm","adstat"}
		self.opener.focus();
		}	           
	else
		{ 
		if ((typeof adhtml!="undefined")&&(typeof adhtml.closed!="unknown")&&(!adhtml.closed)&&(typeof adhtml.status!="unknown")&&((adhtml.status=="ADEGED-ACCUEIL")||(adhtml.status=="ADEGED-FD")))
			{
			self.opener=adhtml;
			adhtml.opener=self;
			if (adhtml.status=="ADEGED-ACCUEIL")
				{adhtml.location="http://www.monbulletin.com/ADEGEDStatic/accueil/qsn1.htm","adstat"}
			self.opener.focus();
			}           
		else 
			{
			adhtml=window.open("http://www.monbulletin.com/ADEGEDStatic/accueil/qsn1.htm","adstat");
			self.opener=adhtml;
			}  
		}  
	window.onerror=null;
}

function lienfd()
{
	window.onerror=erreurdynfd;
	if ((self.opener!=null)&&(typeof self.opener.closed!="unknown")&&(!self.opener.closed)&&(typeof self.opener.status!="unknown")&&((self.opener.status=="ADEGED-ACCUEIL")||(self.opener.status=="ADEGED-FD")))
		{
		self.opener.opener=self;
		if (self.opener.status=="ADEGED-ACCUEIL")
			{self.opener.location="http://www.monbulletin.com/ADEGEDStatic/fonds_doc/n1n0n0n0.htm","adstat"}
		self.opener.focus();
		}           
		else
		{ 
		if ((typeof adhtml!="undefined")&&(typeof adhtml.closed!="unknown")&&(!adhtml.closed)&&(typeof adhtml.status!="unknown")&&((adhtml.status=="ADEGED-ACCUEIL")||(adhtml.status=="ADEGED-FD")))
			{
			self.opener=adhtml;
			adhtml.opener=self;
			if (adhtml.status=="ADEGED-ACCUEIL")
				{adhtml.location="http://www.monbulletin.com/ADEGEDStatic/fonds_doc/n1n0n0n0.htm","adstat"}
			self.opener.focus();
			}           
		else 
			{
			adhtml=window.open("http://www.monbulletin.com/ADEGEDStatic/fonds_doc/n1n0n0n0.htm","adstat");
			self.opener=adhtml;
			}  
		}  
	window.onerror=null;
}