// alertas

function ConfirmOperation(Alerta, ConfAlerta, AbortAlerta, strLink)
{
var Alertado = window.confirm(Alerta);
if (Alertado) 
	{
	if (ConfAlerta != "") {
		window.alert(ConfAlerta);
		}
	window.location=(strLink)
	}  else  {
	window.alert(AbortAlerta);
	}
}
// GHtml.LinkWhithConfirmation(BoDictionary(109), strLink, BoDictionary(110), BoDictionary(111), BoDictionary(112))



function GoToURL(theMenu) {
	theURL = theMenu.options[theMenu.selectedIndex].value;
	if (theURL != "") document.location.href = theURL;
}

// validar campo de um formulario, pelo seu tamanho

function ValidaCampo(campo, tamanho, mensagem)
{
  if (campo.value.length >= tamanho)
  {
    return (true);
  } else {
    alert (mensagem) 
    return (false);
  } 
}
// Textos em caixas de formularios

function TextFieldOnFocus(InputTag, TextToShow)
{
	if (InputTag.value == TextToShow)
	{
		InputTag.value = "";
	}
}
function TextFieldOnBlur(InputTag, TextToShow)
{
	if (InputTag.value == "")
	{
		InputTag.value = TextToShow;
	}
}

// janela flutuante, recomende, ..

var newFloatWindow = null;
function openRecomende(URLtoOpen){
	FloatWindowFeatures ="menubar=no,scrollbars=no,location=no,favorites=no,resizable=no,status=no,toolbar=no,directories=no";
	var Swidth = 690;
	var Sheight = 415;
	var SwinLeft = (screen.width-Swidth)/2; 
	var SwinTop = (screen.height-(Sheight+10))/2; 
    newFloatWindow = window.open("","Recomende","width=" + Swidth +",height=" + Sheight + ",left=" + SwinLeft + ",top=" + SwinTop + ",'" + FloatWindowFeatures + "'");
   	if (newFloatWindow != null) {
		if (newFloatWindow.opener == null) {
        	newFloatWindow.opener = self;
        }
    newFloatWindow.location.href = URLtoOpen;
   	newFloatWindow.opener.name = "xtendbo";
    newFloatWindow.focus();
	}
}