                            <script type="text/javascript">
                                $("#revenueCalc").click(function(){
                                    /*revenue per customer*/
                                    var c = parseInt("70");
                                    var t = parseInt($("#mcDomains").val());
                                    var y = parseFloat($("#rate").val());
                                    
                                    //make a percent
                                    var y = parseFloat(y) / 100;
                                    var P = t * y * c;
                                    
                                    //set the number to a string and get the length
                                    var lP = new String(P);
                                    var totalLength = lP.length;
                                    
                                    //if the lenght is greater than three
                                    if (totalLength > 3 && totalLength <= 6) {
                                        var insert = new Number(totalLength - 3);
                                        var text = lP;
                                        var text1 = text.slice(0, insert);
                                        var text2 = text.slice(insert, totalLength);
                                        var final = (text1 + ',' + text2);
                                    }
                                    //if the length is larger than 6 add another comma
                                    else 
                                        if (totalLength >= 7) {
                                            var insert = new Number(totalLength - 3);
                                            var text = lP;
                                            var text2 = text.slice(insert, totalLength);
                                            var text3 = text.slice(0, 1);
                                            var text1 = text.slice(1, insert);
                                            var final = (text3 + ',' + text1 + ',' + text2);
                                        }
                                        
                                        else {
                                            var final = P;
                                        }
                                    
                                    $("#mcPayment").val("$" + final);
                                    return false;
                                });
                            </script>
