var mostrarAviso=true;function DoSubmit(b,g,s,o){var p=true;if((document.tripPlanForm!=null||document.purchaseForm!=null)&&mostrarAviso){p=avisoCancelacion(o)}mostrarAviso=true;if(p){if(b!=null){if(g!=null){var h=g.indexOf("?");if(h!=-1){var n=g.length;var m=g.substring(0,h);var q=g.substring(h+1,n);arrayOfStrings=q.split("&");g=m;for(var l=0;l<arrayOfStrings.length;l++){var c=arrayOfStrings[l];var d=c.length;var f=c.indexOf("=");if(f!=-1){var r=c.substring(0,f);var e=c.substring(f+1,d);b[r].value=e}}}b.action=g}if(s!=null){for(var a in s){if(b[a]){b[a].value=s[a]}}}if(o){b.target=o}else{b.target="_top"}if(o!="_blank"){loginEnviado=1}b.submit()}}}function avisoCancelacion(b){var a=true;if(b!="_blank"){if(document.tripPlanForm!=null&&document.tripPlanForm.cancelRe!=null&&document.tripPlanForm.cancelRe.value=="0"){if(!confirm(document.tripPlanForm.msjError.value)){a=false;loginEnviado=0}}if(document.purchaseForm!=null&&document.purchaseForm.cancelRe!=null&&document.purchaseForm.cancelRe.value=="0"){if(!confirm(document.purchaseForm.msjError.value)){a=false;loginEnviado=0}}}return a}function DoRedirectSubmit(a,g,f,s){if(a!=null){if(g!=null){var l=g.indexOf("?");if(l!=-1){var b=g.length;var o=g.substring(0,l);var d=g.substring(l+1,b);arrayOfStrings=d.split("&");g=o;for(var m=0;m<arrayOfStrings.length;m++){var r=arrayOfStrings[m];var e=r.length;var h=r.indexOf("=");if(h!=-1){var p=r.substring(0,h);var c=r.substring(h+1,e);a[p].value=c}}}var n=g.lastIndexOf("/");var q=g.substring(0,n);var t=g.substring(n,g.length);a.redirectPage.value=t;a.action=q+"/jsp/common/redirect.jsp"}if(f!=null){for(var u in f){if(a[u]){a[u].value=f[u]}}}if(s){a.target=s}else{a.target="_top"}a.submit()}}function OpenWindow(href,name,width,height,attrs){if(width==null){width=800}if(height==null){height=600}var left=(screen.width-width)/2;var top=(screen.height-height-100)/2;if(left<0){left=0}if(top<0){top=0}if(attrs==null){attrs="scrollbars=yes,status=yes,resizable=yes,toolbar=no,location=no,menu=no"}var totalAttrs="height="+height+",width="+width+","+attrs;var popup=eval('window.open("'+href+'", "'+name+'","'+totalAttrs+'")')}function OpenWindowSubmit(c,e,l,f,d,h,k,j){mostrarAviso=false;if(e==null){e=800}if(l==null){l=600}if(f==null){f="scrollbars=yes,status=yes,resizable=yes,toolbar=no,location=no,menu=no"}var g;var i;if(j==null){j=false}if(j){g=10000;i=10000}else{g=(screen.width-e)/2;i=(screen.height-l-100)/2}if(g<0){g=0}if(i<0){i=0}var b=document.URL.substring(0,document.URL.indexOf(":"));document.cookie="modo="+b;if(b=="http"){var a=window.open("",c,"height="+l+",width="+e+",top="+i+",left="+g+","+f)}else{var a=window.open(h,c,"height="+l+",width="+e+",top="+i+",left="+g+","+f)}DoSubmit(d,h,k,c)}var loginEnviado=0;var formIBCAPS_enviado=0;var loginIBLOGN_enviado=0;var IPPURC_enviado=0;function inicializar(){if(esPrivada==0){var a=document.getElementById("lLogin");a.style.visibility="hidden"}leftNav()}function addBookmark(b,c,a){if(window.sidebar&&window.sidebar.addPanel){alert(c);window.sidebar.addPanel(document.title,b,"")}else{if(window.external){window.external.AddFavorite(b,document.title)}else{alert(a)}}}function Abrir_Ventana(c,a,b){window.open(c,a,b)}function imprimir(a){txt=document.getElementById(a).innerHTML;ventanaImp=window.open("/ibcomv3/js/common/listadoImpresion.htm","","toolbar=0, location=0, directories=0, status=0, menubar=0, scrollbars=1, resizable=si, left=3000,top=10, width=780, height=400");ventanaImp.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>Listado</title><link href="/ibcomv3/estilos/estilos.css" rel="stylesheet" type="text/css"></head><body onload="imprimir2()">');ventanaImp.document.write(txt);ventanaImp.document.write("<script>function imprimir2(){window.print();window.close();}<\/script>");ventanaImp.document.write("</body></html>");ventanaImp.document.close()}function GoToPopupURL(a){window.open(a,"ventanaURL")}function mostrarAvisoCancelacion(){var b=true;var a=true;if((document.tripPlanForm!=null||document.purchaseForm!=null)&&b){a=avisoCancelacion(null)}return a}function DoSubmitPOINTSBegin(){if(document.getElementById("arriba")!=null){document.getElementById("arriba").style.display="none"}if(document.getElementById("btpointsIFrameDiv")!=null){document.getElementById("btpointsIFrameDiv").className="";document.getElementById("btpointsIFrameDiv").style.display=""}}var Claims={init:function(){var b=document.getElementById("communicationType");ev.addEvent(b,"change",function(){Claims.select.check(b.value)},false);var a=document.getElementById("otherCommunicationType");ev.addEvent(a,"change",function(){Claims.details.check(a.value)},false)},select:{check:function(a){if(a=="otros"||a=="-1"){Claims.select.show("lbl_OtherCommunicationType")}else{Claims.select.hide("lbl_OtherCommunicationType")}},show:function(a){if(document.getElementById(a).className=="invisible"){document.getElementById(a).className=""}},hide:function(a){if(document.getElementById(a).className!="invisible"){document.getElementById(a).className="invisible"}Claims.details.init()}},details:{init:function(){document.getElementById("otherCommunicationType").options.selectedIndex=0;Claims.details.hide()},check:function(a){if(a==""){Claims.details.hide()}else{Claims.details.show(a)}},show:function(d){var c=document.createElement("a");c.href="#";c.className="cerrar";c.title="";c.appendChild(document.createTextNode(strClose));ev.addEvent(c,"click",function(){Claims.details.hide();return false},false);document.getElementById("wrapDetails").className=document.getElementById("wrapDetails").className.replace(/invisible/i," ");var b=d.substring(1);Claims.details.hideAll();var a=document.getElementById(b);a.className="";a.appendChild(c)},hide:function(){document.getElementById("wrapDetails").className+=" invisible";Claims.details.hideAll()},hideAll:function(){var c=document.getElementById("otherCommunicationType").length;for(var b=0;b<c;b++){var d=document.getElementById("otherCommunicationType").options[b].value;if(d!=""){var a=d.substring(1);document.getElementById(a).className="invisible"}}}}};
