function trim (myString){
	return myString.replace(/^\s+/g,'').replace(/\s+$/g,'');
} 

//Dream scripts
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//////////////////////////////////////////////////////////////////
// © Antouam - modulom / script section. PLease copy and credit //
//////////////////////////////////////////////////////////////////
function init()
	{
		document.getElementById('MainFrame').style.visibility='visible';
	}
function AfficheOptions()
	{
		if ( document.getElementById && document.getElementById( 'options' ) ) // Pour les navigateurs récents
				{
					Ladiv = document.getElementById( 'options' );
					Lebt = document.getElementById( 'btoptions' );
					Lemod = document.getElementById( 'albummods' );
					//Optioned = document.getElementById( 'optioned' );
					DivExist = true;
		 		}
			else if ( document.all && document.all[ 'options' ] ) // Pour les veilles versions
				{
					Ladiv = document.all[ 'options' ];
					Lebt = document.all[ 'btoptions' ];
					Lemod = document.all[ 'albummods' ];
					//Optioned = document.all[ 'optioned' ];
					DivExist = true;
				}
			else if ( document.layers && document.layers[ 'options' ] ) // Pour les très veilles versions
				{
					Ladiv = document.layers[ 'options' ];
					Lebt = document.layers[ 'btoptions' ];
					Lemod = document.layers[ 'albummods' ];
					//Optioned = document.layers[ 'optioned' ];
					DivExist = true;
				}
			else
				{
					DivExist = false;
				}
			if ( DivExist )
				{	
					Ladiv.className = ( Ladiv.className == 'cachediv' ) ? '' : 'cachediv';
					Lebt.className = ( Lebt.className == 'plus' ) ? 'moins' : 'plus';
					Lemod.className = ( Lemod.className == 'sansoptions' ) ? 'avecoptions' : 'sansoptions';
					//Optioned.className = ( Optioned.className == 'doteddown' ) ? '' : 'doteddown';
					//alert("> "+Lemod.name+" - "+Lemod.className);
				}
	}

function postele(debut,fin,objet) {
   location.href = 'mailto:'+debut+fin+'@roger-viollet.fr?subject='+objet;
}
function postele2(debut,fin,objet) {
   location.href = 'mailto:'+debut+fin+'@parisiennedephotographie.fr?subject='+objet;
}
function decode (lemail)
	{
		var monmail = lemail;
		varindexat = monmail.indexOf("@");
		var monmail1 = monmail.substr(0,varindexat);
		postele (monmail1,'','');
	}
function DivZindex( nom, num, leZ )
		{
			var divName = nom+num;
			if ( document.getElementById && document.getElementById( divName ) ) // Pour les navigateurs récents
				{
					Ladiv = document.getElementById( divName );
					DivExist = true;
		 		}
			else if ( document.all && document.all[ divName ] ) // Pour les veilles versions
				{
					Ladiv = document.all[ divName ];
					DivExist = true;
				}
			else if ( document.layers && document.layers[ divName ] ) // Pour les très veilles versions
				{
					Ladiv = document.layers[ divName ];
					DivExist = true;
				}
			else
				{
					DivExist = false;
				}
			if ( DivExist )
				{	
					x = num - leZ;
					x = Math.abs(x);
					//alert(x);
					switch (x)
					{	
						case 0:
							DivZ = 'z7';
							break;
						case 1:
							DivZ = 'z6';
							break;
						case 2:
							DivZ = 'z5';
							break;
						case 3:
							DivZ = 'z4';
							break;
						case 4:
							DivZ = 'z3';
							break;
						case 5:
							DivZ = 'z2';
							break;
						case 6:
							DivZ = 'z1';
							break;
					}
					Ladiv.className = DivZ;
					//alert("> "+Ladiv.name+" - "+Ladiv.className+" - "+DivZ);
				}
		}	
function TestDiv (nom, num)
	{
		var NumDiv = 1;
		var Z = num;
		if ( document.getElementById ) // Pour les navigateurs récents
		{
			while ( document.getElementById( nom + NumDiv) )
			{
				Ladiv = document.getElementById( nom + NumDiv );
				DivZindex( nom, NumDiv, Z );
				NumDiv++;
			}
		}
		else if ( document.all ) // Pour les veilles versions
		{
			while ( document.all[ nom + NumDiv ] )
			{
				Ladiv = document.all[ nom + NumDiv ];
				if ( Ladiv )
				{
					DivZindex( nom, NumDiv, Z );
				}
				NumDiv++;
			}
		}
		else if ( document.layers ) // Pour les très veilles versions
		{
			while ( document.layers[ nom + NumDiv ] )
			{
				Ladiv = document.layers[ nom + NumDiv ];
				if ( Ladiv )
				{
					DivZindex( nom, NumDiv, Z );
				}
				NumDiv++;
			}
		}
	}
