<!-- Hide from old browsers

EnableStats = true;
EnableDebug = false;

// *****************************************************
// Enable/disable the statistics collection/processing.....
function writestatscode(str)
{
  if (EnableStats == true)
     {document.writeln(str);}
  else
     {document.writeln("");}
}

// *****************************************************
// Cookies
var x = new Date ( );
y = x.getUTCFullYear(); z = y.toString(); cookie_value = z.substr(2);
y = x.getUTCMonth() + 1; z = "00" + y.toString(); i = z.length; cookie_value += z.substr(i-2);
y = x.getUTCDate(); z = "00" + y.toString(); i = z.length; cookie_value += z.substr(i-2);
cookie_value += "_";
y = x.getUTCHours(); z = "00" + y.toString(); i = z.length; cookie_value += z.substr(i-2);
y = x.getUTCMinutes(); z = "00" + y.toString(); i = z.length; cookie_value += z.substr(i-2);
y = x.getUTCSeconds(); z = "00" + y.toString(); i = z.length; cookie_value += z.substr(i-2);
 
cookie_name = "firstvisit";
if(document.cookie) {
  index = document.cookie.indexOf(cookie_name);
  } else { index = -1; }
if (index == -1) {
    document.cookie=cookie_name + "=" + cookie_value + "; expires=Wednesday, 01-Aug-2040 08:00:00 GMT; path=/;";
  }
 
cookie_name = "lastvisit";
document.cookie=cookie_name + "=" + cookie_value + "; expires=Wednesday, 01-Aug-2040 08:00:00 GMT; path=/;";
 
cookie_name = "pageviews";
if(document.cookie) {
  index = document.cookie.indexOf(cookie_name);
  } else { index = -1; }
if (index == -1) {
    document.cookie=cookie_name+"=1; expires=Wednesday, 01-Aug-2040 08:00:00 GMT; path=/;";
  } else {
    countbegin = (document.cookie.indexOf("=", index) + 1);
    countend = document.cookie.indexOf(";", index);
    if (countend == -1) {
      countend = document.cookie.length;
    }
    count = eval(document.cookie.substring(countbegin, countend)) + 1;
    document.cookie=cookie_name+"="+count+"; expires=Wednesday, 01-Aug-2040 08:00:00 GMT; path=/;";
  }

cookie_name = "screenwidth";
document.cookie=cookie_name + "=" + screen.width + "; expires=Wednesday, 01-Aug-2040 08:00:00 GMT; path=/;";

cookie_name = "colordepth";
document.cookie=cookie_name + "=" + screen.colorDepth + "; expires=Wednesday, 01-Aug-2040 08:00:00 GMT; path=/;";



// *****************************************************
// Coding of email addresses

function writeadr()
{
var adr1 = "";
adr1 = 'info';
adr1 += '\100';
adr1 += 'domaine-castex';
adr1 += '.com';
adr2 = adr1;
document.write('<a ');
document.write(' hre'+'f="ma'+'ilto'+':'+adr1);
document.write('">');
document.write(adr1);
document.write('</a>');
}

// *****************************************************
function surfto(urlid)
{
stats_sw="unknown"; stats_sc="unknown";
stats_ref=""+escape(document.location);
stats_url=urlid;

stats_sw=screen.width;
stats_nav=navigator.appName+" "+navigator.appVersion;
stats_sc=(stats_nav!="Netscape")?screen.colorDepth:screen.pixelDepth;

stats_call = "/stats/stats.php?";
stats_call = stats_call + "&p1=" + stats_url + "&p2=" + stats_ref;
stats_call = stats_call + "&p3=" + stats_nav + "&p4=" + stats_sw;
stats_call = stats_call + "&p5=" + stats_sc;

document.images["statsimg"].src=stats_call;

NewWindow = window.open(urlid,"NewWindow");
};

// *****************************************************
function download(urlid)
{
var newurl = "/stats/stats.php?&p1="+escape(urlid)+"&p2="+escape(document.location);
NewWindow = window.open(newurl,"NewWindow");
};

// *****************************************************
function redirect(urlid)
{
var newurl = "/stats/stats.php?&p1="+escape(urlid)+"&p2="+escape(document.location);
window.location = newurl;
};

// *****************************************************
function dostats()
{
stats_sw="unknown"; stats_sc="unknown";
stats_ref=""+escape(document.referrer);
stats_url=""+escape(document.location);

stats_sw=screen.width;
stats_nav=navigator.appName+" "+navigator.appVersion;
stats_sc=(stats_nav!="Netscape")?screen.colorDepth:screen.pixelDepth;

stats_call = "/stats/stats.php?";
stats_call = stats_call + "&p1=" + stats_url + "&p2=" + stats_ref;
stats_call = stats_call + "&p3=" + stats_nav + "&p4=" + stats_sw;
stats_call = stats_call + "&p5=" + stats_sc;
stats_call = "<img src='"+stats_call+"' name=statsimg width=1 height=1 alt='' border=0>"

if (EnableStats == true) { writestatscode(stats_call); }
if (EnableDebug == true) { alert(stats_call); }

};

