// real time 
function namosw_init_clock(){
var type, i, top, obj, clocks, strobj, tempvar;
clocks = new Array();
for (i = 0, top = 0; i < namosw_init_clock.arguments.length; i += 2){
strobj = eval('document.getElementById("' + namosw_init_clock.arguments[i] + '")');
type = namosw_init_clock.arguments[i+1];
if (type < 1 && 7 < type) continue;
clocks[top++] = strobj;
clocks[top++] = type;
}

clocks.months = new Array('Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet',
'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre');
clocks.days = new Array('Dimanche', 'Lundi', 'Mardi', 'Mercredi',
'Jeudi', 'Vendredi', 'Samedi');

if (top > 0){
document.namosw_clocks = clocks;
namosw_clock();
}
}
function namosw_clock(){

var i, type, clocks, next_call, str, hour, ampm, now, year2, year4;
clocks = document.namosw_clocks;
if (clocks == null) return;
next_call = false;

for (i = 0; i < clocks.length; i += 2) {
obj = clocks[i];
type = clocks[i+1];
now = new Date();
year2 = now.getYear();
year4 = year2;
if (year2 < 1000) year4 = 1900 + year2;
if (year2 >= 100) year2 = year4;

if (type == 1 || type == 2)
{
obj.innerHTML = now.getDate() + ' ' + clocks.months[now.getMonth()] + ' ' + year4;
if (type == 2)
obj.innerHTML = clocks.days[now.getDay()] + ' ' + obj.innerHTML;
}
else if (type == 3 || type == 4)
{
obj.innerHTML = year2 + '/' + (now.getMonth()+1) + '/' + now.getDate();
}
else if (type == 5 || type == 6)
{
obj.innerHTML = (now.getMonth()+1) + '/' + now.getDate() + '/' + year2;
}
if (type == 4 || type == 6 || type == 7)
{
hour = now.getHours();
ampm = 0;

str = hour +':'+ ((now.getMinutes() < 10) ? '0'+now.getMinutes():now.getMinutes()) +':'+ ((now.getSeconds() < 10) ? '0'+now.getSeconds():now.getSeconds());
if (type == 7)
{
obj.innerHTML = str;
}
else
{
obj.innerHTML += ' ' + str;
}
}

if (type == 4 || type == 6 || type == 7)
next_call = true;
}
if (next_call)
window.setTimeout("namosw_clock();", 1000);
}
// -->