
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

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 MM_validateForm() { //v4.0
  if (document.getElementById){
    var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
    for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]);
      if (val) { nm=val.name; if ((val=val.value)!="") {
        if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
          if (p<1 || p==(val.length-1)) errors+='- '+nm+' doit être une adresse email.\n';
        } else if (test!='R') { num = parseFloat(val);
          if (isNaN(val)) errors+='- '+nm+' doit être un nombre.\n';
          if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
            min=test.substring(8,p); max=test.substring(p+1);
            if (num<min || max<num) errors+='- '+nm+' doit être un nombre compris entre '+min+' et '+max+'.\n';
      } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' est requis.\n'; }
    } if (errors) alert('votre attention SVP! \n'+errors);
    document.MM_returnValue = (errors == '');
} }


function hideIt(table1)
{
	if(document.getElementById)
	{
		document.getElementById(table1).style.visibility="hidden"
	}
	else if(document.all){
			document.all[layer].style.visibility="hidden"
						 }
	else if(document.layers){
				document.layers[table2].visibility="hide"
							}
}
	
	
function hideAll(nbTop)
{
	for(i=1;i<=nbTop;i++)
	{
		var name="table"+i;
	if(document.getElementById)
		{
			document.getElementById(name).style.visibility="hidden"
		}else if(document.all){
			document.all[name].style.visibility="hidden"
		}else if(document.layers){
			document.layers[name].visibility="hide"
		}
	}
}
			
			
function showIt(table2)
{
	if(document.getElementById){
		document.getElementById(table2).style.visibility="visible"
		}else if(document.all){
		document.all[table2].style.visibility="visible"
		}else if(document.layers){
		document.layers[table2].visibility="show"
								 }
}
		
	var origWidth,origHeight;
	if(document.layers){
		origWidth=window.innerWidth;
		origHeight=window.innerHeight;
		window.onresize=function(){
			if(window.innerWidth!=origWidth||window.innerHeight!=origHeight)history.go(0)
								  }
						}
	var cur_lyr;
	function swapLayers(id,indice){
			if(cur_lyr)hideLayer(cur_lyr,cur_indice);
			showLayer(id,indice);
			cur_lyr=id;
			cur_indice=indice	   }
			
	function showLayer(id,indice){
		var a=getElemRefs("ongleta"+indice);
		var span=getElemRefs("ongletspan"+indice);
		var lyr=getElemRefs(id);
		if(lyr&&lyr.css){lyr.css.visibility="visible";lyr.css.height="auto"}
		a.css.backgroundPosition="0% -150px";
		a.css.color="#FFFFFF";
		span.css.backgroundPosition="100% -150px";
		span.css.color="#FFFFFF" }
		
	function hideLayer(id,indice){
		var a=getElemRefs("ongleta"+indice);
		var span=getElemRefs("ongletspan"+indice);
		var lyr=getElemRefs(id);
		if(lyr&&lyr.css){lyr.css.visibility="hidden";lyr.css.height="0"}
		a.css.backgroundPosition="0% 0px";
		a.css.color="#666666";
		span.css.backgroundPosition="100% 0px";
		span.css.color="#666666"}
		
	function getElemRefs(id){
		var el=(document.getElementById)?document.getElementById(id):(document.all)?document.all[id]:(document.layers)?document.layers[id]:null;
		if(el)el.css=(el.style)?el.style:el;return el
		}
		
	function hide_div_menu(menu){
		try{
			if(menu!='menu_panier'){document.getElementById('menu_panier').style.display='none';
			if(menu!="mdp_ap"){document.getElementById('menu_panier_plus').src='http://aka.fotovista.com/dev/gui_web/grafx/multipays/pixme/plus.gif';}
								}
}catch(e){};try{if(menu!='menu_articles'){document.getElementById('menu_articles').style.display='none';
if(menu!="mdp_ap"){document.getElementById('menu_articles_plus').src='http://aka.fotovista.com/dev/gui_web/grafx/multipays/pixme/plus.gif';}}}catch(e){}}
function display_div(id){
	var objet=document.getElementById(id);
	if(objet.style.display=='none'){
		objet.style.display='';
		if(id!="mdp_ap"){
			document.getElementById(id+'_plus').src='http://aka.fotovista.com/dev/gui_web/grafx/multipays/pixme/moins.gif'}}else{objet.style.display='none';if(id!="mdp_ap"){document.getElementById(id+'_plus').src='http://aka.fotovista.com/dev/gui_web/grafx/multipays/pixme/plus.gif';
						}
									}
						}
						
function hintIndex(text,x,y){
	delay=1;return showOverlay(text,x,y)
	}