//load xml file code for IE
if (window.ActiveXObject)
  {
  xml_doc=new ActiveXObject("Microsoft.XMLDOM");
  }
// code for Mozilla, Firefox, Opera, etc.
else if (document.implementation.createDocument)
  {
  xml_doc=document.implementation.createDocument("","",null);
  }
xml_doc.async = false; 

xml_doc.load("/art.xml"); 
//xml_doc.load("art.xml"); 

var artList = xml_doc.getElementsByTagName("peinture"); 
var nTotal = artList.length; 

//alert (nTotal);
//******************************************************************************
function picture(TabRef) {
	
	document.write('<table border="0" width="600" cellpadding="0">');
	document.write('<tr><td>');
	document.write('<img src="http://www.culturedev.com/images/'+TabRef+'.jpg" alt="">');
	document.write('</td>');
	document.write('</tr>');
	document.write('</table>');
	
}

function f_AfficheMenuGauche(p_option) {
	
	var currentLocation =  document.location.href;
	
	document.write('<table border="0" width="100%" height="200" cellspacing="5" cellpadding="5">');
	
	if (currentLocation!="http://www.fabricemartin.fr"){
		document.write('<tr><td><a href="/">Home</a></td></tr>');
	} else {
		document.write('<tr><td><b>Home</b></td></tr>');
	}
	
	if (currentLocation.lastIndexOf( "gallery" )>0){
		document.write('<tr><td nowrap>');
		document.write('<b>Gallery</b><ul>');
		document.write('<li><a href="javascript:f_Swap(\'best\', \'Peintures r&#233;centes\',\'zoom\');">Peintures r&#233;centes</a></li>');
		document.write('<li><a href="javascript:f_Swap(\'hairy\', \'Femmes naturelles (2008-2009)\',\'zoom\');">Femmes naturelles</li>');
		document.write('<li><a href="javascript:f_Swap(\'feet\', \'Feet & shoes\',\'zoom\');">Feet & shoes</li>');
		document.write('<li><a href="javascript:f_Swap(\'nude\', \'Nus artistiques (18+)\',\'zoom\');">Nus artistiques (18+)</li>');
		document.write('<li><a href="javascript:f_Swap(\'incoming\', \'Travaux en cours\',\'zoom\');">Travaux en cours</li></ul>');
		document.write('</td></tr>');
	} else if (currentLocation.lastIndexOf( "H00" )>0){
		document.write('<tr><td><a href="/gallery.htm"><b>Gallery</b></a></td></tr>');
	} else {
		document.write('<tr><td><a href="/gallery.htm">Gallery</a></td></tr>');
	}
	//document.write('<tr><td><a href="/encheres.htm">Acheter<em>(Buy)</em></a></td></tr>');
	if (currentLocation.lastIndexOf( "cv" )>0){
		document.write('<tr><td><b>CV</b></td></tr>');
	} else {
		document.write('<tr><td><a href="/pages/cv.htm">CV</a></td></tr>');
	}
	
	if (currentLocation.lastIndexOf( "bio" )>0){
		document.write('<tr><td><b>Biography</b></td></tr>');
	} else {
		document.write('<tr><td><a href="/pages/bio.htm">Biography</a></td></tr>');
	}
	
	/*if (currentLocation.lastIndexOf( "modele" )>0){
		document.write('<tr><td><b>Recherche modeles</b></td></tr>');
	} else {
		document.write('<tr><td><a href="/modele.htm">Recherche modeles</a></td></tr>');
	}*/
	
	if (currentLocation.lastIndexOf( "videos" )>0){
		document.write('<tr><td><b>Videos</b></td></tr>');
	} else {
		document.write('<tr><td><a href="/videos.htm">Videos</a></td></tr>');
	}
	
	if (currentLocation.lastIndexOf( "guestbook" )>0){
		document.write('<tr><td><b>Guestbook</b></td></tr>');
	} else {
		document.write('<tr><td><a href="/guestbook.htm">Guestbook</a></td></tr>');
	}
	
	if (currentLocation.lastIndexOf( "links" )>0){
		document.write('<tr><td><b>Links</b></td></tr>');
	} else {
		document.write('<tr><td><a href="/links.htm">Links</a></td></tr>');
	}
	
	/*if (currentLocation.lastIndexOf( "faq" )>0){
		document.write('<tr><td><b>Faq</b></td></tr>');
	} else {
		document.write('<tr><td><a href="/faq.htm">Faq</a></td></tr>');
	}*/
	
	document.write('<tr><td><a href="/contact.htm">Contact</a></td></tr>');
	
	
	document.write('<tr><td><br>');
	document.write('<a href="http://www.facebook.com/pages/Fabrice-Martin/276070845703" target="_TOP" rel="nofollow">');
	document.write('<img src="http://badge.facebook.com/badge/276070845703.4092.2042279531.png" width="120" height="206" border="0" /></a>');
	document.write('</td></tr>');
	document.write('</table>');
	
}

