// modules.website.lib.pictos-1-fr 
var Context = {
MODULE_ACCESSOR:'module',
ACTION_ACCESSOR:'action',
CALLER_MODULE:'website',
CALLER_ACTION:'EditContent',
W_HOST_PREFIX:'http://',
W_HOST:'www.extra.fr',
UIHOST_PREFIX:'http://',
UIHOST:'www.extra.fr',
UIBASEURL:'http://www.extra.fr',
DEV_MODE:false,
inDragSession:false,
W_LANG:'fr',
FORWARD_TO_MODULE:'fmodule',
FORWARD_TO_ACTION:'faction',
RICHTEXT_PRESERVE_H1_TAGS:false,
CHROME_BASEURL:'xchrome://rbschange/content/ext/dubost'};

var K = {
WEBEDIT_MODULE_ACCESSOR:'wemod',
COMPONENT_ACCESSOR:'cmp',
COMPONENT_ID_ACCESSOR:'cmpref',
COMPONENT_LANG_ACCESSOR:'lang',
GENERIC_MODULE_NAME:'generic',
PARENT_ID_ACCESSOR:'parentref',
VALUE_ACCESSOR:'value',
LABEL_ACCESSOR:'label',
TREE_FILTER:'treeFilter',
LANG_ACCESSOR:'lang',
FULL_TREE_CONTENT_ACCESSOR:'fullTreeContent',
LINKED_COMPONENT_ACCESSOR:'lnkcmp'};
// JavaScript Document
function showPictoInfoInit(pictoArr,descriptionArr) {
	var timeoutArr = new Array();
	for(var j = 0; j < pictoArr.length; j++) {
		timeoutArr["timeout"+(pictoArr[j]).substring(5)] = null;
	}

	for(var i = 0; i < descriptionArr.length; i++) {
		var tmpDiv = document.getElementById(descriptionArr[i]);
		if(tmpDiv != undefined)
		{
			tmpDiv.style.display = "none";

			tmpDiv.onmouseover = function () {
				var timetmp = (this.id).substring(11);
				if(timeoutArr[timetmp] != null) {
					clearTimeout(timeoutArr[timetmp]);
					timeoutArr[timetmp]= null;
				}
			}
			tmpDiv.onmouseout = function () {
				var timetmp = (this.id).substring(11);
				timeoutArr[timetmp] = setTimeout("hidePictoDescription('"+this.id+"');", 50);
			}
		}
	}

	for(i = 0; i < pictoArr.length; i++) {
		var tmp = document.getElementById(pictoArr[i]);
		if(tmp != undefined)
		{
			tmp.onmouseover = function () {
				var timetmp = (this.id).substring(5);
				if(timeoutArr[timetmp] != null) {
					clearTimeout(timeoutArr[timetmp]);
					timeoutArr[timetmp] = null;
				}
				var descDiv = document.getElementById("description"+(this.id).substring(5));

				descDiv.style.display = "block";
			}
			tmp.onmouseout = function () {
				var timetmp = (this.id).substring(5);
				if(timeoutArr[timetmp] != null) {
					clearTimeout(timeoutArr[timetmp]);
					timeoutArr[timetmp] = null;
				}
				var descDivName = "description"+(this.id).substring(5);
				timeoutArr[timetmp] = setTimeout("hidePictoDescription('"+descDivName+"');", 50);
			}
		}
	}

}

function hidePictoDescription(ops) {
	var tmp = document.getElementById(ops);
	tmp.style.display = "none";
}

$(document).ready(function(){

	showPictoInfoInit(['picto1',
									   'picto2',
									   'picto3',
									   'picto4',
									   'picto5',
									   'picto6',
									   'picto7',
									   'picto8'],
									  ['description1',
									   'description2',
									   'description3',
									   'description4',
									   'description5',
									   'description6',
									   'description7',
									   'description8']);
	
});


