
function msgbox_ok_cancel(strMsg)
{
// não está em uso mais. o único local que estava sendo usado era
// em T_Estrutura_Pedidos_Em_Aberto.out (botão exclui pedido na tela mãe)

	if (confirm(strMsg)){
		//alert("OK");
		return true;
	}
	else {
		//alert("CANCEL");
		return false;
	}

}

function msgbox_ok(strMsg,strForm,strCampo)
{
	//está modificado em todos os lugares

	// strForm e strCampo são onde retornarão o foco, estes campos são opcionais.
	pixWndAlert(strMsg, 'ATENÇÃO','false', ID_WND_INFORMATION,strForm,strCampo,'');
}

/**************************************************************************/
function mensagem_fim_pedido(strPergunta, strMensagem, strPaginaRetorno) {

// está modificado em todos os lugares

	var strRetorno = "";

	if(strMensagem == "") {
		strRetorno = strPaginaRetorno;
	}

	var callbackYes = "retorno_mensagem_fim_pedido('true' ,'" + strPergunta + "','" + strMensagem + "','" + strPaginaRetorno + "')"
	var callbackNo  = "retorno_mensagem_fim_pedido('false','" + strPergunta + "','" + strMensagem + "','" + strPaginaRetorno + "')"

    /* Pergunta se quer sair do sistema */
	pixWndConfirm(strPergunta,"ATENÇÃO",callbackYes,callbackNo,"","",strRetorno)


}

function retorno_mensagem_fim_pedido(booleano, strPergunta, strMensagem, strPaginaRetorno) {

	returnFunction = booleano;

	if ((returnFunction == "true")&& (strMensagem != "")) {
		setTimeout(function(){pixWndAlert(strMensagem, 'ATENÇÃO', 'false', ID_WND_INFORMATION,'','',strPaginaRetorno);}, 500); // 0,5 segundo
	}
}

/**************************************************************************/
function mensagem_fim_pedido_PV(strPagina, strPergunta, strMensagem) {

//está modificado em todos os lugares

	var strRetorno = "";

	if(strMensagem == "") {
		strRetorno = strPagina;
	}

	var callbackYes = "retorno_mensagem_fim_pedido_PV('true' ,'" + strPagina + "','" + strPergunta + "','" + strMensagem + "')"
	var callbackNo  = "retorno_mensagem_fim_pedido_PV('false','" + strPagina + "','" + strPergunta + "','" + strMensagem + "')"

    	/* Pergunta se quer sair do sistema */
	pixWndConfirm(strPergunta,"ATENÇÃO",callbackYes,callbackNo,"","",strRetorno)


}

function retorno_mensagem_fim_pedido_PV(booleano, strPagina, strPergunta, strMensagem) {

	returnFunction = booleano;

	if ((returnFunction == "true")&& (strMensagem != "")) {
		setTimeout(function(){pixWndAlert(strMensagem, 'ATENÇÃO', 'false', ID_WND_INFORMATION,'','',strPagina);}, 500); // 0,5 segundo
	}
}

/**************************************************************************/
function mensagem_fim_pedido_ra(strPagina,strPergunta,strMensagem,strModelo1,strCor1,strTamanho1,strPergunta1,strModelo2,strCor2,strTamanho2,strPergunta2,strModelo3,strCor3,strTamanho3,strPergunta3,strModelo4,strCor4,strTamanho4,strPergunta4,strModelo5,strCor5,strTamanho5,strPergunta5){

	var form = document.frmPedidos;

	var callbackYes = "retorno_mensagem_fim_pedido_ra('true'  ,'" + strPagina + "','" + strPergunta + "','" + strMensagem + "','" + strModelo1 + "','" + strCor1 + "','" + strTamanho1 + "','" + strPergunta1 + "','" + strModelo2 + "','" + strCor2 + "','" + strTamanho2 + "','" + strPergunta2 + "','" + strModelo3 + "','" + strCor3 + "','" + strTamanho3 + "','" + strPergunta3 + "','" + strModelo4 + "','" + strCor4 + "','" + strTamanho4 + "','" + strPergunta4 + "','" + strModelo5 + "','" + strCor5 + "','" + strTamanho5 + "','" + strPergunta5 + "')"
	var callbackNo  = "retorno_mensagem_fim_pedido_ra('false' ,'" + strPagina + "','" + strPergunta + "','" + strMensagem + "','" + strModelo1 + "','" + strCor1 + "','" + strTamanho1 + "','" + strPergunta1 + "','" + strModelo2 + "','" + strCor2 + "','" + strTamanho2 + "','" + strPergunta2 + "','" + strModelo3 + "','" + strCor3 + "','" + strTamanho3 + "','" + strPergunta3 + "','" + strModelo4 + "','" + strCor4 + "','" + strTamanho4 + "','" + strPergunta4 + "','" + strModelo5 + "','" + strCor5 + "','" + strTamanho5 + "','" + strPergunta5 + "')"

	var strRetorno = "";

	if ((strMensagem=="") && (strPergunta1=="")) {
		strRetorno = "ConfirmacaoPedido.asp";
	}

	/* Pergunta se quer sair do sistema */
	pixWndConfirm(strPergunta,"ATENÇÃO",callbackYes,callbackNo,"frmPedidos","REFERENCIA",strRetorno)

}