function f_AfficheRechercheGoogle(){

	document.write('<style type="text/css">');
	document.write('@import url(http://www.google.com/cse/api/branding.css);');
	document.write('</style>');
	document.write('<div class="cse-branding-right" style="background-color:#FFFFFF;color:#000000">');
	document.write('<div class="cse-branding-form">');
	document.write('<form action="http://www.google.com/cse" id="cse-search-box" target="_blank">');
	document.write('<div>');
	document.write('<input type="hidden" name="cx" value="partner-pub-5708220291328182:bywvyi-t27c" />');
	document.write('<input type="hidden" name="ie" value="ISO-8859-1" />');
	document.write('<input type="text" name="q" size="20" />');
	document.write('<input type="submit" name="sa" value="Rechercher" />');
	document.write('</div>');
	document.write('</form>');
	document.write('</div>');
	document.write('<div class="cse-branding-logo">');
	document.write('<img src="http://www.google.com/images/poweredby_transparent/poweredby_FFFFFF.gif" alt="Google" />');
	document.write('</div>');
	document.write('<div class="cse-branding-text">');
	document.write('Recherche personnalis&#233;e');
	document.write('</div>');
	document.write('</div>');

}

function f_AfficheMenuHaut(p_option) {
	//alert (window.location);

	document.write('<table border="0" width="100%" height="15" cellspacing="0" cellpadding="0">');
	document.write('<tr>');
	document.write('<td width="72">&nbsp;<td>');
	document.write('<td width="210" valign="top"><a href="/"><img src="http://www.culturedev.com/photos/nom.jpg" border="0"></a><td>');
	document.write('<td width="40%" valign="top" style="padding-top:8px;"><font size="2">Artiste peintre neo-expressionniste</font><td>');
	document.write('<td width="60%" valign="top" style="padding-top:3px;">');
	//http%3A%2F%2Fwww.fabricemartin.fr%2F
	
	f_AfficheRechercheGoogle();
	
	document.write('</td></tr>');
	document.write('<tr>');
	document.write('<td>&nbsp;</td><td colspan="2">');
	
	document.write('	&nbsp;<a href="http://translate.google.com/translate?hl=fr&ie=UTF-8&u='+window.location+'&sl=fr&tl=en&history_state0=">');
	document.write('		<img src="http://www.culturedev.com/photos/uk_flag.png" class="flag">');
	document.write('	</a>');
	document.write('	&nbsp;<a href="http://translate.google.com/translate?u='+window.location+'&sl=fr&tl=ja&hl=fr&ie=UTF-8">');
	document.write('		<img src="http://www.culturedev.com/photos/jp_flag.png" class="flag">');
	document.write('	</a>');
	document.write('	&nbsp;<a href="http://translate.google.com/translate?hl=fr&ie=UTF-8&u='+window.location+'&sl=fr&tl=cs&history_state0=">');
	document.write('		<img src="http://www.culturedev.com/photos/cz_flag.png" class="flag">');
	document.write('	</a>');
	document.write('	&nbsp;<a href="http://translate.google.com/translate?hl=fr&ie=UTF-8&u='+window.location+'&sl=fr&tl=de&history_state0=">');
	document.write('		<img src="http://www.culturedev.com/photos/de_flag.png"  class="flag">');
	document.write('	</a>');
	document.write('	&nbsp;<a href="http://translate.google.com/translate?u='+window.location+'&sl=fr&tl=nl&hl=fr&ie=UTF-8">');
	document.write('		<img src="http://www.culturedev.com/photos/nl_flag.png"  class="flag">');
	document.write('	</a>');
	document.write('	&nbsp;<a href="http://translate.google.com/translate?hl=fr&ie=UTF-8&u='+window.location+'&sl=fr&tl=es&history_state0=">');
	document.write('		<img src="http://www.culturedev.com/photos/es_flag.png"  class="flag">');
	document.write('	</a>');
	document.write('	&nbsp;<a href="http://translate.google.com/translate?u='+window.location+'&sl=fr&tl=ru&hl=fr&ie=UTF-8">');
	document.write('		<img src="http://www.culturedev.com/photos/ru_flag.png"  class="flag">');
	document.write('	</a>');
	document.write('	&nbsp;<font size="1">Google translation</font>');
	
	document.write('</td><td>&nbsp;</td>');
	document.write('</tr>');
	
	
	document.write('</table>');
	
	
}
function go1(){
	if (document.selecter1.select1.options[document.selecter1.select1.selectedIndex].value != "none") {
		location = document.selecter1.select1.options[document.selecter1.select1.selectedIndex].value
    }
}

