function makeRequest(url, callback) {

	var httpRequest = false;

	if (window.XMLHttpRequest) { // Mozilla, Safari,...
		httpRequest = new XMLHttpRequest();
		if (httpRequest.overrideMimeType) {
			httpRequest.overrideMimeType('text/xml');
		}
	}
	else if (window.ActiveXObject) { // IE
		try {
			httpRequest = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e) {
			try {
				httpRequest = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e) { httpRequest = false; }
		}
	}

	if (!httpRequest) {
		alert('Abandon :( Impossible de créer une instance XMLHTTP');
		return false;
	}
	if(callback != "")
		httpRequest.onreadystatechange = function() { eval(callback + '(httpRequest)'); };
	httpRequest.open('GET', url, true);
	httpRequest.send(null);

}


sfHover = function(){
	if(!document.getElementById('menuRow'))return;
	var ieLIs = document.getElementById('menuRow').getElementsByTagName('li');
	for (var i=0; i<ieLIs.length; i++)
	{
		if (ieLIs[i])
		{
			ieLIs[i].onmouseover=function(){
				var ieSELECTs = document.getElementsByTagName('select');
				for (var i=0; i<ieSELECTs.length; i++)
				{
					ieSELECTs[i].style.visibility="hidden";
				}
				this.className+=" sfhover";
			}
			ieLIs[i].onmouseout=function(){
				var ieSELECTs = document.getElementsByTagName('select');
				for (var i=0; i<ieSELECTs.length; i++)
				{
					ieSELECTs[i].style.visibility="visible";
				}			
				this.className=this.className.replace(' sfhover', '');
			}
		}
	}
}
if (window.attachEvent) window.attachEvent('onload', sfHover);


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) { //v3.0
  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); 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 MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}



/******* CAttribut *******/
var CAttribut_validate = new Array;

function CAttItem (code_ean, option_id, majoration_prix, qte_stock){
	this.Datas = new Array;
	this.EAN = code_ean;
	this.OptID = option_id;
	this.Majoration = majoration_prix;
	this.Stock = qte_stock;
}
CAttItem.prototype.AddProperty = function (attribut_id, attribut_detail_id){
	newID = this.Datas.length;
	this.Datas[newID] = new Array;
	this.Datas[newID]["AttDetailID"] = attribut_detail_id;
	this.Datas[newID]["AttID"] = attribut_id;
}


function CAttribut (ObjectName, pagesURL){
	this.ObjectName = ObjectName;
	
	this.DelaiLivTag = "DelaiLivTag";
	this.StockTag = "StockTag";
	this.MajorationTag = "MajorationTag";
	this.AttSelectName = "sel_attrib";
	this.DefaultValue = "----------";
	this.HiddenOptID = "option_id";
	this.HiddenEAN = "code_ean";
	this.LinkedCheckBox = "";

	this.KitController = null;
	
	this.PrixBase = 0;
	this.Devise = "EUR";
	this.Majoration = 0;
	this.pagesURL = pagesURL;
	this.SelectOK = false;
	
	this.s_DelaiLiv = 0;
	this.DelaiLiv = new Array;
	this.DelaiLiv[0] = new Array;
	this.DelaiLiv[1] = new Array;
	this.DelaiLiv[2] = new Array;
	this.DelaiLiv[3] = new Array;
	this.DelaiLiv[4] = new Array;
	this.DelaiLiv[5] = new Array;
	this.DelaiLiv[6] = new Array;
	this.DelaiLiv[0][0] = 1;
	this.DelaiLiv[1][0] = 2;
	this.DelaiLiv[2][0] = 3;
	this.DelaiLiv[3][0] = 4;
	this.DelaiLiv[4][0] = 5;
	this.DelaiLiv[5][0] = 6;
	this.DelaiLiv[6][0] = 7;
	
	this.EANList = new Array;
	this.AttArbo = new Array;
	this.AttArboDef = new Array;
	
	/* fabrication arbo */
	this.PrevEAN = "";
	this.cItem = 0;
	this.levelCount = 0;
	
	this.SelectedList = new Array;
	
	CAttribut_validate[CAttribut_validate.length] = ObjectName;
}

