/////////////// CONFIGURATION /////////////////////////////

	// Set the clock's font face:
	var LC_Font_Face = "Verdana";

	// Set the clock's font size (in point):
	var LC_Font_Size = "7";

	// Set the clock's font color:
	var LC_Font_Color = "#666666";
	
	// Set the clock's background color:
	var LC_Back_Color = "#FFFFFF";

	// Set the text to display before the clock:
	// For no text, set the value to "", do not remove the variable.
	var LC_Pre_Text = "";

	// Set the width of the clock (in pixels):
	var LC_Width = 152;

	// Display the time in 24 or 12 hour time?
	// 0 = 24, 1 = 12
	var LC_12_Hour = 0;

	// How often do you want the clock updated?
	// 0 = Never, 1 = Every Second, 2 = Every Minute
	// If you pick 0 or 2, the seconds will not be displayed
	var LC_Update = 0;

	// Date Options:
	// 0 = No Date, 1 = dd/mm/yy, 2 = mm/dd/yy, 3 = DDDD MMMM, 4 = DDDD MMMM YYYY
	var LC_DisplayDate = 4;
	
	// Abbreviate Day/Month names?
	// 0 = No, 1 = Yes;
	var LC_Abbrev = 1;

/////////////// END CONFIGURATION /////////////////////////
///////////////////////////////////////////////////////////

// Global varibale definitions:
	var LC_AMPM = "";
	var LC_MN = "i";
	var LC_Old = "";
	var LC_HTML = "";

// The following arrays contain data which is used in the clock's
// date function. Feel free to change values for Days and Months
// if needed (if you wanted abbreviated names for example).
	var LC_DaysOfWeek = new Array(7);
		LC_DaysOfWeek[0] = (LC_Abbrev) ? "Ned" : "Nedjelja";
		LC_DaysOfWeek[1] = (LC_Abbrev) ? "Pon" : "Ponedjeljak";
		LC_DaysOfWeek[2] = (LC_Abbrev) ? "Uto" : "Utorak";
		LC_DaysOfWeek[3] = (LC_Abbrev) ? "Sri" : "Srijeda";
		LC_DaysOfWeek[4] = (LC_Abbrev) ? "Cet" : "Cetvrtak";
		LC_DaysOfWeek[5] = (LC_Abbrev) ? "Pet" : "Petak";
		LC_DaysOfWeek[6] = (LC_Abbrev) ? "Sub" : "Subota";

	var LC_MonthsOfYear = new Array(12);
		LC_MonthsOfYear[0] = (LC_Abbrev) ? "1." : "januar";
		LC_MonthsOfYear[1] = (LC_Abbrev) ? "2." : "februar";
		LC_MonthsOfYear[2] = (LC_Abbrev) ? "3." : "mart";
		LC_MonthsOfYear[3] = (LC_Abbrev) ? "4." : "april";
		LC_MonthsOfYear[4] = (LC_Abbrev) ? "5." : "maj";
		LC_MonthsOfYear[5] = (LC_Abbrev) ? "6." : "juni";
		LC_MonthsOfYear[6] = (LC_Abbrev) ? "7." : "juli";
		LC_MonthsOfYear[7] = (LC_Abbrev) ? "8." : "august";
		LC_MonthsOfYear[8] = (LC_Abbrev) ? "9." : "septembar";
		LC_MonthsOfYear[9] = (LC_Abbrev) ? "10." : "oktobar";
		LC_MonthsOfYear[10] = (LC_Abbrev) ? "11." : "novembar";
		LC_MonthsOfYear[11] = (LC_Abbrev) ? "12." : "decembar";

// This array controls how often the clock is updated,
// based on your selection in the configuration.
	var LC_ClockUpdate = new Array(3);
		LC_ClockUpdate[0] = 0;
		LC_ClockUpdate[1] = 1000;
		LC_ClockUpdate[2] = 60000;

// Browser detection
	var LC_IE = (document.all) ? 1 : 0;
	var LC_NS = (document.layers) ? 1 : 0;
	var LC_N6 = (window.sidebar) ? 1 : 0;