function AfficheChamps()
	{
		if ( document.getElementById && document.getElementById( 'btswap' ) ) // Pour les navigateurs récents
			{
				LeBt = document.getElementById( 'btswap' );
				LadivOnName = LeBt.className;
				if (LadivOnName == 'rv') {
					LadivOffName = 'vdp';
				}
				else {
					LadivOffName = 'rv';
				}
				LadivOn = document.getElementById( LadivOnName );
				LadivOff = document.getElementById( LadivOffName );
				//alert (LadivOn.className+" - "+LadivOff.className);
				DivExist = true;
			}
		else if ( document.all && document.all[ 'btswap' ] ) // Pour les veilles versions
			{
				LeBt = document.all[ 'btswap' ];
				LadivOnName = LeBt.className;
				if (LadivOnName == 'rv') {
					LadivOffName = 'vdp';
				}
				else {
					LadivOffName = 'rv';
				}
				LadivOn = document.all[ LadivOnName ];
				LadivOff = document.all[ LadivOffName ];
				DivExist = true;
			}
		else if ( document.layers && document.layers[ 'btswap' ] ) // Pour les très veilles versions
			{
				LeBt = document.layers[ 'btswap' ];
				LadivOnName = LeBt.className;
				if (LadivOnName == 'rv') {
					LadivOffName = 'vdp';
				}
				else {
					LadivOffName = 'rv';
				}
				LadivOn = document.layers[ LadivOnName ];
				LadivOff = document.layers[ LadivOffName ];
				DivExist = true;
			}
		else
			{
				DivExist = false;
			}
		if ( DivExist )
			{	
				LadivOn.className = ( LadivOn.className == 'cachechps' ) ? 'montrechps' : 'cachechps';
				LadivOff.className = ( LadivOff.className == 'montrechps' ) ? 'cachechps' : 'montrechps';
				LeBt.className = ( LeBt.className == 'rv' ) ? 'vdp' : 'rv';
				//alert("> "+LadivOn.name+" - "+LadivOff.className);
			}
	}
function LoadCollection (url, lang, forminit)
	{
		var theurl;
		
		switch (forminit) {
			case '1':
				theurl= 'toutescollecs/'+url+lang+'.htm';
				document.collec1.redirect.value = "";
				break;
			case '2':
				theurl= 'toutescollecs/'+url+lang+'.htm';
				document.collec2.redirect.value = "";
				break;
		}
		window.affichecollec.location = theurl;
	}
function reloadCollec(url,lang,forminit)
	{
		 window.location = 'Unecollection.aspx?CO='+url+'&BOX='+forminit;
	}
function fonctionemfpty()
	 {
		document.write ('<script language="javascript">function showempty(divName){if(document.getElementById&&document.getElementById(divName)){Ladiv=document.getElementById(divName);DivExist=true;}');
		document.write ('else if(document.all&&document.all[divName]){Ladiv=document.all[divName];DivExist = true;}');
		document.write ('else if(document.layers&&document.layers[divName]){Ladiv=document.layers[divName];DivExist = true;}');
		document.write ('else{DivExist = false;alert("pasbon");}');
		document.write ('if(DivExist){Ladiv.className = "show";}}</script>');
	 }
