window.onresize = function() { checkSize(); LocalizacaoPosiciona(); };
window.onshow = checkSize;
window.onload = function() { checkSize(); };
window.onopen = checkSize;

//checkSize
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 (w>=990)
	{
		document.getElementById("obj").style.width = Math.max(0, 100) + "%";
	}
	else
	{
		document.getElementById("obj").style.width = "990px";
	}
}

//abre imagem
function showFoto(src){
	$('<a rel="lightbox" href="imgs/o-anexo/' + src + '.jpg"></a>').appendTo('body').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});
}

//lista
function Lista(){
	$("#popup").html('<iframe width="587" height="552" frameborder="0" src="nome-na-lista/"></iframe>');
	$('#popup').popup({objectHide: false, width: 587, height: 552});
}