function retorno_mensagem_fim_pedido_ra(booleano,strPagina,strPergunta,strMensagem,strModelo1,strCor1,strTamanho1,strPergunta1,strModelo2,strCor2,strTamanho2,strPergunta2,strModelo3,strCor3,strTamanho3,strPergunta3,strModelo4,strCor4,strTamanho4,strPergunta4,strModelo5,strCor5,strTamanho5,strPergunta5){

	returnFunction = booleano;
	var form = document.frmPedidos;
	var strRetorno;

	strRetorno = "ConfirmacaoPedido.asp";


	if (returnFunction=="true") {
			if (strPergunta1 != "") {
					//para saber quando devo ir para o ConfirmacaoPedido.asp
					var strEncerra1,strEncerra2,strEncerra3,strEncerra4,strEncerra5
					if (strPergunta2 == "") {
						strEncerra1 = "true";
						strEncerra2 = "false";
						strEncerra3 = "false";
						strEncerra4 = "false";
						strEncerra5 = "false";
					} else if (strPergunta3 == "") {
						strEncerra1 = "false";
						strEncerra2 = "true";
						strEncerra3 = "false";
						strEncerra4 = "false";
						strEncerra5 = "false";
					} else if (strPergunta4 == "") {
						strEncerra1 = "false";
						strEncerra2 = "false";
						strEncerra3 = "true";
						strEncerra4 = "false";
						strEncerra5 = "false";
					} else if (strPergunta5 == "") {
						strEncerra1 = "false";
						strEncerra2 = "false";
						strEncerra3 = "false";
						strEncerra4 = "true";
						strEncerra5 = "false";
					} else if (strPergunta5 != "") {
						strEncerra1 = "false";
						strEncerra2 = "false";
						strEncerra3 = "false";
						strEncerra4 = "false";
						strEncerra5 = "true";
					}

					setTimeout(function(){mensagem_modelo_sugerido(strPagina,'',strModelo1,strCor1,strTamanho1,strPergunta1,strModelo2,strCor2,strTamanho2,strPergunta2,strModelo3,strCor3,strTamanho3,strPergunta3,strModelo4,strCor4,strTamanho4,strPergunta4,strModelo5,strCor5,strTamanho5,strPergunta5,strEncerra1,strEncerra2,strEncerra3,strEncerra4,strEncerra5,strMensagem);}, 500); // 0,5 segundo
			}else{
					if(strMensagem != "") {
						var callbackYes = "retorno_mensagem_fim_pedido_ra('false','" + strPagina + "','" + strPergunta + "','','" + strModelo1 + "','" + strCor1 + "','" + strTamanho1 + "','" + strPergunta1 + "','" + strModelo2 + "','" + strCor2 + "','" + strTamanho2 + "','" + strPergunta2 + "','" + strModelo3 + "','" + strCor3 + "','" + strTamanho3 + "','" + strPergunta3 + "','" + strModelo4 + "','" + strCor4 + "','" + strTamanho4 + "','" + strPergunta4 + "','" + strModelo5 + "','" + strCor5 + "','" + strTamanho5 + "','" + strPergunta5 + "')"
						setTimeout(function(){pixWndAlert(strMensagem, 'ATENÇÃO', callbackYes, ID_WND_INFORMATION,'frmPedidos','REFERENCIA',strRetorno);}, 500); // 0,5 segundo
					}
			}
	}

}

/**************************************************************************/

function mensagem_fim_pedido_dealer(strPergunta, strMensagem, intTipo)
{
	//modificado e funcionando.

	var strRetorno = "";

	if(strMensagem == "") {
		strRetorno = "dealerpedidologin.asp";
	}

	var callbackYes = "retorno_mensagem_fim_pedido_dealer('" + strPergunta + "','" + strMensagem + "','" + intTipo + "')"
	var callbackNo  = "false";

	pixWndConfirm(strPergunta,"ATENÇÃO",callbackYes,callbackNo,"","",strRetorno)

	/* Pergunta se quer sair do sistema */
	//if (confirm(strPergunta)) {
	//	if (strMensagem != "") {
	//		if (intTipo == "1") {
	//			/* Pergunta se quer complementar pedido */
	//			if (confirm(strMensagem)) {
	//				/* Quer complementar. Continuo na tela. */
	//				return false;
	//			} else {
	//				/* Não quer complementar. Saio na tela. */
	//				return true;
	//			}
	//		} else {
	//			/* Exibe mensagem com total de itens e total do pedido */
	//			alert(strMensagem);
	//			return true;
	//		}
	//	}
	//	return true;
	//}
	//return false;
}

function retorno_mensagem_fim_pedido_dealer(strPergunta, strMensagem, intTipo) {

	if (intTipo == "1"){ 	/* Pergunta se quer complementar pedido */
		var callbackYes = "";
		var callbackNo = "setTimeout(function(){window.location='dealerpedidologin.asp'},500)";
		setTimeout(function(){pixWndConfirm(strMensagem,"ATENÇÃO",callbackYes,callbackNo,"","","");}, 500); // 0,5 segundo
	} else { /* Exibe mensagem com total de itens e total do pedido */
		setTimeout(function(){pixWndAlert(strMensagem, 'ATENÇÃO', 'true', ID_WND_INFORMATION,'','','dealerpedidologin.asp');}, 500); // 0,5 segundo
	}


}
/**************************************************************************/

function mensagem_fim_pedido_dealer_promo(strPagina, strPergunta, strMensagem, intTipo) {

//modificado e funcionando

	var form = document.frmPedidos;

	var callbackYes = "retorno_mensagem_fim_pedido_dealer_promo('" + strPagina + "','" + strPergunta + "','" + strMensagem + "','" + intTipo + "')"
	var callbackNo  = "false";

	var strRetorno = "";

	if (strMensagem == ""){
		strRetorno = strPagina;
	}

	pixWndConfirm(strPergunta,"ATENÇÃO",callbackYes,callbackNo,"","",strRetorno)



    //  /* Pergunta se quer sair do sistema */
    //  if (confirm(strPergunta)){
	//	/* Quer sair */
	//	if (strMensagem != ""){
	//		if (intTipo == "1"){
	//			/* Pergunta se quer complementar pedido */
	//			if (confirm(strMensagem)){
	//				/* Quer complementar. Continuo na tela. */
	//				return false;
	//			} else {
	//				/* Não quer complementar. Saio na tela. */
	//				/*return true;*/
    //             	/*form.action = strPagina;*/
	//				/*form.submit();*/
	//			}
	//		} else {
	//			/* Exibe mensagem com total de itens e total do pedido */
	//			alert(strMensagem);
	//			/*return true;*/
	//			/*form.action = strPagina;*/
	//			/*form.submit();*/
	//		}
	//	}
    //    form.action = strPagina;
	//	form.submit();
    //    return true;
    //  }
    //  return false;
}

function retorno_mensagem_fim_pedido_dealer_promo(strPagina, strPergunta, strMensagem, intTipo) {

	if (intTipo == "1"){ 	/* Pergunta se quer complementar pedido */
		var callbackYes = "";
		var callbackNo = "setTimeout(function(){window.location='" + strPagina + "'},500)";
		setTimeout(function(){pixWndConfirm(strMensagem,"ATENÇÃO",callbackYes,callbackNo,"","","");}, 500); // 0,5 segundo
	} else { /* Exibe mensagem com total de itens e total do pedido */
		setTimeout(function(){pixWndAlert(strMensagem, 'ATENÇÃO', 'true', ID_WND_INFORMATION,'','',strPagina);}, 500); // 0,5 segundo
	}

}


