var alertIB={data:{content:"",returnFunction:function(){},acceptBtn:"Ok",cancelBtn:"",alertType:1},create:function(d,c,b,e,a){if(d!=undefined){this.data.content=d}if(c!=undefined){this.data.returnFunction=c}if(b!=undefined){this.data.acceptBtn=b}if(e!=undefined){this.data.cancelBtn=e}if(a!=undefined){this.data.alertType=a}return this},show:function(){try{if(typeof document.body.style.maxHeight==="undefined"){jQuery("body","html").css({height:"100%",width:"100%"});jQuery("html").css("overflow","hidden");if(document.getElementById("TB_HideSelect")===null){jQuery("body").append("<iframe id='TB_HideSelect' src='/ibcomv3/js/blank.html'></iframe>")}}if(document.getElementById("TB_overlay")===null){var a=getScrollXY();var d='<div id=\'TB_overlay\'></div><div id="contentAlert"><div id="margenAlert"><img alt="Iberia.com" src="/ibcomv3/images/simplificacion/log_ibcom_alert.gif"/>'+this.data.content+'</div><form action="#" method="post" name="alertIBForm" id="alertIBForm"><div class="clear">';if(this.data.cancelBtn!=""){d+='<span class="send_btn blanco ftl"><input type="button" value="'+this.data.cancelBtn+'" class="submit_vol cancel" name="boton" id="alertIBCancel"/></span>'}if(jQuery.isArray(this.data.acceptBtn)){for(var b=this.data.acceptBtn.length;b>0;b--){d+='<span class="send_btn ftr mrgLeft"><input type="button" value="'+this.data.acceptBtn[b-1]+'" class="submit_vol" name="boton" id="alertIBOk_'+b+'"/></span>'}d+="</div></form></div>"}else{d+='<span class="send_btn ftr"><input type="button" value="'+this.data.acceptBtn+'" class="submit_vol" name="boton" id="alertIBOk"/></span></div></form></div>'}jQuery("body").append(d);jQuery("#contentAlert").css("top",parseInt(a.y+50));jQuery("#alertIBCancel").click(function(){alertIB.hide();alertIB.data.returnFunction(false);return false});jQuery("#alertIBOk").click(function(){alertIB.hide();alertIB.data.returnFunction(true);return false});jQuery("[id^=alertIBOk_]").click(function(){alertIB.hide();alertIB.data.returnFunction(this.id.split("_")[1]);return false})}if(tb_detectMacXFF()){jQuery("#TB_overlay").addClass("TB_overlayMacFFBGHack")}else{jQuery("#TB_overlay").addClass("TB_overlayBG")}}catch(c){}},hide:function(){jQuery("#contentAlert").fadeOut("fast",function(){jQuery("#contentAlert,#TB_overlay,#TB_HideSelect").trigger("unload").unbind().remove()});jQuery("#TB_load").remove();if(typeof document.body.style.maxHeight=="undefined"){jQuery("body","html").css({height:"auto",width:"auto"});jQuery("html").css("overflow","")}document.onkeydown="";document.onkeyup="";return false}};function tb_detectMacXFF(){var a=navigator.userAgent.toLowerCase();if(a.indexOf("mac")!=-1&&a.indexOf("firefox")!=-1){return true}}function getScrollXY(){var b=0,a=0;if(typeof(window.pageYOffset)=="number"){a=window.pageYOffset;b=window.pageXOffset}else{if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){a=document.body.scrollTop;b=document.body.scrollLeft}else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){a=document.documentElement.scrollTop;b=document.documentElement.scrollLeft}}}return{x:b,y:a}};
