// Browser detect code
var agt=navigator.userAgent.toLowerCase();
var isOpera = (agt.indexOf("opera") != -1);

var ie4=document.all
var ns4=document.layers
var ns6=document.getElementById&&!document.all

// Global varibale definitions:
var dn = "";
var mn = "th";
var old = "";

var isAlege = true;

// Month declaration
var MonthsOfYear = new Array(12);
MonthsOfYear[0] = "Ianuarie";
MonthsOfYear[1] = "Februarie";
MonthsOfYear[2] = "Martie";
MonthsOfYear[3] = "Aprilie";
MonthsOfYear[4] = "Mai";
MonthsOfYear[5] = "Iunie";
MonthsOfYear[6] = "Iulie";
MonthsOfYear[7] = "August";
MonthsOfYear[8] = "Septembrie";
MonthsOfYear[9] = "Octombrie";
MonthsOfYear[10] = "Noiembrie";
MonthsOfYear[11] = "Decembrie";

function dateString() {
	var Digital = new Date();
	
	var year = 2001;
	var mday = Digital.getDate();
	var month = Digital.getMonth();
	document.write(mday + ' ' + MonthsOfYear[month] + ' ' + 2002);
}

function timeString() {
	// Get all our date variables:
	var Digital = new Date();
	var hours = Digital.getHours();
	var minutes = Digital.getMinutes();
	var seconds = Digital.getSeconds();

	// add 0 to the minutes
	if (minutes <= 9) { 
		minutes = "0"+minutes; 
	}

	// add 0 to the seconds
	if (seconds <= 9) { 
		seconds = "0"+seconds; 
	}
	myclock = hours + ':' + minutes;  
	
	return myclock
}



function show_clock() {
	//show clock in NS 4
	if (ns4)
		document.ClockPosNS.visibility="show"
		
	myclock = timeString();
	
	// Write the clock to the layer:
	if (isOpera) {
		document.clock.face.value = myclock
	} else if (ns4) {
		clockpos = document.ClockPosNS;
		liveclock = clockpos.document.LiveClockNS;
		liveclock.document.write(myclock);
		liveclock.document.close();
	} else if (ie4) {
		LiveClockIE.innerHTML = myclock;
	} else if (ns6){
		document.getElementById("LiveClockIE").innerHTML = myclock;
    } 
	
	setTimeout("show_clock()",10000); 
}
