function toggleDisp() {
	for (var i=0;i<arguments.length;i++){
		var d = $(arguments[i]);
		if (d.style.display == 'none')
			d.style.display = 'block';
		else
			d.style.display = 'none';
	}
}
function toggleTab(num,numelems,opennum,animate) {
	if ($('tabContent'+num).style.display == 'none'){
		for (var i=1;i<=numelems;i++){
			if ((opennum == null) || (opennum != i)){
				var temph = 'tabHeader'+i;
				var h = $(temph);
				if (!h){
					var h = $('tabHeaderActive');
					h.id = temph;
				}
				var tempc = 'tabContent'+i;
				var c = $(tempc);
				if(c.style.display != 'none'){
					if (animate || typeof animate == 'undefined')
						toggleDisp(tempc);
					else
						toggleDisp(tempc);
				}
			}
		}
		var h = $('tabHeader'+num);
		if (h)
			h.id = 'tabHeaderActive';
		h.blur();
		var c = $('tabContent'+num);
		c.style.marginTop = '2px';
		if (animate || typeof animate == 'undefined'){
			toggleDisp('tabContent'+num);

		}else{
			toggleDisp('tabContent'+num);
		}
	}
}


window.onload = function(e) {
	gotab2();
	gotab();
	preloadImages();
	if(typeof forfaits_ready == 'function')
		forfaits_ready();
}

function createDemos() {
//<![CDATA[
if (document.getElementById('colortip'))
	new Tip('colortip', 'Quelle est la couleur<br>de votre humeur?', { style: 'protogrey', borderColor: '#000000', border: '4', radius: '4', stem: 'bottomMiddle', hook: { tip: 'bottomLeft', mouse: true }, offset: { x: -50, y: -5 }});
if (document.getElementById('boutique'))
	new Tip('boutique', 'Adaptez-les &agrave; votre d&eacute;cor personnel<br>en visitant notre Boutique en ligne!', { title:'Vous craquez pour le coup<br>d&#39;&#x0153;il de nos accessoires?', style: 'protogrey', borderColor: '#000000', border: '4', radius: '4', stem: 'bottomMiddle', hook: { tip: 'bottomLeft', mouse: true }, offset: { x: -100, y: -5 }});
if (document.getElementById('buy'))
	new Tip('buy', 'Achetez-moi!', { style: 'protogrey', borderColor: '#000000', border: '4', radius: '4', stem: 'bottomMiddle', hook: { tip: 'bottomLeft', mouse: true }, offset: { x: -38, y: 0 }});
if (document.getElementById('buy2'))
	new Tip('buy2', 'Achetez-moi!', { style: 'protogrey', borderColor: '#000000', border: '4', radius: '4', stem: 'bottomMiddle', hook: { tip: 'bottomLeft', mouse: true }, offset: { x: -38, y: 0 }});
if (document.getElementById('buy3'))
	new Tip('buy3', 'Achetez-moi!', { style: 'protogrey', borderColor: '#000000', border: '4', radius: '4', stem: 'bottomMiddle', hook: { tip: 'bottomLeft', mouse: true }, offset: { x: -38, y: 0 }});
if (document.getElementById('buy4'))
	new Tip('buy4', 'Achetez-moi!', { style: 'protogrey', borderColor: '#000000', border: '4', radius: '4', stem: 'bottomMiddle', hook: { tip: 'bottomLeft', mouse: true }, offset: { x: -38, y: 0 }});
//]]>
}

function createDemos2() {
//<![CDATA[
if (document.getElementById('colortip_en'))
	new Tip('colortip_en', 'What color mood are<br>you in today?', { style: 'protogrey', borderColor: '#000000', border: '4', radius: '4', stem: 'bottomMiddle', hook: { tip: 'bottomLeft', mouse: true }, offset: { x: -50, y: -5 }});
if (document.getElementById('boutique_en'))
	new Tip('boutique_en', 'can now duplicate the experience<br>at home, by visiting our online Boutique.', { title:'Customers who love our<br>no-frills chic style,', style: 'protogrey', borderColor: '#000000', border: '4', radius: '4', stem: 'bottomMiddle', hook: { tip: 'bottomLeft', mouse: true }, offset: { x: -100, y: -5 }});
if (document.getElementById('buy_en'))
	new Tip('buy_en', 'Buy me!', { style: 'protogrey', borderColor: '#000000', border: '4', radius: '4', stem: 'bottomMiddle', hook: { tip: 'bottomLeft', mouse: true }, offset: { x: -28, y: 0 }});
if (document.getElementById('buy2_en'))
	new Tip('buy2_en', 'Buy me!', { style: 'protogrey', borderColor: '#000000', border: '4', radius: '4', stem: 'bottomMiddle', hook: { tip: 'bottomLeft', mouse: true }, offset: { x: -28, y: 0 }});
if (document.getElementById('buy3_en'))
	new Tip('buy3_en', 'Buy me!', { style: 'protogrey', borderColor: '#000000', border: '4', radius: '4', stem: 'bottomMiddle', hook: { tip: 'bottomLeft', mouse: true }, offset: { x: -28, y: 0 }});
if (document.getElementById('buy4_en'))
	new Tip('buy4_en', 'Buy me!', { style: 'protogrey', borderColor: '#000000', border: '4', radius: '4', stem: 'bottomMiddle', hook: { tip: 'bottomLeft', mouse: true }, offset: { x: -28, y: 0 }});
//]]>

}