

function ChangeEntrepot(){				
				//rien faire
				//fonction declarer dans certaine autre page
				//celle-ci sert juste pour pas pogner d'erreur javascript dans les pages qui ne se servent pas de la fonction
				
}


function inittable()
{	
	
	if(document.getElementById("resultat")){		
		var TableSorter1 = new TSorter;		
		TableSorter1.init('resultat');	
	}
	if(document.getElementById("resultat2")){		
		var TableSorter1 = new TSorter;		
		TableSorter1.init('resultat2');	
	}			

}
function inittable(id)
{		
	if(document.getElementById(id)){		
		var TableSorter1 = new TSorter;		
		TableSorter1.init(id);	
	}	

}


function applyShadow(classname,tag, shadowColor, shadowOffsetx, shadowOffsety) {
	 /* if (typeof(targetElement) != 'object') {		  
		targetElement = document.getElementById(targetElement);			
	  }*/	
		  var elements = document.getElementsByTagName(tag);		 
		 
		  for(var i=0; i<elements.length; i++){				 
			if((elements[i].className == classname)|| (classname=='')) {	
			
				  targetElement=elements[i];
				  var value = targetElement.firstChild.nodeValue;
				  targetElement.style.position = 'relative';
				  targetElement.style.zIndex = 1;
					
				  var newEl = document.createElement('span');
				  newEl.appendChild(document.createTextNode(value));
				  newEl.className = 'shadowed';
				  newEl.style.color = shadowColor;
				  newEl.style.position = 'absolute';
				  newEl.style.opacity = '0.4';
				  newEl.style.left = -shadowOffsetx + 'px';
				  newEl.style.top = shadowOffsety + 'px';
				  newEl.style.zIndex = -1;					  
				  targetElement.appendChild(newEl);
			}
		}	  		 	
		
	}
	

function detectIE6(){
		
		var IE6 = false;
		var strChUserAgent = navigator.userAgent; 
		var intSplitStart = strChUserAgent.indexOf("(",0); 
		var intSplitEnd = strChUserAgent.indexOf(")",0); 
		var strChMid = strChUserAgent.substring(intSplitStart, intSplitEnd); 			
		if(strChMid.indexOf("MSIE 6") != -1) IE6 = true;
		if(strChMid.indexOf("MSIE 7") != -1) IE6 = false;
		if(strChMid.indexOf("MSIE 8") != -1) IE6 = false;		
		return IE6;
		
}
var IE6=false;
IE6=detectIE6();

	
function bg_fnFixPng(obj){		
/*Fonction copier de supersleight-min.js...  patch pour IE6 et afficher les PNG avec des fonds transparents... 
  En changeant l'image des boutons sur mouseover, les fonds transparents disparaissait*/
	
	if (IE6){		
		var shim='scripts/x.gif';
		var mode='scale';
		var bg=obj.currentStyle.backgroundImage; 
		var src=bg.substring(5,bg.length-2);
		if(obj.currentStyle.backgroundRepeat=='no-repeat'){
			mode='crop';
		}
		obj.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+src+"', sizingMethod='"+mode+"')";
		obj.style.backgroundImage='url('+shim+')';
	}
};


function effectFadeIn(id) {
	$("#"+id).fadeOut(400).fadeIn(400, effectFadeOut(id))
}
function effectFadeOut(id) {
	
	$("#"+id).fadeIn(400).fadeOut(400, effectFadeIn(id))
}
function killIt(id){	
    $('#'+id).fadeOut(1000);
}	

var AjustementPageSansHeader=0
var ProvientPageDeRecherche=0;

function checkresolution(){
	  document.body.style.cursor = "default";
	 return true;
	 /*
	hauteurpaneSansHeaderpx=(245)+AjustementPageSansHeader+"px";	
	var myHeight = 0;
	  if( typeof( window.innerWidth ) == 'number' ) {
		//Non-IE		
		myHeight = window.innerHeight;
	  } else if( document.documentElement &&  document.documentElement.clientHeight  ) {
		  //IE 6+ in 'standards compliant mode'		
		myHeight = document.documentElement.clientHeight;
	  } else if( document.body && document.body.clientHeight  ) {
		//IE 4 compatible		
		myHeight = document.body.clientHeight;
	  }
	
	//screen.height
	if (myHeight>592){					
		
		hauteurduHolder= 400+myHeight-592;		
		
		if (hauteurduHolder>800) {			
			hauteurduHolder=800;			
		}		
		if (AjustementPageSansHeader>0){
			hauteurduHolder-=ProvientPageDeRecherche;
		}
		
		hauteurpane=hauteurduHolder-45;
		hauteurpx=hauteurduHolder+"px";
		hauteurpanepx=hauteurpane+"px";		
		
		hauteurpaneSansHeaderpx=(hauteurpane)+AjustementPageSansHeader-ProvientPageDeRecherche+"px";
		
		$('#holder_principal').css("height", hauteurpx);		
		$('#pane2').css("height", hauteurpanepx);	
		
	 }
	 $('#pane_sans_header').css("height",hauteurpaneSansHeaderpx);	
	 if (!(IE6)){
	 	$('.scroll-pane').jScrollPane({showArrows:true, scrollbarWidth: 15, arrowSize: 16});	
	 }*/
}

