<!--
function SubmitAndRun(parRedirectOk,parRedirectNo,parType) {
	frmLogin.txtRedirectOk.value = parRedirectOk;
	frmLogin.txtRedirectNo.value = parRedirectNo;
	frmLogin.txtType.value = parType;
    frmLogin.submit();
}

function checkSubmitAndRun(parRedirectOk,parRedirectNo,parType) {
	if (window.event.keyCode == 13) {
		// Enter key is pressed
		frmLogin.txtRedirectOk.value = parRedirectOk
		frmLogin.txtRedirectNo.value = parRedirectNo
		frmLogin.txtType.value = parType
                frmLogin.submit()
	} else {
		// Other than  enter key pressed
		window.event.cancelBubble = true;
	       }
}
	
function doOK() 
	{    
		if (userName.value.length > 0)
		{
			if (userPwd.value.length > 0)   
			{      
				window.returnValue = userName.value + "!" + userPwd.value;
				window.close();
			} else {
				alert("Utilizador ou Password Inválida");
				userPwd.focus();
			}
		} else {
			alert("Utilizador ou Password Inválida");
			userName.focus();
		}
			
		return true;   
}


// quick browser tests
var ns4 = (document.layers) ? true : false;
var ie4 = (document.all && !document.getElementById) ? true : false;
var ie5 = (document.all && document.getElementById) ? true : false;
var ns6 = (!document.all && document.getElementById) ? true : false;

function show(sw,obj) {
	if (sw && (ie4 || ie5) ) window.parent.document.all[obj].style.visibility = 'visible';
	if (!sw && (ie4 || ie5) ) window.parent.document.all[obj].style.visibility = 'hidden';
	if (sw && ns4) window.parent.document.layers[obj].visibility = 'visible';
	if (!sw && ns4) window.parent.document.layers[obj].visibility = 'hidden';
}

function CaricaFoto(img,tit){	
	if (!tit) tit = "Liga dos Bombeiros Portugueses";
  foto1= new Image();
  foto1.src=(img);
  Controlla(img,tit);
}
function Controlla(img,tit){
  if((foto1.width!=0)&&(foto1.height!=0)){
    viewFoto(img,tit);
  }
  else{
    funzione="Controlla('"+img+"','"+tit+"')";
    intervallo=setTimeout(funzione,20);
  }
}
function viewFoto(img,tit){
  largh=foto1.width+20;
  altez=foto1.height+20;
  var winl = (screen.width - largh) / 2;
  var wint = (screen.height - altez) / 2;
  stringa="width="+largh+",height="+altez+",top="+wint+",left="+winl;
  finestra=window.open("","",stringa);
  finestra.document.write("<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN' 'http://www.w3.org/TR/html4/loose.dtd'>");
  finestra.document.write("<html><head><title>"+tit+"</title><body bgcolor='#ffffff' topmargin='8' leftmargin='0'><div align='center' valign='middle'><img src='");
  finestra.document.write(img);
  finestra.document.write("'></div></body></html>");
}

// *** POP-UP ***
    var optionString,mainWin;
    function dialogpopper(thisUrl,thisWidth,thisHeight,thisTop,thisLeft)
    {
    optionString = ('dialogWidth:' + thisWidth + ';dialogHeight:' + thisHeight + ';status:no');
    mainWin = showModalDialog(thisUrl,"",optionString);
    }
 
    function NewWindow(mypage, myname, w, h, scroll,status) {
    var winl = (screen.width - w) / 2;
    var wint = (screen.height - h) / 2;
    winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable=no,location=no,status='+status+''
    win = window.open(mypage, myname, winprops)
    if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
    }

//-->
