var imageClicked='';
var imageStyle='';
var myIndex=1;
var myDiaporamaTimer;
var selectedTool = 'tool_pointer';
var logoDrag = null;
var	menuDrag = null;
var	smenuDrag = null;
var	windowDrag = null;
var	texteDrag = null;
var	imagesDrag = null;
var	thumbnailsDrag = null;
var	thumbnailsPaginationDrag = null;
var	imgcommDrag = null;
var	pictomosIndexLink = null;
var polaMenuLeft='';
var nuageMenuLeft='';
var polaImgCommLeft='';
var nuageImgCommLeft='';

function displayContent(str){
	var firstChar = str.substring(0,1);
	if (firstChar == 'p' || firstChar == 'n'){
		str = str.substring(1,str.length-1);
	}
	myId = str.substring(9);
	myId = myId.substring(0,myId.indexOf('"'));
	header = '<div id="'+myId+'">';
	
	myReloadContent = str.substring(header.length);
	myReloadContent = myReloadContent.substring(0,myReloadContent.length-6);
	
	if ($(myId) == undefined){
		document.body.innerHTML += str;
	} else {
		$(myId).innerHTML = myReloadContent;
	}
	if(myId == 'thumbnails') {
		displayNextImage();
	}
	if (selectedTool == 'tool_move'){
		enableDrag(true);
	}
	
	if (myId == 'images'){
		if (nuageMenuLeft ==''){
			polaMenuLeft=Position.cumulativeOffset($('menu'))[0] ;
			nuageMenuLeft=(Position.cumulativeOffset($('menu'))[0] + 271) + 'px';
		}
		if(polaImgCommLeft ==''){
			polaImgCommLeft=(Position.cumulativeOffset($('imgcomm'))[0]-Position.cumulativeOffset($('images'))[0]) ;
			nuageImgCommLeft=(Position.cumulativeOffset($('imgcomm'))[0] + 271-Position.cumulativeOffset($('images'))[0]) + 'px';
		}
		
		if (firstChar=='n') {
			$('menu').style.left  = nuageMenuLeft;
			$('imgcomm').style.left  = nuageImgCommLeft;
		} else {
			$('menu').style.left  = polaMenuLeft;
			$('imgcomm').style.left  = polaImgCommLeft;
		}
	}
	
	$(myId).style.display='';
}

function displayBox(templateId, boxId, visible,userId){
	myIndex = 0;
	if (typeof boxId =='string' && boxId.indexOf('|') != -1){
		if($('smenu') != undefined){
			$('smenu').hide();
		}
	}
	if (templateId == 'images'){
		$('window').style.display='none';
		if ($('texte') != undefined) $('texte').style.display='none';

	} else if (templateId == 'smenu'){
		if ($('texte') != undefined) $('texte').style.display='none';
		if ($('images') != undefined) $('images').style.display='none';
		if ($('thumbnails') != undefined) $('thumbnails').style.display='none';		
	}
	if (templateId == 'texte' || templateId == 'rubrique_texte'){
		$('window').style.display='none';
		if ($('images') != undefined) $('images').style.display='none';
		if ($('thumbnails') != undefined) $('thumbnails').style.display='none';
		if ($('texte') != undefined) $('texte').style.display='';
		
		if (nuageMenuLeft ==''){
			polaMenuLeft=Position.cumulativeOffset($('menu'))[0] ;
			nuageMenuLeft=(Position.cumulativeOffset($('menu'))[0] + 271) + 'px';
		}
		
		$('menu').style.left  = nuageMenuLeft;
		//$('smenu').style.display = 'none';
	}
	
	
 	req = new GetRequest ({url:'getsubmenu.php',func:displayContent});
	req.send(
		'box='+encodeURIComponent(boxId)
		+'&template='+encodeURIComponent(templateId)
		+'&userId='+encodeURIComponent(userId)
	);
	if (templateId == 'images'){
	 	req = new GetRequest ({url:'getsubmenu.php',func:displayContent});
		req.send(
			'box='+encodeURIComponent(boxId)
			+'&template=thumbnails'
			+'&userId='+encodeURIComponent(userId)
		);
	}
}

