
	// Esta variável define o endereço do servidor e da aplicação "segportalfachesf".
	var urlBase = "https://s008.fachesf.com.br/segportalfachesf/";

        //var urlBase = "https://FACHESF-078/segportalfachesf/";

		//urlBase = "http://192.168.3.123:8080/segportalfachesf/";
	
// --------------------------------------------------------------------------------------
	

	function abrirJanela(url, opt) {
		document.getElementById("divIframe").style.display = "block";

		var myWidth = 0;
		var myHeight = 0;
		if (typeof (window.innerWidth) == 'number') {
			myWidth = window.innerWidth - 16;
			myHeight = window.innerHeight;
			posc = window.pageYOffset;
		} else {
			myWidth = document.body.clientWidth;
			myHeight = document.body.clientHeight;
			posc = document.body.scrollTop;
		}
		document.getElementById("divIframe").style.top = (170)
				+ "px";
		document.getElementById("divIframe").style.left = (220)
				+ "px";
		document.getElementById('imframePrincipal').src = url;
	}

	function fecharJanela() {
		document.getElementById("divIframe").style.display = "none";
	}

	function loginParticipante(){
		var opt = "left=20,top=20,width=520,height=450,toolbar=0,resizable=0, top=300, left=300";
		var url = urlBase + "fwloginparticipantes.jsp";
		abrirJanela(url, opt);
	}

	function loginDependente(){
		var opt = "left=20,top=20,width=520,height=420,toolbar=0,resizable=0, top=300, left=300";
		abrirJanela(urlBase + "fwlogindependentes.jsp", opt);
	}

	function loginCredenciado(){
		var opt = "left=20,top=20,width=520,height=370,toolbar=0,resizable=0, top=300, left=300";
		var url = urlBase + "fwlogincredmedico.jsp";
		abrirJanela(url, opt);
	}

	function loginNaoParticipante(){
		var opt = "left=20,top=20,width=520,height=450,toolbar=0,resizable=0, top=300, left=300";
		var url = urlBase + "fwloginnaoparticipantes.jsp";
		abrirJanela(url, opt);
	}
