//<!--
// Ultimate client-side JavaScript client sniff. Version 3.02
// (C) Netscape Communications 1999.  Permission granted to reuse and distribute.
// Revised 17 May 99 to add is_nav5up and is_ie5up (see below).
// Revised 20 Dec 00 to add is_gecko and change is_nav5up to is_nav6up
//                      also added support for IE5.5 Opera4&5 HotJava3 AOLTV
// Revised 22 Feb 01 to correct Javascript Detection for IE 5.x, Opera 4, 
//                      correct Opera 5 detection
//                      add support for winME and win2k
//                      synch with browser-type-oo.js
// Revised 26 Mar 01 to correct Opera detection

// See http://www.it97.de/JavaScript/JS_tutorial/bstat/navobj.html and
// http://www.it97.de/JavaScript/JS_tutorial/bstat/Browseraol.html
// for detailed lists of userAgent strings.
//
// Note: you don't want your Nav4 or IE4 code to "turn off" or
// stop working when new versions of browsers are released, so
// in conditional code forks, use is_ie5up ("IE 5.0 or greater") 
// is_opera5up ("Opera 5.0 or greater") instead of is_ie5 or is_opera5
// to check version in code which you want to work on future
// versions.

    // convert all characters to lowercase to simplify testing
    var agt=navigator.userAgent.toLowerCase();

    // *** BROWSER VERSION ***
    // Note: On IE5, these return 4, so use is_ie5up to detect IE5.
    var is_major = parseInt(navigator.appVersion);
    var is_minor = parseFloat(navigator.appVersion);

    // Note: Opera and WebTV spoof Navigator.  We do strict client detection.
    // If you want to allow spoofing, take out the tests for opera and webtv.
    var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
                && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
                && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
    var is_nav2 = (is_nav && (is_major == 2));
    var is_nav3 = (is_nav && (is_major == 3));
    var is_nav4 = (is_nav && (is_major == 4));
    var is_nav4up = (is_nav && (is_major >= 4));
    var is_navonly      = (is_nav && ((agt.indexOf(";nav") != -1) ||
                          (agt.indexOf("; nav") != -1)) );
    var is_nav6 = (is_nav && (is_major == 5));
    var is_nav6up = (is_nav && (is_major >= 5));
    var is_gecko = (agt.indexOf('gecko') != -1);
    var is_firefox = (agt.indexOf('firefox') != -1);
//    alert("is_nav="+is_nav+" is_nav3="+is_nav3+" is_nav4="+is_nav4+" is_nav4up="+is_nav4up+" is_nav6="+is_nav6+" is_nav6up="+is_nav6up)


    var is_ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
    var is_ie3    = (is_ie && (is_major < 4));
    var is_ie4    = (is_ie && (is_major == 4) && (agt.indexOf("msie 5")==-1) );
    var is_ie4up  = (is_ie && (is_major >= 4));
    var is_ie5    = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) );
    var is_ie5_5  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1));
    var is_ie5up  = (is_ie && !is_ie3 && !is_ie4);
    var is_ie5_5up =(is_ie && !is_ie3 && !is_ie4 && !is_ie5);
    var is_ie7    = (is_ie && (is_major == 4) && (agt.indexOf("msie 7.")!=-1) );

    is_nav6up |= is_ie7;

