// JavaScript Document
function openWindow(nome){
	var i;
	var w = 420;
	var h = 335;
	
	var esquerda = (screen.width - w)/2;
	var topo = (screen.height - h)/2;
	
	if (nome = "recado") {		
		window.open("functions/publicar_recado.asp", "_blank", "width="+ w +", height="+ h +", top="+ topo +", left="+ esquerda +", scrollbars=no, location=no");
		return i;
	}
}

function openWindow2(url){
	var i;
	window.open(url, "_blank", "scrollbars=yes, location=yes, resizable=yes");
	return i;
}

function printWindow(nome, id, tip){
	var w = 759;
	var h = 550;
	var i;
	var esquerda = (screen.width - w)/2;
	var topo = (screen.height - h)/2;
	if(nome == "print"){
		window.open("functions/imprimir.asp?id=" + id + "&type=" + tip , "_blank", "width="+ w +", height="+ h +", top="+ topo +", left="+ esquerda +", scrollbars=yes, location=no");
		return i;
	}
	if(nome == "email"){
		var w = 759;
		var h = 480;
		var i;
		var esquerda = (screen.width - w)/2;
		var topo = (screen.height - h)/2;
		window.open("functions/email.asp?id=" + id + "&type=" + tip , "_blank", "width="+ w +", height="+ h +", top="+ topo +", left="+ esquerda +", scrollbars=auto, location=no");
		return i;
	}
}
function maxLength(obj, limit) {
	if (obj.value.length >= limit) {
		obj.value = obj.value.substring(0, limit-1);
	}
}

var sizeFont = 1;

function AumentaFonte(){
	if(sizeFont < 1.6){
		sizeFont += 0.4;
		jQuery("#textoNoticia").css("fontSize", eval(parseInt(6*Math.round(sizeFont*2.4))) + "px");
		return true;
	}else{
		return false;
	}
}

function DiminuiFonte(){
	if(sizeFont > 1){
		sizeFont -= 0.4;
		jQuery("#textoNoticia").css("fontSize", eval(parseInt(6*Math.round(sizeFont*2.4))) + "px");
		return true;
	}else{
		return false;
	}
}
