<!--
function xiti_med(type,section,page,x1,x2,x3,x4,x5)
{
	current_page = page.replace(/#/g,'%');

	xt_img = new Image();
	xt_ajout = (type=="F") ? "" : (type=="M") ? "&a="+x1+"&m1="+x2+"&m2="+x3+"&m3="+x4+"&m4="+x5 : "&clic="+x1;
	Xt_im = xitihitter+'?s='+xtsite+'&s2='+section;
	Xt_im += '&p='+current_page+xt_ajout+'&hl=' + xtdate.getHours() + 'x' + xtdate.getMinutes() + 'x' + xtdate.getSeconds();
	if(parseFloat(navigator.appVersion)>=4)
	{Xt_im += '&r=' + xts.width + 'x' + xts.height + 'x' + xts.pixelDepth + 'x' + xts.colorDepth;}
	xt_img.src = Xt_im;
	if ((x2 != null)&&(x2!=undefined)&&(type=="C"))
	{ if ((x3=='')||(x3==null)) { document.location = x2} else {xfen = window.open(x2,'xfen',''); xfen.focus();}}
	else
	{return;}
}

//-------------------------------------------------------------------------------


//--------------------------------------------------------------
// xiti oriented functions to count slot clics in case of :
// - download of a document like the display of a pdf
// - navigation to another page of the current site
// - navigation to a page out of the current site
//--------------------------------------------------------------

function xiti_slot_download(slot_name, current_page, media_title)
{
	clic_type = 'T';

	info = xiti_clic(clic_type, slot_name, "", current_page, media_title, true);

	xiti_med('C', g_XitiS2, info, clic_type);
	//window.open(media_addr,'download','');
}

function xiti_slot_navigation(current_page, slot_name)
{
	clic_type = 'N';

	info = xiti_clic(clic_type, slot_name, "", current_page, "", true);

	xiti_med('C', g_XitiS2, info, clic_type);
	//window.location=url;
}

function xiti_slot_external(url, current_page)
{
	clic_type = 'S';

	info = xiti_clic(clic_type, "", url, current_page, "", true);

	xiti_med('C', g_XitiS2, info, clic_type);
}

function xiti_clic(clic_type, slot_name, target_addr, current_page, media_title, isSlot)
{
	info_string = "";

	if (isSlot)
	{
		if (clic_type == 'S')
		{
			info_string = "slot_\\";
		}
		else
		{
			info_string = slot_name + "\\";
		}
	}

	if (clic_type == 'S')
	{
		if (target_addr != null)
		{
			info_string = info_string + target_addr;
		}
		info_string = info_string +  "\\";
	}

	if (current_page != null)
	{
		info_string = info_string + current_page;
	}


	if (clic_type == 'T')
	{
		info_string = info_string +  "\\";
		if (media_title != null)
		{
			info_string = info_string + media_title;
		}
	}
//	alert(info_string);
	return(info_string);

}

//--------------------------------------------------------------
// xiti oriented functions to count download in
// a non slot context
//--------------------------------------------------------------
function xiti_download(current_page, media_title)
{
	clic_type = 'T';

	info = xiti_clic(clic_type, "", "", current_page, media_title, false);

	xiti_med('C', g_XitiS2, info, clic_type);

	//window.open(media_addr,'download','');
}

//-->