function f_Affiche_imgSuiv(p_ref, p_date) {

	document.write ('<div id="prec">'+f_imgSuiv_content(p_ref,p_date)+'</div>');

}

function f_imgSuiv_content(p_ref, p_date) {
	
	var max_red_id=nTotal;
	var nom_img_prec="";
	var nom_img_suiv="";
	var nom_img="";
	var div_content = '';
	var paintings=new Array();
	var nbBestPictures = 0;
	
	for (var i = 0; i < nTotal; i++) {
				
		peinture = artList.item(i); 
					
		//Les caractéristiques des peintures
		var infoList = peinture.childNodes; 
		var n_totInfo = infoList.length;
		
		for (var j = 0; j < n_totInfo; j++) {
				
			if (peinture.childNodes[j].nodeName=="tags"){						
				baliseTags = peinture.childNodes[j]; 
				var sTags = baliseTags.firstChild.nodeValue;
						
				if (sTags.indexOf("best", 0)!=-1){
					var nBestRef = nTotal-i;
					nbBestPictures++;
					
					if (nBestRef>9){
						sBestRef_img = 'H00'+nBestRef;
					} else {
						sBestRef_img = 'H000'+nBestRef;	
					}						
					
					//On est sur une image valide de ref supérieure à celle en cours
					if (nBestRef>p_ref) { nom_img_suiv = sBestRef_img; var nRef_suiv=nBestRef;	} 
					//On est sur une image valide de ref inférieure à celle en cours
					if (nBestRef<p_ref) { if (nom_img_prec=="") { nom_img_prec = sBestRef_img; var nRef_prec=nBestRef; }}
					
				}
			}
		}
	}			

	
	//Cartouche
	div_content = div_content + '<table width="260" height="25" cellpadding="0" cellspacing="3">';
	div_content = div_content + '<tr>';
	div_content = div_content + '<td><img src="http://www.fabricemartin.fr/fab.jpg" alt="Fabrice MARTIN"></td>';
	div_content = div_content + '<td valign="top" align="left"><font color="#696969" size="2">Ajoutee le</font>&nbsp;<font color="#3390ff" size="2">'+p_date+'</font><br>';
	div_content = div_content + '</td>';
	div_content = div_content + '</tr>';
	div_content = div_content + '<tr><td><img src="/transparent.gif" height="10"></td></tr>';
	div_content = div_content + '</table>';
	div_content = div_content + '<table width="260" height="25" cellpadding="0" cellspacing="1" bgcolor="#f3f3f3">';
	div_content = div_content + '<tr>';
	div_content = div_content + '<td width="18" align="center"><font color="#a1a1a1" size="6">-</font></td>';
	div_content = div_content + '<td colspan="8" bgcolor="#FFFFFF" style="padding-left:5px;padding-top:2px;"><font color="#005ad4" size="4">La s&#233;lection</font></td>';
	div_content = div_content + '</tr>';
	div_content = div_content + '<tr><td colspan="9"><img src="/transparent.gif" height="10"></td></tr>';
	div_content = div_content + '<tr>';
	div_content = div_content + '<td width="18">&nbsp;</td>';
	div_content = div_content + '<td width="75">';
	
	/*if (eval(p_ref-1)>0){		
		if (eval(p_ref-1)>9){
			nom_img_prec = 'H00'+eval(p_ref-1);
		} else {
			nom_img_prec = 'H000'+eval(p_ref-1);	
		}
	}*/
	if (nom_img_prec==""){
		div_content = div_content + '<img src="http://www.fabricemartin.fr/transparent.gif" height="75" width="75">';	
	} else {
		div_content = div_content + '<a href="/pages/'+nom_img_prec+'.htm">';
		div_content = div_content + '<img src="http://www.culturedev.com/preview/'+nom_img_prec+'.jpg" height="75" width="75" border="0">';	//http://www.culturedev.com/preview/
		div_content = div_content + '</a>';
	}		
	div_content = div_content + '</td>';
	div_content = div_content + '<td width="3">&nbsp;</td>';
	div_content = div_content + '<td width="75">';
	
	if (eval(p_ref)<=max_red_id){
		if (eval(p_ref)>9){
			nom_img = 'H00'+eval(p_ref);
		} else {
			nom_img = 'H000'+eval(p_ref);	
		}
	}
	if (nom_img==""){
		div_content = div_content + '<img src="http://www.fabricemartin.fr/transparent.gif" height="75" width="75">';	
	} else {
		div_content = div_content + '<a href="/pages/'+nom_img+'.htm">';
		div_content = div_content + '<img src="http://www.culturedev.com/preview/'+nom_img+'.jpg" height="75" width="75" border="0">';
		div_content = div_content + '</a>';
	}
	
	div_content = div_content + '</td>';
	div_content = div_content + '<td width="3">&nbsp;</td>';
	div_content = div_content + '<td width="75">';
	
	/*if (eval(p_ref+1)<=max_red_id){
		if (eval(p_ref+1)>9){
			nom_img_suiv = 'H00'+eval(p_ref+1);
		} else {
			nom_img_suiv = 'H000'+eval(p_ref+1);	
		}
	}*/
	if (nom_img_suiv==""){
		div_content = div_content + '<img src="http://www.fabricemartin.fr/transparent.gif" height="75" width="75">';	
	} else {
		div_content = div_content + '<a href="/pages/'+nom_img_suiv+'.htm">';
		div_content = div_content + '<img src="http://www.culturedev.com/preview/'+nom_img_suiv+'.jpg" height="75" width="75" border="0">';
		div_content = div_content + '</a>';
	}
	div_content = div_content + '</td>';
	div_content = div_content + '<td width="3">&nbsp;</td>';
	div_content = div_content + '<td width="85"><font color="#bebcbd" size="4">&nbsp;&nbsp;<b>'+nbBestPictures+'</b></font><br><font color="#bebcbd" size="3">Images</font></td>';
	div_content = div_content + '<td width="3">&nbsp;</td>';
	div_content = div_content + '</tr>';
	div_content = div_content + '<tr><td>&nbsp;</td><td colspan="6" align="center">&nbsp;';
	
	if (nom_img_prec==""){
		div_content = div_content + '<img src="http://www.fabricemartin.fr/parcourir1.jpg">';
	} else {
		div_content = div_content + '<img src="http://www.fabricemartin.fr/parcourir1.jpg" border="0" onmouseover="style.cursor=\'hand\'" onclick="document.getElementById(\'prec\').innerHTML=f_imgSuiv_content('+nRef_prec+',\''+p_date+'\');">';
	}		
	
	div_content = div_content + '<img src="http://www.fabricemartin.fr/parcourir2.jpg">';
	
	if (nom_img_suiv==""){
		div_content = div_content + '<img src="http://www.fabricemartin.fr/parcourir3.jpg">';
	} else {
		div_content = div_content + '<img src="http://www.fabricemartin.fr/parcourir3.jpg" border="0" onmouseover="style.cursor=\'hand\'" onclick="document.getElementById(\'prec\').innerHTML=f_imgSuiv_content('+nRef_suiv+',\''+p_date+'\');">';
	}
	
	div_content = div_content + '</td></tr>';
	div_content = div_content + '</table><br><br>';
	
	div_content = div_content + '<table width="305" cellpadding="0" cellspacing="0" border="0">';
	div_content = div_content + '<tr><td>';
	div_content = div_content + '<img src="http://www.culturedev.com/photos/facebook.jpg" />&nbsp;<a name="fb_share" type="button" href="http://www.facebook.com/sharer.php?u='+window.location+'&t='+document.title+'">Share this page on Facebook</a>';
	
	div_content = div_content + '</td></tr>';
	div_content = div_content + '</table><br><br>';
	
	
	div_content = div_content + '<table width="305" cellpadding="0" cellspacing="7" bgcolor="#c7e3ff" border="0">';
	div_content = div_content + '<form name="email" action="/envoi.php" method="post" onsubmit="this.s_url.value=window.location;">';
	div_content = div_content + '<input type="hidden" name="s_url" value="">';
	
	div_content = div_content + '<tr>';
	div_content = div_content + '<td nowrap><font color="#3390ff" size="3"><b>Nom</b> ou pseudo</font><br>';
	div_content = div_content + '<input type="text" name="s_nom" value="" style="color:#3390ff; background-color:#FFFFFF; font-size:12px; font-family:arial; width:180px;"></td>';
	div_content = div_content + '</tr>';
	
	div_content = div_content + '<tr>';
	div_content = div_content + '<td nowrap><font color="#3390ff" size="3"><b>Email</b></font> <font color="#3390ff" size="2"><em>(pas diffus&#233;)</em></font><br>';
	div_content = div_content + '<input type="text" name="s_email" value="" style="color:#3390ff; background-color:#FFFFFF; font-size:12px; font-family:arial; width:180px;"></td>';
	div_content = div_content + '</tr>';
	
	div_content = div_content + '<tr>';
	div_content = div_content + '<td><font color="#3390ff" size="3"><b>Votre commentaire</b></font><br />';
	div_content = div_content + '<textarea name="s_message" rows="8" cols="35"></textarea>';
	div_content = div_content + '</td></tr><tr><td align="center">';
	div_content = div_content + '<input type="submit" value="Envoyer !" style="color:#3390ff; background-color:#FFFFFF; font-size:12px; font-family:arial; width:180px;">';	
	div_content = div_content + '</td></tr>';

	div_content = div_content + '</form>';
	div_content = div_content + '</table>';
	
	return div_content;
}

