// JavaScript Document
function findNavName() {
alert (navigator.appName);	
}

function findJoueur() {
window.document.getElementsByName("ici").scrollIntoView();
window.document.getElementById("ici").scrollIntoView();
}

function HiddDiv(div,nb) {
	var i=1;
	for (i;i<nb+1;i++) {
	var rep = 'rep'+i;
document.getElementById(rep).style.display='none';
	}
document.getElementById(div).style.display='inline';
document.getElementById(div).scrollIntoView() ;
}

function CheckCom(form)
{
	var total = 0;
		if(com.nbr1) {
		total = total+(com.nbr1.value);
		}
		if(com.nbr2) {
		total = total+(com.nbr2.value);
		}
	if(com.nbr3) {
		total = total+(com.nbr3.value);
		}
	if(com.nbr4) {
		total = total+(com.nbr4.value);
		}
	if(com.nbr5) {
		total = total+(com.nbr5.value);
		}
	if(com.nbr6) {
		total = total+(com.nbr6.value);
		}
	if(com.nbr7) {
		total = total+(com.nbr7.value);
		}
	if(com.nbr8) {
		total = total+(com.nbr8.value);
		}
	if(com.nbr9) {
		total = total+(com.nbr9.value);
		}		
	if(com.nbr10) {
		total = total+(com.nbr10.value);
		}
	if(com.nbr11) {
		total = total+(com.nbr11.value);
		}
	if(com.nbr12) {
		total = total+(com.nbr12.value);
		}
	if(com.nbr13) {
		total = total+(com.nbr13.value);
		}
if(com.nbr14) {
		total = total+(com.nbr14.value);
		}	
if(com.nbr15) {
		total = total+(com.nbr15.value);
		}
	if(com.nbr16) {
		total = total+(com.nbr16.value);
		}
	if(com.nbr17) {
		total = total+(com.nbr17.value);
		}
	if(com.nbr18) {
		total = total+(com.nbr18.value);
		}
	if(com.nbr19) {
		total = total+(com.nbr19.value);
		}
	if(com.nbr20) {
		total = total+(com.nbr20.value);
		}
	if(com.nbr21) {
		total = total+(com.nbr21.value);
		}
	if(com.nbr22) {
		total = total+(com.nbr22.value);
		}		
	if(com.nbr23) {
		total = total+(com.nbr23.value);
		}
	if(com.nbr24) {
		total = total+(com.nbr24.value);
		}
	if(com.nbr25) {
		total = total+(com.nbr25.value);
		}
	if(com.nbr26) {
		total = total+(com.nbr26.value);
		}
	if(com.nbr27) {
		total = total+(com.nbr27.value);
		}
		if(com.nbr28) {
		total = total+(com.nbr28.value);
		}
		if(com.nbr29) {
		total = total+(com.nbr29.value);
		}
if (total==0) {
	alert("Veuillez indiquer au moins une quantité pour un article");
	return false;
	}
	else return true;
	}	

function calendrier() {
document.getElementById("ici").scrollIntoView();
}

var xmlhttp;
var url='';
<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
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 MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

<!-- fonction de défilement d'un tableau (style Excel colonne figée) -->
function defile(_position1,_position2) {
haut.scrollLeft = parseInt(_position1);
gauche.scrollTop = parseInt(_position2);
}
//function Va(x)
//{
//window.open('voir.php?ref='+x,null,'width=800,height=560,status=no,directories=no,toolbar=no,location=no,menubar=no,scrollbars=no,resizable=no');
//}

var dragapproved=false
var minrestore=0
var initialwidth=600
var initialheight=400
var ie5=document.all&&document.getElementById
var ns6=document.getElementById&&!document.all

function RJoueur(x)
{
window.open('windowResultJoueur.php?Joueur='+x,null,'width=980,height=600,status=no,directories=no,toolbar=no,location=no,menubar=no,scrollbars=no,resizable=no');
}

function iecompattest(){
return (!window.opera && document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function drag_drop(e){
if (ie5&&dragapproved&&event.button==1){
document.getElementById("dwindow").style.left=tempx+event.clientX-offsetx+"px"
document.getElementById("dwindow").style.top=tempy+event.clientY-offsety+"px"
}
else if (ns6&&dragapproved){
document.getElementById("dwindow").style.left=tempx+e.clientX-offsetx+"px"
document.getElementById("dwindow").style.top=tempy+e.clientY-offsety+"px"
}
}

function initializedrag(e){
offsetx=ie5? event.clientX : e.clientX
offsety=ie5? event.clientY : e.clientY
document.getElementById("dwindowcontent").style.display="none" //extra
tempx=parseInt(document.getElementById("dwindow").style.left)
tempy=parseInt(document.getElementById("dwindow").style.top)

dragapproved=true
document.getElementById("dwindow").onmousemove=drag_drop
}

function loadwindow(url,width,height){
if (!ie5&&!ns6)
window.open(url,width=width,height=height,scrollbars=0)
else{
document.getElementById("dwindow").style.display=''
document.getElementById("dwindow").style.width="600px"
document.getElementById("dwindow").style.height="500px"
document.getElementById("dwindow").style.left="20px"
document.getElementById("dwindow").style.top=ns6? window.pageYOffset*1+30+"px" : iecompattest().scrollTop*1+60+"px"
document.getElementById("cframe").src=url
}
}

function maximize(){
if (minrestore==0){
minrestore=1 //maximize window
document.getElementById("maxname").setAttribute("src","restore.gif")
document.getElementById("dwindow").style.width=ns6? window.innerWidth+"px" : iecompattest().clientWidth+"px"
document.getElementById("dwindow").style.height=ns6? window.innerHeight+"px" : iecompattest().clientHeight+"px"
}
else{
minrestore=0 //restore window
document.getElementById("maxname").setAttribute("src","max.gif")
document.getElementById("dwindow").style.width=width+"px"
document.getElementById("dwindow").style.height=height+"px"
}
document.getElementById("dwindow").style.left=ns6? window.pageXOffset+"px" : iecompattest().scrollLeft+"px"
document.getElementById("dwindow").style.top=ns6? window.pageYOffset+"px" : iecompattest().scrollTop+"px"
}

function closeit(){
document.getElementById("dwindow").style.display="none"
document.getElementById("cframe").src="url"

}

function stopdrag(){
dragapproved=false;
document.getElementById("dwindow").onmousemove=null;
document.getElementById("dwindowcontent").style.display="" //extra
}
//-->

