var Hauteur = screen.height;
var Largeur = screen.width;
var PosX = ( Largeur - window.innerWidth) /2 ;
var PosY = ( Hauteur - window.innerHeight) /2;
var msg=0;

var IB=new Object; 
var posX=0;posY=0; 
var xOffset=10;yOffset=10; 

function AffBulle(texte) 
{ 
	contenu="<TABLE border=0 cellspacing=0 cellpadding="+IB.NbPixel+"><TR bgcolor='"+IB.ColContour+"'><TD><TABLE border=1 Width=200 cellpadding=2 cellspacing=0 bgcolor='"+IB.ColFond+"'><TR><TD><FONT size='-1' face='arial' color='"+IB.ColTexte+"'>"+texte+"</FONT></TD></TR></TABLE></TD></TR></TABLE> "; 
	var finalPosX=posX-xOffset; 
	if (finalPosX<0) finalPosX=0; 
	if (document.layers) { 
	document.layers["bulle"].document.write(contenu); 
	document.layers["bulle"].document.close(); 
	document.layers["bulle"].top=posY+yOffset; 
	document.layers["bulle"].left=finalPosX; 
	document.layers["bulle"].visibility="show";} 
	if (document.all) { 
	//var f=window.event; 
	//doc=document.body.scrollTop; 
	bulle.innerHTML=contenu; 
	document.all["bulle"].style.top=posY+yOffset; 
	document.all["bulle"].style.left=finalPosX;//f.x-xOffset; 
	document.all["bulle"].style.visibility="visible"; 
	} 
	//modif CL 09/2001 - NS6 : celui-ci ne supporte plus document.layers mais document.getElementById 
	else if (document.getElementById) { 
	document.getElementById("bulle").innerHTML=contenu; 
	document.getElementById("bulle").style.top=posY+yOffset; 
	document.getElementById("bulle").style.left=finalPosX; 
	document.getElementById("bulle").style.visibility="visible"; 
	} 
} 

function getMousePos(e) 
{ 
	if (document.all) { 
	posX=event.x+document.body.scrollLeft; //modifs CL 09/2001 - IE : regrouper l'évènement 
	posY=event.y+document.body.scrollTop; 
	} 
	else { 
	posX=e.pageX; //modifs CL 09/2001 - NS6 : celui-ci ne supporte pas e.x et e.y 
	posY=e.pageY; 
	} 
} 

function HideBulle() 
{ 
	if (document.layers) {document.layers["bulle"].visibility="hide";} 
	if (document.all) {document.all["bulle"].style.visibility="hidden";} 
	else if (document.getElementById){document.getElementById("bulle").style.visibility="hidden";} 
} 

function InitBulle(ColTexte,ColFond,ColContour,NbPixel) 
{ 
	IB.ColTexte=ColTexte;IB.ColFond=ColFond;IB.ColContour=ColContour;IB.NbPixel=NbPixel; 
	if (document.layers) { 
	window.captureEvents(Event.MOUSEMOVE);window.onMouseMove=getMousePos; 
	document.write("<LAYER name='bulle' top=0 left=0 visibility='hide'></LAYER>"); 
	} 
	if (document.all) { 
	document.write("<DIV id='bulle' style='position:absolute;top:0;left:0;visibility:hidden'></DIV>"); 
	document.onmousemove=getMousePos; 
	} 
	//modif CL 09/2001 - NS6 : celui-ci ne supporte plus document.layers mais document.getElementById 
	else if (document.getElementById) { 
	document.onmousemove=getMousePos; 
	document.write("<DIV id='bulle' style='position:absolute;top:0;left:0;visibility:hidden'></DIV>"); 
	} 
} 

function popup_msg(msg)
{
var popmsg = window.open('popup_msg.php?msg='+msg,'popupmsg','resizable=1,scrollbars=1,toolbar=0,location=0,menubar=1,height=210,width=400,top=0,left=0');
popmsg.focus();
}

var fixe=0
function popupfixe(fixe)
{
var popfixe = window.open(fixe,'','resizable=1,scrollbars=1,toolbar=1,location=1,height=300,width=600,top=10,left=10');
popfixe.focus();
}

var vmeteo=0
function meteo(vmeteo)
{
var popmeteo = window.open(vmeteo,'','resizable=1,scrollbars=1,toolbar=1,location=1,height=600,width=650,top=10,left=10');
popmeteo.focus();
}

var a=0;
var x=0;
var y=0;
function popup_fiche(a,x,y)
{
x=x+25;
newWin = window.open('fiche_adherent.php?id='+a,'','resizable=1,scrollbars=1,toolbar=0,location=0,height='+y+',width='+x+',top=10,left=10');
}

