Communication Next button

I'm trying to put a button on the communication edit screen that will grab the NextID in order to generate the next URL to redirect to.  I'm hard coding for now but can't I replace the key value paris with the following code?  I will still need to figure out how to get the NextID number for the next URL but I know what communication id I'll need by pulling the NextID from the current querystring.  

<script language='javascript'>

function nextComm() {

            var nextID=crm.getArg("NextID",crm.url());


                                                                                      var url = crm.url();


var newURL = crm.url({NextID:'3', Comm_CommunicationId:'2'});