	function blink_show()
	{
		blink_tags  = document.all.tags('blink');
		blink_count = blink_tags.length;
		for ( i = 0; i < blink_count; i++ )
		{
			blink_tags[i].style.visibility = 'visible';
		}
		
		window.setTimeout( 'blink_hide()', 700 );
	}
	
	function blink_hide()
	{
		blink_tags  = document.all.tags('blink');
		blink_count = blink_tags.length;
		for ( i = 0; i < blink_count; i++ )
		{
			blink_tags[i].style.visibility = 'hidden';
		}
		
		window.setTimeout( 'blink_show()', 250 );
	}
	


function WinOnLoad() {
	if(navigator.userAgent.indexOf("MSIE") != -1)
		blink_show();
}
	
window.onload = WinOnLoad;
	
function trim(str, chars) {
    return ltrim(rtrim(str, chars), chars);
}

function ltrim(str, chars) {
    chars = chars || "\\s";
    return str.replace(new RegExp("^[" + chars + "]+", "g"), "");
}

function rtrim(str, chars) {
    chars = chars || "\\s";
    return str.replace(new RegExp("[" + chars + "]+$", "g"), "");
}

function urlencode(str) {
	str = escape(str);
	str = str.replace('+', '%2B');
	str = str.replace('%20', '+');
	str = str.replace('*', '%2A');
	str = str.replace('/', '%2F');
	str = str.replace('@', '%40');
	return str;
}

function rechercher() {
	if(trim(document.getElementById('aRechercher').value) == "")
		rechercherErreur('Saisie obligatoire');
	else
		document.location.href='/s_'+urlencode(trim(document.getElementById('aRechercher').value))+'.html';
}
function rechercherErreur(txt) {
	document.getElementById('aRechercher').className = 'inputRechercher_error';
	document.getElementById('aRechercher').value = txt;
}
function rechercherClick() {
	if(document.getElementById('aRechercher').className == 'inputRechercher_error') {
		document.getElementById('aRechercher').value = '';
		document.getElementById('aRechercher').className = 'inputRechercher_default';
	}
}

function panierDisplayPreview(url) {
	$('preview').src = url;
}

function setFiltreOff(num) 
{
	document.getElementById('Filtres_0'+num).src = '/images/Filtres_0'+num+'.png';
}
function setFiltreOn(num) 
{
	document.getElementById('Filtres_0'+num).src = '/images/Filtres_0'+num+'_on.png';
}
function filtrePreLoadImage(num, imageUrl) 
{ 
	var doc=document; 
	if(doc.images){ 
		if(!doc.precharg) 
		{
			doc.precharg = new Array();
		}
		doc.precharg[num]=new Image; 
		doc.precharg[num].src=imageUrl;
	}
}
filtrePreLoadImage(3,'/images/Filtres_03_on.png');
filtrePreLoadImage(5,'/images/Filtres_05_on.png');
filtrePreLoadImage(3,'/images/Filtres_07_on.png');
filtrePreLoadImage(9,'/images/Filtres_09_on.png');
filtrePreLoadImage(99,'/images/Option-cadeau.png');
