// JavaScript Document

// FB
if(top.location!=document.location) top.location=document.location;
// AB
function addBookmark(url, title) {
	if (!url) url = location.href;
	if (!title) title = document.title;
	// Gecko
	if((typeof window.sidebar == "object")&&(typeof window.sidebar.addPanel == "function"))
		window.sidebar.addPanel (title,url,"");
	// IE4+
	else if(typeof window.external == "object")
		window.external.AddFavorite(url,title);
	// Opera7+
	else if(window.opera && document.createElement) {
		var a = document.createElement('A');
		if(!a)
			return false; // IF Opera 6
		a.setAttribute('rel','sidebar');
		a.setAttribute('href',url);
		a.setAttribute('title',title);
		a.click();
	}
	else
		return false;
	return true;
}
// CT
var ct = new Array();
function changeThumb(path, imgid, i) {
	if (ct[imgid]) {
		preloaded = (i + 1) % 16;	
		document.getElementById("t" + imgid).src = path + i + ".jpg";
		document.getElementById("preload").src = path + preloaded + ".jpg";
		i = i % 16;
		i++;
		setTimeout("changeThumb('" + path + "'," + imgid + "," + i + ")", 600);
	}
}	
function startThumbChange(path, imgid) {	
	ct[imgid] = true;
	changeThumb(path, imgid, 1);
}
function endThumbChange(path, imgid, slug) {
	ct[imgid] = false;
	document.getElementById("t" + imgid).src = path + slug + "_thumb.jpg";
}
// IF
function acdc(site,domain) {
	window.focus();
	bug = new Image();
	bug.src = 'http://www.' + site + '/ads/out/' + domain;
}