function showthumb(id, url, width, height)
{
	var w = window.open('','thumb','left='+Math.round((screen.width - width) / 2)+',top='+Math.round((screen.height - height) / 2)+',width='+width+',height='+height+',statusbar=0,toolbar=0,scrollbars=0');
	w.document.writeln('\
		<html>\
			<head></head>\
			<body style="margin:0; padding:0;">\
				<img src="'+url+'" height="'+height+'" width="'+width+'" alt="" onclick="window.close()" />\
			</body>\
		</html>\
	');
	w.document.close();
	return false;

	var image = document.getElementById('i' + id);
	var thumb = document.getElementById('thumb' + id);

	var left = Math.round((document.width - width) / 2);
	var top = 70; // Math.round((document.height - height) / 2);

	thumb.style.display = 'block';
//	thumb.style.left = left;
	thumb.style.top = top;

	image.src = url;
	thumb.style.cssText = 'left:' + left + 'px; top:' + top + 'px; display: block;';

	return false;
}

function hidethumb(id)
{
	document.getElementById('thumb' + id).style.display = 'none';
}

function setCookie (name, value, expires, path, domain, secure) {
    document.cookie = name + "=" + escape(value) +
      ((expires) ? "; expires=" + expires : "") +
      ((path) ? "; path=" + path : "") +
      ((domain) ? "; domain=" + domain : "") +
      ((secure) ? "; secure" : "");
}

$(document).ready(function(){
	$('#fonts span').bind('click', function(){
		$('#fonts span.highlight').removeClass('highlight');
		$(this).toggleClass('highlight');
		$('#text').removeClass().toggleClass($(this).attr('class')).removeClass('highlight');
		setCookie('docfs', $('#text').attr('class'), '0', '/');
	});
});