

function flash(tag) {
  document.write(tag);
} 



function SysFormTouch() {
	SSFIV('SYS_FORM_UPDATE_SENSOR', 1) ;
}

		

function SFT() {
	SysFormTouch() ;
}

		

function SysFormTestSubmit(arg_list) {
	var undefined ;

	if (GSFIV('SYS_FORM_UPDATE_SENSOR')) {
		if (confirm("Attention !\nVous n'avez pas enregistré vos dernières modifications.\nEtes-vous sûr de vouloir interrompre l'opération en cours ?")) {
			SysUpdateHtmlAreas() ;
			if (arg_list['target'] !== undefined)	{
				document.forms['SYS_FORM'].target = arg_list['target'] ;
			}
			else {
				document.forms['SYS_FORM'].target = '_self' ;
			}
			if (arg_list['sfop'] !== undefined)	{
				SSFO(arg_list['sfop']) ;
			}
			if (arg_list['sfarg'] !== undefined)	{
				SSFA(arg_list['sfarg']) ;
			}
			if (arg_list['sfarg2'] !== undefined)	{
				SSFA2(arg_list['sfarg2']) ;
			}
			if (arg_list['sfarg3'] !== undefined)	{
				SSFA3(arg_list['sfarg3']) ;
			}
			if (arg_list['sfarg4'] !== undefined)	{
				SSFA4(arg_list['sfarg4']) ;
			}
			if (arg_list['sfarg5'] !== undefined)	{
				SSFA5(arg_list['sfarg5']) ;
			}
			document.forms['SYS_FORM'].submit() ;
		}
	}
	else {
		SysUpdateHtmlAreas() ;
		if (arg_list['target'] !== undefined)	{
			document.forms['SYS_FORM'].target = arg_list['target'] ;
		}
		else {
			document.forms['SYS_FORM'].target = '_self' ;
		}
		if (arg_list['sfop'] !== undefined)	{
			SSFO(arg_list['sfop']) ;
		}
		if (arg_list['sfarg'] !== undefined)	{
			SSFA(arg_list['sfarg']) ;
		}
		if (arg_list['sfarg2'] !== undefined)	{
			SSFA2(arg_list['sfarg2']) ;
		}
		if (arg_list['sfarg3'] !== undefined)	{
			SSFA3(arg_list['sfarg3']) ;
		}
		if (arg_list['sfarg4'] !== undefined)	{
			SSFA4(arg_list['sfarg4']) ;
		}
		if (arg_list['sfarg5'] !== undefined)	{
			SSFA5(arg_list['sfarg5']) ;
		}
		document.forms['SYS_FORM'].submit() ;
	}
}


function SFTS(arg_list) {
	SysFormTestSubmit(arg_list) ;
}


// certainement obsolète (à vérifier)
// =====================

function modif() {
	MODIF = 1 ;
//			alert('modif !') ;
}

		
function testandgo(url) {
	if (MODIF) {
		if (confirm("Attention !\nVous n'avez pas enregistré vos dernières modifications !\nEtes-vous sûr de vouloir quitter cette page sans enregistrer ?")) {
			document.forms['SYS_FORM'].action = url ;
			document.forms['SYS_FORM'].submit() ;
			document.forms['SYS_FORM'].target='_self';
			document.forms['SYS_FORM'].op.value='';
		}
	}
	else {
			document.forms['SYS_FORM'].action = url ;
			document.forms['SYS_FORM'].submit() ;
			document.forms['SYS_FORM'].target='_self';
			document.forms['SYS_FORM'].op.value='';
	}
}
	


function chop(valeur) {
	document.forms['SYS_FORM'].op.value = valeur ;
}


function setfv(field, valeur) {
//	alert(field+' : '+valeur) ;
	document.forms['SYS_FORM'][field].value = valeur ;
}

// fin de certainement obsolète
// ============================



function selectRadio(inputName, radioValue) {
	radios = document.forms['SYS_FORM'][inputName] ;
	var i = 0 ;
	do {
		if (radios[i].value == radioValue) {
			radios[i].checked = true ;
			break ;
		}
	} while (++i < radios.length) ;
}


function selectCheckbox(inputName, cbValue, dontCheckDisabled) {
	checkboxes = document.forms['SYS_FORM'][inputName] ;
	var i = 0 ;
	do {
		if (checkboxes[i].value == cbValue) {
			if (! dontCheckDisabled) {
				checkboxes[i].checked = true ;
			}
			else if (! checkboxes[i].disabled) {
				checkboxes[i].checked = true ;
			}
			break ;
		}
	} while (++i < checkboxes.length) ;
}


function unselectCheckbox(inputName, cbValue) {
	checkboxes = document.forms['SYS_FORM'][inputName] ;
	var i = 0 ;
	do {
		if (checkboxes[i].value == cbValue) {
			checkboxes[i].checked = false ;
			break ;
		}
	} while (++i < checkboxes.length) ;
}


function selectOption(inputName, optionValue) {
	optionList = document.forms['SYS_FORM'][inputName] ;
	var i = 0 ;
	do {
		if (optionList[i].value == optionValue) {
			optionList[i].selected = true ;
			break ;
		}
	} while (++i < optionList.length) ;
}


function unselectAll(inputName) {
	optionList = document.forms['SYS_FORM'][inputName] ;
	var i = 0 ;
	do {
		optionList[i].selected = false ;
	} while (++i < optionList.length) ;
}


function getSelectedOption(inputName) {
	optionList = document.forms['SYS_FORM'][inputName] ;
	var i = 0 ;
	do {
		if (optionList[i].selected) {
			break ;
		}
	} while (++i < optionList.length) ;
	return (i < optionList.length) ? optionList[i].value : '' ;
}


function getOLSelectedOption(optionList) {
	var i = 0 ;
	do {
		if (optionList[i].selected) {
			break ;
		}
	} while (++i < optionList.length) ;
	return (i < optionList.length) ? optionList[i].value : '' ;
}


function getSelectedOptionTitle(inputName) {
	optionList = document.forms['SYS_FORM'][inputName] ;
	var i = 0 ;
	do {
		if (optionList[i].selected) {
			break ;
		}
	} while (++i < optionList.length) ;
	return (i < optionList.length) ? optionList[i].text : '' ;
}


function getSelectedOptionIndex(inputName) {
	optionList = document.forms['SYS_FORM'][inputName] ;
	var i = 0 ;
	do {
		if (optionList[i].selected) {
			break ;
		}
	} while (++i < optionList.length) ;
	return (i < optionList.length) ? i : -1 ;
}


function getInputValue(inputName) {
	return document.forms['SYS_FORM'][inputName].value ;
}


function setInputValue(inputName, value) {
	document.forms['SYS_FORM'][inputName].value = value ;
}


function neapopup(url, nom, params, largeur, hauteur) {
	
	w = window.open(url, nom, params+',width='+largeur+',height='+hauteur+',top='+((screen.height-hauteur)/2)+',left='+((screen.width-largeur)/2)) ;
	w.focus() ;

}



function SetSysFormOp(value) {
	document.forms['SYS_FORM'].SFOP.value = value ;
}

function SSFO(value) {
	SetSysFormOp(value) ;
}



function GetSysFormOp() {
	return document.forms['SYS_FORM'].SFOP.value ;
}

function GSFO() {
	return GetSysFormOp() ;
}



function SetSysFormTarget(target) {
	document.forms['SYS_FORM'].target = target ;
}




function GetSysFormInputValue(name) {
	return getInputValue(name) ;
}

function GSFIV(name) {
	return getInputValue(name) ;
}



function SetSysFormInputValue(inputName, value) {
	setInputValue(inputName, value) ;
}

function SSFIV(inputName, value) {
	setInputValue(inputName, value) ;
}



function SetSysFormArg(value) {
	document.forms['SYS_FORM'].SFARG.value = value ;
}

function SSFA(value) {
	SetSysFormArg(value) ;
}



function SetSysFormArg2(value) {
	document.forms['SYS_FORM'].SFARG2.value = value ;
}

function SSFA2(value) {
	SetSysFormArg2(value) ;
}



function SetSysFormArg3(value) {
	document.forms['SYS_FORM'].SFARG3.value = value ;
}

function SSFA3(value) {
	SetSysFormArg3(value) ;
}




function SetSysFormArg4(value) {
	document.forms['SYS_FORM'].SFARG4.value = value ;
}

function SSFA4(value) {
	SetSysFormArg4(value) ;
}




function SetSysFormArg5(value) {
	document.forms['SYS_FORM'].SFARG5.value = value ;
}

function SSFA5(value) {
	SetSysFormArg5(value) ;
}




function SetSysFormAction(value) {
	document.forms['SYS_FORM'].action = value ;
}

function SSFAction(value) {
	SetSysFormAction(value) ;
}
function SSFX(value) {
	SetSysFormAction(value) ;
}




function GetSysFormAction() {
	return document.forms['SYS_FORM'].action ;
}

function GSFAction() {
	return GetSysFormAction() ;
}



function SysFormSubmit(target, testInput) {

	SysUpdateHtmlAreas() ;
	if (target)	{
		document.forms['SYS_FORM'].target = target ;
	}
	else {
		document.forms['SYS_FORM'].target = '_self' ;
	}
//	alert(document.forms['SYS_FORM'].target) ;

	var undefined ;
	if (testInput !== undefined) {
		if (GSFIV(testInput)) {
			if (confirm("Attention !\nVous n'avez pas enregistré vos dernières modifications !\nEtes-vous sûr de vouloir quitter cette page sans enregistrer ?")) {
				document.forms['SYS_FORM'].submit() ;
			}
		}
	}
	else {
		document.forms['SYS_FORM'].submit() ;
	}
}



function SFS(target, testInput) {
	SysFormSubmit(target, testInput) ;
}



function SysFormReset() {
	document.forms['SYS_FORM'].reset() ;
}



// gestion des HTMLAreas

var SysEditorIdList		= new Array() ;
var SysEditorList		= new Array() ;
var SysEditorStyleList	= new Array() ;
var SysEditorWidthList	= new Array() ;
var SysEditorHeightList	= new Array() ;


