 var callback = {
                success : function(o) {

                        var output = o.responseText;
                        var data = JSON.parse(output);
                        var record = document.getElementsByName('record')[0].value;
                        var x = 1;
                        var html = '<div align="center">';
                        for(var i in data) {
                        	if (x == 1) {
                        		html += '<h3>Following duplicates are found..</h3><br/>';
                        	}
                        	html += '<a href="index.php?module=Leads&action=DetailView&record=' + i +  '">' + x + '. ' +  data[i].name + '</a>&nbsp;&nbsp;<a href="index.php?module=MergeRecords&action=index&action_module=Leads&return_module=Leads&return_action=DetailView&return_record=&uid=' + record +',' + i + '">Merge</a><br/>';
                        	x++;
                        }
                        html += '</div>';
                        $('#content').prepend(html);

                }
        }
        var record = document.getElementsByName('record')[0].value;
        var connectionObject = YAHOO.util.Connect.asyncRequest("GET",
                        "./index.php?module=Leads&action=checkDuplicate&record_id=" + record,
                        callback);
        
