
if(window.opener){
fenOuvrante=window.opener;
fenOuvrante.name='maman'; }

function survol(img,mode){
 var flip=s?"'norm','surv'":"'surv','norm'";
 document[img].src=eval("document['"+img+"'].src.replace("+flip+")");
}



function prelod(){
var d=document ,di=d.images, im=new Array();
 for(var i=0,j=0;i<di.length;i++){
  if(di[i].src.indexOf("_norm.")!=-1){
   im[j]= new Image();
   im[j].src=di[i].src.replace("_norm.", "_surv.");
    if(!di[i].onmouseover){
	di[i].onmouseover=Function("this.src=this.src.replace('_norm.','_surv.')");di[i].onmouseout=Function("this.src=this.src.replace('_surv.','_norm.')")
	}
   j++;
  }
 }
}


function noSwfBorder (id){
var contentFlash=document.getElementById(id).innerHTML;
contentFlash=contentFlash.replace(/&lt;/g,unescape('%3C'));
contentFlash=contentFlash.replace(/&gt;/g,unescape('%3E'));
document.write(contentFlash);
}

function arrondi_1(nbre, int){
nbre=nbre.replace(/,/g,'.');
nbre=nbre.replace(/[^0-9\.]/g,'');
nbre=parseFloat(nbre);
	if(isNaN(nbre)) return '';
	if(Math.round(nbre)<1) return '';
	if(int) return Math.round(nbre);
nbre=String(Math.round(nbre*100)/100);
nbre=nbre.replace(/(^[0-9]+$)/,"$1.00");
nbre=nbre.replace(/(^[0-9]+\.[0-9]$)/,"$1"+"0");
return nbre;
}

function controleSaisie(champ) {
var F=champ.form, N=champ.name, V=champ.value;
	switch(champ.name){
		case 'montant' :
		champ.value=arrondi_1(V);
		break;
		case 'mensualite' :
		champ.value=arrondi_1(V);
		break;
		case 'duree' : 
		champ.value=arrondi_1(V,'int');
		break;
	}
}

if( window.addEventListener ) {
	window.addEventListener('load',prelod,false);
} else if( document.addEventListener ) {
	document.addEventListener('load',prelod,false);
} else if( window.attachEvent ) {
	window.attachEvent('onload',prelod);
}

