// JavaScript Document
function resizeMe(obj){
	docHeight = cont.document.body.scrollHeight
	obj.style.height = docHeight + 0 + 'px'
}
function abre_site(width, height, nome) {
	var top; var left;
	top = ( (screen.height/2) - (height/2) )
	left = ( (screen.width/2) - (width/2) )
	window.open(nome, "","toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=1,scrollbars=1,width="+width+",height="+height+",left="+left+",top="+top);
}

function abrir_site(width, height, nome) {
	var top; var left;
	top = ( (screen.height/2) - (height/2) )
	left = ( (screen.width/2) - (width/2) )
	window.open(nome, "","toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=0,scrollbars=0,width="+width+",height="+height+",left="+left+",top="+top);
}

function carregar(){
	parent.moveTo(150,150);
	largura = parent.document.body.scrollHeight + 30;
	altura = parent.document.body.scrollWidth + 10;
	parent.resizeTo(altura,largura);
}

function unidades(unidade){
	if(unidade == 1){
		return true
	} else {
		alert("Unidade II e III somente para reservas acimas de 50 pessoas!");
	}
}
function valida_reserva(){
	homem = parseInt(document.reserva.homem.value);
	mulher = parseInt(document.reserva.mulher.value);
	total = (homem+mulher);
	if((total < 50) && ((document.reserva.unidade.value == 3) || (document.reserva.unidade.value == 2))){
		alert("Unidade II e III somente para reservas acimas de 50 pessoas!");
	} else {
		document.reserva.submit();	
	}
}