function CollectionTxt(lang, num) {
	switch (num) {
		case '1':
			switch (lang) {
				case 'fr':
					document.write('Au fil du temps, l&rsquo;Agence a acquis de nombreuses collections qui forment une mosa&iuml;que de t&eacute;moignages de l&rsquo;Histoire dans tous les domaines. Ce patrimoine de grande ampleur court sur toute l&rsquo;histoire de la photographie.');
					break;
				case 'en':
					document.write('Over the years, the agency acquired various collections composing a fabulous historical testimony of close to 8 million images. The collections also document over a century of photographic history.');
					break;
			}
			break;
		case '2':
			switch (lang) {
				case 'fr':
					document.write('L&rsquo;Agence diffuse &eacute;galement, au-del&agrave; de ses propres archives et gr&acirc;ce &agrave; une intense politique de partenariats, des milliers d&rsquo;images illustratives, historiques et internationales.');
					break;
				case 'en':
					document.write('In addition to its own collections, Roger-Viollet represents some of the leading International photographic archives in France.');
					break;
			}
	}
}
function CNILTxt(lang) {
	switch (lang) {
		case 'fr':
			document.write('<strong>Roger-Viollet</strong> dispose de moyens informatiques destin&eacute;s &agrave; g&eacute;rer la visualisation, la livraison et la facturation de ses images. Les informations enregistr&eacute;es sont r&eacute;serv&eacute;es &agrave; un usage strictement interne et ne seront transmis &agrave; aucun tiers.<br />Vous disposez d&rsquo;un droit d&rsquo;acc&egrave;s, de modification, de rectification et de suppression des donn&eacute;es vous concernant (loi &laquo;&nbsp;Informatique et Libert&eacute;s&nbsp;&raquo; du 6 janvier 1978). Pour toute demande, adressez-vous &agrave;');
			break;
		case 'en':
			document.write('<strong>Roger-Viollet</strong> use computerized systems for accessing, delivering and billing its pictures. Users&rsquo; personal data is strictly for internal use by Roger-Viollet and will not be shared with any third party .<br />According to French electronic privacy laws, y ou have the right to access, correct, update or delete your personal information ( &laquo;&nbsp;Informatique et Libert&eacute;s&nbsp;&raquo; law, 6 th of January 1978). For any request, please email');
			break;
	}
}
function showempty(nom) {
	//Pour éviter erreur JS!! Ne pas enlever !!
}
function popvisuedit() {
	window.open('Zoom_edit.aspx','popvisuedit','titlebar=no,directories=0,menubar=0,toolbar=0,status=yes,scrollbars=no,resizable=yes,width=810,height=870,alwaysRaised=yes');
}
function ValideChampForm(thisName,Win) {
	LeChp = thisName.substring(thisName.indexOf("_"),thisName.lastIndexOf("_"));
	LeChpGche = 'chp'+LeChp;
	LaVal = Win+'document.editlot.'+thisName+'.value';
	LaLang1 = thisName.substring(thisName.lastIndexOf("_"));
	switch(LaLang1) {
		case "_fr":
			var LaLang2 = '_en';
			break;
		case "_en":
			var LaLang2 = '_fr';
			break;
		default :
			var LaLang2 = '';
			break;
	}
	LaDivGche = eval(Win+'document.getElementById( LeChpGche )');
	LaDivLang1 = eval(Win+'document.getElementById( thisName )');
	if (LaLang2 != '') {
		LeChpLang2 = thisName.substring(thisName.lenght,thisName.lastIndexOf("_"));
		LeChpLang2 = LeChpLang2+LaLang2;
		LaValLang2 = Win+'document.editlot.'+LeChpLang2+'.value';
	}
	//alert(LeChp+' / '+LeChpGche+' / '+LaVal+' / '+LaDivGche.className+' / '+LaLang1+' / '+LaLang2+' / '+LeChpLang2+' / '+LaValLang2+' / '+eval(LaValLang2));
	if (eval(LaVal) != '') {
		LaDivGche.className = 'champon';
		LaDivLang1.className = 'areaon';
	}
	else {
		if (LaLang2 != '' && eval(LaValLang2) == '') {
			LaDivGche.className = 'champoff';
		}
		LaDivLang1.className = 'areaoff';
	}
}
function ValideChkForm(thisName, thisValue) {
	LeChp = thisName.substring(thisName.indexOf("_"));
	LeChpGche = 'chp'+LeChp;
	LaVal = thisValue;
	LaDivGche = document.getElementById( LeChpGche );
	LaDiv = document.getElementById( thisName );
	//alert(LeChp+' / '+LeChpGche+' / '+LaVal+' / '+LaDivGche.className);
	if (LaVal != '-') {
		LaDivGche.className = 'champon';
	}
	else {
		LaDivGche.className = 'champoff';
	}
}
function ValideSimpleChampForm(thisName, thisValue, Win) {
	LeChp = thisName.substring(thisName.indexOf("_"));
	LeChpGche = 'chp'+LeChp;
	LaVal = thisValue;
	LaDivGche = eval(Win+'document.getElementById( LeChpGche )');
	LaDiv = eval(Win+'document.getElementById( thisName )');
	//alert(LeChp+' / '+LeChpGche+' / '+LaVal+' / '+LaDivGche.name);
	if (LaVal != '') {
		LaDivGche.className = 'champon';
		LaDiv.className = 'areaon';
	}
	else {
		LaDivGche.className = 'champoff';
		LaDiv.className = 'areaoff';
	}
}
function ValideChampSpeForm(thisName,thisValue,ChpGche,otherEnd) {
	LeChpGche = 'chp_'+ChpGche;
	LaVal = thisValue;
	LaDivGche = document.getElementById( LeChpGche );
	LaDiv1 = document.getElementById( thisName );
	LeChp2 = 'txt_'+ChpGche+otherEnd;
	LaDiv2 = document.getElementById( LeChp2 );
	LaVal2 = 'document.editlot.'+LeChp2+'.value';
	//alert(LeChpGche+' / '+LaVal+' / '+LaDivGche.className+' / '+LeChp2+' / '+LaVal2+' / '+eval(LaVal2));
	if (LaVal != '') {
		LaDivGche.className = 'champon';
		LaDiv1.className = 'areaon';
	}
	else {
		if (eval(LaVal2) == '') {
			LaDivGche.className = 'champoff';
		}
		LaDiv1.className = 'areaoff';
	}
}
function ValideChampSpe2Form(ChpGche,NameChp,PosChp,ValChp) {
	LeChpGche = ChpGche;
	ThisVal = ValChp;
	LaDivGche = document.getElementById( LeChpGche );
	ThisDivName = 'txt_'+NameChp+PosChp;
	ThisDiv = document.getElementById( ThisDivName );
	var OthersNames = new Array('','day','month','year','day','month','year');
	var NullValFr = new Array('','jj','mm','aaaa','jj','mm','aaaa');
	var NullValEn = new Array('','dd','mm','yyyy','dd','mm','yyyy');
	var OthersEnds = new Array('','Before','Before','Before','After','After','After');
	AllValues = '';
	for (i=1;i<=6;i++) {
		LeChp = new Array;
		LaDiv = new Array;
		LaVal = new Array;
		LaValTest = new Array;
		LeChp[i] = 'txt_'+OthersNames[i]+OthersEnds[i];
		LaDiv[i] = document.getElementById( LeChp[i] );
		LaVal[i] = 'document.editlot.'+LeChp[i]+'.value';
		LaValTest[i] = eval(LaVal[i]);
		if ( ThisVal == NullValFr[i] || ThisVal == NullValEn[i]){
			ThisVal = '';
		}
		if ( LaValTest[i] == NullValFr[i] || LaValTest[i] == NullValEn[i]) {
			LaValTest[i] = '';
		}
		AllValues = AllValues+LaValTest[i];
		//alert (LeChp[i]+' / '+LaDiv[i].name+' / '+eval(LaVal[i])+' / '+LaValTest[i]+' / '+AllValues);
	}
	//alert(LeChpGche+' / '+LaVal+' / '+LaDivGche.className+' / '+LeChp2+' / '+LaVal2+' / '+eval(LaVal2));
	if (ThisVal != '' ) {
		LaDivGche.className = 'champon';
		ThisDiv.className = 'areaon';
	}
	else {
		if (AllValues == '') {
			LaDivGche.className = 'champoff';
		}
		ThisDiv.className = 'areaoff';
	}
}
function OpenListeAide(tbl,cl,lang,sf,LeForm,Mod) {
	switch (Mod) {
		case 1:
			LeChp = sf.substring(sf.indexOf("_"));
			LeChp = 'hlist'+LeChp;
			break;
		case 2:
			LeChp = sf;
			break;
	}
	LaVal = eval('document.'+LeForm+'.'+LeChp+'.value');
	if (LaVal != '') {
		URL = 'HelpList.aspx?NTBL='+tbl+'&CLV='+cl+'&SF='+sf+'&NLANG='+lang+'&VAL='+LaVal+'&FORM='+LeForm+'&MOD='+Mod;
		window.open(URL,'AidePop','titlebar=no,directories=0,menubar=0,toolbar=0,scrollbars=auto,resizable=no,width=400,height=500,alwaysRaised=yes');
	}
	else {
		alert ('Le champ est vide !');
	}	
	document[LeForm][LeChp].value = "";
}
function OpenListe2Aide(tbl,cl,FieldOrder,sf,sfh,LeForm,Mod) {
	switch (Mod) {
		case 1:
			LeChp = sf.substring(sf.indexOf("_"));
			sfcopyh='hidden'+LeChp;
			LeChp = 'hlist'+LeChp;
			break;
		case 2:
			LeChp = sf;
			sfcopyh='hidden_'+sf;
			break;
	}
	LaVal = eval('document.'+LeForm+'.'+LeChp+'.value');
	if (1) {
		URL = 'HelpList2.aspx?NTBL='+tbl+'&CLV='+cl+'&SF='+sf+'&SFCOPYH='+sfcopyh+'&SFH='+sfh+'&FDO='+FieldOrder+'&VAL='+LaVal+'&FORM='+LeForm+'&MOD='+Mod;
		winHelp=window.open(URL,'AidePop','titlebar=no,directories=0,menubar=0,toolbar=0,scrollbars=auto,resizable=no,width=400,height=500,alwaysRaised=yes');
		if(winHelp.window.focus){winHelp.window.focus();}
	}
	else {
		alert ('Le champ est vide !');
	}	
	document[LeForm][LeChp].value = "";
}

