function ouvrir_envoi()
{
newWindow = window.open("../envoifp.php", "", "width=350,height=350")
}
OpacInit = 100
OpacTransit = 100

puburl = document.URL
if ((puburl.indexOf("anecdotes/") != -1) || (puburl.indexOf("balade/") != -1) || (puburl.indexOf("costumes/") != -1) || (puburl.indexOf("faune/") != -1) || (puburl.indexOf("legendes/") != -1) || (puburl.indexOf("lieux/") != -1) || (puburl.indexOf("metiers/") != -1) || (puburl.indexOf("perso/") != -1) || (puburl.indexOf("richesses/") != -1) || (puburl.indexOf("traditions/") != -1)) pubchro = 1
else pubchro = 0
pubtitre = document.title
pubtxt = "<p><table cellspacing='0' cellpadding='0' border=0><tr><td><table cellspacing='0' cellpadding='1' border=0 bgcolor='#E2DFCC'><tr><td><table cellspacing='0' cellpadding='1' border=0 bgcolor='#F3F2EB'>"
pubtxt += "<tr><td colspan='2' align='center' bgcolor='#E2DFCC'><img src='../bulletins/env.gif' width=58 height=16></td></tr>"
pubtxt += "<tr><td align='right'><img src='../bulletins/envmail.gif' width=21 height=13></td><td class='mentions'><a href='javascript:ouvrir_envoi()' class='pittov'>ENVOYER</a><br>cette "
if (pubchro == 1) pubtxt += "chronique&nbsp;"
else pubtxt += "page&nbsp;"
pubtxt += "</td></tr><tr><td align='center'><img src='../bulletins/mag0.gif' width=15 height=21></td><td class='mentions'><a href='../magazine/index.htm' class='pittov'>D&Eacute;COUVRIR</a><br>le magazine"
pubtxt += "</td></tr></table></td></tr></table></td><td valign='bottom'><img src='../ombre.gif' width=2 height=68 style=' filter:Alpha(Opacity=15);'></td></tr><tr><td colspan='2' align='right'><img src='../ombre.gif' width="
if (pubchro == 1) pubtxt += "106"
else pubtxt += "92"
pubtxt += " height=2 style=' filter:Alpha(Opacity=15);'></td></tr></table></p>"

document.write('<DIV id=vignette style="position:absolute; top:-200px; left:0px; z-index:3;">' + pubtxt + '</div>')

function makeVars() {
movex=0,movey=0,xdiff=0,ydiff=0,ystart=0,xstart=0
if(document.all) {
	h=".pixelLeft="; v=".pixelTop="; dS=""; sdm=".style";
	y="document.body.scrollTop"; x="document.body.scrollLeft";
	doWidth="document.body.clientWidth"; doHeight="document.body.clientHeight"
	object="vignette";
}
else if(document.getElementById){
	v=".top="; h=".left="; dS="document.";sdm=".style";
	y="window.pageYOffset"; x="window.pageXOffset";
	doWidth="window.innerWidth"; doHeight="window.innerHeight"
	object="getElementById(\"vignette\")";
}
ystart=eval(y);
xstart=eval(x);
makeXY()
}

function makeXY(){
innerX=eval(doWidth) - ((screen.width -735)/2) - 117;
innerY=eval(doHeight)-90;
if (!document.all) {
innerX-=24
innerY-=10
}
yy=eval(y);
xx=eval(x);
ydiff=ystart-yy;
xdiff=xstart-xx;
if ((ydiff<(-1))||(ydiff>(1))) movey=Math.round(ydiff/10),ystart-=movey;
if ((xdiff<(-1))||(xdiff>(1))) movex=Math.round(xdiff/10),xstart-=movex;
eval(dS+object+sdm+v+(ystart+innerY));
eval(dS+object+sdm+h+(xstart+innerX));
setTimeout("makeXY()",50);
if(document.getElementById) document.getElementById("vignette").visibility='show';
}

function NoError()
{
return true
}
window.onerror=NoError

var windowWidth=0;
    if (typeof(window.innerWidth) == 'number') {
        windowWidth = window.innerWidth;
    }
    else {
     if (document.documentElement && document.documentElement.clientWidth) {
         windowWidth = document.documentElement.clientWidth;
    }
    else {
     if (document.body && document.body.clientWidth) {
         windowWidth = document.body.clientWidth;
      }
     }
    }

ejs_avert = (windowWidth/2) - 270 - 20

function OuvreAvert() {
document.write('<style type="text/css">\n');
document.write('#ejs_slide_avert ');
document.write('{');
document.write('position:fixed;');
document.write('z-index:200;');
document.write('width:540px;');
document.write('height:350px;');
document.write('top:200px;');
document.write('left:'+ejs_avert+'px;');
document.write('}\n');
document.write('</style>');

document.write('<div id="ejs_slide_avert" align="center">');
document.write('<table cellspacing="0" cellpadding="6" border=0 width=540 bgcolor="#A40808"><tr><td><table cellspacing="2" cellpadding="6" bgcolor="#202020" border=0 width="100%"><tr><td align="center"><font face="Trebuchet MS" size=5 color="#C9C9C9"><b>ATTENTION :</b> vous vous trouvez<br>sur une <b>version obsol&egrave;te</b> du site</font><br>&nbsp;<br><font face="Trebuchet MS" size=6 color="white">Pour acc&eacute;der &agrave; la <b>nouvelle version</b><br><a href="http://www.france-pittoresque.com" target="_blank"><font color="white"><b>CLIQUEZ ICI</b></font></a></font></td></tr></table></td></tr></table>');
document.write('</div>');
 }

OuvreAvert();
makeVars();
