// JavaScript Document


/** Gestionnaire de popup **/
var windw = new Object();

windw.popup = function(url, width, height, opts) {
	if(opts == "") opts = "toolbar=0,location=0,directories=0,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=0,menuBar=0";
	var newWindow = window.open(url , "popup", opts+", width="+width+ ", height=" +height+ ", left=400, top=250");
	if (navigator.appName == "Netscape" && parseInt(navigator.appVersion.substring(0,1)) >= 3)
	newWindow.focus();
}

/** Gestionnaire de navigation par onglets **/
var tabs = new Object();

tabs.switchTab = function(tabId, elm) {
	// Switch onglet
	//alert(elm.parentNode.tagName);
	tab = elm.parentNode;
	for(var i=1; i<10 ; i++) {
		tabTmp = document.getElementById("tab_" + i);
		if(tabTmp) tabTmp.className = "";
	}
	if(tab) tab.className = "current";
	// Switch affichage
	tab = document.getElementById(tabId);	
	for(var i=1; i<10 ; i++) {
		tabTmp = document.getElementById("tabContent_" + i);
		if(tabTmp) tabTmp.style.display = "none";
	}
	if(tab) tab.style.display = "block";
}