var now = new Date();
var dayNames = new Array("НЕДЕЛЯ","ПОНЕДЕЛНИК","ВТОРНИК","СРЯДА","ЧЕТВЪРТЪК","ПЕТЪК","СЪБОТА");
var dayNames_en = new Array("SUNDAY","MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY");



var date = new Date();
var month = new String;
var day = new String;
var year = new String;

var seconds = date.getSeconds();
var minutes = date.getMinutes();
var hours = date.getHours();
var pmam=(hours >= 12)? " ч.":" ч.";

var month = date.getMonth()
var day = date.getDate()
    // This is the y2k fixer function--don't worry about how this works,
    // but if you want it in your scripts, you can cut and paste it. 
    //

 function y2k(number) { 
 return (number < 1000) ? number + 1900 : number;
 }

    // Get the year and fix the y2k bug using the fixer function.
    //
var year = y2k(date.getYear())

    // Translate the number of the month to a word--so 0 becomes January, 1 becomes February, etc...
    //
	if (month == 0)
        month = "01";
      else if (month == 1)
        month = "02";
      else if (month == 2)
        month = "03";      
	else if (month == 3)
        month = "04";
	else if (month == 4)
        month = "05";
	else if (month == 5)
        month = "06";
	else if (month == 6)
        month = "07";
	else if (month == 7)
        month = "08";
	else if (month == 8)
        month = "09";
	else if (month == 9)
        month = "10";
	else if (month == 10)
        month = "11";
	else if (month == 11)
        month = "12";


//this code says if the day is 1 then add 'st' after it and so on and so forth, no need to edit this.
//if (day == 1)
//	day = day + "<sup>ви</sup>";
//else if (day == 2)
//	day = day + "<sup>ри</sup>";
//else if (day == 3)
//	day = day + "<sup>ти</sup>";
//else if (day >=4 && day < 6)
//	day = day + "<sup>ти</sup>";
//else if (day > 6 && day < 9)
//	day = day + "<sup>ми</sup>";
//else if (day == 21)
//	day = day + "<sup>ви</sup>";
//else if (day == 22)
//	day = day + "<sup>ри</sup>";
//else if (day == 23)
//	day = day + "<sup>ти</sup>";
//else if (day > 23 && day < 31)
//	day = day + "<sup>ти</sup>";
//else if (day == 31)
//	day = day + "<sup>ви</sup>";

//edit time to 12 hour rather than 24 hour...you can take this out if you want it to be based on 24 hour

if (hours > 24)
	{
	hours = hours - 12;
	}

//adds zero before the minute if it is below 10

if (minutes < 10)
	{
	minutes = "0" + minutes;
	}

//adds zero before the second if it is below 10

if (seconds < 10)
	{
	seconds = "0" + seconds;
	}

    // declare the sentence as a variable(as it makes it easier to display later on)
    //you can change this sentence to be what ever you want
var display_date = (" " + day + "." + month + "." + year);

    //of course it could be a good idea to edit this to your liking, i personally wouldn't keep the seconds, but that's just me
var display_time = ("" + hours + ":" + minutes + ":" + seconds + pmam);

