function trim (stringToTrim){return stringToTrim.replace(/^\s+|\s+$/g,"");}

function showmodal(width,height) {
var top = ($("#body").position().top);
var left = Math.floor(($(window).width()/2) - (width/2));
$(".modal").css({position:'absolute',left:left + 'px',top:top + 'px',width:width,height:'auto'});
$("#body").css({opacity:'.75'});$(".modal").show();}

function hidemodal() {
$("#body").css({opacity:'1.0'});
$(".modal").fadeOut();
$(".modal").html("");
}


$.blockUI.defaults = { 
    // message displayed when blocking (use null for no message) 
    message:  null, 
     
    // styles for the overlay 
    overlayCSS:  {  
        backgroundColor:'#000',  
        opacity:        '0'  
    }, 
     
    allowBodyStretch: true, 
   
    constrainTabKey: true, 

    fadeOut:  400, 
    applyPlatformOpacityRules: true 
}; 