function displayPage(pictomosId, templateId, boxId, page){
	myIndex = 0;
 	req = new GetRequest ({url:'getsubmenu.php',func:displayContent});
	req.send(
		'userId='+pictomosId
		+'&box='+boxId
		+'&template='+templateId
		+'&page='+page
	);
}

function executeJs(str){
	eval(str);	
}

function displayPicture(id,ratio,title, year, myCursor){
	myIndex = myCursor;
 	req = new GetRequest ({url:'getsubmenu.php',func:executeJs});
	req.send(
		'id='+id
		+'&action=getDescription'
	);
	if ($('thumb_'+imageClicked) != undefined){
		element = $('thumb_'+imageClicked);
		element.setAttribute('style','border:#999 2px solid;margin:2px 2px 2px 2px');
	} else if ($('thumb_'+id) != undefined){
		imageClicked = id;
	}
	$('thumb_'+id).setAttribute('style','border:#000 2px solid;margin:2px 2px 2px 2px');
	
	$('imageTitle').innerHTML = title;
	$('imageYear').innerHTML = year;
	
	$('pictureScreen').innerHTML = '<img src="/tableaux/grand/'+id+'.jpg" width="'+(417/ratio)+'" height="417">';
	$('images').getElementsByTagName("img")[0].setAttribute('width',(417/ratio));

	if (nuageMenuLeft ==''){
		polaMenuLeft=Position.cumulativeOffset($('menu'))[0] ;
		nuageMenuLeft=(Position.cumulativeOffset($('menu'))[0] + 271) + 'px';
	}
	if(polaImgCommLeft ==''){
		polaImgCommLeft=(Position.cumulativeOffset($('imgcomm'))[0]-Position.cumulativeOffset($('images'))[0]) ;
		nuageImgCommLeft=(Position.cumulativeOffset($('imgcomm'))[0] + 271-Position.cumulativeOffset($('images'))[0]) + 'px';
	}
	
	if (ratio<1) {
		$('menu').style.left  = nuageMenuLeft;
		$('imgcomm').style.left  = nuageImgCommLeft;
	} else {
		$('menu').style.left  = polaMenuLeft;
		$('imgcomm').style.left  = polaImgCommLeft;
	}
	
	imageClicked = id;
}

function imageOver(element){
	if (element.getAttribute('id') != 'thumb_'+imageClicked){
		
		imageStyle=element.getAttribute('style');				
		
		element.setAttribute('style','border:#F90 2px solid;margin:2px 2px 2px 2px');
	}
}

function imageOut(element){
	if (element.getAttribute('id') != 'thumb_'+imageClicked){
		element.setAttribute('style',imageStyle);
	}
}


function playDiaporama(){
	displayNextImage();
	myDiaporamaTimer = setTimeout('playDiaporama()',6000);
	$('playPauseButtons').innerHTML = '<a href="javascript:stopDiaporama()" style="color:#FFF"><img src="imgs/ic-pause.png" border="0" /></a>';
}

function stopDiaporama(){
	clearTimeout(myDiaporamaTimer);
	$('playPauseButtons').innerHTML = '<a href="javascript:playDiaporama()" style="color:#FFF"><img src="imgs/ic-play.png" border="0" /></a>';
}


function displayPreviousImage(){
	myIndex--;
	if ($('link_'+myIndex) ==undefined) myIndex = 1;
	myHref = $('link_'+myIndex).getAttribute('href');
	myHref = myHref.substring(11);
	eval(myHref);
}



