-/*
UN PEU DE TOUT POUR CE SITE
http://www.EMAUXTION.com
*/
function move_clr_texte(obj,clr){
 	obj.style.color = clr; 
 	}

function move_clrbackground(obj,clr){
 	obj.style.backgroundColor = clr; 
 	}

function RefreshImage(valImageId) {
	var objImage = document.images[valImageId];
	if (objImage == undefined) {
		return;
	}
	var now = new Date();
	objImage.src = objImage.src.split('?')[0] + '?x=' + now.toUTCString();
}
//------------------------------
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//------------------------------
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//------------------------------
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function validatecnx(){
	alert("Vous devez être connecté à votre compte pour pouvoir passer une commande.");
	window.parent.document.location.href= "clientslogcompte.asp?log=visitor&lg=1";

}

function validatecgv() {
	var valide=true;
	if (document.panier.elements['CGV'].checked ==false) {
		alert("Veuillez accepter les conditions générales de vente.");
		valide=false;
	}else{
		
	}
}

function fcnCloseOpen(caption, option, rel) { 
	//SexyLightbox.close(); 
	SexyLightbox.display(0);
	SexyLightbox.show(caption, option, rel);

}
function fcnClosePanier(caption, option, rel){
	SexyLightbox.display(0);
	window.parent.document.location.href= option;
}

function fcnOpen(caption, option, rel) {
	SexyLightbox.display(1);
	SexyLightbox.show(caption, option, rel);
}
function fcnCloseParent(){
//	SexyLightbox.display(0);
	window.parent.document.location.href='panier.asp?log=<%=Logged%>&lg=<%=Lg%>'
}

var W3CDOM = (document.getElementsByTagName && document.createElement);
if (W3CDOM)
	//document.write('pas javascript');
	window.onload = function () {
	if (!W3CDOM) return;
		// start up W3C DOM scripts
		//document.write('Oui javascript');
}
function setCook(nom,valeur) {
	document.cookie = nom + "=" + escape(valeur)
}
function getCook(nom) {
	deb = document.cookie.indexOf(nom + "=")
	if (deb >= 0) {
		deb += nom.length + 1
		fin = document.cookie.indexOf(";",deb)
		if (fin < 0) fin = document.cookie.length
			return unescape(document.cookie.substring(deb,fin))
	}
	return ""
}
function delCook(nom) { 
	cre_cook(nom,"",-1) 
}
function cre_cook(nom,contenu,jours) {
	var expireDate = new Date();
	expireDate.setTime(expireDate.getTime() + jours*24*3600*1000);
	document.cookie = nom + "=" + escape(contenu)
	+ ";expires=" + expireDate.toGMTString();
}