/**

	@author 	David Michael Nelson <david@lab89.com.br>
	
	@description 	Classe "Relogio" com a função de mostrar as horas em tempo real.

*/
	var Clock = new Object();
	
	Clock = {
		
		Elements : new Array(),
		
		getElements : function(){
			for ( i = 0; i < arguments[0].length ; i++){
				this.Elements[i] = document.getElementById(arguments[0][i]);
			}
		},
		
		TwoChars : function ( number ){
			
			var number = new Number(parseInt(number));
			if( number  < 10 )  number = '0' + number ;	
			
			return number;
		},
		
		TimeGet : function(){
				
			var Time = new Date();
			
			var Hour 	=  new Number( Time.getHours() );
			var Minutes =  new Number( Time.getMinutes() );
			var Seconds =  new Number( Time.getSeconds() );
			
			return  this.TwoChars(Hour) + ':' + this.TwoChars(Minutes) + ':' +  this.TwoChars(Seconds) ;
			
		},
		
		Show : function(){ 
						
				if( this.Elements.length == 0 ) this.getElements( arguments ) ;
				
				for ( i = 0; i <  this.Elements.length ; i++ ){
					 this.Elements[i].innerHTML = this.TimeGet();
				}
				
				arg = new Array();
				arg = this.Elements;
				
				setTimeout("Clock.Show(arg)" , 1000 )
		}
	}