function displayNextImage(){
	myIndex++;
	if ($('link_'+myIndex) == undefined) {
		if ($('nextThumbnailsPage') != undefined){
			myHref = $('nextThumbnailsPage').getAttribute('href');
			myHref = myHref.substring(11);
			eval(myHref);
			myIndex = 0;
		} else {
			stopDiaporama();
		}	
	} else {
		myHref = $('link_'+myIndex).getAttribute('href');
		myHref = myHref.substring(11);
		eval(myHref);
	}
}

function selectTool(tool){
	
	if ($('colorpicker') != undefined) {
		$('colorpicker').style.display = 'none';
	}
	displayTexture(false,'');
	displayLogo(false);
	if ($('Input_windowTitle') != undefined || $('Input_menuTitle') != undefined){
		alert('Vous devez valider le texte en cours d\'&eacute;dition avant de changer d\'outil');
	}

	else {
		$(selectedTool).style.backgroundImage = 'url(/admin/images/'+selectedTool+'_off.png)';
		$(tool).style.backgroundImage = 'url(/admin/images/'+tool+'_on.png)';
		
		if ($('background_modify').visible()) Effect.Fade('background_modify', { duration: 0.5 });
		if ($('textColorDiv').visible()) Effect.Fade('textColorDiv', { duration: 0.5 });

		enableDrag(false);
		
		switch(tool){
			case 'tool_pointer':
				document.body.style.cursor = 'default';
			break;
			
			case 'tool_move':
				
				enableDrag(true);
			break;
			
			case 'tool_text':
				Effect.Appear('textColorDiv', { duration: 0.5 });			
				document.body.style.cursor = 'text';
			break;
			case 'tool_background':
				Effect.Appear('background_modify', { duration: 0.5 });				
			break;
		}
		selectedTool = tool;
	}
}

function saveMyPosition(element){

	positionTop = element.getStyle('top');
	positionLeft = element.getStyle('left');

 	req = new GetRequest ({url:'update_style.php',func:executeJs});
	req.send(
		'name='+element.getAttribute('id')
		+'&top='+positionTop
		+'&left='+positionLeft
	);
	
	return true;
}

function enableDrag(b){
	if (b){
		document.body.style.cursor = 'move';
		if ($('logo') != undefined) {
			pictomosIndexLink = $('logo').getAttribute('onclick');
			$('logo').setAttribute('onclick','');
			$('logo').style.cursor = 'move';
			logoDrag = new Draggable('logo', {onEnd:function(draggable, eventName){saveMyPosition(draggable.element);}});
		}
		if ($('menu') != undefined) menuDrag = new Draggable('menu', {onEnd:function(draggable, eventName){saveMyPosition(draggable.element);}});
		if ($('smenu') != undefined) smenuDrag = new Draggable('smenu', {onEnd:function(draggable, eventName){saveMyPosition(draggable.element);}});
		if ($('window') != undefined) windowDrag = new Draggable('window', {onEnd:function(draggable, eventName){saveMyPosition(draggable.element);}});
		if ($('texte') != undefined) texteDrag = new Draggable('texte', {onEnd:function(draggable, eventName){saveMyPosition(draggable.element);}});
		if ($('images') != undefined) imagesDrag = new Draggable('images', {onEnd:function(draggable, eventName){saveMyPosition(draggable.element);}});
		if ($('thumbnails') != undefined) thumbnailsDrag = new Draggable('thumbnails', {onEnd:function(draggable, eventName){saveMyPosition(draggable.element);}});
		if ($('thumbnailsPagination') != undefined) thumbnailsPaginationDrag = new Draggable('thumbnailsPagination', {onEnd:function(draggable, eventName){saveMyPosition(draggable.element);}});
		if ($('imgcomm') != undefined) imgcommDrag = new Draggable('imgcomm', {onEnd:function(draggable, eventName){saveMyPosition(draggable.element);}});
	} else {
		document.body.style.cursor = 'default';
		if (logoDrag !=null) {
			logoDrag.destroy();
			$('logo').setAttribute('onclick',pictomosIndexLink);
			$('logo').style.cursor = 'pointer';
		}
		if (menuDrag !=null) menuDrag.destroy();
		if (smenuDrag !=null) smenuDrag.destroy();
		if (windowDrag !=null) windowDrag.destroy();
		if (texteDrag !=null) texteDrag.destroy();
		if (imagesDrag !=null) imagesDrag.destroy();
		if (thumbnailsDrag !=null) thumbnailsDrag.destroy();
		if (thumbnailsPaginationDrag !=null) thumbnailsPaginationDrag.destroy();
		if (imgcommDrag !=null) imgcommDrag.destroy();
	}
}