var BesoinDeVerifierResolution=0;
$(document).ready(function () {	
	 
	 //checkresolution();	 
	  init();
	 setTimeout("$(\"#message_cylabh\").slideToggle(\"2000\");",7000); 		
		
	
});

function init(){	
	if (!(IE6)){
		applyShadow('menu','a','#333333', 1,1);
		applyShadow('','h3','#333333', 1,1);
		applyShadow('titre','div','#000000', 2,2);
		applyShadow('ExpandTitre','span','#000000', 1,1);		
	}	
	var test=typeof document.forms['0'];
	 if (test != 'undefined' ){
		try {
		 document.forms[0].elements[0].focus();
		}catch(err)
		{
		 //do nothing	
		}
	 }
	$(".Expand_head").click(function(){								 
		$(this).next(".Expand_body").slideToggle(400)	
		//BesoinDeVerifierResolution=5;
		
	});
	/*
	$("#pane2").mouseout(function(){								 
			
		if (BesoinDeVerifierResolution>=1){					
			checkresolution();			
			BesoinDeVerifierResolution--;
		}
	});
	*/
}



<!-- script pour AJAX -->
	
		//var http = getXMLHTTPRequest();
		 
		function getXMLHTTPRequest() {
		try {
		req = new XMLHttpRequest();
		} catch(err1) {
		  try {
		  req = new ActiveXObject("Msxml2.XMLHTTP");
		  } catch (err2) {
			try {
			req = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (err3) {
			  req = false;
			}
		  }
		}
		return req;
		}	
			
			
		var TerminerAjax=false;
		function executephp(fonction,idDIV) {
		  var http = getXMLHTTPRequest();			  	
		  var NombreDeFonction
		  var myurl = 'ajax.php?ajax=1&'+fonction+"=1";		 
		  var params= '';
		  //copie toutes les valeurs du formulaire dans la variable param
		  j=0;
		  while (typeof document.forms[j]!="undefined"){
			  for(i=0; i<document.forms[j].elements.length; i++){		
					if ( ((document.forms[j].elements[i].type=="radio" && document.forms[j].elements[i].checked )  ||  (document.forms[j].elements[i].type=="checkbox" && document.forms[j].elements[i].checked )) || (document.forms[j].elements[i].type!="radio" && document.forms[j].elements[i].type!="checkbox")) {				
						if (params!=''){ params+="&";}
						params+=document.forms[j].elements[i].name+"="+document.forms[j].elements[i].value;
					}
			  }  
			  j++;
		  }				
		  if (idDIV!="" && idDIV!="pane_sans_header" && idDIV!="pagination" && idDIV!="qte_cart" ){
		 	 document.getElementById(idDIV).innerHTML="<img src='images/ajax-loader.gif'  />"; 
		  }
		  window.status = "Please wait, Veuillez patienter...";
		  document.body.style.cursor = "wait";


		  http.open("POST", myurl, true);
		  //Send the proper header information along with the request
			http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
			http.setRequestHeader("Content-length", params.length);
			http.setRequestHeader("Connection", "close");
		 
		  // set up the callback function
		  http.onreadystatechange= function() { 
        	if (http.readyState==4){
            	if (http.status==200){
				 if (idDIV!=""){	
               	  writeHTML(http, idDIV);		
				  window.status = "";				
				  inittable("resultat");
				  //BesoinDeVerifierResolution=3;
				 }				
    			}
			}
		  }		  
		  http.send(params);	  
		  
		}		
		
		function writeHTML(http,idDIV){			
			document.getElementById(idDIV).innerHTML=http.responseText;	
			if (idDIV!="pane_sans_header" && idDIV!="pagination" ){
				readonly="readonly"
				setTimeout("$(\"#message_cylabh\").slideUp(\"2000\");",1000);					
				//applyShadow('menu','a','#333333', 1,1);
				applyShadow('','h3','#333333', 1,1);			
				//applyShadow('','h4','#333333', 1,1);
				applyShadow('titre','div','#000000', 2,2);
				inittable('resultat');					
				inittable('resultat2');
			}
			checkresolution();		
			 
		}
		
		





		


			
			

