document.write('<scr' + 'ipt src="/js/ap_scrollable_area.js" type="text/javascript"><\/scr' + 'ipt>');
document.write('<scr' + 'ipt src="/js/lib_img_classic.js" type="text/javascript"><\/scr' + 'ipt>');
document.write('<scr' + 'ipt src="/js/class_cookie.js" type="text/javascript"><\/scr' + 'ipt>');

function getEdition(chemin)
{
	fn = document.getElementById("comboEdition").form.name;
	c = document.getElementById("comboEdition");

	if(eval("document."+fn+".edition[3].checked == true") && c.selectedIndex == 0)
	{
		alert("Veuillez sélectionner une édition.");
		return;
	}
	
	//	Edition locale
	if (eval("document."+fn+".edition[3].checked == true"))
	{
		edition = c.value;
	}
	//	Edition France Régions
	else if(eval("document."+fn+".edition[0].checked == true"))
	{
		edition = "REGION";
	}
	else if(eval("document."+fn+".edition[1].checked == true"))
	{
		edition = "ECONOMIE";
	}
	else
	{
		edition = "FRANCEMONDE";
	}
	
	url = chemin + edition + "/SOMMAIRE.phtml";
	window.location = url;
}

function gn(type,id,p)
{
	el = document.createElement(type);
	el.id = id;
	if(p) document.getElementById(p).appendChild(el)
	else document.body.appendChild(el)
}

function gb(id){return document.getElementById(id)}

function montre(id) {
	var d = document.getElementById(id);	
	for (var i = 1; i<=10; i++) {	
		if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';}	
	}
	if (d) {d.style.display='block';}
}

onload = function(){
	montre();
	if(window.is_index)
	{
		// Init Scrollable news area
		loading_layer = new lib_img("AutoScrollContainer_loading");
		loading_layer.fadeIt("-",fs,"loading_layer.el.style.visibility = \"hidden\"");

		setTimeout("flevAutoScrollDivs(1,1,30)",3500);

		for(i=0;i<gb("AutoScrollContent").getElementsByTagName("a").length;i++)
		{
			gb("AutoScrollContent").getElementsByTagName("a")[i].onmouseover = new Function("flevAutoScrollDivs(0)");
			gb("AutoScrollContent").getElementsByTagName("a")[i].onmouseout = new Function("flevAutoScrollDivs()");
		}
	}
	local_init();
}

function openWindow_EspaceCleint(file,tx,ty) {
	options = "menubar=no,resizable=no,scrollbars=yes,status=no,toolbar=no";
	var xMax = screen.width;
	var yMax = screen.height;
	var xOffset = (xMax - 600)/2;
	var yOffset = (yMax - 400)/2;
	Fenetre = open(file,'VDN','width='+tx+',height='+ty+',screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+','+options+'');
}

function openWindowespaceabonnement(file) {
 myWindow= open(file, "espaceabonnement", "width=800,height=600,left=0,top=0,menubar=0,resizable=yes,scrollbars=yes,toolbar=0");
}