/*imgverte1=new Image();
imgverte2=new Image();
imgverte3=new Image();
imgverte1.src=dir_template_images+"verte-7-1.gif";
imgverte2.src=dir_template_images+"verte-7-2.gif";
imgverte3.src=dir_template_images+"verte-7-3.gif";

imgbleue1=new Image();
imgbleue2=new Image();
imgbleue3=new Image();
imgbleue1.src=dir_template_images+"bleue-7-1.gif";
imgbleue2.src=dir_template_images+"bleue-7-2.gif";
imgbleue3.src=dir_template_images+"bleue-7-3.gif";

imgtopvente1=new Image();
imgtopvente2=new Image();
imgtopvente3=new Image();
imgtopvente1.src=dir_template_images+"topvente-8.gif";
imgtopvente2.src=dir_template_images+"topvente-9.gif";
imgtopvente3.src=dir_template_images+"trans.gif";
*/

/*
function PopupPanier( ) {
	var E = Element("menu_context");
	
	E.style.top= position_y+"px";
	E.style.left= position_x+"px";
	
	E.style.visibility = "visible";
	deactiv_pop = setTimeout("AutofermerPopupPanier()",5000)
	}*/


function AutoOuvrirPopupPanier( ) {
	var E = Element("menu_context");
	T = parseInt(E.style.top);
	if( T<position_y )
		{
		E.style.top = (T+20)+"px";
		activ_pop = setTimeout("AutoOuvrirPopupPanier()",50);
		}
	else
		deactiv_pop = setTimeout("AutofermerPopupPanier()",5000);
	}

function PopupPanier( ) {
	var E = Element("menu_context");

	E.style.top= "-200px";
	E.style.left= position_x+"px";
	
	E.style.visibility = "visible";
	activ_pop = setTimeout("AutoOuvrirPopupPanier()",50);
	}
	
function fermerPopupPanier()
	{
	E=Element("menu_context");
	E.style.visibility = "hidden";
	//activ_pop = setTimeout("ouvrir_menu()",30000);
	return false;
	}

function AutofermerPopupPanier()
	{
	E=Element("menu_context");
	T = parseInt(E.style.top);
	if( T>-100 )
		{
		E.style.top = (T-10)+"px";
		deactiv_pop = setTimeout("AutofermerPopupPanier()",50);
		}
	}




function Element( ID ) {
	if( document.getElementById) return document.getElementById( ID );
	if( document.all ) return document.all( ID );
	if( document ) return document[ ID ];
	}

function swapStyle( ID, nom ) { 
	Element(ID).className=nom;
	}
	
var focusNewsletter1 = false;
var focusNewsletter2 = false;

function focusOnNewsletter1(champ) {
	if (focusNewsletter1) {
		// On a déjà vidé les champs, donc plus rien a faire
		}
	else
		{
		focusNewsletter1 = true;
		form = champ.form;
		form.firstname.value= "";
		}
	}

function focusOnNewsletter2(champ) {
	if (focusNewsletter2) {
		// On a déjà vidé les champs, donc plus rien a faire
		}
	else
		{
		focusNewsletter2 = true;
		form = champ.form;
		form.Email.value= "";
		}
	}

var focusInvit1 = false;
var focusInvit2 = false;

function focusOnInvit1(champ) {
	if (focusInvit1) {
		// On a déjà vidé les champs, donc plus rien a faire
		}
	else
		{
		focusInvit1 = true;
		form = champ.form;
		form.ParrainageExpress1.value= "";
		}
	}

function focusOnInvit2(champ) {
	if (focusInvit2) {
		// On a déjà vidé les champs, donc plus rien a faire
		}
	else
		{
		focusInvit2 = true;
		form = champ.form;
		form.ParrainageExpress2.value= "";
		}
	}
	
function verify(form)
	{
	var passed = false;
	var blnRetval, intAtSign, intDot, intComma, intSpace, intLastDot, intDomain, intStrLen;
	if (form.Email){
		intAtSign=form.Email.value.indexOf("@");
		intDot=form.Email.value.indexOf(".",intAtSign);
		intComma=form.Email.value.indexOf(",");
		intSpace=form.Email.value.indexOf(" ");
		intLastDot=form.Email.value.lastIndexOf(".");
		intDomain=intDot-intAtSign;
		intStrLen=form.Email.value.length;
		// *** CHECK FOR BLANK EMAIL VALUE
		if (form.Email.value == "" )
			{
			alert("Vous n'avez pas entré d'adresse email.");
			form.Email.focus();
			passed = false;
			}
		// **** CHECK FOR THE  @ SIGN?
		else if (intAtSign == -1)
			{
			
			alert("Votre adresse email n'a pas de \"@\".");
			form.Email.focus();
			passed = false;
			
			}
		// **** Check for commas ****
		
		else if (intComma != -1)
			{
			alert("une adresse email ne peux pas avoir de virgule.");
			form.Email.focus();
			passed = false;
			}
		
		// **** Check for a space ****
		
		else if (intSpace != -1)
			{
			alert("une adresse email ne peux pas avoir d'espaces.");
			form.Email.focus();
			passed = false;
			}
		
		// **** Check for char between the @ and dot, chars between dots, and at least 1 char after the last dot ****
		
		else if ((intDot <= 2) || (intDomain <= 1)  || (intStrLen-(intLastDot+1) < 2))
			{
			alert("Merci d'entrer une adresse email valide.\n\n" + form.Email.value + " est invalide.");
			form.Email.focus();
			passed = false;
			}
		else {
			passed = true;
			}
		}
	else    {
		passed = true;
		}
	return passed;
	}

function swapImage( ID, image ) { 
	document.images[ID].src=eval(image+".src");
	}


TopVenteCurrent = 0;
function TopVenteSel(IDcat) {
	if( IDcat == TopVenteCurrent ) return;

	E=Element("rubrique"+TopVenteCurrent);
	E.style.display = "none";
	
	E=Element("boutoncat"+TopVenteCurrent);
	E.className = "Unselected";
	top2 = TopVenteCurrent+1;
	document.images["onglet"+TopVenteCurrent].src=imgtopvente3.src;
	document.images["onglet"+(TopVenteCurrent+1)].src=imgtopvente3.src;
	
	
	E=Element("rubrique"+IDcat); 
	E.style.display = "block";
	
	E=Element("boutoncat"+IDcat); 
	E.className = "Selected";
	top2 = IDcat+1;
	document.images["onglet"+IDcat].src=imgtopvente1.src;
	document.images["onglet"+(IDcat+1)].src=imgtopvente2.src;
	
	TopVenteCurrent = IDcat;
	}
//-->