function SysOnLoad() {

	for (var i in SysEditorIdList) {

		SysEditorList[i] = new HTMLArea(SysEditorIdList[i]) ;

		var cfg = SysEditorList[i].config ;
		cfg.pageStyle = SysEditorStyleList[i] ;
		if (SysEditorWidthList.length)	{
			cfg.width = SysEditorWidthList[i] ;
		}
		if (SysEditorHeightList.length)	{
			cfg.height = SysEditorHeightList[i] ;
		}
//		"separator",
		cfg.toolbar = [
                [
                 "formatblock", "space",
                  "bold", "italic", 
                 "justifyleft", "justifycenter", "justifyright", "justifyfull", "space",
                  "insertorderedlist", "insertunorderedlist", "space", /*"outdent", "indent", 
                  "textindicator", */ 
                  "createlink", "htmlmode"]
                ];
//                  "forecolor", "hilitecolor", "textindicator", "separator",

		SysEditorList[i].generate() ;

//		alert(SysEditorList[i]._doc) ;

	}

}



function SysUpdateHtmlAreas() {

	var undefined ;

	for (var i in SysEditorList) { 
		if (SysEditorList[i].getHTML !== undefined)
		{
			SysEditorList[i]._textArea.value = SysEditorList[i].getHTML() ;
		}
	}
}


// lors d'un changement dû à un déplacement par glisser-déposer
function resetCCCHStatus() {
	var undefined ;

	inputList = document.getElementsByTagName('input') ;
	for (var i in inputList) {
		input	= inputList[i] ;
		name	= input.name ;
		if (name !== undefined)	{
			if (name.substr(0, 23) == 'l_CmsContentCmsHeading_') {
				end = name.substr(name.length-7, 7) ;
				if (end == '_status') {
	//				alert(name) ;
					nname = name.replace(/^l_/, 'c_') ;
	//				alert(name) ;
					if (document.forms['SYS_FORM'][nname] !== undefined) {
						if (GSFIV(name) == 'cms_content_cms_heading_status_disabled') {
							document.forms['SYS_FORM'][nname].checked = false ;
		//					alert(nname) ;
						}
						else {
							document.forms['SYS_FORM'][nname].checked = true ;
						}
					}
				}
			}
		}
/*		if ((name.substr(0, 23) == 'l_CmsContentCmsHeading_') && (name.substr(-7, 7) == '_status')) {
			alert(name) ;
		}*/
	}
/*
	if (GSFIV(\'l_CmsContentCmsHeading_1835_2613_status\') == \'cms_content_cms_heading_status_disabled\') {
		document.forms[\'SYS_FORM\'][\'c_CmsContentCmsHeading_1835_2613_status\'].checked = false ;
	}
	else {
		document.forms[\'SYS_FORM\'][\'c_CmsContentCmsHeading_1835_2613_status\'].checked = true ;
	}*/
}




// ==========
// tests navigateurs
// ==========


function IsIE() {

	var agt=navigator.userAgent.toLowerCase() ;

	return (agt.indexOf("msie")!=-1) ? 1 : 0 ;
}


function IsFX() {

	var agt=navigator.userAgent.toLowerCase() ;

	return (agt.indexOf("firefox")!=-1) ? 1 : 0 ;
}




// ==========
// SLIDESHOWS
// ==========


// Set slideShowSpeed (milliseconds)
var slideShowSpeed = new Array() ;

// Duration of crossfade (seconds)
var crossFadeDuration = new Array() ;

// Specify the image files
var preLoad = new Array() ;

// Url list
var urlList = new Array() ;

// Label list
var labelList = new Array() ;

// Counter
var counter = new Array() ;


function InitSlideShow(name, speed, duration, photo_list, url_list, label_list) {
	preLoad[name] = new Array() ;
	urlList[name] = new Array() ;
	labelList[name] = new Array() ;
	for (i = 0 ; i < photo_list.length ; i++) {
		preLoad[name][i]		= new Image() ;
		preLoad[name][i].src	= photo_list[i] ;
		urlList[name][i]		= url_list[i] ;
		labelList[name][i]		= label_list[i] ;
	}
	slideShowSpeed[name]	= speed ;	
	crossFadeDuration[name] = duration ;
	counter[name] = 0 ;
}


function GoSlideShow(name) {
	if (counter[name] > 0)	{
		document.location = urlList[name][counter[name]-1] ;
	}
	else {
		document.location = urlList[name][urlList[name].length - 1] ;
	}
}


function RunSlideShow(name) {


	if (document.all) {
		// IE
		document.images[name].style.filter = "blendTrans(duration=" + crossFadeDuration[name] + ")" ;
		document.images[name].filters.blendTrans.Apply() ;
		document.all.tags('span')[name].innerHTML = '<span>' + labelList[name][counter[name]] + '</span>' ;
	}
	else {
		document.getElementById(name).innerHTML = labelList[name][counter[name]] ;
	}

	document.images[name].src = preLoad[name][counter[name]].src ;

	if (document.all) {
		// IE
		document.images[name].filters.blendTrans.Play() ;
	}

	counter[name]++ ;
	if (counter[name] > preLoad[name].length-1) {
		counter[name] = 0 ;
	}
	setTimeout("RunSlideShow('" + name + "')", slideShowSpeed[name]) ;
}




// UrlEncode


function UrlEncode(str, removeAccents) {
	var result = "";

	for (i = 0; i < str.length; i++) {
		if (str.charAt(i) == " ") result += "+";
		else if (removeAccents) {
			if ((str.charAt(i) == "ê") || (str.charAt(i) == "é") || (str.charAt(i) == "è") || (str.charAt(i) == "ë")) {
				result += "e" ;
			}
			else if ((str.charAt(i) == "â") || (str.charAt(i) == "à") || (str.charAt(i) == "ä")) {
				result += "a" ;
			}
			else if ((str.charAt(i) == "î") || (str.charAt(i) == "ï")) {
				result += "i" ;
			}
			else if ((str.charAt(i) == "ô") || (str.charAt(i) == "ö")) {
				result += "o" ;
			}
			else if ((str.charAt(i) == "û") || (str.charAt(i) == "ù") || (str.charAt(i) == "ü")) {
				result += "u" ;
			}
			else if ((str.charAt(i) == "ç")) {
				result += "c" ;
			}
			else {
				result += str.charAt(i);
			}
		}
		else {
			result += str.charAt(i);
		}
		
	}

	return escape(result);
}



// trucs pour faire fonctionner l'affichage des embed flash sans les messages nauséabonds...
// -----------------------------------------------------------------------------------------

/**
	Frédéric Saunier
	http://www.tekool.net/javascript/backtothehtml

	This program is part of a free software; you can redistribute it and/or
	modify it under the terms of the GNU General Public License
	as published by the Free Software Foundation; either version 2
	of the License, or (at your option) any later version.

	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with this program; if not, write to the Free Software
	Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

**/

/*
function BackToTheHtml(node)
{
	if(node == null)
		this.node = document; 
	else
		this.node = node; 
};
BackToTheHtml.prototype.node = null;

BackToTheHtml.prototype.execute = function()
{
	this.activateObject();
}

BackToTheHtml.prototype.activateObject = function(domObject)
{
	var aDomObject = this.node.getElementsByTagName('object');
	var activationObject;
	for(var i=0; i<aDomObject.length; i++)
		if
		(
			aDomObject[i].getAttributeNode('BackToTheHtml') == null
			&&
			(activationObject = this.getActivationObject(aDomObject[i])) != null
		)
			activationObject.execute();
};

BackToTheHtml.prototype.getActivationObject = function(domObject)
{
	var classid = domObject.classid.toUpperCase().substr('clsid:'.length);
	var mimeType = domObject.type.toLowerCase();

	switch(true)
	{
		case 
			classid == 'D27CDB6E-AE6D-11CF-96B8-444553540000' 
			||
			mimeType == 'application/x-shockwave-flash'
		:
			return new ActivateObjectFlash(domObject);

		default :
			return null;
	}
};

BackToTheHtml.uniqueID = function(prefix)
{
	var sPrefix;
	if(prefix == null)
		sPrefix = 'uniqueId';
	else
		sPrefix = prefix;
		
	var i=0;
	while(document.getElementById(sPrefix + (i++)))
		;
	return sPrefix + (i-1);
};

BackToTheHtml.isParentOf = function(parent,child)
{
	var found = false;
	for(var i=0; i<parent.childNodes.length; i++)
		if(parent.childNodes[i] == child)
			return true;
		else
			found = arguments.callee(parent.childNodes[i],child);

	return found;
}

function ActivateObject(domObject)
{
	this.domObject = domObject;
}

ActivateObject.prototype.domObject = null;
ActivateObject.prototype.classid = null;
ActivateObject.prototype.aHtmlAttribute = ['accessKey','align','alt','archive','border','code','codeBase','codeType','declare','dir','height','hideFocus','hspace','lang','language','name','standby','tabIndex','title','useMap','vspace','width', 'flashvars'];
ActivateObject.prototype.aObjectProperty = null;

ActivateObject.prototype.execute = function()
{
	this.xndObjectId = BackToTheHtml.uniqueID();
	this.setTextHtml();
	this.writeObject();

	this.xndObject = document.getElementById(this.xndObjectId);
	this.setSpecialProperties();
	this.removeOriginalObject();
}

ActivateObject.prototype.setTextHtml = function()
{
	var str = '';
	str += '<object BackToTheHtml ' + '\n';
	str += ' classid="clsid:' + this.classid + '" ' + '\n';

	//Add HTML attributes to the <object> tag
	for(var i=0; i<this.aHtmlAttribute.length; i++)
	{
		var name = this.aHtmlAttribute[i];
		if(typeof this.domObject[name] != 'undefined' && this.domObject[name].toString() != '')
			str += '\t' + name + '="' + this.domObject[name].toString() + '" ' + '\n';
	}

	str += 'id="' + this.xndObjectId + '" ' + '\n';
	str += '>';

	for(var i=0; i<this.aObjectProperty.length; i++)
	{
		var name = this.aObjectProperty[i];
		if(typeof this.domObject[name] != 'undefined' && this.domObject[name].toString() != '' )
			str += '\t<param name="' + name + '" value="' + this.domObject[name].toString() + '"></param>' + '\n';
	}
	str += '</object>';

//	alert(str) ;

	this.textHtml = str;
};

ActivateObject.prototype.writeObject = function()
{
	this.domObject.insertAdjacentHTML("afterEnd",this.textHtml);
};

ActivateObject.prototype.setSpecialProperties = function()
{
	if(typeof this.domObject.className != 'undefined' && this.domObject.className.toString() != '')
		this.xndObject.className = this.domObject.className

	if(typeof this.domObject.style.cssText != 'undefined' && this.domObject.style.cssText.toString() != '')
		this.xndObject.style.cssText = this.domObject.style.cssText;

	if(typeof this.domObject.SWRemote != 'undefined' && this.domObject.SWRemote.toString() != '')
		this.xndObject.FlashVars = this.domObject.SWRemote;

	if(typeof this.domObject.codebase == 'undefined' || this.domObject.codebase.toString() == '')
		this.xndObject.codebase = 'http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,24,0';

	if(typeof this.domObject.id != 'undefined' && this.domObject.id.toString() != '')
		this.xndObject.id = this.domObject.id;

};

ActivateObject.prototype.removeOriginalObject = function()
{
	this.domObject.parentNode.removeChild(this.domObject);
};

function ActivateObjectFlash(domObject)
{
	ActivateObject.call(this,domObject);
}
ActivateObjectFlash.prototype = new ActivateObject;
ActivateObjectFlash.prototype.aObjectProperty = ['FrameNum','Playing','Quality','Quality2','Scalemode','Scale','AlignMode','SAlign','BackgroundColor','BGColor','Loop','Movie','WMode','Base','DeviceFont','EmbedMovie','SWRemote','FlashVars','AllowScriptAccess'];
ActivateObjectFlash.prototype.classid = 'D27CDB6E-AE6D-11CF-96B8-444553540000';


if(typeof ActiveXObject != 'undefined' && typeof Function.call != 'undefined')
{
	var styleId = BackToTheHtml.uniqueID();
	document.write('<style id="' + styleId + '" ></style>');
	var domStyle = document.getElementById(styleId);

	var isHead = false;
	var aHead = document.getElementsByTagName('head');
	for(var i=0; i<aHead.length; i++)
		if(BackToTheHtml.isParentOf(aHead[i],domStyle))
			isHead = true;

	if(isHead)
	{
//		document.write('<style type="text/css">OBJECT{visibility:hidden;}</style>');
		document.write('<style type="text/css">OBJECT{visibility:visible;}</style>');
		document.onreadystatechange = function()
		{
			if(document.readyState == 'complete')
			{
				new BackToTheHtml().execute();
				document.styleSheets[document.styleSheets.length-1].addRule("OBJECT","visibility:visible;");
				//alert('head');
				//alert(document.body.innerHTML);
			}
		}
	}
	else
	{
		new BackToTheHtml().execute();
		//alert('body');
		//alert(document.body.innerHTML);
	}
	
	domStyle.parentNode.removeChild(domStyle);
}

*/






