// JavaScript Document

<!--

//nav
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];}
}
//

//plan
function plan()
{
window.open("http://pro.mappy.com/BtoB/Proximedia/map?map.id=3010801;map.provider=Proximedia;&xml.state.wanted_lang=fr", "Plan", "toolbar=no, location=no, directories=no, status=yes, scrollbars=yes, resizable=no, copyhistory=no, width=730, height=500, left=50, top=50");
}
//

// Popup qui se redimensionne à la taille de l'image ------------------------------------------------------------------
var BrowserDetect = {
 init: function () {
  this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
  this.version = this.searchVersion(navigator.userAgent)
   || this.searchVersion(navigator.appVersion)
   || "an unknown version";
  this.OS = this.searchString(this.dataOS) || "an unknown OS";
 },
 searchString: function (data) {
  for (var i=0;i<data.length;i++) {
   var dataString = data[i].string;
   var dataProp = data[i].prop;
   this.versionSearchString = data[i].versionSearch || data[i].identity;
   if (dataString) {
    if (dataString.indexOf(data[i].subString) != -1)
     return data[i].identity;
   }
   else if (dataProp)
    return data[i].identity;
  }
 },
 searchVersion: function (dataString) {
  var index = dataString.indexOf(this.versionSearchString);
  if (index == -1) return;
  return parseFloat(dataString.substring(index+this.versionSearchString.length+1));
 },
 dataBrowser: [
  {  string: navigator.userAgent,
   subString: "OmniWeb",
   versionSearch: "OmniWeb/",
   identity: "OmniWeb"
  },
  {
   string: navigator.vendor,
   subString: "Apple",
   identity: "Safari"
  },
  {
   prop: window.opera,
   identity: "Opera"
  },
  {
   string: navigator.vendor,
   subString: "iCab",
   identity: "iCab"
  },
  {
   string: navigator.vendor,
   subString: "KDE",
   identity: "Konqueror"
  },
  {
   string: navigator.userAgent,
   subString: "Firefox",
   identity: "Firefox"
  },
  {
   string: navigator.vendor,
   subString: "Camino",
   identity: "Camino"
  },
  {  // for newer Netscapes (6+)
   string: navigator.userAgent,
   subString: "Netscape",
   identity: "Netscape"
  },
  {
   string: navigator.userAgent,
   subString: "MSIE",
   identity: "Explorer",
   versionSearch: "MSIE"
  },
  {
   string: navigator.userAgent,
   subString: "Gecko",
   identity: "Mozilla",
   versionSearch: "rv"
  },
  {   // for older Netscapes (4-)
   string: navigator.userAgent,
   subString: "Mozilla",
   identity: "Netscape",
   versionSearch: "Mozilla"
  }
 ],
 dataOS : [
  {
   string: navigator.platform,
   subString: "Win",
   identity: "Windows"
  },
  {
   string: navigator.platform,
   subString: "Mac",
   identity: "Mac"
  },
  {
   string: navigator.platform,
   subString: "Linux",
   identity: "Linux"
  }
 ]
 
};
BrowserDetect.init();
//alert(''+BrowserDetect.version);


PositionX = 100;
PositionY = 100;
defaultWidth  = 500;
defaultHeight = 500;
var AutoClose = true;
if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;
function popImage(imageURL,imageTitle){
if (isNN){imgWin=window.open('about:blank','',optNN);}
if (isIE){imgWin=window.open('about:blank','',optIE);}
with (imgWin.document){
writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');
writeln('<sc'+'ript>');
writeln('var isNN,isIE;');
writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
writeln('isNN=(navigator.appName=="Netscape")?1:0;');
writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
writeln('function reSizeToImage(){');
writeln('if (isIE){');
writeln('window.resizeTo(100,100);');
writeln('width=100-(document.body.clientWidth-document.images[0].width);');
writeln('height=100-(document.body.clientHeight-document.images[0].height);');
if ( BrowserDetect.version == 7 ) {
writeln('width=width+150;');
}
writeln('window.resizeTo(width,height);}');
writeln('if (isNN){');       
writeln('window.innerWidth=document.images["TheImage"].width;');
writeln('window.innerHeight=document.images["TheImage"].height;}}');
writeln('function doTitle(){document.title="'+imageTitle+'";}');
writeln('</sc'+'ript>');
if (!AutoClose) writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
else writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
writeln('<img name="TheImage" src='+imageURL+' style="display:block"></body></html>');
close();  
}}
//

/***********************************************
* Image Thumbnail Viewer II script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
* This notice must stay intact for legal use
***********************************************/