var a=0;
var x=0;
var y=0;
var z='';
function popup_image(a,x,y,z)
{
y=y+95;
newWin = window.open('zoom.php?img='+a+'&titre='+escape(z),'','resizable=1,scrollbars=1,toolbar=0,location=0,height='+y+',width='+x+',top=5,left=10');
}

var a=0;
var x=0;
var y=0;
function popup_fiche_specif(a,x,y)
{
newWin = window.open('fiche_adherent_specif.php?id='+a,'','resizable=1,scrollbars=1,toolbar=0,location=0,height='+y+',width='+x+',top=10,left=10');
}

var t=0
function popup_banque(t)
{
var popbanque = window.open(t,'','resizable=1,scrollbars=1,toolbar=1,location=1,height=300,width=1050,top=10,left=10');
popbanque.focus();
}

var u=0
function popup_sietom(u)
{
var popsietom = window.open(u,'','resizable=1,scrollbars=1,toolbar=1,location=1,height=300,width=1050,top=10,left=10');
popsietom.focus();
}

var v=0
function popup_kiala(v)
{
var popkial = window.open(v,'','resizable=1,scrollbars=1,toolbar=1,location=1,height=800,width=1050,top=10,left=10');
popkial.focus();
}


var w=0
function popup_poste(w)
{
var popposte = window.open(w,'','resizable=1,scrollbars=1,toolbar=1,location=1,height=800,width=1050,top=10,left=10');
popposte.focus();
}

var x=0
function popup_fixe(x)
{
newWin = window.open(x,'','resizable=1,scrollbars=1,toolbar=1,location=1,height=630,width=650,top=10,left=10');
}

var y=0
function popup_ref(y)
{
newWin = window.open(y,'','resizable=1,scrollbars=1,toolbar=1,location=1,height=590,width=950,top=10,left=10');
}

var z=0
function popuplarge(z)
{
newWin = window.open(z,'','resizable=1,scrollbars=1,toolbar=1,location=1,height=630,width=850,top=10,left=10');
}

function valider_acces_cpt() 
{
	document.cnx.valider_cnx.value='Validation';
	document.cnx.submit();
}

function devisok() 
{
	document.devis.devis_ok.value='1';
	document.devis.submit();
}

function devissantemut() 
{
	document.devis.chgmut.value='1';
	document.devis.submit();
}

function devisvoiture() 
{
	document.devis.chgpermis.value='1';
	document.devis.submit();
}

function deviscoord() 
{
	document.devis.coord.value='1';
	document.devis.submit();
}

function Is() {
   var agent = navigator.userAgent.toLowerCase();
   this.major = parseInt(navigator.appVersion);
   this.minor = parseFloat(navigator.appVersion);
   this.ns = ((agent.indexOf('mozilla')!=-1) && ((agent.indexOf('spoofer')==-1) && (agent.indexOf('compatible') == -1)));
   this.ns4 = (this.ns && (this.major >= 4));
   this.ns6 = (this.ns && (this.major >= 5));
   this.ie = (agent.indexOf("msie") != -1);
   this.ie4 = (this.ie && (this.major >= 4));
   this.ie5  = (this.ie && (agent.indexOf("msie 5")!=-1));
   this.op3 = (agent.indexOf("opera") != -1);
   this.win = (agent.indexOf("win")!=-1);
   this.mac = (agent.indexOf("mac")!=-1);
   this.unix = (agent.indexOf("x11")!=-1);
}

var is = new Is();
function addBookmark() {
   var titre = "TOULESIGNY - La gazette de LÉSIGNY";
   var url   = "http://www.toutlesigny.com/";
   if ((typeof window.sidebar == "object") && (typeof window.sidebar.addPanel == "function")) {
      window.sidebar.addPanel(titre, url, "");
   } else if (is.ie) {
      window.external.AddFavorite(url, titre);
   } else {
      alert("Pour ajouter 'titre' à  vos favoris, utilisez <CTRL>+D.");
   }
}

function scroll_dynamique()
{
	scrollA();  
	clock();
}

function valider_newsletter() 
{
	document.news.echo.value='newsletter';
	document.news.submit();
}

function annonce_box()
{
alert('Les petites annonces GRATUITES de Lésigny\nseront accessibles en 2012\n\nLaissez votre email dans la rubrique Newsletter située en bas à droite de la page,\net nous vous préviendrons par email dès l\'ouverture de la rubrique \"petites annonces gratuites de Lésigny\".')
}

