
var IE = document.all?true:false;
if (!IE) document.captureEvents(Event.MOUSEMOVE);
document.onmousemove = getMouseXY;
var mousex = 0;
var mousey = 0;
var sdd=0;
var sddn=0;
var stl=0;
var llink = 0;
var thol_scrollleft=0;
var thol_scrolltop=0;

if (!IE)
{
	var imgfond="fond1.gif";
	var lt=200;
	var ht=150;
}
else
{
	var imgfond="fond1ie.gif";
	var lt=200;
	var ht=150;
}

var lti=200;
var hti=150;

function getMouseXY(e)
{
	if (document.documentElement.scrollLeft)
	{
		thol_scrollleft = document.documentElement.scrollLeft;
	}
	else
	{
		thol_scrollleft = document.body.scrollLeft;
	}

	if (document.documentElement.scrollTop)
	{
		thol_scrolltop = document.documentElement.scrollTop;
	}
	else
	{
		thol_scrolltop=document.body.scrollTop;
	}

	if (IE)
	{
		mousex = event.clientX + thol_scrollleft;
		mousey = event.clientY + thol_scrolltop;
	}
	else
	{
		mousex = e.pageX;
		mousey = e.pageY;
	}

	if (mousex < 0)
	{
		mousex = 0;
	}

	if (mousey < 0)
	{
		mousey = 0;
	}
}

document.write('<div id="thol" style="position:absolute;visibility:hidden;z-index:9999;top:0;left:0;"></div>');

window.onload = function () 
{
	var x = document.getElementsByTagName('a');
	for (var i=0;i<x.length;i++)
	{
		x[i].onmouseover = function() 
		{
			if (!sdd)
			{
				showdd(this.getAttribute("href"));
				sdd=1;
			}
		}

		x[i].onmousemove = function()
		{
			if (!sdd)
			{
				sdd=1;
				showdd(this.getAttribute("href"));
			}
		}

		x[i].onmouseout = function() 
		{
			sdd=0;
			setTimeout("hidedd();",500);
		}
	}
}

function showdd(link)
{
	var chkext=link.substr(0,4);
	ddomain=document.location.href;
	ddomain=ddomain.replace("http://","");
	ddomain=ddomain.replace("https://","");
	ddomain=ddomain.replace("www.","");
	var ddomain=ddomain.split('/');
	var ddomain = ddomain[0];
	ldomain=link;
	ldomain=ldomain.replace("http://","");
	ldomain=ldomain.replace("https://","");
	var ldomain=ldomain.split('/');
	var ldomain = ldomain[0];
	ldomainc=ldomain.replace("www.","");

	if (ldomainc && ddomain && chkext=="http" && !ldomainc.match(ddomain))
	{
		chg=1;
		if (llink!==ddomain)
		{
			var bc2  ="2";
			var bcl ="000000";

			document.getElementById('thol').innerHTML=
			"<table style=\"border-collapse: collapse;border: 1px solid #"+bc2+";\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" onmouseover=\"sddn=1;\" onmouseout=\"sddn=0;setTimeout('hidedd();',500);\"><tr><td><table border=0 cellpadding=0 cellspacing=0><tr><td><table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse;\"><tr><td width=\""+lti+"\" height=\""+hti+"\" align=center valign=center style=\"padding:2px 2px 2px 2px;background-image: url('http://www.thumbs-online.com/img/load1.gif'); background-repeat: no-repeat; background-position: center\" valign=\"top\"><a href=\""+link+"\" target=\"_target\"><img width=\""+lti+"\" height=\""+hti+"\" border=\"1\" style=\"border: solid #888888 1px\" onmouseover=\"this.style.borderColor='#"+bcl+"'\" onmouseout=\"this.style.borderColor='#888888'\" alt=\"\" src=\"http://www.thumbs-online.com/view1.php?url="+link+"\"></a></td></tr></table></td></tr></table>";
			llink=ldomain;
		}

		if (chg && !stl)
		{
			setTimeout("showddt();",700);
		}
		else
		{
			if (window.innerWidth)
			{
				var cwidth=window.innerWidth;
			}
			else
			if (document.documentElement.clientWidth)
			{
				var cwidth=document.documentElement.clientWidth;
			}
			else
			if (document.body.clientWidth)
			{
				var cwidth=document.body.clientWidth;
			}

			if (window.innerHeight)
			{
				var cheight=window.innerHeight;
			}
			else
			if (document.documentElement.clientHeight)
			{
				var cheight=document.documentElement.clientHeight;
			}
			else
			if (document.body.clientHeight)
			{
				var cheight=document.body.clientHeight;
			}

			if ((mousex+lt+20)>cwidth)
			{
				mousex=mousex-(lt+5);
			}
			else
			{
				mousex=mousex+5;
			}
			
			if ((mousey+ht+55)>cheight+thol_scrolltop)
			{
				mousey=mousey-(ht+45);
			}
			else
			{
				mousey=mousey+5;
			}

			document.getElementById('thol').style.left=mousex+'px';
			document.getElementById('thol').style.top=mousey+'px';
		}
	}
}

function hidedd()
{
	if (!sdd && !sddn)
	{
		document.getElementById('thol').innerHTML="";
		document.getElementById('thol').style.visibility="hidden";
		sdd=0;
		stl=0;
	}
}

function showddt()
{ 
	document.getElementById('thol').style.visibility='visible';
	stl=1;

	if (window.innerWidth)
	{
		var cwidth=window.innerWidth;
	}
	else
	if (document.documentElement.clientWidth)
	{
		var cwidth=document.documentElement.clientWidth;
	}
	else
	if (document.body.clientWidth)
	{
		var cwidth=document.body.clientWidth;
	}

	if (window.innerHeight)
	{
		var cheight=window.innerHeight;
	}
	else
	if (document.documentElement.clientHeight)
	{
		var cheight=document.documentElement.clientHeight;
	}
	else
	if (document.body.clientHeight)
	{
		var cheight=document.body.clientHeight;
	}

	if ((mousex+lt+20)>cwidth)
	{ 
		mousex=mousex-(lt+5);
	}
	else
	{
		mousex=mousex+5;
	}

	if ((mousey+ht+55)>cheight+thol_scrolltop)
	{
		mousey=mousey-(ht+45);
	}
	else
	{
		mousey=mousey+5;
	}

	document.getElementById('thol').style.left=mousex+'px';
	document.getElementById('thol').style.top=mousey+'px';
}

