function fp_show_anchor(anchorName){
	$(anchorName).scrollIntoView(true);
}
//---------------------
//
//---------------------

function fp_fit_image_size(){
	var i=0;
	if (navigator.appName == 'Netscape') {i=40;}
	if (document.images[0]) window.resizeTo(document.images[0].width +30, document.images[0].height+60-i);
	self.focus();
}
//---------------------
//
//---------------------
function fp_pop(url, retour, features){
	var chop_pop = self.open(url, 'chopop' + Math.floor(Math.random()*10), features);
	chop_pop.focus();
	return (retour)?chop_pop:false;
}
//---------------------
//
//---------------------
function fp_confirm_if_duplicate(bool){
	if (bool){
		var ok = confirm("Cet article est d\xe9j\xE0 dans le panier\nVoulez-vous l'y ajouter encore une fois ?");
		if (ok){
			return true;
		} else {
			return false;
		}
	}

	return true;
}

//---------------------
//
//---------------------
function fp_swapColoredItem(idMaitre, idColored){
	
	// on demande la fiche visible => inutile !
	if (idMaitre == idColored){return false;}

	 var toHideZone = $('chop_fp_fiche_'+idMaitre);
	 var toShowZone = $('chop_fp_fiche_'+idColored);
	 
	 var leParent = toHideZone.parentNode;
	 
	 // replacing and showing the new one :
	 toShowZone.style.display='block';
	 var oldZone = leParent.replaceChild( toShowZone , toHideZone );
	 oldZone.style.display='none';
	 // storing the oldone
	 leParent.appendChild( oldZone );
	 
	return false;
}
//---------------------
//
//---------------------