anchor.diff:  			  '</td>'+
   		  '</tr>';
   		  
  -	    $('#'+tableID+' tr:last').after(rowData);
  +	    $('#'+tableID).append(rowData);
  +	}
  +	
  +	function addRowVcloud(tableID,id,protocol,fromPort,toPort,cidrIps) {
  +		var rowData = '<tr valign="top">'+
  +			  '<input type="hidden" name="ids" id="ids" value=0>'+
  +			  '<td style="width: 5%;"><input type="text" name="rname" id="rname" size="10" class="required"></td>'+
  +			  '<td style="width: 5%;"><select name="direction" id="direction" style="width:80px;" class="required"></select></td>'+
  +			  '<td style="width: 5%;"><input type="text" name="sourceIP" id="sourceIP" size="10" class="required"></td>'+
  +			  '<td style="width: 5%;"><select name="sourcePort" id="sourcePort" style="width:80px;" class="required"></select></td>'+
  +			  '<td style="width: 5%;"><input type="text" name="destinationIP" id="destinationIP" size="10" class="required"></td>'+
  +			  '<td style="width: 5%;"><select name="destinationPort" id="destinationPort" style="width:80px;" class="required number"></select></td>'+
  +			  '<td style="width: 5%;"><select name="protocol" id="protocol" style="width:80px;" class="required number"></select></td>'+
  +			  '<td style="width: 5%;"><select name="action" id="action" style="width:80px;" class="required number"></select></td>'+
  +			  '<td style="width: 5%;"><input type="checkbox" name="status" id="status" size="10" ></td>'+
  +			  '<td style="width: 5%;">'+
  +					'<a title="Remove Rule" onclick="deleteRow(this,null)"><img src=../images/minus.png></a>'+
  +			  '</td>'+
  +		  '</tr>';
  +		  
  +	    $('#'+tableID).append(rowData);
  +	}
  +	
  +	function addRowWithDataVcloud(tableID, ipPermissionP) {
  +		var rowData = '<tr valign="top">'+
  +			  '<input type="hidden" name="ids" id="ids" value=0>'+
  +			  '<td style="width: 5%;"><input type="text" name="vcloudName" id="vcloudName" size="10" value=\''+ipPermissionP.vcloudName+'\' class="required"></td>'+
  +			  '<td style="width: 5%;"><select name="vcloudDirection" id="vcloudDirection" style="width:80px;" class="required">'+ 
  +			  		'<option value=\''+ipPermissionP.vcloudDirection+'\'>'+ipPermissionP.vcloudDirection+'</option></select></td>'+
  +			  '<td style="width: 5%;"><input type="text" name="vcloudSourceIp" id="vcloudSourceIp" size="10" value=\''+ipPermissionP.vcloudSourceIp+'\' class="required"></td>'+
  +			  '<td style="width: 5%;"><select name="vcloudSourcePort" id="vcloudSourcePort" style="width:80px;" class="required">'+ 
  +			  		'<option value=\''+ipPermissionP.vcloudSourcePort+'\'>'+ipPermissionP.vcloudSourcePort+'</option></select></td>'+
  +			  '<td style="width: 5%;"><input type="text" name="vcloudDestinationIp" id="vcloudDestinationIp" size="10" value=\''+ipPermissionP.vcloudDestinationIp+'\' class="required"></td>'+
  +			  '<td style="width: 5%;"><select name="vcloudDestinationPort" id="vcloudDestinationPort" style="width:80px;" class="required number">'+
  +			  		'<option value=\''+ipPermissionP.vcloudDestinationPort+'\'>'+ipPermissionP.vcloudDestinationPort+'</option></select></td>'+
  +			  '<td style="width: 5%;"><select name="protocol" id="protocol" style="width:80px;" class="required number">'+
  +			  		'<option value=\''+ipPermissionP.protocol+'\'>'+ipPermissionP.protocol+'</option></select></td>'+
  +			  '<td style="width: 5%;"><select name="action" id="action" style="width:80px;" class="required number">'+ 
  +			  		'<option value=\''+ipPermissionP.protocol+'\'>'+ipPermissionP.protocol+'</option></select></td>'+
  +			  '<td style="width: 5%;"><input type="checkbox" name="vcloudEnabled" id="vcloudEnabled" size="10" checked=\''+ipPermissionP.vcloudEnabled+'\' ></td>'+
  +			  '<td style="width: 5%;">'+
  +					'<a title="Remove Rule" onclick="deleteRow(this,null)"><img src=../images/minus.png></a>'+
  +			  '</td>'+
  +		  '</tr>';
  +		  
  +	    $('#'+tableID).append(rowData);
   	}
   	
   	function deleteRow(row,id) {
  
positive.code: 	}
  	
  	function afterEdit_secgroup(p){
  		viewed_secgroup=p.id;
  		centerPopup_secgroup();
  		loadPopup_secgroup();
  		dwr.util.setValues(p);
  		dwr.util.setValue('product',p.product.id);
  		clearTable('secTable');
  		IpPermissionP.findBySecurityGroup(p,function(p) {
  			for (j=0;j<p.length;j++)
  			{
  				addRowWithData('secTable',p[j].id,p[j].protocol,p[j].fromPort,p[j].toPort,p[j].cidrIps);
  				//addRow('secTable');//alert(p[j].protocol);
  			}
  		});
  		//if(p.ipPermissionPs!=null && p.ipPermissionPs.length>0){
  			//var j=0;
  			//for (j=0;j<p.ipPermissionPs.length;j++)
  
negative.code: <script type='text/javascript' src='/dwr/interface/ProjectService.js'></script>
  <script type="text/javascript">
  	function clearTable(tableID) {
  		//$(document.getElementById(tableID)).find("tr:gt(0)").remove();
  		$('#'+tableID).html('');
  	}
  	
  	function addRowLabel(tableID){
  		var rowData = '<tr>'+
  			'<td style=\"width: 20%;\">Protocol : <\/td>'+
  			'<td style=\"width: 20%;\">From Port : <\/td>'+
  			'<td style=\"width: 20%;\">To Port : <\/td>'+
  			'<td style=\"width: 20%;\">CIDR : <\/td>'+
  			'<td style=\"width: 5%;\">\t<a title=\"Add New Rule\" onclick=\"addRow(\'secTable\');return false;\"> <img src=\"..\/images\/add_row.png\"\/> <\/a><\/td>'+
  			'<td style=\"width: 15%;\"><\/td>'+
  		'<\/tr>';
  		$('#'+tableID).append(rowData);
  	}
  	
  	function addRowLabelVcloud(tableID){
  		var rowData = '<tr style="font-size:12px;">'+
  			'<td style=\"width: 5%;\">Name : <\/td>'+
  			'<td style=\"width: 5%;\">Direction : <\/td>'+
  			'<td style=\"width: 5%;\">Source IP : <\/td>'+
  			'<td style=\"width: 5%;\">Source Port : <\/td>'+
  			'<td style=\"width: 5%;\">Destination IP : <\/td>'+
  			'<td style=\"width: 5%;\">Destination Port : <\/td>'+
  			'<td style=\"width: 5%;\">Protocol : <\/td>'+
  			'<td style=\"width: 5%;\">Action : <\/td>'+
  			'<td style=\"width: 5%;\">Enabled : <\/td>'+
  			'<td style=\"width: 5%;\">\t<a title=\"Add New Rule\" onclick=\"addRowVcloud(\'secTable\');return false;\"> <img src=\"..\/images\/add_row.png\"\/> <\/a><\/td>'+
  		'<\/tr>';
  		$('#'+tableID).append(rowData);
  	}
  	
  	function addRowWithData(tableID,id,protocol,fromPort,toPort,cidrIps) {
  		var rowData = '<tr valign="top">'+
  				'<input type="hidden" name="ids" id="ids" value=\''+id+'\'>'+	  
  				'<td style="width: 20%;"><input type="text" name="protocol" id="protocol" size="20" value=\''+protocol+'\' class="required"></td>'+
  			  '<td style="width: 20%;"><input type="text" name="fromPort" id="fromPort" size="20" value=\''+fromPort+'\' class="required number"></td>'+
  			  '<td style="width: 20%;"><input type="text" name="toPort" id="toPort" size="20" value=\''+toPort+'\' class="required number"></td>'+
  			  '<td style="width: 20%;"><input type="text" name="cidrIps" id="cidrIps" size="20" value=\''+cidrIps+'\' ></td>'+
  			  '<td style="width: 5%;">'+
  					'<a title="Remove Rule" onclick="deleteRow(this,'+id+')"><img src=../images/minus.png></a>'+
  			  '</td>'+
  		  '</tr>';
  		$('#'+tableID).append(rowData);
  	}
  	
  	function addRow(tableID){
  		var rowData = '<tr valign="top">'+
  			  '<input type="hidden" name="ids" id="ids" value=0>'+
  			  '<td style="width: 20%;"><input type="text" name="protocol" id="protocol" size="20" class="required"></td>'+
  			  '<td style="width: 20%;"><input type="text" name="fromPort" id="fromPort" size="20" class="required number"></td>'+
  			  '<td style="width: 20%;"><input type="text" name="toPort" id="toPort" size="20" class="required number"></td>'+
  