function add_ACCADEMIC()
	{
	var isOpera, isIE = false;
	if(navigator.appName=='Microsoft Internet Explorer'){isIE = true;}
	var tblvar, row_tbl, contnum;
	contactnum = parseInt(document.getElementById('hid_tot_contact_all_acd').value,10)+1;
	tblvar = document.getElementById('tbl_ACCADEMIC');
	row_tbl = tblvar.insertRow(tblvar.rows.length);
	row_tbl.className = 'small'; 
	rowIdVar =  'tr_ACCV_'+contactnum;
	row_tbl.setAttribute('id',rowIdVar);
	row_tbl.setAttribute('class','TBLSTYL');
	

	td_1=row_tbl.insertCell(0);
	td_1.align='center';
	td_2=row_tbl.insertCell(1);
	td_2.align='center';
	td_3=row_tbl.insertCell(2);
	td_3.align='center';
	td_4=row_tbl.insertCell(3);
	td_4.align='center';
	td_5=row_tbl.insertCell(4);
	td_5.align='center';
	
	input1=null;
	idName = 'accd_proj_name_'+contactnum;
	if(!isIE)
		{
		input1				= document.createElement('input');
		input1.setAttribute('type','text');
		input1.setAttribute('id',idName);
		input1.setAttribute('name',idName);
		input1.setAttribute('value','');
		input1.setAttribute('size','30');  
		input1.setAttribute('class',"small");		
		}
	else
		{
		input1	= document.createElement('<input name='+idName+' id='+idName+' size="30" type="text" />');
		input1.setAttribute('value','');
		input1.setAttribute('className',"small");
		}
	td_1.appendChild(input1);

	input1=null;
	idName = 'accd_proj_descr_'+contactnum; 
	if(!isIE)
		{
		input1				= document.createElement('textarea');
		input1.setAttribute('type','textarea');
		input1.setAttribute('id',idName);
		input1.setAttribute('name',idName);		
		input1.setAttribute('cols','40'); 
		input1.setAttribute('rows','3');  
		input1.setAttribute('class',"small");		
		}
	else
		{
		input1	= document.createElement('<textarea name='+idName+' rows='+3+' cols='+40+' id='+idName+'/></textarea>');		
		input1.setAttribute('className',"small");
		}
	td_2.appendChild(input1);

	input1=null;
	idName = 'accd_proj_dur_'+contactnum; 
	if(!isIE)
		{
		input1				= document.createElement('input');
		input1.setAttribute('type','text');
		input1.setAttribute('id',idName);
		input1.setAttribute('name',idName);
		input1.setAttribute('value','');
		input1.setAttribute('size','10');  
		input1.setAttribute('class',"small");		
		}
	else
		{
		input1	= document.createElement('<input name='+idName+' id='+idName+' size="10" type="text" />');
		input1.setAttribute('value','');
		input1.setAttribute('className',"small");
		}
	td_3.appendChild(input1);
	
	input1=null;
	idName = 'accd_proj_tmsize_'+contactnum; 
	if(!isIE)
		{
		input1				= document.createElement('input');
		input1.setAttribute('type','text');
		input1.setAttribute('id',idName);
		input1.setAttribute('name',idName);
		input1.setAttribute('value','');
		input1.setAttribute('size','3');  
		input1.setAttribute('class',"small");		
		}
	else
		{
		input1	= document.createElement('<input name='+idName+' id='+idName+' size="3" type="text" />');
		input1.setAttribute('value','');
		input1.setAttribute('className',"small");
		}
	td_4.appendChild(input1);

	td_5.innerHTML="<div id='div_delete_"+contactnum+"'><a href='javascript: del_contact_acd("+contactnum+");'><img src='close_btn.jpg' width='25' height='25' border='0' title='Click here to delete this row'></a></div>";
	document.getElementById('hid_tot_contact').value = parseInt(document.getElementById('hid_tot_contact_acd').value,10)+1;
	document.getElementById('hid_tot_contact_all_acd').value = contactnum; 
	show_contactAddNext(); 
	}

function del_contact_acd(rowid)
	{
	var totCont = 0;
	document.getElementById('accd_proj_name_'+rowid).value='';
	document.getElementById('accd_proj_descr_'+rowid).value='';
	document.getElementById('accd_proj_dur_'+rowid).value='';
	document.getElementById('accd_proj_tmsize_'+rowid).value='';

	document.getElementById('tr_ACCV_'+rowid).style.display = 'none';
	totCont = parseInt(document.getElementById('hid_tot_contact_acd').value,10)-1;	
	if(totCont < 0) 
		totCont=0;
	document.getElementById('hid_tot_contact_acd').value = totCont; 
	show_contactAddNext(); 
	}

function show_contactAddNext()
	{
	var totCont = 0;
	var maxCont = 0;
	
	totCont = parseInt(document.getElementById('hid_tot_contact_acd').value,10);	
	maxCont = parseInt(document.getElementById('hid_maxcont_acd').value,10);
	if(totCont >= maxCont)
		{
		document.getElementById('tbl_contactAddNext_acd').style.display = 'none';
		}
	else 
		{
		document.getElementById('tbl_contactAddNext_acd').style.display = '';
		}
	}