/*** 
	enregistrement d'un input checkbox ou radio lié au produit
	si cet input est déselectionné/décoché, 
	alors this.IsOk() renvoie TRUE dans tous les cas
***/
CAttribut.prototype.SetLinkedCheckBox = function (InputName){
	this.LinkedCheckBox = InputName
}

CAttribut.prototype.SetEANHiddenInput = function (InputName){
	this.HiddenEAN = InputName
}
CAttribut.prototype.SetOptionIDHiddenInput = function (InputName){
	this.HiddenOptID = InputName
}
CAttribut.prototype.SetAttSelectName = function (InputName){
	this.AttSelectName = InputName
}
CAttribut.prototype.SetMajorationTag = function (InputName){
	this.MajorationTag = InputName
}
CAttribut.prototype.SetDefaultOption = function (Libelle){
	this.DefaultValue = Libelle
}

CAttribut.prototype.SetDelaiLivText = function (DelaiID, DelaiText){
	for(i=0; i<this.DelaiLiv.length; i++){
		if(this.DelaiLiv[i][0] == DelaiID)
			this.DelaiLiv[i][1] = DelaiText;
	}
}

CAttribut.prototype.IsOk = function (){
	if(this.LinkedCheckBox != ""){
		chkbox = document.getElementById(this.LinkedCheckBox);
		if(chkbox){
			if(!chkbox.checked)	return true;
			else return this.SelectOK;
		}else{
			return this.SelectOK;
		}
	}else{
		return this.SelectOK;
	}
}

CAttribut.prototype.Add = function (libelle, attribut_id, libelle_opt, attribut_detail_id, majoration_prix, qte_stock, code_ean, tri, option_id){
	
	if(this.PrevEAN != code_ean){
		//recherche si EAN existant
		var found = false;
		for(var i=0; i<this.EANList.length; i++){
			if(this.EANList[i].EAN == code_ean){
				found = true;
				this.cItem = i;
			}
		}
		if(!found){
			this.cItem = this.EANList.length;
			this.EANList[this.cItem] = new CAttItem(code_ean, option_id, majoration_prix, qte_stock);
		}
		this.PrevEAN = code_ean;
	}
	this.EANList[this.cItem].AddProperty(attribut_id, attribut_detail_id);
	
	ItemDatasCount = this.EANList[this.cItem].Datas.length-1;
	this.NewArboEntry(this.AttArbo, 0, ItemDatasCount, libelle_opt, attribut_detail_id, code_ean, libelle, attribut_id);
}

CAttribut.prototype.NewArboEntry = function (Arbo, cLevel, ToLevel, eText, eID, EAN, eDef, eDefID){
	if(cLevel < ToLevel){
		this.NewArboEntry(Arbo[this.EANList[this.cItem].Datas[cLevel]["AttDetailID"]][0], cLevel+1, ToLevel, eText, eID, EAN, eDef, eDefID);
		return;
	}else{
		if(cLevel > this.levelCount) this.levelCount = cLevel;
	
		found = false;
		for(var i in Arbo){
			if(i == eID){
				found = true;
				break;
			}
		}
		
		if(found){
			Arbo[eID][2][Arbo[eID][2].length] = EAN;
		}else{
			Arbo[eID] = new Array;
			Arbo[eID][0] = new Array;
			Arbo[eID][1] = eText;
			Arbo[eID][2] = new Array;
			Arbo[eID][2][0] = EAN;
			
			if(cLevel+1 > this.AttArboDef.length){
				this.AttArboDef[cLevel] = new Array;
				this.AttArboDef[cLevel][0] = eDefID;
				this.AttArboDef[cLevel][1] = eDef;
			}
		}
	}
}

