var CurrencyPrefixed=true;var CurrentCurrencyFormat;var StyleDivFunfo;var PriceGroupsUC=undefined;var HotelsUC=undefined;var isB2B=function(){return CurrentPointOfSale=="BRADESCO"||CurrentPointOfSale=="AMEX"};var isAir=function(){return PriceGroupsUC&&!HotelsUC};var isHotel=function(){return !PriceGroupsUC&&HotelsUC};var isAirHotel=function(){return PriceGroupsUC&&HotelsUC};function GetHTML(b){var c=document.getElementById(b);var a=c.value;if(a==null||a==""){a=c.innerHTML}return a.replace(/&lt;/g,"<").replace(/&gt;/g,">")}function StringToDateValues(a){if(a!=undefined&&a!=null&&a!=""){return{Year:a.split("/")[2],Month:a.split("/")[1],Day:a.split("/")[0],isValid:true}}return{Year:1,Month:1,Day:1,isValid:false}}function DateValuesToDate(a){if(a.Year!=undefined&&a.Month!=undefined&&a.Day!=undefined){return new Date(a.Year,a.Month-1,a.Day)}return null}function CompareDateValues(a,b){return(a&&b)&&(a.Year==b.Year)&&(a.Month==b.Month)&&(a.Day==b.Day)}function FormatCompleteDate(b){var a=b.Day+" de "+Months[b.Month]+" de "+b.Year+" "+(b.Hour==0?"0":"")+b.Hour+":";if(b.Minutes!=undefined){a+=(b.Minutes<10?"0":"")+b.Minutes}return a}function FormatPointsB2B(a){return Math.ceil(a)}function FormatCompleteDateDiference(d,c){var a=DateValuesToDate(d);var b=DateValuesToDate(c);var e=(b-a);returnDate=e.Day+" de "+Months[e.Month]+" de "+e.Year+" "+e.Hour+":";if(e.Minutes!=undefined){returnDate+=(e.Minutes<10?"0":"")+e.Minutes}return returnDate}function FormatSimpleDateTimeValues(a){return(a.Day<10?"0":"")+parseFloat(a.Day)+"/"+(a.Month<10?"0":"")+parseFloat(a.Month)+"/"+a.Year+" "+(a.Hour<10?"0":"")+a.Hour+":"+(a.Minutes<10?"0":"")+a.Minutes}function FormatSimpleTimeValues(a){return(a.Hour<10?"0":"")+a.Hour+":"+(a.Minutes<10?"0":"")+a.Minutes}function FormatSimpleDateValues(a){return(a.Day<10?"0":"")+parseFloat(a.Day)+"/"+(a.Month<10?"0":"")+parseFloat(a.Month)+"/"+a.Year}function FormatUSDSimpleDateValues(a){return(a.Month<10?"0":"")+parseFloat(a.Month)+"/"+(a.Day<10?"0":"")+parseFloat(a.Day)+"/"+a.Year}function FormatDecimalPointsB2B(a){var b=Math.round(a).toString();while(b.match(/^\d{4}/)){b=b.replace(/(\d)(\d{3}(\.|$))/,"$1.$2")}return b}function FormatTripTypeCode(a){if(a==0){return"None"}if(a==1){return"OW"}if(a==2){return"RT"}}$(".sem-caracter-especial").live("keypress",function(b){var a="ABCDEFGHIJKLMNOPQRSTUVXZWYabcdefghijklmnopqrstuvxzwyÇçãÃõÕóÓòÒáÁàÀéèÉÈíìÍÌ";if(b.which>-1&&b.which<33){return true}if(a.indexOf(String.fromCharCode(b.which))==-1){b.preventDefault()}});$(".sem-caracter-especial2").live("blur",function(a){$(this).val($(this).val().RemoveDiacritics());if($(this).val().replace(/[^a-zA-Z]+/g,"").length!=$(this).val().length){$(this).val("")}});$(".sem-caracter-especial-mantem-espacos").live("blur",function(a){$(this).val($(this).val().RemoveDiacritics());if($(this).val().replace(/[^a-zA-Z ]+/g,"").length!=$(this).val().length){$(this).val("")}});$(".sem-caracter-especial-location").live("blur",function(a){$(this).val($(this).val().RemoveDiacritics());if($(this).val().replace(/[^a-zA-Z \/,().'¸`-]+/g,"").length!=$(this).val().length){$(this).val("")}});$(".somente-numeros").live("blur",function(b){var a=$(this);if(a.val().replace(/[^0-9]+/g,"").length!=a.val().length){a.val("")}});$(".data-valida").live("blur",function(a){if(!isValidDate(this.value)){this.value=""}});$().mousemove(function(c){var b=c.pageX;var a=c.pageY});var dateFormat=function(){var d=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,b=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,c=/[^-+\dA-Z]/g,a=function(f,e){f=String(f);e=e||2;while(f.length<e){f="0"+f}return f};return function(g,x,u){var w=dateFormat;if(arguments.length==1&&Object.prototype.toString.call(g)=="[object String]"&&!/\d/.test(g)){x=g;g=undefined}g=g?new Date(g):new Date;if(isNaN(g)){throw SyntaxError("invalid date")}x=String(w.masks[x]||x||w.masks["default"]);if(x.slice(0,4)=="UTC:"){x=x.slice(4);u=true}var h=u?"getUTC":"get",q=g[h+"Date"](),f=g[h+"Day"](),z=g[h+"Month"](),n=g[h+"FullYear"](),r=g[h+"Hours"](),k=g[h+"Minutes"](),v=g[h+"Seconds"](),p=g[h+"Milliseconds"](),e=u?0:g.getTimezoneOffset(),t={d:q,dd:a(q),ddd:w.i18n.dayNames[f],dddd:w.i18n.dayNames[f+7],m:z+1,mm:a(z+1),mmm:w.i18n.monthNames[z],mmmm:w.i18n.monthNames[z+12],yy:String(n).slice(2),yyyy:n,h:r%12||12,hh:a(r%12||12),H:r,HH:a(r),M:k,MM:a(k),s:v,ss:a(v),l:a(p,3),L:a(p>99?Math.round(p/10):p),t:r<12?"a":"p",tt:r<12?"am":"pm",T:r<12?"A":"P",TT:r<12?"AM":"PM",Z:u?"UTC":(String(g).match(b)||[""]).pop().replace(c,""),o:(e>0?"-":"+")+a(Math.floor(Math.abs(e)/60)*100+Math.abs(e)%60,4),S:["th","st","nd","rd"][q%10>3?0:(q%100-q%10!=10)*q%10]};return x.replace(d,function(m){return m in t?t[m]:m.slice(1,m.length-1)})}}();dateFormat.masks={"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"};dateFormat.i18n={dayNames:["dom","seg","ter","qua","qui","sex","sab","Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sabado"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"]};Date.prototype.format=function(a,b){return dateFormat(this,a,b)};Date.prototype.addDays=function(a){this.setDate(this.getDate()+a)};String.prototype.replaceAll=function(c,b){var a=this;while(a.indexOf(c)>=0){a=a.replace(c,b)}return a.toString()};String.prototype.capitalize=function(){return this.replace(/\S+/g,function(b){return b.charAt(0).toUpperCase()+b.slice(1).toLowerCase()})};function getNumericTime(a){var b=a.Hour+(a.Minutes<10?"0":"")+a.Minutes;return parseFloat(b)}function FormatDateUTC(c){var b=new Date();var a="";b.setUTCDate(c);a=b.getFullYear()!=1?b.format("dd/mm/yyyy HH:MM"):"";return a}function FormatDateWhithoutTimezone(b){var a=b;a.setMinutes(b.getTimezoneOffset());return a.getFullYear()!=1?a.format("dd/mm/yyyy"):""}function FormatTimeSlider(d){d=Math.round(d).toString();var b="";var a;var c;if(d.length==4){a=d.substr(0,2);c=d.substr(2,2)}else{if(d.length==3){a=d.substr(0,1);c=d.substr(1,2)}else{if(d.length==2){a=0;c=d}}}if(a>24){a=24}if(c>59){c=59}if(isNaN(a)){a=0}if(isNaN(c)){c=0}return a+":"+c}function VerifyPointsValue(c){var b=new String(c).split(".");if(b.length>1){return false}else{return true}}function FormatPriceSlider(a){return CurrencyPrefixed?CurrentCurrencyFormat+a.FormatCurrency():a}function convertSerializableDate(b){var a=new Date();if(typeof b=="string"){b=b.replace("/Date(","").replace(")/","");a=new Date(parseFloat(b))}return a}function FormatDate(a){if(a!=undefined){if(typeof a=="object"&&a.Year){a=new Date(a.Year,a.Month,a.Day)}if((typeof a=="Date")||(typeof a=="object")){if(a.getFullYear()!=1){return a.format("dd/mm/yyyy")}}}return""}function FormatDateValue(a){var b="";if(a!=undefined&&a!=""){var c=new Date(a);b=c.format("dd/mm/yyyy")}return b}function FormatDateWeek(a){return DaysOfWeek[a.DayOfWeek]+", "+FormatSimpleDateValues(a)}function FormatDateWeek2(a){return FormatSimpleDateValues(a)+" ("+DaysOfWeek[a.DayOfWeek]+")"}function DateDif(b,a){return((a-b)/(24*60*60*1000)).toFixed(0)}function NumberOfDays(a,b){return 32-new Date(b,a-1,32).getDate()}function SumDays(c,e){var d=c.getDate();var b=c.getMonth()+1;var a=c.getFullYear();e=e+d;while(e>NumberOfDays(b,a)){e=e-NumberOfDays(b,a);b++;if(b>12){b=1;a++}}return(new Date(a,(b-1),e))}var DaysOfWeek={"0":"dom","1":"seg","2":"ter","3":"qua","4":"qui","5":"sex","6":"sab"};var Months={"1":"Janeiro","2":"Fevereiro","3":"Março","4":"Abril","5":"Maio","6":"Junho","7":"Julho","8":"Agosto","9":"Setembro","10":"Outubro","11":"Novembro","12":"Dezembro"};function FormatDateWeekMonth(a){return DaysOfWeek[a.DayOfWeek]+", "+a.Day+" "+Months[a.Month]+" "+a.Year}function formatMinutesInHourMinute(a){var b=a%60;var d=(a-b)/60;var c;var e;c=d.toString();e=Math.round(b).toString();if(d<10){c="0"+c}if(b<10){e="0"+e}return c+":"+e}function formatMinutesInHourMinuteLong(c){var b=c%60;var a=(c-b)/60;var d;var f;var e;hoursString=a.toString();f=b.toString();return(a>0?hoursString+(a>1?" horas":" hora"):"")+(b>0?f+(b>1?" minutos":" minuto"):"")}function FormatHour(c){var b="";var a=c.Hour;if(a<10){b="0"}b+=a;b+=":";if(c.Minutes<10){b+="0"}b+=c.Minutes;return b}function Clone_Object(f){if(typeof f!=="object"||f==null){return f}var b=f instanceof Array?[]:{};for(var d in f){var a=f[d];if(typeof a=="object"){if(a instanceof Array){b[d]=[];for(var e=0;e<a.length;e++){if(typeof a[e]!="object"){b[d].push(a[e])}else{b[d].push(Clone_Object(a[e]))}}}else{if(a instanceof Date){b[d]=new Date(a.getTime())}else{b[d]=Clone_Object(a)}}}else{b[d]=a}}return b}function toggleAnimateDIV(a,c){var b=$(c);b.is(":hidden")?b.slideDown("fast"):b.slideUp("fast")}function CalculeFlightDuration(a){var b="";var c="";if(a>60){c=parseInt(a/60);a=a%60;b+=c+(c>1?" hs ":" h ");b+=(a>9?"":"0")+a+" min"}else{b=a+" min"}return b}function ltrim(a){l=new Number(a.length);if(l>0){while(a.charAt(0)==" "||a.charAt(0)=="\t"){a=a.substr(1,l-1)}}return a}function rtrim(a){l=new Number(a.length);if(l>0){while(a.charAt(l-1)==" "||a.charAt(l-1)=="\t"){a=a.substr(0,l-1);l=a.length}}return a}function lmpStr(a,b){strResult="";for(iCont=0;iCont<a.length;iCont++){if(a.charAt(iCont)!=b){strResult+=a.charAt(iCont)}}return strResult}function trim(a){return(a==undefined||a==null)?"":ltrim(rtrim(a))}function soNumero(a){var b=KeyStroke(a);return((b>47&&b<58)||b==0||b==8||b==13)}function soCaracter(a){var b=KeyStroke(a);return((b>=97&&b<=122)||(b>=65&&b<=90)||b==0||b==8||b==13||b==32||b==199||b==89||b==231)}function soNumSinal(b,a){var c=KeyStroke(a);return((c>47&&c<58)||(c==0||c==8||c==13||c==44||c==b))}function soNumSinalsemVirgula(b,a){var c=KeyStroke(a);return((c>47&&c<58)||(c==0||c==8||c==13||c==b))}function soNaoSinal(b,a){return !(KeyStroke(a)==b)}function KeyStroke(b){var a=0;if(b.which==undefined){a=window.event.keyCode}else{a=b.which}return a}function KeyIns(a,b){if(a.which==undefined){window.event.keyCode=b}else{a.keyCode=b}}function Formata(d,c,b,e){var a=b.keyCode;vr=Limpar(d.value,"0123456789");tam=vr.length;dec=e;if(tam<c&&a!=8){tam=vr.length+1}if(a==8){tam=tam-1}if(a==8||a>=48&&a<=57||a>=96&&a<=105){if(tam<=dec){d.value=vr}if((tam>dec)&&(tam<=5)){d.value=vr.substr(0,tam-2)+","+vr.substr(tam-dec,tam)}if((tam>=6)&&(tam<=8)){d.value=vr.substr(0,tam-5)+"."+vr.substr(tam-5,3)+","+vr.substr(tam-dec,tam)}if((tam>=9)&&(tam<=11)){d.value=vr.substr(0,tam-8)+"."+vr.substr(tam-8,3)+"."+vr.substr(tam-5,3)+","+vr.substr(tam-dec,tam)}if((tam>=12)&&(tam<=14)){d.value=vr.substr(0,tam-11)+"."+vr.substr(tam-11,3)+"."+vr.substr(tam-8,3)+"."+vr.substr(tam-5,3)+","+vr.substr(tam-dec,tam)}if((tam>=15)&&(tam<=17)){d.value=vr.substr(0,tam-14)+"."+vr.substr(tam-14,3)+"."+vr.substr(tam-11,3)+"."+vr.substr(tam-8,3)+"."+vr.substr(tam-5,3)+","+vr.substr(tam-2,tam)}}}function adjustDate(c){valor="";valor=trim(c.value);valor=lmpStr(valor,"/");iDia=0;iMes=0;iAno=0;mask="";var e=new Date();var b=e.getFullYear();var a=e.getMonth();var f=e.getDay();if(trim(valor).length!=0){if(valor.length>=1){iDia=parseFloat(valor.substring(0,2));if(iDia<1){iDia=1}if(iDia>31){iDia=31}}else{iDia=f}if(valor.length>=3){iMes=parseFloat(valor.substring(2,4));if(iMes<1){iMes=1}if(iMes>12){iMes=12}}else{iMes=a+1}if(valor.length>4){iAno=parseFloat(valor.substring(4,8));if(iAno<100){iAno=iAno+2000}}else{iAno=b}if(iAno<1500||iAno>2500){iAno=b}c.value="";if(iMes==4&&iDia>30){iDia=30}if(iMes==6&&iDia>30){iDia=30}if(iMes==9&&iDia>30){iDia=30}if(iMes==11&&iDia>30){iDia=30}if(iMes==2&&iDia>29){iDia=29}if(iMes==2&&iDia>=28){iBiSexto=iAno/4;iDia=iBiSexto.toString().length==3?29:28}var d=iDia.toString();c.value+=(d.length<2?"0":"")+d+"/";var g=iMes.toString();c.value+=(g.length<2?"0":"")+g+"/"+iAno.toString()}}function MascData(b,c){valor="";valor=trim(b.value);valor=lmpStr(valor,"/");iKey=KeyStroke(c);strDia="";strMes="";if(valor.length>0&&((iKey>=48&&iKey<=57)||(iKey>=96&&iKey<=105))){mask="";if(valor.length>0&&valor.length<=2){mask=valor;if(valor.length==2){if(parseFloat(valor.substring(0,2))>31){mask="31"}}}if(valor.length>2&&valor.length<=4){if(parseFloat(valor.substring(0,2))>31){strDia="31"}else{strDia=valor.substring(0,2)}if(valor.length==4){var a=valor.substring(2,4);if(parseFloat(a)>12){strMes="12"}else{strMes=a}}else{strMes=valor.substring(2,4)}mask=mask+strDia+"/"+strMes}if(valor.length>4){if(parseFloat(valor.substring(0,2))>31){strDia="31"}else{strDia=valor.substring(0,2)}if(valor.length>4){if(parseFloat(valor.substring(2,4))>12){strMes="12"}else{strMes=valor.substring(2,4)}}else{strMes=valor.substring(2,4)}mask=mask+strDia+"/"+strMes+"/"+valor.substring(4,8)}b.value=mask}}function vdHora(c){valor="";valor=trim(c.value);valor=lmpStr(valor,":");iHora=0;iMinuto=0;mask="";var e=new Date();var b=e.getHours();var f=e.getMinutes();if(trim(valor).length!=0){if(valor.length>=1){iHora=parseFloat(valor.substring(0,2));if(iHora<0){iHora=0}if(iHora>23){iHora=23}}else{iHora=b}if(valor.length>=3){iMinuto=parseFloat(valor.substring(2,4));if(iMinuto<0){iMinuto=0}if(iMinuto>59){iMinuto=59}}else{iMinuto=f}c.value="";var d=iHora.toString();c.value+=(d.length<2?"0":"")+d;c.value+=":";var a=iMinuto.toString();c.value+=(a.length<2?"0":"")+a}}function MascHora(a,b){valor="";valor=trim(a.value);valor=lmpStr(valor,":");iKey=KeyStroke(b);strHora="";strMinuto="";if(valor.length>0&&((iKey>=48&&iKey<=57)||(iKey>=96&&iKey<=105))){mask="";if(valor.length>0&&valor.length<=2){mask=valor;if(valor.length==2){if(parseFloat(valor.substring(0,2))>23){mask="23"}}}if(valor.length>2&&valor.length<=4){if(parseFloat(valor.substring(0,2))>23){strHora="23"}else{strHora=valor.substring(0,2)}if(valor.length==4){if(parseFloat(valor.substring(2,4))>59){strMinuto="59"}else{strMinuto=valor.substring(2,4)}}else{strMinuto=valor.substring(2,4)}mask=mask+strHora+":"+strMinuto}a.value=mask}}function MascaraCPF_CNPJ(b,a){if(b.value.length>14){return fnMascaraCNPJ(b,a)}else{return fnMascaraCPF(b,a)}}function fnlmpCNPJ(a){strResult="";for(iCont=0;iCont<a.length;iCont++){if(a.charAt(iCont)!="."&&a.charAt(iCont)!="-"&&a.charAt(iCont)!="/"){strResult+=a.charAt(iCont)}}return strResult}function fnMascaraCNPJ(b,a){valor="";valor=trim(fnlmpCNPJ(b.value));Key=KeyStroke(a);if(valor.length>0&&((Key>=48&&Key<=57)||(Key>=96&&Key<=105))){mask="";if(valor.length>0){mask=valor;if(valor.length>=2){mask=valor.substring(0,2)+"."+valor.substring(2,5)}if(valor.length>=5){mask=valor.substring(0,2)+"."+valor.substring(2,5)+"."+valor.substring(5,8)}if(valor.length>=8){mask=valor.substring(0,2)+"."+valor.substring(2,5)+"."+valor.substring(5,8)+"/"+valor.substring(8,12)}if(valor.length>=12){mask=valor.substring(0,2)+"."+valor.substring(2,5)+"."+valor.substring(5,8)+"/"+valor.substring(8,12)+"-"+valor.substring(12,14)}}b.value=mask}}function MascaraCEP(a,b){valor=a.value;valor=valor.replace("-","");Key=KeyStroke(b);if(valor.length>0&&((Key>=48&&Key<=57)||(Key>=96&&Key<=105))){mask="";if(valor.length>0){mask=valor;if(valor.length>=5){mask=valor.substring(0,5)+"-"+valor.substr(5,3)}}a.value=mask}}function fnMascaraCPF(b,a){valor="";valor=trim(fnlmpCPF(b.value));Key=KeyStroke(a);if(valor.length>0&&((Key>=48&&Key<=57)||(Key>=96&&Key<=105))){mask="";if(valor.length>0){mask=valor;if(valor.length>=3){mask=valor.substring(0,3)+"."+valor.substring(3,6)}if(valor.length>=6){mask=valor.substring(0,3)+"."+valor.substring(3,6)+"."+valor.substring(6,9)}if(valor.length>=9){mask=valor.substring(0,3)+"."+valor.substring(3,6)+"."+valor.substring(6,9)+"-"+valor.substring(9,11)}}b.value=mask}}function fnlmpCPF(a){strResult="";for(iCont=0;iCont<a.length;iCont++){if(a.charAt(iCont)!="."&&a.charAt(iCont)!="-"){strResult+=a.charAt(iCont)}}return strResult}function fnMascaraCEP(a,b){valor="";valor=trim(fnlmpCEP(a.value));Key=KeyStroke(b);if(valor.length>0&&((Key>=48&&Key<=57)||(Key>=96&&Key<=105))){mask="";if(valor.length>0){mask=valor;if(valor.length>=5){mask=valor.substring(0,5)+"-"+valor.substring(5,8)}}a.value=mask}}function fnlmpCEP(a){strResult="";for(iCont=0;iCont<a.length;iCont++){if(a.charAt(iCont)!="-"){strResult+=a.charAt(iCont)}}return strResult}function CurrencyFormatted(e){var d=parseFloat(e);if(isNaN(d)){d=0}var a="";if(d<0){a="-"}d=Math.abs(d);d=parseInt((d+0,005)*100);d=d/100;var c=new String(d);var b=c.indexOf(".");if(b<0){c+=".00"}if(b==(c.length-2)){c+="0"}c=a+c;return c.replace(".",",")}function NumberFormatted(a){return CurrencyFormatted(a)}Array.prototype.remove=function(a,b){var c=this.slice((b||a)+1||this.length);this.length=a<0?this.length+a:a;return this.push.apply(this,c)};Number.prototype.FormatCurrency=function(){return CurrencyFormatted(this)};Number.prototype.FormatNumber=function(){return NumberFormatted(this)};this.CloseHintBoxy=function(a){var b=(typeof a=="string")?window.document.getElementById(a):a;var d=$(b);if(d.attr("CreateHintBoxy")==true||b.getAttribute("CreateHintBoxy")==true){window.document.body.removeChild(b)}else{d.css("display","none").css("visibility","hidden").hide()}var c=window.document.getElementById("CreateHintBoxyDIVFundo");if(c!=null){window.document.body.removeChild(c)}};this.CreateHintBoxy=function(f,n,a,b,k){var d;var e;var h=false;if(a==undefined){a=true}if(n!=undefined&&$(n).length>0){d=$(n).position().left;e=$(n).position().top;width=$(n).outerWidth(true);height=$(n).outerHeight(true);d+=width}else{if(self.innerHeight){d=self.innerWidth;e=self.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){d=document.documentElement.clientWidth;e=document.documentElement.clientHeight}else{if(document.body){d=document.body.clientWidth;e=document.body.clientHeight}}}e=e<=5?YMousePosition:e/2;d=d/2}if(b==undefined){b="fixed"}var m=window.document.createElement("div");m.id="CreateHintBoxyDIVFundo";m.style.filter="Alpha(Opacity=40)";if(StyleDivFunfo==1){m.style.opacity="0.7";m.style.backgroundColor="#222"}else{m.style.opacity="0.4";m.style.backgroundColor="#CCC"}if(window.scrollMaxY==0){m.style.height="100%"}else{m.style.height=$(document).height()+100+"px"}m.style.width="100%";m.style.position=isOLD_Navigator()?"absolute":"fixed";m.style.zIndex="500";m.style.top="0px";m.style.left="0px";if($("#CreateHintBoxyDIVFundo").length==0){window.document.body.appendChild(m)}if(typeof f=="string"){var c=window.document.createElement("div");if(a){c.style.cursor="pointer";c.setAttribute("onClick","CloseHintBoxy(this);")}c.style.backgroundColor="#FFF";c.style.position=b;c.innerHTML=f;$(c).attr("CreateHintBoxy",true);h=true}else{c=f}if(c.jquery==undefined){c.style.display="none";c.style.visibility="visible";window.document.body.appendChild(c);var g=$(c);if(h){d-=(g.width()/2);e-=(g.height()/2)}c.style.left=d+"px";c.style.top=e+"px";c.style.zIndex="1000";c.style.position=b;g.fadeIn(200)}else{c[0].style.display="none";c[0].style.visibility="visible";window.document.body.appendChild(c[0]);var g=$(c);if(!k){d-=(g.width()/2);e-=(g.height()/2)}if(c[0]!=undefined){c[0].style.left=d+"px";c[0].style.top=e+"px";c[0].style.position=b;c[0].style.zIndex="1000";c.fadeIn(200)}}};function GetIATA(a){var b="";var a=trim(a);if(a.indexOf("--")>0){b=a.substr(a.indexOf("--")+2,3)}else{if(a.indexOf("(")>0){b=a.substr(a.indexOf("(")+1,3)}else{if(a.length==3){b=a}}}return b.toUpperCase()}function GetIATAFromURI(a){IATA="";URI="";arrURI=undefined;URI=decodeURIComponent(window.location.search);arrURI=URI.split("&");if(arrURI!=null&&arrURI!=undefined){for(var b=0;b<arrURI.length;b++){Element=arrURI[b].split("=");if(Element[0]==a){if(Element[1].indexOf("--")>0){IATA=Element[1].substr(Element[1].indexOf("--")+2,3)}else{IATA=Element[1].substr(Element[1].indexOf("(")+1,3)}break}}}return IATA}function QueryString(c,e){if(!e){e=0}var b="";var a=window.location.search.substring(1).split("&");c=c.toLowerCase();for(var f=0,d=a.length;f<d;f++){b=a[f].split("=");if(b[0].toLowerCase()==c){if(e==0){return b[1]}else{e--}}}}function checkDate(d,c,b){var a=/^(19|20)\d\d-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/;if(!a.test(b+"-"+c+"-"+d)){return false}if(d==31&&(/^0?[469]$/.test(c)||c==11)){return false}else{if(d>=30&&c==2){return false}else{if(c==2&&d==29&&!(b%4==0&&(b%100!=0||b%400==0))){return false}else{return true}}}}function checkTime(c,a,b){if(!b){b="00"}var d=/^(0?\d|1\d|2[0-3]):[0-5]?\d:[0-5]?\d$/;return d.test(c+":"+a+":"+b)}function isValidDate(f,a){if(!a){var d=2;var e=1;var b=3}else{a=a.toLowerCase().replace(/[^dmy]/g,"");var e=a.indexOf("d")+1;var d=a.indexOf("m")+1;var b=a.indexOf("y")+1}var c=f.match(/^\b(\d+)\D(\d+)\D(\d+)\b\b(?:\s+(\d{1,2})\D(\d{2})\D*((\d{2})?))?\b$/);if(!c){return false}c.clearUndefined();c.clearStringEmpty();if(!checkDate(c[e],c[d],c[b])){return false}else{if(c.length>=5){return checkTime(c[4],c[5],(c[6]?c[6]:false))}else{return true}}}function setDateRegionalString(e){var f;if(e&&e.indexOf("/")>=0){var b=e.split("/");if(b.length==3){var a=b[0];var c=b[1]-1;var d=b[2];f=new Date();f.setFullYear(d,c,a)}}return f}function isEmail(a){var b=new RegExp(/^[\d\w_.-]+@([\d\w_-]+\.){1,}[\w\d]+$/);return b.test(a)}function VerificaCodigoSeguranca(a,b){var c=true;if(b=="VI"){c=a.length<=3}if(b=="MC"){c=a.length<=3}if(b=="MS"){c=a.length<=3}if(b=="AX"){c=a.length==4}if(b=="DI"){c=a.length<=3}if(b=="AU"){c=a.length==0}if(b=="GE"){c=a.length<=3}return c}function ValidaCartaoCredito(c,d){var a=0;var f=0;var e="";for(i=0,len=c.length;i<len;i++){var b=c.charAt(i);if(b>="0"&&b<="9"){e+=b}else{return false}}if(e.length<13){return false}first=""+e.charAt(0);second=""+e.charAt(1);third=""+e.charAt(2);firstTwo=first+second;firstFour=firstTwo+third+e.charAt(3);if(d=="MC"){if(first!="5"||second<"1"||second>"5"){return false}if(e.length!=16){return false}}if(d=="MS"){if(e.substring(0,4).indexOf("5324")==-1){return false}if(e.length!=16){return false}}else{if(d=="AU"||d=="submarino"){if(checkCCAura(e)!=0||e.substring(6,8).indexOf("18")==-1||e.substring(0,6).indexOf("507860")==-1){return false}}else{if(d=="GE"){if(e.length==19){if((e.substring(0,6)!="384100")||((e.substr(6,1)!="1")&&(e.substr(6,1)!="4")&&(e.substr(6,1)!="6"))){return false}else{return true}}else{if(e.length==16){if(e.substring(0,6)=="606282"){return true}else{return false}}else{return false}}}else{if(d=="VI"){if(first!="4"){return false}if(e.length!=13&&e.length!=16){return false}}else{if(d=="AX"){if(first!="3"||(second!="4"&&second!="7")){return false}if(e.length!=15){return false}}else{if(d=="DI"){if(firstTwo!="36"&&firstTwo!="38"&&(firstTwo!="30"||(third<"0"||third>"5"))){return false}if(e.length!=14){return false}}else{if(d=="JCB Cards"){if(firstFour!="2131"&&firstFour!="1800"&&(first!="3")){return false}if(e.length!=16&&first=="3"){return false}if(e.length!=15&&first!="3"){return false}}}}}}}}for(loc=e.length-2;loc>=0;loc-=2){a+=1*e.charAt(loc+1);f=e.charAt(loc)*2;if(f>9){a+=1}a+=f%10}if(e.length%2>0){a+=1*e.charAt(0)}return(a%10==0)}function checkCCAura(b){var d;d=/ /gi;b=b.replace(d,"");if(b.charAt(0)=="0"){b=b.substr(1,b.length)}ccprefix="507860";prefixvalid=false;lengthvalid=false;if(b.indexOf(ccprefix)==0){prefixvalid=true}if(b.length==19){lengthvalid=true}var c=0;if(!prefixvalid){c+=1}if(!lengthvalid){c+=2}qsum=0;for(var a=0;a<b.length;a++){ch=b.substr(b.length-a-1,1);if(a%2!=0){sum=2*parseFloat(ch,10);qsum+=(sum%10);if(sum>9){qsum+=1}}else{qsum+=parseFloat(ch,10)}}if(qsum%10!=0){c+=4}return c}function validCPF_CNPJ(g){g=trim(fnlmpCNPJ(g));g=g.replace(/[^0-9]/g,"");if(g==""){return(false)}if(((g.length==11)&&(g==11111111111)||(g==22222222222)||(g==33333333333)||(g==44444444444)||(g==55555555555)||(g==66666666666)||(g==77777777777)||(g==88888888888)||(g==99999999999)||(g==0))){return(false)}if(!((g.length==11)||(g.length==14))){return(false)}var h="0123456789";var e=g;var a=true;var c="";for(i=0;i<e.length;i++){ch=e.charAt(i);for(j=0;j<h.length;j++){if(ch==h.charAt(j)){break}}if(j==h.length){a=false;break}c+=ch}if(!a){return(false)}var d=c;var b=parseFloat(c);if(d!=""&&!(b>"0")){return(false)}if(g.length==11){var k=0;for(i=2;i<=10;i++){k+=i*parseFloat(e.charAt(10-i))}if((k*10%11%10)!=parseFloat(e.charAt(9))){return(false)}k=0;for(i=2;i<=11;i++){k+=i*parseFloat(e.charAt(11-i))}if((k*10%11%10)!=parseFloat(e.charAt(10))){return(false)}}else{var k=0;var f=2;for(i=0;i<=11;i++){k+=f*parseFloat(e.charAt(11-i));f++;if(f==10){f=2}}if((k*10%11%10)!=parseFloat(e.charAt(12))){return(false)}k=0;f=2;for(i=0;i<=12;i++){k+=f*parseFloat(e.charAt(12-i));f++;if(f==10){f=2}}if((k*10%11%10)!=parseFloat(e.charAt(13))){return(false)}}return(true)}function RetiraAcentos(g){var a="áàãââÁÀÃÂéêÉÊíÍóõôÓÔÕúüÚÜçÇabcdefghijklmnopqrstuvxwyz";var h="aaaaaAAAAeeEEiIoooOOOuuUUcCABCDEFGHIJKLMNOPQRSTUVXWYZ";var c,f;var b="";var d=g.toUpperCase();for(var e=0,k=g.length;e<k;e++){f=d.charAt(e);c=a.indexOf(f);if(c>-1){b+=h.charAt(c)}else{b+=f}}return b}function SearchTerm(b){var c=0;var a=[];b=b.toLowerCase();for(i=0;i<cities.length;i++){if(cities[i].toLowerCase().indexOf(b,0)!=-1){a[c]=cities[i];c++}}return a}function SearchTermWithPost(b,a){var c=SearchTerm(b.term.RemoveDiacritics());if(c.length>1){a(c)}else{$.ajax({type:"POST",url:"/Produtos/UserControls/asmx/PesqInc.asmx/RetornarLocalidade",data:"{'prefixText':'"+b.term+"','count':10,'contextKey':'PesquisarLocalidade=0;PesquisarCidade=1;PesquisarEstado=1;PesquisarPais=1;PesquisarContinente=0;PesquisarAeroporto=1;PesquisarIata=1;QuantidadeItensRetorno=20;MostrarLocalidade=0;MostrarCidadeEstado=1;MostrarPais=1;MostrarAeroportoIata=1;MostrarContinente=0'}",contentType:"application/json; charset=utf-8",dataType:"json",success:function(d){a(d)}})}}function isOLD_Navigator(){return(navigator.userAgent.indexOf("MSIE 6.")!=-1)||(navigator.userAgent.indexOf("MSIE 5.")!=-1)||(navigator.userAgent.indexOf("MSIE 4.")!=-1)}function getBrazilianDateInternal(a){var d=a.getUTCDate();var c=a.getUTCMonth();var h=a.getUTCFullYear();var g=a.getUTCHours()-3;var e=a.getUTCMinutes();var b=a.getUTCSeconds();var f=a.getTimezoneOffset();var k=new Date(h,c,d,g,e,b);k.setUTCHours(a.getUTCHours()-((180-f)/60));return k}function addDayServerDate(d,b){var c=parseFloat(d.Month);var a;a=31;if(c==4&&a>30){a=30}if(c==6&&a>30){a=30}if(c==9&&a>30){a=30}if(c==11&&a>30){a=30}if(c==2&&a>29){a=29}if(c==2&&a>=28){iBiSexto=iAno/4;if(iBiSexto.toString().length==3){a=29}else{a=28}}d.Day=parseFloat(d.Day)+b;if(d.Day>a){d.Month=parseFloat(d.Month)+1;d.Day=1}else{if(d.Day<1){d.Month=parseFloat(d.Month)-1;if(d.Month>0){var c=parseFloat(d.Month);if(c==4&&a>30){a=30}if(c==6&&a>30){a=30}if(c==9&&a>30){a=30}if(c==11&&a>30){a=30}if(c==2&&a>29){a=29}if(c==2&&a>=28){iBiSexto=iAno/4;if(iBiSexto.toString().length==3){a=29}else{a=28}}d.Day=a}}}if(d.Month>12){d.Month=1;d.Year=parseFloat(d.Year)+1}else{if(d.Month<1){d.Day=31;d.Month=12;d.Year=parseFloat(d.Year)-1}}return d}function isValidPhoneType(c,a){if(c.length<8){return false}else{if(isNaN(c)){return false}else{if(a=="FIXO"){var b=c.substring(0,1);b=parseInt(b);if(b>5){return false}}else{if(a=="MOVEL"){var b=c.substring(0,1);b=parseInt(b);if(b<6){return false}}}}}return true}function EquipmentResolver(a){if(a==0){return"Avião"}else{if(a==1){return"Onibus"}else{if(a==2){return"Trem"}else{if(a==3){return"Carro"}else{if(a==4){return"Caminhão"}else{if(a==5){return"Barco"}else{if(a==6){return"Helicoptero"}else{return"Avião"}}}}}}}}function ClientError(){this.Data;this.Namespace;this.ExplicitOriginalTarget;this.Message;this.Method;this.JSONData;this.UserBrowser=navigator.userAgent;this.PointOfSale;this.GetRequest=function(){try{if(CurrentPointOfSale!=undefined){this.PointOfSale=CurrentPointOfSale}}catch(a){return}return{Data:this.Data,Namespace:this.Namespace,ExplicitOriginalTarget:this.ExplicitOriginalTarget,Message:this.Message,Method:this.Method,JSONData:this.JSONData,UserBrowser:this.UserBrowser,PointOfSale:this.PointOfSale}}}this.PublishStringClientError=function(a){var b=new ClientError();if(typeof a=="string"){b.Data=a}else{if(a.name=="InternalError"){b.Data=a.message}else{b.Data=a.message+" - "+a.stack}}SendClientError(b)};this.SendClientError=function(c){var a=c.GetRequest();var d=18000000;var b=new ServiceProxy(PathWebService);b.invoke("Log",{req:a},undefined,undefined,undefined,d)};function CheckMaxValueToField(b,a){return(b<=a)}function ValidatePhoneNumber(c,b){var a=null;switch(b){case PhoneType.Comercial:case PhoneType.Residencial:a=/^[0-5]/;break;case PhoneType.Celular:a=/^[6-9]/;break;default:return false}return a.test(c)}var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(g){var d="";var m,e,k,c,h,b,f;var a=0;g=Base64._utf8_encode(g);while(a<g.length){m=g.charCodeAt(a++);e=g.charCodeAt(a++);k=g.charCodeAt(a++);c=m>>2;h=((m&3)<<4)|(e>>4);b=((e&15)<<2)|(k>>6);f=k&63;if(isNaN(e)){b=f=64}else{if(isNaN(k)){f=64}}d=d+this._keyStr.charAt(c)+this._keyStr.charAt(h)+this._keyStr.charAt(b)+this._keyStr.charAt(f)}return d},decode:function(g){var d="";var m,e,k;var c,h,b,f;var a=0;g=g.replace(/[^A-Za-z0-9\+\/\=]/g,"");while(a<g.length){c=this._keyStr.indexOf(g.charAt(a++));h=this._keyStr.indexOf(g.charAt(a++));b=this._keyStr.indexOf(g.charAt(a++));f=this._keyStr.indexOf(g.charAt(a++));m=(c<<2)|(h>>4);e=((h&15)<<4)|(b>>2);k=((b&3)<<6)|f;d=d+String.fromCharCode(m);if(b!=64){d=d+String.fromCharCode(e)}if(f!=64){d=d+String.fromCharCode(k)}}d=Base64._utf8_decode(d);return d},_utf8_encode:function(b){b=b.replace(/\r\n/g,"\n");var d="";for(var a=0;a<b.length;a++){var e=b.charCodeAt(a);if(e<128){d+=String.fromCharCode(e)}else{if((e>127)&&(e<2048)){d+=String.fromCharCode((e>>6)|192);d+=String.fromCharCode((e&63)|128)}else{d+=String.fromCharCode((e>>12)|224);d+=String.fromCharCode(((e>>6)&63)|128);d+=String.fromCharCode((e&63)|128)}}}return d},_utf8_decode:function(b){var a="";var e=0;var d=c1=c2=0;while(e<b.length){d=b.charCodeAt(e);if(d<128){a+=String.fromCharCode(d);e++}else{if((d>191)&&(d<224)){c2=b.charCodeAt(e+1);a+=String.fromCharCode(((d&31)<<6)|(c2&63));e+=2}else{c2=b.charCodeAt(e+1);c3=b.charCodeAt(e+2);a+=String.fromCharCode(((d&15)<<12)|((c2&63)<<6)|(c3&63));e+=3}}}return a}};var Cookies={setCookie:function(d,a,b){var c=new Date();c.setDate(c.getDate()+b);document.cookie=d+"="+escape(a)+((b==null)?"":";expires="+c.toUTCString())},getCookie:function(a){if(document.cookie.length>0){c_start=document.cookie.indexOf(a+"=");if(c_start!=-1){c_start=c_start+a.length+1;c_end=document.cookie.indexOf(";",c_start);if(c_end==-1){c_end=document.cookie.length}return unescape(document.cookie.substring(c_start,c_end))}}return""},clearCookie:function(a){this.setCookie(a,"",-10)},checkCookie:function(a){cook=this.getCookie(a);return cook!=null&&cook!=""},getCookieObject:function(a){strCook=this.getCookie(a);p_start=strCook.toUpperCase().indexOf("JSON=");p_end=strCook.indexOf(";",p_start);if(p_end==-1){p_end=strCook.length}var b=strCook.substring((p_start+5),p_end);return $.evalJSON(b)}};function isCCInternational(b){if(BinCCInternacional!=undefined){for(var d=0,a=BinCCInternacional.length;d<a;d++){var c=BinCCInternacional[d].toString().length;if(b.length<c){return false}else{if(BinCCInternacional[d]==b.substring(0,c)){return true}}}}return false}function CreateStarsTypes(c){var b=["silver","silver","silver","silver","silver"];var a=0;for(a;a<c;a++){b[a]="gold"}if(c<a){b[a-1]="half"}return b}function SetLocationName(a){var b=a.FullName;if(a.RegionCode&&a.RegionCode!=""){b+=" / "+a.RegionCode}if(a.Country&&a.Country!=""){b+=", "+a.Country}return b}function AdjustIATA(a){return a.replaceAll("---",")").replaceAll("--","(")}function SetLocationNameWithIATA(a){var b=a.FullName;if(a.RegionCode&&a.RegionCode!=""){b+=" / "+a.RegionCode}if(a.Country&&a.Country!=""){b+=", "+a.Country}if(a.IATA&&trim(a.IATA)!=""){b+=" ("+a.IATA+")"}return b}var Sources={None:0,Amadeus:1,Sabre:2,Tam:3,Gol:4,Team:5,OceanAir:6,WebJet:7,Total:8,Trip:9,Passaredo:10,AirMinas:11,TAF:12,Rico:13,Sete:14,NHT:15,Pantanal:16,AeroStar:17,Azul:18,Sol:19,H2W:20,Tourico:21,Travel:22,Trend:23,HotelBeds:25,"0":"None","1":"Amadeus","2":"Sabre","3":"Tam","4":"Gol","5":"Team","6":"OceanAir","7":"WebJet","8":"Total","9":"Trip","10":"Passaredo","11":"AirMinas","12":"TAF","13":"Rico","14":"Sete","15":"NHT","16":"Pantanal","17":"AeroStar","18":"Azul","19":"Sol","20":"H2W","21":"Tourico","22":"Travel","23":"Trend","25":"HotelBeds"};window.onerror=function(c,b,a){var d=new ClientError();if(typeof c=="string"){d.Data=c+" - "+a+" - "+b}else{d.Data=c.message+" - "+c.stack}SendClientError(d);return true};String.prototype.startsWith=function(a){return(this.match("^"+a)==a)};String.prototype.endsWith=function(a){return(this.match(a+"$")==a)};Array.prototype.isEmpty=function(){return this.length==0};Array.prototype.join=function(a){var c=this.length;var d="";if(c>0){d=this[0];for(var b=1;b<c;b++){d+=a+this[b]}}return d};Array.prototype.where=function(b){var d=[];for(var c=0,a=this.length;c<a;c++){if(b(this[c])){d.push(this[c])}}return d};Array.prototype.select=function(b){var d=[];for(var c=0,a=this.length;c<a;c++){d.push(b(this[c]))}return d};Array.prototype.first=function(b){for(var c=0,a=this.length;c<a;c++){if(b(this[c])){return this[c]}}return undefined};Array.prototype.distinct=function(){var b={};var d=[];for(var c=0,a=this.length;c<a;c++){if(!b[this[c]]){b[this[c]]=true;d.push(this[c])}}return d};Array.prototype.forEach=function(c){for(var b=0,a=this.length;b<a;b++){c(this[b],b)}};Array.prototype.count=function(c){var a=0;for(var d=0,b=this.length;d<b;d++){if(c(this[d])){a++}}return a};String.prototype.RemoveDiacritics=function(){var h="áàãââÁÀÃÂéêÉÊíÍóõôÓÔÕúüÚÜçÇabcdefghijklmnopqrstuvxwyzABCDEFGHIJKLMNOPQRSTUVXWYZñò";var f="aaaaaAAAAeeEEiIoooOOOuuUUcCabcdefghijklmnopqrstuvxwyzABCDEFGHIJKLMNOPQRSTUVXWYZno";var c,e;var b="";var d=this;for(var a=0,g=this.length;a<g;a++){e=d.charAt(a);c=h.indexOf(e);b+=c>-1?f.charAt(c):e}return b};Array.prototype.binarySearch=function binarySearch(f,a){var e=0,b=this.length-1,c,d;var g=-1;while(e<=b){c=parseInt((e+b)/2,10);d=a(this[c],f);if(d>0){e=c+1}else{if(d<0){b=c-1}else{g=c;break}}}if(g<0){g=undefined}return g};Array.prototype.any=function(c){var d=typeof c=="function"?c:function(e){return e==c};for(var b=0,a=this.length;b<a;b++){if(d(this[b])){return true}}return false};Array.prototype.orderBy=function(c){var a=this.length;if(a>=2){for(var d=0;d<a;d++){for(var e=0;e<a;e++){if(c(this[d])<c(this[e])){var b=this[d];this[d]=this[e];this[e]=b}}}}};Array.prototype.clearUndefined=function(){for(var a=0;a<this.length;a++){if(this[a]==undefined){this.remove(a);a--}}return false};Array.prototype.clearStringEmpty=function(){for(var a=0;a<this.length;a++){if(this[a]==""||this[a]==null||this[a]==undefined){this.remove(a);a--}}return false};Array.prototype.min=function(){var a=undefined;for(var c=0,b=this.length;c<b;c++){if(!a||this[c]<a){a=this[c]}}return !a?0:a};Array.prototype.max=function(){var a=undefined;for(var b=0;b<this.length;b++){if(!a||this[b]>a){a=this[b]}}return !a?0:a};Array.prototype.sum=function(c){if(c==undefined){c=function(d){return d}}var a=0;for(var b=0;b<this.length;b++){a+=c(this[b])}return a};Array.prototype.removeAll=function(a){var c=[];for(var b=0;b<this.length;b++){if(!a(this[b])){c.push(this[b])}}return c};function GenderCodeToGenderString(a){switch(parseInt(a)){case Gender.Masculino:return"Masculino";case Gender.Feminino:return"Feminino"}}function PaxTypeCodeToPaxTypeString(a){switch(a){case PaxType.Adulto:return"Adulto";case PaxType.Crianca:return"Criança";case PaxType.Bebe:return"Bebê"}}function CabinTypeCodeToCabinTypeString(a){switch(a){case CabinType.PrimeiraClasse:return"Primeira Classe";case CabinType.Executiva:return"Executiva";case CabinType.Economica:return"Economica"}}function GetCCExpireDateFromDate(a){return a.format("MM/yyyy")}function ArrToString(a){var c="";for(var b in a){c+=a[b]}return c}function isValidDate(f,a){if(!a){var d=2;var e=1;var b=3}else{a=a.toLowerCase().replace(/[^dmy]/g,"");var e=a.indexOf("d")+1;var d=a.indexOf("m")+1;var b=a.indexOf("y")+1}var c=f.match(/^\b(\d+)\D(\d+)\D(\d+)\b\b(?:\s+(\d{1,2})\D(\d{2})\D*((\d{2})?))?\b$/);if(!c){return false}c.clearUndefined();c.clearStringEmpty();if(!checkDate(c[e],c[d],c[b])){return false}else{return true}}function checkDate(d,c,b){var a=/^(19|20)\d\d-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/;if(!a.test(b+"-"+c+"-"+d)){return false}if(d==31&&(/^0?[469]$/.test(c)||c==11)){return false}else{if(d>=30&&c==2){return false}else{if(c==2&&d==29&&!(b%4==0&&(b%100!=0||b%400==0))){return false}else{return true}}}}function checkTime(c,a,b){if(!b){b="00"}var d=/^(0?\d|1\d|2[0-3]):[0-5]?\d:[0-5]?\d$/;return d.test(c+":"+a+":"+b)}String.prototype.ReplaceStringMessage=function(a){if(a=="BRADESCO"){this.replaceAll("compra","resgate");this.replaceAll("reais","pontos");this.replaceAll("Problemas de processamento","Ocorreu um erro no processamento de seu resgate. Por favor refaça sua busca em alguns minutos.")}};String.prototype.ReplaceHyphens=function(){return this.replaceAll("---",")").replaceAll("--","(")};function verificarDataPesquisaVoo(a){if(a.value!=""){if(isValidDate(a.value)){adjustDate(a);AirMotorUC.SearchRules(a)}else{a.value=""}}};