// For Version 4+ browsers, write the appropriate HTML to the
// page for the clock, otherwise, attempt to write a static
// date to the page.
	if (LC_IE || LC_N6) { document.write('<div id="LiveClockIE" style="width:'+LC_Width+'px; background-color:'+LC_Back_Color+';height:14px"></div>'); }
	else if (LC_NS) { document.write('<div align="left"><ilayer width="'+LC_Width+'" height="14" bgColor="'+LC_Back_Color+'" id="ClockPosNS"><layer id="LiveClockNS"></layer></ilayer></div>'); }
	else { LC_Old = "true"; show_clock(); }

	onload = init;
	function init() {
// If you have any other scripts which use the "onload" event,
// call them here.
		show_clock();
	}

// The main part of the script:
	function show_clock() {
		if (LC_Old == "die") { return; }

	// Get all our date variables:
		var Digital = new Date();
		var day = Digital.getDay();
		var mday = Digital.getDate();
		var month = Digital.getMonth();
		var hours = Digital.getHours();
		var minutes = Digital.getMinutes();
		var seconds = Digital.getSeconds();
		var year = Digital.getYear();

	// Fix the "year" variable for Y2K:
		if (year < 1900) { year = year + 1900; }


	// Fix the "mn" variable if needed:
		if (mday == 1) { LC_MN = "."; }
		else if (mday == 2) { LC_MN = "."; }
		else if (mday == 3) { LC_MN = "."; }
		else if (mday == 21) { LC_MN = "."; }
		else if (mday == 22) { LC_MN = "."; }
		else if (mday == 23) { LC_MN = "."; }
		else if (mday == 31) { LC_MN = "."; }
		else { LC_MN = "."; }

	// Set up the hours for either 24 or 12 hour display:
		if (LC_12_Hour) {
			LC_AMPM = "AM";
			if (hours >= 12) { LC_AMPM = "PM"; hours = hours - 12; }
			if (hours == 0) { hours = 12; }
		}
		if (minutes <= 9) { minutes = "0"+minutes; }
		if (seconds <= 9) { seconds = "0"+seconds; }

	// This is the actual HTML of the clock. If you're going to play around
	// with this, be careful to keep all your quotations in tact.
		LC_HTML = '<font style="color:'+LC_Font_Color+'; font-family:'+LC_Font_Face+'; font-size:'+LC_Font_Size+'pt;">';
		LC_HTML += LC_Pre_Text;
//		if (LC_12_Hour) { LC_HTML += ' '+LC_AMPM; }
//		if (LC_DisplayDate == 1) { LC_HTML += ' '+mday+'/'+(month+1)+'/'+year; }
//		if (LC_DisplayDate == 2) { LC_HTML += ' '+(month+1)+'/'+mday+'/'+year; }
		if (LC_DisplayDate >= 3) { LC_HTML += ' '+LC_DaysOfWeek[day]+', '+mday+LC_MN+LC_MonthsOfYear[month]; }
		if (LC_DisplayDate >= 4) { LC_HTML += +year; }
		LC_HTML += ' - '+hours+':'+minutes;
		if (LC_Update == 1) { LC_HTML += ':'+seconds+'&nbsp;|'; }
		LC_HTML += '</font>';
		
		if (LC_Old == "true") {
			document.write(LC_HTML);
			LC_Old = "die";
			return;
		}

	// Write the clock to the layer:
		if (LC_NS) {
			clockpos = document.ClockPosNS;
			liveclock = clockpos.document.LiveClockNS;
			liveclock.document.write(LC_HTML);
			liveclock.document.close();
		} else if (LC_IE) {
			LiveClockIE.innerHTML = LC_HTML;
		} else if (LC_N6) {
			document.getElementById("LiveClockIE").innerHTML = LC_HTML;
		}

	if (LC_Update != 0) { setTimeout("show_clock()",LC_ClockUpdate[LC_Update]); }
}
