//changer la vitesse ici
function Fullscreen(page) {
var yes = 1;
var no = 0;
var menubar = no; 
var scrollbars = yes;
var locationbar = no;
var directories = no;
var resizable = yes; 
var statusbar = no; 
var toolbar = no; 
windowprops = "width=" + (screen.width-100) + ",height=" + (screen.height-100) + ",top=10,left=50";
windowprops += (menubar ? ",menubars" : "") +
(scrollbars ? ",scrollbars" : "") +
(locationbar ? ",location" : "") +
(directories ? ",directories" : "") +
(resizable ? ",resizable" : "") +
(statusbar ? ",status" : "") +
(toolbar ? ",toolbar" : "");

window.open(page, 'fullscreen', windowprops);
}


function winpopup (page,w,h) {
	var yes = 1;
	var no = 0;
	var menubar = no; 
	var scrollbars = yes;
	var locationbar = no;
	var directories = no;
	var resizable = yes; 
	var statusbar = no; 
	var toolbar = no; 
	windowprops = "width=" + w + ",height=" + h + ",top=0,left=0";
	windowprops += (menubar ? ",menubars" : "") +
	(scrollbars ? ",scrollbars" : "") +
	(locationbar ? ",location" : "") +
	(directories ? ",directories" : "") +
	(resizable ? ",resizable" : "") +
	(statusbar ? ",status" : "") +
	(toolbar ? ",toolbar" : "");
 	window.open(page, 'popup', windowprops);
}

function Zoom (photo,titre,w,h) {
	var yes = 1;
	var no = 0;
	//var w=w+25;
	//var h=h+30;
	var menubar = no; 
	var scrollbars = no;
	var locationbar = no;
	var directories = no;
	var resizable = yes; 
	var statusbar = no; 
	var toolbar = no; 
	windowprops = "width=" + w + ",height=" + h + ",top=100,left=100";
	windowprops += (menubar ? ",menubars" : "") +
	(scrollbars ? ",scrollbars" : "") +
	(locationbar ? ",location" : "") +
	(directories ? ",directories" : "") +
	(resizable ? ",resizable" : "") +
	(statusbar ? ",status" : "") +
	(toolbar ? ",toolbar" : "");
 //	window.open(page, 'popup', windowprops);
	zoom = open("", "Zoom", windowprops);
	zoom.document.open();
 	with (zoom.document) {
   	write("<html>");
	write("<HEAD><TITLE>"+titre+"</TITLE>");
	write("<body marginwidth=0 marginheight=0 leftmargin=0 rightmargin=0 topmargin=0 bgcolor=#CCCCFF onClick='window.close()'>");
	write("<center><img src='"+photo+"' width="+w+" height="+h+"alt=\""+titre+"\"></center>");
	write("</body></html>");
	}
    zoom.focus();
}

function get_cookie(Name) {
//this function is used only if you had selected popup to load ONCE per session
//You may remove this function if variable "onoff" above is set to "off"
  var search = Name + "="
  var returnvalue = "";
  if (document.cookie.length > 0) {
    offset = document.cookie.indexOf(search)
    if (offset != -1) { // if cookie exists
      offset += search.length
      // set index of beginning of value
      end = document.cookie.indexOf(";", offset);
      // set index of end of cookie value
      if (end == -1)
         end = document.cookie.length;
      returnvalue=unescape(document.cookie.substring(offset, end))
      }
   }
  return returnvalue;
}
function openpopup (theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
} 
function OnePopup(theURL,winName,features){
	if (get_cookie('OnePopUp')==''){
	 openpopup(theURL,winName,features)
	 document.cookie="OnePopUp=yes"
	}
}
