  function t(){
                v=new Date();
                var bxx=document.getElementById('bxx');
                n=new Date();
                ss=pp;
                s=ss-Math.round((n.getTime()-v.getTime())/1000.);
                m=0;h=0;
                if(s<0){
                if (txtReady=='R'){ location.href = location.href; } else { bxx.innerHTML=txtReady; location.href = location.href; }
                }else{
                  if(s>59){
                    m=Math.floor(s/60);
                    s=s-m*60
                  }
                  if(m>59){
                    h=Math.floor(m/60);
                    m=m-h*60
                  }
                  if(s<10){
                    s="0"+s
                  }
                  if(m<10){
                    m="0"+m
                  }
                    if(h<10){
                    h="0"+h
                  }
                  bxx.innerHTML=h+":"+m+":"+s
                }
                pp=pp-1;
                window.setTimeout("t();",999);

              }
            

function get_separated_time(aTime)
{
    var minute_const = 60;
    var hour_const = 60 * minute_const;
    var day_const = 240 * hour_const;

    var ret_time = new Array(4);
    ret_time[0] = Math.floor(aTime / day_const);
    ret_time[1] = Math.floor(aTime / hour_const);
    ret_time[2] = Math.floor((aTime % hour_const) / minute_const);
    ret_time[3] = Math.floor(aTime % minute_const); 

    for (var i=0; i < ret_time.length; i++)
    {
      if (ret_time[i] < 10) ret_time[i] = '0' + ret_time[i];
    }

    return ret_time;
}

function count_down_timer()
{
    	var timeractive = true;
    	var loading = false;
	for (var timer_num=1; timer_num <= total_timers; timer_num++)
	{
		var currenttimer_all = document.getElementById('cnt_all['+timer_num+']');
		var timervalue_all = currenttimer_all.title;
		timertext = get_separated_time(timervalue_all);
        if (timervalue_all<=0){ 
        if (refreshing != 'no'){ currenttimer_all.innerHTML = '00:00:00'; location.href = location.href; } else { currenttimer_all.innerHTML = 'Refresh'; 
        }} else {
		currenttimer_all.innerHTML = timertext[1]+':'+timertext[2]+':'+timertext[3];
currenttimer_all.title = timervalue_all-1; }
		
	}
	if (timeractive == true)
	{
		window.setTimeout('count_down_timer()',1000-(total_timers*2));
	}
	else 
	{
		if (!loading)
		{
			loading = true;
			location.href = location.href; 
		}
	}
}

var cX = 0; var cY = 0; var rX = 0; var rY = 0;
function UpdateCursorPosition(e){ cX = e.pageX; cY = e.pageY;}
function UpdateCursorPositionDocAll(e){ cX = event.clientX; cY = event.clientY;}

if(document.all) { document.onmousemove = UpdateCursorPositionDocAll; }
else { document.onmousemove = UpdateCursorPosition; }

function AssignPosition(d) {
if(self.pageYOffset) {
rX = self.pageXOffset;
rY = self.pageYOffset;
}
else if(document.documentElement && document.documentElement.scrollTop) {
rX = document.documentElement.scrollLeft;
rY = document.documentElement.scrollTop;
}
else if(document.body) {
rX = document.body.scrollLeft;
rY = document.body.scrollTop;
}
if(document.all) {
cX += rX;
cY += rY;
}
d.style.left = (cX+8) + "px";
d.style.top = (cY+8) + "px";
}
function HideText(d) {

document.getElementById(d).style.display = "none";
}
function ShowText(d) {
var dd = document.getElementById(d);
AssignPosition(dd);
dd.style.display = "block";
}

function laikrodis () {

		var tim1 = document.getElementById('time');
		var tim = tim1.title;

timertext = get_separated_time(tim);
paru = Math.floor(timertext[1]/24); 
timertext[1] = (timertext[1]-paru*24)+2; 
if (timertext[1] >= 24){ timertext[1]=timertext[1]-24; }
tim1.innerHTML = timertext[1]+':'+timertext[2]+':'+timertext[3];
tim++; 
tim1.title = tim;

  setTimeout("laikrodis()",1000)

}