/**************************************************************************/

function msgbox_exclusao_pedido(strMsg1,strMsg2)
{
// não está em uso. está comentado no T_Estrutura_Pedidos_Em_Aberto.out

	if (confirm(strMsg1)){
		if (confirm(strMsg2)){
			//alert("OK");
			return true;
		}
		else {
			//alert("CANCEL");
			return false;
		}
	}
	else {
		//alert("Cancel");
		return false;
	}
}

/***********************************************************************************/

function mensagem_fim_troca(strPergunta, strSetor, strSecao ,strTipo, strMensagem)
{

//modificado em todos os lugares

	if (strMensagem=="") {
		var strRetorno = "promotoratrocalogin.asp?msg=N&setor=" + strSetor + "&secao=" + strSecao + "&tipo=" + strTipo;
	} else {
		var strRetorno = "";
	}

	var callbackYes = "retorno_mensagem_fim_troca('true','"  + strMensagem + "','" + strSetor + "','" + strSecao + "','" + strTipo + "')"
	var callbackNo  = "retorno_mensagem_fim_troca('false','" + strMensagem + "','" + strSetor + "','" + strSecao + "','" + strTipo + "')"

	pixWndConfirm(strPergunta,"ATENÇÃO",callbackYes,callbackNo,"frmTrocas","REFERENCIA",strRetorno)

}

function retorno_mensagem_fim_troca(booleano, strMensagem, strSetor, strSecao, strTipo)
{
	returnFunction = booleano;

	if ((returnFunction=="true") && (strMensagem != "")) {
        setTimeout(function(){pixWndAlert(strMensagem, 'ATENÇÃO', 'true', ID_WND_INFORMATION,'frmTrocas','REFERENCIA','promotoratrocalogin.asp?msg=N&setor=" + strSetor + "&secao=" + strSecao + "&tipo=" + strTipo + "');}, 500); // 0,5 segundo
	}

}

/***********************************************************************************/

function retornaModelo(strModelo,strCor,strTamanho) {
	//retorna na tela o modelo escolhido após inserir na CEN_C27_ACEITACAO_MODELO_SUG
	var form = document.frmPedidos;
	form.REFERENCIA.value = strModelo;
	form.COR.value = strCor;
	form.TAMANHO.value = strTamanho;
	form.QTDE.focus();
}

