<!--


/////////////////////////////////////////////////////////////////////////////////////
// Copyright © WebOperator ® 2003-2009 Tous droits réservés
// Ce programme informatique est protégé par les droits d'auteur et des brevets
// TOUTE REPRODUCTION OU CONTREFACON EST INTERDITE
//
// Copyright © WebOperator ® 2003-2010 All rights reserved
// This data-processing program is protected by author's right and patents
// ANY REPRODUCTION OR COUNTERFEIT PROHIBITED
//
// WebOperator 
// 85, bd Auguste Blanqui
// 75013 Paris
// France
// http://www.weboperator.net
/////////////////////////////////////////////////////////////////////////////////////


///// def_opt paramétrable dans custom/def_defaut/webop!/javascript/tpl_defaut.js /////


var actu_chp1, actu_chp2 = '', actu_status = 1, an, anomalie = 0, chemin, chp_focus = '', cl, cxs, cxs2, cxs_incl, cxs_zc, debog, def_opt = 1024, dx, dx0 = 20, dx1 = 20, dy0 = 0, dy0_2 = 0, dy1 = 0, fas, form_pal, init = '', ip, ipp, l_opt, type_affi = 'publi', urle = '', urlp = '', unit_x, vbt = '', verif_err = 0, version = '', vt = '';

var chps_cond = new Array();
var chps_err = new Array();
var chps_verif = new Array();
var classif = new Array();
var div_verif = new Array();
var dy0_interf = new Array();
var script_verif = new Array();
var styles = new Array();
var tpl_p = new Array();
var val_init = new Array();
var wo = new Array();
var wo_chps = new Array();
var wo_chps_noms = new Array();
var wo_conds_js = new Array();
var wo_div = new Array();