function OpenSearchListeAide(tbl,cl,lang,sf,LeForm,Mod) {
	LeChp = sf;
	LaVal = '';
	URL = 'HelpList.aspx?NTBL='+tbl+'&CLV='+cl+'&SF='+sf+'&NLANG='+lang+'&VAL='+LaVal+'&FORM='+LeForm+'&MOD='+Mod;
	window.open(URL,'AidePop','titlebar=no,directories=0,menubar=0,toolbar=0,scrollbars=auto,resizable=no,width=400,height=500,alwaysRaised=yes');
}
function ValidHelpItem(sf,Form,Val,Mod,lang) {
	//alert(sf+' / '+Form+' / '+Val);
	var ValChpParent = 'opener.document.'+Form+'.'+sf+'.value';
	if (eval(ValChpParent) != '') {
		if (Mod != 3) {
			var NewLine = '\n';
		}
		else {
			var NewLine = ' ';
		}
	}
	else {
		var NewLine = '';
	}
	if (Mod==3) {
	    Val = '"'+Val+'"';
	}
	ValChpParentNew = eval(ValChpParent)+NewLine+Val;
	opener.document[Form][sf].value = ValChpParentNew;
	if (Form == 'editlot') {
		if ( lang != '') {
			ValideChampForm(sf,'opener.');
		}
		else {
			ValideSimpleChampForm(sf,Val,'opener.');
		}
	}
	window.close();
}


