function selectionner(id){
document.all["tr"+id].style.color = "#CC6633";
document.all["tr"+id].style.background = "#FEFEFE";
}
function annule_selectionner(id){
document.all["tr"+id].style.color = "";
document.all["tr"+id].style.background = "";
}
function fond(id){
document.all["td"+id].style.color = "#CC6633";
document.all["td"+id].style.background = "#D9E0E2";
document.all["td"+id].style.cursor = "Hand";
}
function annule_fond(id){
document.all["td"+id].style.color = "#FFFFFF";
document.all["td"+id].style.background = "#9AB4C4";
}
function td_survol(id,color1,color2){
document.all["td"+id].style.color = "#"+color1;
document.all["td"+id].style.background = "#"+color2;
document.all["td"+id].style.cursor = "Hand";
}
function annule_td_survol(id,color1,color2){
document.all["td"+id].style.color = "#"+color1;
document.all["td"+id].style.background = "#"+color2;
}
function ouvrePopup(url){
	fen = window.open(url,'popup','screenX=20,screenY=30,height=200,width=200,scrollbars=yes');
	setTimeout('fen.focus();',200);
} /// ouvrePopup

function redimentionnePhoto(){
    if (navigator.appName=='Microsoft Internet Explorer') {
        f.resizeTo(f.document.getElementById("uneImage").width+5, f.document.getElementById("uneImage").height + 40);
    } else {
        f.resizeTo(f.document.getElementById("uneImage").width+34, f.document.getElementById("uneImage").height + 85);
    }
	setTimeout('centrePhoto();', 50);
}
function centrePhoto(){
	//alert(screen.availWidth+" : "+f.outerWidth+" : "+screen.availHeight+" : "+f.outerHeight)
	f.moveTo((screen.availWidth-f.document.getElementById("uneImage").width)/2,0);
}
function voir_image(url){
	f = window.open('','voirPhoto','fullscreen,scrollbars=no,resizable=yes');
	f.document.writeln('<html>');
	f.document.writeln('<head><title>Image Produit</title>');
    f.document.writeln('<META HTTP-EQUIV="imagetoolbar" CONTENT="no"></head>');
	f.document.writeln('<body bgcolor="#ffffff" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" oncontextmenu="return bloc()"');
    f.document.writeln(' style="scrollbar-face-color:#EEEEEE;scrollbar-arrow-color:#CCCCCC;scrollbar-track-color: #FFFFFF;scrollbar-3dlight-color:#FFFFFF;scrollbar-darkshadow-color: #FFFFFF;">');
    //f.document.writeln('<script LANGUAGE=JAVASCRIPT>function bloc(){alert("© 2005 - <b>Riviera Antiques</b>"); return false;}</script>');
	f.document.write('<table width="100%" height="100%" align="center" cellspacing="0" cellpadding="0"  alt="Cliquez pour fermer" onClick="self.close()"><tr><td width="100%" height="100%" valign="middle" align="center">');
	f.document.write('<img id="uneImage" src="'+url+'" border="0" vspace="0" hspace="0" alt="Cliquez pour fermer" onClick="self.close()">');
	f.document.writeln('</td></tr></table>');
	f.document.writeln('</body>');
	f.document.writeln('</html>');
	f.document.close();
	//setTimeout('redimentionnePhoto();', 500);
	setTimeout('f.focus();',410);
} /// voir_image

//ouvre une popup centerer par default
function open_popup(lien,fenetre,width,height,param){
	var left=(screen.availWidth-width)/2;
	var top=(screen.availHeight-height)/2;
	if (top <0) top=0;
	if (param!='') param=','+param;
	fe=window.open(lien,fenetre,'top='+top+',left='+left+',width='+width+',height='+height+param);
	setTimeout('fe.focus();',200);
	return false;
}

function ValiderForm(formulaire)
{
formulaire.submit();
}


function lestylede(idf) {
if (document.getElementById) {
return document.getElementById(idf).style;
} else if (document.all) {
return document.all[idf].style;
} else if (document.layers) {
return document.layers[idf];
} else { return null }
}

function menuhover(idf) {
var strecup=lestylede(idf);
if(strecup) {
strecup.backgroundColor='#E6B399';
}
}

function menurestaure(idf) {
var strecup=lestylede(idf);
if(strecup) {
   strecup.backgroundColor='#FFFFFF';
}
}

if (document.getElementById){
document.write('<style type=\"text/css\">\n')
document.write('.sousmenu{display: none;}\n')
document.write('</style>\n')
}

function SwitchMenu(obj){
if(document.getElementById){
var el = document.getElementById(obj);
var ar = document.getElementById("riviera").getElementsByTagName("span");
	if(el.style.display != "block"){
		for (var i=0; i<ar.length; i++){
			if (ar[i].className=="sousmenu")
			ar[i].style.display = "none";
		}
		el.style.display = "block";
	}else{
		el.style.display = "none";
	}
}
}

function bloc(){
                alert("© 2005 - <b>Riviera Antiques</b>");
                return false;
                }



function left(str,nbr) {
   return str.substr(0,str.length-nbr)
}

function afficher_image(srcImg)
		{	document.images['big'].src=srcImg; }


