﻿function Styles(){
	
	this.swapDisplay = function(f){
		var field = document.getElementById(f);
		if(field.style.display == "none")
			field.style.display = "";
		else 
			field.style.display = "none";
	}
	
	this.styleDisplay = function(div, value){
		document.getElementById(div).style.display = value;
	}
	
	this.swapClass = function(id, value){
		document.getElementById(id).className = value;
	}
	
	this.styleWidth = function(div, value){
		document.getElementById(div).style.width = value;
	}
}
		
function updateTT(e) {
	x = (document.all) ? window.event.x + document.body.scrollLeft : e.pageX;
	y = (document.all) ? window.event.y + document.body.scrollTop  : e.pageY;
	if (tooltip != null) {
		tooltip.style.left = (x + 5) + "px";
		tooltip.style.top  = (y - 25) + "px";
	}
}

function showTT(id) {
	tooltip = document.getElementById(id);
	tooltip.style.display = "block";
}

function hideTT() {
	tooltip.style.display = "none";
}

var styl = new Styles();
var tooltip = null;