CAttribut.prototype.RefreshCombo = function (Level, Value){
	//if(Value == 0) return true;
	

	var ArboNode = new Array;
	ArboNode[0] = this.AttArbo;

	if(Level == this.levelCount){

		for(i=0; i<this.SelectedList.length; i++){
			ArboNode = ArboNode[0][this.SelectedList[i]];
		}
		if(Value != 0){
			var SelectedEAN = ArboNode[0][Value][2][0];
			for(i=0; i<this.EANList.length; i++){
				if(this.EANList[i].EAN == SelectedEAN){
					//var divMajor = document.getElementById(this.MajorationTag);
					//divMajor.innerHTML = this.EANList[i].Majoration + " " + this.Devise;
					this.Majoration = this.EANList[i].Majoration;
					eval("document.form_panier."+this.HiddenOptID+".value = '" + this.EANList[i].OptID + "'");
					eval("document.form_panier."+this.HiddenEAN+".value = '" + this.EANList[i].EAN + "'");
					this.SelectOK = true;
					
					if(this.KitController){
						this.KitController.CalcValue();
					}
					
					break;
				}
			}
		}
		return true;
	}else{
		eval("document.form_panier."+this.HiddenEAN+".value = ''");
		eval("document.form_panier."+this.HiddenOptID+".value = 0");
		//var divMajor = document.getElementById(this.MajorationTag);
		//divMajor.innerHTML = "NC";
		this.Majoration = 0;
		if(this.KitController){
			this.KitController.CalcValue();
		}
	}
	this.SelectOK = false;
	
	if(this.SelectedList.length > Level)
		while(this.SelectedList.length > Level){
			document.getElementById(this.AttSelectName + "l" + (this.SelectedList.length)).options.length = 1;
			this.SelectedList.pop();
		}
	this.SelectedList.push(Value);
	
	
	var ISelect = document.getElementById(this.AttSelectName + "l" + (Level+1));
	ISelect.options.length = 1;
	if(Value == 0) return true;

	for(i=0; i<this.SelectedList.length; i++){
		ArboNode = ArboNode[0][this.SelectedList[i]];
	}
	
	//ISelect.options[ISelect.options.length] = new Option(this.DefaultValue, 0);
	for(var i in ArboNode[0]){
		ISelect.options[ISelect.options.length] = new Option(ArboNode[0][i][1], i);
	}
	
	//auto select des prochains combo, si plus qu'un choix dispo
	if(ArboNode[2].length == 1){
		var NextAttID = 0;
		for(NextAttID in ArboNode[0]){}
		ISelect.selectedIndex = 1;
		this.RefreshCombo(Level+1, NextAttID);
	}

	return true;
}

CAttribut.prototype.DisplayCombo = function (AttributID) {
	var Opts = ""
	
	for(i=0; i<this.AttArboDef.length; i++){
		if(AttributID == this.AttArboDef[i][0]){

			document.write("<select id='"+this.AttSelectName+"l"+i+"' name='"+this.AttSelectName+this.AttArboDef[i][0]+"' onchange='"+this.ObjectName+".RefreshCombo("+i+", this.value)'>");
			document.write("<option value='0'>"+this.DefaultValue+"</option>");
			if(i == 0)
				for(var z in this.AttArbo){
					document.write("<option value='"+z+"'>"+this.AttArbo[z][1]+"</option>");
				}
			document.write("</select>");
		}
	}
}

/* debug function */
function DumpArbo(Arbo, level){
	var s_level = "---";
	for(i=0; i<level; i++) s_level += "---";
	for(var i in Arbo){
		document.write(s_level + " " + Arbo[i][1] + " ("+ i +")<br>");
		//for(var j in Arbo[i][2])
			//document.write(s_level + " > " + Arbo[i][2][j] + "<br>");
		if(Arbo[i][0].length) DumpArbo(Arbo[i][0], level+1);
	}
}
//DumpArbo(C.AttArbo, 0)

function KitController (ObjectName, pagesURL){
	this.ObjectName = ObjectName;
	this.elems = new Array;
	this.BaseValue = 0;
	this.Value = 0;	
	this.PriceTag = "";
	this.Devise = "EUR";
}
KitController.TypeMandatory = 1;
KitController.TypeAlternative = 2;
KitController.TypeOption = 3;

KitController.prototype.AddMandatory = function (value, AttObject){
	var nid = this.elems.length;
	this.elems[nid] = new Array;
	this.elems[nid][0] = KitController.TypeMandatory;
	this.elems[nid][1] = value;
	this.elems[nid][2] = AttObject;
	
	this.BaseValue += value;
}

