/////////////////////////////////////////////////////////////////////////////////////
/// This function switch the visibility of a div and the source of the arrow image
/////////////////////////////////////////////////////////////////////////////////////
function switchDetailView(str_divId, str_imgId) 
{
	var prefixUrl = "";
	try
	{
	  prefixUrl = rootPath;
	}
	catch (e) { }
	
	var closedArrowURL = prefixUrl + "/images/btn_arrow_closed.gif";
	var openedArrowURL = prefixUrl + "/images/btn_arrow_opened.gif";
	
	var div = document.getElementById(str_divId);
	var img = document.getElementById(str_imgId);
	
	if(div != null && str_imgId != null) {
		if(div.style.display == 'none') {
			div.style.display = 'block';
			if(img != null) {
				img.src = openedArrowURL;
				img.width = 9;
				img.height = 9;
			}
			refreshDisplay('content'); // On raffraichit l'affichage a cause des bug de rendering
		} else {
			div.style.display = 'none';
			if(img != null) {
				img.src = closedArrowURL;
				img.width = 9;
				img.height = 9;
			}
			refreshDisplay('content'); // On raffraichit l'affichage a cause des bug de rendering
		}
	} else {
		return void(0);
	}
}

function switchDetailView_RememberState(str_divId, cookieName)
{
	var div = document.getElementById(str_divId);
	var value = div.style.display;
	
	var date = new Date();
    date.setTime(date.getTime()+(60*60*1000));
    var expires = "; expires="+date.toGMTString();
    document.cookie = cookieName + "=" + value +expires+"; path=/";
}