var tele_box_popcarteciel;
var displayPopCarteCiel = function(type) {	
	if(typeof(type)=='undefined') type=1;
	if (tele_box_popcarteciel == null) {
		tele_box_popcarteciel = new TeleBox({
			name: 'popcarteciel',
			isCrossImg: true,
			hasCross: false,
			multi: true,
			doClose: false,
			loadURL: true,
			loader_class: 'loading_white',
			content: '/common/lab/pop/_new_city_pop?type='+type,
			box_class: 'round_10',
			mask_css: {'background-color': '#FFF', 'z-index': 12},
			box_css: {'width': '567px', 'height': '475px', 'position' : 'absolute', 'border': '0 none', 'background': 'transparent', 'margin-top':'40px', 'padding': '0', 'opacity': 1.0, 'font-size': '12px', 'display': 'none'}
		});
		tele_box_popcarteciel.exec();
	} else 
		tele_box_popcarteciel._show();
};


var tele_box_popvide;
var displayPopVide = function() {	
	if (tele_box_popvide == null) {
		tele_box_popvide = new TeleBox({
			name: 'popvide',
			isCrossImg: true,
			hasCross: false,
			multi: true,
			loadURL: true,
			loader_class: 'loading_white',
			content: '/common/lab/pop/_vide',
			box_class: 'round_10',
			mask_css: {'background-color': '#FFF', 'z-index': 12},
			box_css: {'width': '567px', 'height': '475px', 'position' : 'absolute', 'border': '0 none', 'background': 'transparent', 'padding': '0', 'opacity': 1.0, 'font-size': '12px', 'display': 'none'}
		});
		tele_box_popvide.exec();
	} else 
		tele_box_popvide._show();
};

var tele_box_preview;
var displayPopPreview = function(pid,files) {	
	if (tele_box_preview == null) {
		tele_box_preview = new TeleBox({
			name: 'pop_product_preview',
			hasCross: false,
			multi: true,
			loadURL: true,
			loader_class: 'loading_black',
			content: '/common/lab/pop/_product_preview?id='+pid+'&img='+files,
			box_class: 'round_10',
			mask_css: {'background-color': '#000', 'z-index': 12},
			box_css: {'width': '937px', 'height':'auto', 'position' : 'absolute', 'background': 'transparent', 'padding': '0', 'opacity': 1.0, 'font-size': '12px', 'display': 'none'}
		});
		tele_box_preview.exec();
	} else 
		tele_box_preview._show();
};

var tele_box_popnoel;
var displayPopNoel = function() {
	if (tele_box_popnoel == null) {
		tele_box_popnoel = new TeleBox({
			name: 'popnoel',
			isCrossImg: true,
			hasCross: false,
			multi: true,
			loadURL: true,
			loader_class: 'loading_white',
			content: '/common/lab/pop/_noel_pop',
			box_class: 'round_10',
			mask_css: {'background-color': '#FFF', 'z-index': 12},
			box_css: {'position' : 'absolute', 'border': '0 none', 'background': 'transparent', 'padding': '0', 'opacity': 1.0, 'font-size': '12px', 'display': 'none'}
		});
		tele_box_popnoel.exec();
	} else 
		tele_box_popnoel._show();
};

var tele_box_popnoel_errors;
var displayPopNoelErrors = function(txt_error, _height) {
	if (tele_box_popnoel_errors == null) {
		tele_box_popnoel_errors = new TeleBox({
			name: 'popnoel_errors',
			isCrossImg: true,
			hasCross: false,
			multi: true,
			loadURL: true,
			loader_class: 'loading_white',
			content: '/common/lab/pop/_noel_pop_errors',
			box_class: 'round_10',
			mask_css: {'background-color': '#FFF', 'z-index': 22},
			box_css: {'border': '0 none', 'position' : 'absolute', 'padding': '0px', 'opacity': 1.0, 'display': 'none', 'z-index': 25},
			onBeforeOpen: function(tb) {
				tb.box.find('#text_error').html(txt_error);
				tb.box.find('#noel_pop_errors').css('height', _height);
			} 
		});
		tele_box_popnoel_errors.exec();
	} else {
		tele_box_popnoel_errors.options.onBeforeOpen = function(tb) { tb.box.find('#text_error').html(txt_error); };
		tele_box_popnoel_errors._show();
	}
};
var tele_box_popHome;
var displayPopHome = function(src,lien,h,w,c) {	
	/*if(typeof(h)=='undefined' || h==0) h=563;
	if(typeof(w)=='undefined' || w==0) w=484;
	if(typeof(c)=='undefined' || c==0) c=210;*/
	if (tele_box_popHome == null) {
		tele_box_popHome = new TeleBox({
			name: 'pophfr',
			isCrossImg: false,
			cross_txt: '<strong>Accéder directement au site</strong>',
			multi: true,
			loader_class: 'loading_white',
			//content: '<a href="'+ lien +'"><img src="http://cdn1.horoscope.fr/1/base/popup/'+src+'" width="484px" height="563px"/></a>',
			//content: '<a href="'+ lien +'"><img src="http://cdn1.horoscope.fr/common/pop/'+src+'" width="'+w+'px" height="'+h+'px"/></a>',
			content: '<a href="'+ lien +'"><img src="http://cdn1.horoscope.fr/common/pop/'+src+'" /></a>',
			//cross_css: { 'top': c+'px'},
			box_class: 'round_10',
			mask_css: {'background-color': '#FFF', 'z-index': 12},
			box_css: {'position' : 'absolute', 'border': '0 none', 'background': '#FFF', 'padding': '0', 'opacity': 1.0, 'font-size': '12px', 'display': 'none', 'border':'1px solid #c1bc9e'}
			//box_css: {'width': w+'px', 'height': h+'px', 'position' : 'absolute', 'border': '0 none', 'background': '#FFF', 'margin-top':'40px', 'padding': '0', 'opacity': 1.0, 'font-size': '12px', 'display': 'none', 'border':'1px solid #c1bc9e'}
		});
	}
	tele_box_popHome.exec();
};
