function addbookmark(){
if (document.all)
window.external.AddFavorite('http://www.vibori.net/','Выборы Президента 2008')
}

function go(id) {
	url = id ;
	window.open(url, '','resizable=no, scrollbars=no, width=720, height=337','_blank');
}

function remain()
{
today = new Date();
BigDay = new Date("March 9, 2008")
msPerDay = 24 * 60 * 60 * 1000 ;
timeLeft = (BigDay.getTime() - today.getTime());
e_daysLeft = timeLeft / msPerDay;
daysLeft = Math.floor(e_daysLeft);
e_hrsLeft = (e_daysLeft - daysLeft)*24;
hrsLeft = Math.floor(e_hrsLeft);
minsLeft = Math.floor((e_hrsLeft - hrsLeft)*60);
document.write( "<b>"+daysLeft+"</b>");
}

 function GetTime() { 
 var dt = new Date();
 var def = dt.getTimezoneOffset()/60;
 var gmt = (dt.getHours() + def - 1);
 var ending = ":" + IfZero(dt.getMinutes()) + ":" +  IfZero(dt.getSeconds());
 
 var kalin =check24(((gmt + 3) > 24) ? ((gmt + 3) - 24) : (gmt + 3));
 document.clock.kalin.value = (IfZero(kalin) + ending);

 var vlad =check24(((gmt + 11) > 24) ? ((gmt + 11) - 24) : (gmt + 11));
 document.clock.vlad.value = (IfZero(vlad) + ending);

 var msk =check24(((gmt + 4) > 24) ? ((gmt + 4) - 24) : (gmt + 4));
 document.clock.msk.value = (IfZero(msk) + ending);

 var sam =check24(((gmt + 5) > 24) ? ((gmt + 5) - 24) : (gmt + 5));
 document.clock.sam.value = (IfZero(sam) + ending);

 setTimeout("GetTime()", 1000);
 }
 function IfZero(num) {
 return ((num <= 9) ? ("0" + num) : num);
 }
 function check24(hour) {
 return (hour >= 24) ? hour - 24 : hour;
 }

function segodna()
{
var CurrentDate = new Date();
var DayOfWeek = new Array('года, воскресенье','года, понедельник','года, вторник','года, среда','года, четверг','года, пятница','года, суббота');
var MonthName = new Array('января','февраля','марта','апреля','мая','июня','июля','августа','сентября','октября','ноября','декабря');
document.write('' + CurrentDate.getDate() + ' ' + MonthName[CurrentDate.getMonth()] + ' ' + (CurrentDate.getYear() < 200 ? CurrentDate.getYear() + 1900 : CurrentDate.getYear()) + ' ' + DayOfWeek[CurrentDate.getDay()] +'');
}
