//-----------------------------------------------------------------------------//
//   -----------------------------------------------------------------------   //
//   ---------------  BIBLIOTHEQUE JAVASCRIPT  -----------------------------   //
//   -----------------------------------------------------------------------   //
//-----------------------------------------------------------------------------//

//  ---------------------------------
// FONCTION CLASSIQUE DU POP UP
function OpenPop(u,n,w,h,t,l,d,s,m,sc,r){//url;name;width;height;toolbar;location;direction;status;menubar;scrollbar;resizable
  window.open(u,n,'toolbar='+t+',location='+l+',directories='+d+',status='+s+',menubar='+m+',scrollbars='+sc+',resizable='+r+',width='+w+',height='+h);
}

// FONCTION DORCEL
function openDORCEL(n,p){//url;h ou v name;width;height;toolbar;location;direction;status;menubar;scrollbar;resizable
  u = "../popup/popph.php?strPHOTO="+n;
  //n = "photos";
  t = "no";
  l = "no";
  d = "no";
  s = "no";
  m = "no";
  sc = "no";
  r = "no";

  w = (p == "v")?332:499;
  h = (p == "v")?499:332;

  window.open(u,n,'toolbar='+t+',top=0,left=0,location='+l+',directories='+d+',status='+s+',menubar='+m+',scrollbars='+sc+',resizable='+r+',width='+w+',height='+h);
}

// FONCTION ACTRICES
function openACTRICE(n,p,width,height){//url;h ou v name;width;height;toolbar;location;direction;status;menubar;scrollbar;resizable
  u = "popphtv.php?strPHOTO="+n;
  //n = "photos";
  t = "no";
  l = "no";
  d = "no";
  s = "no";
  m = "no";
  sc = "no";
  r = "no";


  w = (p == "v")?332:499;
  h = (p == "v")?499:332;

  w = (width)?width:w;
  h = (height)?height:h;

  window.open(u,n,'toolbar='+t+',top=0,left=0,location='+l+',directories='+d+',status='+s+',menubar='+m+',scrollbars='+sc+',resizable='+r+',width='+w+',height='+h);
}
// FONCTION VIDEO
function openVIDEO(n,titre){//url;h ou v name;width;height;toolbar;location;direction;status;menubar;scrollbar;resizable
  u = "../popup/popvi.php?vd="+n+"&strTITRE="+titre;
  //n = "photos";
  t = "no";
  l = "no";
  d = "no";
  s = "no";
  m = "no";
  sc = "no";
  r = "no";
  w = 255;
  h = 240;

  window.open(u,'Dorcel','toolbar='+t+',top=0,left=0,location='+l+',directories='+d+',status='+s+',menubar='+m+',scrollbars='+sc+',resizable='+r+',width='+w+',height='+h);
}
//
//// FONCTION POPUP
function openPOP(u,w,h,tle) { //url;h ou v name;width;height;toolbar;location;direction;status;menubar;scrollbar;resizable

  t = "no";
  l = "no";
  d = "no";
  s = "no";
  m = "no";
  sc = "yes";
  r = "yes";

  window.open(u,tle,'toolbar='+t+',top=0,left=0,location='+l+',directories='+d+',status='+s+',menubar='+m+',scrollbars='+sc+',resizable='+r+',width='+w+',height='+h);

}
// BLOC SOURIS DROIT
function rightClick(keyp) {
      var mymessage = "copyright2001 Marc Dorcel";
      if (navigator.appName == "Netscape" && keyp.which == 3) { alert(mymessage); return false; }
      if (navigator.appVersion.indexOf("MSIE") != -1 && event.button == 2) { alert(mymessage); return false; }
      return true;
}


// FONCTIONS DATES FR ET US
//   --------------------------------
function Jours(){
  this[0]="Dimanche"; this[1]="Lundi";
  this[2]="Mardi"; this[3]="Mercredi";
  this[4]="Jeudi"; this[5]="Vendredi";
  this[6]="Samedi";
}
//   --------------------------------
function Mois(){
  this[0]="Janvier"; this[1]="Février";
  this[2]="Mars"; this[3]="Avril";
  this[4]="Mai"; this[5]="Juin";
  this[6]="Juillet"; this[7]="Août";
  this[8]="Septembre"; this[9]="Octobre";
  this[10]="Novembre"; this[11]="Décembre";
}
//   --------------------------------
function Days(){
  this[0]="sunday"; this[1]="Monday";
  this[2]="tuesday"; this[3]="Wednesday";
  this[4]="Thursday"; this[5]="Friday";
  this[6]="Saturday";
}
//   --------------------------------
function Months() {
  this[0]="January"; this[1]="February";
  this[2]="March"; this[3]="April";
  this[4]="May"; this[5]="June";
  this[6]="July"; this[7]="August";
  this[8]="September"; this[9]="October";
  this[10]="November"; this[11]="December";
}
//   -------------------------------
function DateFr(){
  var now = new Date();
  var jour = new Jours();
  var mois=new Mois();
 // return " " + jour[now.getDay()] + " " + now.getDate() + " " + mois[now.getMonth()] + " " + now.getFullYear();
 return " " + jour[now.getDay()] + " " + now.getDate() + " " + mois[now.getMonth()];
}
//   -------------------------------
function DateUs(){
  var now = new Date();
  var day=new Days();
  var month=new Months();
  return " " + day[now.getDay()] + ", " + now.getDate() + " " + month[now.getMonth()] + " " + now.getFullYear();
}
//   --------------------------------
function DateNumFr(){
  var now = new Date();
  var jour = now.getDate();
  var mois = now.getMonth()+1;

  return " " + ((jour > 9) ? "" : "0") + jour + "." + ((mois > 9) ? "" : "0") + mois + "." + now.getFullYear();
}
//   ---------------------------------
function DateNumUs(){
  var now = new Date();
  var day = now.getDate();
  var month = now.getMonth()+1;
  return " " + ((month > 9) ? "" : "0") + month + "." + ((day > 9) ? "" : "0") + day + "." + now.getFullYear();
}
//   ---------------------------------
function TimeNow() {
  var now=new Date(); var hour=now.getHours(); var min=now.getMinutes(); var sec=now.getSeconds();
  return " " + ((hour > 9) ? "" : "0") + hour + ":" + ((min > 9) ? "" : "0") + min + ":" + ((sec > 9) ? "" : "0") + sec;
}
//   ---------------------------------
