var t;
	
function getClientTime(){
		var mydate= new Date();
		var minutes;
		var hours;
		var i = 0;
		var code = "at";
		var acode = code;
		var actCell;
		var offset = mydate.getTimezoneOffset() / 60;
		var ind = 23;
		
		var actVal;
		var start = 23 - offset;

		if (mydate.getMinutes() < 10) minutes = "0" + mydate.getMinutes();
		else minutes = mydate.getMinutes();
		
		if (mydate.getHours() < 10) hours = "0" + mydate.getHours();
		else hours = mydate.getHours();
		
		document.getElementById("at0t").innerHTML = hours + ":" + minutes;

		hours = mydate.getHours() + offset + 10;
		if (hours < 10) hours = "0" + hours;
		document.getElementById("at1t").innerHTML = hours + ":" + minutes;	
						
		hours = mydate.getHours() + offset + 9;
		if (hours < 10) hours = "0" + hours;
      document.getElementById("at2t").innerHTML = hours + ":" + minutes;					
		hours = mydate.getHours() + offset + 1;
		if (hours < 10) hours = "0" + hours;
      document.getElementById("at3t").innerHTML = hours + ":" + minutes;					
		hours = mydate.getHours() + offset + 0;
		if (hours < 10) hours = "0" + hours;
      document.getElementById("at4t").innerHTML = hours + ":" + minutes;					
		hours = mydate.getHours() + offset - 5;
		if (hours < 10) hours = "0" + hours;
      document.getElementById("at5t").innerHTML = hours + ":" + minutes;					

      	
		if (start>23) start = start - 24;
		
		var k; 
		for (i=0;i<24;i++){
			acode = code + i;
			actCell = document.getElementById(acode);			
			actVal = i + start;
			if (actVal > 23) actVal = actVal - 24;
			actCell.innerHTML = actVal;
			if (actVal == mydate.getHours()) {
            
			   if (i==0) k = 24;
            else k = i-1;
			   acode = "at" + (k);
				actCell = document.getElementById(acode);
				actCell.style.color = "#333";
				actCell.style.fontSize = "10px";
				actCell.style.fontWeight = "normal";
				actCell.style.padding = "2px 3px";
			   
			   acode = "at" + (i);
				actCell = document.getElementById(acode);
				actCell.style.color = "#FF0000";
				actCell.style.fontSize = "14px";
				actCell.style.fontWeight = "bold";
				actCell.style.padding = "2px 3px";

			   if (i==0) k = 24;
            else k = i-1;
			   acode = "a1" + (k+1);
				actCell = document.getElementById(acode);
				actCell.style.color = "#333";
				actCell.style.fontSize = "10px";
				actCell.style.fontWeight = "normal";
				actCell.style.padding = "2px 3px";

				acode = "a1" + (i+1);
				actCell = document.getElementById(acode);
				actCell.style.color = "#FF0000";
				actCell.style.fontSize = "14px";
				actCell.style.fontWeight = "bold";
				actCell.style.padding = "2px 3px";

			   if (i==0) k = 24;
            else k = i-1;
			   acode = "a2" + (k+1);
				actCell = document.getElementById(acode);
				actCell.style.color = "#333";
				actCell.style.fontSize = "10px";
				actCell.style.fontWeight = "normal";
				actCell.style.padding = "2px 3px";
				acode = "a2" + (i+1);
				actCell = document.getElementById(acode);
				actCell.style.color = "#FF0000";
				actCell.style.fontSize = "14px";
				actCell.style.fontWeight = "bold";
				actCell.style.padding = "2px 3px";

			   if (i==0) k = 24;
            else k = i-1;
			   acode = "a3" + (k+1);
				actCell = document.getElementById(acode);
				actCell.style.color = "#333";
				actCell.style.fontSize = "10px";
				actCell.style.fontWeight = "normal";
				actCell.style.padding = "2px 3px";
				acode = "a3" + (i+1);
				actCell = document.getElementById(acode);
				actCell.style.color = "#FF0000";
				actCell.style.fontSize = "14px";
				actCell.style.fontWeight = "bold";
				actCell.style.padding = "2px 3px";

			   if (i==0) k = 24;
            else k = i-1;
			   acode = "a4" + (k+1);
				actCell = document.getElementById(acode);
				actCell.style.color = "#333";
				actCell.style.fontSize = "10px";
				actCell.style.fontWeight = "normal";
				actCell.style.padding = "2px 3px";
				acode = "a4" + (i+1);
				actCell = document.getElementById(acode);
				actCell.style.color = "#FF0000";
				actCell.style.fontSize = "14px";
				actCell.style.fontWeight = "bold";
				actCell.style.padding = "2px 3px";

			   if (i==0) k = 24;
            else k = i-1;
			   acode = "a5" + (k+1);
				actCell = document.getElementById(acode);
				actCell.style.color = "#333";
				actCell.style.fontSize = "10px";
				actCell.style.fontWeight = "normal";
				actCell.style.padding = "2px 3px";
				acode = "a5" + (i+1);
				actCell = document.getElementById(acode);
				actCell.style.color = "#FF0000";
				actCell.style.fontSize = "14px";
				actCell.style.fontWeight = "bold";
				actCell.style.padding = "2px 3px";
											
			   if (i==0) k = 24;
            else k = i-1;
			   acode = "a6" + (k+1);
				actCell = document.getElementById(acode);
				actCell.style.color = "#333";
				actCell.style.fontSize = "10px";
				actCell.style.fontWeight = "normal";
				actCell.style.padding = "2px 3px";
				acode = "a6" + (i+1);
				actCell = document.getElementById(acode);
				actCell.style.color = "#FF0000";
				actCell.style.fontSize = "14px";
				actCell.style.fontWeight = "bold";
				actCell.style.padding = "2px 3px";
				
			}
		}
		
		if (offset < 0)	document.getElementById("atg").innerHTML = "GMT+" + ((-1)*offset);
		else document.getElementById("atg").innerHTML = "GMT" + ((-1)*offset);
		
		t = setTimeout("getClientTime()", 5000);
		
	}