function enableLink(b){
	
}

function displayMessage(str){
	
}

function toggleMenu(){
	myElement = window.parent.document.getElementById('header_menu');
	if (myElement.style.display == ''){
		$('tool_fullscreen').setAttribute('src','/admin/images/tool_fullscreen_on.png');
		myElement.style.display = 'none';
	} else {
		$('tool_fullscreen').setAttribute('src','/admin/images/tool_fullscreen_off.png');
		myElement.style.display = '';
	}
}

function updateText(id, text){
 	req = new GetRequest ({url:'ajax_request.php',func:executeJs});
	req.send(
		'pictomosAction=updateText'
		+'&pictomosId='+id
		+'&pictomosText='+text
	);	
}

function updateStyle(pictomosId, cssName, cssChild, cssKey, cssValue) {
	
    myEditableBoxes = document.getElementsByClassName(cssName+'EditableColor');
    for (i=0 ; i<myEditableBoxes.length ; i++){       
        myElement = myEditableBoxes[i];
        myElement.setStyle(cssKey,cssValue);
        switch (cssKey){
        	case 'color' :
        		myElement.style.color = cssValue;
        	break;
        	case 'font-size':
        		myElement.style.fontSize = cssValue;
        	break;
        }
    }
	
 	req = new GetRequest ({url:'ajax_request.php',func:executeJs});
	req.send(
		'pictomosAction=updateStyle'
		+'&pictomosId='+encodeURIComponent(pictomosId)
		+'&cssName='+encodeURIComponent(cssName)
		+'&cssChild='+encodeURIComponent(cssChild)
		+'&cssKey='+encodeURIComponent(cssKey)
		+'&cssValue='+encodeURIComponent(cssValue)
	);	
}

function submitenter(myfield,e,text) {
	var keycode;
	if (window.event) keycode = window.event.keyCode;
	else if (e) keycode = e.which;
	else return true;
	
	if (keycode == 13) {
		myName = myfield.getAttribute('name');
		updateText(myName, myfield.value);
		$(myName).innerHTML = myfield.value;
		$(myName).setAttribute('onClick',"$('"+myName+"').setAttribute('onClick','');$('"+myName+"').innerHTML='<input id=\"Input_"+myName+"\" name=\""+myName+"\" onKeyPress=\"return submitenter(this,event)\" style=\"width:100%;border:0px\" type=\"text\" value=\"'+$('"+myName+"').innerHTML+'\"/>';$('Input_"+myName+"').focus();");
		return false;
	}
	else
	   return true;
}

function updateBackgroundImage(pictomosId, textureFile){
 	req = new GetRequest ({url:'ajax_request.php',func:executeJs});
	req.send(
		'pictomosAction=updateBackGroundImage'
		+'&pictomosId='+pictomosId
		+'&textureFile='+textureFile
	);	
}

function saveLayout(pictomosId){
 	req = new GetRequest ({url:'/ajax_request.php',func:executeJs});
	req.send(
		'pictomosAction=saveLayout'
		+'&pictomosId='+pictomosId
	);	
}

function cancelLayout(pictomosId, pictomosLogin){
 	req = new GetRequest ({url:'/ajax_request.php',func:executeJs});
	req.send(
		'pictomosAction=cancelLayout'
		+'&pictomosId='+pictomosId
		+'&pictomosLogin='+pictomosLogin
	);	
}