function ValidHelp2Item(sf,sfcopyh,sfh,Form,Val,ValCode,Mod) {
	//var ValChpParent = 'opener.document.'+Form+'.'+sf+'.value';
	var sep=' | ';
	if (opener.document[Form][sfcopyh].value=='') {sep='';}
	opener.document[Form][sfcopyh].value=opener.document[Form][sfcopyh].value+sep+Val;
	opener.document[Form][sfh].value=opener.document[Form][sfh].value+sep+ValCode;
	opener.document.getElementById(sf).innerHTML=reecriture_html(sf,opener.document[Form][sfcopyh].value,sfcopyh,sfh,Form);
	
	if (Form == 'editlot') {
		if ( lang != '') {
			ValideChampForm(sf,'opener.');
		}
		else {
			ValideSimpleChampForm(sf,Val,'opener.');
		}
	}
//	window.close();
}

function reecriture_html(sf,chn,sfcopyh,sfh,form){
//	var chn = eval('document.'+form+'.'+sfcopyh+'.value');
	if (trim(chn) !=''){
		tab=chn.split(' | ');
		chn='';
		for (i=0; i<tab.length; i++) {
			chn+='<a href="javascript:void(0);" onClick="DelHelp2Item('+i+',\''+sf+'\',\''+sfcopyh+'\',\''+sfh+'\',\''+form+'\');"><img src="img/pictos/etat_valid_2.gif" border="0"></a> '+tab[i]+'<br/>';
		}
	}
	return chn;
}