//Specify image paths and optional link (set link to "" for no link):
var dynimages=new Array()
dynimages[0]=["images/rustique1.jpg"]
dynimages[1]=["images/rustique2.jpg"]
dynimages[2]=["images/rustique3.jpg"]
dynimages[3]=["images/rustique4.jpg"]
dynimages[4]=["images/rustique5.jpg"]
dynimages[5]=["images/contemporaine1.jpg"]
dynimages[6]=["images/contemporaine2.jpg"]
dynimages[7]=["images/contemporaine3.jpg"]
dynimages[8]=["images/contemporaine4.jpg"]
dynimages[9]=["images/contemporaine5.jpg"]
dynimages[10]=["images/contemporaine6.jpg"]
dynimages[11]=["images/moderne-design1.jpg"]
dynimages[12]=["images/moderne-design2.jpg"]
dynimages[13]=["images/moderne-design3.jpg"]
dynimages[14]=["images/moderne-design4.jpg"]
dynimages[15]=["images/moderne-design.jpg"]
//Preload images ("yes" or "no"):
var preloadimg="no"

//Set optional link target to be added to all images with a link:
var optlinktarget=""

//Set image border width
var imgborderwidth=0

//Optionally, change 1.0 and 0.7 below to affect Wipe gradient size and duration in seconds in IE5.5+:
var filterstring="progid:DXImageTransform.Microsoft.GradientWipe(GradientSize=1.0 Duration=0.7)"

///////No need to edit beyond here/////

if (preloadimg=="yes"){
for (x=0; x<dynimages.length; x++){
var myimage=new Image()
myimage.src=dynimages[x][0]
}
}

function returnimgcode(theimg){
var imghtml=""
if (theimg[1]!="")
imghtml='<a href="'+theimg[1]+'" target="'+optlinktarget+'">'
imghtml+='<img src="'+theimg[0]+'" border="'+imgborderwidth+'">'
if (theimg[1]!="")
imghtml+='</a>'
return imghtml
}

function modifyimage(loadarea, imgindex){
if (document.getElementById){
var imgobj=document.getElementById(loadarea)
if (imgobj.filters && window.createPopup){
imgobj.style.filter=filterstring
imgobj.filters[0].Apply()
}
imgobj.innerHTML=returnimgcode(dynimages[imgindex])
if (imgobj.filters && window.createPopup)
imgobj.filters[0].Play()
return false
}
}<!--  -->

//

//slide
/*
JavaScript Image slideshow:
By JavaScript Kit (www.javascriptkit.com)
Over 200+ free JavaScript here!
*/

var slideimages=new Array()
var slidelinks=new Array()
function slideshowimages(){
for (i=0;i<slideshowimages.arguments.length;i++){
slideimages[i]=new Image()
slideimages[i].src=slideshowimages.arguments[i]
}
}

function slideshowlinks(){
for (i=0;i<slideshowlinks.arguments.length;i++)
slidelinks[i]=slideshowlinks.arguments[i]
}

function gotoshow(){
if (!window.winslide||winslide.closed)
winslide=window.open(slidelinks[whichlink])
else
winslide.location=slidelinks[whichlink]
winslide.focus()
}

//

// 05-11-2003 - francktfr@systeme-d.net 
// écrit pour http://www.systeme-d.net 
var imgs = new Array() 
var CellsDone = 0 
var Interval = 2000        //    Temps entre deux images (ms) 
//    Définition des images ici    : 
AddImage("images/dames.jpg") 
AddImage("images/dames1.jpg") 
AddImage("images/dames2.jpg")
AddImage("images/dames3.jpg") 
function Hide(Index){ 
    CellsDone=0 
    for (y=0; y<Cache.rows.length; y++){ 
        for (x=0; x<Cache.rows[y].cells.length; x++){ setTimeout("HideCell(" + x + "," + y + "," + Index + ")",(Math.random()*300)) } 
    } 
} 
function HideCell( i, j, Index){ 
    CellsDone++ 
    Cache.rows[j].cells[i].style.background = "#000000" 
    if (CellsDone >= (Cache.rows.length*Cache.rows[j].cells.length)){ 
        Cache.style.backgroundImage = "url('" + imgs[Index].src +"')" 
        setTimeout("Show("+Index+")",200) 
    } 
} 
function Show(Index){ 
    CellsDone=0 
    for (y = 0; y < Cache.rows.length; y++){ 
        for (x = 0; x < Cache.rows[y].cells.length; x++){ setTimeout("ShowCell(" + x + "," + y + "," + Index + ")",200+(Math.random()*1000)) } 
    } 
} 
function ShowCell( i, j, Index){ 
    CellsDone++ 
    Cache.rows[j].cells[i].style.backgroundColor = "transparent" 
    if (CellsDone >= (Cache.rows.length*Cache.rows[j].cells.length)){ 
        Index < (imgs.length-1) ? Index++ : Index = 0 
        setTimeout("Hide("+Index+")",Interval) 
    } 
} 
function AddImage(Source){ 
    var img = new Image() 
    img.src = Source 
    imgs.push(img) 
} 
function CreateTable(Container, Dim){ 
    var maxx = 277
    var maxy = 350 
    for(i=0; i<imgs.length; i++){ 
        if (imgs[i].height > maxy){maxy=imgs[i].height} 
        if (imgs[i].width > maxx){maxx=imgs[i].width} 
    } 
    var str = "<TABLE ID=Cache WIDTH="+277+" HEIGHT="+350+" CELLSPACING=0 CELLPADDING=0 BORDER=1 STYLE=\"table-layout: fixed; background-position: center center; background-repeat: no-repeat\">" 
    var row ="<TR>" 
    for (i=0; i<maxx; i += Dim){ 
        str += "<COL WIDTH="+Dim+">" 
        row += "<TD></TD>" 
    } 
    row +="</TR>" 
    for (i=0; i<maxy; i += Dim){str += row} 
    Container.innerHTML = str + "</TABLE>" 
    Hide(0) 
}
//
//images defilantes