function f_afficheNews(){
	
	var sTitle ="";
	var sDate ="";
	var sDesc ="";
	var sLink ="";
	var sCat = "";
	
	//var xml_doc = new ActiveXObject("Microsoft.XMLDOM"); 
	
	//load xml file code for IE
	if (window.ActiveXObject)
	  {
	  xml_doc=new ActiveXObject("Microsoft.XMLDOM");
	  }
	// code for Mozilla, Firefox, Opera, etc.
	else if (document.implementation.createDocument)
	  {
	  xml_doc=document.implementation.createDocument("","",null);
	  }
	xml_doc.async = false; 

	//xml_doc.load("/xml/arbo.xml"); 
	xml_doc.load("news.xml"); 

	//Liste des NEWS
	var newsList = xml_doc.getElementsByTagName("item"); 
	var n_totNews = newsList.length; 

	//alert ("Nombre de news : "+n_totNews);
	
	//On parcours les news
	for (var i = 0; i < n_totNews; i++) {
					
		sTitle ="";
		sDate ="";
		sDesc ="";
		sLink ="";
		sCat = "";
		
		oNews = newsList.item(i); 
		
		//Les infos relatives à la news		
		var childsList = oNews.childNodes; 
		var n_totInfos = childsList.length;
				
		for (var j = 0; j < n_totInfos; j++) {		
		
			switch (oNews.childNodes[j].nodeName){
				case "category":
					sCat = oNews.childNodes[j].firstChild.nodeValue; 
					break;
				case "title":
					sTitle = oNews.childNodes[j].firstChild.nodeValue; 
					break;
				case "description":
					sDesc = oNews.childNodes[j].firstChild.nodeValue; 
					break;
				case "pubDate":
					sDate = oNews.childNodes[j].firstChild.nodeValue; 
					break;
				case "link":
					sLink = oNews.childNodes[j].firstChild.nodeValue; 
					break;
			}
		}
		//Chaine.indexOf(sous-chaîne, position)
		document.write('<table cellpadding="0" cellspacing="5" width="100%"><tr>'); 
		if (sCat!='') {
			document.write('<td><a href="'+sLink+'"><img src="http://www.culturedev.com/preview/'+sCat+'.jpg" border="0" width="50" height="50"></a></td>'); 
		}
		document.write('<td valign="top" style="padding:5px;"><b><a href="'+sLink+'">'+sTitle+'</a> - '+sDate.substr(0,sDate.length-12)+'</b><br />'); 
		document.write(sDesc+'</td>'); 
		document.write('</tr></table>'); 
	}
}