function changecss(theClass,element,value) {
	var cssRules;
	if (document.all) {
		cssRules = 'rules';
	} else if (document.getElementById) {
		cssRules = 'cssRules';
	}
	for (var S = 0; S < document.styleSheets.length; S++){
		for (var R = 0; R < document.styleSheets[S][cssRules].length; R++) {
			
			if (document.styleSheets[S][cssRules][R].selectorText == theClass) {
				//alert('style : '+document.styleSheets[S][cssRules][R].selectorText+', => '+value);
				document.styleSheets[S][cssRules][R].style[element] = value;
			}
		}
	}	
}

function displayLogo(b){
	if ($('background_logo') != undefined){
		if (b){
			$('background_logo').style.display = '';
		} else {
			$('background_logo').style.display = 'none';
		}
	}
}

function displayTexture(b,type){
	if ($('background_texture') != undefined){
		if (b){
			if (type == 'tomos') {
				$('background_texture_title').innerHTML = 'Image de fond des TOMOS';
			} else if (type == 'body')  {
				$('background_texture_title').innerHTML = 'Image de fond du site';
			}
			$('background_texture').style.display = '';
		} else {
			$('background_texture').style.display = 'none';
		}
	}
}

var IE = document.all?true:false;
if (!IE) document.captureEvents(Event.MOUSEMOVE);
document.onmousemove = getMouseXY;
var tempX = 0;
var tempY = 0;
	
function getMouseXY(e) {
	if (IE) { // grab the x-y pos.s if browser is IE
		tempX = event.clientX + document.body.scrollLeft;
		tempY = event.clientY + document.body.scrollTop;
	}
	else {  // grab the x-y pos.s if browser is NS
		tempX = e.pageX;
		tempY = e.pageY;
	}  
	if (tempX < 0){tempX = 0;}
	if (tempY < 0){tempY = 0;}  
	if ($('help_panel')!=null) {
		$('help_panel').style.top = tempY;
		$('help_panel').style.left = tempX+60;
	}
	return true;
}


function displayPanel(index){
	$('help_panel').innerHTML = tipsArray[index];
	$('help_panel').style.display = '';
}

function hidePanel(){
	$('help_panel').style.display = 'none';
	$('help_panel').innerHTML = '';
}

function displayCssEditor(){
	req = new GetRequest ({url:'/ajax_request.php',func:executeJs});
	req.send(
		'pictomosAction=displayCssEditor'
	);
}

function savePageCssContent(){
	
	req = new PostRequest ({url:'/ajax_request.php',func:executeJs});
	req.send(
		'pictomosAction=savePageCssContent'
		+'&cssContent='+encodeURIComponent($F('cssContent'))
	);
}

function toggleSlide(divId){
	
	if ($(divId).visible()){
		Effect.BlindUp(divId);
	} else {
		Effect.BlindDown(divId);
	}
	return false;
}

function toggleFade(divId){
	if (divId){
		if ($(divId).visible()){
			$(divId).fade();
		} else {
			$(divId).appear();
		}
	}
}

function checkAllCheckbox(checkBoxClass){
	var elementArray = document.getElementsByClassName(checkBoxClass);
	var isChecked = ( $('checkAll').checked == true );
	for(i=0 ; i<elementArray.length ; i++){
		elementArray[i].checked = isChecked;
	}
}

function deleteSelection(){
	var elementArray = document.getElementsByClassName('pictureCheckBoxClass');
	var hasSelection = false;
	for(i=0 ; i<elementArray.length ; i++){
		if (elementArray[i].checked){
			hasSelection = true;
		}
	}
	if(!hasSelection){
		alert('Veuillez sélectionner au moins une image !');
	} else {
		if( confirm('Voulez-vous vraiment effacer la sélection ?/\nDo you really want to delete the selection ?')){
			$('smartlist_action').value = 'delete_selection';
			$('pictureListForm').submit();
		}
	}
}

