// 3harf.com
//tips.js
var tarayici_ie = document.all;
var tarayici_ff = document.getElementById && !document.all;

var govde = tarayici_ie ? "BODY" : "HTML"; //-?

//------------------------------------------------------------------

document.onmousemove = fare_hareket;

//------------------------------------------------------------------

//Fare imleci konum degistirince çalisir
function fare_hareket(e){
	if (!e) {e = window.event};
	
	//document.getElementById("genel_durum").innerHTML="hareket";
	
	fare_konum(e);
	tips_goster(e);
	//tasi_yap(e);
	
	//if (tasi_tasi) {return false};
	//if (kaydir_kaydir) {return false};
}
//------------------------------------------------------------------
//Farenin konumunu x ve y olarak iki degiskene yazar
function fare_konum(e){
	if (e) {
		if (tarayici_ie) {
			fare_x = e.clientX + document.body.scrollLeft;
			fare_y = e.clientY + document.body.scrollTop;
		}
		else {
			fare_x = e.pageX;
			fare_y = e.pageY;
		}
	}
	
	if (fare_x < 0) {fare_x = 0};
	if (fare_y < 0) {fare_y = 0};
	
	//document.getElementById("genel_durum").innerHTML=fare_x + " / " + fare_y;
}

//------------------------------------------------------------------

//Nesne özelliklerini okur
function ozellik_bul(nesne, ozellik){
	var metin = "";
	
	try {
		metin = nesne.attributes[ozellik].value;
	}
	catch(e) {
		metin = "-";
	}
	
	if (metin == "") {metin = "-"}
	
	return metin;
}

//------------------------------------------------------------------


// script.js

var tips_zamanasimi;

function tips_goster(e){
	var nesne;
	
	if (e.target != null) {nesne = e.target}
	else {nesne = e.srcElement}
	
	var tips_metin = ozellik_bul(nesne,"tips");
	var tips_div = document.getElementById("tips_div");
	
	if(tips_metin == "-") {
		clearTimeout(tips_zamanasimi);
		tips_div.style.display = "none";
	}
	else {
		tips_metin = tips_metin.replace(/\[/g, "<");
		tips_metin = tips_metin.replace(/\]/g, ">");
		
		tips_div.style.left = fare_x + 10 + "px";
		tips_div.style.top = fare_y - -21 + "px";
		
		tips_div.innerHTML = tips_metin;
		
		clearTimeout(tips_zamanasimi);
		tips_zamanasimi = setTimeout("tips_kutugoster()", 200);
	}
}

function tips_kutugoster(){
	document.getElementById("tips_div").style.display = "block";
}
// tips js - son
