function popup(c,b,e,a,d){if(c=="sVideo"){$("#popup_sVideo").modal({position:["20%",],overlayId:"popupOverlay",containerId:"popup_sVideoContainer",onOpen:function(f){f.overlay.fadeIn(200,function(){f.container.fadeIn(200,function(){f.data.fadeIn(200,function(){})})})},onShow:function(f){partes=b.split("@_@");f.data.find(".popup_mensaje").append('<div style="float:left; padding-left:10px">'+partes[0]+"</div>");if(partes[1].substring(0,3)=="##_"){partes[1]=partes[1].substring(3,partes[1].length);partes[1]=partes[1].replace(/#@#/g,"'");f.data.find(".popup_cuerpo").append(partes[1])}else{$("#cuerpo_sVideo_dialogo").load(partes[1])}$("#popup_sVideoContainer .popup_cancelar").click(function(){f.data.fadeOut(200,function(){f.container.fadeOut(200,function(){f.overlay.fadeOut(200,function(){$.modal.close();if($.isFunction(d)){d(a)}})})})})},onClose:function(f){f.data.fadeOut(200,function(){f.container.fadeOut(200,function(){f.overlay.fadeOut(200,function(){$.modal.close()})})})}})}else{$("#popup_"+c).modal({position:["20%",],overlayId:"popupOverlay",containerId:"popupContainer",onOpen:function(f){f.overlay.fadeIn(200,function(){f.container.fadeIn(200,function(){f.data.fadeIn(200,function(){})})})},onShow:function(f){if(c=="dialogo"){partes=b.split("@_@");f.data.find(".popup_mensaje").append('<div style="float:left; padding-left:10px">'+partes[0]+"</div>");if(partes[1].substring(0,3)=="##_"){partes[1]=partes[1].substring(3,partes[1].length);partes[1]=partes[1].replace(/#@#/g,"'");f.data.find(".popup_cuerpo").append(partes[1])}else{$("#cuerpo_dialogo").load(partes[1])}}else{f.data.find(".popup_texto").append(b)}$("#popupContainer .popup_aceptar").click(function(){f.data.fadeOut(200,function(){f.container.fadeOut(200,function(){f.overlay.fadeOut(200,function(){if(c=="dialogo"){if($.isFunction(e)){e(a)}$.modal.close()}else{$.modal.close();if($.isFunction(e)){e(a)}}})})})});$("#popupContainer .popup_cancelar").click(function(){f.data.fadeOut(200,function(){f.container.fadeOut(200,function(){f.overlay.fadeOut(200,function(){$.modal.close();if($.isFunction(d)){d(a)}})})})})},onClose:function(f){f.data.fadeOut(200,function(){f.container.fadeOut(200,function(){f.overlay.fadeOut(200,function(){$.modal.close()})})})}})}};