function showTips(icon,css,message){if($('#GTip').length==0){var tip="
";var h=$(document).height();var w=$(document).width();$('body').append($(tip));$('#GTip').css({top:72,left:(w-300)/2})}else{$('#GTip').removeAttr('class')}$('#GTip').addClass(css);$('#GTip').fadeIn(200,function(){window.setTimeout(function(){$('#GTip').fadeOut(300,function(){$('#GTip').remove()})},2000)})}function prepareShowProcess(css,message){if($('#ProcessDialog').length==0){var tip="";var h=$(document).height();var w=$(document).width();$('body').append($(tip));$('#ProcessDialog').addClass(css.tip);$('#ProcessIcon').addClass(css.icon);$('#ProcessDialog').css({top:72,left:(w-300)/2});$('#ProcessDialog').fadeIn("slow")}else{$('#ProcessDialog').find('label').text(message);$('#ProcessDialog').fadeIn("slow")}$('.panel').css('z-index','997')}function hideProcess(){$('#ProcessDialog').hide();if($('.gdialog:visible').length==0){$('#global_mask').fadeOut("slow")}$('.panel').css('z-index','1000')}function showSTip(message){showTips("glyphicon-ok-sign","tip_green",message)}function showHTip(message){showTips("glyphicon-info-sign","tip_blue",message)}function showProcess(message){prepareShowProcess({tip:'tip_process',icon:'icon_loading_small'},message);var h=$(document).height();$('#global_mask').css('height',h);$('#global_mask').fadeIn("slow")}function showETip(message){showTips("glyphicon-remove-sign","tip_red",message)}function fadeInTips(css,message){$('#tips').removeClass();$('#tips').addClass(css);$('#tips').html(message);$('#tips').fadeIn("slow")}function isEmail(str){var reg=/^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;return reg.test(str)}function isImageFile(filename){var postf=filename.substring(filename.lastIndexOf('.')+1,filename.length).toLowerCase();return postf=='jpg'||postf=='png'||postf=='jpeg'}function isCsvTemplateFile(filename){var postf=filename.substring(filename.lastIndexOf('.')+1,filename.length).toLowerCase();return postf=='csv'}function doShowDialog(dialogId,animate){$('#'+dialogId).modal({show:true})}function doHideDialog(dialogId,animate){$('#'+dialogId).modal('hide')}function doShowConfirm(setting){if($('#ConfirmDialog').length==0){var dialog="