function f_AfficheSelectAllPaintings(){

	var sContent=""
	sContent = sContent+'<form name="selecter1"><td>';
	sContent = sContent+'<select name="select1" size="1" onchange="go1()">';
	sContent = sContent+'<option value="none" selected>-- Choisissez une oeuvre -- Select a painting</option>';

	for (var i = 0; i < nTotal; i++) {
					
		peinture = artList.item(i); 
		
		//Les caractéristiques des peintures
		var infoList = peinture.childNodes; 
		var n_totInfo = infoList.length;
		
		//alert (n_totdomchilds);
		
		for (var j = 0; j < n_totInfo; j++) {
		
			switch (peinture.childNodes[j].nodeName){
				case "title":

					baliseTitre = peinture.childNodes[j]; 
					var sNomToile = baliseTitre.firstChild.nodeValue;
					
					break;
				case "link":

					baliseLink = peinture.childNodes[j]; 
					var sLien = baliseLink.firstChild.nodeValue;
					
					break;
				case "ref":

					baliseRef = peinture.childNodes[j]; 
					var sRef = baliseRef.firstChild.nodeValue;
					
					break;
			}
		}
		
		sContent = sContent+'<option value="'+sLien+'">'+sRef+' - '+sNomToile+'</option>';
	}
	
	sContent = sContent+'</select>';
	sContent = sContent+'</td></form>';
	
	document.write(sContent);

}