/* xMenu1 Object Prototype

	Parameters:
		triggerId   - id string of trigger element.
		menuId      - id string of menu.
		mouseMargin - integer margin around menu;
									when mouse is outside this margin the menu is hid.
		openEvent   - string name of event on which to open menu ('click', 'mouseover', etc).
*/

function xMenu1(triggerId, menuId, mouseMargin, openEvent)
{
	var isOpen = false;
	var trg = xGetElementById(triggerId);
	var mnu = xGetElementById(menuId);
	if (trg && mnu) {
		xAddEventListener(trg, openEvent, onOpen, false);
	}
	function onOpen()
	{
		if (!isOpen) {
			xMoveTo(mnu, xPageX(trg)-(xWidth(mnu)-16), xPageY(trg) + xHeight(trg));
			xShow(mnu);
			xAddEventListener(document, 'mousemove', onMousemove, false);
			isOpen = true;
		}
	}
	function onMousemove(ev)
	{
		var e = new xEvent(ev);
		if (!xHasPoint(mnu, e.pageX, e.pageY, -mouseMargin) &&
				!xHasPoint(trg, e.pageX, e.pageY, -mouseMargin))
		{
			xHide(mnu);
			xRemoveEventListener(document, 'mousemove', onMousemove, false);
			isOpen = false;
		}
	}
} // end xMenu1


/* xMenu1A Object Prototype

	Parameters:
		triggerId   - id string of trigger element.
		menuId      - id string of menu.
		mouseMargin - integer margin around menu;
									when mouse is outside this margin the menu is hid.
		slideTime   - integer time for menu slide (in milliseconds).
		openEvent   - string name of event on which to open menu ('click', 'mouseover', etc).
*/

function xMenu1A(triggerId, menuId, mouseMargin, slideTime, openEvent, onOpenExtraJS)
{
	var undefined ;

	var isOpen = false;
	var trg = xGetElementById(triggerId);
	var mnu = xGetElementById(menuId);
	var xUA=navigator.userAgent.toLowerCase() ;
	var v=parseFloat(navigator.appVersion);

	var oo_extra = onOpenExtraJS ;

	if (trg && mnu) {
		xHide(mnu);
		xAddEventListener(trg, openEvent, onOpen, false);
	}
	function onOpen()
	{
		if (!isOpen) {
//			alert(xUA + ' §§§§§§§§§§ ' + v) ;

			xm = xPageX(trg)-16 ;
//			alert((xm + xWidth(mnu)) + ' / ' + xClientWidth()) ;
			if (xm + xWidth(mnu) > xClientWidth()) {
				xm = xClientWidth() - xWidth(mnu) ;
			}

			ym = ((xUA.indexOf('msie')!=-1) && (xUA.indexOf('msie 7')==-1) && (xUA.indexOf('msie 8')==-1)) ? (window.event.clientY + document.body.scrollTop - 16) : xPageY(trg) - 16 ;
/*			if ((ym - document.body.scrollTop) + xHeight(mnu) > xClientHeight()) {
				alert(ym + ' / ' + xClientHeight()) ;
				ym = (xClientHeight() + - document.body.scrollTop) - xHeight(mnu) ;
			}*/

			if ((xUA.indexOf('msie')!=-1) && (xUA.indexOf('msie 7')==-1) && (xUA.indexOf('msie 8')==-1)) {
//				alert('Open ' + xPageY(trg) + ' ' + xHeight(trg) + ' ' + window.event.clientY + ' ' + document.body.scrollTop) ;
				xMoveTo(mnu, xm, ym);
				xShow(mnu);
				xAddEventListener(document, 'mousemove', onMousemoveIE, false);
			}
			else {
//				xMoveTo(mnu, xPageX(trg)+24, xPageY(trg));
				xMoveTo(mnu, xm, ym);
				xShow(mnu);
//				xSlideTo(mnu, xPageX(trg)+24, xPageY(trg) + xHeight(trg), slideTime);
//				xSlideTo(mnu, xm, xPageY(trg) + xHeight(trg) - 24, slideTime);
				xAddEventListener(document, 'mousemove', onMousemove, false);
			}
//			xAddEventListener(document, 'mousemove', onMousemoveIE, false);
			isOpen = true;
			if (oo_extra) {
				eval(oo_extra) ;
			}
		}
	}
	function onMouseout(ev) {
				xRemoveEventListener(document, 'mouseout', onMouseout, false);
				xHide(mnu) ;
				isOpen = false;

	}
	function onMousemove(ev)
	{
		var e = new xEvent(ev);
		if (!xHasPoint(mnu, e.pageX, e.pageY, -mouseMargin) &&
				!xHasPoint(trg, e.pageX, e.pageY, -mouseMargin))
		{
/*			alert(e.pageX + ' : ' + e.pageY) ;*/
			xRemoveEventListener(document, 'mousemove', onMousemove, false);
//			xSlideTo(mnu, xPageX(trg), xPageY(trg), slideTime);
			setTimeout("xHide('" + menuId + "')", slideTime);
			isOpen = false;
		}
	}
	function onMousemoveIE(ev)
	{
		var e = new xEvent(ev);
		var scroll_top ;

		if (! ((e.pageX >= xPageX(mnu)) && (e.pageX < xPageX(mnu)+xWidth(mnu)) && (e.pageY >= xPageY(mnu)) && (e.pageY < xPageY(mnu)+xHeight(mnu))))
		{
/*		alert(e.pageX + ' / ' + xPageX(mnu) + ' - ' + (xPageX(mnu)*1+xWidth(mnu)*1)) ;
		alert(e.pageY + ' / ' + xPageY(mnu) + ' - ' + (xPageY(mnu)*1+xHeight(mnu)*1)) ;*/

				xRemoveEventListener(document, 'mousemove', onMousemoveIE, false);
//				xHide(mnu) ;
			setTimeout("xHide('" + menuId + "')", slideTime);
				isOpen = false;
		}
	}
} // end xMenu1A



/* xMenu1C Object Prototype : menu pour le module contact

	Parameters:
		triggerId   - id string of trigger element.
		menuId      - id string of menu.
		mouseMargin - integer margin around menu;
									when mouse is outside this margin the menu is hid.
		slideTime   - integer time for menu slide (in milliseconds).
		openEvent   - string name of event on which to open menu ('click', 'mouseover', etc).
*/