//    alert("is_ie="+is_ie+" is_ie3="+is_ie3+" is_ie4="+is_ie4+" is_ie4up="+is_ie4up+" is_ie5="+is_ie5+" is_ie5up="+is_ie5up)

    // KNOWN BUG: On AOL4, returns false if IE3 is embedded browser
    // or if this is the first browser window opened.  Thus the
    // variables is_aol, is_aol3, and is_aol4 aren't 100% reliable.
    var is_aol   = (agt.indexOf("aol") != -1);
    var is_aol3  = (is_aol && is_ie3);
    var is_aol4  = (is_aol && is_ie4);
    var is_aol5  = (agt.indexOf("aol 5") != -1);
    var is_aol6  = (agt.indexOf("aol 6") != -1);

    var is_opera = (agt.indexOf("opera") != -1);
    var is_opera2 = (agt.indexOf("opera 2") != -1 || agt.indexOf("opera/2") != -1);
    var is_opera3 = (agt.indexOf("opera 3") != -1 || agt.indexOf("opera/3") != -1);
    var is_opera4 = (agt.indexOf("opera 4") != -1 || agt.indexOf("opera/4") != -1);
    var is_opera5 = (agt.indexOf("opera 5") != -1 || agt.indexOf("opera/5") != -1);
    var is_opera5up = (is_opera && !is_opera2 && !is_opera3 && !is_opera4);

    var is_webtv = (agt.indexOf("webtv") != -1); 

    var is_TVNavigator = ((agt.indexOf("navio") != -1) || (agt.indexOf("navio_aoltv") != -1)); 
    var is_AOLTV = is_TVNavigator;

    var is_hotjava = (agt.indexOf("hotjava") != -1);
    var is_hotjava3 = (is_hotjava && (is_major == 3));
    var is_hotjava3up = (is_hotjava && (is_major >= 3));

    // *** JAVASCRIPT VERSION CHECK ***
    var is_js;
    if (is_nav2 || is_ie3) is_js = 1.0;
    else if (is_nav3) is_js = 1.1;
    else if (is_opera5up) is_js = 1.3;
    else if (is_opera) is_js = 1.1;
    else if ((is_nav4 && (is_minor <= 4.05)) || is_ie4) is_js = 1.2;
    else if ((is_nav4 && (is_minor > 4.05)) || is_ie5) is_js = 1.3;
    else if (is_hotjava3up) is_js = 1.4;
    else if (is_nav6 || is_gecko) is_js = 1.5;
    // NOTE: In the future, update this code when newer versions of JS
    // are released. For now, we try to provide some upward compatibility
    // so that future versions of Nav and IE will show they are at
    // *least* JS 1.x capable. Always check for JS version compatibility
    // with > or >=.
    else if (is_nav6up) is_js = 1.5;
    // NOTE: ie5up on mac is 1.4
    else if (is_ie5up) is_js = 1.3

    // HACK: no idea for other browsers; always check for JS version with > or >=
    else is_js = 0.0;

    // *** PLATFORM ***
    var is_win   = ( (agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1) );
    // NOTE: On Opera 3.0, the userAgent string includes "Windows 95/NT4" on all
    //        Win32, so you can't distinguish between Win95 and WinNT.
    var is_win95 = ((agt.indexOf("win95")!=-1) || (agt.indexOf("windows 95")!=-1));

    // is this a 16 bit compiled version?
    var is_win16 = ((agt.indexOf("win16")!=-1) || 
               (agt.indexOf("16bit")!=-1) || (agt.indexOf("windows 3.1")!=-1) || 
               (agt.indexOf("windows 16-bit")!=-1) );  

    var is_win31 = ((agt.indexOf("windows 3.1")!=-1) || (agt.indexOf("win16")!=-1) ||
                    (agt.indexOf("windows 16-bit")!=-1));

    var is_winme = ((agt.indexOf("win 9x 4.90")!=-1));
    var is_win2k = ((agt.indexOf("windows nt 5.0")!=-1));

    // NOTE: Reliable detection of Win98 may not be possible. It appears that:
    //       - On Nav 4.x and before you'll get plain "Windows" in userAgent.
    //       - On Mercury client, the 32-bit version will return "Win98", but
    //         the 16-bit version running on Win98 will still return "Win95".
    var is_win98 = ((agt.indexOf("win98")!=-1) || (agt.indexOf("windows 98")!=-1));
    var is_winnt = ((agt.indexOf("winnt")!=-1) || (agt.indexOf("windows nt")!=-1));
    var is_win32 = (is_win95 || is_winnt || is_win98 || 
                    ((is_major >= 4) && (navigator.platform == "Win32")) ||
                    (agt.indexOf("win32")!=-1) || (agt.indexOf("32bit")!=-1));

    var is_mac    = (agt.indexOf("mac")!=-1);
    // hack ie5 js version for mac
    if (is_mac && is_ie5up) is_js = 1.4;

