/*** JS: media/javascript/script_global.js ***/
/*** JS: media/javascript/swfobject.js ***/

function changeContentsHeight(){try{delta=document.getElementById('supportUserContentConfig').offsetHeight;document.getElementById('supportUserContainer').style.height=delta+"px";alpha=document.getElementById('contentColumnContainerConfig').offsetHeight;document.getElementById('contentColumnContainer').style.height=alpha+"px";}catch(err){}
if(document.getElementById('userCardPic'))
document.getElementById('userCardPic').style.visibility='visible';if(!document.getElementById('footerContentContainer')||document.getElementById('footerContentContainer').style.visibility!='visible')
document.getElementById('footerContentContainer').style.visibility='visible';}
var c=0;var t=0;var l=0;var k=0;function hideSubMenu(){stopCount();try{hideQuickLinks();document.getElementById('headerMainSubNavigationTopCorporate').style.display='none';document.getElementById('headerMainSubNavigationFlyCorporate').style.display='none';document.getElementById('headerMainSubNavigationMundoTap').style.display='none';document.getElementById('headerMainSubNavigationNovidades').style.display='none';document.getElementById('headerMainSubNavigationProdutosTap').style.display='none';}catch(err){}}
function showSubMenu(whichElement){stopCount();hideSubMenu();var delta=document.getElementById(whichElement);delta.style.display='block';}
function timedCount(){c++
t=window.setTimeout("timedCount()",50)
if(c==2){hideSubMenu();hideQuickLinks();}}
function stopCount(){c=0;clearTimeout(t)}
function timedSuperCount(){l++
k=window.setTimeout("timedSuperCount()",80)
if(l==8){hideQuickLinks();}}
function stopSuperCount(){l=0;clearTimeout(k)}
function enableCalendarMonth(whichTop,whichRight){document.getElementById('calendarsContainer').style.display='block';document.getElementById('calendarsContainer').style.top=whichTop+'px';document.getElementById('calendarsContainer').style.right=whichRight+'px';}
function disableCalendarMonth(){document.getElementById('calendarsContainer').style.display='none';}
function resetEngineTab(whichLang){disableCalendarMonth();document.getElementById('engine_tab_bt_flight').src='../../'+whichLang+'/images/global/engine_tab_bt_flight_off.png';document.getElementById('engine_tab_bt_flight_and_hotel').src='../../'+whichLang+'/images/global/engine_tab_bt_flight_and_hotel_off.png';document.getElementById('engine_tab_bt_hotel').src='../../'+whichLang+'/images/global/engine_tab_bt_hotel_off.png';document.getElementById('engine_tab_bt_rentacar').src='../../'+whichLang+'/images/global/engine_tab_bt_rentacar_off.png';document.getElementById('engine_tab_bt_insurance').src='../../'+whichLang+'/images/global/engine_tab_bt_insurance_off.png';document.getElementById('fieldsFlight').style.display='none';document.getElementById('fieldsFlightHotel').style.display='none';document.getElementById('fieldsHotel').style.display='none';document.getElementById('fieldsRentCar').style.display='none';document.getElementById('fieldsInsurrance').style.display='none';}
function changeEngineTab(whichElement,whichLang){resetEngineTab(whichLang);if(whichElement=='flight'){document.getElementById('engine_tab_bt_flight').src='../../'+whichLang+'/images/global/engine_tab_bt_flight_on.png';document.getElementById('fieldsFlight').style.display='block';}
if(whichElement=='flight_hotel'){document.getElementById('engine_tab_bt_flight_and_hotel').src='../../'+whichLang+'/images/global/engine_tab_bt_flight_and_hotel_on.png';document.getElementById('fieldsFlightHotel').style.display='block';}
if(whichElement=='hotel'){document.getElementById('engine_tab_bt_hotel').src='../../'+whichLang+'/images/global/engine_tab_bt_hotel_on.png';document.getElementById('fieldsHotel').style.display='block';}
if(whichElement=='rent_car'){document.getElementById('engine_tab_bt_rentacar').src='../../'+whichLang+'/images/global/engine_tab_bt_rentacar_on.png';document.getElementById('fieldsRentCar').style.display='block';}
if(whichElement=='insurance'){document.getElementById('engine_tab_bt_insurance').src='../../'+whichLang+'/images/global/engine_tab_bt_insurance_on.png';document.getElementById('fieldsInsurrance').style.display='block';}}
function showHideElement(whichElement){delta=document.getElementById(whichElement);if(delta.style.display=='none'|delta.style.display==''){delta.style.display='block';changeContentsHeight();}else{delta.style.display='none';changeContentsHeight();}}
function hideElement(whichElement){delta=document.getElementById(whichElement);delta.style.display='none';changeContentsHeight();}
function resetClaimFlight(whichElement){try{for(i=1;i<=10;i++){document.getElementById('flightTapContainer'+i).style.display='none';}}catch(err){}
try{for(i=1;i<=10;i++){document.getElementById('claimBtContainer'+i).style.display='none';}}catch(err){}
try{for(i=1;i<=10;i++){document.getElementById('addFlightTap'+i).style.display='none';}}catch(err){}
try{for(i=1;i<=10;i++){document.getElementById('removeFlightTap'+i).style.display='none';}}catch(err){}}
function addClaimFlight(whichElement){resetClaimFlight();if(whichElement=='addFlightTap1'){document.getElementById('flightTapContainer1').style.display='block';document.getElementById('flightTapContainer2').style.display='block';document.getElementById('claimBtContainer2').style.display='block';document.getElementById('addFlightTap2').style.display='block';document.getElementById('removeFlightTap2').style.display='block';}
if(whichElement=='removeFlightTap2'){document.getElementById('flightTapContainer1').style.display='block';document.getElementById('claimBtContainer1').style.display='block';document.getElementById('addFlightTap1').style.display='block';}
changeContentsHeight();}
function activePartner(){document.getElementById('fldPartner').disabled=false;}
function activePartnerSelect(){document.getElementById('partnerSelectHotels').style.display='block';changeContentsHeight();}
function applyFilter(){document.getElementById('fldsHoteis').style.display='block';document.getElementById('fldsComuns').style.display='block';document.getElementById('actionBtMarketing').style.display='block';changeContentsHeight();}
function showHideCreditCard(whichElement,whichLink){delta=document.getElementById(whichElement);if(delta.style.display=='none'|delta==''){delta.style.display='block';document.getElementById(whichLink).innerHTML='Fechar Ajuda';changeContentsHeight();}else{delta.style.display='none';document.getElementById(whichLink).innerHTML='Onde se encontra o código no seu cartão?';changeContentsHeight();}}
function showHideBoardingPass(whichElement,whichLink){delta=document.getElementById(whichElement);if(delta.style.display=='none'|delta==''){delta.style.display='block';document.getElementById(whichLink).innerHTML='Fechar Ajuda';changeContentsHeight();}else{delta.style.display='none';if(whichLink=='boardingPassLinkVoo'){document.getElementById(whichLink).innerHTML='Onde se encontra o Número do Voo?';}
if(whichLink=='boardingPassLinkLugar'){document.getElementById(whichLink).innerHTML='Onde se encontra o Número do Lugar?';}
changeContentsHeight();}}
function detectActivity(whichActivity){if(whichActivity=='OTHER'){document.getElementById('fldActividade').style.display='none';document.getElementById('fldOutraActividade').style.display='block';}else{document.getElementById('fldActividade').style.display='block';document.getElementById('fldOutraActividade').style.display='none';}}
function showFormFieldEmpresa(whichFields){if(whichFields=='Empresa'){document.getElementById('optionFieldsEmpresa').style.display='block';}else{document.getElementById('optionFieldsEmpresa').style.display='none';}
changeContentsHeight();}
function showFormFormatoInfo(whichStatus){document.getElementById('fldFormatoEmail').style.display='none';if(whichStatus){document.getElementById('fldFormatoEmail').style.display='block';}else{document.getElementById('fldFormatoEmail').style.display='none';}
changeContentsHeight();}
function showFormSmsAlert(whichStatus){document.getElementById('smsNote').style.visibility='hidden';if(whichStatus){document.getElementById('smsNote').style.visibility='visible';}else{document.getElementById('smsNote').style.visibility='hidden';}
changeContentsHeight();}
function hideAllVariableFields(){try{for(i=1;i<=100;i++){document.getElementById('fldPT'+i).style.display='none';}}catch(err){}
try{for(k=1;k<=100;k++){document.getElementById('fldBR'+k).style.display='none';}}catch(err){}}
function showPTFields(){hideAllVariableFields();try{for(i=1;i<=100;i++){document.getElementById('fldPT'+i).style.display='block';}}catch(err){}
changeContentsHeight();}
function showBRFields(){hideAllVariableFields();try{for(i=1;i<=100;i++){document.getElementById('fldBR'+i).style.display='block';}}catch(err){}
changeContentsHeight();}
function showOtherFields(){hideAllVariableFields();try{for(i=1;i<=100;i++){document.getElementById('fldOTHER'+i).style.display='block';}}catch(err){}
changeContentsHeight();}
function detectNationality(whichNationality){if(whichNationality=='PT'){showPTFields();}
if(whichNationality=='BR'){showBRFields();}
if(whichNationality=='US'){showBRFields();}
if(whichNationality=='CN'){showBRFields();}
if(whichNationality=='OTHER'){showOtherFields();}}
function refreshTotalAmout(whichAmout){try{document.getElementById('totalCostMiles').innerHTML=whichAmout;}catch(err){}}
function refreshCurrency(whichCurrency){try{document.getElementById('totalCurrency').innerHTML=whichCurrency;}catch(err){}}
function refreshTransferTotalAmout(whichAmout){try{document.getElementById('totalTransferCostMiles').innerHTML=whichAmout;}catch(err){}}
function refreshTransferCurrency(whichCurrency){try{document.getElementById('totalTransferCurrency').innerHTML=whichCurrency;}catch(err){}}
function refreshExtendTotalAmout(whichAmout){try{document.getElementById('totalExtendCostMiles').innerHTML=whichAmout;}catch(err){}}
function refreshExtendCurrency(whichCurrency){try{document.getElementById('totalExtendCurrency').innerHTML=whichCurrency;}catch(err){}}
function refreshUseCondition(whichAmout){try{document.getElementById('useConditionsCalculatorResult').innerHTML=whichAmout;}catch(err){}}
function showEmptyArea(){document.getElementById('emptyArea').style.display='block';}
function resetTabsContent(){try{document.getElementById('divTabContent01').style.display='none';document.getElementById('tab01').className='tab01';document.getElementById('divTabContent02').style.display='none';document.getElementById('tab02').className='tab02';document.getElementById('divTabContent03').style.display='none';document.getElementById('tab03').className='tab03';document.getElementById('divTabContent04').style.display='none';document.getElementById('tab04').className='tab04';document.getElementById('divTabContent05').style.display='none';document.getElementById('tab05').className='tab05';document.getElementById('emptyArea').style.display='none';}catch(err){}}
function changeTabsContent(whichForm){resetTabsContent();if(whichForm=='tab01'){document.getElementById('divTabContent01').style.display='block';document.getElementById('tab01').className='tab01Active';changeContentsHeight();}
if(whichForm=='tab02'){document.getElementById('divTabContent02').style.display='block';document.getElementById('tab01').className='tab01Disable';document.getElementById('tab02').className='tab02Active';changeContentsHeight();}
if(whichForm=='tab03'){document.getElementById('divTabContent03').style.display='block';document.getElementById('tab02').className='tab02Disable';document.getElementById('tab03').className='tab03Active';changeContentsHeight();}
if(whichForm=='tab04'){document.getElementById('divTabContent04').style.display='block';document.getElementById('tab03').className='tab03Disable';document.getElementById('tab04').className='tab04Active';changeContentsHeight();}
if(whichForm=='tab05'){document.getElementById('divTabContent05').style.display='block';document.getElementById('tab04').className='tab04Disable';document.getElementById('tab05').className='tab05Active';changeContentsHeight();}}
function resetStepsContainers(){try{for(i=1;i<=4;i++){document.getElementById('divTabContent01Step0'+i).style.display='none';}}catch(err){}
try{for(i=1;i<=4;i++){document.getElementById('divTabContent02Step0'+i).style.display='none';}}catch(err){}
try{for(i=1;i<=4;i++){document.getElementById('divTabContent03Step0'+i).style.display='none';}}catch(err){}
try{for(i=1;i<=4;i++){document.getElementById('divTabContent04Step0'+i).style.display='none';}}catch(err){}
try{for(i=1;i<=4;i++){document.getElementById('divTabContent05Step0'+i).style.display='none';}}catch(err){}}
function activeStepContainer(whichStep){resetStepsContainers();document.getElementById(whichStep).style.display='block';changeContentsHeight();}
function resetPinNumber(){document.getElementById('fldCodPinPassword').style.display='none';document.getElementById('fldCodPinConfirmPassword').style.display='none';document.getElementById('fldCodPinText').style.display='none';document.getElementById('fldCodPinConfirmText').style.display='none';}
function copyPinNumberValue(){document.getElementById('fldCodPinText').value=document.getElementById('fldCodPinPassword').value;document.getElementById('fldCodPinConfirmText').value=document.getElementById('fldCodPinConfirmPassword').value;}
function showPinNumber(){statusBt=document.getElementById('showPinBt').innerHTML;resetPinNumber();copyPinNumberValue();if(statusBt=='Show PIN'){document.getElementById('fldCodPinPassword').style.display='none';document.getElementById('fldCodPinConfirmPassword').style.display='none';document.getElementById('fldCodPinText').style.display='block';document.getElementById('fldCodPinConfirmText').style.display='block';document.getElementById('showPinBt').innerHTML='Hide PIN';changeContentsHeight();}else{document.getElementById('fldCodPinPassword').style.display='block';document.getElementById('fldCodPinConfirmPassword').style.display='block';document.getElementById('fldCodPinText').style.display='none';document.getElementById('fldCodPinConfirmText').style.display='none';document.getElementById('showPinBt').innerHTML='Show PIN';try{document.getElementById('savePinOptions').style.display='none';}catch(err){}
changeContentsHeight();}}
function changePinNumber(){resetPinNumber();document.getElementById('fldCodPinPassword').style.display='none';document.getElementById('fldCodPinConfirmPassword').style.display='none';document.getElementById('fldCodPinText').style.display='block';document.getElementById('fldCodPinConfirmText').style.display='block';document.getElementById('savePinOptions').style.display='block';document.getElementById('fldCodPinText').value='';document.getElementById('fldCodPinConfirmText').value='';changeContentsHeight();}
function savePinNumber(){document.getElementById('fldCodPinPassword').style.display='block';document.getElementById('fldCodPinConfirmPassword').style.display='block';document.getElementById('fldCodPinText').style.display='none';document.getElementById('fldCodPinConfirmText').style.display='none';document.getElementById('savePinOptions').style.display='none';changeContentsHeight();}
function showAnswers(whichDiv){delta=document.getElementById('answer'+whichDiv);if(delta.style.display=='none'||delta.style.display==''){try{for(i=1;i<=100;i++){document.getElementById('answer'+i).style.display='none';}}catch(err){}
delta.style.display='block';}else{delta.style.display='none';}
changeContentsHeight();}
function hideQuickLinks(){stopCount();document.getElementById('quickLinksContent').style.display='none';document.getElementById('quickLinksContentBg').style.display='none';document.getElementById('headerNavigationQuickLinksContainer').style.height='38px';}
function showQuickLinks(){stopCount();hideSubMenu();document.getElementById('quickLinksContent').style.display='block';document.getElementById('quickLinksContentBg').style.display='block';omega=document.getElementById('quickLinksContent').offsetHeight;document.getElementById('quickLinksContentBg').style.height=omega+"px";document.getElementById('headerNavigationQuickLinksContainer').style.height=omega+38+"px";}
var numTotalImagens="";function validateMainContentImage(){if(numTotalImagens<=1){document.getElementById('allThumbContainer').style.display='none';}}
function resetPhotoDesc(){try{document.getElementById('mainContentDesc01').style.display='none';}catch(err){}
try{document.getElementById('mainContentDesc02').style.display='none';}catch(err){}
try{document.getElementById('mainContentDesc03').style.display='none';}catch(err){}
try{document.getElementById('mainContentDesc04').style.display='none';}catch(err){}}
function showPhotoDesc(whichDesc){resetPhotoDesc();document.getElementById(whichDesc).style.display='block';changeContentsHeight();}
function changeMainContentImage(whichImage,whichSrc,whichDesc){if(whichDesc!='none'){showPhotoDesc(whichDesc);}else{resetPhotoDesc();}
for(i=1;i<=numTotalImagens;i++){document.getElementById('linkConfig0'+i).className='mainContentThumbConfig';}
if(whichImage=="linkConfig01"){document.getElementById('linkConfig01').className='mainContentThumbConfigActive';document.getElementById('mainContentImgReplace').src=whichSrc;}
if(whichImage=="linkConfig02"){document.getElementById('linkConfig02').className='mainContentThumbConfigActive';document.getElementById('mainContentImgReplace').src=whichSrc;}
if(whichImage=="linkConfig03"){document.getElementById('linkConfig03').className='mainContentThumbConfigActive';document.getElementById('mainContentImgReplace').src=whichSrc;}
if(whichImage=="linkConfig04"){document.getElementById('linkConfig04').className='mainContentThumbConfigActive';document.getElementById('mainContentImgReplace').src=whichSrc;}
if(whichImage=="linkConfig05"){document.getElementById('linkConfig05').className='mainContentThumbConfigActive';document.getElementById('mainContentImgReplace').src=whichSrc;}}
try{document.execCommand("BackgroundImageCache",false,true);}
catch(err){}
if(typeof deconcept=="undefined"){var deconcept=new Object();}
if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}
if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}
deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){if(!document.getElementById){return;}
this.DETECT_KEY=_b?_b:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}
if(id){this.setAttribute("id",id);}
if(w){this.setAttribute("width",w);}
if(h){this.setAttribute("height",h);}
if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}
this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(c){this.addParam("bgcolor",c);}
var q=_8?_8:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",_7);this.setAttribute("doExpressInstall",false);var _d=(_9)?_9:window.location;this.setAttribute("xiRedirectUrl",_d);this.setAttribute("redirectUrl","");if(_a){this.setAttribute("redirectUrl",_a);}};deconcept.SWFObject.prototype={setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16.push(key+"="+_18[key]);}
return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");}
_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=key+"=\""+_1a[key]+"\" ";}
var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}
_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");}
_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}
var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}
_19+="</object>";}
return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}
if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}
return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}
catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}
catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}
catch(e){}}
if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}
return _23;};deconcept.PlayerVersion=function(_27){this.major=_27[0]!=null?parseInt(_27[0]):0;this.minor=_27[1]!=null?parseInt(_27[1]):0;this.rev=_27[2]!=null?parseInt(_27[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}
if(this.major>fv.major){return true;}
if(this.minor<fv.minor){return false;}
if(this.minor>fv.minor){return true;}
if(this.rev<fv.rev){return false;}
return true;};deconcept.util={getRequestParameter:function(_29){var q=document.location.search||document.location.hash;if(q){var _2b=q.substring(1).split("&");for(var i=0;i<_2b.length;i++){if(_2b[i].substring(0,_2b[i].indexOf("="))==_29){return _2b[i].substring((_2b[i].indexOf("=")+1));}}}
return"";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2d=document.getElementsByTagName("OBJECT");for(var i=0;i<_2d.length;i++){_2d[i].style.display="none";for(var x in _2d[i]){if(typeof _2d[i][x]=="function"){_2d[i][x]=null;}}}};if(typeof window.onunload=="function"){var oldunload=window.onunload;window.onunload=function(){deconcept.SWFObjectUtil.cleanupSWFs();oldunload();};}else{window.onunload=deconcept.SWFObjectUtil.cleanupSWFs;}
if(Array.prototype.push==null){Array.prototype.push=function(_30){this[this.length]=_30;return this.length;};}
var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;