function xMenu1C(triggerId, menuId, mouseMargin, slideTime, openEvent, containerId)
{
	var isOpen = false;
	var trg = xGetElementById(triggerId);
	var mnu = xGetElementById(menuId);
	var xUA=navigator.userAgent.toLowerCase() ;
	var v=parseFloat(navigator.appVersion);
	var containerId = containerId;

	if (trg && mnu) {
		xHide(mnu);
		xAddEventListener(trg, openEvent, onOpen, false);
	}
	function onOpen()
	{
		if (!isOpen) {

			if (containerId) {
				scroll_top = xGetElementById(containerId).scrollTop ;
			}

//			alert(xUA + ' §§§§§§§§§§ ' + v) ;
			if ((xUA.indexOf('msie')!=-1) && (xUA.indexOf('msie 7.0')==-1)) {
//				alert('Open ' + xPageY(trg) + ' ' + xHeight(trg) + ' ' + window.event.clientY + ' ' + document.body.scrollTop) ;
				xMoveTo(mnu, xPageX(trg)-8, window.event.clientY + document.body.scrollTop - 8);
				xShow(mnu);
//				xAddEventListener(document, 'mousemove', onMousemoveIE, false);
			}
			else {
//				xMoveTo(mnu, xPageX(trg)+24, xPageY(trg));
				xMoveTo(mnu, xPageX(trg)-8, xPageY(trg) - (scroll_top + 8));
				xShow(mnu);
//				xSlideTo(mnu, xPageX(trg)+24, xPageY(trg) + xHeight(trg), slideTime);
				xSlideTo(mnu, xPageX(trg)-8, xPageY(trg) + xHeight(trg) - (scroll_top + 24), slideTime);
//				xAddEventListener(document, 'mousemove', onMousemove, false);
			}
			xAddEventListener(document, 'mousemove', onMousemoveIE, false);
			isOpen = true;
		}
	}
	function onMouseout(ev) {
				xRemoveEventListener(document, 'mouseout', onMouseout, false);
				xHide(mnu) ;
				isOpen = false;

	}
	function onMousemove(ev)
	{
		var e = new xEvent(ev);
		if (!xHasPoint(mnu, e.pageX, e.pageY, -mouseMargin) &&
				!xHasPoint(trg, e.pageX, e.pageY, -mouseMargin))
		{
/*			alert(e.pageX + ' : ' + e.pageY) ;*/
			xRemoveEventListener(document, 'mousemove', onMousemove, false);
			xSlideTo(mnu, xPageX(trg), xPageY(trg), slideTime);
			setTimeout("xHide('" + menuId + "')", slideTime);
			isOpen = false;
		}
	}
	function onMousemoveIE(ev)
	{
		var e = new xEvent(ev);
		var scroll_top ;
		if (containerId) {
			scroll_top = xGetElementById(containerId).scrollTop ;
		}
//		alert(e.pageY + ' ' + xPageY(mnu) + ' ' + xHeight(mnu)) ;
		if (! ((e.pageX >= xPageX(mnu)) && (e.pageX < xPageX(mnu)+xWidth(mnu)) && (e.pageY >= xPageY(mnu)) && (e.pageY < xPageY(mnu)+xHeight(mnu))))
//		if (! ((e.pageY >= xPageY(mnu)) && (e.pageY < xPageY(mnu)+xHeight(mnu))))
		{
				xRemoveEventListener(document, 'mousemove', onMousemoveIE, false);
				xHide(mnu) ;
				isOpen = false;
		}
	}
} // end xMenu1C




/* mmpopup */
function mmneapopup(url, w, h) {
	return neapopup(url, 'mm'+w+'_'+h, 'toolbar=0, location=0, directories=0, status=0, scrollbars=1, resizable=0, copyhistory=0, menuBar=0', w, h) ;
}


/* EJS IMG FX */
function ejs_img_fx(img){	
	if(img && img.filters && img.filters[0]){
		img.filters[0].apply();
		img.filters[0].play();
	}
}






///

function ShowTargetSnapshotUrlEncode(str) {
	var result = "";

	for (i = 0; i < str.length; i++) {
		if (str.charAt(i) == " ") result += "+";
		else if ((str.charAt(i) == "ê") || (str.charAt(i) == "é") || (str.charAt(i) == "è") || (str.charAt(i) == "ë")) {
						result += "e" ;
		}
		else if ((str.charAt(i) == "â") || (str.charAt(i) == "à") || (str.charAt(i) == "ä")) {
						result += "a" ;
		}
		else if ((str.charAt(i) == "î") || (str.charAt(i) == "ï")) {
						result += "i" ;
		}
		else if ((str.charAt(i) == "ô") || (str.charAt(i) == "ö")) {
						result += "o" ;
		}
		else if ((str.charAt(i) == "û") || (str.charAt(i) == "ù") || (str.charAt(i) == "ü")) {
						result += "u" ;
		}
		else if ((str.charAt(i) == "ç")) {
						result += "c" ;
		}
		else {
						result += str.charAt(i);
		}
	}

	return escape(result);
}



var tstid ;

function ShowTargetSnapshot(url) {
	if (! GSFIV('NEA_TOOLBAR_ACTIVATION')) {
	//	xHide('target_snapshot_floater') ;
		xGetElementById('target_snapshot_floater').style.filter='Alpha(Opacity=0)';
		xGetElementById('target_snapshot_floater').style.MozOpacity=0; 
		document.images['target_snapshot_floater_image'].src = 'http://nea.aranea.fr/systeme/cms/get_thumbnail_content.php?ie_width=400&width=200&once=1&url=' + ShowTargetSnapshotUrlEncode(url) ;
		clearTimeout(tstid) ;
		tstid = setTimeout("ShowTargetSnapshotTimeout(0, 250, " + (window.event.clientX-240) + ", " + (window.event.clientY + document.documentElement.scrollTop - 20) + ")", 1250) ;
	//	tstid = setTimeout("HideTargetSnapshotTimeout(0, 250, " + (window.event.clientX-240) + ", " + (window.event.clientY + document.documentElement.scrollTop - 20) + ")", 2000) ;
	}
}

function STS(url) {
	ShowTargetSnapshot(url) ;
}

function ShowTargetSnapshotTimeout(t, max, x, y) {
	xGetElementById('target_snapshot_floater').style.filter='Alpha(Opacity=' + (t/max)*95 + ')';
	xGetElementById('target_snapshot_floater').style.MozOpacity=(t/max)*0.95; 
	if (t == 0)	{
		height = xHeight(target_snapshot_floater_image) ;
		y = y - height*0.5 ;
		y = (y < 10) ? 10 : y ;
		xMoveTo('target_snapshot_floater', x, y);
		xShow('target_snapshot_floater') ;
	}
	if (t < max) {
		t += 25 ;
		tstid = setTimeout("ShowTargetSnapshotTimeout(" + t + ", " + max + ", " + x + ", " + y + ")", 25) ;
	}
}


function HideTargetSnapshot() {
	if (! GSFIV('NEA_TOOLBAR_ACTIVATION')) {
	//	xHide('target_snapshot_floater') ;
		xGetElementById('target_snapshot_floater').style.filter='Alpha(Opacity=0)';
		xGetElementById('target_snapshot_floater').style.MozOpacity=0; 
		clearTimeout(tstid) ;
	}
}

function HTS() {
	HideTargetSnapshot() ;
}



var ztid ;

function ShowNeaZoomFloater(url,leftOffset,topOffset,alt) {
	var src = document.images['nea_zoom_floater_image'].src ;
	var width = document.images['nea_zoom_floater_image'].width ;
	var height = document.images['nea_zoom_floater_image'].height ;
	document.images['nea_zoom_floater_image'].src = '/systeme/cms/media/1.gif' ;
	var undefined ;
	if ((src !== undefined) && (width > 1)) {
		document.images['nea_zoom_floater_image'].width = width ;
	}
	if ((src !== undefined) && (height > 1)) {
		document.images['nea_zoom_floater_image'].height = height ;
	}
	if (! GSFIV('NEA_TOOLBAR_ACTIVATION')) {
	//	xHide('nea_zoom_floater') ;
//		xGetElementById('nea_zoom_floater').style.value=s;
		xGetElementById('nea_zoom_floater').style.filter='Alpha(Opacity=0)';
		xGetElementById('nea_zoom_floater').style.MozOpacity=0; 
		document.images['nea_zoom_floater_image'].src = url ;
		document.images['nea_zoom_floater_image'].alt = alt ;
		clearTimeout(ztid) ;
		ztid = setTimeout("ShowNeaZoomFloaterTimeout(0, 250, " + (window.event.clientX+leftOffset) + ", " + (window.event.clientY + document.documentElement.scrollTop + topOffset) + ")", 250) ;
	}
}

function ShowNeaZoomFloaterTimeout(t, max, x, y) {
	xGetElementById('nea_zoom_floater').style.filter='Alpha(Opacity=' + (t/max)*100 + ')';
	xGetElementById('nea_zoom_floater').style.MozOpacity=(t/max)*1.0; 
	if (t == 0)	{
		height = xHeight(nea_zoom_floater_image) ;
		y = y - height*0.5 ;
		y = (y < 10) ? 10 : y ;
		xMoveTo('nea_zoom_floater', x, y);
		xShow('nea_zoom_floater') ;
	}
	if (t < max) {
		t += 25 ;
		ztid = setTimeout("ShowNeaZoomFloaterTimeout(" + t + ", " + max + ", " + x + ", " + y + ")", 25) ;
	}
}


function HideNeaZoomFloater() {
	if (! GSFIV('NEA_TOOLBAR_ACTIVATION')) {
		xHide('nea_zoom_floater') ;
		document.images['nea_zoom_floater_image'].src = '/systeme/cms/media/1.gif' ;
		xGetElementById('nea_zoom_floater').style.filter='Alpha(Opacity=0)';
		xGetElementById('nea_zoom_floater').style.MozOpacity=0; 
		clearTimeout(ztid) ;
	}
}






function UpdateShadowPosition() {

	w = xClientWidth() ;

	if (document.documentElement.scrollHeight) {
		h = document.documentElement.scrollHeight ; // ie
	}
	else {
		h =  document.body.scrollHeight ; // ie 6
	}

	xGetElementById('NEA_TOOLBAR_SHADOW').style.height = h + 'px' ;
}


function ShowShadow() {

	UpdateShadowPosition() ;

	xShow(xGetElementById('NEA_TOOLBAR_SHADOW')) ;
}


function HideShadow() {

	xHide(xGetElementById('NEA_TOOLBAR_SHADOW')) ;
}





function WriteFlashTag(tag) {
  document.write(tag);
} 



/*

HTMLHttpRequest v1.0 beta3
(c) 2001-2006 Angus Turnbull, TwinHelix Designs http://www.twinhelix.com

Licensed under the CC-GNU LGPL, version 2.1 or later:
http://creativecommons.org/licenses/LGPL/2.1/
This is distributed WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

*/