function div_affiche_mini(p_id) {

	document.write ('<div class="gauche">'+div_content(p_id)+'</div>');

}

function div_content (p_id) {
	
	var url_racine ='http://www.culturedev.com/';
	var div_content = '';

	for (var i = 0; i < nTotal; i++) {
		
		//alert ("nTotal = "+nTotal+" - "+"p_id = "+p_id+" - "+"i = "+i+" - ");
		if (nTotal-i==p_id){
		
			peinture = artList.item(i); 
			
			//Les caractéristiques des peintures
			var infoList = peinture.childNodes; 
			var n_totInfo = infoList.length;
			
			for (var j = 0; j < n_totInfo; j++) {
			
				switch (peinture.childNodes[j].nodeName){
					case "title":

						baliseTitre = peinture.childNodes[j]; 
						var sNomToile = baliseTitre.firstChild.nodeValue;
						
						break;
					case "link":

						baliseLink = peinture.childNodes[j]; 
						var sLien = baliseLink.firstChild.nodeValue;
						
						break;
					case "ref":

						baliseRef = peinture.childNodes[j]; 
						var sRef = baliseRef.firstChild.nodeValue;
						
						break;
				}
			}
			
		}

	}

	div_content = div_content +  '	<a title="' + sNomToile + ' par Fabrice MARTIN" href="/pages/' + sRef + '.htm">';
	div_content = div_content +  '	<img src="' + url_racine + 'preview/' + sRef + '.jpg" width="100" height="100" ';
	div_content = div_content +  '	alt="' + sNomToile + ' par Fabrice MARTIN" ';
	div_content = div_content +  '	class="GalleryRollOut" onMouseOver="this.className=\'GalleryRollOver\'" onMouseOut="this.className=\'GalleryRollOut\'"  ';
	div_content = div_content +  '	/></a>';	
	div_content = div_content +  '	<br>' + sNomToile + '<br>';		

	return div_content;	
}

