
window.onload = make_attempt;
var attempts_key = 'gallery_extras_attempts_made';
window[attempts_key] = 0;

function add_border() {
	try {
		var dock = document.getElementById('dock');
		var img = document.getElementById('img');
		var table = dock.getElementsByTagName('table')[0];
		//img.style.border = '20px double #663300';
		table.style.width = img.width + 'px';
	}
	catch(e) {
		make_attempt();
	}
}

function make_attempt() {
	window[attempts_key]++;
	setTimeout(add_border, 10);
}

