
	var ns = (navigator.appName=="Netscape" && parseInt(navigator.appVersion)>=4)?true:false
	var ie = (navigator.appName=="Microsoft Internet Explorer" && parseInt(navigator.appVersion)>=4)?true:false
	var ns6 = (document.getElementById&&!document.all)

	var safari = new String(navigator.appVersion);
	var expr=/safari/gi;
	Saf = safari.search(expr);

	var navigsaf = (Saf!=-1)?true:false;

	


function getLayer(name) {
	
  if (ie) {  
    return eval('document.all.' + name);
  }
	if (ns6) {
		return document.getElementById(name);
	}
  return null;
  
}



function setBorder() {		
		/*var windowWidth = 0;
		if (typeof(window.innerWidth) == 'number') {
			windowWidth = window.innerWidth;
		}
		else {
			if (document.documentElement && document.documentElement.clientWidth) {
				windowWidth = document.documentElement.clientWidth;
			}
			else {
				if (document.body && document.body.clientWidth) {
					windowWidth = document.body.clientWidth;
				}
			}
		}
		leftBorder1 = getLayer('leftBorder');
		rightBorder1 = getLayer('rightBorder');
		
		
		
		
		
		leftWidth = (windowWidth-1000)/2;
		leftBorder1.style.width=leftWidth+"px";
		rightBorder1.style.width=leftWidth+"px";	
		
		leftBorder1.style.visibility="visible";
		
		rightBorder1.style.visibility="visible";*/
		
		main1 = getLayer('main');
		main1.style.visibility="visible";
		
		div1 = getLayer('contentLeft');
		div2 = getLayer('contentCenter');
		div3 = getLayer('contentRight');
		
		if(div1.offsetHeight>=div2.offsetHeight && div1.offsetHeight>=div3.offsetHeight){
			/** contentLeft is longer **/
			div1.style.height=div1.offsetHeight-44+"px";
			div2.style.height=div1.offsetHeight-44+"px";
			div3.style.height=div1.offsetHeight-44+"px";
		}
		else	if(div2.offsetHeight>=div1.offsetHeight && div2.offsetHeight>=div3.offsetHeight){
			/** contentCenter is longer **/
			div2.style.height=div2.offsetHeight-44+"px";
			div1.style.height=div2.offsetHeight -44+"px";
			div3.style.height=div2.offsetHeight-44 +"px";
		}
		else{
			/** contentRight is longer **/
			div3.style.height=div3.offsetHeight -44+"px";
			div1.style.height=div3.offsetHeight -44+"px";
			div2.style.height=div3.offsetHeight-44 +"px";
		}
		
			
		//return windowWidth;
		
	}
	
	
function changeGalerie(y,n) { 
    //alert("allo");
	contentCenter1 = getLayer('contentCenter');
	contentCenter1.style.backgroundImage = 'url(images/galerie-photo/' + y + '/grosses/' + n + '.jpg)';
}


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_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_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];}
}

function calcul_total(sbox)
{	
	var soustotal = 0;
	var grandtotal = 0;
	var fraisservice = 0;
	//var taxes = 0;
	//var prixadm = 0;
	//var prixvip = 0;
	
	//prixadm=11.99;
	//prixvip=8.99;
	
	//soustotal = (document.Form.agj.value)*prixadm + (document.Form.agv.value)*prixadm + (document.Form.ags.value)*prixadm + (document.Form.agd.value)*prixadm;
	//soustotal = soustotal + (document.Form.evj.value)*prixvip + (document.Form.evv.value)*prixvip + (document.Form.evs.value)*prixvip + (document.Form.evd.value)*prixvip;
	
	
	fraisservice = (document.Form.ptrois.value)*2.50 + (document.Form.pquatre.value)*2.50 + (document.Form.evptrois.value)*2.50 /*+ (document.Form.evpquatre.value)*2.50*/ + (document.Form.agd.value)*2.50;
	//fraisservice = fraisservice + (document.Form.evd.value)*2.50;
	//fraisservice = fraisservice + (document.Form.evd.value)*2.50;
	
	soustotal = (document.Form.ptrois.value)*25 + (document.Form.pquatre.value)*40 + (document.Form.evptrois.value)*35 /*+ (document.Form.evpquatre.value)*65*/ + (document.Form.agd.value)*30;
	//soustotal = soustotal + (document.Form.evd.value)*45;
	
	//taxes = (soustotal +2.50) * 0.11825;
	grandtotal = soustotal  + fraisservice;
	//alert(soustotal);
	
	

	
	
	
	document.getElementById('divshow2').innerHTML = ""+soustotal.toFixed(2)+"$";
	document.getElementById('divshow3').innerHTML = ""+ fraisservice.toFixed(2) +"$";
	//document.getElementById('divshow4').innerHTML = ""+taxes.toFixed(2)+"$";	
	document.getElementById('divshow5').innerHTML = ""+grandtotal.toFixed(2)+"$";
	
		
}