KitController.prototype.AddElem = function (value, AttObject, CheckInput, Type, Groupe){
	var nid = this.elems.length;
	this.elems[nid] = new Array;
	this.elems[nid][0] = Type;
	this.elems[nid][1] = value;
	this.elems[nid][2] = AttObject;
	this.elems[nid][3] = CheckInput;	
	this.elems[nid][4] = Groupe;
	this.elems[nid][5] = document.getElementById(CheckInput).checked;
	
	/*** add handler on the product's checkbox ***/
	/*var FnName = (Type == KitController.TypeAlternative)? "AlternativeCheck" : "OptionCheck" ;
	eval("document.getElementById('"+CheckInput+"').onclick = " + this.ObjectName + "." + FnName);*/
}

KitController.prototype.AddAlternative = function (value, AttObject, CheckInput, Groupe){
	this.AddElem(value, AttObject, CheckInput, KitController.TypeAlternative, Groupe)
}

KitController.prototype.AddOption = function (value, AttObject, CheckInput){
	this.AddElem(value, AttObject, CheckInput, KitController.TypeOption, 0)
}

KitController.prototype.CalcValue = function(e){
	/*** locate elem ***/
	var elem = null;
	if(e){
		for(i=0; i<this.elems.length; i++){
			if(this.elems[i][0] == KitController.TypeMandatory) continue;
			if(this.elems[i][3] == e.id){
				elem = this.elems[i];
				break;
			}
		}
	}

	/*** calc total value ***/
	this.Value = this.BaseValue;
	for(i=0; i<this.elems.length; i++){
		if(this.elems[i][0] == KitController.TypeAlternative){//if good elem type
			if(elem != null && elem[0] == KitController.TypeAlternative && elem[4] == this.elems[i][4]){
				/*** if elem is alternative and same group
					 adding elem value, and check it. uncheck other group elem
				***/
				if(elem[3] == this.elems[i][3]){//if good elem
					this.elems[i][5] = true;
				}else{
					this.elems[i][5] = false;
				}
			}
			if(this.elems[i][5]){
				this.Value += this.elems[i][1];
				this.Value += this.elems[i][2].Majoration;
			}

		}else if(this.elems[i][0] == KitController.TypeOption){
			if(elem != null && elem[0] == KitController.TypeOption && elem[3] == this.elems[i][3]){
				if(e.checked){
					this.elems[i][5] = true;
				}else{
					this.elems[i][5] = false;
				}
			}
			if(this.elems[i][5]){
				this.Value += this.elems[i][1];
				this.Value += this.elems[i][2].Majoration;
			}
		}
	}
	
	this.Value = Math.round(this.Value*100)/100;

	document.getElementById(this.PriceTag).innerHTML = this.Value + " " + this.Devise;
}

KitController.prototype.AlternativeCheck = function (e){
	//if (!e){e = window.event;e = e.srcElement;}else{e = e.target;}
	this.CalcValue(e);
}

KitController.prototype.OptionCheck = function (e){
	//if (!e){e = window.event;e = e.srcElement;}else{e = e.target;}
	this.CalcValue(e);
}


//check if an email is valid
function is_email(inputValue) {

   var invalidChars = '\/\'\\ ";:?!()[]\{\}^|';
   var atPos   = inputValue.indexOf('@',0);
   var suffix   = inputValue.substring(inputValue.lastIndexOf('.')+1);
   for (i=0; i<invalidChars.length; i++) {
       if (inputValue.indexOf(invalidChars.charAt(i),0) > -1) return false
   }
   for (i=0; i<inputValue.length; i++) {
       if (inputValue.charCodeAt(i)>127) return false;
      }
   if (atPos <= 0 || inputValue.indexOf('@', atPos + 1) > - 1 || inputValue.indexOf('.', atPos) == -1 || inputValue.indexOf('@.',0) != -1 || inputValue.indexOf('.@',0) != -1 || inputValue.indexOf('..',0) != -1) 
    	return false;
   if (suffix.length != 2 && suffix != 'com' && suffix != 'net' && suffix != 'org' && suffix != 'edu' && suffix != 'int' && suffix != 'mil' && suffix != 'gov' && suffix != 'arpa' && suffix != 'biz' && suffix != 'aero' && suffix != 'name' && suffix != 'coop' && suffix != 'info' && suffix != 'pro' && suffix != 'museum')
    	return false;
   return true;
}


