function affiche(ref,lib1,lib2,lib3){
var tdl='<td style ="border:thin ridge silver; border-width:1px; text-align: left; width: 26%; left-margin:3px; text-indent:0.5cm;" '
var tdc1='<td style="border:thin ridge silver; border-width:1px; text-align: center; width: 74%;" '
var tdc2='<td style="border:thin ridge silver; border-width:1px; text-align: center; width: 37%;" '
document.write('<table ');
document.write('style="border-width:0px; border-collapse:collapse; border-color:silver; width: 60%; text-align: left; margin-left: auto; margin-right: auto;" border="2"; cellpadding="0"; cellspacing="0" >');
document.write('  <tbody>');
document.write('    <tr>');
if (ref == lib1) {var sel = 'class="jour">';} else {var sel = 'class="cor">';}
document.write(tdl,sel,'   ',lib1,'</td>');
if (lib3 == 'xxx' ) document.write(tdc1,sel,lib2,'</td>');
else {document.write(tdc2,sel,lib2,'</td>');
document.write(tdc2,sel,lib3,'</td>');
}
//document.write('</tr><tr>');
document.write('    </tr>');
document.write('  </tbody>');
document.write('</table>');
}

function accueil(ref,lib1,lib2,lib3) {
var sel = '<span class="jour">'
var af2 = lib2.replace("<br>"," ")
var af3 = lib3.replace("<br>"," ")
var tmp = af3.replace("<br>"," ")
var af3 = tmp.replace("<br>"," ")
if (ref == lib1) {
    if (lib3 == 'xxx' ) document.write(sel,'from ',af2);
       else document.write(sel,'from ',af2,'<br> and from ',af3);
document.write('</span>');}
}



function horaires(type) {
var d=new Date;
var chaine_jour = Array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday','Saturday');
var chaine_mois = Array('January', 'February', 'March', 'April', 'May',
'June', 'July', 'Aug', 'September', 'October', 'November','December');
var j=d.getDay();
var jour_semaine = chaine_jour[j];
var j=d.getDate();
var fuseau = d.getTimezoneOffset(); 
var heures = d.getHours();
var minutes = d.getMinutes();
var secondes = d.getSeconds(); 
var Monday = Array("1 p.m. to 7 p.m.<br>Couples only","7 p.m. to 12 p.m.<br>Mixed<br>Couples & single persons");
var Tuesday = Array("1 p.m. to 12 p.m.<br>Mixed<br>Couples & single persons","xxx");
var Wednesday = Array("1 p.m. to 12 p.m.<br>Mixed<br>Couples & single persons","xxx");
var Thursday = Array("1 p.m. to 12 p.m.<br>Mixed<br>Couples & single persons","xxx");
var Friday = Array("1 p.m. to 7 p.m.<br>Couples only","9 p.m. to 2 a.m.<br>Couples & a few single men");
var Saturday = Array("1 p.m. to 7 p.m.<br>mixte","9.30 p.m. to 3 a.m.<br>Couples only");
var Sunday = Array("1 p.m. to 12 p.m.<br>Mixed<br>Couples & single persons","xxx");
if (j<10) {j='0'+j};
var m=d.getMonth();
var mt=m+1
var nom_mois = chaine_mois[m];
var tdl='<td width="75% style="text-align: left;" '
var tdc1='<td width="25% style="text-align: center;" '
var tdc2='<td width="25% style="text-align: center;" '

if (m<10) {m='0'+m};
var a=d.getFullYear();

if (mt<10) {mt='0'+mt}; 
var datlim = ""+a+mt+j

if (datlim == '20100512') {
Wednesday [0] = "1 p.m. to 1 a.m.<br>Mixed<br>Couples & single persons"
}
if (datlim == '20100523') { 
Sunday [0] = "1 p.m. to 1 a.m.<br>Mixed<br>Couples & single persons"
}

if (datlim >= '20100601') { 
Monday [1] = "7 p.m. to 1 a.m.<br>Mixed<br>Couples & single persons"
Tuesday [0] = "1 p.m. to 1 a.m.<br>Mixed<br>Couples & single persons"
Wednesday [0] = "1 p.m. to 1 a.m.<br>Mixed<br>Couples & single persons"
Thursday [0] = "1 p.m. to 1 a.m.<br>Mixed<br>Couples & single persons"
Sunday [0] = "1 p.m. to 1 a.m.<br>Mixed<br>Couples & single persons"
}

if (type == "p") window.document.write('Today is ',jour_semaine,' ',nom_mois,' ',j,',',a);
if (type == "P") window.document.write('Today is ',jour_semaine,' ',j,' ',nom_mois,' ',a);
if (type == "H")  {
affiche(jour_semaine,'Monday',Monday[0],Monday[1]);
affiche(jour_semaine,'Tuesday',Tuesday[0],Tuesday[1]);
affiche(jour_semaine,'Wednesday',Wednesday[0],Wednesday[1]);
affiche(jour_semaine,'Thursday',Thursday[0],Thursday[1]);
affiche(jour_semaine,'Friday',Friday[0],Friday[1]);
affiche(jour_semaine,'Saturday',Saturday[0],Saturday[1]);
affiche(jour_semaine,'Sunday',Sunday[0],Sunday[1]);
}
if (type == "A")  {
var sel = '<span class="jour">'
var lib = "aujourd'hui"
document.write(sel,' welcomes you to le different </span><br>');
accueil(jour_semaine,'Monday',Monday[0],Monday[1]);
accueil(jour_semaine,'Tuesday',Tuesday[0],Tuesday[1]);
accueil(jour_semaine,'Wednesday',Wednesday[0],Wednesday[1]);
accueil(jour_semaine,'Thursday',Thursday[0],Thursday[1]);
accueil(jour_semaine,'Friday',Friday[0],Friday[1]);
accueil(jour_semaine,'Saturday',Saturday[0],Saturday[1]);
accueil(jour_semaine,'Sunday',Sunday[0],Sunday[1]);
}
}

