function openSwitchAdvancedSearch ()
{
	if ( document.getElementById('divAdvancedSearch').style.display == 'block' )
	{
		document.getElementById('divAdvancedSearch').style.display = 'none';
		document.search.brand.value = '-1';
		document.search.agecategory.value = '-1';
		document.search.kind.value = '-1';
		document.search.price.value = '-1';
	}
	else
		document.getElementById('divAdvancedSearch').style.display = 'block';
}


function goToCatProd ( combobox )
{
	comboIdx = combobox.selectedIndex;
	if ( combobox.options[comboIdx].value != '' )
		location.replace( "index.php?cat=boutique&" + combobox.options[comboIdx].value  );
}

function switchImgViewerLoad ( filename )
{
	document.getElementById('medImg').src = filename;
}

function openImgPopup ( )
{
	filename = document.getElementById('medImg').src;
	filename = filename.replace( "mm.", "." );
	openPopup( filename );
}

function openPopup ( picFilename )
{
	w = open("",'image','width=400,height=500,toolbar=no,scrollbars=no,resizable=no');
	w.document.write("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">  <html><head><title>Apercu Image</title></head>");
	w.document.write("<SCRIPT language=javascript>function checksize()  { if (document.images[0].complete) {  window.resizeTo(document.images[0].width+20,document.images[0].height+100); window.focus();} else { setTimeout('checksize()',250) } }</SCRIPT>");
	w.document.write("<body onload='checksize()' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0><img src='"+picFilename+"' border=0 />");
	w.document.write("</body></html>");
	w.document.close();
}
