		<div class="row">

                        <div class="col-sm-12">

                            <div class="panel panel-primary">

                                <div class="panel-heading">

                                    <h3 class="panel-title">
									
									<a class="btn btn-success add-more" onClick="callAddContact2();" >+ Add New Firm and Architect</a>&nbsp;&nbsp &nbsp;&nbsp;<a class="btn btn-success add-more" style="cursor:pointer; margin-left:20px" onClick="delRow();" title="Click to remove">
								  <span class="glyphicon glyphicon-remove"></span>&nbsp;Del							</a>
								</h3></div>

 <div class="panel-body">

                                    <div class="row">
													
<table class="table table-striped table-bordered table-hover" id="cntTable2">
							<thead>
								<tr>
									<td width="100px" height="28"valign="middle" nowrap="nowrap" ><div align="left" style="padding-left:5px;"><strong>Sr.No.</strong></div></td>
									<td  height="28"valign="middle" nowrap="nowrap" ><div align="left" style="padding-left:5px;"><strong>Architect Firm Name</strong></div></td>
																		<td  height="28"valign="middle" nowrap="nowrap" ><div align="left" style="padding-left:5px;"><strong> Firm City</strong></div></td>

									<td  height="28"valign="middle" nowrap="nowrap" ><div align="left" style="padding-left:5px;"><strong>Architect Name</strong></div></td>
									<td  height="28"valign="middle" nowrap="nowrap" ><div align="left" style="padding-left:5px;"><strong>Architect Mobile No.</strong></div></td>
									<td  height="28"valign="middle" nowrap="nowrap" ><div align="left" style="padding-left:5px;"><strong>Architect Designation</strong></div> </td>
							</tr></thead>
							<tbody>
							</tbody>
						</table> 
						

					  	<input id="allcontypes" name="allcontypes" value="Decision Maker~^~Influencer~^~Recommender~^~User~^~Purchase Officer" type="hidden">
						<input name="cntlnos" id="cntlnos" value="" type="hidden">
						<input name="cntcount2" id="cntcount2" value="" type="hidden">
						<input name="cntdelids" id="cntdelids" value="" type="hidden">


                                    </div>

                                </div>

                            </div>

                        </div>

                    </div>
					
					
					
					  <script type="text/Javascript">
	function callAddContact2()
	{
	
   var tbl = document.getElementById('cntTable2');
	 var lastRow = tbl.rows.length;
	 // if there's no header row in the table, then iteration = lastRow + 1
	 var iteration = lastRow;
	 var row = tbl.insertRow(lastRow);
	 var node1;
	 var lineno = lastRow;
	 // cell 0
	 var cellLeft = row.insertCell(0);
	 cellLeft.className = "center";
		var node = document.createElement('span');
		node.className = "glyphicon glyphicon-remove";
		node.title="Delete line";
		var link = document.createElement("a");
		link.className = "btn bg-btn-delete";
		link.style.padding = "0px 2px";
		link.href="javascript:callRemoveContact("+lineno+");";
		link.appendChild(node);
		//cellLeft.appendChild(link);
	 
	 node = document.createElement("input");
	 node.type = 'hidden';
	 node.name = 'cid'+lineno;
	 node.value = '';
	 node.id = 'cid'+lineno;
	 cellLeft.appendChild(node);
	 node = document.createElement("input");
	 node.type = 'text';
	 node.style.width = "50px";
	
	 node.name = 'clinenum'+lineno;
	 node.value = lineno;
	 node.id = 'clinenum'+lineno;
	 cellLeft.appendChild(node);
	 
	 
	 

 var cell1 = row.insertCell(1); 
    var node = document.createElement('input');
    node.className = 'form-control';
	 node.name = 'firm_name'+lineno;
	 node.placeholder='Firm Name';
	 node.value = "";
	 node.id = '';
	 cell1.appendChild(node);
	 
	  var cell2 = row.insertCell(2); 
    var node = document.createElement('input');
    node.className = 'form-control';
	 node.name = 'firm_city'+lineno;
	 node.placeholder='Firm City';
	 node.value = "";
	 node.id = '';
	 node.style.textTransform='capitalize';
	 cell2.appendChild(node);
	 
	 
	 	 
	  var cell3 = row.insertCell(3); 
    var node = document.createElement('input');
    node.className = 'form-control';
	 node.name = 'architect_name'+lineno;
	 node.placeholder='Architect Name';
	 node.value = "";
	 node.id = '';
	 cell3.appendChild(node);
	

	  var cell4 = row.insertCell(4); 
    var node = document.createElement('input');
    node.className = 'form-control';
	 node.name = 'mobile_no'+lineno;
	 node.placeholder='Mobile';
	 node.value = "";
	 node.id = '';
	 cell4.appendChild(node);
	
	
		
	 var cell5 = row.insertCell(5); 
    var nodegend = document.createElement('select');
    nodegend.className = 'form-control';
	 nodegend.name = 'designation'+lineno;
 var opt = nodegend.options;
 opt[opt.length] = new Option('Select','');
 <?php $query21 = "select * from architec_designation_master order by designation ASC";
      // echo $query21;
       $result21 = mysqli_query($conn,$query21);
       $total = mysqli_num_rows($result21);
        while($row=mysqli_fetch_array($result21))
           {
$designation = $row['designation'];
 ?>
opt[opt.length] = new Option('<? echo $designation ?>','<? echo $designation ?>');
<? } ?>
cell5.appendChild(nodegend);
	
	
	 
	
	
		
	document.getElementById('cntcount2').value = lineno;
	document.getElementById('sigthseeing').style.visibility='visible';
	
}function delRow()
{

    var tableName = document.getElementById('cntTable2');

    var prev = tableName.rows.length;

    if(prev > 1)

{
    

/////////////////////////////////////////////////////////////////////////////////////
   
	 // if there's no header row in the table, then iteration = lastRow + 1
	
	 var row = document.getElementById('cntTable2').deleteRow(prev-1);
	 
	 }
	 var node1;
	  var iteration = lastRow;
	 var lastRow = tableName.rows.length;
	 var lineno = lastRow;
document.getElementById('cntcount2').value = lineno-1;




}
</script>