function cancelForm(formId, fckId, divId){
	$(formId).reset();
	if (fckId!='') FCKeditorAPI.__Instances[fckId].SetHTML('');
	toggleSlide(divId);
}

function checkImage(formId,inputFileId, suffix){
	var myValue = $F(inputFileId);
	var sufReg = suffix.replace ( /\./i, '\\.');
	var format = suffix.replace ( /\./i, '');
	if (myValue == ''){
		alert('Merci de choisir une image /\n Please choose an image');
	} else if(!eval('myValue.match (/^.+'+ sufReg +'$/i)')){
		alert('Veuillez choisir une image au format "'+format.toUpperCase() + '"\nPlease choose an "'+format.toUpperCase() + '" picture');
	} else {
		$(formId).submit();
	} 
}


// login
function validateFormFields(formId){
	var formFieldElements = $(formId).getElementsBySelector(
		'input[type="text"]'
		, 'input[type="checkbox"]'
		, 'input[type="radio"]'
		, 'input[type="file"]'
		, 'input[type="password"]'
		, 'select'
		, 'textarea'
	);
	var myLabel = '';
	var myOutput = '';
	for (i=0 ; i<formFieldElements.length ; i++){       
		myElement = formFieldElements[i];
		if( myElement.readAttribute('mandatory')=='true' && $F(myElement)=='' ){
			if (myElement.readAttribute('label')!=null) {
				myLabel = myElement.readAttribute('label');
			} else if (myElement.readAttribute('name')!=null) {
				myLabel = myElement.readAttribute('name');
			} else if (myElement.readAttribute('id')!=null) {
				myLabel = myElement.readAttribute('id');
			}
			myOutput += ' - '+ myLabel +"\n";
		}
	}	
	return myOutput;
}

function loginToPictomos(){
	var validationMessage = validateFormFields('myLoginForm');
	$('formErrorMessageDiv').innerHTML = '&nbsp;';
	if(validationMessage != ''){
		alert('Les champs suivants sont requis /\nThe following informations are needed:\n\n'+validationMessage);
	} else {
		$('myLoginForm').submit();
	}
}
function getTranslation(lang,word){
	var lang;
	var word;
	if (wordTranslation[word] != undefined){
		return wordTranslation[word];
	} else {
		alert('Pas de traduction');
	}
}

function sendABug(){
 	req = new PostRequest ({url:'/ajax_request.php',func:executeJs});
	req.send(
		'pictomosAction=sendABug'
		+'&reportABugTxt='+encodeURIComponent($F('reportABugTxt'))
	);
	toggleFade('reportABugDiv');
}

function displayTutorial(templateId){
 	req = new GetRequest ({url:'/ajax_request.php',func:executeJs});
	req.send(
		'pictomosAction=displayTutorial'
		+'&templateId='+encodeURIComponent(templateId)
	);
}

function hideTutorial(){
	$('popupTutorial').fade();
	$('disabledDiv').hide();
}

function getParameter( parameterName ) {
    var queryString = window.location.search.substring(1);
    //alert(queryString);
    //if (queryString.length==0) {return "null";}
    var parameters = new Array();
    parameters = queryString.split('&');
    for(var i = 0; i < parameters.length; i++) {
        //alert(parameters[i]);
        //alert(parameters[i].indexOf(parameterName));
        if (parameters[i].indexOf(parameterName)>=0) {
            //alert(parameters[i]);
            var parameterValue = new Array();
            parameterValue = parameters[i].split('=');
            return parameterValue[1];
        }
    }
    return null;
}