function f_Swap (p_option, p_titre, p_id){
	
	var result = '';
	
	result = result + '<br /><span id="vente_prix">' + p_titre + '</span><br /><br />';
	
	switch (p_option) {
	
		case '' :
				result = result + '';
		break;
		
		case 'all':
		
			for(var j=nTotal;j>0;j--){  
				result = result + '<div class="gauche">'+div_content(j)+'</div>';
			}
		
		break;
			
		default : 

			for (var i = 0; i < nTotal; i++) {
				
				peinture = artList.item(i); 
					
				//Les caractéristiques des peintures
				var infoList = peinture.childNodes; 
				var n_totInfo = infoList.length;
								
				for (var j = 0; j < n_totInfo; j++) {
				
					if (peinture.childNodes[j].nodeName=="tags"){						
						baliseTags = peinture.childNodes[j]; 
						var sTags = baliseTags.firstChild.nodeValue;
						
						if (sTags.indexOf(p_option, 0)!=-1){ 
							result = result + '<div class="gauche">'+div_content(nTotal-i)+'</div>';	
						}
					}
					
				}
								
			}			
		
		break;
	
		
	}

	document.getElementById(p_id).innerHTML = result;

}


function f_AfficheTitre (p_titre, p_soustitre, p_prix) {
	

	p_titre = p_titre.replace("'", "\'");
	p_soustitre = p_soustitre.replace("'", "\'");

	
	document.write('<table width="100%" cellpadding="1" cellspacing="0" class="paintingTitle">');
	document.write('<tr><td style="padding-left:5px;"><font color="#005ad4" size="4">'+p_titre+'</font></td></tr>');
	document.write('<tr><td style="padding-left:5px;"><font color="#3390ff" size="2">'+p_soustitre+'</font></td></tr>');
	if (p_prix>0) {
		document.write('<tr><td style="padding-left:5px;padding-bottom:7px;"><font color="#696969" size="2">Prix : ' + p_prix + ' &#8364;</font></td></tr>');
	} else {
		if (p_prix==0){
		document.write('<tr><td style="padding-left:5px;padding-bottom:7px;"><font color="#696969" size="2"><em>Ce tableau n\'est pas &#224; vendre</em></font></td></tr>');
		} else {
		document.write('<tr><td style="padding-left:5px;padding-bottom:7px;"><font color="#696969" size="2">Vendu/Sold</font></td></tr>');
		}
	}
	document.write('</table><br>');
	
}