
/*
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=780,height=550');");
}
*/
var win= null;
function popUp(URL) {
	day = new Date();
id = day.getTime();
w=780;
h=550;
var winl = (screen.width-w)/2;
var wint = (screen.height-h)/2;
settings ='top='+wint+',';
settings +='left='+winl+',';
settings +='scrollbars=no,';
settings +='resizable=0';
eval("page" + id + " = window.open(URL, '" + id + "','width=780,height=550,"+settings+"');");
}

function open_secret(lng,page,path){
	if(typeof(path) == 'undefined')
		path	=	'../';
	
	// Section language
	if(lng!='en' && lng!='fr')
	lng	=	'fr';
	
	// Ouvrir la page du secret ==============================================
	// =======================================================================
	if (page == 'secret')
	{
		// Section language
		pagetitle = 'Le secret de l\'eau d\'&eacute;rable';
		closealt = 'Fermer';
		if (lng == 'en') {
			pagetitle = 'The secret of maple sap';
			closealt = 'Close';
		}
		
		// Section tilte HTML
		pagetitle = '<div id="title_txt">' + pagetitle + '</div>';
		pagetitle += '<div id="btn_close"><a href="javascript:void(0);" onclick="javascript:Shadowbox.close();"><img src="'+path+'Scripts/shadowbox/src/skin/default/icons/close.gif" alt="' + closealt + '" title="' + closealt + '" style="border:none"/></a></div>';
	
		content	=	path+lng+'/secret.html';
		margin	=	10;
		sb_h	=	490;
		sb_w	=	540;
	}
	
	
	// Ouvrir la page du conte ==============================================
	// =======================================================================
	else
	{
		// Section language
		pagetitle = 'Un conte de No&euml;l';
		closealt = 'Fermer';
		
		// Section tilte HTML
		pagetitle = '<div id="title_txt">' + pagetitle + '</div>';
		pagetitle += '<div id="btn_close"><a href="javascript:void(0);" onclick="javascript:Shadowbox.close();"><img src="Scripts/shadowbox/src/skin/default/icons/close.gif" alt="' + closealt + '" title="' + closealt + '" style="border:none"/></a></div>';
		
		content	=	lng+'/conte.html';
		margin	=	30;
		sb_h	=	490;
		sb_w	=	600;
	}
	
	Shadowbox.open({
		player: 	'iframe',
		content: 	content,
		height: 	sb_h,
		width:		sb_w,
		title:		pagetitle,
		options:	{
			top_pos:		margin
		}
	});
}