urlp = (document.location + '').replace(/\?.*$/, '');
if(urlp.match(/\/page_edition(_form){0,1}\.php$/, '')) version = urlp.replace(/\/page_edition(_form){0,1}\.php$/, '').replace(/^.*\//, '');

if(navigator.appVersion.match(/; *MSIE.*; *Macintosh/i)) actu_status = 0;


function WO_InitChps(){
	
	var chp, chp2, i;
	
	chps_verif = Array();
	
	for(i=0;i< wo_chps.length;i++) chps_verif[wo_chps[i]] = 2;
	
	for(chp in chps_verif){
		chp2 = chp.replace(/__[a-z]+$/, '');
		if(chp != chp2 && !chps_verif[chp2]){
			chps_verif[chp2] = 1;
			wo_chps[i] = chp2;
			i++;
		}	
	}
}

function WO_Elts(){
	
	var i, nbre = wo_chps.length;
	
	// Intégration classif => wo_chps
	if(classif.length && !wo_chps[nbre - 1].match(/^classif[0-9]+$/)){
		for(i=0;i< classif.length;i++){
			wo_chps[i + nbre] = 'classif' + i;
			classif[i][0].replace(/!/g, ' ');
		}
	}
	
	for(i=0;i< wo_chps.length;i++){
		try {
			eval('this.' + wo_chps[i] + ' = \'' + WO_Elts.arguments[i].replace(/\'/g, '\\\'') + '\';');
		}
		catch(e){
			eval('this.' + wo_chps[i] + ' = \'\';');
		}
	}
	
	if(WO_Elts.arguments[1] == 'classif'){
		for(i=0;i< classif.length;i++) eval('this.classif' + i + ' = \'' + classif[i][0].replace(/\'/g, '\\\'') + '\';');
	}
}

function WO_DimCol(val, val_max){
	
	if(val.match(/^[0-9]+ *%$/)) val = val_max * val.replace(/[^0-9]/g, '') / 100;
	else if(val.match(/^[0-9]+ *px$/i)) val = val.replace(/[^0-9]/g, '') * 1;
	else val = val * 1;
	
	return val;
}

function WO_LienDoc(elt, pcs){
	
	var fichier = elt.fichier;
	
	if(fichier.match(/^http_/)){
		fichier = fichier.replace(/^http_/, '');
		if(pcs == 'html/webop!') fichier = cxs_incl + fichier;
		else fichier = cxs_zc + fichier;
	}
	
	return fichier;
}

function WO_LienPage(div, num_c, num_y, num_x, lien, type, pcs){
	
	var it = new Array();
	
	if(lien.match(/^http:\/\/$/i)) lien = '';
	if(!type) type = '';
	lien = lien.replace(/^http_/, '');
	
	if(type.match(/^in/)){
		if(type_affi != 'edit' || pcs == 'html/webop!'){
			if(lien){
				if(version == 'webop!_zc'){
					lien = '<?php echo LienPageZC(\'' + lien.replace(/'/g, '\\\'') + '\', $_var_trans, \'\', \'\');  ?>';
				}
				else if(pcs == 'html/webop!'){
					///// Modif / version miroir /////
					it = lien.split('/');
					if(it[1] == zt) lien = it[0] + '/$_page_zone/' + it[2] + '/';
					if(it[3] == 'webop!') lien += '$_page_type';
					else lien += it[3];
					for(i=4;i<it.length;i++) lien += '/' + it[i];
					if(lien.match(/\?/)) lien += '&';
					else lien += '?';
					lien = '<?php echo "$_page_cxion_href/$_page_version/' + lien + '"; if($_var_trans) echo SuppVar($_var_trans, \'_\', \'_ip\'); ?>';
				}
				else {
					lien = cxs + '/' + an + '/' + lien;
					if(vbt){
						if(lien.match(/\?/)) lien += '&';
						else lien += '?';
						lien += vbt;
					}
					if(type_affi == 'edit/form') lien += '" target="_blank';
				}
			}
			else {
				lien += '#<!--' + ipp + '__' + div + '__c' + num_c + 'y' + num_y + 'x' + num_x + '//-->';
			}
		}
		else {
			if(type == 'in') {
				items = lien.split('?', 2);
				lien = urlp + '?';
				if(vbt) lien += vbt + '&';
				if(ipp) lien += '_ipp=' + ipp + '&';
				if(items[1]) lien += items[1] + '&';
				if(version == 'webop!_zc' )lien += '_url=' + items[0];
				else lien += '_url=' + an + '/' + items[0];
			}
			else if(type == 'in/nouv'){
				lien = 'rubrique_form.php?';
				if(vbt) lien += vbt + '&';
				lien += '&_url=' + urle + '&_pcs1=crea';
			}
			else if(type == 'in/dynam'){
				lien = urlp.replace(/_edition\.php/, '_edition_form.php') + '?';
				if(vbt) lien += vbt + '&';
				lien += '_ipp=' + ipp + '__' + div + '__c' + num_c + 'y' + num_y + 'x' + num_x + '&_url=' + urle;
			}
			
			//lien = '#';
		}
	}
	else if(lien.match(/^http/)){
		lien = lien + '" target="_blank';
	}
	else if(type && !lien && version != 'e_mailing'){
		lien = '#';
	}
	
	return lien;
}

function WO_AffiImg(div, num_c, num_y, num_x, elt, type_affi, num_i, l_max, h_max, pcs){
	
	var cont, echelle = elt.echelle.replace(/%$/, ''), date, img = elt.fichier, h = elt.img_height, l = elt.img_width, r;
	
	if(l && h){
		if(!l) l = l_max;
		if(!h) h = h_max;
		if(!echelle) echelle = 100;
		l = l * echelle / 100;
		h = h * echelle / 100;
		if(!h_max) h_max = h;
		if(!l_max) l_max = l;
		r = Math.min(l_max/l, h_max/h);
		if(r < 1){
			l = Math.round(l * r);
			h = Math.round(h * r);
		}
	}
	else {
		l = Math.min(l_max, 50);
		h = l;
	}
	
	if(img.match(/^http_/)){
		var date = new Date();
		img = img.replace(/^http_/, '');
		if(pcs == 'html/webop!') img = cxs_incl + img;
		else img = cxs_zc + img + '?_ts=' + date.getTime();
	}
	
	if(img.match(/\.swf(\?|$)/i)){
		cont = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="' + l + '" height="' + h + '" align="middle" title="' + elt.legende + '">';
		cont += '<param name="movie" value="' + img + '" />';
		cont += '<param name="quality" value="high" />';
		cont += '<embed src="' + img + '" width="' + l + '" height="' + h + '" align="' + elt.align + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash">';
		cont += '</embed>';
		cont += '</object>';
		img = cont;
	}
	else {
		img = '<img name="img_' + num_i + '" src="' + img + '"';
		if(type_affi.match(/^edit\/form/) && poids_max && elt.poids > poids_max) img += ' border="1"';
		else if(elt.lien && elt.lien != 'http://') img += ' border="0"';
		img += ' width="' + l + '" height="' + h + '"' + WO_Class(div, elt, 'img') + '>';
	}
	img = img.replace(/ (width|height)=""/g, '');
	
	if(elt.type.match(/^(lien|img)$/) && elt.lien && elt.lien != 'http://') img = '<a href="' + WO_LienPage(div, num_c, num_y, num_x, elt.lien, elt.type_lien, pcs) + '"' + WO_Class(div, elt, 'lien') + '>' + img + '</a>';
	
	cont = '<table border="0" width="' + l + '" cellspacing="0" cellpadding="3"';
	if(elt.align) cont += ' align="' + elt.align + '"';
	cont += '><tr>';
	if(elt.align == 'right') cont += '<td width="10"></td>';
	cont += '<td>' + img + '</td>';
	if(elt.align == 'left') cont += '<td width="10"></td>';
	cont += '</tr>';
	if(elt.legende){
		cont += '<tr>';
		if(elt.align == 'right') cont += '<td></td>';
		cont += '<td' + WO_Class(div, elt, 'legende') + '>' + WO_FormatLien(elt.legende) + '</td>';
		if(elt.align == 'right') cont += '<td></td>';
		cont += '</tr>';
	}
	cont += '</table>';
	
	if(type_affi == 'edit/form/interf') return img;
	else return cont;
}

function WO_FormatChp(div, elt, chp, pcs){ 
	
	var imgd, imgf, val = '';
	
	if(eval('elt.' + chp)){
		imgd = WO_TryEval('tpl_' + div + '_' + elt.type + elt.style + '_' + chp + '_imgd', '');
		imgf = WO_TryEval('tpl_' + div + '_' + elt.type + elt.style + '_' + chp + '_imgf', '');
		if(pcs == 'html/webop!'){
			imgd = imgd.replace(/(\.\.\/)+/, cxs2);
			imgf = imgf.replace(/(\.\.\/)+/, cxs2);
		}
		val = eval('imgd + elt.' + chp + ' + imgf');
	}
	
	return val;
}

function WO_TryEval(chaine, defaut){
	
	if(!chaine) chaine = defaut;
	
	try {
		// Safari
		chaine = eval(chaine);
		if(chaine || typeof(chaine) == 'number') return chaine;
		else return defaut;
	}
	catch(e){
		return defaut;
	}
}

function WO_Actu(chp, focus){
	
	chps_cond = Array();
	
	if(focus) chp_focus = chp;
	
	chps_cond[chp] = 1;
	actu_chp1 = chp;
	actu_chp2 = '';
	
	if(actu_status) WO_AffiCont('wo', '', '', '', '', '', '', '', '');
}

function WO_ValeurChp(name, param, val_def){
	
	var i, type, val = val_def;
	
	if(!param) param = '.value';
	
	type = WO_TryEval('form_pal.' + name + '.type', '')
	
	if(!type || type == 'radio'){
		////////// Netscape et Safari + champs de type radio //////////
		// Problème : avec Safari et les champs de type radio, plusieurs éléments correspondent à un champ donné => prendre le dernier
		///////////////////////////////////////////////////////////////			
		for(i=form_pal.elements.length-1;i>=0;i--){
			if(form_pal.elements[i].name == name && (form_pal.elements[i].type != 'radio' || form_pal.elements[i].checked)){
				val = eval('form_pal.elements[i]' + param);
				i = -1;
			}
		}
	}
	else {
		val = WO_TryEval('form_pal.' + name + param, val_def);
		if(type == 'checkbox' && !eval('form_pal.' + name + '.checked')) val = '';
	}
	//if(name == 'type') alert(val);
	return val;
}

function WO_RechChp(name){
	
	var chp;
	
	if(!WO_TryEval('form_pal.' + name + '.type', '')){
		////////// Netscape et Safari + champs de type radio //////////
		// Problème : avec Netcape et Safari ainsi qu'avec les champs de type radio, plusieurs éléments correspondent à un champ donné => prendre le dernier
		///////////////////////////////////////////////////////////////			
		for(i=form_pal.elements.length-1;i>=0;i--){
			if(form_pal.elements[i].name == name){
				//// Ruse / champ de type radio sans aucune option de sélectionnée => première option prise afin que WO_RechChp() ne retourne pas une valeur NULL
				chp = form_pal.elements[i];
				if(form_pal.elements[i].type != 'radio' || form_pal.elements[i].checked) i = -1;
			}
		}
	}
	else {
		chp = WO_TryEval('form_pal.' + name, '');
	}
	
	return chp;
}

function WO_EnregistValeurChp(chp, val, pcs){
	
	var car, i, val, value, rech = 0;
	var car_spe = new Array();
	
	if(pcs == 'val'){
		if(chp.type == 'radio'){
			for(i=form_pal.elements.length-1;i>=0;i--){
				if(form_pal.elements[i].name == chp.name && form_pal.elements[i].checked){
					//val = i;
					val = form_pal.elements[i].value;
					i = -1;
				}
			}
		}
		else if(chp.type == 'checkbox'){
			if(chp.checked) val = 1;
		}
		//else if(chp.type == 'select-one') val = chp.selectedIndex;
		else if(chp.type == 'select-multiple'){
			for(i=0;i< chp.length;i++){
				if(chp.options[i].selected && chp.options[i].value) val += chp.options[i].value.replace(/,/g, ' ') + ',';
			}
		}
		else val = chp.value;
		
		// Ruse, sinon val n'est pas modifiable
		val += '';
		// Ruse, sinon affichage de '%2B' au lieu de '+' dans les champs formulaires de type text et textarea
		if(1 == 1 || chp.type.match(/^text/)) car_spe = {'"':'&quot;', '<':'&lt;', '>':'&gt;'};
		else car_spe = {'"':'&quot;', '<':'&lt;', '>':'&gt;', '\\+':'%2B'};
		for(car in car_spe) val = val.replace(eval('/' + car + '/g'), car_spe[car]);
		
		return val;
	}
	else {
		//if(chp.type == 'radio') form_pal.elements[val].checked = true;
		if(chp.type == 'radio'){
			 for(i=form_pal.elements.length-1;i>=0;i--){
				if(form_pal.elements[i].name == chp.name && form_pal.elements[i].value == val){
					form_pal.elements[i].checked = true;
					i = -1;
				}
			}
		}
		else if(chp.type == 'checkbox') chp.checked = val;
		//else if(chp.type == 'select-one') chp.options[val].selected = true;
		else if(chp.type == 'select-one'){
			for(i=0;i< chp.length;i++){
				if(!rech && chp.options[i].value == val){
					chp.options[i].selected = true;
					rech = 1;
				}
				else {
					chp.options[i].selected = false;
				}
			}
		}
		else if(chp.type == 'select-multiple'){
			for(i=0;i< chp.length;i++){
				if(!rech && val.match(eval('/(^|,)' + FormatExpreg(chp.options[i].value) + ',/'))){
					chp.options[i].selected = true;
					rech = 1;
				}
				else {
					chp.options[i].selected = false;
				}
			}
		}
		else {
			chp.value = val;
		}
		
		return chp;
	}
}

function WO_Class(div, elt, chp){
	
	var val = ' class="' + div + '__';
	
	if(elt.type.match(/^chp/)){
		val += elt.style + chp;
	}
	else if(chp){
		if(chp.match(/^(br|hr)$/)) val += chp + elt.style;
		else val += elt.type + elt.style + '_' + chp;
	}
	else {
		val += elt.style + elt.type;
	}
	
	return val + '"';
}

function WO_AffiCont(nd, num_c, num_y, num_x, type_m, type_e, x_pos, y_pos, pcs){
	
	var affi_ch, affi_li = 0, chp, chp_name, class_chp, cont = '', div, div_type, div_pos, eol = '', expreg, i, interf_lien, interf_img, l, l_max, lien_elt, num_c2 = 1, num_x2 = 0, num_y2 = 0, nc, nx, nx2, ny, ny_preced, ny2, nz, pcs2, picto, rech_cond, style, style_li = '', style_li_p, subdivr = 1, tagd, tagdi, tagf, titre_elt, texte_pesp, texte_elt, texte_def = '', val, verif, x_def = 800, x_min, x_max, y_def = 600, y_max = 0;
	var chps = new Array();
	var cont2 = new Array();
	var div2 = new Array();
	var elt = new WO_Elts();
	var elt2 = new WO_Elts();
	var it = new Array();
	var pictos = Array('doc','pdf','ppt','txt','xls','zip');
	
	form_pal = WO_TryEval('document.form_pal', '');
	
	if(nd && !wo_div[nd]){
		if(nd == 'wo' && WO_TryEval('document.getElementById(\'wo\').id', '')) wo_div['wo'] = {'id':'wo','pos':'','type':''};
		else nd = '';
	}
	
	if(nd){
		if(pcs.match(/^actu\//)){
			///// Cas de chgtfi dans contenu_edition.js /////
			pcs2 = pcs.replace(/^actu\//, '');
			pcs = 'actu';
		}
		else {
			pcs2 = pcs;
		}
		
		div = wo_div[nd]['id'];
		////////// Format de div_pos //////////
		// _f : fixe
		// _a : absolute (requis / multicolonne)
		///////////////////////////////////////
		div_pos = wo_div[nd]['pos'];
		div_type = wo_div[nd]['type'];
		
		if(type_affi == 'form'){
			
			// Valeurs initiales du formulaire
			for(i=0;i< form_pal.elements.length;i++){
				chp = form_pal.elements[i];
				if(!val_init[chp.name]) val_init[chp.name] = 'init:' + WO_EnregistValeurChp(chp, '', 'val');
			}
		}
		
		else if(type_affi == 'edit/form'){
			
			WO_AffiMC('');
			texte_def = '(à complèter) ';
			interf_img = '<img src="' + cxs + '/' + chemin + '/w!_interf.gif" border="0" width="16" height="16" align="absmiddle">';	
			
			if((!wo[nd] || wo[nd] && !wo[nd].length) && script_verif[div_type] == 1){
				wo[nd] = new Array();
				wo[nd][1] = new Array();
				wo[nd][1][0] = new Array();
				//wo[nd][1][0][0] = new WO_Elts();
				wo[nd][1][0][0] = col_init;
				if(div_pos == '_f'){
					wo[nd][1][0][0].width = '100%';
					wo[nd][1][0][0].height = '';
				}
			}
		}		
		
		if(cl){
			for(nc in wo[nd]){
				for(chp in wo[nd][nc][0][0]){
					expreg = eval('/__' + cl + '$/');
					if(chp.match(expreg)) eval('wo[\'' + nd + '\'][' + nc + '][0][0].' + chp.replace(expreg, '') + ' = wo[\'' + nd + '\'][' + nc + '][0][0].' + chp);
				}
			}
		}	
		
		if(!init){
			l_opt = document.body.clientWidth;
			if(def_opt) l_opt += def_opt - screen.availWidth;
			if(vt.match(/(^|&)fen=imp($|&)/)){
				dx = 20;
			}
			else {
				dx = dx0;
				x_min = document.body.clientWidth;
				x_max = 0;
				for(nc in wo[nd]){
					if(WO_TryEval('wo[\''  + nd + '\'][' + nc + '][0][0].type', '')){
						x_min = Math.min(x_min, wo[nd][nc][0][0].left * 1);
						x_max = Math.max(x_max, wo[nd][nc][0][0].left * 1 + wo[nd][nc][0][0].width * 1);
					}
				}
				if(x_max >= x_min) dx += Math.max(0, Math.round((document.body.clientWidth - dx0 - dx1 - x_max + x_min)/2));
			}
			init = 1;
		}
		
		if(!div_pos && l_opt) cont += '<div id="wo_def_opt" style="position:absolute; left: 0px; top: 0px; width: ' + (l_opt - 21) + 'px; height: 0px; z-index:-1; border: 0px none #000000; overflow : hidden"></div>\n';
		
		for(nc in wo[nd]){
			
			script_verif[div_type] = 1;
			
			style_li = '';
			
			if(div_pos == '_f') l_max = l_opt - dx0 - dx1 - 20;
			else l_max = wo[nd][nc][0][0].width * 1 - 20;
			
			//y_max = Math.max(y_max, wo[nd][nc][0][0].top * 1 + wo[nd][nc][0][0].height.replace(/\/.*$/, '') * 1);
			if(div_pos != '_f'){
				unit_x = 'px';
				l = dx + wo[nd][nc][0][0].left * 1;
				cont += '<div id="wo_cal' + nc + '" style="position:absolute; left: ';
				if(pcs == 'html/webop!'){
					cont += '<?php if($_def) echo max(20, (' + l + ' + ereg_replace("x.*$", "", $_def) - ';
					if(def_opt) cont += def_opt;
					else cont += document.body.clientWidth;
					cont += ')/2); else echo "' + l + '"; ?>';
				}
				else cont += l;
				cont +=  unit_x + '; top: ';
				if(nc > 1) wo[nd][nc][0][0].top = wo[nd][nc][0][0].top * 1 + dy0_2;
				if(WO_TryEval('wo[\''  + nd + '\'][' + nc + '][1].style.match(/^s_/i)')) cont += dy0 + wo[nd][nc][0][0].top * 1 - 10;
				else cont += dy0 + wo[nd][nc][0][0].top * 1;
				cont +=  'px; width:' + wo[nd][nc][0][0].width + unit_x + ';';
				if(wo[nd][nc][0][0].height){
					it = (wo[nd][nc][0][0].height + '/visible').split(/\//, 3);
					cont += ' height:' + it[0] + 'px; overflow:' + it[1] + ';';
				}
				else {
					cont += 'overflow:visible;';
				}
				cont += WO_TryEval('tpl_' + nd + '_cal_bg', ' ') + ' z-index:9' + nc + '; border: 1px none #000000">\n';
			}
			else {
				unit_x = '';
			}
			cont += '<table width="' + wo[nd][nc][0][0].width + unit_x + '" height="' + wo[nd][nc][0][0].height.replace(/\/.*$/, '') + '" border="0" cellpadding="0" cellspacing="0">';
			
			if(type_affi.match(/^edit/) && wo[nd][nc].length < 2){
				wo[nd][nc][1] = new Array();
				//wo[nd][nc][1][0] = new WO_Elts();
				wo[nd][nc][1][0] = elt_init;
			}
			
			//for(ny=1;ny< wo[nd][nc].length;ny++){
			for(ny in wo[nd][nc]){
				
				if(ny*1){
					
					for(nx in wo[nd][nc][ny]){
						
						if(!nx.match(/\/[0-9]+$/)){
							
							elt = new WO_Elts();
							
							if(wo[nd][nc][ny][nx][1]){
								
								///// type_affi == 'form' obligatoirement /////
								
								if(actu_status){
									
									if(nx == 1){
										affi_li = -1;
										for(i in wo[nd][nc][ny]){
											if(wo[nd][nc][ny][i][1]){
												for(j in wo[nd][nc][ny][i]){
													elt2 = wo[nd][nc][ny][i][j];
													if(elt2.cond_js == 'else') elt2.cond_js = '!(' + wo[nd][nc][ny][i][(j-1)].cond_js + ')';
													if(WO_TryEval(elt2.cond_js, '')) affi_li = 1;
												}
											}
											else {
												affi_li = 1;
											}
										}
									}
									
									affi_ch = 0;
									for(nz in wo[nd][nc][ny][nx]){
										elt = wo[nd][nc][ny][nx][nz];
										if(elt.cond_js == 'else' && nz > 1) elt.cond_js = '!(' + wo[nd][nc][ny][nx][(nz-1)].cond_js + ')';
										if(WO_TryEval(elt.cond_js, '')){
											affi_ch = nz;
											if((!num_y || nc == num_c && (ny == num_y && nx > num_x || ny > num_y) || nc > num_c)){
												expreg = /<(input|select|text)[^>]* name *= *('|"){0,1}/i;
												if(
													actu_chp1 
													&& elt.cond_js.match(eval('/(document\.form_pal\.|WO_ValeurChp\\(*(\'|"))' + actu_chp1 + '(\.|\'|")/'))
													&& elt.texte.match(expreg)
												){
													actu_chp2 = elt.texte.replace(expreg, '').replace(/('|"| |>).*$/, '');
													chps_cond[actu_chp1] = 1;
													if(!chps_cond[actu_chp2]) chps_cond[actu_chp2] = 2;
												}
												if(!num_y2){
													chp = elt.cond_js.replace(/.*(document\.form_pal\.|WO_ValeurChp\(*(\'|"))/, '').replace(/(\.|\'|").*$/, '');
													if(chps_cond[chp] != 1){
														num_c2 = nc;
														// Recherche des champs suivants avec le même cond_js => allégement du process
														rech_cond = 1;
														for(ny2 in wo[nd][nc]){
															for(nx2 in wo[nd][nc][ny2]){
																if(rech_cond && (ny2 ==  ny && nx2 >= nx || ny2 > ny)){
																	rech_cond = 0;
																	for(nz2 in wo[nd][nc][ny2][nx2]){
																		if(WO_TryEval('wo[\'' + nd + '\'][' + nc + '][' + ny2 + '][' + nx2 + '][' + nz2 + '].cond_js', '') == elt.cond_js){
																			num_y2 = ny2;
																			num_x2 = nx2;
																			rech_cond = 1;
																		}
																	}
																}																	
																	
															}
														}
													}
													pcs = 'actu';
												}
											}	
										}
									}
									if(affi_ch) elt = wo[nd][nc][ny][nx][affi_ch];
								}
								
								else {
									elt = wo[nd][nc][ny][nx][1];
									affi_ch = 1;
									affi_li = 1;
								}
							}
							
							else {
								elt = wo[nd][nc][ny][nx];
								nz = '';
								affi_ch = 1;
								affi_li = 1;
								
								if(elt.cond_js.match(/<\?php/) && pcs == 'html/webop!') cont += elt.cond_js;
							}
							
							if(affi_li == 1){
								
								if(elt.type.match(/^subdiv\//)){
									
									///// Optimisation de l'espace par superposition de ligne à côté d'un champ de type "select multiple" ou "textarea" pouvant être haut /////
									
									if(elt.type == 'subdiv/deb') cont += '<tr><td colspan="3">';
									cont += '<!-- Début / ' + elt.type + '//-->' + elt.texte + '<!-- Fin / ' + elt.type + '//-->';
									if(elt.type == 'subdiv/fin'){
										cont += '</td></tr><tr>';
										subdivr = 1;
									}
									else {
										if(elt.width.match(/%$/)) subdivr = elt.width.replace(/%$/, '') / 100;
										else subdivr = elt.width / wo[nd][nc][0][0].width;
									}
								}
								
								else if(elt.type){
									
									// Contenu de la version en cours
									if(cl){
										for(chp in elt){
											expreg = eval('/__' + cl + '$/');
											if(chp.match(expreg)) eval('elt.' + chp.replace(expreg, '') + ' = elt.' + chp + ';');
										}
									}
									
									if(elt.left.match(/^[0-9]+\/[0-9]+$/)){
										
										// Ligne
										
										if(nx == 1){
											
											style_li_p = style_li;
											style_li = '_';
											for(i in wo[nd][nc][ny]){
												if(style_li != 'p'){
													style = WO_TryEval('wo[\''  + nd + '\'][' + nc + '][' + ny + '][' + i + '].style', WO_TryEval('wo[\''  + nd + '\'][' + nc + '][' + ny + '][' + i + '][1].style', ''));
													if(style.match(/^s_/i)){
														if(style_li == '_') style_li = 't';
														else if(!style_li) style_li = 'p';
													}
													else {
														if(style_li == '_') style_li = '';
														else if(style_li == 't') style_li = 'p';
													}
												}
											}
											if(style_li != style_li_p){
												cont += '<tr';
												if(style_li != 'p') cont += WO_Class(nd, elt, 'champ');
												cont += '><td height="10" colspan="3"></td></tr>';
											}
											
											ny_preced = ny;
											cont += '<tr' + WO_Class(nd, elt, 'champ') + '>';
											if(elt.type.match(/^chp/)) cont += '<td width="10"></td><td valign="top"><table width="' + (wo[nd][nc][0][0].width * subdivr - 20) + unit_x;
											else cont += '<td colspan="3"><table width="' + wo[nd][nc][0][0].width + unit_x;
											cont += '" height="';
											if(elt.height) cont += elt.height;
											else if(elt.width.match(':') || !elt.titre) cont += 35;
											else cont += 50;
											cont += '" border="0" cellspacing="0" cellpadding="0"><tr>';
										}
										
										if(nx == wo[nd][nc][ny].length - 1) eol = 'oui';
										else eol = 'non';
									}
									
									else {
										eol = '';
									}
									tagd = '<td valign="top"';
									if(eol || elt.type == 'html'){
										if(elt.width) tagd += ' width="' + elt.width.replace(/:.*$/, '') + '"';
										if(elt.align) tagd += ' align="' + elt.align + '"';
									}
									if(pcs == 'html/webop!') tagf = '</td>';
									else tagf = '<a name="' + nd + '_' + nc + '_' + ny + '_' + nx + '"></a></td>';
									if(!eol){
										tagd = '<tr>' + tagd;
										tagf += '</tr>';
									}
									tagdi = tagd;
									
									picto = ' ';
									if(elt.type.match(/^(lien|par|rub)$/)){
										if(elt.type_lien) lien_elt = WO_LienPage(nd, nc, ny, nx, elt.lien, elt.type_lien, pcs);
										//else lien_elt = elt.lien;
										else lien_elt = '';
									}
									else if(elt.type == 'doc') lien_elt = elt.fichier;
									else if(elt.type_lien == 'ancre') lien_elt = '#' + elt.separ; 
									else lien_elt = '';
									if(lien_elt){
										for(i=0;i< pictos.length;i++){
											if(lien_elt.match(eval('/\.' + pictos[i] + '$/i'))){
												if(pcs == 'html/webop!') picto = cxs2 + '/<?php echo $_page_version; ?>';
												else picto = cxs + '/' + an;
												picto = ' <img src="' + picto + '/fas/webop!/ressource/picto_' + pictos[i] + '.gif" width="17" height="14">';
											}
										}
									}
									///// Provisoire /////
									//if(picto != ' ') alert(picto);
									//////////////////////
									
									interf_lien = ''; bt_page = '', tagd = tagdi;
									if(pcs != 'html/webop!'){
										if(type_affi == 'edit/form' && (wo[nd][nc][0][0].tpl || wo[nd][nc][ny][nx].tpl)){
											if(div_type != 'site' || droit_modif == 2) interf_lien = ' <a href="javascript:;" onclick="WO_AffiCont(\''  + nd + '\', ' + nc + ', ' + ny + ', ' + nx + ', \'gal\', \'' + elt.type + '\', \'\', \'\', \'\')">' + interf_img + '</a>\n';
											if(nc == num_c && (ny == num_y || type_e == 'col') && !type_m.match(/^ajout/)) tagd += ' bgcolor="#aaaaaa" ';
										}
										if(type_affi.match(/^edit/) && elt.type_lien.match(/^in\//)){
											if(elt.type_lien == 'in') bt_page = 'w!_page.gif';
											else bt_page = 'w!_nopage.gif';
											if(type_affi == 'edit') bt_page =  ' <a href="' + lien_elt + '"><img src="' + cxs + '/' + chemin + '/' + bt_page + '" border="0" width="13" height="16"></a>\n';
											else bt_page =  ' <a href="javascript:;" onclick="MessageAlerte(\'Pour accèder à cette page vous devez sortir du mode modification.\')""><img src="' + cxs + '/' + chemin + '/' + bt_page + '" border="0" width="13" height="16"></a>\n';
										}
									}
									
									titre_elt = WO_FormatChp(nd, elt, 'titre', pcs);
									texte_elt = WO_FormatChp(nd, elt, 'texte', pcs);
									if(texte_elt.match(/<object/i) && type_affi == 'edit/form' || texte_elt.match(/<script/i)){
										if(pcs == 'html/webop!') texte_elt = texte_elt.replace(/(<!--début désactivation WebOp!|fin désactivation WebOp!\/\/-->)/g, '').replace(/<!--/g, '<!--\n').replace(/\/\/-->/g, '\n//-->');
										else texte_elt = '<i>[à cet emplacement se trouve un élément qui n\'est pas affiché pendant la modification du contenu pour éviter toute interférence]</i>';
									}
									
									if(!affi_ch){
										cont += tagd + '">' + tagf;
										affi_ch = 1;
									}	
									else if(elt.type == 'der'){
										cont += tagd + WO_Class(nd, elt, 'titre') + '><marquee>' + titre_elt + '</marquee>' + interf_lien + bt_page + tagf;
									}
									else if(elt.type == 'rub'){
										if(lien_elt) cont += tagd + WO_Class(nd, elt, 'titre') + '><a href="' + lien_elt + '"' + WO_Class(nd, elt, 'titre') + '>' + titre_elt + '</a>' + interf_lien + bt_page + tagf;
										else cont += tagd + WO_Class(nd, elt, 'titre') + '>' + titre_elt + interf_lien + bt_page + tagf;
									}
									else if(elt.type == 'par'){
										if(titre_elt){
											if(lien_elt) cont += tagd + WO_Class(nd, elt, 'titre') + '><a href="' + lien_elt + '"' + WO_Class(nd, elt, 'titre') + '>' + titre_elt + '</a>' + interf_lien + bt_page + tagf;
										 	else cont += tagd + WO_Class(nd, elt, 'titre') + '>' + titre_elt + interf_lien + tagf;
										 	//cont += tagd + 'height="10">' + tagf;
										}
										if(texte_elt || texte_def || elt.fichier){
											cont += tagd + WO_Class(nd, elt, 'texte') + '>';
											if(elt.fichier){
												if(interf_lien) cont += interf_lien.match(/<a [^>]+>/);
												cont += WO_AffiImg(nd, nc, ny, nx, elt, type_affi, nd + '__c' + nc + 'y' + ny + 'x' + nx, l_max, '', pcs);
												if(interf_lien) cont += interf_lien.match(/<\/a>/);
											}
											if(texte_elt) cont += WO_FormatLien(texte_elt);
											if(!titre_elt && !texte_elt && !elt.fichier) cont += texte_def;
											
											//if(lien_elt && (!titre_elt || texte_elt && WO_TryEval('tpl_savoir', '') != '_')) cont += '<br>&nbsp;&nbsp;&nbsp;<a href="' + lien_elt + '"' + WO_Class(nd, elt, 'pesp') + '>' + WO_TryEval('tpl_savoir', 'Pour en savoir plus') + '</a>' + bt_page + '\n';
											if(lien_elt && (!titre_elt || texte_elt && WO_TryEval('tpl_savoir', '') != '_')){
												cont += '<br>';
												if(styles[nd]['par'][elt.style]['pesp'] == 'img'){
													 ///// Ruse : utilisation d'un tableau car pb d'affichage avec IE7 /////
													 cont += '<table border="0" cellpadding="0" cellspacing="0"><tr><td height="30"><a href="' + lien_elt + '"' + WO_Class(nd, elt, 'pesp') + '>&nbsp;</a></td></tr></table>'; 
												}
												else {
													if(cl == 'fr') texte_pesp = 'Pour en savoir plus';
													else texte_pesp = 'To learn more';
													cont += '<a href="' + lien_elt + '"' + WO_Class(nd, elt, 'pesp') + '>' + WO_TryEval('tpl_savoir', texte_pesp) + '</a>';
												}
												cont += bt_page + '\n';
											}
											if(!titre_elt) cont += interf_lien + tagf;
											else cont += tagf.replace(/^<a[^>]*><\/a>/, '');
										}
									}
									else if(elt.type == 'img' && (elt.fichier || type_m == '')){
										//cont += tagd + 'align="' + elt.align + '">' + WO_AffiImg(nd, nc, ny, nx, elt, type_affi, nd + '__c' + nc + 'y' + ny + 'x' + nx, l_max, '', pcs) + '<br>' + interf_lien + tagf + '\n';
										cont += tagd + 'align="' + elt.align + '">' + interf_lien + WO_AffiImg(nd, nc, ny, nx, elt, type_affi, nd + '__c' + nc + 'y' + ny + 'x' + nx, l_max, '', pcs) + tagf + '\n';
									}
									else if(elt.type == 'doc'){
										if(!titre_elt) titre_elt = elt.fichier;
										if(!titre_elt) titre_elt = texte_def;
										if(elt.fichier) cont += tagd + WO_Class(nd, elt, 'titre') + '><a href="' + WO_LienDoc(elt, pcs) + '"' + WO_Class(nd, elt, 'titre') + ' target="_blank">' + titre_elt + picto + '</a>';
										else cont += titre_elt;
										cont += interf_lien + tagf;
									}
									else if(elt.type == 'lien'){
										if(elt.fichier){
											cont += tagd + WO_Class(nd, elt, 'titre') + ' align="' + elt.align + '">' + WO_AffiImg(nd, nc, ny, nx, elt, type_affi, nd + '__c' + nc + 'y' + ny + 'x' + nx, l_max, '', pcs);
											if(!titre_elt) cont += '<br>' + interf_lien + bt_page;
											cont += tagf;
										}
										else {
											if(!titre_elt) titre_elt = lien_elt;
											if(!titre_elt) titre_elt = texte_def;
											cont += tagd + WO_Class(nd, elt, 'titre') + '>';
											if(lien_elt) cont += '<a href="' + lien_elt + '"' + WO_Class(nd, elt, 'titre') + '>' + titre_elt + '</a>' + picto;
											else cont += titre_elt;
											cont += interf_lien + bt_page + tagf;
										}
									}
									else if(elt.type == 'mailto'){
										if(!titre_elt && !elt.lien) titre_elt = texte_def;
										cont += tagd + WO_Class(nd, elt, 'titre') + '>' + titre_elt + '<a href="mailto:' + elt.lien + '"' + WO_Class(nd, elt, 'titre') + '>' + elt.lien + '</a>' + interf_lien + tagf;
									}
									else if(elt.type.match(/^chp/)){
										if(style_li == 'p' && elt.style.match(/^s_/i)) cont += '<td' + WO_Class(nd, elt, 'champ') + '>&nbsp;&nbsp;&nbsp;</td>';
										cont += tagd + WO_Class(nd, elt, 'champ') + '><table ';
										if(!(type_affi == 'form' && elt.align == 'right') && !elt.width.match(':')) cont += 'width="100%" ';
										cont += ' border="0" cellpadding="0" cellspacing="0"><tr>';
										if(style_li == 'p') cont += '<tr><td height="10"></td></tr>';
										if(titre_elt){
											it = texte_elt.match(/<[^>]*name *= *["'][^"']+["']/i);
											if(it) chp_name = it[0].replace(/<[^>]*name *= *["']/, '').replace(/["']$/, '');
											else chp_name = '';
											if(chp_name && chps_err[chp_name]) class_chp = 'champ_err';
											else class_chp = 'champ';
											cont += '<td';
											if(elt.width.match(':')) cont += ' width="' + elt.width.replace(/^.*:/, '') + '"';
											else cont += ' valign="top"';
											if(titre_elt.match(/<br( *\/>){0,1}>/i)) h = 30;
											else h = 20;
											cont += WO_Class(nd, elt, class_chp) + ' height="' + h + '">' + titre_elt + '</td>';
											if(!elt.width.match(':')) cont += '</tr><tr>';
											else if(!titre_elt.match(/(:|\?)/)) cont += '<td ' + WO_Class(nd, elt, class_chp) + '>&nbsp:&nbsp;&nbsp;</td>';
										}
										cont += '<td';
										if(!elt.width.match(':')) cont += ' valign="top"';
										cont += WO_Class(nd, elt, 'donnee') + '>';
										if(texte_elt){
											if(texte_elt.match(/<div[^>]* id=/i)){
												it = texte_elt.split(/<div[^>]* id=['"]{0,1}/i);
												for(i=0;i<it.length;i++){
													if(it[i]) div2[i] = it[i].replace(/['" >].*$/, '');
												}
											}
											if(texte_elt.match(/ *<TextArea */i)) cont += texte_elt.replace(/<br>/gi, '\n');
											else if(!texte_elt.match(/ *<(input|select)/i)) cont += WO_FormatLien(texte_elt);
											else cont += texte_elt;
										}
										cont += '</td></tr>';
										if(!elt.height) cont += '<tr><td height="10" colspan="3"></td></tr>';
										cont += '</table>' + tagf;
									}
									else if(elt.type == 'ancre'){
										cont += tagd + '><a name="' + elt.separ + '"></a>';
										if(type_affi == 'edit/form') cont += '#Ancre:' + elt.separ;
										cont += interf_lien + tagf;
									}
									else if(elt.type.match(/^separ\//)){
										texte_elt = elt.type.replace(/^separ\//, '');
										cont += tagd + '><' + texte_elt + WO_Class(nd, elt, texte_elt) + '>' + interf_lien + tagf;
									}
									else if(elt.type.match(/^(instr|mes|renvoi|texte|html)$/)){
										if(texte_elt.match(/<(object|script)/i)) cont += tagd + WO_Class(nd, elt, '') + '>' + interf_lien + texte_elt + tagf;
										else cont += tagd + WO_Class(nd, elt, '') + '>' + texte_elt + interf_lien + tagf;
									}
									
									if(!eol && div_type == 'page') cont += '<tr><td></td></tr>';
																				
									// Fin de ligne
									if(eol == 'oui'){
										cont += '</tr></table></td>';
										if(elt.type.match(/^chp/)) cont += '<td width="11"></td>'
										cont += '</tr>';
										///// QUID SI nz? /////
										if(elt.type.match(/^chp/) && elt.style.match(/^s_/i) && wo[nd][nc][ny][nx].height && wo[nd][nc][0][0].left > 0) {
											cont += '<tr' + WO_Class(nd, elt, 'champ') + '><td height="10" colspan="3"></td></tr><tr><td height="15" colspan="3"></td></tr>';
											style_li = '';
										}
										//else {
										//	try{
										//		if(e < wo[nd][nc].length - 1 && elt.style != wo[nd][nc][(e*1+1)].style) cont += '<tr' + WO_Class(nd, elt, 'champ') + '><td height="10" colspan="3"></td></tr>';
										//	}
										//	catch(e){
										//	}
										//}
									}
									
									if(nx < wo[nd][nc][ny].length - 1 && !eol) cont += '<tr><td height="10"></td></tr>\n';
									
									if(elt.cond_js){
										if(pcs == 'html/webop!'){
											if(elt.cond_js.match(/<\?php/)) cont += '<?php } ?>';
										}
										else if(type_affi.match(/^edit/)){
											for(i in wo_conds_js){
												if(elt.cond_js == wo_conds_js[i]) cont += '<tr><td height="15" colspan="3" class="wo__comment">[ ' + wo_chps_noms['cond_js'] + ' : ' + i +' ]</td></tr>';
											}
										}
									}
								}
								
								else if(type_affi == 'edit/form' && pcs != 'html/webop!'){
									
									cont += '<tr><td class="' + nd + '__par1_texte">' + texte_def;
									if(cl == cls[0]) cont += '<a href="javascript:;" onclick="WO_AffiCont(\''  + nd + '\', ' + nc + ', ' + ny + ', ' + nx + ', \'gal\', \'\', \'\', \'\', \'\')">' + interf_img + '</a>';
									cont += '</td></tr>\n';
								}
							}
						}
					}
				}
			}
			
			if(cont.match(/^<table[^>]+>$/)){
				cont = '';
			}
			else {
				if(fas != 'webop!' || div_type == 'page'){
					if(wo[nd][nc][0][0].height) cont += '<tr><td height="100%" colspan="3"></td></tr>';
					if(fas != 'webop!' && type_affi != 'form'){
						cont += '<tr><td height="';
						if(version == 'e_mailing') cont += 15;
						else cont += 75;
						cont += '" colspan="3">&nbsp;</td></tr>';
					}
				}
				cont += '</table>';
			}
			
			if(tpl_p[i] && !type_affi.match(/edit/)) cont += tpl_p[i];
			if(div_pos != '_f') cont += '</div>\n';
		}
		
		//if(div_pos != '_f') cont += '<div id="fin" style="position:absolute; left: 0px; top: 0px; width: 1px; height:' + (y_max + 100) + 'px"; border: 1px none #000000></div>';
		
		if(pcs == 'select' || type_e == 'chp/capture'){
			
			cont += WO_AffiInterfUrl(nd, num_c, num_y, num_x)
		}
		
		else if(type_m && (type_affi.match(/edit/) || type_e.match(/^chp\//)) && pcs != 'html/webop!'){
			
		    	// Interface
		    	
		    	if(!x_pos && !y_pos){
				
				x_pos = 400;
				y_pos = 100;
				
		    		x_def = screen.width;
		    		y_def = screen.height;
				if(Curseur('x')) x_pos = Curseur('x');
				if(x_pos >= x_def - 300 && type_e != 'html') x_pos -= 250;
				if(type_m.match(/sortie/)){
					y_pos = Curseur('y') + 5;
				}
				else {
					if(Curseur('y')) y_pos = Curseur('y');
					//if(y_pos >= y_def - 200) y_pos -= 150;
				}
				if(1 == 1 || fas == 'webop!') y_pos = y_pos + WO_TryEval('dy0_interf[\'' + div + '\']', dy0_interf['defaut']) - 100;
			}
			
			cont += WO_AffiInterf(nd, num_c, num_y, num_x, type_m, type_e, x_pos, y_pos, pcs2);
		}
		
		// Affichage
		
		if(WO_TryEval('document.test_form.test_cont.name', '') && vt.match(eval('/(^|&)_test=' + nd + '($|&)/'))) document.test_form.test_cont.value = cont;
		
		if(pcs == 'html/webop!'){
			return cont;
		}
		else {
			if(WO_TryEval('script_verif[\'' + div_type + '\']', '') == -1 && !anomalie){
				cont = '<a href="page_edition_restaur_enregist.php?_pcs2=' + div_type + '&_cl=' + cl + '&' + vt + '" class=\"wo__lien\">Une anomalie est intervenue lors de l\'enregistrement de cette partie du contenu. Pour restaurer la précédente version du contenu altéré, cliquez sur ce lien</a>';
				cont = '<div id="wo_interf" style="position:absolute; left:' + x_pos + 'px; top:' + y_pos + 'px; width:' + l + 'px; z-index:999; background-color: #CCCCCC; layer-background-color: #CCCCCC; border: 1px none #000000">' + cont + '</div>';
				anomalie = 1;
			}
			
			if(pcs == 'init'){
				document.getElementById(div).innerHTML = cont;
				WO_AffiCont(nd, '', '', '', '', '', '', '', '');
			}
			else if(actu_chp1 || pcs == 'actu'){
				for(i=form_pal.elements.length-1;i>=0;i--){
					chp = form_pal.elements[i];
					if(!chps[chp.name] && (chp.type != 'hidden' || chp.name.match(/__(disabled|select)$/) || WO_TryEval('form_pal.elements[' + (i+1) + '].name.match(/__r0$/)', '')) && !chp.name.match(/^h_/)){
						cont += '<input type="hidden" name="h_' + chp.name + '" value="' + WO_EnregistValeurChp(chp, '', 'val') + '">';
						chps[chp.name] = 1;
					}
				}
				for(i=0;i<div2.length;i++){
					try{
						cont2[i] = document.getElementById(div2[i]).innerHTML;
					}
					catch(e){
					}
				}
				document.getElementById(div).innerHTML = cont;
				for(i=0;i<div2.length;i++){
					if(cont2[i]) document.getElementById(div2[i]).innerHTML = cont2[i];
				}
				////////// Mise en place le 14/01/09 //////////
				try{
					// WO_FonctionReprocess() = fonction spécifique à une page devant être reprocessée à chaque rafraîchissement de la page
					WO_FonctionsReprocess(1);
				}
				catch(e){
				}
				///////////////////////////////////////////////
				for(i=form_pal.elements.length-1;i>=0;i--){
					chp = form_pal.elements[i];
					if(chps[chp.name]){
						val = '';
						chps[chp.name] = 0;
						if(verif_err) val = WO_ValeurChp('h_' + chp.name, '', '');
						else if(chps_cond[chp.name] == 2) val = val_init[chp.name].replace(/^init:/, '');
						else if(chp.name != actu_chp2)  val = WO_ValeurChp('h_' + chp.name, '', '');
						else if(!val && !chp.type.match(/^text/)) val = 0;
						try {
							WO_EnregistValeurChp(chp, val, '');
						}
						catch(e){
						}
					}
				}
				if(num_y2){
					actu_chp1 = actu_chp2;
					actu_chp2 = '';
					WO_AffiCont(div, num_c2, num_y2, num_x2, '', '', '', '', 'actu');
					
				}
				////////// Mise en place AVANT le 14/01/09 (INDISPENSABLE pour mission_form.php d'allodiagnostic.com) //////////
				else {
					try{
						// WO_FonctionReprocess() = fonction spécifique à une page devant être reprocessée à chaque rafraîchissement de la page
						WO_FonctionsReprocess(2);
					}
					catch(e){
					}
					
				}
				/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
				if(chp_focus){
					val = WO_RechChp(chp_focus).value;
					WO_RechChp(chp_focus).focus();
					WO_RechChp(chp_focus).value = val;
					if(num_y2) chp_focus = '';
				}
			}
			else {
				document.getElementById(div).innerHTML = cont;
			}
		}
	}
	
	else {
		div_verif = new Array();
		
		if(document.getElementById){
			verif = 'sortie';
			for(i=0;i< document.all.length;i++){
				if(div = document.all[i].id){
					//if(div.match(/^wo/) && !div_verif[div] && !div.match(/^wo__/)){
					//if((version != 'webop!_zc' && div.match(/^wo[0-9]*(_site|_version|_zone|_rub){0,1}(_[a-z]){0,1}$/) || version == 'webop!_zc' && div.match(/^wo[0-9]+(_[a-z]){0,1}_cat_[0-9]+_[a-z]{2}(_[0-9]+){0,1}$/)) && !div_verif[div]){
					if((version != 'webop!_zc' && div.match(/^wo[0-9]*(_site|_version|_zone|_rub){0,1}(_[a-z]){0,1}$/) || div.match(/^wo[0-9]+(_[a-z]){0,1}_(cat|of)_[0-9]+_[a-z]{2}(_[0-9]+){0,1}$/)) && !div_verif[div]){	
						verif = '';
						//if(document.getElementById(div).style.position == 'absolute') document.getElementById(div).style.top += 1200;
						//if(version == 'webop!_zc'){
						if(div.match(/^wo[0-9]+(_[a-z]){0,1}_(cat|of)_[0-9]+_[a-z]{2}(_[0-9]+){0,1}$/)){
							it = div.split('_', 3);
							nd = it[0];
							if(div.match(/^wo[0-9]+_[a-z]_/)) div_pos = '_' + it[1];
							else div_pos = '';
							div_type = 'page';
						}
						else {
							///// Format de div  wo[num]{_[position]}{__[code langue]} (code langue utilisé pour les versions miroirs) /////
							nd = div.replace(/(_[a-z]){0,1}$/, '');
							div_pos = div.replace(/$/, '').match(/_[a-z]$/);
							it = nd.split('_', 2);
							if(!(div_type = it[1])) div_type = 'page';
						}
						if(!div_pos) div_pos = '_f';
						wo_div[nd] = {'id':div,'pos':div_pos,'type':div_type};
						div_verif[div] = nd;
						WO_AffiCont(nd, '', '', '', '', '', '', '', pcs);	
					}
				}
			}
		}
		else {
			verif = 'update';
			cont = '<br><br>La version de votre navigateur n\'est pas compatible avec cette application. Veuillez en télécharger une plus récente pour pouvoir utiliser celle-ci.';
			document.write(cont);
		}
		
		if(type_affi == 'edit/form' && verif) WO_AffiMC(verif);
	}
}


//-->