/**
 * http://www.tumuski.com/
 *
 *	HTML-Encode the supplied input
 * 
 * Parameters:
 *
 * (String)  source    The text to be encoded.
 * 
 * (boolean) display   The output is intended for display.
 *
 *                     If true:
 *                     * Tabs will be expanded to the number of spaces 
 *                       indicated by the 'tabs' argument.
 *                     * Line breaks will be converted to <br />.
 *
 *                     If false:
 *                     * Tabs and linebreaks get turned into &#____;
 *                       entities just like all other control characters.
 *
 * (integer) tabs      The number of spaces to expand tabs to.  (Ignored 
 *                     when the 'display' parameter evaluates to false.)
 *
 * v 0.3 - January 4, 2006
 */
function htmlEncode(source, display, tabs)
{
	function special(source)
	{
		var result = '';
		for (var i = 0; i < source.length; i++)
		{
			var c = source.charAt(i);
			if (c < ' ' || c > '~')
			{
				c = '&#' + c.charCodeAt() + ';';
			}
			result += c;
		}
		return result;
	}
	
	function format(source)
	{
		// Use only integer part of tabs, and default to 4
		tabs = (tabs >= 0) ? Math.floor(tabs) : 4;
		
		// split along line breaks
		var lines = source.split(/\r\n|\r|\n/);
		
		// expand tabs
		for (var i = 0; i < lines.length; i++)
		{
			var line = lines[i];
			var newLine = '';
			for (var p = 0; p < line.length; p++)
			{
				var c = line.charAt(p);
				if (c === '\t')
				{
					var spaces = tabs - (newLine.length % tabs);
					for (var s = 0; s < spaces; s++)
					{
						newLine += ' ';
					}
				}
				else
				{
					newLine += c;
				}
			}
			// If a line starts or ends with a space, it evaporates in html
			// unless it's an nbsp.
			newLine = newLine.replace(/(^ )|( $)/g, '&nbsp;');
			lines[i] = newLine;
		}
		
		// re-join lines
		var result = lines.join('<br />');
		
		// break up contiguous blocks of spaces with non-breaking spaces
		result = result.replace(/  /g, ' &nbsp;');
		
		// tada!
		return result;
	}

	var result = source;
	
	// ampersands (&)
	result = result.replace(/\&/g,'&amp;');

	// less-thans (<)
	result = result.replace(/\</g,'&lt;');

	// greater-thans (>)
	result = result.replace(/\>/g,'&gt;');
	
	if (display)
	{
		// format for display
		result = format(result);
	}
	else
	{
		// Replace quotes if it isn't for display,
		// since it's probably going in an html attribute.
		result = result.replace(new RegExp('"','g'), '&quot;');
	}

	// special characters
	result = special(result);
	
	// tada!
	return result;
}



function Trim(orgString){
  return LTrim(RTrim(orgString))
}

function LTrim(orgString){
  return orgString.replace(/^\s+/,'')
}

function RTrim(orgString){
  return orgString.replace(/\s+$/,'')
}


function checkCIFcompany (cifCode)
{
	if ( cifCode.length < 8 || cifCode.length > 12)
		return false;
	var format1=/^[ABCDEFGHJKLMNPQRSUVW]\d{7,9}$/ //regular expression defining format1 : X000000000
	var format2=/^[ABCDEFGHJKLMNPQRSUVW]\d{7}[ABCDEFGHJKLMNPQRSUVW]$/ //regular expression defining format2 : X0000000Y
	
	if (cifCode.search(format1)==0 ) 
		return true;
	if (cifCode.search(format2)==0 ) 
		return true;
	
	return false;
}

