/*
 *
 * GoldenForms
 * Desenvolvedor: Fernando Arroyo
 * GoldenLight [ fernando.arroyo@goldenlight.biz ]
 * 19.08.2009
 *
 */
	
		GoldenForms=function(Parametros){
			/*
			 * Parametros - GoldenForms
			 * 
			 * Elementos = Array com Elementos do form [ obj, tipo de validacao, obrigatorio, mensagem de erro ]
			 * Action = function
			 */
			
			if(!Parametros.Padrao){
				Parametros.Padrao={
					CaracteresEspeciais	:"@#%¨&*(),<>;/?^~´`[{_=+]}\|¹²³£¢¬§º°'"+'"',
					CaracteresEmail		:"#$%¨&*(),<>;:/?^~´`[{=+]}\|¹²³£¢¬§º°'"+'"',
					CaracteresWebSite	:"@#$%¨&*(),<>;:?^~´`[{=+]}\|¹²³£¢¬§º°'"+'"'
				}
			}
			if(!Parametros.Action){
				Parametros.Action=function(){
					MsgValidar=new GoldenAlerta({
						Confirmado:function(){
						},
						Confirmacao:"Ok",
						Mensagem:"Formulário validado com sucesso."
					})
				}
			}
/*			if(!Parametros.Erro){
				Parametros.Erro=function(){
					MsgValidar=new GoldenAlerta({
						Confirmado:function(){
						},
						Confirmacao:"Ok",
						Mensagem:"Formulário preenchido incorretamente."
					})
				}
			}*/
			
			this.Validar=function(){
				Validacao=true;
				Vld=true;
				for(xIndGoldenForms=0;xIndGoldenForms<Parametros.Elementos.length;xIndGoldenForms++){
					if((Parametros.Elementos[xIndGoldenForms][2])&&(Parametros.Elementos[xIndGoldenForms][0].val()=="")){
						Validacao=false;
						MsgValidar=new GoldenAlerta({
							Objeto:Parametros.Elementos[xIndGoldenForms][0],
							Confirmado:function(){
								this.Objeto.focus();
								Vld=false;
							},
							Confirmacao:"Ok",
							Mensagem:Parametros.Elementos[xIndGoldenForms][3]
						})
						break;
					}
					else if((Parametros.Elementos[xIndGoldenForms][0].val()!="")){
						switch(Parametros.Elementos[xIndGoldenForms][1]){
							case "Texto":
								if(!this.Texto(Parametros.Elementos[xIndGoldenForms][0])){
									Validacao=false;
									MsgValidar=new GoldenAlerta({
										Objeto:Parametros.Elementos[xIndGoldenForms][0],
										Confirmado:function(){
											this.Objeto.focus();
											Vld=false;
										},
										Confirmacao:"Ok",
										Mensagem:Parametros.Elementos[xIndGoldenForms][3]
									})
								}
							break;
							case "Cep":
								if(!this.Cep(Parametros.Elementos[xIndGoldenForms][0])){
									Validacao=false;
									MsgValidar=new GoldenAlerta({
										Objeto:Parametros.Elementos[xIndGoldenForms][0],
										Confirmado:function(){
											this.Objeto.focus();
											Vld=false;
										},
										Confirmacao:"Ok",
										Mensagem:Parametros.Elementos[xIndGoldenForms][3]
									})
								}
							break;
							case "Numero":
								if(!this.Numero(Parametros.Elementos[xIndGoldenForms][0])){
									Validacao=false;
									MsgValidar=new GoldenAlerta({
										Objeto:Parametros.Elementos[xIndGoldenForms][0],
										Confirmado:function(){
											this.Objeto.focus();
											Vld=false;
										},
										Confirmacao:"Ok",
										Mensagem:Parametros.Elementos[xIndGoldenForms][3]
									})
								}
							break;
							case "Telefone":
								if(!this.Telefone(Parametros.Elementos[xIndGoldenForms][0])){
									Validacao=false;
									MsgValidar=new GoldenAlerta({
										Objeto:Parametros.Elementos[xIndGoldenForms][0],
										Confirmado:function(){
											this.Objeto.focus();
											Vld=false;
										},
										Confirmacao:"Ok",
										Mensagem:Parametros.Elementos[xIndGoldenForms][3]
									})
								}
							break;
							case "Email":
								if(!this.Email(Parametros.Elementos[xIndGoldenForms][0])){
									Validacao=false;
									MsgValidar=new GoldenAlerta({
										Objeto:Parametros.Elementos[xIndGoldenForms][0],
										Confirmado:function(){
											this.Objeto.focus();
											Vld=false;
										},
										Confirmacao:"Ok",
										Mensagem:Parametros.Elementos[xIndGoldenForms][3]
									})
								}
							break;
							case "WebSite":
								if(!this.WebSite(Parametros.Elementos[xIndGoldenForms][0])){
									Validacao=false;
									MsgValidar=new GoldenAlerta({
										Objeto:Parametros.Elementos[xIndGoldenForms][0],
										Confirmado:function(){
											this.Objeto.focus();
											Vld=false;
										},
										Confirmacao:"Ok",
										Mensagem:Parametros.Elementos[xIndGoldenForms][3]
									})
								}
							break;
							case "Cpf":
								if(!this.Cpf(Parametros.Elementos[xIndGoldenForms][0])){
									Validacao=false;
									MsgValidar=new GoldenAlerta({
										Objeto:Parametros.Elementos[xIndGoldenForms][0],
										Confirmado:function(){
											this.Objeto.focus();
											Vld=false;
										},
										Confirmacao:"Ok",
										Mensagem:Parametros.Elementos[xIndGoldenForms][3]
									})
								}
							break;
							case "Cnpj":
								if(!this.Cpf(Parametros.Elementos[xIndGoldenForms][0])){
									Validacao=false;
									MsgValidar=new GoldenAlerta({
										Objeto:Parametros.Elementos[xIndGoldenForms][0],
										Confirmado:function(){
											this.Objeto.focus();
											Vld=false;
										},
										Confirmacao:"Ok",
										Mensagem:Parametros.Elementos[xIndGoldenForms][3]
									})
								}
							break;
						}
					}
				}
				if(Validacao){
					Parametros.Action();
				}
				else{
					Parametros.Erro();
				}
			}
			
			this.Texto=function(ObjTexto){
				VrfTexto=true;
				for(xIndGoldenForms_texto=0;xIndGoldenForms_texto<Parametros.Padrao.CaracteresEspeciais.length;xIndGoldenForms_texto++){
					if(ObjTexto.val().toString().indexOf(Parametros.Padrao.CaracteresEspeciais.charAt(xIndGoldenForms_texto))>0){
						alert(Parametros.Padrao.CaracteresEspeciais.charAt(xIndGoldenForms_texto));
						VrfTexto=false;
						break;
					}
				}
				return VrfTexto;
			}
			
			this.Cep=function(ObjCep){
				VrfCep=true;
				tmpNocep = ObjCep.val();
				lgtNocep = tmpNocep.length;
				if((ObjCep.val().indexOf(".") > 0 )||(ObjCep.val().indexOf("-") > 0 )){
					for(i_vrfNocep=0;i_vrfNocep<lgtNocep;i_vrfNocep++){
						tmpNocep = tmpNocep.replace(".","");
						tmpNocep = tmpNocep.replace("-","");
					}
				}
				else if (tmpNocep.length!=8){
					VrfCep= false;
				}
				else if (isNaN(tmpNocep)){
					VrfCep=false;
				}
				return VrfCep;
			}
			
			this.Numero=function(ObjNumero){
				if(isNaN(ObjNumero.val())){
					return false;
				}
				else{
					return true;
				}
			}

			this.Telefone=function(ObjTelefone){
				VrfTelefone=true;
				tmpNoTelefone = ObjTelefone.val();
				if((ObjTelefone.val().indexOf(".") > 0 )||(ObjTelefone.val().indexOf("-") > 0 )){
					for(i_vrfNoTelefone=0;i_vrfNoTelefone<tmpNoTelefone.length;i_vrfNoTelefone++){
						tmpNoTelefone = tmpNoTelefone.replace(".","");
						tmpNoTelefone = tmpNoTelefone.replace("-","");
					}
				}
				if (isNaN(tmpNoTelefone)){
					VrfTelefone=false;
				}
				return VrfTelefone;
			}
			
			this.Email=function(ObjEmail){
				VrfEmail=true;
				prim = ObjEmail.val().indexOf("@")
				if(prim < 2) 
				{
					VrfEmail= false;
				}
				if(ObjEmail.val().indexOf("@",prim + 1) != -1) 
				{
					VrfEmail= false;
				}
				if(ObjEmail.val().indexOf(".") < 1) 
				{
					VrfEmail= false;
				}
				if(ObjEmail.val().indexOf(" ") != -1) 
				{
					VrfEmail= false;
				}
				for(xIndGoldenForms_email=0;xIndGoldenForms_email<Parametros.Padrao.CaracteresEmail.length;xIndGoldenForms_email++){
					if(ObjEmail.val().toString().indexOf(Parametros.Padrao.CaracteresEmail.charAt(xIndGoldenForms_email))>0){
						VrfEmail=false;
						break;
					}
				}
				if(ObjEmail.val().indexOf("..") > 0) 
				{
					VrfEmail= false;
				}				
				return VrfEmail;
			}
			
			this.WebSite=function(ObjWebSite){
				VrfWebSite=true;
				if(ObjWebSite.val().indexOf(".") < 1) 
				{
					VrfWebSite= false;
				}
				if(ObjWebSite.val().indexOf(" ") != -1) 
				{
					VrfWebSite= false;
				}
				for(xIndGoldenForms_site=0;xIndGoldenForms_site<Parametros.Padrao.CaracteresWebSite.length;xIndGoldenForms_site++){
					if(ObjWebSite.val().toString().indexOf(Parametros.Padrao.CaracteresWebSite.charAt(xIndGoldenForms_site))>0){
						VrfWebSite=false;
						break;
					}
				}
				if(ObjWebSite.val().indexOf("..") > 0) 
				{
					VrfWebSite= false;
				}				
				return VrfWebSite;
			}
			
			this.Cpf=function(ObjCpf){
				VrfCpf=true;
				tmpCpfcn=ObjCpf.val();
				lgtCpfcn = tmpCpfcn.length;
				if((ObjCpf.val().indexOf(".") > 0 )||
					(ObjCpf.val().indexOf("/") > 0 )||
					(ObjCpf.val().indexOf("-") > 0 ))
				{
					for(i_vrfCpfcn=0;i_vrfCpfcn<lgtCpfcn;i_vrfCpfcn++)
					{
						tmpCpfcn = tmpCpfcn.replace(".","");
						tmpCpfcn = tmpCpfcn.replace("-","");
						tmpCpfcn = tmpCpfcn.replace("/","");
					}
				}
				if(isNaN(tmpCpfcn))
				{
					VrfCpf=false;
				}
				else
				{
					lgtCpfcn = tmpCpfcn.length;
					if(lgtCpfcn<11)
					{
						VrfCpf=false;
					}
					else if(lgtCpfcn==11)
					{
						numCpfcn = tmpCpfcn.substr(0,9);
						digCpfcn = tmpCpfcn.substr(9,2);
						arrCpfcn = new Array(10,9,8,7,6,5,4,3,2);
						somCpfcn = 0;
						for(i_numCpfcn=0;i_numCpfcn<(numCpfcn.length);i_numCpfcn++)
						{
							somCpfcn += (Number(numCpfcn.charAt(i_numCpfcn))*arrCpfcn[i_numCpfcn]);
						}
						if((somCpfcn%11)<2)
						{
							pdgCpfcn = 0;
						}
						else
						{
							pdgCpfcn = (11-(somCpfcn%11));
						}
						if(pdgCpfcn!=digCpfcn.charAt(0))
						{
							VrfCpf=false;
						}
						else
						{
							arrCpfcn = new Array(11,10,9,8,7,6,5,4,3,2);
							somCpfcn = 0;
							for(i_numCpfcn=0;i_numCpfcn<((numCpfcn+digCpfcn.charAt(0)).length);i_numCpfcn++)
							{
								somCpfcn += (Number((numCpfcn+digCpfcn).charAt(i_numCpfcn))*arrCpfcn[i_numCpfcn]);
							}
							if((somCpfcn%11)<2)
							{
								sdgCpfcn = 0;
							}
							else
							{
								sdgCpfcn = (11-(somCpfcn%11));
							}
							if(sdgCpfcn!=digCpfcn.charAt(1))
							{
								VrfCpf=false;
							}
						}
					}
					else if(lgtCpfcn==14)
					{
						CNPJ=ObjCpf.val();
						g=CNPJ.length-2;
                        var VerCNPJ = 0;
                        var ind = 2;
                        var tam;
                        for (f = g; f > 0; f--) {
                            VerCNPJ += parseInt(CNPJ.charAt(f - 1)) * ind;
                            if (ind > 8) {
                                ind = 2;
                            }
                            else {
                                ind++;
                            }
                        }
                        VerCNPJ %= 11;
                        if (VerCNPJ == 0 || VerCNPJ == 1) {
                            VerCNPJ = 0;
                        }
                        else {
                            VerCNPJ = 11 - VerCNPJ;
                        }
                        if (VerCNPJ != parseInt(CNPJ.charAt(g))) {
                            VrfCpf = false;
                        }
					}
					else
					{
						VrfCpf=false;
					}
				}
				return VrfCpf;
			}
			
		}
		
		/* *** + Validação de Formulários *** */
			_formVerif = {
				vrfWsite:function(ideCkbox,ideWebst)
				{
					if ($("#"+ideCkbox).attr("checked"))
					{
						if ($("#"+ideWebst).val()=="")
						{
							alert("Informe o endereço do webSite ou desmarque a opção: POSSUO UM WEBSITE");
							$("#"+ideWebst).focus();
							$("#"+ideWebst).select();
							return false;
						}
					}
				},
				vrfNomes:function(ideNomes,msgNomes)
				{
					if (($("#"+ideNomes).attr("value").indexOf("!") >= 0)||
						($("#"+ideNomes).attr("value").indexOf("@") >= 0)||
						($("#"+ideNomes).attr("value").indexOf("#") >= 0)||
						($("#"+ideNomes).attr("value").indexOf("$") >= 0)||
						($("#"+ideNomes).attr("value").indexOf("%") >= 0)||
						($("#"+ideNomes).attr("value").indexOf("¨") >= 0)||
						($("#"+ideNomes).attr("value").indexOf("&") >= 0)||
						($("#"+ideNomes).attr("value").indexOf("*") >= 0)||
						($("#"+ideNomes).attr("value").indexOf("(") >= 0)||
						($("#"+ideNomes).attr("value").indexOf(")") >= 0)||
						($("#"+ideNomes).attr("value").indexOf(".") >= 0)||
						($("#"+ideNomes).attr("value").indexOf(",") >= 0)||
						($("#"+ideNomes).attr("value").indexOf("<") >= 0)||
						($("#"+ideNomes).attr("value").indexOf(">") >= 0)||
						($("#"+ideNomes).attr("value").indexOf(";") >= 0)||
						($("#"+ideNomes).attr("value").indexOf(":") >= 0)||
						($("#"+ideNomes).attr("value").indexOf("/") >= 0)||
						($("#"+ideNomes).attr("value").indexOf("?") >= 0)||
						($("#"+ideNomes).attr("value").indexOf("^") >= 0)||
						($("#"+ideNomes).attr("value").indexOf("~") >= 0)||
						($("#"+ideNomes).attr("value").indexOf("´") >= 0)||
						($("#"+ideNomes).attr("value").indexOf("`") >= 0)||
						($("#"+ideNomes).attr("value").indexOf("[") >= 0)||
						($("#"+ideNomes).attr("value").indexOf("{") >= 0)||
						($("#"+ideNomes).attr("value").indexOf("-") >= 0)||
						($("#"+ideNomes).attr("value").indexOf("_") >= 0)||
						($("#"+ideNomes).attr("value").indexOf("=") >= 0)||
						($("#"+ideNomes).attr("value").indexOf("+") >= 0)||
						($("#"+ideNomes).attr("value").indexOf("]") >= 0)||
						($("#"+ideNomes).attr("value").indexOf("}") >= 0)||
						($("#"+ideNomes).attr("value").indexOf("\\") >= 0)||
						($("#"+ideNomes).attr("value").indexOf("|") >= 0)||
						($("#"+ideNomes).attr("value").indexOf("¹") >= 0)||
						($("#"+ideNomes).attr("value").indexOf("²") >= 0)||
						($("#"+ideNomes).attr("value").indexOf("³") >= 0)||
						($("#"+ideNomes).attr("value").indexOf("£") >= 0)||
						($("#"+ideNomes).attr("value").indexOf("¢") >= 0)||
						($("#"+ideNomes).attr("value").indexOf("¬") >= 0)||
						($("#"+ideNomes).attr("value").indexOf("§") >= 0)||
						($("#"+ideNomes).attr("value").indexOf("º") >= 0)||
						($("#"+ideNomes).attr("value").indexOf("°") >= 0)||
						($("#"+ideNomes).attr("value").indexOf("'") >= 0))
					{
						MsgNomes=new GoldenAlerta({
							Confirmado:function(){
							},
							Confirmacao:"Ok",
							Mensagem:msgNomes
						})
						$("#"+ideNomes).focus();
						$("#"+ideNomes).select();
						return false;
					}
			
					if ($("#"+ideNomes).attr("value") == "")
					{
						MsgNomes=new GoldenAlerta({
							Confirmado:function(){
							},
							Confirmacao:"Ok",
							Mensagem:msgNomes
						})
						$("#"+ideNomes).focus();
						$("#"+ideNomes).select();
						return false;
					}
				},
				vrfNoddd:function(ideNoddd)
				{
					if (isNaN($("#"+ideNoddd).val()))
					{
						alert("O campo DDD deve conter apenas números!");
						$("#"+ideNoddd).focus();
						$("#"+ideNoddd).select();
						return false;
					}
					if ($("#"+ideNoddd).val()=="")
					{
						alert("O campo DDD deve ser preenchido!");
						$("#"+ideNoddd).focus();
						$("#"+ideNoddd).select();
						return false;
					}
				},
				vrfNumero:function(ideNumero,msgNumero)
				{
					if (isNaN($("#"+ideNumero).val()))
					{
						MsgNomes=new GoldenAlerta({
							Confirmado:function(){
							},
							Confirmacao:"Ok",
							Mensagem:msgNumero
						})
						$("#"+ideNumero).focus();
						$("#"+ideNumero).select();
						return false;
					}
					if ($("#"+ideNumero).val()=="")
					{
						MsgNomes=new GoldenAlerta({
							Confirmado:function(){
							},
							Confirmacao:"Ok",
							Mensagem:msgNumero
						})
						$("#"+ideNumero).focus();
						$("#"+ideNumero).select();
						return false;
					}
				},
				vrfNotel:function(ideNotel,tipNotel)
				{
					// tipNotel:
					// 				0 Qualquer tipo de telefone
					// 				1 Apenas Telefones Fixos
					// 				2 Apenas Celulares
	
					tmpNotel = $("#"+ideNotel).val();
					telefone_41 = tmpNotel.substring(0, 3);
					telefone_42 = tmpNotel.substring(5, 9);
				
					if (isNaN(telefone_41)||isNaN(telefone_42)||(tmpNotel==""))
					{
						alert("O campo telefone deve conter apenas números!");
						$("#"+ideNotel).focus();
						$("#"+ideNotel).select();
						return false;
					}
			
					iniNotel = tmpNotel.charAt(0);
	
					if (tipNotel==1)
					{
						if ((iniNotel=="0")||(iniNotel=="1")||(iniNotel=="9")||(iniNotel=="8")||(iniNotel=="7")||(iniNotel=="6"))
						{
							alert ("Por favor, digite um telefone fixo!");
							$("#"+ideNotel).focus();
							$("#"+ideNotel).select();
							return false;
						}
					}
					else if (tipNotel==2)
					{
						if ((iniNotel == "0")||(iniNotel == "1")||(iniNotel == "3")||(iniNotel == "2"))
						{
							alert ("Por favor, digite um telefone celular!");
							$("#"+ideNotel).focus();
							$("#"+ideNotel).select();
							return false;
						}
					}
				},
				vrfEmail:function(ideEmail,tipEmail)
				{
					msgEmail = "Informe seu e-mail.";
					if (tipEmail==0)
					{
						msgEmail = "e-mail.";
					}
					else
					{
						msgEmail = "e-mail para contato no MSN.";
					}
					
					if ($("#"+ideEmail).attr("value") == "") 
					{
						alert("Informe seu "+msgEmail+".");
						$("#"+ideEmail).focus();
						$("#"+ideEmail).select();
						return false;
					}
					else 
					{
						prim = $("#"+ideEmail).attr("value").indexOf("@")
						if(prim < 2) 
						{
							alert("O "+msgEmail+" informado parece não estar correto.");
							$("#"+ideEmail).focus();
							$("#"+ideEmail).select();
							return false;
						}
						if($("#"+ideEmail).attr("value").indexOf("@",prim + 1) != -1) 
						{
							alert("O "+msgEmail+" informado parece não estar correto.");
							$("#"+ideEmail).focus();
							$("#"+ideEmail).select();
							return false;
						}
						if($("#"+ideEmail).attr("value").indexOf(".") < 1) 
						{
							alert("O "+msgEmail+" informado parece não estar correto.");
							$("#"+ideEmail).focus();
							$("#"+ideEmail).select();
							return false;
						}
						if($("#"+ideEmail).attr("value").indexOf(" ") != -1) 
						{
							alert("O "+msgEmail+" informado parece não estar correto.");
							$("#"+ideEmail).focus();
							$("#"+ideEmail).select();
							return false;
						}
						if($("#"+ideEmail).attr("value").indexOf("zipmeil.com") > 0) 
						{
							alert("O "+msgEmail+" informado parece não estar correto.");
							$("#"+ideEmail).focus();
							$("#"+ideEmail).select();
							return false;
						}
						if($("#"+ideEmail).attr("value").indexOf("hotmeil.com") > 0) 
						{
							alert("O "+msgEmail+" informado parece não estar correto.");
							$("#"+ideEmail).focus();
							$("#"+ideEmail).select();
							return false;
						}
						if($("#"+ideEmail).attr("value").indexOf(".@") > 0) 
						{
							alert("O "+msgEmail+" informado parece não estar correto.");
							$("#"+ideEmail).focus();
							$("#"+ideEmail).select();
							return false;
						}
						if($("#"+ideEmail).attr("value").indexOf("@.") > 0) 
						{
							alert("O "+msgEmail+" informado parece não estar correto.");
							$("#"+ideEmail).focus();
							$("#"+ideEmail).select();
							return false;
						}
						if($("#"+ideEmail).attr("value").indexOf(".com.br.") > 0) 
						{
							alert("O "+msgEmail+" informado parece não estar correto.");
							$("#"+ideEmail).focus();
							$("#"+ideEmail).select();
							return false;
						}
						if($("#"+ideEmail).attr("value").indexOf("/") > 0) 
						{
							alert("O "+msgEmail+" informado parece não estar correto.");
							$("#"+ideEmail).focus();
							$("#"+ideEmail).select();
							return false;
						}
						if($("#"+ideEmail).attr("value").indexOf("[") > 0) 
						{
							alert("O "+msgEmail+" informado parece não estar correto.");
							$("#"+ideEmail).focus();
							$("#"+ideEmail).select();
							return false;
						}
						if($("#"+ideEmail).attr("value").indexOf("]") > 0) 
						{
							alert("O "+msgEmail+" informado parece não estar correto.");
							$("#"+ideEmail).focus();
							$("#"+ideEmail).select();
							return false;
						}
						if($("#"+ideEmail).attr("value").indexOf("(") > 0) 
						{
							alert("O "+msgEmail+" informado parece não estar correto.");
							$("#"+ideEmail).focus();
							$("#"+ideEmail).select();
							return false;
						}
						if($("#"+ideEmail).attr("value").indexOf(")") > 0) 
						{
							alert("O "+msgEmail+" informado parece não estar correto.");
							$("#"+ideEmail).focus();
							$("#"+ideEmail).select();
							return false;
						}
						if($("#"+ideEmail).attr("value").indexOf("..") > 0) 
						{
							alert("O "+msgEmail+" informado parece não estar correto.");
							$("#"+ideEmail).focus();
							$("#"+ideEmail).select();
							return false;
						}
					}
				},
				vrfTexto:function(ideTexto)
				{
					if (($("#"+ideTexto).attr("value").indexOf("!") >= 0)||
						($("#"+ideTexto).attr("value").indexOf("@") >= 0)||
						($("#"+ideTexto).attr("value").indexOf("#") >= 0)||
						($("#"+ideTexto).attr("value").indexOf("$") >= 0)||
						($("#"+ideTexto).attr("value").indexOf("%") >= 0)||
						($("#"+ideTexto).attr("value").indexOf("¨") >= 0)||
						($("#"+ideTexto).attr("value").indexOf("&") >= 0)||
						($("#"+ideTexto).attr("value").indexOf("*") >= 0)||
						($("#"+ideTexto).attr("value").indexOf("(") >= 0)||
						($("#"+ideTexto).attr("value").indexOf(")") >= 0)||
						($("#"+ideTexto).attr("value").indexOf(".") >= 0)||
						($("#"+ideTexto).attr("value").indexOf(",") >= 0)||
						($("#"+ideTexto).attr("value").indexOf("<") >= 0)||
						($("#"+ideTexto).attr("value").indexOf(">") >= 0)||
						($("#"+ideTexto).attr("value").indexOf(";") >= 0)||
						($("#"+ideTexto).attr("value").indexOf(":") >= 0)||
						($("#"+ideTexto).attr("value").indexOf("/") >= 0)||
						($("#"+ideTexto).attr("value").indexOf("?") >= 0)||
						($("#"+ideTexto).attr("value").indexOf("^") >= 0)||
						($("#"+ideTexto).attr("value").indexOf("~") >= 0)||
						($("#"+ideTexto).attr("value").indexOf("´") >= 0)||
						($("#"+ideTexto).attr("value").indexOf("`") >= 0)||
						($("#"+ideTexto).attr("value").indexOf("[") >= 0)||
						($("#"+ideTexto).attr("value").indexOf("{") >= 0)||
						($("#"+ideTexto).attr("value").indexOf("-") >= 0)||
						($("#"+ideTexto).attr("value").indexOf("_") >= 0)||
						($("#"+ideTexto).attr("value").indexOf("=") >= 0)||
						($("#"+ideTexto).attr("value").indexOf("+") >= 0)||
						($("#"+ideTexto).attr("value").indexOf("]") >= 0)||
						($("#"+ideTexto).attr("value").indexOf("}") >= 0)||
						($("#"+ideTexto).attr("value").indexOf("\\") >= 0)||
						($("#"+ideTexto).attr("value").indexOf("|") >= 0)||
						($("#"+ideTexto).attr("value").indexOf("¹") >= 0)||
						($("#"+ideTexto).attr("value").indexOf("²") >= 0)||
						($("#"+ideTexto).attr("value").indexOf("³") >= 0)||
						($("#"+ideTexto).attr("value").indexOf("£") >= 0)||
						($("#"+ideTexto).attr("value").indexOf("¢") >= 0)||
						($("#"+ideTexto).attr("value").indexOf("¬") >= 0)||
						($("#"+ideTexto).attr("value").indexOf("§") >= 0)||
						($("#"+ideTexto).attr("value").indexOf("º") >= 0)||
						($("#"+ideTexto).attr("value").indexOf("°") >= 0)||
						($("#"+ideTexto).attr("value").indexOf("'") >= 0))
					{
						alert("Não utilize caracteres especiais neste campo!");
						$("#"+ideTexto).focus();
						$("#"+ideTexto).select();
						return false;
					}
			
					if ($("#"+ideTexto).attr("value") == "")
					{
						alert("Preencha este campo para continuar!");
						$("#"+ideTexto).focus();
						$("#"+ideTexto).select();
						return false;
					}
				},
				vrfSenha:function(ideSenha)
				{
					tmpSenha = $("#"+ideSenha).val();
					if(!tmpSenha)
					{
						$("#"+ideSenha).focus();
						$("#"+ideSenha).select();
						alert("Digite sua senha.");
						return false;
					}
				},
				vrfCsenh:function(ideSenha,ideCsenh)
				{
					tmpSenha = $("#"+ideSenha).val();
					tmpCsenh = $("#"+ideCsenh).val();
					if(tmpSenha!=tmpCsenh)
					{
						$("#"+ideCsenh).focus();
						$("#"+ideCsenh).select();
						alert("Confirmação de Senha diferente da Senha.");
						return false;
					}
				},
				vrfCpfcn:function(ideCpfcn)
				{
					tmpCpfcn = $("#"+ideCpfcn).val();
					lgtCpfcn = tmpCpfcn.length;
					if(($("#"+ideCpfcn).attr("value").indexOf(".") > 0 )||
						($("#"+ideCpfcn).attr("value").indexOf("/") > 0 )||
						($("#"+ideCpfcn).attr("value").indexOf("-") > 0 ))
					{
						for(i_vrfCpfcn=0;i_vrfCpfcn<lgtCpfcn;i_vrfCpfcn++)
						{
							tmpCpfcn = tmpCpfcn.replace(".","");
							tmpCpfcn = tmpCpfcn.replace("-","");
							tmpCpfcn = tmpCpfcn.replace("/","");
						}
					}
					if(isNaN(tmpCpfcn))
					{
						alert("Verifique o campo CPF/CNPJ !!!");
						$("#"+ideCpfcn).focus();
						$("#"+ideCpfcn).select();
						return false;
					}
					else
					{
						lgtCpfcn = tmpCpfcn.length;
						if(lgtCpfcn<11)
						{
							alert("Número inválido no campo CPF/CNPJ !!!");
							$("#"+ideCpfcn).focus();
							$("#"+ideCpfcn).select();
							return false;
						}
						else if(lgtCpfcn==11)
						{
							numCpfcn = tmpCpfcn.substr(0,9);
							digCpfcn = tmpCpfcn.substr(9,2);
							arrCpfcn = new Array(10,9,8,7,6,5,4,3,2);
							somCpfcn = 0;
							for(i_numCpfcn=0;i_numCpfcn<(numCpfcn.length);i_numCpfcn++)
							{
								somCpfcn += (Number(numCpfcn.charAt(i_numCpfcn))*arrCpfcn[i_numCpfcn]);
							}
							if((somCpfcn%11)<2)
							{
								pdgCpfcn = 0;
							}
							else
							{
								pdgCpfcn = (11-(somCpfcn%11));
							}
							if(pdgCpfcn!=digCpfcn.charAt(0))
							{
								alert("Dígito do CPF não confere.");
								$("#"+ideCpfcn).focus();
								$("#"+ideCpfcn).select();
								return false;
							}
							else
							{
								arrCpfcn = new Array(11,10,9,8,7,6,5,4,3,2);
								somCpfcn = 0;
								for(i_numCpfcn=0;i_numCpfcn<((numCpfcn+digCpfcn.charAt(0)).length);i_numCpfcn++)
								{
									somCpfcn += (Number((numCpfcn+digCpfcn).charAt(i_numCpfcn))*arrCpfcn[i_numCpfcn]);
								}
								if((somCpfcn%11)<2)
								{
									sdgCpfcn = 0;
								}
								else
								{
									sdgCpfcn = (11-(somCpfcn%11));
								}
								if(sdgCpfcn!=digCpfcn.charAt(1))
								{
									alert("Dígito do CPF não confere.");
									$("#"+ideCpfcn).focus();
									$("#"+ideCpfcn).select();
									return false;
								}
							}
						}
						else if(lgtCpfcn==14)
						{
							numCpfcn = tmpCpfcn.substr(0,12);
							digCpfcn = tmpCpfcn.substr(12,2);
							arrCpfcn = new Array(5,4,3,2,9,8,7,6,5,4,3,2);
							somCpfcn = 0;
							for(i_numCpfcn=0;i_numCpfcn<(numCpfcn.length);i_numCpfcn++)
							{
								somCpfcn += (Number(numCpfcn.charAt(i_numCpfcn))*arrCpfcn[i_numCpfcn]);
							}
							if((somCpfcn%11)<2)
							{
								pdgCpfcn = 0;
							}
							else
							{
								pdgCpfcn = (11-(somCpfcn%11));
							}
							if(pdgCpfcn!=digCpfcn.charAt(0))
							{
								alert("Dígito do CNPJ não confere.");
								$("#"+ideCpfcn).focus();
								$("#"+ideCpfcn).select();
								return false;
							}
							else
							{
								arrCpfcn = new Array(6,5,4,3,2,1,9,8,7,6,5,4,3,2);
								somCpfcn = 0;
								for(i_numCpfcn=0;i_numCpfcn<((numCpfcn+digCpfcn.charAt(0)).length);i_numCpfcn++)
								{
									somCpfcn += (Number((numCpfcn+digCpfcn).charAt(i_numCpfcn))*arrCpfcn[i_numCpfcn]);
								}
								if((somCpfcn%11)<2)
								{
									sdgCpfcn = 0;
								}
								else
								{
									sdgCpfcn = (11-(somCpfcn%11));
								}
								if(sdgCpfcn!=digCpfcn.charAt(1))
								{
									alert("Dígito do CNPJ não confere.");
									$("#"+ideCpfcn).focus();
									$("#"+ideCpfcn).select();
									return false;
								}
							}
						}
						else
						{
							alert("Número inválido no campo CPF/CNPJ !!!");
							$("#"+ideCpfcn).focus();
							$("#"+ideCpfcn).select();
							return false;
						}
					}
				},
				vrfNocep:function(tipNocep,ideNocep,msgNocep,ideLogra,ideBairr,ideCidad,ideEstad,idePais)
				{
					tmpNocep = $("#"+ideNocep).val();
					lgtNocep = tmpNocep.length;
					if(($("#"+ideNocep).attr("value").indexOf(".") > 0 )||
						($("#"+ideNocep).attr("value").indexOf("-") > 0 ))
					{
						for(i_vrfNocep=0;i_vrfNocep<lgtNocep;i_vrfNocep++)
						{
							tmpNocep = tmpNocep.replace(".","");
							tmpNocep = tmpNocep.replace("-","");
						}
					}
					if(isNaN($("#"+ideNocep).val()))
					{
						MsgCep=new GoldenAlerta({
							Confirmado:function(){
							},
							Confirmacao:"Ok",
							Mensagem:msgNocep
						})
						$("#"+ideNocep).focus();
						$("#"+ideNocep).select();
						return false;
					}
					else if ($("#"+ideNocep).val()=="")
					{
						MsgCep=new GoldenAlerta({
							Confirmado:function(){
							},
							Confirmacao:"Ok",
							Mensagem:msgNocep
						})
						$("#"+ideNocep).focus();
						$("#"+ideNocep).select();
						return false;
					}
					else if ($("#"+ideNocep).val().length<8)
					{
						MsgCep=new GoldenAlerta({
							Confirmado:function(){
							},
							Confirmacao:"Ok",
							Mensagem:msgNocep
						})
						$("#"+ideNocep).focus();
						$("#"+ideNocep).select();
						return false;
					}
					else if(tipNocep==0)
					{
						getEndereco(ideNocep,ideLogra,ideBairr,ideCidad,ideEstad,idePais);
					}
				},
				vrfEnvio:function(ideFormu)
				{
					$("#"+ideFormu).submit();
				}
			}
	/* *** - Validação de Formulários *** */	

	
