/*
	Yazar  : Ertugrul Yildirim
	Ulasim : ertugrul_yildirim@hotmail.com
*/

// Nesne
var _nesne_ = new Object();	
function _nesne(no){
	if(!_nesne_[no]){
		if(typeof(document.getElementById(no)) != 'undefined') _nesne_[no] = document.getElementById(no);
		else _nesne_[no] = false;
	}
	return _nesne_[no];
}

// Baslik
function _baslik(){
	var baslik = {
		baslik : _nesne('baslik'),
		icerik : {},
		basla  : function(){
			if(!this.baslik){
				this.baslik = document.createElement('DIV');
				this.baslik.id = 'baslik';
				document.body.appendChild(this.baslik);
			}				
			for(i in this.icerik){
				_nesne(i).icerik = this.icerik[i];
				_nesne(i).baslik = this.baslik;
				_nesne(i).onmouseover = function(e){
					if(!e) e = window.event;						
					this.baslik.innerHTML = this.icerik;
					this.baslik.style.visibility = 'visible';
				}																														
				_nesne(i).onmousemove = function(e){
					if(!e) e = window.event;												
					this.baslik.style.top  = e.clientY+20+'px';
					this.baslik.style.left = e.clientX+'px';
				}						
				_nesne(i).onmouseout = function(){
					this.baslik.style.visibility = 'hidden';
				}					
			}
		}
	}		
	return baslik;
}