if(typeof addEvent!='function'){var addEvent=function(o,t,f,l){var d='addEventListener',n='on'+t,rO=o,rT=t,rF=f,rL=l;if(o[d]&&!l)return o[d](t,f,false);if(!o._evts)o._evts={};if(!o._evts[t]){o._evts[t]=o[n]?{b:o[n]}:{};o[n]=new Function('e','var r=true,o=this,a=o._evts["'+t+'"],i;for(i in a){o._f=a[i];r=o._f(e||window.event)!=false&&r;o._f=null}return r');if(t!='unload')addEvent(window,'unload',function(){removeEvent(rO,rT,rF,rL)})}if(!f._i)f._i=addEvent._i++;o._evts[t][f._i]=f};addEvent._i=1;var removeEvent=function(o,t,f,l){var d='removeEventListener';if(o[d]&&!l)return o[d](t,f,false);if(o._evts&&o._evts[t]&&f._i)delete o._evts[t][f._i]}}function cancelEvent(e,c){e.returnValue=false;if(e.preventDefault)e.preventDefault();if(c){e.cancelBubble=true;if(e.stopPropagation)e.stopPropagation()}};function HTMLHttpRequest(myName,callback){with(this){this.myName=myName;this.callback=callback;this.xmlhttp=null;this.iframe=null;window._ifr_buf_count|=0;this.iframeID='iframebuffer'+window._ifr_buf_count++;this.loadingURI='';if(window.XMLHttpRequest&&!window.ActiveXObject)xmlhttp=new XMLHttpRequest();if(!xmlhttp){if(document.createElement&&document.documentElement&&(window.opera||navigator.userAgent.indexOf('MSIE 5.0')==-1)){var ifr=document.createElement('iframe');ifr.setAttribute('id',iframeID);ifr.setAttribute('name',iframeID);ifr.style.visibility='hidden';ifr.style.position='absolute';ifr.style.width=ifr.style.height=ifr.borderWidth='0px';iframe=document.getElementsByTagName('body')[0].appendChild(ifr)}else if(document.body&&document.body.insertAdjacentHTML){document.body.insertAdjacentHTML('beforeEnd','<iframe name="'+iframeID+'" id="'+iframeID+'" style="display:none"></iframe>')}if(window.frames&&window.frames[iframeID])iframe=window.frames[iframeID];iframe.name=iframeID}return this}};HTMLHttpRequest.prototype.parseForm=function(form){with(this){var str='',gE='getElementsByTagName',inputs=[(form[gE]?form[gE]('input'):form.all?form.all.tags('input'):[]),(form[gE]?form[gE]('select'):form.all?form.all.tags('select'):[]),(form[gE]?form[gE]('textarea'):form.all?form.all.tags('textarea'):[])];for(var i=0;i<inputs.length;i++)for(j=0;j<inputs[i].length;j++)if(inputs[i][j]){var plus='++'.substring(0,1);str+=escape(inputs[i][j].getAttribute('name')).replace(plus,'%2B')+'='+escape(inputs[i][j].value).replace(plus,'%2B')+'&'}return str.substring(0,str.length-1)}};HTMLHttpRequest.prototype.xmlhttpSend=function(uri,formStr){with(this){xmlhttp.open(formStr?'POST':'GET',uri,true);xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){if(callback)callback(xmlhttp.responseXML,xmlhttp.responseText,loadingURI);loadingURI=''}};if(formStr&&xmlhttp.setRequestHeader)xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded');if(xmlhttp.overrideMimeType)xmlhttp.overrideMimeType((/\.txt/i).test(uri)?'text/plain':'text/xml');xmlhttp.send(formStr);loadingURI=uri;return true}};HTMLHttpRequest.prototype.iframeSend=function(uri,formRef){with(this){if(!document.readyState)return false;if(document.getElementById)var o=document.getElementById(iframeID).offsetWidth;if(formRef)formRef.setAttribute('target',iframeID);else{var ifrDoc=iframe.contentDocument||iframe.document;if(!window.opera&&ifrDoc.location&&ifrDoc.location.href!=location.href)ifrDoc.location.replace(uri);else iframe.src=uri}loadingURI=uri;setTimeout(myName+'.iframeCheck()',(window.opera?250:100));return true}};HTMLHttpRequest.prototype.iframeCheck=function(){with(this){doc=iframe.contentDocument||iframe.document;var il=iframe.location,dr=doc.readyState;if((il&&il.href?il.href.match(loadingURI.replace("\?","\\?")):1)&&(dr=='complete'||(!document.getElementById&&dr=='interactive'))){var cbDoc=doc.documentElement||doc;if(callback)callback(cbDoc,(cbDoc.innerHTML||(cbDoc.body?cbDoc.body.innerHTML:'')),loadingURI);loadingURI=''}else setTimeout(myName+'.iframeCheck()',50)}};HTMLHttpRequest.prototype.load=function(uri){with(this){if(!uri||(!xmlhttp&&!iframe))return false;if(xmlhttp)return xmlhttpSend(uri,'');else if(iframe)return iframeSend(uri,null);else return false}};HTMLHttpRequest.prototype.submit=function(formRef,evt){with(this){evt=evt||window.event;if(!formRef||(!xmlhttp&&!iframe))return false;var method=formRef.getAttribute('method'),uri=formRef.getAttribute('action');if(method&&method.toLowerCase()=='post'){if(xmlhttp){cancelEvent(evt);return xmlhttpSend(uri,parseForm(formRef))}else if(iframe)return iframeSend(uri,formRef);else return false}else{cancelEvent(evt);return load(uri+(uri.indexOf('?')==-1?'?':'&')+parseForm(formRef))}}};function RemoteFileLoader(myName){this.myName=myName;this.threads=[];this.loadingIDs={};this.onload=null};RemoteFileLoader.prototype.getThread=function(destId){with(this){var thr=-1;for(var id in loadingIDs){if(id==destId){thr=loadingIDs[id];break}}if(thr==-1)for(var t=0;t<threads.length;t++){if(!threads[t].loadingURI){thr=t;break}}if(thr==-1){thr=threads.length;threads[thr]=new HTMLHttpRequest(myName+'.threads['+thr+']',null);loadingIDs[destId]=thr}threads[thr].callback=new Function('doc','text','uri','with('+myName+'){copyContent(doc,text,"'+destId+'");if(onload)onload(doc,uri,"'+destId+'")}');return threads[thr]}};RemoteFileLoader.prototype.loadInto=function(uri,destId){return this.getThread(destId).load(uri)};RemoteFileLoader.prototype.submitInto=function(formRef,destId,event){return this.getThread(destId).submit(formRef,event)};RemoteFileLoader.prototype.copyContent=function(docDOM,docText,destId){var src=docDOM?(docDOM.getElementsByTagName?docDOM.getElementsByTagName('body')[0]:(docDOM.body?docDOM.body:null)):null;var dest=document.getElementById?document.getElementById(destId):(document.all?document.all[destId]:null);if(!dest||(!src&&!docText))return;if(src&&src.innerHTML)dest.innerHTML=src.innerHTML;else if(src&&document.importNode){while(dest.firstChild)dest.removeChild(dest.firstChild);for(var i=0;i<src.childNodes.length;i++)dest.appendChild(document.importNode(src.childNodes.item(i),true))}else if(docText){if(docText.match(/(<body>)(.*)(<\/body>)/i))docText=RegExp.$2;dest.innerHTML=docText}};



/**
 * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */

if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;


/*	SWFObject v2.2 <http://code.google.com/p/swfobject/> 
	is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> 
*/

