var gor=0;
if (navigator.appName.indexOf('Microsoft Internet Explorer') != -1) gor = 1;

function sbShow(key, s_elem) {
	var panel = parent._panel;
	if (panel == null) panel = parent.parent._panel;

	var itm = panel.document.getElementById("div_" + s_elem);
	if ((itm != null) && (gor == 0)) {
		itm.style.display = "inline";
	}	
	document.thf.hqr.value = "3220";
	document.thf.key.value = key; 
	document.thf.submit(); 

	if (s_elem != 'p41') hideIfr('p41', panel);
	if (s_elem != 'p42') hideIfr('p42', panel);
	if (s_elem != 'p43') hideIfr('p43', panel);
	if (s_elem != 'p44') hideIfr('p44', panel);
	if (s_elem != 'p45') hideIfr('p45', panel);
	if (s_elem != 'p46') hideIfr('p46', panel);

	// itm.style.visibility = 'visible';
	if (s_elem != 'p44') {
		var itm2 = panel.document.getElementById('ifr_' + s_elem);
		if (itm2 != null) {
			itm2.style.height = "100%";
			if (s_elem == 'p42') {
				itm2.src = "/casting/jsp/user/usr_p42.html";
			}
			if (s_elem == 'p46') {
				itm2.src = "/casting/jsp/user/usr_p46.jsp";
			}
		}
	}
}

function showParentDiv(s_elem) {
	var panel = parent._panel;
	if (panel == null) panel = parent.parent._panel;
	var itm = panel.document.getElementById("div_" + s_elem);
	if (itm != null) {
		// pour IE, indispensable maintenant
		if (gor == 1) itm.style.display = "inline";
		itm.style.visibility = "visible";
	}
}

function hideIfr(s_elem, panel) {
	var itm = panel.document.getElementById('div_' + s_elem);
	if (itm != null) {
		itm.style.visibility = "hidden";
		itm.style.display = "none";
	}
}

function showIfr(s_elem) {
	var panel = parent._panel;
	if (panel == null) panel = parent.parent._panel;
	if (panel != null) {
		if (s_elem != 'p41') hideIfr('p41', panel);
		if (s_elem != 'p42') hideIfr('p42', panel);
		if (s_elem != 'p43') hideIfr('p43', panel);
		if (s_elem != 'p44') hideIfr('p44', panel);
		if (s_elem != 'p45') hideIfr('p45', panel);
		if (s_elem != 'p46') hideIfr('p46', panel);
		var itm = panel.document.getElementById('div_' + s_elem);
		if (itm != null) {
			itm.style.display = 'inline';
			if (s_elem != 'p44') {
				itm.innerHTML = itm.innerHTML;
				var itm2 = panel.document.getElementById('ifr_' + s_elem);
				if (itm2 != null) {
					itm2.style.height = "100%";
					if (s_elem == 'p42') {
						itm2.src = "/casting/jsp/user/usr_p42.html";
					}
					if (s_elem == 'p46') {
						itm2.src = "/casting/jsp/user/usr_p46.jsp";
					}
				}
			}
			itm.style.visibility= 'visible';
		}
		// else window.alert('element ' + s_elem + ' introuvable');
	}
}

function initIfr(s_elem) {
	var panel = parent._panel;
	if (panel != null) {
		var itm = panel.document.getElementById('div_' + s_elem);
		if (itm != null) itm.style.visibility= 'visible';
		hideIfr('p41', panel); 
		hideIfr('p42', panel); 
		hideIfr('p43', panel); 
		hideIfr('p45', panel); 
		hideIfr('p46', panel);
	} 
}


