//<![CDATA[

    String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g, ''); };
    
    var min_pass_length = 5;
    
    // Redirect to main page
    function toMainPage(){
        window.location = "/";
    }
    
    function toParentMainPage(){
        window.parent.location = "/";
    }
    
    function isEmail(string) {
        return (string.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1);
    }
    
    function formatCurrency(num) {
        num = isNaN(num) || num === '' || num === null ? 0.00 : num;
        return parseFloat(num).toFixed(2);
    }
    
    function MM_jumpMenu(targ,selObj,restore){ //v3.0
        eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
        if (restore) selObj.selectedIndex=0;
    }
    
    $(function(){
        $('a.newWindow').attr('target','_blank');
    });
    
//]]>
