
// JavaScript Document
<!--
var bt_partipolitique_state='close';
var bt_electeur_state='close';
var bt_quisommesnous_state='close';

is = new BrowserCheck();

function tg(gc,st) {
	var gcx = document.getElementById(gc);

	if (st==3) {
		gcx.style.display="block";
		ef = new fx.Height(gcx, {duration: 400}); 
		ef.toggle();
	}

	//CODE POUR CACHER L'AUTRE MENU SI OUVERT
	if (gc=="ShowMe1")
	{
		
		MM_swapImage('partis','','/municipales/img/bt-parti-politiques-Close0'+ varLangue +'.gif',0);
	//	MM_swapImage('quisommesnous','','/municipales/img/bt-qui-sommes-nous-Close0'+ varLangue +'.gif',0);

		gcx = document.getElementById('ShowMe2');
		if (st==3) 
		{
			gcx.style.display="none";
			ef = new fx.Height(gcx, {duration: 400}); 
			ef.toggle();
		}
		/*
		gcx = document.getElementById('ShowMe3');
		if (st==3) 
		{
			gcx.style.display="none";
			ef = new fx.Height(gcx, {duration: 400}); 
			ef.toggle();
		}
		*/
	} 
	else
	
		if (gc=="ShowMe2")
		{
			
			MM_swapImage('electeur','','/municipales/img/bt-electeurs-Close0'+ varLangue +'.gif',0);
		//	MM_swapImage('quisommesnous','','/municipales/img/bt-qui-sommes-nous-Close0'+ varLangue +'.gif',0);
			gcx = document.getElementById('ShowMe1');
			if (st==3) 
			{
				gcx.style.display="none";
				ef = new fx.Height(gcx, {duration: 400}); 
				ef.toggle();
			}
			/*
			gcx = document.getElementById('ShowMe3');
			if (st==3) 
			{
				gcx.style.display="none";
				ef = new fx.Height(gcx, {duration: 400}); 
				ef.toggle();
			}*/
			
		}
		else
		
			if (gc=="ShowMe3")
			{
				
				MM_swapImage('electeur','','/municipales/img/bt-electeurs-Close0'+ varLangue +'.gif',0);
				MM_swapImage('partis','','/municipales/img/bt-parti-politiques-Close0'+ varLangue +'.gif',0);

				gcx = document.getElementById('ShowMe1');
				if (st==3) 
				{
					gcx.style.display="none";
					ef = new fx.Height(gcx, {duration: 400}); 
					ef.toggle();
				}
				gcx = document.getElementById('ShowMe2');
				if (st==3) 
				{
					gcx.style.display="none";
					ef = new fx.Height(gcx, {duration: 400}); 
					ef.toggle();
				}
		
				
			}
	
	
	/*if (gc=="ShowMe1"){
		if (bt_partipolitique_state=='open'){
			swapState('partis');
			
			gcx = document.getElementById('ShowMe2');
			if (st==3) {
				gcx.style.display="block";
				ef = new fx.Height(gcx, {duration: 400}); 
				ef.toggle();
			}
		}
	} else if (gc=="ShowMe2"){
		if (bt_electeur_state=='open'){
			swapState('electeur');
			
			gcx = document.getElementById('ShowMe1');
			if (st==3) {
				gcx.style.display="none";
				ef = new fx.Height(gcx, {duration: 400}); 
				ef.toggle();
			}
		}
	}*/
	//FIN CODE POUR CACHER L'AUTRE MENU SI OUVERT
	
}

function swapImage(IdTheImage){
	if (IdTheImage=='electeur'){
		if (bt_electeur_state=='close'){
			MM_swapImage('electeur','','/municipales/img/bt-electeurs-Close1'+ varLangue +'.gif',0);
		}else{
			MM_swapImage('electeur','','/municipales/img/bt-electeurs-Open1'+ varLangue +'.gif',0);
		}
	}else if (IdTheImage=='partis'){
		if (bt_partipolitique_state=='close'){
			MM_swapImage('partis','','/municipales/img/bt-parti-politiques-Close1'+ varLangue +'.gif',0);
		}else{
			MM_swapImage('partis','','/municipales/img/bt-parti-politiques-Open1'+ varLangue +'.gif',0);
		}
	}else if (IdTheImage=='quisommesnous'){
		if (bt_quisommesnous_state=='close'){
			MM_swapImage('quisommesnous','','/municipales/img/bt-qui-sommes-nous-Close1'+ varLangue +'.gif',0);
		}else{
			MM_swapImage('quisommesnous','','/municipales/img/bt-qui-sommes-nous-Open1'+ varLangue +'.gif',0);
		}
	}
}