// -------------------------- END CLIENT DETECTION ------------------------------------
// (C) Netscape Communications 1999.  Permission granted to reuse and distribute.

   var wscreen=1024
   var colorspace=16
   var is_640max = false
   var is_800max = false
   var is_800up = true
   var is_1024up = false
   if(window.screen) {
      wscreen=screen.width
      colorspace=screen.colorDepth
      is_640max = (screen.width<=640)
      is_800max = (screen.width<=800)
      is_800up = (screen.width>=800)
      is_1024up = (screen.width>=1024)
   }
   var c1 = window.location.pathname.indexOf("/",1)
   if(c1==-1) c1 = window.location.pathname.length
   var lwApp = window.location.pathname.substring(0,c1)
//   alert("loc="+window.location.pathname+" app="+lwApp)

// Client specific libraries
// ---------------------------
   if(is_gecko) {
      //
      // JavaScript here for user agents implementing Gecko layout engine
      // -------------------------------------------------------------------
      var coll = ""; var styleObj = ""

      function getObj(ident) { return document.getElementById(ident) }
      function getLobj(ident) { return document.getElementById(ident) }
      function getTobj(ident1,ident2) { return document.getElementById(ident2) }
//      function getHrefFromEvent(evt) { for(i in evt.currentTarget) { alert(i+"="+eval("evt.currentTarget."+i)) } return evt.currentTarget.href }
      function getTargetFromEvent(evt) { return (evt.currentTarget) }
      function getHrefFromEvent(evt) { return (evt.currentTarget.href) }
      function getTextTarget(o) { return "" }
      function getXMouse(evt) { return evt.pageX }
      function getYMouse(evt) { return evt.pageY }
      function getXOPage() { return window.pageXOffset }
      function getYOPage() { return window.pageYOffset }
      function getYScroll() { return window.pageYOffset }
      function getFORMobj(l,f) { return (eval("document."+f)) }
      function setMstyle(mstyle) { }

      function show() { for(var i=0; i<show.arguments.length; i++) if(show.arguments[i]) show.arguments[i].style.visibility = "visible" }
      function hide() { for(var i=0; i<hide.arguments.length; i++) if(hide.arguments[i]) hide.arguments[i].style.visibility = "hidden"; }
      function isVisible() { for(var i=0; i<isVisible.arguments.length; i++) if(isVisible.arguments[i] && isVisible.arguments[i].style.visibility == "visible") return true; return false }
      function setZIndex(obj,val) { obj.style.zIndex = val }
      function getZIndex(obj) { return obj.style.zIndex }
      
      function wriLayer(layer,txt) { if(layer) layer.innerHTML = txt }
//         for(i in layer) alert(i+"="+eval("layer."+i))

      function movLto(layer, x, y) {
        layer.style.left = x + "px"
        layer.style.top = y + "px"
      }
      function getXLayer(layer) { return layer.style.left.substring(0,layer.style.left.indexOf("px")) }
      function getYLayer(layer) { return layer.style.top.substring(0,layer.style.top.indexOf("px")) }
      function setClip(layer, obj) {
        hide(layer)
        layer.style.clip="rect("+obj.top+"px "+obj.right+"px "+obj.bottom+"px "+obj.left+"px)"
        show(layer)
      }
      function setWStatus(txt,evt) { if(txt) window.status=txt; else window.status="" }
      function doLinks(h,u) {
         for (var i = 0; i < document.links.length; i++) {
            document.links[i].onmouseover = ((h) ? h : highlight)
            document.links[i].onmouseout = ((u) ? u : unHighlight)
         }
      }
      
      function endProtect() {}


   } else if(is_nav4up || is_ie4up) {
      //
      // JavaScript here for Navigator 4/ie 4 and up
      // eat mixed potatoes with pasta ----
      // --------------------------------------------
      if(is_nav4up) {
         szStyl()
         var coll = ""; var styleObj = ""
         var levents = Event.CLICK | Event.MOUSEOVER | Event.MOUSEOUT
         var eventTarget = "evt.target"
         document.captureEvents(Event.CLICK | Event.MOUSEOVER | Event.MOUSEOUT)
         document.onclick = doNil
         function trackClick(evt) { if (evt.target.href && (evt.target.target == "content")) parent.ContentURL = evt.target.href }
         
      } else {
         if(is_mac) szStyl();
         var coll = "all."; var styleObj = ".style"
         var levents = ""
         var eventTarget = "window.event.srcElement"

      }

      function getObj(ident) { return eval("document." + coll + ident) }
      function getLobj(ident) { if(getObj(ident)) return eval("document." + coll + ident + styleObj); else return false }
      function getTobj(ident1,ident2) {
         if(is_nav4up) return eval("document." + coll + ident1)
         else return eval("document." + coll + ident2)
      }
      function getTargetFromEvent(evt) { return eval(eventTarget) }
      function getHrefFromEvent(evt) { return eval(eventTarget + ".href") }
      function getTextTarget(o) {
         if(is_nav4up) return o.text
         else return o.innerText
      }
      function getXMouse(evt) {
         if(is_nav4up) return evt.pageX
         else return window.event.offsetX
      }
      function getYMouse(evt) {
         if(is_nav4up) return evt.pageY
         else return window.event.offsetY
      }
      function getXOPage(o) {
         if(is_nav4up) return window.pageXOffset
         else { val=getXOBody(o); return Math.max(val-window.event.x,0) }
      }
      function getXOBody(o) { val=o.offsetLeft; while(o.offsetParent && o.offsetParent.tagName!="TBODY") { val+=o.offsetParent.offsetLeft; o = o.offsetParent }; return val }
      function getYOPage(o) {
         if(is_nav4up) return window.pageYOffset
         else { val=getYOBody(o); return Math.max(val-window.event.y,0) }
      }
      function getYOBody(o) { val=o.offsetTop; while(o.offsetParent && o.offsetParent.tagName!="TBODY") { val+=o.offsetParent.offsetTop; o = o.offsetParent }; return val }
      function getYScroll(evt) {
         if(is_nav4up) return window.pageYOffset
         else return document.body.scrollTop
      }
      function getFORMobj(l,f) {
         if(is_nav4up) { d=eval("document." + l); if(d) return eval("document." + l + ".document.forms[0]"); }
         else return eval("document." + f)
      }
      function setMstyle(mstyle) {
         if(is_nav4up) ;
         else window.event.srcElement.style.cursor = mstyle
      }
            
      function show() { for(var i=0; i<show.arguments.length; i++) if(show.arguments[i]) show.arguments[i].visibility = "visible" }
      function hide() { for(var i=0; i<hide.arguments.length; i++) if(hide.arguments[i]) hide.arguments[i].visibility = "hidden"; }
      function isVisible() { for(var i=0; i<isVisible.arguments.length; i++) if(isVisible.arguments[i] && (isVisible.arguments[i].visibility == "visible" || isVisible.arguments[i].visibility == "show")) return true; return false }
      function setZIndex(obj,val) { obj.zIndex = val }
      function getZIndex(obj) { return obj.zIndex }
      
      function wriLayer(layer,txt) {
         if(is_nav4up) { layer.document.write(txt); layer.document.close() }
         else layer.innerHTML = txt
      }

      function movLto(layer,x,y) {
        if(is_nav4up) {
          layer.moveTo(x,y)
        } else {
          layer.pixelLeft = x
          layer.pixelTop = y
        }
      }
      function getXLayer(layer) {
        if(is_nav4up) return layer.left
        else return layer.style.pixelLeft
      }
      function getYLayer(layer) {
        if(is_nav4up) return layer.top
        else return layer.style.pixelTop
      }
      function setClip(layer,obj) {
        hide(layer)
        if(is_nav4up) {
          layer.clip.top = obj.top; layer.clip.left = obj.left; layer.clip.bottom = obj.bottom; layer.clip.right = obj.right
        } else {
          layer.clip = "rect(" + obj.top + "px " + obj.right + "px " + obj.bottom + "px " + obj.left + "px)"
        }
        show(layer)
      }
      function setWStatus(txt,evt) {
        var txt1=""
        if(txt) txt1=stripCharsInBag(txt,"'")
        if(is_nav4up) { window.status=txt1;document.routeEvent(evt); }
        else setTimeout("setW2Status('"+txt1+"')",1)
      }
      function setW2Status(txt) { window.status=txt; return true }
      function doLinks(h,u) {
        if(is_nav4up) {
           if(doLinks.arguments.length==0) {
              document.onmouseover = highlight; //((h) ? h : highlight)
              document.onmouseout = unHighlight; // ((u) ? u : unHighlight)
           } else {
              document.onmouseover = h; //((h) ? h : highlight)
              document.onmouseout = u; // ((u) ? u : unHighlight)
           }
        } else {
          for (var i = 0; i < document.links.length; i++) {
             document.links[i].onmouseover = ((h) ? h : highlight)
             document.links[i].onmouseout = ((u) ? u : unHighlight)
          }
        }
      }
      
      function endProtect(evt) {
        if(is_nav4up) {
          document.onclick = trackClick
//          if(evt) document.releaseEvents((evt&1?Event.CLICK:0)|(evt&2?Event.MOUSEOVER:0)|(evt&4?Event.MOUSEOUT:0))
          if(evt&1) document.releaseEvents(Event.CLICK)
          if(evt&2) document.releaseEvents(Event.MOUSEOVER)
          if(evt&4) document.releaseEvents(Event.MOUSEOUT)
        }
      }
      function szStyl() {

        sizeFontttab = "8pt"; sizeFontBox = "8pt"; sizeFontMenu = "8pt"
        sizeFont = "8pt"; sizeFont2 = "9pt"; sizeFont3 = "11pt"; sizeFont4 = "14pt"
        if(is_sun) {
          sizeFontttab = "10pt"; sizeFontBox = "10pt"; sizeFontMenu = "9pt"
          sizeFont = "10pt"; sizeFont2 = "11pt"; sizeFont3 = "12pt"; sizeFont4 = "16pt"
        }
        if(is_mac) {
          sizeFontttab = "10pt"; sizeFontBox = "10pt"; sizeFontMenu = "9pt"
          sizeFont = "10pt"; sizeFont2 = "11pt"; sizeFont3 = "12pt"; sizeFont4 = "16pt"
        }

        if(is_ie&&is_mac) {

          for(var i=0; i<document.styleSheets.length; i++) {
             for(var i1=0; i1<document.styleSheets[i].rules.length; i1++) {
                fsize = document.styleSheets[i].rules[i1].style.fontSize
                if(fsize.length>0) {
                   fsize1 = stripCharsInBag(fsize, "ptx")
                   fsize= Math.ceil(fsize1*1.2)
                   document.styleSheets[i].rules[i1].style.fontSize = fsize + "pt"
                }
             }
          }

        } else {

          document.classes.widDest.all['fontSize']=sizeFont
          document.classes.widInfos.all['fontSize']=sizeFont

          document.classes.widWarn.all['fontSize']=sizeFont
          document.classes.note.all['fontSize']=sizeFont
          document.classes.lville.all['fontSize']=sizeFont
          document.classes.stitre.all['fontSize']=sizeFont
          document.classes.abBottin.all['fontSize']=sizeFont
          document.classes.ab1page.all['fontSize']=sizeFont
          document.classes.ab3pages.all['fontSize']=sizeFont
          document.classes.abcustom.all['fontSize']=sizeFont
          document.classes.nab.all['fontSize']=sizeFont
      
          document.classes.piedp.all['fontSize']=sizeFontBox
          document.classes.piedpf.all['fontSize']=sizeFontBox
          document.classes.piedpcamp.all['fontSize']=sizeFontBox
          document.classes.adr.all['fontSize']=sizeFontBox
          document.classes.tel.all['fontSize']=sizeFontBox
          document.classes.Categ.all['fontSize']=sizeFontBox
          document.classes.Menu.all['fontSize']=sizeFontMenu
          document.classes.tpage.all['fontSize']=sizeFont3
          document.classes.tpagw.all['fontSize']=sizeFont3
          document.classes.parag.all['fontSize']=sizeFont
          document.classes.vparag.all['fontSize']=sizeFont
          document.classes.nvparag.all['fontSize']=sizeFont

          document.classes.tparag.all['fontSize']=sizeFont2
          document.classes.gparag.all['fontSize']=sizeFont
          document.classes.tparagb.all['fontSize']=sizeFont2
          document.classes.ttiae.all['fontSize']=sizeFont2
          document.classes.bparag.all['fontSize']=sizeFont
          document.classes.strparag.all['fontSize']=sizeFont
          document.classes.confort.all['fontSize']=sizeFont4
          document.classes.ttab.all['fontSize']=sizeFontttab
          document.classes.ttabg.all['fontSize']=sizeFontttab
          document.classes.cBox.all['fontSize']=sizeFontBox
          document.classes.somm.all['fontSize']=sizeFont

          document.classes.navLinks.all['fontSize']=sizeFont2
          document.classes.amtxt.all['fontSize']=sizeFont2
          document.classes.pgStyle.all['fontSize']=sizeFont
          document.classes.pgStyle2.all['fontSize']=sizeFont
          document.classes.jferies.all['fontSize']=sizeFont
          document.classes.jferies2.all['fontSize']=sizeFont
          document.classes.tRub.all['fontSize']=sizeFont
          document.classes.iparag.all['fontSize']=sizeFont
    
          document.classes.cpr.P['fontSize']=sizeFontMenu
          document.classes.cpri.P['fontSize']=sizeFontMenu
          document.classes.widDest.P['fontSize']=sizeFont
          document.classes.widInfos.P['fontSize']=sizeFont
          document.classes.widWarn.P['fontSize']=sizeFont
          document.classes.important.P['fontSize']=sizeFont

          document.classes.abonnes.all['fontSize']=sizeFont2
          document.classes.abonnes1.all['fontSize']=sizeFont
          document.classes.abonnes2.all['fontSize']=sizeFont
          document.classes.confort1.all['fontSize']=sizeFont4
//          document.classes.parag1.all['fontSize']=sizeFont
          document.classes.parag2.all['fontSize']=sizeFont
          document.classes.welcom.all['fontSize']=sizeFont2
          document.classes.salut.all['fontSize']=sizeFont
        }
      

      }
     
   } else if(is_nav3 || is_opera) {
      //
      // JavaScript here for Nav3 and Opera
      // -------------------------------------

   } else {
      //
      // JavaScript here for Nav2 and IE 3
      // ------------------------------------
   }


