function postVote(elem, text)
{
	$(elem).html(text);
	$(elem).show('slow');
}

function openPrintPage()
{
	var link = document.URL;
	if (link.indexOf('?') == -1)
		link = link + "?type=98";
	else
		link = link + "&link=98";
	window.open(link, "print","width=700,height=750,left=0,top=0,scrollbars=yes,menubar=no,resizable=1");
	return false;
}

function tellafriend()
{
	$('#tellafriend_box').slideToggle('slow');
	return false;
}

function bookmarks()
{
	$('#bookmark_box').slideToggle('slow');
	return false;
}

function addFavourite(Text, URL) {

	if (window.sidebar) { // firefox
		window.sidebar.addPanel(Text, URL, "");
	}

	else if(window.opera && window.print) { // opera
		var elem = document.createElement('a');
		elem.setAttribute('href', URL);
		elem.setAttribute('title', Text);
		elem.setAttribute('rel', 'sidebar');
		elem.click();
	}

	else if(document.all) { // ie
		window.external.AddFavorite(URL, Text);
	}
}

$(document).ready(function() {
	var size = $('body').css('font-size');
	var size = parseFloat(size, 10);
	$('a.fchange').click(function() {
		var currentSize = $('body').css('font-size');
		var num = parseFloat(size, 10);
		var unit = currentSize.slice(-2);
		if (this.id == 'linkLarge')
			num = num * 1.2;
		else
			num = num / 1.2;
		$('body').css('font-size', num + unit);
	});
});