function checkCIF(cifCode)
{
	if ( cifCode.length < 7 || cifCode.length > 9)
		return false;
	
	var letterArray= 'TRWAGMYFPDXBNJZSQVHLCKE'; //used for format 2 only ! 
	var format1=/^[X-Z]\d{7}[A-Z]$/ //regular expression defining format1 : X0000000X (foreign users)
	var format2=/^\d{6,8}[A-Z]$/ //regular expression defining format2 : 00000000X or 0000000X or 000000X
	
	
	if (cifCode.search(format1)==0) 
	{
			var numberlength= 8; 
			//format 1
			var letter = cifCode.charAt(8).toUpperCase(); 
			var letter_prefix = cifCode.charAt(0).toUpperCase(); 
			var prefixe = "";
			switch(letter_prefix)
			{
				case "Y":
				prefixe = "1";
				break;
				case "Z":
				prefixe = "2";
				break;
			}
			var nombre = parseInt( prefixe + cifCode.substring(1,numberlength),"10");
			var modulo = nombre % 23;
			//alert (letter_prefix+" | "+letter+" "+prefixe+" | "+ nombre + " " + modulo);
			if (letter != letterArray.charAt(modulo) )
				return false;
			return true;
	}
	else
		if (cifCode.search(format2)==0) 
		{
			var numberlength= cifCode.length -1; 
			//format 2
			var letter = cifCode.charAt(numberlength).toUpperCase(); 
			var nombre = parseInt( cifCode.substring(0,numberlength),"10");
			var modulo = nombre % 23;
			if (letter != letterArray.charAt(modulo) )
				return false;
		}
		else
		{
			return false;
		}
	return true;
}

 function utf8_encode ( string ) {  
     // Encodes an ISO-8859-1 string to UTF-8    
	 // seulement utile avec IE pour les appels AJAX avec des chaines en parametre...
	 
     if (navigator.appName.indexOf("Microsoft")> -1)
     {     
     string = (string+'').replace(/\r\n/g, "\n").replace(/\r/g, "\n");  
   
     var utftext = "";  
     var start, end;  
     var stringl = 0;  
   
     start = end = 0;  
     stringl = string.length;  
     for (var n = 0; n < stringl; n++) {  
         var c1 = string.charCodeAt(n);  
         var enc = null;  
   
         if (c1 < 128) {  
             end++;  
         } else if((c1 > 127) && (c1 < 2048)) {  
             enc = String.fromCharCode((c1 >> 6) | 192) + String.fromCharCode((c1 & 63) | 128);  
         } else {  
             enc = String.fromCharCode((c1 >> 12) | 224) + String.fromCharCode(((c1 >> 6) & 63) | 128) + String.fromCharCode((c1 & 63) | 128);  
         }  
         if (enc != null) {  
             if (end > start) {  
                 utftext += string.substring(start, end);  
             }  
             utftext += enc;  
             start = end = n+1;  
         }  
     }  
   
     if (end > start) {  
         utftext += string.substring(start, string.length);  
     }  
     return utftext; 
     }
     else
     	return string;
} 

//appel des blocs ajax
jQuery(window).bind('load', function(){

	var BBTool_pageSizes = BBTool_getPageSize();
	var BBTool_pageScroll = BBTool_getPageScroll();
		BBVars.pageWidth = BBTool_pageSizes[0];
		BBVars.pageHeight = BBTool_pageSizes[1];
		BBVars.windowWidth = BBTool_pageSizes[2];
		BBVars.windowHeight = BBTool_pageSizes[3];
		BBVars.pageScrollX = BBTool_pageScroll[0];
		BBVars.pageScrollY = BBTool_pageScroll[1]; 

	//appel showcase homepage
	//if(BBVars.currentPageName == "index") {
	//	jQuery.get(
	//	BBVars.pagesURL+"ajax/homepage_showcase.cfm",
	//	function( msgData ) { BBTool_openMsgBox( msgData, true ); }
	//	);
	//}
	//header ajax
	//if (document.getElementById("ajaxheaderdiv"))
	//{
	//	var nologin = "";
		//masquer certains boutons sur page login.cfm
	//	if(BBVars.currentPageName == "login")
	//		nologin = "?nologin=1";
	//	
	//	jQuery.get(
	//		BBVars.pagesURL+"ajax/header_content.cfm" + nologin,
	//		function( msgData ) { BBTool_openMsgBox( msgData, true ); }
	//		);
	//}
});


//manage missing pictures
function errorImage( imageElement, imagesize, urlImg )
{
	if (imagesize)
		imageElement.src = urlImg+"nophoto"+imagesize+"px.gif";
	else
		imageElement.src = urlImg+"nophoto140px.gif";
	
}