function retornoModeloSugerido(booleano,strModelo1,strCor1,strTamanho1,strPergunta1,strModelo2,strCor2,strTamanho2,strPergunta2,strModelo3,strCor3,strTamanho3,strPergunta3,strModelo4,strCor4,strTamanho4,strPergunta4,strModelo5,strCor5,strTamanho5,strPergunta5,Pergunta,strEncerra1,strEncerra2,strEncerra3,strEncerra4,strEncerra5,strMensagem) {

	//modificado em todos os lugares

	returnFunction = booleano;
	var form = document.frmPedidos;
	var local;

	Pergunta = PerguntaX;

	//alert(strEncerra1+","+strEncerra2+","+strEncerra3+","+strEncerra4+","+strEncerra5);

	if ((strPergunta1 != "") && (returnFunction == "true") && (Pergunta == "1")) {
		form.REFERENCIA.value = strModelo1;
		form.COR.value = strCor1;
		form.TAMANHO.value = strTamanho1;
		form.QTDE.focus();

		//somente no encerramento do pedido atribui false ou true a variável.
		//(strEncerra1 != "true") &&
		//if ((strEncerra1 != "false")) { //só inclui se for mensagem no início do pedido
			//inclui o modelo aceito
			local = "IncluiLogAceitacaoModeloSugerido.asp?aceita=S&mod=" + strModelo1 + "&cor=" + strCor1 + "&tam=" + strTamanho1 + "&pergunta=" + Pergunta;
			setTimeout(function(){window.location=local},100);
		//}

		return false;
	} else {
		if ((strPergunta1 != "") && (returnFunction == "false") && (Pergunta == "1")) {

			if (strEncerra1 == "true") {
				if(strMensagem != "") {
					var callbackYes = "retornoModeloSugerido('false','"  + strModelo1 + "','" + strCor1 + "','" + strTamanho1 + "','" + strPergunta1 + "','" + strModelo2 + "','" + strCor2 + "','" + strTamanho2 + "','" + strPergunta2 + "','" + strModelo3 + "','" + strCor3 + "','" + strTamanho3 + "','" + strPergunta3 + "','" + strModelo4 + "','" + strCor4 + "','" + strTamanho4 + "','" + strPergunta4 + "','" + strModelo5 + "','" + strCor5 + "','" + strTamanho5 + "','" + strPergunta5 + "','" + Pergunta + "','" + strEncerra1 + "','" + strEncerra2 + "','" + strEncerra3 + "','" + strEncerra4 + "','" + strEncerra5 + "','')"
					setTimeout(function(){pixWndAlert(strMensagem, 'ATENÇÃO', callbackYes, ID_WND_INFORMATION,'frmPedidos','REFERENCIA','');}, 1); // 0,5 segundo
				    return false;
				} else {

					local = "IncluiLogAceitacaoModeloSugerido.asp?aceita=N&mod=" + strModelo1 + "&cor=" + strCor1 + "&tam=" + strTamanho1 + "&pergunta=" + Pergunta + "&local=1"; // 1 - ConfirmacaoPedido.asp
					setTimeout(function(){window.location=local},100);

					//setTimeout(function(){window.location='ConfirmacaoPedido.asp'},100);
				    return false;
				}
			}

			PerguntaX = "2";
			strPergunta1 = "";
			var callbackYes = "retornoModeloSugerido('true','"  + strModelo1 + "','" + strCor1 + "','" + strTamanho1 + "','" + strPergunta1 + "','" + strModelo2 + "','" + strCor2 + "','" + strTamanho2 + "','" + strPergunta2 + "','" + strModelo3 + "','" + strCor3 + "','" + strTamanho3 + "','" + strPergunta3 + "','" + strModelo4 + "','" + strCor4 + "','" + strTamanho4 + "','" + strPergunta4 + "','" + strModelo5 + "','" + strCor5 + "','" + strTamanho5 + "','" + strPergunta5 + "','" + Pergunta + "','" + strEncerra1 + "','" + strEncerra2 + "','" + strEncerra3 + "','" + strEncerra4 + "','" + strEncerra5 + "','" + strMensagem + "')"
			var callbackNo  = "retornoModeloSugerido('false','" + strModelo1 + "','" + strCor1 + "','" + strTamanho1 + "','" + strPergunta1 + "','" + strModelo2 + "','" + strCor2 + "','" + strTamanho2 + "','" + strPergunta2 + "','" + strModelo3 + "','" + strCor3 + "','" + strTamanho3 + "','" + strPergunta3 + "','" + strModelo4 + "','" + strCor4 + "','" + strTamanho4 + "','" + strPergunta4 + "','" + strModelo5 + "','" + strCor5 + "','" + strTamanho5 + "','" + strPergunta5 + "','" + Pergunta + "','" + strEncerra1 + "','" + strEncerra2 + "','" + strEncerra3 + "','" + strEncerra4 + "','" + strEncerra5 + "','" + strMensagem + "')"
			if (strPergunta2 != "") {
    			setTimeout(function(){pixWndConfirm(strPergunta2,'ATENÇÃO',callbackYes,callbackNo,'frmPedidos','QTDE','');}, 500); // 0,5 segundo
			} else {
				if (strEncerra1 != "true") {
					//quando só tem uma pergunta e ele escolheu 'cancela'
					local = "IncluiLogAceitacaoModeloSugerido.asp?aceita=N&mod=" + strModelo1 + "&cor=" + strCor1 + "&tam=" + strTamanho1 + "&pergunta=" + Pergunta;
					setTimeout(function(){window.location=local},100);
				}
				return false;
			}
		} else {
			if ((strPergunta2 != "") && (returnFunction == "true") && (Pergunta == "2")) {
				form.REFERENCIA.value = strModelo2;
				form.COR.value = strCor2;
				form.TAMANHO.value = strTamanho2;
				form.QTDE.focus();

			//	if (strEncerra2 != "true") { //só inclui se for mensagem no início do pedido
					//se chegou até aqui é porque passou pelos anteriores, então
					//inclui o modelo atual como aceito e os anteriores como não aceito
					local = "IncluiLogAceitacaoModeloSugerido.asp?aceita=S&mod=" + strModelo2 + "&cor=" + strCor2 + "&tam=" + strTamanho2 + "&pergunta=" + Pergunta;
					setTimeout(function(){window.location=local},100);
			//	}
				return false;
			}  else {
				if ((strPergunta2 != "") && (returnFunction == "false") && (Pergunta == "2")) {

					if (strEncerra2 == "true") {
						if(strMensagem != "") {
							var callbackYes = "retornoModeloSugerido('false','"  + strModelo1 + "','" + strCor1 + "','" + strTamanho1 + "','" + strPergunta1 + "','" + strModelo2 + "','" + strCor2 + "','" + strTamanho2 + "','" + strPergunta2 + "','" + strModelo3 + "','" + strCor3 + "','" + strTamanho3 + "','" + strPergunta3 + "','" + strModelo4 + "','" + strCor4 + "','" + strTamanho4 + "','" + strPergunta4 + "','" + strModelo5 + "','" + strCor5 + "','" + strTamanho5 + "','" + strPergunta5 + "','" + Pergunta + "','" + strEncerra1 + "','" + strEncerra2 + "','" + strEncerra3 + "','" + strEncerra4 + "','" + strEncerra5 + "','')"
							setTimeout(function(){pixWndAlert(strMensagem, 'ATENÇÃO', callbackYes, ID_WND_INFORMATION,'frmPedidos','REFERENCIA','');}, 1); // 0,5 segundo
						    return false;
						} else {
							local = "IncluiLogAceitacaoModeloSugerido.asp?aceita=N&mod=" + strModelo2 + "&cor=" + strCor2 + "&tam=" + strTamanho2 + "&pergunta=" + Pergunta + "&local=1"; // 1 - ConfirmacaoPedido.asp
							setTimeout(function(){window.location=local},100);

							//setTimeout(function(){window.location='ConfirmacaoPedido.asp'},100);
						    return false;
						}
					}

					PerguntaX = "3";
					strPergunta2 = "";
					var callbackYes = "retornoModeloSugerido('true','"  + strModelo1 + "','" + strCor1 + "','" + strTamanho1 + "','" + strPergunta1 + "','" + strModelo2 + "','" + strCor2 + "','" + strTamanho2 + "','" + strPergunta2 + "','" + strModelo3 + "','" + strCor3 + "','" + strTamanho3 + "','" + strPergunta3 + "','" + strModelo4 + "','" + strCor4 + "','" + strTamanho4 + "','" + strPergunta4 + "','" + strModelo5 + "','" + strCor5 + "','" + strTamanho5 + "','" + strPergunta5 + "','" + Pergunta + "','" + strEncerra1 + "','" + strEncerra2 + "','" + strEncerra3 + "','" + strEncerra4 + "','" + strEncerra5 + "','" + strMensagem + "')"
					var callbackNo  = "retornoModeloSugerido('false','" + strModelo1 + "','" + strCor1 + "','" + strTamanho1 + "','" + strPergunta1 + "','" + strModelo2 + "','" + strCor2 + "','" + strTamanho2 + "','" + strPergunta2 + "','" + strModelo3 + "','" + strCor3 + "','" + strTamanho3 + "','" + strPergunta3 + "','" + strModelo4 + "','" + strCor4 + "','" + strTamanho4 + "','" + strPergunta4 + "','" + strModelo5 + "','" + strCor5 + "','" + strTamanho5 + "','" + strPergunta5 + "','" + Pergunta + "','" + strEncerra1 + "','" + strEncerra2 + "','" + strEncerra3 + "','" + strEncerra4 + "','" + strEncerra5 + "','" + strMensagem + "')"
					if (strPergunta3 != "") {
    					setTimeout(function(){pixWndConfirm(strPergunta3,'ATENÇÃO',callbackYes,callbackNo,'frmPedidos','QTDE','');}, 500); // 0,5 segundo
					} else {
						if (strEncerra2 != "true") {
							//quando só tem duas perguntas e ele escolheu 'cancela'
							local = "IncluiLogAceitacaoModeloSugerido.asp?aceita=N&mod=" + strModelo2 + "&cor=" + strCor2 + "&tam=" + strTamanho2 + "&pergunta=" + Pergunta;
							setTimeout(function(){window.location=local},100);
						}
						return false;
					}
				} else {
					if ((strPergunta3 != "") && (returnFunction == "true") && (Pergunta == "3")) {
						form.REFERENCIA.value = strModelo3;
						form.COR.value = strCor3;
						form.TAMANHO.value = strTamanho3;
						form.QTDE.focus();

					//	if (strEncerra3 != "true") { //só inclui se for mensagem no início do pedido
							//se chegou até aqui é porque passou pelos anteriores, então
							//inclui o modelo atual como aceito e os anteriores como não aceito
							local = "IncluiLogAceitacaoModeloSugerido.asp?aceita=S&mod=" + strModelo3 + "&cor=" + strCor3 + "&tam=" + strTamanho3 + "&pergunta=" + Pergunta;
							setTimeout(function(){window.location=local},100);
					//	}

						return false;
					}  else {
						if ((strPergunta3 != "") && (returnFunction == "false") && (Pergunta == "3")) {

							if (strEncerra3 == "true") {
								if(strMensagem != "") {
									var callbackYes = "retornoModeloSugerido('false','"  + strModelo1 + "','" + strCor1 + "','" + strTamanho1 + "','" + strPergunta1 + "','" + strModelo2 + "','" + strCor2 + "','" + strTamanho2 + "','" + strPergunta2 + "','" + strModelo3 + "','" + strCor3 + "','" + strTamanho3 + "','" + strPergunta3 + "','" + strModelo4 + "','" + strCor4 + "','" + strTamanho4 + "','" + strPergunta4 + "','" + strModelo5 + "','" + strCor5 + "','" + strTamanho5 + "','" + strPergunta5 + "','" + Pergunta + "','" + strEncerra1 + "','" + strEncerra2 + "','" + strEncerra3 + "','" + strEncerra4 + "','" + strEncerra5 + "','')"
									setTimeout(function(){pixWndAlert(strMensagem, 'ATENÇÃO', callbackYes, ID_WND_INFORMATION,'frmPedidos','REFERENCIA','');}, 1); // 0,5 segundo
									return false;
								} else {
									local = "IncluiLogAceitacaoModeloSugerido.asp?aceita=N&mod=" + strModelo3 + "&cor=" + strCor3 + "&tam=" + strTamanho3 + "&pergunta=" + Pergunta + "&local=1"; // 1 - ConfirmacaoPedido.asp
									setTimeout(function(){window.location=local},100);
									//setTimeout(function(){window.location='ConfirmacaoPedido.asp'},100);
									return false;
								}
							}

							PerguntaX = "4";
							strPergunta3 = "";
							var callbackYes = "retornoModeloSugerido('true','"  + strModelo1 + "','" + strCor1 + "','" + strTamanho1 + "','" + strPergunta1 + "','" + strModelo2 + "','" + strCor2 + "','" + strTamanho2 + "','" + strPergunta2 + "','" + strModelo3 + "','" + strCor3 + "','" + strTamanho3 + "','" + strPergunta3 + "','" + strModelo4 + "','" + strCor4 + "','" + strTamanho4 + "','" + strPergunta4 + "','" + strModelo5 + "','" + strCor5 + "','" + strTamanho5 + "','" + strPergunta5 + "','" + Pergunta + "','" + strEncerra1 + "','" + strEncerra2 + "','" + strEncerra3 + "','" + strEncerra4 + "','" + strEncerra5 + "','" + strMensagem + "')"
							var callbackNo  = "retornoModeloSugerido('false','" + strModelo1 + "','" + strCor1 + "','" + strTamanho1 + "','" + strPergunta1 + "','" + strModelo2 + "','" + strCor2 + "','" + strTamanho2 + "','" + strPergunta2 + "','" + strModelo3 + "','" + strCor3 + "','" + strTamanho3 + "','" + strPergunta3 + "','" + strModelo4 + "','" + strCor4 + "','" + strTamanho4 + "','" + strPergunta4 + "','" + strModelo5 + "','" + strCor5 + "','" + strTamanho5 + "','" + strPergunta5 + "','" + Pergunta + "','" + strEncerra1 + "','" + strEncerra2 + "','" + strEncerra3 + "','" + strEncerra4 + "','" + strEncerra5 + "','" + strMensagem + "')"
							if (strPergunta4 != "") {
								setTimeout(function(){pixWndConfirm(strPergunta4,'ATENÇÃO',callbackYes,callbackNo,'frmPedidos','QTDE','');}, 500); // 0,5 segundo
							} else {
								if (strEncerra3 != "true") {
									//quando só tem três perguntas e ele escolheu 'cancela'
									local = "IncluiLogAceitacaoModeloSugerido.asp?aceita=N&mod=" + strModelo3 + "&cor=" + strCor3 + "&tam=" + strTamanho3 + "&pergunta=" + Pergunta;
									setTimeout(function(){window.location=local},100);
								}
								return false;
							}
						} else {
							if ((strPergunta4 != "") && (returnFunction == "true") && (Pergunta == "4")) {
								form.REFERENCIA.value = strModelo4;
								form.COR.value = strCor4;
								form.TAMANHO.value = strTamanho4;
								form.QTDE.focus();

							//	if (strEncerra4 != "true") { //só inclui se for mensagem no início do pedido
									//se chegou até aqui é porque passou pelos anteriores, então
									//inclui o modelo atual como aceito e os anteriores como não aceito
									local = "IncluiLogAceitacaoModeloSugerido.asp?aceita=S&mod=" + strModelo4 + "&cor=" + strCor4 + "&tam=" + strTamanho4 + "&pergunta=" + Pergunta;
									setTimeout(function(){window.location=local},100);
							//	}

								return false;
							}  else {
								if ((strPergunta4 != "") && (returnFunction == "false") && (Pergunta == "4")) {

									if (strEncerra4 == "true") {
										if(strMensagem != "") {
											var callbackYes = "retornoModeloSugerido('false','"  + strModelo1 + "','" + strCor1 + "','" + strTamanho1 + "','" + strPergunta1 + "','" + strModelo2 + "','" + strCor2 + "','" + strTamanho2 + "','" + strPergunta2 + "','" + strModelo3 + "','" + strCor3 + "','" + strTamanho3 + "','" + strPergunta3 + "','" + strModelo4 + "','" + strCor4 + "','" + strTamanho4 + "','" + strPergunta4 + "','" + strModelo5 + "','" + strCor5 + "','" + strTamanho5 + "','" + strPergunta5 + "','" + Pergunta + "','" + strEncerra1 + "','" + strEncerra2 + "','" + strEncerra3 + "','" + strEncerra4 + "','" + strEncerra5 + "','')"
											setTimeout(function(){pixWndAlert(strMensagem, 'ATENÇÃO', callbackYes, ID_WND_INFORMATION,'frmPedidos','REFERENCIA','');}, 1); // 0,5 segundo
										    return false;
										} else {
											local = "IncluiLogAceitacaoModeloSugerido.asp?aceita=N&mod=" + strModelo4 + "&cor=" + strCor4 + "&tam=" + strTamanho4 + "&pergunta=" + Pergunta + "&local=1"; // 1 - ConfirmacaoPedido.asp
											setTimeout(function(){window.location=local},100);

											//setTimeout(function(){window.location='ConfirmacaoPedido.asp'},100);
										    return false;
										}
									}

									PerguntaX = "5";
									strPergunta4 = "";
									var callbackYes = "retornoModeloSugerido('true','"  + strModelo1 + "','" + strCor1 + "','" + strTamanho1 + "','" + strPergunta1 + "','" + strModelo2 + "','" + strCor2 + "','" + strTamanho2 + "','" + strPergunta2 + "','" + strModelo3 + "','" + strCor3 + "','" + strTamanho3 + "','" + strPergunta3 + "','" + strModelo4 + "','" + strCor4 + "','" + strTamanho4 + "','" + strPergunta4 + "','" + strModelo5 + "','" + strCor5 + "','" + strTamanho5 + "','" + strPergunta5 + "','" + Pergunta + "','" + strEncerra1 + "','" + strEncerra2 + "','" + strEncerra3 + "','" + strEncerra4 + "','" + strEncerra5 + "','" + strMensagem +  "')"
									var callbackNo  = "retornoModeloSugerido('false','" + strModelo1 + "','" + strCor1 + "','" + strTamanho1 + "','" + strPergunta1 + "','" + strModelo2 + "','" + strCor2 + "','" + strTamanho2 + "','" + strPergunta2 + "','" + strModelo3 + "','" + strCor3 + "','" + strTamanho3 + "','" + strPergunta3 + "','" + strModelo4 + "','" + strCor4 + "','" + strTamanho4 + "','" + strPergunta4 + "','" + strModelo5 + "','" + strCor5 + "','" + strTamanho5 + "','" + strPergunta5 + "','" + Pergunta + "','" + strEncerra1 + "','" + strEncerra2 + "','" + strEncerra3 + "','" + strEncerra4 + "','" + strEncerra5 + "','" + strMensagem +  "')"
									if (strPergunta5 != "") {
										setTimeout(function(){pixWndConfirm(strPergunta5,'ATENÇÃO',callbackYes,callbackNo,'frmPedidos','QTDE','');}, 500); // 0,5 segundo
									} else {
										if (strEncerra4 != "true") {
											//quando só tem quatro perguntas e ele escolheu 'cancela'
											local = "IncluiLogAceitacaoModeloSugerido.asp?aceita=N&mod=" + strModelo4 + "&cor=" + strCor4 + "&tam=" + strTamanho4 + "&pergunta=" + Pergunta;
											setTimeout(function(){window.location=local},100);
										}
										return false;
									}
								} else {
									if ((strPergunta5 != "") && (returnFunction == "true") && (Pergunta == "5")) {
										form.REFERENCIA.value = strModelo5;
										form.COR.value = strCor5;
										form.TAMANHO.value = strTamanho5;
										form.QTDE.focus();

									//	if (strEncerra5 != "true") { //só inclui se for mensagem no início do pedido
											//se chegou até aqui é porque passou pelos anteriores, então
											//inclui o modelo atual como aceito e os anteriores como não aceito
											local = "IncluiLogAceitacaoModeloSugerido.asp?aceita=S&mod=" + strModelo5 + "&cor=" + strCor5 + "&tam=" + strTamanho5 + "&pergunta=" + Pergunta;
											setTimeout(function(){window.location=local},100);
									//	}

										return false;
									} else {

										if (strEncerra5 == "true") {
											if(strMensagem != "") {
												var callbackYes = "retornoModeloSugerido('false','"  + strModelo1 + "','" + strCor1 + "','" + strTamanho1 + "','" + strPergunta1 + "','" + strModelo2 + "','" + strCor2 + "','" + strTamanho2 + "','" + strPergunta2 + "','" + strModelo3 + "','" + strCor3 + "','" + strTamanho3 + "','" + strPergunta3 + "','" + strModelo4 + "','" + strCor4 + "','" + strTamanho4 + "','" + strPergunta4 + "','" + strModelo5 + "','" + strCor5 + "','" + strTamanho5 + "','" + strPergunta5 + "','" + Pergunta + "','" + strEncerra1 + "','" + strEncerra2 + "','" + strEncerra3 + "','" + strEncerra4 + "','" + strEncerra5 + "','')"
												setTimeout(function(){pixWndAlert(strMensagem, 'ATENÇÃO', callbackYes, ID_WND_INFORMATION,'frmPedidos','REFERENCIA','');}, 1); // 0,5 segundo
											    return false;
											} else {
												//setTimeout(function(){window.location='ConfirmacaoPedido.asp'},100);

												local = "IncluiLogAceitacaoModeloSugerido.asp?aceita=N&mod=" + strModelo5 + "&cor=" + strCor5 + "&tam=" + strTamanho5 + "&pergunta=" + Pergunta + "&local=1"; // 1 - ConfirmacaoPedido.asp
												setTimeout(function(){window.location=local},100);

											    return false;
											}
										} else {
											//ao carregar a tela quando não se escolhe nenhum modelo sugerido.
											local = "IncluiLogAceitacaoModeloSugerido.asp?aceita=N&mod=" + strModelo5 + "&cor=" + strCor5 + "&tam=" + strTamanho5 + "&pergunta=" + Pergunta;
											setTimeout(function(){window.location=local},100);

										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
}


function mensagem_modelo_sugerido(strPagina,strMsgItemDisp,strModelo1,strCor1,strTamanho1,strPergunta1,strModelo2,strCor2,strTamanho2,strPergunta2,strModelo3,strCor3,strTamanho3,strPergunta3,strModelo4,strCor4,strTamanho4,strPergunta4,strModelo5,strCor5,strTamanho5,strPergunta5,strEncerra1,strEncerra2,strEncerra3,strEncerra4,strEncerra5,strMensagem)
{
	var form = document.frmPedidos;

	var callbackYes;
	var callbackNo;


	/* Mensagem de item que estava em falta e já está disponível */
	if (strMsgItemDisp != "") {
		callbackYes = "mensagem_modelo_sugerido('" + strPagina + "','','"  + strModelo1 + "','" + strCor1 + "','" + strTamanho1 + "','" + strPergunta1 + "','" + strModelo2 + "','" + strCor2 + "','" + strTamanho2 + "','" + strPergunta2 + "','" + strModelo3 + "','" + strCor3 + "','" + strTamanho3 + "','" + strPergunta3 + "','" + strModelo4 + "','" + strCor4 + "','" + strTamanho4 + "','" + strPergunta4 + "','" + strModelo5 + "','" + strCor5 + "','" + strTamanho5 + "','" + strPergunta5 + "','" + strMensagem + "')"
		pixWndAlert(strMsgItemDisp,'ATENÇÃO',callbackYes,ID_WND_INFORMATION,'frmPedidos','QTDE','')
	}
	else
	{



		/* Pergunta se quer modelo sugerido */
		if (strPergunta1 != "")	{

			Pergunta  = "1";
			PerguntaX = "1";

			callbackYes = "retornoModeloSugerido('true','"  + strModelo1 + "','" + strCor1 + "','" + strTamanho1 + "','" + strPergunta1 + "','" + strModelo2 + "','" + strCor2 + "','" + strTamanho2 + "','" + strPergunta2 + "','" + strModelo3 + "','" + strCor3 + "','" + strTamanho3 + "','" + strPergunta3 + "','" + strModelo4 + "','" + strCor4 + "','" + strTamanho4 + "','" + strPergunta4 + "','" + strModelo5 + "','" + strCor5 + "','" + strTamanho5 + "','" + strPergunta5 + "','" + Pergunta + "','" + strEncerra1 + "','" + strEncerra2 + "','" + strEncerra3 + "','" + strEncerra4 + "','" + strEncerra5 + "','" + strMensagem + "')"
			callbackNo  = "retornoModeloSugerido('false','" + strModelo1 + "','" + strCor1 + "','" + strTamanho1 + "','" + strPergunta1 + "','" + strModelo2 + "','" + strCor2 + "','" + strTamanho2 + "','" + strPergunta2 + "','" + strModelo3 + "','" + strCor3 + "','" + strTamanho3 + "','" + strPergunta3 + "','" + strModelo4 + "','" + strCor4 + "','" + strTamanho4 + "','" + strPergunta4 + "','" + strModelo5 + "','" + strCor5 + "','" + strTamanho5 + "','" + strPergunta5 + "','" + Pergunta + "','" + strEncerra1 + "','" + strEncerra2 + "','" + strEncerra3 + "','" + strEncerra4 + "','" + strEncerra5 + "','" + strMensagem + "')"

			setTimeout(function(){pixWndConfirm(strPergunta1,'ATENÇÃO',callbackYes,callbackNo,'frmPedidos','QTDE','');}, 500); // 0,5 segundo
		}
		else
		{
				if(strMensagem != "") {
					callbackYes = "mensagem_modelo_sugerido('" + strPagina + "','','"  + strModelo1 + "','" + strCor1 + "','" + strTamanho1 + "','" + strPergunta1 + "','" + strModelo2 + "','" + strCor2 + "','" + strTamanho2 + "','" + strPergunta2 + "','" + strModelo3 + "','" + strCor3 + "','" + strTamanho3 + "','" + strPergunta3 + "','" + strModelo4 + "','" + strCor4 + "','" + strTamanho4 + "','" + strPergunta4 + "','" + strModelo5 + "','" + strCor5 + "','" + strTamanho5 + "','" + strPergunta5 + "','')"
					setTimeout(function(){pixWndAlert(strMensagem, 'ATENÇÃO', callbackYes, ID_WND_INFORMATION,'frmPedidos','REFERENCIA','ConfirmacaoPedido.asp');}, 500); // 0,5 segundo
				}
				else
				{

						if (strPagina.length == 0) {
							return true;
						} else {
							//form.action = strPagina;
							//form.submit();
							setTimeout(function(){window.location='" + strPagina + "'},500);
						}
				}
		}
	}
}

/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/

function mensagem_fim_pedido_Expresso(par, strPagina, strPergunta, strMensagem) {

	//modificado em todos os lugares

	var form = document.frmPedidosExpresso;
	var msg

	form.referencia1.value = RemoveEspaços2(form.referencia1.value);
	form.referencia2.value = RemoveEspaços2(form.referencia2.value);
	form.referencia3.value = RemoveEspaços2(form.referencia3.value);
	form.referencia4.value = RemoveEspaços2(form.referencia4.value);
	form.referencia5.value = RemoveEspaços2(form.referencia5.value);
	form.referencia6.value = RemoveEspaços2(form.referencia6.value);
	form.referencia7.value = RemoveEspaços2(form.referencia7.value);
	form.referencia8.value = RemoveEspaços2(form.referencia8.value);
	form.referencia9.value = RemoveEspaços2(form.referencia9.value);
	form.referencia10.value = RemoveEspaços2(form.referencia10.value);

	if ((form.referencia1.value!="") | (form.referencia2.value!="") | (form.referencia3.value!="") | (form.referencia4.value!="") | (form.referencia5.value!="")|(form.referencia6.value!="")|(form.referencia7.value!="")|(form.referencia8.value!="") | (form.referencia9.value!="") | (form.referencia10.value!="")) {
		msg="Os itens exibidos na tela não foram incluídos no pedido !"
		var callbackYes = "retorno_mensagem_fim_pedido_Expresso('true','" + par + "','" + strPagina + "','" + strPergunta + "','" + strMensagem + "');"
		setTimeout(function(){pixWndAlert(msg, 'ATENÇÃO', callbackYes, ID_WND_INFORMATION,'frmPedidosExpresso','referencia1','');}, 500); // 0,5 segundo
	} else {
		setTimeout(function(){retorno_mensagem_fim_pedido_Expresso('true',par,strPagina,strPergunta,strMensagem);}, 500); // 0,5 segundo
	}

}

function retorno_mensagem_fim_pedido_Expresso(booleano, par, strPagina, strPergunta, strMensagem) {

	returnFunction = booleano;

	if (strMensagem=="") {
		var strRetorno = strPagina;
	} else {
		var strRetorno = "";
	}

	if (returnFunction == "true") {
		var callbackYes = "retorno_mensagem_fim_pedido_Expresso('false','" + par + "','" + strPagina + "','" + strPergunta + "','" + strMensagem + "');"
		var callbackNo  = "retorno_mensagem_fim_pedido_Expresso('fim','" + par + "','" + strPagina + "','" + strPergunta + "','" + strMensagem + "');"
		setTimeout(function(){pixWndConfirm(strPergunta,"ATENÇÃO",callbackYes,callbackNo,"","",strRetorno);}, 500); // 0,5 segundo
	} else if((strMensagem!="") && (returnFunction == "false")) {
		setTimeout(function(){pixWndAlert(strMensagem, 'ATENÇÃO', null, ID_WND_INFORMATION,'','',strPagina);}, 500); // 0,5 segundo
	}

}

/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/

function mensagem_fim_pedido_Expresso_Normal(par) {

	//modificado em todos os lugares

	var form = document.frmPedidosExpresso;
	var msg

	form.referencia1.value = RemoveEspaços2(form.referencia1.value);
	form.referencia2.value = RemoveEspaços2(form.referencia2.value);
	form.referencia3.value = RemoveEspaços2(form.referencia3.value);
	form.referencia4.value = RemoveEspaços2(form.referencia4.value);
	form.referencia5.value = RemoveEspaços2(form.referencia5.value);
	form.referencia6.value = RemoveEspaços2(form.referencia6.value);
	form.referencia7.value = RemoveEspaços2(form.referencia7.value);
	form.referencia8.value = RemoveEspaços2(form.referencia8.value);
	form.referencia9.value = RemoveEspaços2(form.referencia9.value);
	form.referencia10.value = RemoveEspaços2(form.referencia10.value);


	if ((form.referencia1.value!="") | (form.referencia2.value!="") | (form.referencia3.value!="") | (form.referencia4.value!="") | (form.referencia5.value!="") | (form.referencia6.value!="") | (form.referencia7.value!="") | (form.referencia8.value!="") | (form.referencia9.value!="") | (form.referencia10.value!=""))
	{
		msg="Corrija e inclua os itens do pedido expresso clicando no botão 'Corrige Item' ou exclua cada um deles - só depois você poderá mudar para o Pedido Normal."
		pixWndAlert(msg, 'ATENÇÃO', null, ID_WND_INFORMATION,'frmPedidosExpresso','referencia1','');
		return false;
	}

	return true;

}


/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/

function mensagem_fim_pedido_Expresso_dealer(par, strPagina, strPergunta, strMensagem, intTipo){

	//modificado e funcionando

	var form = document.frmPedidosExpresso;
	var msg

	form.referencia1.value = RemoveEspaços2(form.referencia1.value);
	form.referencia2.value = RemoveEspaços2(form.referencia2.value);
	form.referencia3.value = RemoveEspaços2(form.referencia3.value);
	form.referencia4.value = RemoveEspaços2(form.referencia4.value);
	form.referencia5.value = RemoveEspaços2(form.referencia5.value);
	form.referencia6.value = RemoveEspaços2(form.referencia6.value);
	form.referencia7.value = RemoveEspaços2(form.referencia7.value);
	form.referencia8.value = RemoveEspaços2(form.referencia8.value);
	form.referencia9.value = RemoveEspaços2(form.referencia9.value);
	form.referencia10.value = RemoveEspaços2(form.referencia10.value);

	var callbackYes = "retorno_mensagem_fim_pedido_Expresso_dealer('" + par + "','" + strPagina + "','" + strPergunta + "','" + strMensagem + "','" + intTipo + "');"

	if ((form.referencia1.value!="") | (form.referencia2.value!="") | (form.referencia3.value!="") | (form.referencia4.value!="") | (form.referencia5.value!="")|(form.referencia6.value!="")|(form.referencia7.value!="")|(form.referencia8.value!="") | (form.referencia9.value!="") | (form.referencia10.value!="")){
		msg="Os itens exibidos na tela não foram incluídos no pedido !"
		pixWndAlert(msg, 'ATENÇÃO', callbackYes, ID_WND_INFORMATION,'frmPedidosExpresso','referencia1','');
	} else {
		retorno_mensagem_fim_pedido_Expresso_dealer(par,strPagina,strPergunta,strMensagem,intTipo);
	}

}

function retorno_mensagem_fim_pedido_Expresso_dealer(par, strPagina, strPergunta, strMensagem, intTipo){

	var strRetorno = "";

	if (strMensagem == ""){
		strRetorno = strPagina;
	}

	var callbackYes = "retorno_mensagem_fim_pedido_Expresso_dealer2('" + par + "','" + strPagina + "','" + strPergunta + "','" + strMensagem + "','" + intTipo + "');"
	var callbackNo = "false"

	setTimeout(function(){pixWndConfirm(strPergunta,"ATENÇÃO",callbackYes,callbackNo,"","",strRetorno);}, 500); // 0,5 segundo
}


function retorno_mensagem_fim_pedido_Expresso_dealer2(par, strPagina, strPergunta, strMensagem, intTipo){

	if (intTipo == "1"){ 	/* Pergunta se quer complementar pedido */
		var callbackYes = "";
		var callbackNo = "setTimeout(function(){window.location='" + strPagina + "'},500)";
		setTimeout(function(){pixWndConfirm(strMensagem,"ATENÇÃO",callbackYes,callbackNo,"","","");}, 500); // 0,5 segundo
	} else { /* Exibe mensagem com total de itens e total do pedido */
		setTimeout(function(){pixWndAlert(strMensagem, 'ATENÇÃO', 'true', ID_WND_INFORMATION,'','',strPagina);}, 500); // 0,5 segundo
	}

}


/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/

function Mensagem_Substituto(strMensagem) {

	//modificado em todos os lugares

	if (strMensagem != "") {
		pixWndAlert(strMensagem, 'ATENÇÃO', null, ID_WND_INFORMATION,'','','');
	}
        return true;
}

/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/

function mensagem_itens_disponiveis(strMensagem) {

	//modificado em todos os lugares

	if (strMensagem != "") {
		pixWndAlert(strMensagem, 'ATENÇÃO', null, ID_WND_INFORMATION,'frmPedidos','QTDE','');
	}
}

