/* All Rights Reserved - Compressed Files - (C) Copyright 2010 - Softel vdm, Inc. - www.softelvdm.com */


function Softelvdm_InPopup(){return false;}
function Softelvdm_PleaseWait_Show(strText){var $idWD=$("#Softelvdm_WaitPopup");$('#Softelvdm_WaitPopup_Text',$idWD).text(strText);$idWD.bind('dialogbeforeclose',function(ev,ui){return false;});$idWD.dialog('open');return false;}
function Softelvdm_PleaseWait_Hide(){var $idWD=$("#Softelvdm_WaitPopup");$idWD.unbind('dialogbeforeclose');$idWD.dialog('close');return false;}
$(document).ready(function(){var $idWD=$("#Softelvdm_WaitPopup");$idWD.dialog({autoOpen:false,modal:true,height:'auto',closeOnEscape:false,draggable:false,resizable:false,zIndex:30000,buttons:{}});});$(document).ready(function(){$(document).bind('Softelvdm_PleaseWait_Show',function(ev,strText){Softelvdm_PleaseWait_Show(strText);});$(document).bind('Softelvdm_PleaseWait_Hide',function(ev){Softelvdm_PleaseWait_Hide();});});function Softelvdm_Alert(strText,strTitle,onOk){strText=strText.replace(/\n/g,"<br />");var $idAlertDialog=$("#Softelvdm_AlertPopup");if(strTitle==undefined)
strTitle=$('.t_title',$idAlertDialog).val();$idAlertDialog.html(strText);$idAlertDialog.dialog('option','title',strTitle);if(onOk!=undefined){$idAlertDialog.dialog('option','buttons',{"OK":function(){$(this).dialog("close");onOk()}});}
$idAlertDialog.dialog('open');return false;}
$(document).ready(function(){var $idAlertDialog=$("#Softelvdm_AlertPopup");$idAlertDialog.dialog({autoOpen:false,modal:true,height:'auto',width:'400px',closeOnEscape:true,draggable:true,resizable:false,zIndex:30001,buttons:{"OK":function(){$(this).dialog("close");}}});});$(document).ready(function(){$(document).bind('Softelvdm_Alert',function(ev,strText,strTitle,onOk){Softelvdm_Alert(strText,strTitle,onOk);});});function Softelvdm_ConfirmYesNo(h){var $idConfirmDialog=$("#Softelvdm_ConfirmPopup");$idConfirmDialog.html(h.text.replace(/\n/ig,"<br />"));$idConfirmDialog.dialog({autoOpen:false,modal:true,height:'auto',closeOnEscape:true,draggable:true,title:(h.title!=undefined)?h.title:"Confirmation Required",resizable:false,zIndex:30002,buttons:{"No":function(){$(this).dialog("destroy");if(h.no!=undefined)
h.no(h.data);},"Yes":function(){$(this).dialog("destroy");if(h.yes!=undefined)
h.yes(h.data);}}});$idConfirmDialog.dialog("open");return false;}
$(document).ready(function(){$(document).bind('Softelvdm_ConfirmYesNo',function(ev,h){Softelvdm_ConfirmYesNo(h);});});function Softelvdm_Popup_Show(loadUrl,unload,saveAction){$('#Softelvdm_PopWindow').jqm({modal:true,trigger:false,target:'#Softelvdm_PopWindowContent',overlayClass:'popupoverlay',closeClass:'popupclose',onHide:function(info){var $modal=$(info.w);$modal.hide();info.o.remove();if(unload){var $content=$('iframe',$modal);$content.html('').attr('src','');}
if(saveAction!=undefined&&saveAction.length>0){saveAction(document.sftPopupWindowCloseReason);}},onShow:function(info){var $modal=$(info.w);var $content=$('iframe',$modal);$content.attr('allowTransparency','true');var src=$content.html('').attr('src');if(src==''||src!=loadUrl){var $win=$('#Softelvdm_PopWindow');$win.removeClass('popupsmall popupmedium popuplarge popuphuge').addClass('popupsmall');var $loading=$('.popuploading',$modal);$loading.show();document.expando=true;document.sftPopupWindowActive='Softelvdm_PopWindow';document.sftPopupWindowCloseReason='';$content.html('').attr('src',loadUrl);}
$modal.show();}}).jqmShow();return false;}
function Softelvdm_Popup_ShowWithReturnPosition(loadUrl,unload){var url=Softelvdm_CurrentUrlPosition();loadUrl+=((loadUrl.indexOf("?")>=0)?"&":"?")+'xReturnUrl=';loadUrl+=encodeURIComponent(url);return Softelvdm_Popup_Show(loadUrl,unload);}