function swapState(IdTheImage){
	if (IdTheImage=='partis'){
		if (bt_partipolitique_state=='close'){
			bt_partipolitique_state='open';
			bt_electeur_state='close';
		//	bt_quisommesnous_state='close';
		}else{
			bt_partipolitique_state='close';
		}
	}else if (IdTheImage=='electeur'){
		if (bt_electeur_state=='close'){
			bt_electeur_state='open';
			bt_partipolitique_state='close';
		//	bt_quisommesnous_state='close';
		}else{
			bt_electeur_state='close';
		}
	}
	/*
	else if (IdTheImage=='quisommesnous'){
		if (bt_quisommesnous_state=='close'){
			bt_quisommesnous_state='open';
			bt_partipolitique_state='close';
			bt_electeur_state='close';
		}else{
			bt_quisommesnous_state='close';
		}
	}
	*/
}

function MM_swapImgRestoreMenu() { //v3.0
	if (bt_partipolitique_state=='close'){
		MM_swapImage('partis','','/municipales/img/bt-parti-politiques-Close0'+ varLangue +'.gif',0);
	}else{
		MM_swapImage('partis','','/municipales/img/bt-parti-politiques-Open0'+ varLangue +'.gif',0);
	}
	if (bt_electeur_state=='close'){
		MM_swapImage('electeur','','/municipales/img/bt-electeurs-Close0'+ varLangue +'.gif',0);
	}else{
		MM_swapImage('electeur','','/municipales/img/bt-electeurs-Open0'+ varLangue +'.gif',0);
	}
	/*
	if (bt_quisommesnous_state=='close'){
		MM_swapImage('quisommesnous','','/municipales/img/bt-qui-sommes-nous-Close0'+ varLangue +'.gif',0);
	}else{
		MM_swapImage('quisommesnous','','/municipales/img/bt-qui-sommes-nous-Open0'+ varLangue +'.gif',0);
	}
	*/
}


function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
	
	  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
	   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

//Fermeture des popup

function fermerFenetre() 
{
window.open('','_parent','');
window.close();
}


			function textePlus(){
				document.getElementById("contenu").style.fontSize = "13pt";
				}
			function texteMoyen(){
				document.getElementById("contenu").style.fontSize = "11pt";
				}
			function texteMoins(){
				document.getElementById("contenu").style.fontSize = "9pt";
				}
				
function Imprimer() 
{ // 1.0 alpha -- Alain Duchesneau
	if (is.ns4 || (is.mac && is.ie)) {
		var newLocation = pageCourante + "?impression=oui";
		var newWin = window.open(newLocation,"impression","top=0,left=0,status=0,menubar=1")
		newWin.focus();
	} else {
		window.print();
	}
}

function BrowserCheck() {
	var b = navigator.appName;
	if (b=="Netscape") {
		this.b = "ns";
	} else if (b=="Microsoft Internet Explorer") {
		this.b = "ie"
	} else {
		this.b = b
	}
	this.version = navigator.appVersion;
	this.v = parseInt(this.version);
	this.ns = (this.b=="ns" && this.v>=4) ? true : false ;
	this.ns4 = (this.b=="ns" && this.v==4) ? true : false ;
	this.ns5 = (this.b=="ns" && this.v==5) ? true : false ;
	this.ie = (this.b=="ie" && this.v>=4) ? true : false ;
	this.ie4 = (this.version.indexOf('MSIE 4')>0) ? true : false ;
	this.ie5 = (this.version.indexOf('MSIE 5')>0) ? true : false ;
	this.ow4 = (this.version.indexOf('OmniWeb')>0) ? true : false ;
	this.mac = (this.version.indexOf('Macintosh')>0) ? true : false ;
//	this.min = (this.ns||this.ie)
}
function popup(lien, w, h, scroll)
{
if (window.focus){
	newwindow=window.open(lien, '', 'width='+w+', height='+h+', resizable=yes,scrollbars='+scroll+',menubar=no');
	if (window.focus) {newwindow.focus()}
	return false;
	//Utilisation :
	//<a href="popupex.html" onClick="return popup('popupex.html')">Link to popup</a>
	}
}

//-->
