///////////////////////////////////////////////////////////
///////////////// S&RY JAVASCRIPTS ////////////////////////
///////////////////////////////////////////////////////////

//////////// NO SPAM //////////////////////

function noSpizzam(sDomain, sName)
// This function opens a mailer window (just as if the original
// href tag used 'mailto'
{
    var m = "mailto:" + sName + "@" + sDomain;
    document.location.replace(m);
}


//////////// TOOLTIP //////////////////////

function unblur() {
    this.blur();
}


function blurLinks() {
    var links = document.getElementsByTagName("a");
    for(i = 0; i < links.length; i++) {
        links[i].onfocus = unblur;
    }
}

toolTip = {
	name : "tooltip",
	tip : null,
	offsetX : -75,
	offsetY : -20
};
toolTip.init = function(){
	if(!document.getElementById) return;
	this.tip = document.getElementById(this.name);
	document.onmousemove = function(evt){toolTip.move(evt)};
};
toolTip.move = function(evt){
	if(!this.tip) return;
	var x = 0, y = 0;
	if(document.all){
		x = document.body.scrollLeft;
		y = document.body.scrollTop;
		if(document.documentElement && typeof document.documentElement.scrollLeft != "undefined"){
			x = Math.max(x, document.documentElement.scrollLeft);
			y = Math.max(y, document.documentElement.scrollTop);
		}
		x += window.event.clientX;
		y += window.event.clientY;
	}else{
		x = evt.pageX;
		y = evt.pageY;
	}
	this.tip.style.left = (x+this.offsetX)+"px";
	this.tip.style.top = (y+this.offsetY)+"px";
};
toolTip.show = function(text){
	if(!this.tip) return;
	this.tip.innerHTML =  text;
	this.tip.style.visibility = "visible";
	this.tip.style.display = "block";
};
toolTip.hide = function(){
	if(!this.tip) return;
	this.tip.style.visibility = "hidden";
	this.tip.style.display = "none";
	this.tip.innerHTML = "";
};

//////////// INITIATE SCRIPTS //////////////////////

function runScripts()
{
blurLinks();
toolTip.init();
}

window.onload = runScripts;

