 
 // set all Image Variables
 bin32Hours = new Image();
 bin32Minutes = new Image();
 bin32Seconds = new Image();
 
 bin16Hours = new Image();
 bin16Minutes = new Image();
 bin16Seconds = new Image();
 
 bin8Hours = new Image();
 bin8Minutes = new Image();
 bin8Seconds = new Image();
 
 bin4Hours = new Image();
 bin4Minutes = new Image();
 bin4Seconds = new Image();
 
 bin2Hours = new Image();
 bin2Minutes = new Image();
 bin2Seconds = new Image();
 
 bin1Hours = new Image();
 bin1Minutes = new Image();
 bin1Seconds = new Image();
 
 // set Images to use for zero and for one
 var zero = "./img/BinZero.gif";
 var one = "./img/BinOne.gif";
 
 // set arrays for the binarySize
 var binHours = new Array(6);
 var binMinutes = new Array(6);
 var binSeconds = new Array(6);
 
 // funtion to calculate binary time over regular time
 function calculateBinaryTime() {
 
 	// get the current Date
 	var currentDate = new Date();
 		
	var tempCurrentHours = currentDate.getHours();
	var tempHoursGeteilter;
	
	var tempCurrentMinutes = currentDate.getMinutes();
	var tempMinutesGeteilter;
			
	var tempCurrentSeconds = currentDate.getSeconds();
	var tempSecondsGeteilter;
	
	var i = 0;
	
	for (i = 0; i < 6; i++) {
		// calculate Hours
		binHours[i] = tempCurrentHours % 2;
		tempHoursGeteilter = ((tempCurrentHours	- (tempCurrentHours % 2)) / 2);
		tempCurrentHours = tempHoursGeteilter;
		
		// calculate Minutes
		binMinutes[i] = tempCurrentMinutes % 2;
		tempMinutesGeteilter = ((tempCurrentMinutes	- (tempCurrentMinutes % 2)) / 2);
		tempCurrentMinutes = tempMinutesGeteilter;
		
		// calculate Seconds
		binSeconds[i] = tempCurrentSeconds % 2;
		tempSecondsGeteilter = ((tempCurrentSeconds	- (tempCurrentSeconds % 2)) / 2);
		tempCurrentSeconds = tempSecondsGeteilter;
	}
	
	setBinaryTime();
 }
 
 function setBinaryTime() {
 	var z = 0;
	
 	for (z = 0; z < 6; z++) {
		
		var strHours = "bin" + Math.pow(2,z) + "hours";
		var strMinutes = "bin" + Math.pow(2,z) + "Minutes";
		var strSeconds = "bin" + Math.pow(2,z) + "Seconds";
				
		if (binHours[z] == 1) {
			turnOn(strHours);
		} else {
			turnOff(strHours);
		}
		
		if (binMinutes[z] == 1) {
			turnOn(strMinutes);
		} else {
			turnOff(strMinutes);
		}
		
		if (binSeconds[z] == 1) {
			turnOn(strSeconds);
		} else {
			turnOff(strSeconds);
		}
		
 	}
	
	setTimeout("calculateBinaryTime()", 0);
	
 }
 
 function turnOn(name)   {
         document[name].src = one;
 }
 function turnOff(name)  {
         document[name].src = zero;
 }
 
 function loadBinTime() {
		calculateBinaryTime();
 }