var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y<X;Y++){U[Y]()}}function K(X){if(J){X()}else{U[U.length]=X}}function s(Y){if(typeof O.addEventListener!=D){O.addEventListener("load",Y,false)}else{if(typeof j.addEventListener!=D){j.addEventListener("load",Y,false)}else{if(typeof O.attachEvent!=D){i(O,"onload",Y)}else{if(typeof O.onload=="function"){var X=O.onload;O.onload=function(){X();Y()}}else{O.onload=Y}}}}}function h(){if(T){V()}else{H()}}function V(){var X=j.getElementsByTagName("body")[0];var aa=C(r);aa.setAttribute("type",q);var Z=X.appendChild(aa);if(Z){var Y=0;(function(){if(typeof Z.GetVariable!=D){var ab=Z.GetVariable("$version");if(ab){ab=ab.split(" ")[1].split(",");M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}else{if(Y<10){Y++;setTimeout(arguments.callee,10);return}}X.removeChild(aa);Z=null;H()})()}else{H()}}function H(){var ag=o.length;if(ag>0){for(var af=0;af<ag;af++){var Y=o[af].id;var ab=o[af].callbackFn;var aa={success:false,id:Y};if(M.pv[0]>0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad<ac;ad++){if(X[ad].getAttribute("name").toLowerCase()!="movie"){ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value")}}P(ai,ah,Y,ab)}else{p(ae);if(ab){ab(aa)}}}}}else{w(Y,true);if(ab){var Z=z(Y);if(Z&&typeof Z.SetVariable!=D){aa.success=true;aa.ref=Z}ab(aa)}}}}}function z(aa){var X=null;var Y=c(aa);if(Y&&Y.nodeName=="OBJECT"){if(typeof Y.SetVariable!=D){X=Y}else{var Z=Y.getElementsByTagName(r)[0];if(Z){X=Z}}}return X}function A(){return !a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312)}function P(aa,ab,X,Z){a=true;E=Z||null;B={success:false,id:X};var ae=c(X);if(ae){if(ae.nodeName=="OBJECT"){l=g(ae);Q=null}else{l=ae;Q=X}aa.id=R;if(typeof aa.width==D||(!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)){aa.width="310"}if(typeof aa.height==D||(!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)){aa.height="137"}j.title=j.title.slice(0,47)+" - Flash Player Installation";var ad=M.ie&&M.win?"ActiveX":"PlugIn",ac="MMredirectURL="+O.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;if(typeof ab.flashvars!=D){ab.flashvars+="&"+ac}else{ab.flashvars=ac}if(M.ie&&M.win&&ae.readyState!=4){var Y=C("div");X+="SWFObjectNew";Y.setAttribute("id",X);ae.parentNode.insertBefore(Y,ae);ae.style.display="none";(function(){if(ae.readyState==4){ae.parentNode.removeChild(ae)}else{setTimeout(arguments.callee,10)}})()}u(aa,ab,X)}}function p(Y){if(M.ie&&M.win&&Y.readyState!=4){var X=C("div");Y.parentNode.insertBefore(X,Y);X.parentNode.replaceChild(g(Y),X);Y.style.display="none";(function(){if(Y.readyState==4){Y.parentNode.removeChild(Y)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.replaceChild(g(Y),Y)}}function g(ab){var aa=C("div");if(M.win&&M.ie){aa.innerHTML=ab.innerHTML}else{var Y=ab.getElementsByTagName(r)[0];if(Y){var ad=Y.childNodes;if(ad){var X=ad.length;for(var Z=0;Z<X;Z++){if(!(ad[Z].nodeType==1&&ad[Z].nodeName=="PARAM")&&!(ad[Z].nodeType==8)){aa.appendChild(ad[Z].cloneNode(true))}}}}}return aa}function u(ai,ag,Y){var X,aa=c(Y);if(M.wk&&M.wk<312){return X}if(aa){if(typeof ai.id==D){ai.id=Y}if(M.ie&&M.win){var ah="";for(var ae in ai){if(ai[ae]!=Object.prototype[ae]){if(ae.toLowerCase()=="data"){ag.movie=ai[ae]}else{if(ae.toLowerCase()=="styleclass"){ah+=' class="'+ai[ae]+'"'}else{if(ae.toLowerCase()!="classid"){ah+=" "+ae+'="'+ai[ae]+'"'}}}}}var af="";for(var ad in ag){if(ag[ad]!=Object.prototype[ad]){af+='<param name="'+ad+'" value="'+ag[ad]+'" />'}}aa.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ah+">"+af+"</object>";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab<ac;ab++){I[ab][0].detachEvent(I[ab][1],I[ab][2])}var Z=N.length;for(var aa=0;aa<Z;aa++){y(N[aa])}for(var Y in M){M[Y]=null}M=null;for(var X in swfobject){swfobject[X]=null}swfobject=null})}}();return{registerObject:function(ab,X,aa,Z){if(M.w3&&ab&&X){var Y={};Y.id=ab;Y.swfVersion=X;Y.expressInstall=aa;Y.callbackFn=Z;o[o.length]=Y;w(ab,false)}else{if(Z){Z({success:false,id:ab})}}},getObjectById:function(X){if(M.w3){return z(X)}},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var X={success:false,id:ah};if(M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y){w(ah,false);K(function(){ae+="";ag+="";var aj={};if(af&&typeof af===r){for(var al in af){aj[al]=af[al]}}aj.data=ab;aj.width=ae;aj.height=ag;var am={};if(ad&&typeof ad===r){for(var ak in ad){am[ak]=ad[ak]}}if(Z&&typeof Z===r){for(var ai in Z){if(typeof am.flashvars!=D){am.flashvars+="&"+ai+"="+Z[ai]}else{am.flashvars=ai+"="+Z[ai]}}}if(F(Y)){var an=u(aj,am,ah);if(aj.id==ah){w(ah,true)}X.success=true;X.ref=an}else{if(aa&&A()){aj.data=aa;P(aj,am,ah,ac);return}else{w(ah,true)}}if(ac){ac(X)}})}else{if(ac){ac(X)}}},switchOffAutoHideShow:function(){m=false},ua:M,getFlashPlayerVersion:function(){return{major:M.pv[0],minor:M.pv[1],release:M.pv[2]}},hasFlashPlayerVersion:F,createSWF:function(Z,Y,X){if(M.w3){return u(Z,Y,X)}else{return undefined}},showExpressInstall:function(Z,aa,X,Y){if(M.w3&&A()){P(Z,aa,X,Y)}},removeSWF:function(X){if(M.w3){y(X)}},createCSS:function(aa,Z,Y,X){if(M.w3){v(aa,Z,Y,X)}},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue:function(aa){var Z=j.location.search||j.location.hash;if(Z){if(/\?/.test(Z)){Z=Z.split("?")[1]}if(aa==null){return L(Z)}var Y=Z.split("&");for(var X=0;X<Y.length;X++){if(Y[X].substring(0,Y[X].indexOf("="))==aa){return L(Y[X].substring((Y[X].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(a){var X=c(R);if(X&&l){X.parentNode.replaceChild(l,X);if(Q){w(Q,true);if(M.ie&&M.win){l.style.display="block"}}if(E){E(B)}}a=false}}}}();



function GenCoverflow(id, parameters, url_list, link_list) {

	var frame_width			= parameters['frameWidth'] ;
	var frame_height		= parameters['frameHeight'] ;
	var image_width			= parameters['imageWidth'] ;
	var image_height		= parameters['imageHeight'] ;
	var angle				= parameters['angle'] ;
	var h_alignment			= parameters['horizontalAlignment'] ;
	var v_alignment			= parameters['verticalAlignment'] ;
	var ground_margin		= parameters['groundMargin'] ;
	var photo_distance		= parameters['photoDistance'] ;
	var bg_color			= parameters['bgColor'] ;
	var timer				= parameters['timer'] ;
	var autofit				= parameters['autofit'] ;
	var img_url_prefix		= parameters['imgUrlPrefix'] ;
	var lnk_url_prefix		= parameters['lnkUrlPrefix'] ;

//	document.write('<div id="' + id + '" style="width:' + frame_width + 'px;border:0px solid green"><p align="center"><a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" target="_blank"><img src="/systeme/cms/media/coverflow/FPError.jpg" alt="Téléchargez la dernière version du FlashPlayer" width="320" height="233" border="0" /></a></p></div>') ;

	document.write('<div id="' + id + '" style="width:' + frame_width + 'px;border:0px solid green"><p align="center"><a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" target="_blank"><img src="/systeme/cms/media/1.gif" alt="Téléchargez la dernière version du FlashPlayer" width="320" height="233" border="0" /></a></p></div>') ;

	var saved_onload = window.onload ;

	window.onload = function() {

		if (typeof saved_onload == "function") {
			saved_onload() ;
		}

		var so = new SWFObject("/systeme/cms/media/coverflow/FPVersionError.swf", "FPVersionError", "100%", "100%", "6", "#FFFFFF", true) ;
		so.addParam("scale", "noscale") ;
		so.addParam("allowFullScreen", "true") ;
		so.write(id) ;

		var so = new SWFObject("/systeme/cms/media/coverflow/CoverFlow.swf?" + Math.random(), "CoverFlow", frame_width, frame_height, "10", "#FFFFFF", true) ;

		var url = "/systeme/cms/media/coverflow/gen_xml_parameters.php?" + Math.random() ;
		if (frame_width) {
			url += "&frame_width=" + frame_width ;
		}
		if (frame_height) {
			url += "&frame_height=" + frame_height ;
		}
		if (image_width) {
			url += "&image_width=" + image_width ;
		}
		if (image_height) {
			url += "&image_height=" + image_height ;
		}
		if (angle) {
			url += "&angle=" + angle ;
		}
		if (h_alignment) {
			url += "&h_alignment=" + h_alignment ;
		}
		if (v_alignment) {
			url += "&v_alignment=" + v_alignment ;
		}
		if (ground_margin) {
			url += "&ground_margin=" + ground_margin ;
		}
		if (photo_distance) {
			url += "&photo_distance=" + photo_distance ;
		}
		if (bg_color) {
			url += "&bg_color=" + bg_color ;
		}
		if (timer) {
			url += "&timer=" + timer ;
		}
		if (autofit) {
			url += "&autofit=" + autofit ;
		}
		if (img_url_prefix) {
			url += "&iup=" + img_url_prefix ;
		}
		if (lnk_url_prefix) {
			url += "&lup=" + lnk_url_prefix ;
		}

//		alert(url_list) ;

		var count = url_list.length ;
		for (var i = 0 ; i < count ; i++)	{
			url += "&url_list[]=" + url_list[i] ;
		}

		var count = link_list.length ;
		for (var i = 0 ; i < count ; i++)	{
			url += "&link_list[]=" + link_list[i] ;
		}
//		alert(url) ;

		so.addVariable("urlXML", encodeURIComponent(url)) ;
		so.addParam("scale", "noscale") ;
		so.addParam("allowFullScreen", "true") ;
		so.addParam("wmode", "transparent") ;
		so.write(id) ;

//		document.write(url) ;
	}
}







function GenDiaporama(id, parameters, url_list, title_list, comment_list, link_list) {

	var frame_width			= parameters['frameWidth'] ;
	var frame_height		= parameters['frameHeight'] ;
	
	var bg_color			= parameters['bgColor'] ;
	var bg_opacity			= parameters['bgOpacity'] ;

	var title_font_num		= parameters['titleFontNum'] ;
	var text_font_num		= parameters['textFontNum'] ;

	var title_color			= parameters['titleColor'] ;
	var text_color			= parameters['textColor'] ;

	var title_font_size		= parameters['titleFontSize'] ;
	var text_font_size		= parameters['textFontSize'] ;

	var bold_title			= parameters['boldTitle'] ;
	var bold_text			= parameters['boldText'] ;

	var text_max_chars		= parameters['textMaxChars'] ;

	var timer				= parameters['timer'] ;
	var ttimer				= parameters['ttimer'] ;

	var random				= parameters['random'] ;

	var autofit				= parameters['autofit'] ;
	var photo_bg_color		= parameters['photoBgColor'] ;
	var photo_recolor		= parameters['photoRecolor'] ;

	var img_url_prefix		= parameters['imgUrlPrefix'] ;
	var img_url_suffix		= parameters['imgUrlSuffix'] ;

	var lnk_url_prefix		= parameters['lnkUrlPrefix'] ;
	var lnk_url_suffix		= parameters['lnkUrlSuffix'] ;

	var javascript_function	= parameters['javascriptFunction'] ;


//	alert(id) ;

	document.write('<div id="' + id + '" style="width:' + frame_width + 'px;border:0px solid green"><p align="center"><a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" target="_blank"><img src="/systeme/cms/media/1.gif" alt="Téléchargez la dernière version du FlashPlayer" width="320" height="233" border="0" /></a></p></div>') ;

	var saved_onload = window.onload ;

	window.onload = function() {

		if (typeof saved_onload == "function") {
			saved_onload() ;
		}

		var so = new SWFObject("/systeme/cms/media/diaporama/FPVersionError.swf", "FPVersionError", "100%", "100%", "6", "#FFFFFF", true) ;
		so.addParam("scale", "noscale") ;
		so.addParam("allowFullScreen", "true") ;
		so.write(id) ;

		var so = new SWFObject("/systeme/cms/media/diaporama/final.swf?" + Math.random(), "Diaporama", frame_width, frame_height, "10", "#FFFFFF", true) ;

		var url = "/systeme/cms/media/diaporama/gen_xml_parameters.php?" + Math.random() ;
		if (frame_width) {
			url += "&frame_width=" + frame_width ;
		}
		if (frame_height) {
			url += "&frame_height=" + frame_height ;
		}
		if (bg_color) {
			url += "&bc=" + bg_color ;
		}
		if (bg_opacity) {
			url += "&bo=" + bg_opacity ;
		}
		if (timer) {
			url += "&timer=" + timer ;
		}
		if (ttimer) {
			url += "&ttimer=" + ttimer ;
		}
		if (random) {
			url += "&random=" + random ;
		}
		if (autofit) {
			url += "&autofit=" + autofit ;
		}
		if (photo_bg_color) {
			url += "&pbc=" + photo_bg_color ;
		}
		if (photo_recolor) {
			url += "&prc=" + photo_recolor ;
		}
		if (title_font_num) {
			url += "&tfn=" + title_font_num ;
		}
		if (text_font_num) {
			url += "&xfn=" + text_font_num ;
		}
		if (title_color) {
			url += "&tc=" + title_color ;
		}
		if (text_color) {
			url += "&xc=" + text_color ;
		}
		if (title_font_size) {
			url += "&ts=" + title_font_size ;
		}
		if (text_font_size) {
			url += "&xs=" + text_font_size ;
		}
		if (bold_title) {
			url += "&bt=" + bold_title ;
		}
		if (bold_text) {
			url += "&bx=" + bold_text ;
		}
		if (text_max_chars) {
			url += "&xm=" + text_max_chars ;
		}
		if (img_url_prefix) {
			url += "&iup=" + encodeURIComponent(img_url_prefix) ;
		}		
		if (img_url_suffix) {
			url += "&ius=" + encodeURIComponent(img_url_suffix) ;
		}
		if (lnk_url_prefix) {
			url += "&lup=" + encodeURIComponent(img_url_prefix) ;
		}
		if (lnk_url_suffix) {
			url += "&lus=" + encodeURIComponent(lnk_url_suffix) ;
		}
		if (javascript_function) {
			url += "&js=" + encodeURIComponent(javascript_function) ;
		}

//		alert(url_list) ;

		var count = url_list.length ;
		for (var i = 0 ; i < count ; i++)	{
			url += "&ul[]=" + url_list[i] ;
		}
		
		var count = title_list.length ;
		for (var i = 0 ; i < count ; i++)	{
			url += "&tl[]=" + title_list[i] ;
		}
		
		var count = comment_list.length ;
		for (var i = 0 ; i < count ; i++)	{
			var c = comment_list[i] ;
			url += "&cl[]=" + c ;
		}

		if (link_list) {
			var count = link_list.length ;
			for (var i = 0 ; i < count ; i++)	{
				var l = link_list[i] ;
				url += "&ll[]=" + l ;
			}
		}

//		alert(url) ;

//		url = "http://www.aranea.fr/systeme/config.xml" ;
//		url = "/systeme/cms/media/diaporama/gen_xml_parameters.php?" + Math.random() ;

		so.addVariable("urlXML", encodeURIComponent(url)) ;
		so.addVariable("urlLib", "/systeme/cms/media/diaporama/") ;
		so.addParam("scale", "noscale") ;
		so.addParam("allowFullScreen", "true") ;
		so.addParam("wmode", "transparent") ;
		so.write(id) ;

//		document.write(url) ;
	}
}







function GenDiaporama2(id, parameters, url_list, title_list, comment_list, link_list) {

	var frame_width			= parameters['frameWidth'] ;
	var frame_height		= parameters['frameHeight'] ;
	
	var bg_color			= parameters['bgColor'] ;
	var bg_opacity			= parameters['bgOpacity'] ;

	var title_font_num		= parameters['titleFontNum'] ;
	var text_font_num		= parameters['textFontNum'] ;

	var title_color			= parameters['titleColor'] ;
	var text_color			= parameters['textColor'] ;

	var title_font_size		= parameters['titleFontSize'] ;
	var text_font_size		= parameters['textFontSize'] ;

	var bold_title			= parameters['boldTitle'] ;
	var bold_text			= parameters['boldText'] ;

	var text_max_chars		= parameters['textMaxChars'] ;

	var timer				= parameters['timer'] ;
	var ttimer				= parameters['ttimer'] ;

	var random				= parameters['random'] ;

	var autofit				= parameters['autofit'] ;
	var photo_bg_color		= parameters['photoBgColor'] ;

	var img_url_prefix		= parameters['imgUrlPrefix'] ;
	var img_url_suffix		= parameters['imgUrlSuffix'] ;

	var lnk_url_prefix		= parameters['lnkUrlPrefix'] ;
	var lnk_url_suffix		= parameters['lnkUrlSuffix'] ;

	var frame_margin		= parameters['frameMargin'] ;

	var thumbs_zone_height	= parameters['thumbsZoneHeight'] ;
	var thumbs_margin		= parameters['thumbsMargin'] ;
	var thumbs_width		= parameters['thumbsWidth'] ;
	var thumbs_height		= parameters['thumbsHeight'] ;

//	alert(id) ;

	document.write('<div id="' + id + '" style="width:' + frame_width + 'px;border:0px solid green"><p align="center"><a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" target="_blank"><img src="/systeme/cms/media/1.gif" alt="Téléchargez la dernière version du FlashPlayer" width="320" height="233" border="0" /></a></p></div>') ;

	var saved_onload = window.onload ;

	window.onload = function() {

		if (typeof saved_onload == "function") {
			saved_onload() ;
		}

		var so = new SWFObject("/systeme/cms/media/diaporama2/FPVersionError.swf", "FPVersionError", "100%", "100%", "6", "#FFFFFF", true) ;
		so.addParam("scale", "noscale") ;
		so.addParam("allowFullScreen", "true") ;
		so.write(id) ;

		var so = new SWFObject("/systeme/cms/media/diaporama2/final.swf?" + Math.random(), "Diaporama", frame_width, frame_height, "10", "#FFFFFF", true) ;

		var url = "/systeme/cms/media/diaporama2/gen_xml_parameters.php?" + Math.random() ;
		if (frame_width) {
			url += "&frame_width=" + frame_width ;
		}
		if (frame_height) {
			url += "&frame_height=" + frame_height ;
		}
		if (bg_color) {
			url += "&bc=" + bg_color ;
		}
		if (bg_opacity) {
			url += "&bo=" + bg_opacity ;
		}
		if (timer) {
			url += "&timer=" + timer ;
		}
		if (ttimer) {
			url += "&ttimer=" + ttimer ;
		}
		if (random) {
			url += "&random=" + random ;
		}
		if (autofit) {
			url += "&autofit=" + autofit ;
		}
		if (photo_bg_color) {
			url += "&pbc=" + photo_bg_color ;
		}
		if (title_font_num) {
			url += "&tfn=" + title_font_num ;
		}
		if (text_font_num) {
			url += "&xfn=" + text_font_num ;
		}
		if (title_color) {
			url += "&tc=" + title_color ;
		}
		if (text_color) {
			url += "&xc=" + text_color ;
		}
		if (title_font_size) {
			url += "&ts=" + title_font_size ;
		}
		if (text_font_size) {
			url += "&xs=" + text_font_size ;
		}
		if (bold_title) {
			url += "&bt=" + bold_title ;
		}
		if (bold_text) {
			url += "&bx=" + bold_text ;
		}
		if (text_max_chars) {
			url += "&xm=" + text_max_chars ;
		}
		if (img_url_prefix) {
			url += "&iup=" + encodeURIComponent(img_url_prefix) ;
		}		
		if (img_url_suffix) {
			url += "&ius=" + encodeURIComponent(img_url_suffix) ;
		}
		if (lnk_url_prefix) {
			url += "&lup=" + encodeURIComponent(img_url_prefix) ;
		}
		if (lnk_url_suffix) {
			url += "&lus=" + encodeURIComponent(lnk_url_suffix) ;
		}

//		alert(url_list) ;

		var count = url_list.length ;
		for (var i = 0 ; i < count ; i++)	{
			url += "&ul[]=" + url_list[i] ;
		}
		
		var count = title_list.length ;
		for (var i = 0 ; i < count ; i++)	{
			url += "&tl[]=" + title_list[i] ;
		}
		
		var count = comment_list.length ;
		for (var i = 0 ; i < count ; i++)	{
			var c = comment_list[i] ;
			url += "&cl[]=" + c ;
		}


/*
		var count = link_list.length ;
		for (var i = 0 ; i < count ; i++)	{
			var l = link_list[i] ;
			url += "&ll[]=" + l ;
		}
*/
//		alert(url) ;

//		url = "http://www.aranea.fr/systeme/config.xml" ;
//		url = "/systeme/cms/media/diaporama/gen_xml_parameters.php?" + Math.random() ;

		var fs_width	= screen.width ;
		var fs_height	= screen.height ;

//		alert(fs_width + ' x ' + fs_height) ;

		url += "&fsw=" + fs_width ;
		url += "&fsh=" + fs_height ;

		if (frame_margin) {
			url += "&fm=" + frame_margin ;
		}
		if (thumbs_margin) {
			url += "&tm=" + thumbs_margin ;
		}
		if (thumbs_zone_height) {
			url += "&tzh=" + thumbs_zone_height ;
		}
		if (thumbs_width) {
			url += "&tw=" + thumbs_width ;
		}
		if (thumbs_height) {
			url += "&th=" + thumbs_height ;
		}

		so.addVariable("urlXML", encodeURIComponent(url)) ;
		so.addVariable("urlLib", "/systeme/cms/media/diaporama2/") ;
		so.addParam("scale", "noscale") ;
		so.addParam("allowFullScreen", "true") ;
		so.addParam("wmode", "transparent") ;
		so.write(id) ;

//		document.write(url) ;
	}
}




// motionpack.js : http://www.harrymaugans.com/2007/03/06/how-to-create-an-animated-sliding-collapsible-div-with-javascript-and-css/#slideexample

var mp_timerlen = 5;
var mp_slideAniLen = 250;

var mp_timerID = new Array();
var mp_startTime = new Array();
var mp_obj = new Array();
var mp_endHeight = new Array();
var mp_moving = new Array();
var mp_dir = new Array();

function mp_slidedown(mp_objname){
        if(mp_moving[mp_objname])
                return;

        if(document.getElementById(mp_objname).style.display != "none")
                return; // cannot slide down something that is already visible

        mp_moving[mp_objname] = true;
        mp_dir[mp_objname] = "down";
        mp_startslide(mp_objname);
}

function mp_slideup(mp_objname){
        if(mp_moving[mp_objname])
                return;

        if(document.getElementById(mp_objname).style.display == "none")
                return; // cannot slide up something that is already hidden

        mp_moving[mp_objname] = true;
        mp_dir[mp_objname] = "up";
        mp_startslide(mp_objname);
}

function mp_startslide(mp_objname){
        mp_obj[mp_objname] = document.getElementById(mp_objname);

        mp_endHeight[mp_objname] = parseInt(mp_obj[mp_objname].style.height);
        mp_startTime[mp_objname] = (new Date()).getTime();

        if(mp_dir[mp_objname] == "down"){
                mp_obj[mp_objname].style.height = "1px";
        }

        mp_obj[mp_objname].style.display = "block";

        mp_timerID[mp_objname] = setInterval('mp_slidetick(\'' + mp_objname + '\');',mp_timerlen);
}

function mp_slidetick(mp_objname){
        var elapsed = (new Date()).getTime() - mp_startTime[mp_objname];

        if (elapsed > mp_slideAniLen)
                mp_endSlide(mp_objname)
        else {
                var d =Math.round(elapsed / mp_slideAniLen * mp_endHeight[mp_objname]);
                if(mp_dir[mp_objname] == "up")
                        d = mp_endHeight[mp_objname] - d;

                mp_obj[mp_objname].style.height = d + "px";
        }

        return;
}

function mp_endSlide(mp_objname){
        clearInterval(mp_timerID[mp_objname]);

        if(mp_dir[mp_objname] == "up")
                mp_obj[mp_objname].style.display = "none";

        mp_obj[mp_objname].style.height = mp_endHeight[mp_objname] + "px";

        delete(mp_moving[mp_objname]);
        delete(mp_timerID[mp_objname]);
        delete(mp_startTime[mp_objname]);
        delete(mp_endHeight[mp_objname]);
        delete(mp_obj[mp_objname]);
        delete(mp_dir[mp_objname]);

        return;
}

function mp_toggle(mp_objname){
		if (document.getElementById(mp_objname).style.display == "none"){
			mp_slidedown(mp_objname) ;
		}
		else {
			mp_slideup(mp_objname) ;
		}
}


/*
/////////////////////////////////////////////////////////////////////////
// Generic Resize by Erik Arvidsson                                    //
//                                                                     //
// You may use this script as long as this disclaimer is remained.     //
// See www.dtek.chalmers.se/~d96erik/dhtml/ for mor info               //
//                                                                     //
// How to use this script!                                             //
// Link the script in the HEAD and create a container (DIV, preferable //
// absolute positioned) and add the class="resizeMe" to it.            //
/////////////////////////////////////////////////////////////////////////

var theobject = null; //This gets a value as soon as a resize start

function resizeObject() {
	this.el        = null; //pointer to the object
	this.dir    = "";      //type of current resize (n, s, e, w, ne, nw, se, sw)
	this.grabx = null;     //Some useful values
	this.graby = null;
	this.width = null;
	this.height = null;
	this.left = null;
	this.top = null;
}
	

//Find out what kind of resize! Return a string inlcluding the directions
function getDirection(el) {
	var xPos, yPos, offset, dir;
	dir = "";

	xPos = window.event.offsetX;
	yPos = window.event.offsetY;

	offset = 8; //The distance from the edge in pixels

	if (yPos<offset) dir += "n";
	else if (yPos > el.offsetHeight-offset) dir += "s";
	if (xPos<offset) dir += "w";
	else if (xPos > el.offsetWidth-offset) dir += "e";

	return dir;
}

function doDown() {

	var el = getReal(event.srcElement, "className", "navigation_sgt");

	if (el == null) {
		theobject = null;
		return;
	}		

	dir = getDirection(el);
	if (dir == "") return;

	theobject = new resizeObject();
		
	theobject.el = el;
	theobject.dir = dir;

	theobject.grabx = window.event.clientX;
	theobject.graby = window.event.clientY;
	theobject.width = el.offsetWidth;
	theobject.height = el.offsetHeight;
	theobject.left = el.offsetLeft;
	theobject.top = el.offsetTop;

	window.event.returnValue = false;
	window.event.cancelBubble = true;

}

function doUp() {
	if (theobject != null) {
		theobject = null;
	}
}

function doMove() {
	var el, xPos, yPos, str, xMin, yMin;
	xMin = 282; //The smallest width possible
	yMin = 505; //             height

	el = getReal(event.srcElement, "className", "navigation_sgt");

	if (el.className == "navigation_sgt") {
		str = getDirection(el);
	//Fix the cursor	
		if (str == "") str = "default";
		else str += "-resize";
		el.style.cursor = str;
	}
	
//Dragging starts here
	if(theobject != null) {
		if (dir.indexOf("e") != -1)
			theobject.el.style.width = Math.max(xMin, theobject.width + window.event.clientX - theobject.grabx) + "px";
	
		if (dir.indexOf("s") != -1)
			theobject.el.style.height = Math.max(yMin, theobject.height + window.event.clientY - theobject.graby) + "px";

		if (dir.indexOf("w") != -1) {
			theobject.el.style.left = Math.min(theobject.left + window.event.clientX - theobject.grabx, theobject.left + theobject.width - xMin) + "px";
			theobject.el.style.width = Math.max(xMin, theobject.width - window.event.clientX + theobject.grabx) + "px";
		}
		if (dir.indexOf("n") != -1) {
			theobject.el.style.top = Math.min(theobject.top + window.event.clientY - theobject.graby, theobject.top + theobject.height - yMin) + "px";
			theobject.el.style.height = Math.max(yMin, theobject.height - window.event.clientY + theobject.graby) + "px";
		}
		
		window.event.returnValue = false;
		window.event.cancelBubble = true;
	} 
}


function getReal(el, type, value) {
	temp = el;
	while ((temp != null) && (temp.tagName != "BODY")) {
		if (eval("temp." + type) == value) {
			el = temp;
			return el;
		}
		temp = temp.parentElement;
	}
	return el;
}

document.documentElement.onmousedown = doDown;
document.documentElement.onmouseup   = doUp;
document.documentElement.onmousemove = doMove;
*/


/* toolbar */

var ctrl_is_down ;
function NeaToolbarOnKeyDown(evt) {
	var e = new xEvent(evt) ;
	if (e.keyCode == 17) {
		ctrl_is_down = 1 ;
	}
}
function NeaToolbarOnKeyUp(evt) {
	var e = new xEvent(evt) ;
	if (e.keyCode == 17) {
		ctrl_is_down = 0 ;
	}
}
function NeaToolbarOnKeyPress(evt) {
	var e = new xEvent(evt) ;
	if ((e.keyCode == 25) || (! ((!(e.keyCode == 121)) || (! ctrl_is_down)))) {
		xLeft(xGetElementById('NEA_TOOLBAR_LOGIN'), (xClientWidth()-xWidth(xGetElementById('NEA_TOOLBAR_LOGIN'))) * 0.5) ;
		xTop(xGetElementById('NEA_TOOLBAR_LOGIN'),	(xClientHeight()-xHeight(xGetElementById('NEA_TOOLBAR_LOGIN'))) * 0.5) ;
		if (xVisibility(xGetElementById('NEA_TOOLBAR_LOGIN')) == 'visible') {
			xHide(xGetElementById('NEA_TOOLBAR_LOGIN')) ;
		}
		else {
			xShow(xGetElementById('NEA_TOOLBAR_LOGIN')) ;
			xGetElementById('NEA_TOOLBAR_LOGIN').style.MozOpacity = .95 ;
			document.forms['SYS_FORM'].nea_toolbar_login.focus() ;
		}
	}
}
function NeaToolbarOnResize() {
	if (xVisibility(xGetElementById('NEA_TOOLBAR_LOGIN')) == 'visible') {
		xShow(xGetElementById('NEA_TOOLBAR_LOGIN')) ;
	}
	xLeft(xGetElementById('NEA_TOOLBAR_LOGIN'), (xClientWidth()-xWidth(xGetElementById('NEA_TOOLBAR_LOGIN'))) * 0.5) ;
	xTop(xGetElementById('NEA_TOOLBAR_LOGIN'),	(xClientHeight()-xHeight(xGetElementById('NEA_TOOLBAR_LOGIN'))) * 0.5) ;
}


/* cf. http://www.w3schools.com/JS/js_cookies.asp */

function setCookie(c_name,value,exdays)
{
	var exdate=new Date();
	exdate.setDate(exdate.getDate() + exdays);
	var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString());
	document.cookie=c_name + "=" + c_value;
}

function getCookie(c_name)
{
	var i,x,y,ARRcookies=document.cookie.split(";");
	for (i=0;i<ARRcookies.length;i++)
	{
	  x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("="));
	  y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1);
	  x=x.replace(/^\s+|\s+$/g,"");
	  if (x==c_name)
	{
	return unescape(y);
	}
  }
}

