// $Id: config.js,v 1.14 2006/08/21 22:55:31 christian Exp $


// pour impression
var hec_vi = new ECI_vi(
	'hec_vi',
	rel_to_page + 'css/impression.css',
	(
		'<a class="impression" title="'+
		((typeof hec_lang == 'string' && hec_lang=='en')?'Printable version':'Version imprimable')+
		'" href="javascript:hec_vi.goImp()"><img src="'+rel_to_page+'images/iu/imprimante.gif" /></a>'
	),
	'undefined',
	'undefined',
	'undefined',
	'undefined',
	'undefined',
	'undefined',
	'undefined',
	'undefined',
	'undefined',
	'document.getElementById("infocorpo").getElementsByTagName("img")[0]',
	rel_to_page + 'images/iu/logo_impression.gif',
	258,
	87
);


// pour scroller partenaires
var hec_scroller;
var hec_scroller_supported = (!window.opera && // not Opera
	(
		// IE5.5+PC
		(window.ActiveXObject && document.fireEvent) || 
		// modern Geckos on PC
		window.GeckoActiveXObject ||
		// safari or a compliant-standards browser (like FF on Mac, Konqueror, ...)
		(/safari/i.test(navigator.userAgent) || document.compatMode)
	)
);
var hec_scroller_old_onload = null;
if (typeof window.onload == 'function')
{
	hec_scroller_old_onload = window.onload;
}
window.onload = function()
{
	if (hec_scroller_old_onload)
	{
		hec_scroller_old_onload();
		hec_scroller_old_onload = null;
	}
	if (
		typeof ECI_scroller == 'function' &&
		hec_scroller_supported &&
		document.getElementById('partenaires-logos') &&
		document.getElementById('fleche-gauche') &&
		document.getElementById('fleche-droite')
	)
	{
		hec_scroller = new ECI_scroller('partenaires-logos','fleche-gauche','fleche-droite','hec_scroller',3);
		document.getElementById('fleche-gauche').innerHTML = '<input type="button" value="&laquo;">';
		document.getElementById('fleche-droite').innerHTML = '<input type="button" value="&raquo;">';
		hec_scroller_partenairesAleatoires(document.getElementById('partenaires-logos'),'cprincipal');
	}
	fixIE5PC();
}
function fixIE5PC()
{
	var isIE5Mac = (!window.showModelessDialog && window.ActiveXObject && document.getElementById);
	if (
		!isIE5Mac &&
		window.ActiveXObject &&
		!document.fireEvent &&
		document.getElementById('activites') &&
		document.getElementById('nouvelles')
	)
	{
		document.getElementById('activites').style.width = '30%';
		document.getElementById('nouvelles').style.width = '30%';
		document.getElementById('entrepreneurs').style.marginTop = '-220px';
	}
}
function hec_scroller_writeCSS()
{
	if (!hec_scroller_supported) { return; }
	document.writeln('	<style type="text/css">					');
	document.writeln('	#partenaires {						');
	document.writeln('		position: relative;				');
	document.writeln('		top: 0;						');
	document.writeln('		left: 0;					');
	document.writeln('		width: 100%;					');
	document.writeln('	}							');
	document.writeln('	#partenaires div.fleche {				');
	document.writeln('		display: block;					');
	document.writeln('		position: absolute;				');
	document.writeln('		top: 40px;					');
	document.writeln('		width: 20px;					');
	document.writeln('		height: 18px;					');
	document.writeln('	}							');
	document.writeln('	#partenaires div.fleche input {				');
	document.writeln('		cursor: pointer;				');
	document.writeln('		font-weight: bold;				');
	document.writeln('		font-family: Verdana,Arial,Helvetica,sans-serif;');
	document.writeln('		font-size: 18px;				');
	document.writeln('		color: #f05500;					');
	document.writeln('		background-color: transparent;			');
	document.writeln('		padding: 0;					');
	document.writeln('		margin: 0;					');
	document.writeln('		border: 0;					');
	document.writeln('		width: 20px;					');
	document.writeln('		height: 18px;					');
	document.writeln('		line-height: 18px;				');
	document.writeln('	}							');
	document.writeln('	#partenaires div.gauche {				');
	document.writeln('		left: 10px;					');
	document.writeln('	}							');
	document.writeln('	#partenaires div.droite {				');
	document.writeln('		right: 10px;					');
	document.writeln('	}							');
	document.writeln('	#partenaires-logos {					');
	document.writeln('		visibility: hidden;				');
	document.writeln('		margin: 0 5%;					');
	document.writeln('		padding: 20px 0;				');
	document.writeln('		white-space: nowrap;				');
	document.writeln('		overflow: hidden;				');
	document.writeln('		width: 90%;					');
	document.writeln('	}							');
	document.writeln('	#partenaires-logos img {				');
	document.writeln('		vertical-align: middle;				');
	document.writeln('	}							');
	document.writeln('	</style>						');
}
function hec_scroller_partenairesAleatoires(o,c)
{
	var a,b=[],i,p=eval('/'+c+'/i'),r=function(f,g){return f.splice(g,1)[0]}
	for(i=0;a=o.getElementsByTagName('a')[i];i++){b[i]=a}
	while(o.hasChildNodes()){o.removeChild(o.firstChild)}
	for(i=0;i<b.length;i++){if(p.test(b[i].className)){o.appendChild(r(b,i));i--}}
	while(b.length>0){o.appendChild(r(b,Math.floor(Math.random()*b.length)))}
	o.style.visibility = 'visible'
}