function changeLanguage(lang){
    var request = '?content_lang='+lang;
    if(getParameter('pictomos_oeuvre')!=null) request += '&pictomos_oeuvre='+getParameter('pictomos_oeuvre');
    document.location.href=request;
}
//+++++++++
var tipsArray = Array();
tipsArray[0] = '<img src="/admin/images/ic_question.png" align="right"> <div style="font-family: hevetica, arial;color:#036; padding-bottom:15px;"><img src="/admin/images/ic_fr.gif" style="margin-right:5px;" align="left"><span style=" font-size:15px; ">Titre</span><br/>Entrez ici le titre de l\'oeuvre. Il sera automatiquement écrit en gras et placé au bas de votre oeuvre.</div><div style="font-family: hevetica, arial;color:#cff;"><img src="/admin/images/ic_en.gif" style="margin-right:5px;" align="left"><span style=" font-size:15px; ">Title</span><br/>Write the title of your piece here and it will automatically be written in bold and placed below your work.</div>';

tipsArray[1] = '<img src="/admin/images/ic_question.png" align="right"> <div style="font-family: hevetica, arial;color:#036; padding-bottom:15px;"><img src="/admin/images/ic_fr.gif" style="margin-right:5px;" align="left"><span style=" font-size:15px; ">Année</span><br/>Entrez ici l\'année dans laquelle a été réalisée l\'oeuvre. Ce chiffre sera placé sous le titre.</div><div style="font-family: hevetica, arial;color:#cff; padding-bottom:15px;"><img src="/admin/images/ic_en.gif" style="margin-right:5px;" align="left"><span style=" font-size:15px; ">Year</span><br/>Write the year that your work was taken here and it will be placed below the title.</div>';

tipsArray[2] = '<img src="/admin/images/ic_question.png" align="right"> <div style="font-family: hevetica, arial;color:#036; padding-bottom:15px;"><img src="/admin/images/ic_fr.gif" style="margin-right:5px;" align="left"><span style=" font-size:15px; ">Description</span><br/>Entrez ici une description (détaillée ou non) de votre oeuvre, les conditions de sa réalisation, ou tout autre commentaire utile.</div><div style="font-family: hevetica, arial;color:#cff; padding-bottom:15px;"><img src="/admin/images/ic_en.gif" style="margin-right:5px;" align="left"><span style=" font-size:15px; ">Description</span><br/>Write a description (detailed or basic)  of your work, the technical specifications, or any other useful commentary here.</div>';

tipsArray[3] = '<img src="/admin/images/ic_question.png" align="right"> <div style="font-family: hevetica, arial;color:#036; padding-bottom:15px;"><img src="/admin/images/ic_fr.gif" style="margin-right:5px;" align="left"><span style=" font-size:15px; ">Mots clés</span><br/>Entrez ici le(s) mot(s) que vous souhaitez associer à votre oeuvre. Ces mots serviront au référencement de l\'image dans les moteurs de recherche sur Internet.</div><div style="font-family: hevetica, arial;color:#cff; padding-bottom:15px;"><img src="/admin/images/ic_en.gif" style="margin-right:5px;" align="left"><span style=" font-size:15px; ">Keywords</span><br/>Write key words that you would like to associate with your work.  These words will be used as Internet engine search strings.</div>';

tipsArray[4] = '<img src="/admin/images/ic_question.png" align="right"> <div style="font-family: hevetica, arial;color:#036; padding-bottom:15px;"><img src="/admin/images/ic_fr.gif" style="margin-right:5px;" align="left"><span style=" font-size:15px; ">Mes Rubriques</span><br/>Associez votre oeuvre à un MENU ou un SOUS-MENU. Notez que si vous cochez un menu ET un sous-menu, l\'image illustrera le tomos sous-menus.</div><div style="font-family: hevetica, arial;color:#cff; padding-bottom:15px;"><img src="/admin/images/ic_en.gif" style="margin-right:5px;" align="left"><span style=" font-size:15px; ">Rubrics</span><br/>Associate your work to a MENU or a SUB-MENU.  Note that if you check a menu AND a sub-menu, the illustrated image will be in the tomos sub-menu.</div>';