var imgs=new Array();
imgs[0]="images/home_04.jpg";
imgs[1]="images/banner2.jpg";
imgs[2]="images/banner3.jpg";
imgs[3]="images/banner4.jpg";
imgs[4]="images/banner5.jpg";
var cpt=0;
function changeimages()
{
	document.getElementById("ima").src=imgs[cpt];
	cpt++;
	if(cpt>=imgs.length) cpt=0;
	setTimeout("changeimages()",2500);
}
//
// Opacité diminue au survol des images ------------------------------------------------------------------------------------------------
function rendrevisible(timide,superman) 
{ 
force=(superman==1)? 1 : 0.5 
  
if (timide.style.MozOpacity) 
timide.style.MozOpacity=force 
else if (timide.filters) 
timide.filters.alpha.opacity=force*100 
} 

// no print screen
function clp_clear() { 
   var content=window.clipboardData.getData("Text"); 
   if (content==null) { 
      window.clipboardData.clearData();} 
   setTimeout("clp_clear();",1000);} 
//

//no click droit + équivalent clavier
function thekingoftheweb()
{
alert('Copyright©Proximedia');
return false;
}


//

//
function mmLoadMenus() {
  if (window.mm_menu_0123170628_0) return;
  window.mm_menu_0123170628_0 = new Menu("root",204,18,"Arial, Helvetica, sans-serif",12,"#FFFFFF","#FFFFFF","#565656","#8b8b8b","left","middle",3,0,500,-5,7,true,true,true,0,true,true);
  mm_menu_0123170628_0.addMenuItem("Huber®","location='huber.asp'");
  mm_menu_0123170628_0.addMenuItem("Le savoir faire d'Hubert®","location='savoir_faire_huber.asp'");
  mm_menu_0123170628_0.addMenuItem("Les fonctionnalités d'Hubert®","location='fonctionnalites_huber.asp'");
  mm_menu_0123170628_0.addMenuItem("Les principes d'Hubert®","location='principes_huber.asp'");
   mm_menu_0123170628_0.fontWeight="bold";
   mm_menu_0123170628_0.hideOnMouseOut=true;
   mm_menu_0123170628_0.bgColor='#666666';
   mm_menu_0123170628_0.menuBorder=1;
   mm_menu_0123170628_0.menuLiteBgColor='#FFFFFF';
   mm_menu_0123170628_0.menuBorderBgColor='#FFFFFF';

mm_menu_0123170628_0.writeMenus();
}
//

//video
function playIt(filename) { 
Player.URL = filename; 
}

//PLF-http://www.jejavascript.net/
var bauto = 0;
var dossier="http://cms.proximedia.com/site/9029/restaurant/";
var numero = 1;
function objet() {
this.length = objet.arguments.length
for (var i = 0; i < this.length; i++) this[i+1] = objet.arguments[i]
}
var nom = new objet ("01.gif", "02.gif", "03.gif", "04.gif");
function suivante() {
numero += 1;
if (numero == nom.length + 1) numero = 1;
document.image.src = dossier+nom[numero];
}
function precedente() {
numero -= 1;
if (numero == 0) numero = nom.length; 
document.image.src = dossier+nom[numero];
}
function changer() {
numero += 1;
if (numero == nom.length + 1) numero = 1;
document.image.src = dossier+nom[numero];
roll=setTimeout("changer()", 1500);
}
function initial() {
window.clearTimeout(roll);
document.image.src = dossier+nom[numero];
}
function auto() {
if (bauto == 0) {
bauto =1; changer();
document.vision.automat.value=" Lect/Stop "; 
} 
else {
bauto =0; initial();
document.vision.automat.value=" Lect/Auto ";
}
}
//


-->