function showFoto()
{
	$('#imagens').remove();
	$('<div id="imagens"></div>').appendTo('body');

	for(var i = 0; i < arguments.length; i+=2)
	{
		$('<a rel="lightbox" href="library/redimensiona.php?width=770&height=440&src=..' + arguments[i] + '" title="' + ((arguments[i+1] != "undefined") ? arguments[i+1] : "") + '"></a>').appendTo('#imagens');
	}

	$('a[@rel*=lightbox]').lightBox({
		imageLoading: 'library/jquery/lightbox/imagem/loading.gif',
		imageBtnPrev: 'library/jquery/lightbox/imagem/prev.gif',
		imageBtnNext: 'library/jquery/lightbox/imagem/next.gif',
		imageBtnClose: 'library/jquery/lightbox/imagem/close.gif',
		imageBlank: 'library/jquery/lightbox/imagem/blank.gif',
		open: true});
}

function checkSize()
{
	var ie = /msie/i.test(navigator.userAgent);
	var ieBox = ie && (document.compatMode == null || document.compatMode == "BackCompat");
	var canvasEl = ieBox ? document.body : document.documentElement;
	var w = window.innerWidth || canvasEl.clientWidth;
	var h = window.innerHeight || canvasEl.clientHeight;
	
	if (h>=832)
	{
		document.getElementById("obj").style.height = Math.max(0, 100) + "%";
	}
	else
	{
		document.getElementById("obj").style.height = "832px";
	}
	if (w>=990)
	{
		document.getElementById("obj").style.width = Math.max(0, 100) + "%";
	}
	else
	{
		document.getElementById("obj").style.width = "990px";
	}
}

window.onresize = checkSize;
window.onshow = checkSize;
window.onload = checkSize;
window.onopen = checkSize;