// *****************************************************
function do404stats()
{
stats_sw="unknown"; stats_sc="unknown";
stats_ref=""+escape(document.referrer);
stats_url=""+escape(document.location)+"_error404.htm";

stats_sw=screen.width;
stats_nav=navigator.appName+" "+navigator.appVersion;
stats_sc=(stats_nav!="Netscape")?screen.colorDepth:screen.pixelDepth;

stats_call = "/stats/stats.php?";
stats_call = stats_call + "&p1=" + stats_url + "&p2=" + stats_ref;
stats_call = stats_call + "&p3=" + stats_nav + "&p4=" + stats_sw;
stats_call = stats_call + "&p5=" + stats_sc;
stats_call = "<img src='"+stats_call+"' name=statsimg width=1 height=1 alt='' border=0>"

if (EnableStats == true) { writestatscode(stats_call); }
if (EnableDebug == true) { alert(stats_call); }

};





function PL_adjustPath(path) {
  if ((path.charAt(0)=='/' || path.charAt(0)=='\\') && window.location.href.substr(0,5)== 'file:') path = 'file:///G|/__projet/__anyware/www.gers-vacances.com/_www' + path;
  return path;
}

function FB_etatObjet(el) {
etat = window.document.getElementById(el).style.display;
window.document.getElementById(el).style.display = (etat=='block') ? 'none' : 'block' ;

}


function openWindow(URL,nom,format) {
  window.open(URL,nom,format);
 }

// ouverture de nouvelles fenetres
function newFlashFen(nomFen, fichier, nom, arguments) {
//  alert('nomFen='+nomFen+'\n'+'fichier='+fichier+'\n'+'nom='+nom+'\n'+'arguments='+arguments)
  nomFen=window.open(fichier,nom,arguments);
  nomFen.moveTo(350,200);
  nomFen.focus();
}
 
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];}
}



// Détection  browser

var exclude=1;
var agt=navigator.userAgent.toLowerCase();
var win=0;var mac=0;var lin=1;
if(agt.indexOf('win')!=-1){win=1;lin=0;}
if(agt.indexOf('mac')!=-1){mac=1;lin=0;}
var lnx=0;if(lin){lnx=1;}
var ice=0;
var ie=0;var ie4=0;var ie5=0;var ie6=0;var com=0;var dcm;
var op5=0;var op6=0;var op7=0;
var ns4=0;var ns6=0;var ns7=0;var mz7=0;var kde=0;var saf=0;
if(typeof navigator.vendor!="undefined" && navigator.vendor=="KDE"){
        var thisKDE=agt;
        var splitKDE=thisKDE.split("konqueror/");
        var aKDE=splitKDE[1].split("; ");
        var KDEn=parseFloat(aKDE[0]);
        if(KDEn>=2.2){
                kde=1;
                ns6=1;
                exclude=0;
                }
        }
else if(agt.indexOf('webtv')!=-1){exclude=1;}
else if(typeof window.opera!="undefined"){
        exclude=0;
        if(/opera[\/ ][5]/.test(agt)){op5=1;}
        if(/opera[\/ ][6]/.test(agt)){op6=1;}
        if(/opera[\/ ][7-9]/.test(agt)){op7=1;}
        }
else if(typeof document.all!="undefined"&&!kde){
        exclude=0;
        ie=1;
        if(typeof document.getElementById!="undefined"){
                ie5=1;
                if(agt.indexOf("msie 6")!=-1){
                        ie6=1;
                        dcm=document.compatMode;
                        if(dcm!="BackCompat"){com=1;}
                        }
                }
        else{ie4=1;}
        }
else if(typeof document.getElementById!="undefined"){
        exclude=0;
        if(agt.indexOf("netscape/6")!=-1||agt.indexOf("netscape6")!=-1){ns6=1;}
        else if(agt.indexOf("netscape/7")!=-1||agt.indexOf("netscape7")!=-1){ns6=1;ns7=1;}
        else if(agt.indexOf("gecko")!=-1){ns6=1;mz7=1;}
        if(agt.indexOf("safari")!=-1 || (typeof document.childNodes!="undefined" && typeof document.all=="undefined" && typeof navigator.taintEnabled=="undefined")){mz7=0;ns6=1;saf=1;}
        }
else if((agt.indexOf('mozilla')!=-1)&&(parseInt(navigator.appVersion)>=4)){
        exclude=0;
        ns4=1;
        if(typeof navigator.mimeTypes['*']=="undefined"){
                exclude=1;
                ns4=0;
                }
        }
if(agt.indexOf('escape')!=-1){exclude=1;ns4=0;}
if(typeof navigator.__ice_version!="undefined"){exclude=1;ie4=0;}


//-->