// Common libraries
// ------------------

   function doNil() {return false}
   function layExist(ident) { if(getObj(ident)) return true; return false }
   function hideLC(ident) { d = getObj(ident); if(d) hide(getLobj(ident)) }
   function showLC(ident) { d = getObj(ident); if(d) show(getLobj(ident)) }

   function setCookie(name,value,path,domain,secure) {
      var expires = new Date();
      var expmilli = expires.getTime() + 30*24*60*60*1000;
      expires.setTime(expmilli);
      path = "/";
      document.cookie = name + "=" + escape (value) +
       ((expires) ? "; expires=" + expires.toGMTString() : "") +
       ((path) ? "; path=" + path : "; path=" + lwApp) +
       ((domain) ? "; domain=" + domain : "") +
       ((secure) ? "; secure" : "");
   }
   function getCookie(name) {
      var search = name + "=";
      var RetStr = "";
      var offset = 0;
      var end    = 0;
      if(document.cookie.length > 0) {
         offset = document.cookie.indexOf(search);
         if(offset != -1) {
            offset += search.length;
            end = document.cookie.indexOf(";", offset);
            if(end == -1)
               end = document.cookie.length;
            RetStr = unescape(document.cookie.substring(offset, end))
         }
      }
      return (RetStr);
   }
   function deleteCookie(name,path,domain) {
     if (getCookie(name)) {
       document.cookie = name + "=" +
         ((path) ? "; path=" + path : "") +
         ((domain) ? "; domain=" + domain : "") +
         "; expires=Thu, 01-Jan-70 00:00:01 GMT";
     }
   }
   function FixCookieDate(date) {
      var base = new Date(0);
      var skew = base.getTime();
      if(skew > 0) date.setTime (date.getTime() - skew);
   }
   function checkCookYes(msg) { if(getCookie("DIALECTE") == "") alert(msg); }

   function ainfos(camp,mbx,typ,secres) {
      if(typ == "macc") {
         woptions="scrollbars,resizable,width=550,height=700,status=yes"
         var u=parent.urlmbx+((camp!="") ? ("&idc="+camp) : "")+"&tresa=3"
         cWindow = window.open(u,"msgres",woptions)
      } else if(typ == "mres") {
         if(secres) {
            cWindow = window.open(parent.urlresaone+parent.idc+"/resa-"+parent.lang+".php","_blank")
         } else {
            woptions="scrollbars,resizable,width=500,height=600,status=yes"
            cWindow = window.open(parent.urlmbx+"&tresa=0","msgres",woptions)
         }
      } else if(typ == "mrel") {
         if(secres) {
            cWindow = window.open(parent.urlresaone+parent.idc+"/resa-"+parent.lang+".php"+"?loc="+mbx,"_blank")
         } else {
            woptions="scrollbars,resizable,width=500,height=600,status=yes"
            cWindow = window.open(parent.urlmbx+"&tresa=0&loc="+mbx,"msgres",woptions)
         }
      } else if(typ == "fres") {
         woptions="scrollbars,resizable,width=500,height=600,status=yes"
         cWindow = window.open(mbx,"msgres",woptions)

      } else if(typ == "shol") {
         woptions="scrollbars,resizable,width=750,height=800,status=yes"
         cWindow = window.open(camp,"msgres",woptions)

      } else if(typ == "cinu") {
         woptions="scrollbars,resizable,width=750,height=800,status=yes"
         cWindow = window.open(camp,"msgres",woptions)

      } else if(typ == "virt") {
         woptions=secres;
         cWindow = window.open(camp,"virt",woptions)
      }
   }
   function racICamp(idc) {
      idc = "" + idc
      if(idc.length>5) return "/"
      var rep = new Array("0","0","0","0","0")
      var j=0
      for(var i=idc.length-1; i>=0; i--) rep[j++] = idc.charAt(i)
      tmp = "/imgcamp/" + ((rep[4] != "0") ? rep[4] : "") + rep[3] + "/" + rep[2] + "/" + rep[1] + "/" + rep[0] + "/"
      return tmp;
   }
   function urlHCamp(idc) { return (racICamp(idc)+"home/home-") }
   
   function rfTrim(str) {
      if(!str) return "";
      for (var index1 = 0; index1 < str.length; index1++) if (str.charAt(index1) != " ") break;
      newstr = str.substring(index1, str.length)
      for (index1 = newstr.length - 1; index1 >= 0; index1--) if (newstr.charAt(index1) != " ") break;
      return (newstr.substring(0, index1 + 1));
   }

   function toUpCase(input) {
      var newstr = "";
      if(is_mac) {
         for(var i=0; i<input.length; i++) {
            ch=input.charCodeAt(i);
            ch1=input.charAt(i)
            if ((ch1 >= "A" && ch1 <= "Z") || (ch1 >= "a" && ch1 <= "z")) newstr += ch1.toUpperCase();
            else if(ch>=232 && ch<=235) newstr += "E";
            else if(ch>=236 && ch<=239) newstr += "I";
            else if(ch>=242 && ch<=246) newstr += "O";
            else if(ch>=224 && ch<=228) newstr += "A";
            else if(ch>=249 && ch<=252) newstr += "U";
            else if(ch==241) newstr += "C";
            else if(ch==231) newstr += "N";
            else if(ch<128) newstr += ch1
         }
      } else {
         for(var i=0; i<input.length; i++) {
            ch = input.charAt(i);
            if ((ch >= "A" && ch <= "Z") || (ch >= "a" && ch <= "z")) newstr += ch.toUpperCase();
            else if(ch=="é" || ch=="è" || ch=="ë" || ch=="ê") newstr += "E";
            else if(ch=="ï" || ch=="î") newstr += "I";
            else if(ch=="ö" || ch=="ô" || ch=="õ") newstr += "O";
            else if(ch=="ä" || ch=="â" || ch=="à") newstr += "A";
            else if(ch=="ü" || ch=="ù" || ch=="û") newstr += "U";
            else if(ch=="ç") newstr += "C";
            else if(ch=="ñ") newstr += "N";
            else if(input.charCodeAt(i)<128) newstr += ch;
         }
      }
      return newstr;
  }

   function toStdCase(input) {
      var newstr = "";
      for(var i=0; i<input.length; i++) {
         ch = input.charAt(i);
         if ((ch >= "A" && ch <= "Z") || (ch >= "a" && ch <= "z")) newstr += ch;
         else if(ch=="é" || ch=="è" || ch=="ë" || ch=="ê") newstr += "e";
         else if(ch=="ï" || ch=="î") newstr += "i";
         else if(ch=="ö" || ch=="ô" || ch=="õ") newstr += "o";
         else if(ch=="ä" || ch=="â" || ch=="à") newstr += "a";
         else if(ch=="ü" || ch=="ù" || ch=="û") newstr += "u";
         else if(ch=="ç") newstr += "c";
         else if(ch=="ñ") newstr += "n";
         else if(input.charCodeAt(i)<128) newstr += ch;
      }
      return newstr;
  }
  function stripCharsInBag(s, bag) {
     var returnString = "";
     for(var i=0; i<s.length; i++) { var c=s.charAt(i); if(bag.indexOf(c)==-1) returnString+=c; }
     return returnString;
  }

  function entSite(srv,idc,lg) {
     self.location.href = "http://" + srv + "/gcamping/gen/Fabt.php?pays=" + lg + "&idc=" + idc + ((is_800max) ? "&scr=l" : "")
  }

  function entSiteVS(idc,lg) {
     self.location.href = "http://" + location.host + "/gcamping/gen/Fabt.php?pays=" + lg + "&idc=" + idc + ((is_800max) ? "&scr=l" : "")
  }

  c1=getCookie("LibImage")
  if(c1!="") setCookie("LibImage",toStdCase(c1),lwApp)
  c1=getCookie("RegionMap")
  if(c1!="") setCookie("RegionMap",toStdCase(c1),lwApp)
  c1=getCookie("zgeo")
  if(c1!="") setCookie("zgeo",toStdCase(c1),lwApp)

//--> end hide JavaScript
