

function swapImg(){
   Arr_Arg=swapImg.arguments;
   Arr_Arg[0].src=Arr_Arg[1];
}

var image= new Array();

function preLoad(){	
  	var Hd=document; 
  	if(Hd.images){ 
  		if(!Hd.Hp){ 
			Hd.Hp=new Array();
		}
   		var Hi;
		var Hj=Hd.Hp.length;
		var Ha=preLoad.arguments; 
		for(Hi=0; Hi<Ha.length; Hi++){
   			 if (Ha[Hi].indexOf("#")!=0){ 
			 	Hd.Hp[Hj]=new Image; Hd.Hp[Hj++].src=Ha[Hi];
			}		
		}
	}
}



function MM_openBrWindow(theURL,winName,features) { //v2.0	
 	var myWin = window.open(theURL,'fiche',features);
	myWin.focus();
}


function checkrequired(which, txt){
	var radioButt = "";
	radioButt = which["deltype"].value;
	alert("value = " + radioButt);
	//if(radioButt="altadresse"){
		var pass=true;
		for (i=0;i<which.length;i++){
			var tempobj=which.elements[i];
			if (tempobj.name.substring(0,2)=="r_"){
				if (((tempobj.type=="text"||tempobj.type=="textarea"||tempobj.type=="select-one")&&tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&tempobj.selectedIndex==-1)){
					pass=false;
					break;
				}
			}
		}
		if (!pass){
			alert("Champ(s) obligatoire(s) : " + txt + " ! \n Veuillez vérifier le(s) champ(s)");
			return false;
		}else{
			return true;
		}
	//}else{
	//	return true;
	//}
}




//  onclick="toggleTarget('altadressediv','block')"
function toggleTarget(what,how){	
	if(document.getElementById){
		document.getElementById(what).style.display=how;
	}
}


