var current_date  = new Date();
var current_month = current_date.getMonth()+1;
var monthpict     = current_month;
var current_day   = current_date.getDate();
var horoimg       = new Image();
var horomonth = new Array();
horomonth[1]  = new Array();
horomonth[2]  = new Array();
horomonth[3]  = new Array();
horomonth[4]  = new Array();
horomonth[5]  = new Array();
horomonth[6]  = new Array();
horomonth[7]  = new Array();
horomonth[8]  = new Array();
horomonth[9]  = new Array();
horomonth[10] = new Array();
horomonth[11] = new Array();
horomonth[12] = new Array();

horomonth[1][1] = "января";
horomonth[1][2] = "january.htm";
horomonth[1][3] = "31";
horomonth[1][4] = new Array();
horomonth[1][4][1] = "Горечавка желтая";
horomonth[1][4][2] = "Чертополох";
horomonth[1][4][3] = "Бессмертник";
horomonth[2][1] = "февраля";
horomonth[2][2] = "february.htm";
horomonth[2][3] = "29";
horomonth[2][4] = new Array();
horomonth[2][4][1] = "Омела";
horomonth[2][4][2] = "Красавка";
horomonth[2][4][3] = "Мимоза";
horomonth[3][1] = "марта";
horomonth[3][2] = "march.htm";
horomonth[3][3] = "31";
horomonth[3][4] = new Array();
horomonth[3][4][1] = "Мак";
horomonth[3][4][2] = "Лилия";
horomonth[3][4][3] = "Наперстянка";
horomonth[4][1] = "апреля";
horomonth[4][2] = "april.htm";
horomonth[4][3] = "30";
horomonth[4][4] = new Array();
horomonth[4][4][1] = "Магнолия";
horomonth[4][4][2] = "Гортензия";
horomonth[4][4][3] = "Георгин";
horomonth[5][1] = "мая";
horomonth[5][2] = "may.htm";
horomonth[5][3] = "31";
horomonth[5][4] = new Array();
horomonth[5][4][1] = "Ландыш";
horomonth[5][4][2] = "Портулак";
horomonth[5][4][3] = "Ромашка";
horomonth[6][1] = "июня";
horomonth[6][2] = "june.htm";
horomonth[6][3] = "30";
horomonth[6][4] = new Array();
horomonth[6][4][1] = "Колокольчик";
horomonth[6][4][2] = "Маргаритка";
horomonth[6][4][3] = "Тюльпан";
horomonth[7][1] = "июля";
horomonth[7][2] = "july.htm";
horomonth[7][3] = "31";
horomonth[7][4] = new Array();
horomonth[7][4][1] = "Кувшинка";
horomonth[7][4][2] = "Фиалка";
horomonth[7][4][3] = "Шиповник";
horomonth[8][1] = "августа";
horomonth[8][2] = "august.htm";
horomonth[8][3] = "31";
horomonth[8][4] = new Array();
horomonth[8][4][1] = "Подсолнух";
horomonth[8][4][2] = "Роза";
horomonth[8][4][3] = "Дельфиниум";
horomonth[9][1] = "сентября";
horomonth[9][2] = "september.htm";
horomonth[9][3] = "30";
horomonth[9][4] = new Array();
horomonth[9][4][1] = "Гвоздика";
horomonth[9][4][2] = "Астра";
horomonth[9][4][3] = "Вереск";
horomonth[10][1] = "октября";
horomonth[10][2] = "october.htm";
horomonth[10][3] = "31";
horomonth[10][4] = new Array();
horomonth[10][4][1] = "Камелия";
horomonth[10][4][2] = "Сирень";
horomonth[10][4][3] = "Фрезия";
horomonth[11][1] = "ноября";
horomonth[11][2] = "november.htm";
horomonth[11][3] = "30";
horomonth[11][4] = new Array();
horomonth[11][4][1] = "Орхидея";
horomonth[11][4][2] = "Пион";
horomonth[11][4][3] = "Гладиолус";
horomonth[12][1] = "декабря";
horomonth[12][2] = "december.htm";
horomonth[12][3] = "31";
horomonth[12][4] = new Array();
horomonth[12][4][1] = "Одуванчик";
horomonth[12][4][2] = "Лотос";
horomonth[12][4][3] = "Эдельвейс";

if (monthpict < 10) {
monthpict = "0" + monthpict;	
}

if ((current_day >= 1) && (current_day <= 10)) {
horoimg.src = "../horoscope/img/horo" + monthpict + "_01-10.jpg";
document.getElementById("horomonth").innerHTML = "<b>1-10 "+horomonth[current_month][1]+"</b>";
document.getElementById("horoname").innerHTML = "<b>"+horomonth[current_month][4][1]+"</b>";
for (var i = 0; i < document.links.length; i++) {
   if (document.links[i].className == "horolink1") {
         document.links[i].href = "../horoscope/"+horomonth[current_month][2];
   }
}
for (var i = 0; i < document.links.length; i++) {
   if (document.links[i].className == "horolink2") {
         document.links[i].href = "../horoscope/"+horomonth[current_month][2];
   }
}
}
if ((current_day >= 11) && (current_day <= 20)) {
horoimg.src = "../horoscope/img/horo" + monthpict + "_11-20.jpg";
document.getElementById("horomonth").innerHTML = "<b>11-20 "+horomonth[current_month][1]+"</b>";
document.getElementById("horoname").innerHTML = "<b>"+horomonth[current_month][4][2]+"</b>";
for (var i = 0; i < document.links.length; i++) {
   if (document.links[i].className == "horolink1") {
         document.links[i].href = "../horoscope/"+horomonth[current_month][2]+"#days1120";
   }
}
for (var i = 0; i < document.links.length; i++) {
   if (document.links[i].className == "horolink2") {
         document.links[i].href = "../horoscope/"+horomonth[current_month][2]+"#days1120";
   }
}
}
if ((current_day >= 21) && (current_day <= 31)) {
horoimg.src = "../horoscope/img/horo" + monthpict + "_21-31.jpg";
document.getElementById("horomonth").innerHTML = "<b>21-"+horomonth[current_month][3]+" "+horomonth[current_month][1]+"</b>";
document.getElementById("horoname").innerHTML = "<b>"+horomonth[current_month][4][3]+"</b>";
for (var i = 0; i < document.links.length; i++) {
   if (document.links[i].className == "horolink1") {
         document.links[i].href = "../horoscope/"+horomonth[current_month][2]+"#days2131";
   }
}
for (var i = 0; i < document.links.length; i++) {
   if (document.links[i].className == "horolink2") {
         document.links[i].href = "../horoscope/"+horomonth[current_month][2]+"#days2131";
   }
}
}

document.horopict.src = horoimg.src;