function DelHelp2Item(rg,sf,sfcopyh,sfh,form){
	var chn_sfcopyh = eval('document.'+form+'.'+sfcopyh+'.value');
	var chn_sfh = eval('document.'+form+'.'+sfh+'.value');
	var sep=' | ';
	tab_sfcopyh=chn_sfcopyh.split(sep);
	tab_sfh=chn_sfh.split(sep);
	tab_sfh[rg]=tab_sfcopyh[rg]=chn_sfcopyh=chn_sfh='';

	for (i=0; i<tab_sfh.length; i++) {
		if (i!=rg) {
			if (chn_sfh ==''){
				chn_sfh=tab_sfh[i];
				chn_sfcopyh=tab_sfcopyh[i];
			}else{
				chn_sfh+=sep + tab_sfh[i];
				chn_sfcopyh+=sep + tab_sfcopyh[i];
			}
		}
	}
	
	document[form][sfh].value=chn_sfh;
	document[form][sfcopyh].value=chn_sfcopyh;
	document.getElementById(sf).innerHTML=reecriture_html(sf,document[form][sfcopyh].value,sfcopyh,sfh,form)
}

function testsrc(src,lang) {
	var src = src.substring(src.lastIndexOf("/")+1);
	//alert(src);
	if(src=='label_pluscrit.gif') {
		url = 'img/'+lang+'/label_moinscrit.gif';
		MM_swapImage('bt_crit','',url,1);
	}
	else {
		url = 'img/'+lang+'/label_pluscrit.gif'
		MM_swapImage('bt_crit','',url,1);
	}
	if ( document.getElementById && document.getElementById( 'AdvSearch' ) ) // Pour les navigateurs récents
		{
			Ladiv = document.getElementById( 'AdvSearch' );
			//LeChpSupp = document.getElementById( 'ChpSupp' );
			DivExist = true;
		}
	else if ( document.all && document.all[ 'AdvSearch' ] ) // Pour les veilles versions
		{
			Ladiv = document.all[ 'AdvSearch' ];
			//LeChpSupp = document.all[ 'ChpSupp' ];
			DivExist = true;
		}
	else if ( document.layers && document.layers[ 'AdvSearch' ] ) // Pour les très veilles versions
		{
			Ladiv = document.layers[ 'AdvSearch' ];
			//LeChpSupp = document.layers[ 'ChpSupp' ];
			DivExist = true;
		}
	else
		{
			DivExist = false;
		}
	if ( DivExist )
		{	
			Ladiv.className = ( Ladiv.className == '' ) ? 'cachediv' : '';
			//LeChpSupp.className = ( LeChpSupp.className == 'cachediv' ) ? '' : 'cachediv';
		}
}
function EraseFiche() {
	for (i=0 ; i<=document["edit"].length ; i++) {
		if (document["edit"][i].name == 'txt_coteInventaire' || document["edit"][i].name == 'txt_coteInfo' || document["edit"][i].name == 'txt_legende_fr' || document["edit"][i].name == 'txt_legende_en' || document["edit"][i].name == 'slc_copy' || document["edit"][i].name == 'txt_photographe' || document["edit"][i].name == 'txt_infosint' || document["edit"][i].name == 'slc_format' || document["edit"][i].name == 'slc_support' || document["edit"][i].name == 'chk_diff' || document["edit"][i].name == 'chk_oeuvre' || document["edit"][i].name == 'chk_couleur' || document["edit"][i].name == 'chk_aindex' || document["edit"][i].name == 'chk_atrad' || document["edit"][i].name == 'chk_annote' || document["edit"][i].name == 'chk_etatValid' || document["edit"][i].name == 'chk_modediff' || document["edit"][i].name == 'txt_cle' || document["edit"][i].name == 'txt_numInv' || document["edit"][i].name == 'txt_coteBibli' || document["edit"][i].name == 'txt_legendeOrig_fr') {
			//alert(document["edit"][i].name+" = "+document["edit"][i].value);
		}
		else if (document["edit"][i].name == 'txt_dateOeuvreDeb' || document["edit"][i].name == 'txt_dateOeuvreFin') {
			document["edit"][i].value = 0;
		}
		else {
			document["edit"][i].value = '';
			//alert(document["edit"][i].name+"a été vidé ! ");
		}
	}
}
function ActiveFormBt(Pos) {
	MaClass='bt'+Pos;
	LeBt1=document.getElementById('Btenr1');
	LeBt2=document.getElementById('Btenr2');
	LeBt1.className=MaClass;
	LeBt2.className=MaClass;
}